summaryrefslogtreecommitdiff
path: root/lib/libtls
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2016-11-04 18:07:25 +0000
committerBob Beck <beck@cvs.openbsd.org>2016-11-04 18:07:25 +0000
commit396633d63aca49076ff603738e121a55b65af92d (patch)
tree18cb524e608acecdd048020698bce37a7a2fff57 /lib/libtls
parent28393fdddd44b5251bbb0ea08ce9d8b3683b6a37 (diff)
make public ASN1_time_parse and ASN1_time_tm_cmp to replace former hidden
functions.. document with a man page. bump majors on libtls, libssl, libcrypto ok jsing@ guenther@
Diffstat (limited to 'lib/libtls')
-rw-r--r--lib/libtls/shlib_version4
-rw-r--r--lib/libtls/tls_conninfo.c6
-rw-r--r--lib/libtls/tls_internal.h4
-rw-r--r--lib/libtls/tls_ocsp.c3
4 files changed, 7 insertions, 10 deletions
diff --git a/lib/libtls/shlib_version b/lib/libtls/shlib_version
index faa53892ba9..56246d02b24 100644
--- a/lib/libtls/shlib_version
+++ b/lib/libtls/shlib_version
@@ -1,2 +1,2 @@
-major=11
-minor=6
+major=12
+minor=0
diff --git a/lib/libtls/tls_conninfo.c b/lib/libtls/tls_conninfo.c
index 5882a19cee8..1bf4b2285b2 100644
--- a/lib/libtls/tls_conninfo.c
+++ b/lib/libtls/tls_conninfo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_conninfo.c,v 1.11 2016/08/22 17:12:35 jsing Exp $ */
+/* $OpenBSD: tls_conninfo.c,v 1.12 2016/11/04 18:07:24 beck Exp $ */
/*
* Copyright (c) 2015 Joel Sing <jsing@openbsd.org>
* Copyright (c) 2015 Bob Beck <beck@openbsd.org>
@@ -136,9 +136,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_parse(before->data, before->length, &before_tm, 0) == -1)
goto err;
- if (asn1_time_parse(after->data, after->length, &after_tm, 0) == -1)
+ if (ASN1_time_parse(after->data, after->length, &after_tm, 0) == -1)
goto err;
if ((*notbefore = timegm(&before_tm)) == -1)
goto err;
diff --git a/lib/libtls/tls_internal.h b/lib/libtls/tls_internal.h
index 0112ceedb9c..7b07c96c86a 100644
--- a/lib/libtls/tls_internal.h
+++ b/lib/libtls/tls_internal.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tls_internal.h,v 1.46 2016/11/04 05:13:13 beck Exp $ */
+/* $OpenBSD: tls_internal.h,v 1.47 2016/11/04 18:07:24 beck Exp $ */
/*
* Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org>
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
@@ -209,6 +209,4 @@ int tls_ocsp_verify_cb(SSL *ssl, void *arg);
void tls_ocsp_ctx_free(struct tls_ocsp_ctx *ctx);
struct tls_ocsp_ctx *tls_ocsp_setup_from_peer(struct tls *ctx);
-int asn1_time_parse(const char *, size_t, struct tm *, int);
-
#endif /* HEADER_TLS_INTERNAL_H */
diff --git a/lib/libtls/tls_ocsp.c b/lib/libtls/tls_ocsp.c
index af65771f7cc..52e90364a77 100644
--- a/lib/libtls/tls_ocsp.c
+++ b/lib/libtls/tls_ocsp.c
@@ -63,7 +63,7 @@ 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,
+ if (ASN1_time_parse(gt->data, gt->length, &tm,
V_ASN1_GENERALIZEDTIME) == -1)
return -1;
if ((*gt_time = timegm(&tm)) == -1)
@@ -258,7 +258,6 @@ tls_ocsp_verify_response(struct tls *ctx, OCSP_RESPONSE *resp)
OCSP_crl_reason_str(crl_reason));
goto error;
}
-
ret = 0;
error: