]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Update open-vm-tools 12.0.0 to work with openssl 1.1.1 or 3.0.0.
authorJohn Wolfe <jwolfe@vmware.com>
Mon, 8 Nov 2021 21:33:58 +0000 (13:33 -0800)
committerJohn Wolfe <jwolfe@vmware.com>
Mon, 8 Nov 2021 21:33:58 +0000 (13:33 -0800)
open-vm-tools/vgauth/common/certverify.c

index edf5492873c5a563662fb32611415bf8ca68e2b4..9b268316dd1b14bf83ae415d9b57d22b1505212a 100644 (file)
@@ -93,11 +93,23 @@ VerifyDumpSSLErrors(void)
    const char *data;
    const char *file;
    unsigned long code;
+#if OPENSSL_VERSION_NUMBER >= 0X30000000L
+   const char *func;
+#endif
 
+#if OPENSSL_VERSION_NUMBER >= 0X30000000L
+   code = ERR_get_error_all(&file, &line, &func, &data, &flags);
+#else
    code = ERR_get_error_line_data(&file, &line, &data, &flags);
+#endif
    while (code) {
+#if OPENSSL_VERSION_NUMBER >= 0X30000000L
+      g_warning("SSL error: %lu (%s) in %s func %s line %d\n",
+                code, ERR_error_string(code, NULL), file, func, line);
+#else
       g_warning("SSL error: %lu (%s) in %s line %d\n",
                 code, ERR_error_string(code, NULL), file, line);
+#endif
       if (data && (flags & ERR_TXT_STRING)) {
          g_warning("SSL error data: %s\n", data);
       }
@@ -107,7 +119,11 @@ VerifyDumpSSLErrors(void)
        * until the SSL error buffer starts getting reused and a double
        * free happens.
        */
+#if OPENSSL_VERSION_NUMBER >= 0X30000000L
+      code = ERR_get_error_all(&file, &line, &func, &data, &flags);
+#else
       code = ERR_get_error_line_data(&file, &line, &data, &flags);
+#endif
    }
 }