summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1/p5_pbe.c
diff options
context:
space:
mode:
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 */