diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-09 16:04:47 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-09 16:04:47 +0000 |
commit | 2e98c50d1cab09e899f8ee544ffa8ca3a9ebfff0 (patch) | |
tree | 3261b53bc8160c974d27f6f4dd8a5fd9a9f934a4 /lib/libcrypto/rsa | |
parent | 8d8292131b2ae2efd5982152b95618b052468217 (diff) |
Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible and
functions can be readily located.
Change has been scripted and there is no change to the generated assembly.
Discussed with beck@ miod@ tedu@
Diffstat (limited to 'lib/libcrypto/rsa')
-rw-r--r-- | lib/libcrypto/rsa/rsa_asn1.c | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/lib/libcrypto/rsa/rsa_asn1.c b/lib/libcrypto/rsa/rsa_asn1.c index 573b9f8b8d0..a75b80fa10b 100644 --- a/lib/libcrypto/rsa/rsa_asn1.c +++ b/lib/libcrypto/rsa/rsa_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_asn1.c,v 1.9 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: rsa_asn1.c,v 1.10 2015/02/09 16:04:46 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -105,7 +105,31 @@ ASN1_SEQUENCE(RSA_PSS_PARAMS) = { ASN1_EXP_OPT(RSA_PSS_PARAMS, trailerField, ASN1_INTEGER, 3) } ASN1_SEQUENCE_END(RSA_PSS_PARAMS) -IMPLEMENT_ASN1_FUNCTIONS(RSA_PSS_PARAMS) + +RSA_PSS_PARAMS * +d2i_RSA_PSS_PARAMS(RSA_PSS_PARAMS **a, const unsigned char **in, long len) +{ + return (RSA_PSS_PARAMS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, + &RSA_PSS_PARAMS_it); +} + +int +i2d_RSA_PSS_PARAMS(RSA_PSS_PARAMS *a, unsigned char **out) +{ + return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSA_PSS_PARAMS_it); +} + +RSA_PSS_PARAMS * +RSA_PSS_PARAMS_new(void) +{ + return (RSA_PSS_PARAMS *)ASN1_item_new(&RSA_PSS_PARAMS_it); +} + +void +RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) +{ + ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); +} IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(RSA, RSAPrivateKey, RSAPrivateKey) |