[rs-commit] r27 - in /redwax-tool/trunk: config.h.in configure.ac redwax_openssl.c

rs-commit at redwax.eu rs-commit at redwax.eu
Tue Nov 16 18:13:27 CET 2021


Author: minfrin at redwax.eu
Date: Tue Nov 16 18:13:27 2021
New Revision: 27

Log:
Wire through the openssl/core_names.h header.

Modified:
    redwax-tool/trunk/config.h.in
    redwax-tool/trunk/configure.ac
    redwax-tool/trunk/redwax_openssl.c

Modified: redwax-tool/trunk/config.h.in
==============================================================================
--- redwax-tool/trunk/config.h.in	(original)
+++ redwax-tool/trunk/config.h.in	Tue Nov 16 18:13:27 2021
@@ -24,6 +24,9 @@
 
 /* Define to 1 if you have the `NSS_Initialize' function. */
 #undef HAVE_NSS_INITIALIZE
+
+/* Define to 1 if you have the <openssl/core_names.h> header file. */
+#undef HAVE_OPENSSL_CORE_NAMES_H
 
 /* Define to 1 if you have the `OPENSSL_init_crypto' function. */
 #undef HAVE_OPENSSL_INIT_CRYPTO

Modified: redwax-tool/trunk/configure.ac
==============================================================================
--- redwax-tool/trunk/configure.ac	(original)
+++ redwax-tool/trunk/configure.ac	Tue Nov 16 18:13:27 2021
@@ -92,7 +92,7 @@
 AC_TYPE_UINT32_T
 
 # Checks for headers
-AC_CHECK_HEADERS([unistd.h libgen.h])
+AC_CHECK_HEADERS([unistd.h libgen.h openssl/core_names.h])
 
 # Checks for library functions.
 AC_FUNC_MALLOC

Modified: redwax-tool/trunk/redwax_openssl.c
==============================================================================
--- redwax-tool/trunk/redwax_openssl.c	(original)
+++ redwax-tool/trunk/redwax_openssl.c	Tue Nov 16 18:13:27 2021
@@ -38,6 +38,9 @@
 #include <openssl/ui.h>
 #include <openssl/x509.h>
 #include <openssl/x509v3.h>
+#if HAVE_OPENSSL_CORE_NAMES_H
+#include <openssl/core_names.h>
+#endif
 
 #define REDWAX_OPENSSL_SEARCH "search"
 #define REDWAX_OPENSSL_VERIFY "verify"
@@ -1897,14 +1900,14 @@
             BIGNUM *dmq1 = NULL;
             BIGNUM *iqmp = NULL;
 
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_N, &n);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_E, &e);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_D, &d);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_FACTOR1, &p);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_FACTOR2, &q);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_EXPONENT1, &dmp1);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_EXPONENT2, &dmq1);
-            EVP_PKEY_get_bn_param(key, OSSL_PKEY_PARAM_RSA_COEFFICIENT, &iqmp);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_N, &n);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_E, &e);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_D, &d);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_FACTOR1, &p);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_FACTOR2, &q);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_EXPONENT1, &dmp1);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_EXPONENT2, &dmq1);
+            EVP_PKEY_get_bn_param(pkey, OSSL_PKEY_PARAM_RSA_COEFFICIENT, &iqmp);
 #else
             RSA *rsa = EVP_PKEY_get0_RSA(pkey);
 



More information about the rs-commit mailing list