unique_ptr and OpenSSL's STACK_OF(X509)*
问题 I use some using statements and unique_ptr to work with OpenSSL, as suggested in another question. Without, code becomes really ugly and I am not so much a fan of goto statements. So far I have changed my code as far as possible. Here are examples, what I use: using BIO_ptr = std::unique_ptr<BIO, decltype(&::BIO_free)>; using X509_ptr = std::unique_ptr<X509, decltype(&::X509_free)>; using EVP_PKEY_ptr = std::unique_ptr<EVP_PKEY, decltype(&::EVP_PKEY_free)>; using PKCS7_ptr = std::unique_ptr