diff options
author | beck <> | 2023-07-08 12:26:45 +0000 |
---|---|---|
committer | beck <> | 2023-07-08 12:26:45 +0000 |
commit | 2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82 (patch) | |
tree | 1d31a132992bcce24a664d524c511ad61b072eee /src/lib/libcrypto/rsa/rsa_crpt.c | |
parent | 1b57bced238de7c542c37916bff7853a1c0a6b40 (diff) | |
download | openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.tar.gz openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.tar.bz2 openbsd-2c1948ab61cef09c8a7c3306a9b8f7c311bb5c82.zip |
Hide symbols in rsa
ok tb@
Diffstat (limited to 'src/lib/libcrypto/rsa/rsa_crpt.c')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_crpt.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_crpt.c b/src/lib/libcrypto/rsa/rsa_crpt.c index a1b2eec6ca..ea79280b15 100644 --- a/src/lib/libcrypto/rsa/rsa_crpt.c +++ b/src/lib/libcrypto/rsa/rsa_crpt.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_crpt.c,v 1.21 2022/11/26 16:08:54 tb Exp $ */ | 1 | /* $OpenBSD: rsa_crpt.c,v 1.22 2023/07/08 12:26:45 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -78,12 +78,14 @@ RSA_bits(const RSA *r) | |||
78 | { | 78 | { |
79 | return BN_num_bits(r->n); | 79 | return BN_num_bits(r->n); |
80 | } | 80 | } |
81 | LCRYPTO_ALIAS(RSA_bits); | ||
81 | 82 | ||
82 | int | 83 | int |
83 | RSA_size(const RSA *r) | 84 | RSA_size(const RSA *r) |
84 | { | 85 | { |
85 | return BN_num_bytes(r->n); | 86 | return BN_num_bytes(r->n); |
86 | } | 87 | } |
88 | LCRYPTO_ALIAS(RSA_size); | ||
87 | 89 | ||
88 | int | 90 | int |
89 | RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, | 91 | RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -91,6 +93,7 @@ RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
91 | { | 93 | { |
92 | return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); | 94 | return rsa->meth->rsa_pub_enc(flen, from, to, rsa, padding); |
93 | } | 95 | } |
96 | LCRYPTO_ALIAS(RSA_public_encrypt); | ||
94 | 97 | ||
95 | int | 98 | int |
96 | RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, | 99 | RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -98,6 +101,7 @@ RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, | |||
98 | { | 101 | { |
99 | return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); | 102 | return rsa->meth->rsa_priv_enc(flen, from, to, rsa, padding); |
100 | } | 103 | } |
104 | LCRYPTO_ALIAS(RSA_private_encrypt); | ||
101 | 105 | ||
102 | int | 106 | int |
103 | RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, | 107 | RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -105,6 +109,7 @@ RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, | |||
105 | { | 109 | { |
106 | return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); | 110 | return rsa->meth->rsa_priv_dec(flen, from, to, rsa, padding); |
107 | } | 111 | } |
112 | LCRYPTO_ALIAS(RSA_private_decrypt); | ||
108 | 113 | ||
109 | int | 114 | int |
110 | RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, | 115 | RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, |
@@ -112,12 +117,14 @@ RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, | |||
112 | { | 117 | { |
113 | return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); | 118 | return rsa->meth->rsa_pub_dec(flen, from, to, rsa, padding); |
114 | } | 119 | } |
120 | LCRYPTO_ALIAS(RSA_public_decrypt); | ||
115 | 121 | ||
116 | int | 122 | int |
117 | RSA_flags(const RSA *r) | 123 | RSA_flags(const RSA *r) |
118 | { | 124 | { |
119 | return r == NULL ? 0 : r->meth->flags; | 125 | return r == NULL ? 0 : r->meth->flags; |
120 | } | 126 | } |
127 | LCRYPTO_ALIAS(RSA_flags); | ||
121 | 128 | ||
122 | void | 129 | void |
123 | RSA_blinding_off(RSA *rsa) | 130 | RSA_blinding_off(RSA *rsa) |
@@ -126,6 +133,7 @@ RSA_blinding_off(RSA *rsa) | |||
126 | rsa->blinding = NULL; | 133 | rsa->blinding = NULL; |
127 | rsa->flags |= RSA_FLAG_NO_BLINDING; | 134 | rsa->flags |= RSA_FLAG_NO_BLINDING; |
128 | } | 135 | } |
136 | LCRYPTO_ALIAS(RSA_blinding_off); | ||
129 | 137 | ||
130 | int | 138 | int |
131 | RSA_blinding_on(RSA *rsa, BN_CTX *ctx) | 139 | RSA_blinding_on(RSA *rsa, BN_CTX *ctx) |
@@ -144,6 +152,7 @@ RSA_blinding_on(RSA *rsa, BN_CTX *ctx) | |||
144 | err: | 152 | err: |
145 | return (ret); | 153 | return (ret); |
146 | } | 154 | } |
155 | LCRYPTO_ALIAS(RSA_blinding_on); | ||
147 | 156 | ||
148 | static BIGNUM * | 157 | static BIGNUM * |
149 | rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, | 158 | rsa_get_public_exp(const BIGNUM *d, const BIGNUM *p, const BIGNUM *q, |
@@ -220,3 +229,4 @@ err: | |||
220 | 229 | ||
221 | return ret; | 230 | return ret; |
222 | } | 231 | } |
232 | LCRYPTO_ALIAS(RSA_setup_blinding); | ||