]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rename and export tls_asn1time_to_epoch()
authorAlan T. DeKok <aland@freeradius.org>
Wed, 8 Mar 2017 22:20:16 +0000 (17:20 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 8 Mar 2017 22:20:16 +0000 (17:20 -0500)
src/include/tls-h
src/main/tls/ocsp.c

index 18b68cea65879451e3d25e9684ceac4984c72f2e..43e08e90cd25e68ce687e0a7a755f322f4d12c9e 100644 (file)
@@ -450,6 +450,8 @@ int         tls_ocsp_check(REQUEST *request, SSL *ssl,
                               X509_STORE *store, X509 *issuer_cert, X509 *client_cert,
                               fr_tls_ocsp_conf_t *conf, bool staple_response);
 
+int            tls_asn1time_to_epoch(time_t *out, ASN1_TIME const *asn1);
+
 /*
  *     tls/session.c
  */
index e1207ac198780c5499f53ed59803055445e52ce9..791ffa1de130477295ec1b45d8487a9b5457bacb 100644 (file)
@@ -56,7 +56,8 @@ typedef enum {
  *     - 0 success.
  *     - -1 on failure.
  */
-static int ocsp_asn1time_to_epoch(time_t *out, ASN1_TIME const *asn1){
+int tls_asn1time_to_epoch(time_t *out, ASN1_TIME const *asn1)
+{
        struct          tm t;
        char const      *p = (char const *)asn1->data, *end = p + strlen(p);
 
@@ -601,7 +602,7 @@ int tls_ocsp_check(REQUEST *request, SSL *ssl,
                 *      on the code path, other times we don't.
                 */
                if (now.tv_sec == 0) gettimeofday(&now, NULL);
-               if (ocsp_asn1time_to_epoch(&next, next_update) < 0) {
+               if (tls_asn1time_to_epoch(&next, next_update) < 0) {
                        REDEBUG("Failed parsing next_update time: %s", fr_strerror());
                        ocsp_status = OCSP_STATUS_SKIPPED;
                        goto finish;