https://github.com/pgbouncer/pgbouncer/pull/1440

Index: lib/usual/tls/tls_conninfo.c
--- lib/usual/tls/tls_conninfo.c.orig
+++ lib/usual/tls/tls_conninfo.c
@@ -132,9 +132,9 @@ static int tls_get_peer_cert_times(struct tls *ctx, ti
 			goto err;
 		if ((after = X509_get_notAfter(ctx->ssl_peer_cert)) == NULL)
 			goto err;
-		if (asn1_time_parse((char *)before->data, before->length, &before_tm, 0) == -1)
+		if (asn1_time_parse((const char *)ASN1_STRING_get0_data(before), ASN1_STRING_length(before), &before_tm, 0) == -1)
 			goto err;
-		if (asn1_time_parse((char *)after->data, after->length, &after_tm, 0) == -1)
+		if (asn1_time_parse((const char *)ASN1_STRING_get0_data(after), ASN1_STRING_length(after), &after_tm, 0) == -1)
 			goto err;
 		if ((*notbefore = timegm(&before_tm)) == -1)
 			goto err;
