]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Revert "openssl: fix out of scope variables in goto"
authorMarcel Raad <Marcel.Raad@teamviewer.com>
Sun, 16 Feb 2025 20:37:24 +0000 (21:37 +0100)
committerMarcel Raad <Marcel.Raad@teamviewer.com>
Mon, 17 Feb 2025 07:46:10 +0000 (08:46 +0100)
This reverts the main part of commit
3f79695be9e4628d246740bcd36c627daab676ca, but keeping the
formatting fix.

Closes https://github.com/curl/curl/pull/16356

lib/vtls/openssl.c

index 9bc1fde6fe4e6594b604e1edad8f45a4487b8abb..3e49a95534e95511f276fa2ce4d5e699bdd4c8d7 100644 (file)
@@ -1289,9 +1289,7 @@ int cert_stuff(struct Curl_easy *data,
   if(cert_file || cert_blob || (file_type == SSL_FILETYPE_ENGINE) ||
      (file_type == SSL_FILETYPE_PROVIDER)) {
     SSL *ssl;
-    X509 *x509 = NULL;
-    EVP_PKEY *pri = NULL;
-    STACK_OF(X509) *ca = NULL;
+    X509 *x509;
     int cert_done = 0;
     int cert_use_result;
 
@@ -1480,6 +1478,8 @@ int cert_stuff(struct Curl_easy *data,
     {
       BIO *cert_bio = NULL;
       PKCS12 *p12 = NULL;
+      EVP_PKEY *pri;
+      STACK_OF(X509) *ca = NULL;
       if(cert_blob) {
         cert_bio = BIO_new_mem_buf(cert_blob->data, (int)(cert_blob->len));
         if(!cert_bio) {