diff options
| author | jsing <> | 2015-02-10 05:12:23 +0000 |
|---|---|---|
| committer | jsing <> | 2015-02-10 05:12:23 +0000 |
| commit | 2bd884004b68a3cdb5e24f3a1e6e8e3baa60a43e (patch) | |
| tree | 589ebdd9bb450a4df09d2ed962b5d2178ebf5237 /src/lib/libcrypto/rsa | |
| parent | 803fe92d2ba2e99892a8bb84620d364da4518cb7 (diff) | |
| download | openbsd-2bd884004b68a3cdb5e24f3a1e6e8e3baa60a43e.tar.gz openbsd-2bd884004b68a3cdb5e24f3a1e6e8e3baa60a43e.tar.bz2 openbsd-2bd884004b68a3cdb5e24f3a1e6e8e3baa60a43e.zip | |
Expand the -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_(const_)?fname macros 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 'src/lib/libcrypto/rsa')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_asn1.c | 30 |
1 files changed, 27 insertions, 3 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_asn1.c b/src/lib/libcrypto/rsa/rsa_asn1.c index a75b80fa10..525c9455bd 100644 --- a/src/lib/libcrypto/rsa/rsa_asn1.c +++ b/src/lib/libcrypto/rsa/rsa_asn1.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: rsa_asn1.c,v 1.10 2015/02/09 16:04:46 jsing Exp $ */ | 1 | /* $OpenBSD: rsa_asn1.c,v 1.11 2015/02/10 05:12:23 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 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -131,9 +131,33 @@ RSA_PSS_PARAMS_free(RSA_PSS_PARAMS *a) | |||
| 131 | ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); | 131 | ASN1_item_free((ASN1_VALUE *)a, &RSA_PSS_PARAMS_it); |
| 132 | } | 132 | } |
| 133 | 133 | ||
| 134 | IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(RSA, RSAPrivateKey, RSAPrivateKey) | ||
| 135 | 134 | ||
| 136 | IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(RSA, RSAPublicKey, RSAPublicKey) | 135 | RSA * |
| 136 | d2i_RSAPrivateKey(RSA **a, const unsigned char **in, long len) | ||
| 137 | { | ||
| 138 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 139 | &RSAPrivateKey_it); | ||
| 140 | } | ||
| 141 | |||
| 142 | int | ||
| 143 | i2d_RSAPrivateKey(const RSA *a, unsigned char **out) | ||
| 144 | { | ||
| 145 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPrivateKey_it); | ||
| 146 | } | ||
| 147 | |||
| 148 | |||
| 149 | RSA * | ||
| 150 | d2i_RSAPublicKey(RSA **a, const unsigned char **in, long len) | ||
| 151 | { | ||
| 152 | return (RSA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
| 153 | &RSAPublicKey_it); | ||
| 154 | } | ||
| 155 | |||
| 156 | int | ||
| 157 | i2d_RSAPublicKey(const RSA *a, unsigned char **out) | ||
| 158 | { | ||
| 159 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &RSAPublicKey_it); | ||
| 160 | } | ||
| 137 | 161 | ||
| 138 | RSA * | 162 | RSA * |
| 139 | RSAPublicKey_dup(RSA *rsa) | 163 | RSAPublicKey_dup(RSA *rsa) |
