summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/a_time.c
diff options
context:
space:
mode:
authorjsing <>2021-12-25 07:48:09 +0000
committerjsing <>2021-12-25 07:48:09 +0000
commit9bcf656c985ee0377aa1efaa225459e511cda945 (patch)
tree68a3da4cb7576478b9c6fd4a2df6e20ee0dc2f00 /src/lib/libcrypto/asn1/a_time.c
parent45bffde06d55be8341ae2ab97fd9f6d173eea785 (diff)
downloadopenbsd-9bcf656c985ee0377aa1efaa225459e511cda945.tar.gz
openbsd-9bcf656c985ee0377aa1efaa225459e511cda945.tar.bz2
openbsd-9bcf656c985ee0377aa1efaa225459e511cda945.zip
Move ASN1_<type>_* functions to the top, encoding/decoding to the bottom.
No functional change.
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/asn1/a_time.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libcrypto/asn1/a_time.c b/src/lib/libcrypto/asn1/a_time.c
index 79bcbffa26..cd6a790cac 100644
--- a/src/lib/libcrypto/asn1/a_time.c
+++ b/src/lib/libcrypto/asn1/a_time.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time.c,v 1.32 2021/11/06 07:52:22 jsing Exp $ */ 1/* $OpenBSD: a_time.c,v 1.33 2021/12/25 07:48:09 jsing Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -81,19 +81,6 @@ const ASN1_ITEM ASN1_TIME_it = {
81}; 81};
82 82
83ASN1_TIME * 83ASN1_TIME *
84d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len)
85{
86 return (ASN1_TIME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
87 &ASN1_TIME_it);
88}
89
90int
91i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out)
92{
93 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_TIME_it);
94}
95
96ASN1_TIME *
97ASN1_TIME_new(void) 84ASN1_TIME_new(void)
98{ 85{
99 return (ASN1_TIME *)ASN1_item_new(&ASN1_TIME_it); 86 return (ASN1_TIME *)ASN1_item_new(&ASN1_TIME_it);
@@ -132,3 +119,16 @@ ASN1_TIME_diff(int *pday, int *psec, const ASN1_TIME *from, const ASN1_TIME *to)
132 119
133 return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to); 120 return OPENSSL_gmtime_diff(pday, psec, &tm_from, &tm_to);
134} 121}
122
123ASN1_TIME *
124d2i_ASN1_TIME(ASN1_TIME **a, const unsigned char **in, long len)
125{
126 return (ASN1_TIME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
127 &ASN1_TIME_it);
128}
129
130int
131i2d_ASN1_TIME(ASN1_TIME *a, unsigned char **out)
132{
133 return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_TIME_it);
134}