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 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;
2019-10-23Synchronize state after client registrationJune McEnroe 2019-10-23Send to server if client has no needsJune McEnroe 2019-10-23Implement some amount of client connectionJune McEnroe 2019-10-23Set clients non-blockingJune McEnroe 2019-10-23Clean up state.c and factor out parsingJune McEnroe 2019-10-23Respond to pingsJune McEnroe 2019-10-23Add verbose flagJune McEnroe 2019-10-23Set NOSIGPIPE on server connectionJune McEnroe 2019-10-23Set an initial loop capJune McEnroe 2019-10-23Fix rest parsingJune McEnroe 2019-10-23Add dynamic poll listJune McEnroe 2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe 2019-10-23Clean up state somewhatJune McEnroe 2019-10-23Actually send the buffer...June McEnroe 2019-10-23Add stateJune McEnroe