summary refs log tree commit diff
path: root/tls_conninfo.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2026-06-01 14:39:52 -0400
committerJune McEnroe <june@causal.agency>2026-06-01 14:39:52 -0400
commit8de0a43b1db624a766efd3d78a60403e77ce39e0 (patch)
tree630a8490c3773b78d50582691dff4d9c60a607d4 /tls_conninfo.c
parentImport LibreSSL 3.8.4 (diff)
downloadlibretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.tar.gz
libretls-8de0a43b1db624a766efd3d78a60403e77ce39e0.zip
Import LibreSSL 3.9.0
Diffstat (limited to 'tls_conninfo.c')
-rw-r--r--tls_conninfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tls_conninfo.c b/tls_conninfo.c
index b2aadab..90fdfac 100644
--- a/tls_conninfo.c
+++ b/tls_conninfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_conninfo.c,v 1.23 2023/05/14 07:26:25 op Exp $ */
+/* $OpenBSD: tls_conninfo.c,v 1.24 2023/11/13 10:51:49 tb Exp $ */
 /*
  * Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
  * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
@@ -117,9 +117,9 @@ tls_get_peer_cert_times(struct tls *ctx, time_t *notbefore,
 		goto err;
 	if ((after = X509_get_notAfter(ctx->ssl_peer_cert)) == NULL)
 		goto err;
-	if (ASN1_time_parse(before->data, before->length, &before_tm, 0) == -1)
+	if (!ASN1_TIME_to_tm(before, &before_tm))
 		goto err;
-	if (ASN1_time_parse(after->data, after->length, &after_tm, 0) == -1)
+	if (!ASN1_TIME_to_tm(after, &after_tm))
 		goto err;
 	if (!ASN1_time_tm_clamp_notafter(&after_tm))
 		goto err;