From: Saurabh Singh Date: Thu, 14 Jul 2016 23:51:10 +0000 (-0700) Subject: Adding std::unique_ptr definition for the ASN1_TIME type. X-Git-Tag: 2016.07.26~50 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8195766508d4d14636b7c73083aeb1cfec8c943e;p=folly.git Adding std::unique_ptr definition for the ASN1_TIME type. Summary: The ASN1_TIME is the typically used within OpenSSL for representing time. For example, it can be used to represent the NotBefore and NotAfter properties of a certificate to be verified. This diff introduces a ASN1TimeUniquePtr type to take care of the ownership of the ASN1_TIME. Reviewed By: yfeldblum Differential Revision: D3561274 fbshipit-source-id: ca4d1431b33098cccd727253dd301e209d2561a5 --- diff --git a/folly/io/async/ssl/OpenSSLPtrTypes.h b/folly/io/async/ssl/OpenSSLPtrTypes.h index b39c3e87..97f89ff3 100644 --- a/folly/io/async/ssl/OpenSSLPtrTypes.h +++ b/folly/io/async/ssl/OpenSSLPtrTypes.h @@ -17,20 +17,28 @@ #pragma once #include + +#include +#include #include -#include -#include -#include #ifndef OPENSSL_NO_EC #include #endif -#include -#include +#include +#include +#include #include +#include + namespace folly { namespace ssl { +// ASN1 +using ASN1TimeDeleter = + folly::static_function_deleter; +using ASN1TimeUniquePtr = std::unique_ptr; + // X509 using X509Deleter = folly::static_function_deleter; using X509UniquePtr = std::unique_ptr;