summaryrefslogtreecommitdiff
path: root/src/LibgnutlsTLSSession.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 18:51:29 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2013-06-22 18:51:29 +0900
commit05d85e296563842ab57eb201fb6d11a68cf8fa41 (patch)
tree660bba2e5d2e90b5be41eb55398673ad91411e87 /src/LibgnutlsTLSSession.cc
parente791eb9ca334e7746bc0735cebcda09e30fa65df (diff)
Remove auto_delete in favor of std::unique_ptr
Diffstat (limited to 'src/LibgnutlsTLSSession.cc')
-rw-r--r--src/LibgnutlsTLSSession.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LibgnutlsTLSSession.cc b/src/LibgnutlsTLSSession.cc
index c855750d..e8eeda8f 100644
--- a/src/LibgnutlsTLSSession.cc
+++ b/src/LibgnutlsTLSSession.cc
@@ -209,7 +209,9 @@ int GnuTLSSession::tlsConnect(const std::string& hostname,
if(rv_ != GNUTLS_E_SUCCESS) {
return TLS_ERR_ERROR;
}
- auto_delete<gnutls_x509_crt_t> certDeleter(cert, gnutls_x509_crt_deinit);
+ std::unique_ptr<std::remove_pointer<gnutls_x509_crt_t>::type,
+ decltype(&gnutls_x509_crt_deinit)> certDeleter
+ (cert, gnutls_x509_crt_deinit);
rv_ = gnutls_x509_crt_import(cert, &peerCerts[0], GNUTLS_X509_FMT_DER);
if(rv_ != GNUTLS_E_SUCCESS) {
return TLS_ERR_ERROR;