about summary refs log tree commit diff
path: root/tls_ocsp.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tls_ocsp.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tls_ocsp.c b/tls_ocsp.c
index acf6935..7670d1f 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>
@@ -64,8 +65,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;
da5543c6740635578cfce7dfbf69374ec9a6&follow=1'>Source .editrc before applying -v or -eJune McEnroe 2019-12-20Disable signing commitsJune McEnroe 2019-12-19Ignore about-filterJune McEnroe 2019-12-19Fix matching make tags with no sourcesJune McEnroe 2019-12-19Avoid matching := assignments as tagsJune McEnroe 2019-12-18Hide line numbers when rendering mdocJune McEnroe 2019-12-18Customize cgit CSSJune McEnroe 2019-12-18Use :target rather than :focus pseudo-classJune McEnroe 2019-12-18Copy cgit auxiliary binaries properlyJune McEnroe 2019-12-18Add git.causal.agency cgit configJune McEnroe 2019-12-18Bail from hi if input is binaryJune McEnroe 2019-12-16Post "cgit setup"June McEnroe