[rs-commit] r32 - in /redwax-tool/trunk: config.h.in configure.ac redwax_openssl.c
rs-commit at redwax.eu
rs-commit at redwax.eu
Wed Nov 17 00:08:14 CET 2021
Author: minfrin at redwax.eu
Date: Wed Nov 17 00:08:13 2021
New Revision: 32
Log:
Fill in for ASN1_TIME_diff.
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 Wed Nov 17 00:08:13 2021
@@ -2,6 +2,9 @@
/* Define to 1 if you have the `apr_crypto_clear' function. */
#undef HAVE_APR_CRYPTO_CLEAR
+
+/* Define to 1 if you have the `ASN1_TIME_diff' function. */
+#undef HAVE_ASN1_TIME_DIFF
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
Modified: redwax-tool/trunk/configure.ac
==============================================================================
--- redwax-tool/trunk/configure.ac (original)
+++ redwax-tool/trunk/configure.ac Wed Nov 17 00:08:13 2021
@@ -96,7 +96,7 @@
# Checks for library functions.
AC_FUNC_MALLOC
-AC_CHECK_FUNCS([OPENSSL_init_crypto X509_STORE_get0_param X509_STORE_CTX_set0_trusted_stack X509_STORE_CTX_get_num_untrusted X509_get0_notBefore X509_get0_notAfter X509_get_extension_flags X509_up_ref EVP_PKEY_get0_description EVP_PKEY_get_bn_param RSA_get0_n RSA_get0_e RSA_get0_d RSA_get0_p RSA_get0_q RSA_get0_dmp1 RSA_get0_dmq1 RSA_get0_iqmp NSS_Initialize p11_kit_modules_load_and_initialize apr_crypto_clear])
+AC_CHECK_FUNCS([OPENSSL_init_crypto ASN1_TIME_diff X509_STORE_get0_param X509_STORE_CTX_set0_trusted_stack X509_STORE_CTX_get_num_untrusted X509_get0_notBefore X509_get0_notAfter X509_get_extension_flags X509_up_ref EVP_PKEY_get0_description EVP_PKEY_get_bn_param RSA_get0_n RSA_get0_e RSA_get0_d RSA_get0_p RSA_get0_q RSA_get0_dmp1 RSA_get0_dmq1 RSA_get0_iqmp NSS_Initialize p11_kit_modules_load_and_initialize apr_crypto_clear])
AC_OUTPUT
Modified: redwax-tool/trunk/redwax_openssl.c
==============================================================================
--- redwax-tool/trunk/redwax_openssl.c (original)
+++ redwax-tool/trunk/redwax_openssl.c Wed Nov 17 00:08:13 2021
@@ -77,6 +77,20 @@
}
return redwax_x509_store_ctx_idx;
}
+
+#if !HAVE_ASN1_TIME_DIFF
+int ASN1_TIME_diff(int *pday, int *psec,
+ const ASN1_TIME *from, const ASN1_TIME *to)
+{
+ struct tm tm_from, tm_to;
+
+ if (!ASN1_TIME_to_tm(from, &tm_from))
+ return 0;
+ if (!ASN1_TIME_to_tm(to, &tm_to))
+ return 0;
+ return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to);
+}
+#endif
#if !HAVE_X509_STORE_CTX_GET_NUM_UNTRUSTED
int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx)
More information about the rs-commit
mailing list