Add X509_EXTENSION unique pointer
authorAlex Guzman <reanimus@fb.com>
Thu, 3 Aug 2017 21:18:34 +0000 (14:18 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 3 Aug 2017 21:21:14 +0000 (14:21 -0700)
Summary: Adds unique pointer type for X509_EXTENSION

Reviewed By: knekritz

Differential Revision: D5556504

fbshipit-source-id: b84190f20dd0a2ee9f5f07f197caf53a9a063af7

folly/ssl/OpenSSLPtrTypes.h

index 7784888fba04695688341536dfac72ac91f09a0e..683add6a6e9b9a3e6ad9919f63f474b339516e06 100644 (file)
@@ -32,6 +32,10 @@ using ASN1TimeUniquePtr = std::unique_ptr<ASN1_TIME, ASN1TimeDeleter>;
 // X509
 using X509Deleter = folly::static_function_deleter<X509, &X509_free>;
 using X509UniquePtr = std::unique_ptr<X509, X509Deleter>;
+using X509ExtensionDeleter =
+    folly::static_function_deleter<X509_EXTENSION, &X509_EXTENSION_free>;
+using X509ExtensionUniquePtr =
+    std::unique_ptr<X509_EXTENSION, X509ExtensionDeleter>;
 using X509StoreDeleter =
     folly::static_function_deleter<X509_STORE, &X509_STORE_free>;
 using X509StoreUniquePtr = std::unique_ptr<X509_STORE, X509StoreDeleter>;