From db405710b65fdbee806726aeb7bf6fd7ac9f653b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= Date: Thu, 17 May 2012 18:32:22 +0200 Subject: Fixing compilation on windows. Resolves: #1123 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 @@ -32,7 +32,7 @@ void WinUIHelpers::displayCertificateChainAsSheet(QWidget* parent, const std::ve boost::shared_ptr 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; @@ -42,7 +42,7 @@ void WinUIHelpers::displayCertificateChainAsSheet(QWidget* parent, const std::ve 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 }; -- cgit v0.10.2-6-g49f6