summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_time_tm.c
diff options
context:
space:
mode:
authortb <>2018-04-25 11:48:21 +0000
committertb <>2018-04-25 11:48:21 +0000
commitb32b7334e82988558a84760f424f8dd93d902393 (patch)
tree2706fdfa25b0fa2dc71fc06b437d687057013dcc /src/lib/libcrypto/asn1/a_time_tm.c
parent2225014e9e21b521735cd7db7cea4d899863d67b (diff)
downloadopenbsd-b32b7334e82988558a84760f424f8dd93d902393.tar.gz
openbsd-b32b7334e82988558a84760f424f8dd93d902393.tar.bz2
openbsd-b32b7334e82988558a84760f424f8dd93d902393.zip
Add const to functions in asn1/asn1.h as they did in OpenSSL.
BIO_f_asn1() will be taken care of later. Tested in a bulk by sthen ok bcook jca jsing
Diffstat (limited to 'src/lib/libcrypto/asn1/a_time_tm.c')
-rw-r--r--src/lib/libcrypto/asn1/a_time_tm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c
index b13f7c767f..b6e22cbd27 100644
--- a/src/lib/libcrypto/asn1/a_time_tm.c
+++ b/src/lib/libcrypto/asn1/a_time_tm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time_tm.c,v 1.14 2017/08/28 17:42:47 jsing Exp $ */ 1/* $OpenBSD: a_time_tm.c,v 1.15 2018/04/25 11:48:21 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -337,7 +337,7 @@ ASN1_TIME_adj(ASN1_TIME *s, time_t t, int offset_day, long offset_sec)
337} 337}
338 338
339int 339int
340ASN1_TIME_check(ASN1_TIME *t) 340ASN1_TIME_check(const ASN1_TIME *t)
341{ 341{
342 if (t->type != V_ASN1_GENERALIZEDTIME && t->type != V_ASN1_UTCTIME) 342 if (t->type != V_ASN1_GENERALIZEDTIME && t->type != V_ASN1_UTCTIME)
343 return (0); 343 return (0);
@@ -345,7 +345,7 @@ ASN1_TIME_check(ASN1_TIME *t)
345} 345}
346 346
347ASN1_GENERALIZEDTIME * 347ASN1_GENERALIZEDTIME *
348ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out) 348ASN1_TIME_to_generalizedtime(const ASN1_TIME *t, ASN1_GENERALIZEDTIME **out)
349{ 349{
350 ASN1_GENERALIZEDTIME *tmp = NULL; 350 ASN1_GENERALIZEDTIME *tmp = NULL;
351 struct tm tm; 351 struct tm tm;
@@ -386,7 +386,7 @@ ASN1_TIME_set_string(ASN1_TIME *s, const char *str)
386 */ 386 */
387 387
388int 388int
389ASN1_UTCTIME_check(ASN1_UTCTIME *d) 389ASN1_UTCTIME_check(const ASN1_UTCTIME *d)
390{ 390{
391 if (d->type != V_ASN1_UTCTIME) 391 if (d->type != V_ASN1_UTCTIME)
392 return (0); 392 return (0);
@@ -442,7 +442,7 @@ ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t2)
442 */ 442 */
443 443
444int 444int
445ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *d) 445ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *d)
446{ 446{
447 if (d->type != V_ASN1_GENERALIZEDTIME) 447 if (d->type != V_ASN1_GENERALIZEDTIME)
448 return (0); 448 return (0);