Update providedCiphersStr_ in one place.
[folly.git] / folly / io / async / SSLContext.cpp
index b38ea2bb7b2ef1435adc6ff79676308d771ee80b..5ef22353efd3cde0e8950278bf7268fa23f1d7ec 100644 (file)
@@ -102,7 +102,6 @@ SSLContext::~SSLContext() {
 }
 
 void SSLContext::ciphers(const std::string& ciphers) {
-  providedCiphersString_ = ciphers;
   setCiphersOrThrow(ciphers);
 }
 
@@ -188,6 +187,7 @@ void SSLContext::setCiphersOrThrow(const std::string& ciphers) {
   if (rc == 0) {
     throw std::runtime_error("SSL_CTX_set_cipher_list: " + getErrors());
   }
+  providedCiphersString_ = ciphers;
 }
 
 void SSLContext::setVerificationOption(const SSLContext::SSLVerifyPeerEnum&