summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--tls_ocsp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tls_ocsp.c b/tls_ocsp.c
index 32c372e..d85d79c 100644
--- a/tls_ocsp.c
+++ b/tls_ocsp.c
@@ -17,6 +17,7 @@
  */
 
 #include <sys/types.h>
+#include <string.h>
 
 #include <arpa/inet.h>
 #include <netinet/in.h>
@@ -62,8 +63,9 @@ tls_ocsp_asn1_parse_time(struct tls *ctx, ASN1_GENERALIZEDTIME *gt, time_t *gt_t
 	if (gt == NULL)
 		return -1;
 	/* RFC 6960 specifies that all times in OCSP must be GENERALIZEDTIME */
-	if (ASN1_time_parse(gt->data, gt->length, &tm,
-		V_ASN1_GENERALIZEDTIME) == -1)
+	if (ASN1_GENERALIZEDTIME_check(gt) == 0)
+		return -1;
+	if (ASN1_TIME_to_tm(gt, &tm) == 0)
 		return -1;
 	if ((*gt_time = timegm(&tm)) == -1)
 		return -1;
ument dig requirement in imbox(1)June McEnroe 2019-12-22Add CAVEAT about expecting plain-textJune McEnroe 2019-12-22Quote user, pass and mailboxJune McEnroe 2019-12-22Use sequence numbers rather than UIDsJune McEnroe 2019-12-22Use EXAMINE rather than SELECTJune McEnroe 2019-12-22Export To and CC headersJune McEnroe 2019-12-22Add missing includeJune McEnroe 2019-12-22Export In-Reply-To headersJune McEnroe 2019-12-21Add git-fetch-email to READMEJune McEnroe 2019-12-21Clarify purpose in READMEJune McEnroe 2019-12-21Add READMEJune McEnroe 2019-12-21Add copyright header to git-fetch-emailJune McEnroe 2019-12-21Add git-fetch-email to SEE ALSO of imboxJune McEnroe 2019-12-21Add git-fetch-email wrapperJune McEnroe 2019-12-21Determine host by SRV lookupJune McEnroe 2019-12-21Clean up remaining codeJune McEnroe 2019-12-21Clean up mboxrd codeJune McEnroe 2019-12-21Convert CRLF to LFJune McEnroe 2019-12-21Implement -CFSTJune McEnroe 2019-12-21Rewrite aspirational manualJune McEnroe 2019-12-21Null-terminate read literalsJune McEnroe