diff --git a/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp b/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp index b12708a180fdb55ea29bfe7e37595378ecba77dd..dd2b328ee5f6a1fb6a070edac2bbb1f41a984c17 100644 --- a/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp +++ b/include/Swiften/TLS/OpenSSL/OpenSSLServerContext.cpp @@ -181,7 +181,7 @@ void OpenSSLServerContext::sendPendingDataToApplication() { } bool OpenSSLServerContext::setServerCertificate(CertificateWithKey::ref certref) { - boost::shared_ptr certificate = boost::dynamic_pointer_cast(certref); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr certificate = SWIFTEN_SHRPTR_NAMESPACE::dynamic_pointer_cast(certref); if (certificate->isNull()) { LOG4CXX_ERROR(logger, "TLS WILL NOT WORK: Certificate can't be loaded."); return false; @@ -190,7 +190,7 @@ bool OpenSSLServerContext::setServerCertificate(CertificateWithKey::ref certref) // Create a PKCS12 structure BIO* bio = BIO_new(BIO_s_mem()); BIO_write(bio, vecptr(certificate->getData()), certificate->getData().size()); - boost::shared_ptr pkcs12(d2i_PKCS12_bio(bio, NULL), PKCS12_free); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr pkcs12(d2i_PKCS12_bio(bio, NULL), PKCS12_free); BIO_free(bio); if (!pkcs12) { LOG4CXX_ERROR(logger, "TLS WILL NOT WORK: Certificate is not in PKCS#12 format."); @@ -206,9 +206,9 @@ bool OpenSSLServerContext::setServerCertificate(CertificateWithKey::ref certref) LOG4CXX_ERROR(logger, "TLS WILL NOT WORK: Certificate is not in PKCS#12 format."); return false; } - boost::shared_ptr cert(certPtr, X509_free); - boost::shared_ptr privateKey(privateKeyPtr, EVP_PKEY_free); - boost::shared_ptr caCerts(caCertsPtr, freeX509Stack); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr cert(certPtr, X509_free); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr privateKey(privateKeyPtr, EVP_PKEY_free); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr caCerts(caCertsPtr, freeX509Stack); // Use the key & certificates if (SSL_CTX_use_certificate(context_, cert.get()) != 1) { @@ -223,7 +223,7 @@ bool OpenSSLServerContext::setServerCertificate(CertificateWithKey::ref certref) } Certificate::ref OpenSSLServerContext::getPeerCertificate() const { - boost::shared_ptr x509Cert(SSL_get_peer_certificate(handle_), X509_free); + SWIFTEN_SHRPTR_NAMESPACE::shared_ptr x509Cert(SSL_get_peer_certificate(handle_), X509_free); if (x509Cert) { return Certificate::ref(new OpenSSLCertificate(x509Cert)); } @@ -232,13 +232,13 @@ Certificate::ref OpenSSLServerContext::getPeerCertificate() const { } } -boost::shared_ptr OpenSSLServerContext::getPeerCertificateVerificationError() const { +SWIFTEN_SHRPTR_NAMESPACE::shared_ptr OpenSSLServerContext::getPeerCertificateVerificationError() const { int verifyResult = SSL_get_verify_result(handle_); if (verifyResult != X509_V_OK) { - return boost::shared_ptr(new CertificateVerificationError(getVerificationErrorTypeForResult(verifyResult))); + return SWIFTEN_SHRPTR_NAMESPACE::shared_ptr(new CertificateVerificationError(getVerificationErrorTypeForResult(verifyResult))); } else { - return boost::shared_ptr(); + return SWIFTEN_SHRPTR_NAMESPACE::shared_ptr(); } }