summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/p5_pbe.c
diff options
context:
space:
mode:
authorjsing <>2015-02-09 15:05:59 +0000
committerjsing <>2015-02-09 15:05:59 +0000
commit714f82ff1b6302b27dcbcff8136087833e23251d (patch)
tree80e095d0af9796de5fe6127773c94c044f1f68bd /src/lib/libcrypto/asn1/p5_pbe.c
parent9e99e3c7210b10eacf8cf3b559238c15b31f6438 (diff)
downloadopenbsd-714f82ff1b6302b27dcbcff8136087833e23251d.tar.gz
openbsd-714f82ff1b6302b27dcbcff8136087833e23251d.tar.bz2
openbsd-714f82ff1b6302b27dcbcff8136087833e23251d.zip
Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible and
functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
Diffstat (limited to 'src/lib/libcrypto/asn1/p5_pbe.c')
-rw-r--r--src/lib/libcrypto/asn1/p5_pbe.c28
1 files changed, 26 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/p5_pbe.c b/src/lib/libcrypto/asn1/p5_pbe.c
index 44fbb648be..7491a5bdc7 100644
--- a/src/lib/libcrypto/asn1/p5_pbe.c
+++ b/src/lib/libcrypto/asn1/p5_pbe.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p5_pbe.c,v 1.17 2014/10/22 13:02:03 jsing Exp $ */ 1/* $OpenBSD: p5_pbe.c,v 1.18 2015/02/09 15:05:59 jsing Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -71,7 +71,31 @@ ASN1_SEQUENCE(PBEPARAM) = {
71 ASN1_SIMPLE(PBEPARAM, iter, ASN1_INTEGER) 71 ASN1_SIMPLE(PBEPARAM, iter, ASN1_INTEGER)
72} ASN1_SEQUENCE_END(PBEPARAM) 72} ASN1_SEQUENCE_END(PBEPARAM)
73 73
74IMPLEMENT_ASN1_FUNCTIONS(PBEPARAM) 74
75PBEPARAM *
76d2i_PBEPARAM(PBEPARAM **a, const unsigned char **in, long len)
77{
78 return (PBEPARAM *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
79 &PBEPARAM_it);
80}
81
82int
83i2d_PBEPARAM(PBEPARAM *a, unsigned char **out)
84{
85 return ASN1_item_i2d((ASN1_VALUE *)a, out, &PBEPARAM_it);
86}
87
88PBEPARAM *
89PBEPARAM_new(void)
90{
91 return (PBEPARAM *)ASN1_item_new(&PBEPARAM_it);
92}
93
94void
95PBEPARAM_free(PBEPARAM *a)
96{
97 ASN1_item_free((ASN1_VALUE *)a, &PBEPARAM_it);
98}
75 99
76 100
77/* Set an algorithm identifier for a PKCS#5 PBE algorithm */ 101/* Set an algorithm identifier for a PKCS#5 PBE algorithm */