diff options
| author | Remko Tronçon <git@el-tramo.be> | 2012-05-17 16:32:22 (GMT) |
|---|---|---|
| committer | Remko Tronçon <git@el-tramo.be> | 2012-05-17 16:32:22 (GMT) |
| commit | db405710b65fdbee806726aeb7bf6fd7ac9f653b (patch) | |
| tree | 6e35235824e53fc8b8f0dc0c1e93d45a155b75cc | |
| parent | bed7d1cb425e4a04bedfa9be15a9f0920e64aaf9 (diff) | |
| download | swift-contrib-db405710b65fdbee806726aeb7bf6fd7ac9f653b.zip swift-contrib-db405710b65fdbee806726aeb7bf6fd7ac9f653b.tar.bz2 | |
Fixing compilation on windows.
Resolves: #1123
| -rw-r--r-- | Swift/QtUI/WinUIHelpers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swift/QtUI/WinUIHelpers.cpp b/Swift/QtUI/WinUIHelpers.cpp index edd1120..3942ac1 100644 --- a/Swift/QtUI/WinUIHelpers.cpp +++ b/Swift/QtUI/WinUIHelpers.cpp @@ -26,29 +26,29 @@ void WinUIHelpers::displayCertificateChainAsSheet(QWidget* parent, const std::ve HCERTSTORE chainStore = CertOpenStore(CERT_STORE_PROV_MEMORY, 0, NULL, CERT_STORE_DEFER_CLOSE_UNTIL_LAST_FREE_FLAG, NULL); if (!chainStore) { return; } ByteArray certAsDER = chain[0]->toDER(); boost::shared_ptr<const CERT_CONTEXT> certificate_chain; { PCCERT_CONTEXT certChain; - BOOL ok = CertAddCertificateContextToStore(chainStore, CertCreateCertificateContext(X509_ASN_ENCODING, certAsDER.data(), certAsDER.size()), CERT_STORE_ADD_ALWAYS, &certChain); + BOOL ok = CertAddCertificateContextToStore(chainStore, CertCreateCertificateContext(X509_ASN_ENCODING, vecptr(certAsDER), certAsDER.size()), CERT_STORE_ADD_ALWAYS, &certChain); // maybe free the cert contex we created if (!ok || !certChain) { return; } certificate_chain.reset(certChain, CertFreeCertificateContext); } for (size_t i = 1; i < chain.size(); ++i) { ByteArray certAsDER = chain[i]->toDER(); - CertAddCertificateContextToStore(chainStore, CertCreateCertificateContext(X509_ASN_ENCODING, certAsDER.data(), certAsDER.size()), CERT_STORE_ADD_ALWAYS, NULL); + CertAddCertificateContextToStore(chainStore, CertCreateCertificateContext(X509_ASN_ENCODING, vecptr(certAsDER), certAsDER.size()), CERT_STORE_ADD_ALWAYS, NULL); } CRYPTUI_VIEWCERTIFICATE_STRUCT viewDialogProperties = { 0 }; viewDialogProperties.dwSize = sizeof(viewDialogProperties); viewDialogProperties.hwndParent = parent->winId(); viewDialogProperties.dwFlags = CRYPTUI_DISABLE_EDITPROPERTIES | CRYPTUI_DISABLE_ADDTOSTORE | CRYPTUI_ENABLE_REVOCATION_CHECKING; viewDialogProperties.pCertContext = certificate_chain.get(); viewDialogProperties.cStores = 1; viewDialogProperties.rghStores = &chainStore; |
Swift