Get rid of a warning about unused results
[openssl.git] / test / ossl_shim / ossl_shim.cc
index cda32efbe483f1a61e70f4c865aaefdf7b79e069..dec515d260e2fc92f34fe93824c0a50112f84e48 100644 (file)
@@ -634,9 +634,10 @@ static bssl::UniquePtr<SSL_CTX> SetupCtx(const TestConfig *config) {
     SSL_CTX_set_client_CA_list(ssl_ctx.get(), nullptr);
   }
 
-  SSL_CTX_set_session_id_context(ssl_ctx.get(),
-                                 (const unsigned char *)sess_id_ctx,
-                                 sizeof(sess_id_ctx) - 1);
+  if (!SSL_CTX_set_session_id_context(ssl_ctx.get(),
+                                      (const unsigned char *)sess_id_ctx,
+                                      sizeof(sess_id_ctx) - 1))
+    return nullptr;
 
   return ssl_ctx;
 }