summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-07-27 23:23:18 -0400
committerJune McEnroe <june@causal.agency>2020-07-31 12:12:53 -0400
commite5716229ebb96087a36391691f76f46178a2b437 (patch)
treeef058ce5610addfc7c4017171ef9d108fb518c09
parenttls_verify: Use ASN1_STRING_get0_data (diff)
downloadlibretls-e5716229ebb96087a36391691f76f46178a2b437.tar.gz
libretls-e5716229ebb96087a36391691f76f46178a2b437.zip
tls_conninfo: Use ASN1_TIME_to_tm
-rw-r--r--tls_conninfo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tls_conninfo.c b/tls_conninfo.c
index d44dc84..5fb8948 100644
--- a/tls_conninfo.c
+++ b/tls_conninfo.c
@@ -17,6 +17,7 @@
  */
 
 #include <stdio.h>
+#include <string.h>
 
 #include <openssl/x509.h>
 
@@ -119,9 +120,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) == 0)
 		goto err;
-	if (ASN1_time_parse(after->data, after->length, &after_tm, 0) == -1)
+	if (ASN1_TIME_to_tm(after, &after_tm) == 0)
 		goto err;
 	if (!ASN1_time_tm_clamp_notafter(&after_tm))
 		goto err;
w=1'>Check that there is upload dataJune McEnroe 2020-07-14Add CGI upload program for temp.causal.agencyJune McEnroe 2020-07-10Add The Broken KingdomsJune McEnroe 2020-07-08Add facebook and twitter to title user-agentJune McEnroe This fixes fetching tweets again! https://github.com/thelounge/thelounge/pull/ 3602 (Intentionally breaking the link so GitHub doesn't add a "referenced this PR" thing?) 2020-06-30Tweak causal.agency for mostly no reasonJune McEnroe 2020-06-30Add Ancillary JusticeJune McEnroe 2020-06-26Add password non-manager to planJune McEnroe I've had this idea for years... 2020-06-26Tweak TF2 sensitivities once moreJune McEnroe 2020-06-19Add note about litterbox bot useJune McEnroe 2020-06-19Publish "IRC suite"June McEnroe 2020-06-17Add errors to link.shJune McEnroe Specifies how many bits for each of "alpha" (ignored), red, green, blue. Separates byte-order and bit-order. Much more flexible, but now won't render CARDS.DLL graphics properly due to the skip bit being not where it expects. Also mmaps the file instead of reading it all in. And the default palette and sampling got removed again for now, since it's too awkward to use. 2018-02-05Add flip option to gfxxJune McEnroe This handles upside-down graphics much better than reverse did. 2018-02-05Remove gfxx reverse optionJune McEnroe 2018-02-04Fix gfxx draw stop conditionJune McEnroe Would not draw the last partially visible column when mirrored. 2018-02-04Reuse CGColorSpace and CGDataProvider in gfcocoaJune McEnroe 2018-02-04Mark mac target phonyJune McEnroe 2018-02-04Set up Makefile for gfxx-cocoa or gfxx-fbJune McEnroe 2018-02-04Avoid doing excessive work in gfxxJune McEnroe By stopping when the next column would be off the edge of the buffer. 2018-02-04Handle window resizing in gfcocoaJune McEnroe 2018-02-04Set cinoptionsJune McEnroe 2018-02-04Tweak colorscheme moreJune McEnroe 2018-02-04Color MatchParen DarkYellowJune McEnroe White is not obvious enough. 2018-02-04Add palette sampling to gfxxJune McEnroe 2018-02-04Add 4-bit RGB to gfxxJune McEnroe Replace default palette with alternating black and white. 2018-02-04Add Quit menu item to gfcocoaJune McEnroe 2018-02-04Switch back to sane Objective-C styleJune McEnroe 2018-02-04Quit gfcocoa when window closesJune McEnroe 2018-02-03Apparently this is how people write Objective-CJune McEnroe