diff options
author | tb <> | 2018-02-20 17:42:32 +0000 |
---|---|---|
committer | tb <> | 2018-02-20 17:42:32 +0000 |
commit | e6e87dba22757a3b4937ac796bb40b817e71a3d3 (patch) | |
tree | a9c77d344bf6cc7fd02191dd8496dd6a627e3235 | |
parent | dfa181abfd37625e8fcbe30907b6fd5f37c2df2d (diff) | |
download | openbsd-e6e87dba22757a3b4937ac796bb40b817e71a3d3.tar.gz openbsd-e6e87dba22757a3b4937ac796bb40b817e71a3d3.tar.bz2 openbsd-e6e87dba22757a3b4937ac796bb40b817e71a3d3.zip |
Provide RSA_{clear,set,test}_flasg()
ok jsing
-rw-r--r-- | src/lib/libcrypto/Symbols.list | 3 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa.h | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_lib.c | 20 |
3 files changed, 26 insertions, 2 deletions
diff --git a/src/lib/libcrypto/Symbols.list b/src/lib/libcrypto/Symbols.list index 5a5df4702b..a6137ca95d 100644 --- a/src/lib/libcrypto/Symbols.list +++ b/src/lib/libcrypto/Symbols.list | |||
@@ -2228,6 +2228,7 @@ RSA_bits | |||
2228 | RSA_blinding_off | 2228 | RSA_blinding_off |
2229 | RSA_blinding_on | 2229 | RSA_blinding_on |
2230 | RSA_check_key | 2230 | RSA_check_key |
2231 | RSA_clear_flags | ||
2231 | RSA_flags | 2232 | RSA_flags |
2232 | RSA_free | 2233 | RSA_free |
2233 | RSA_generate_key | 2234 | RSA_generate_key |
@@ -2238,6 +2239,7 @@ RSA_get0_key | |||
2238 | RSA_get_default_method | 2239 | RSA_get_default_method |
2239 | RSA_get_ex_data | 2240 | RSA_get_ex_data |
2240 | RSA_get_ex_new_index | 2241 | RSA_get_ex_new_index |
2242 | RSA_get_flags | ||
2241 | RSA_get_method | 2243 | RSA_get_method |
2242 | RSA_new | 2244 | RSA_new |
2243 | RSA_new_method | 2245 | RSA_new_method |
@@ -2264,6 +2266,7 @@ RSA_set0_factors | |||
2264 | RSA_set0_key | 2266 | RSA_set0_key |
2265 | RSA_set_default_method | 2267 | RSA_set_default_method |
2266 | RSA_set_ex_data | 2268 | RSA_set_ex_data |
2269 | RSA_set_flags | ||
2267 | RSA_set_method | 2270 | RSA_set_method |
2268 | RSA_setup_blinding | 2271 | RSA_setup_blinding |
2269 | RSA_sign | 2272 | RSA_sign |
diff --git a/src/lib/libcrypto/rsa/rsa.h b/src/lib/libcrypto/rsa/rsa.h index b131359e8c..65a643f4c6 100644 --- a/src/lib/libcrypto/rsa/rsa.h +++ b/src/lib/libcrypto/rsa/rsa.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa.h,v 1.36 2018/02/18 12:57:14 tb Exp $ */ | 1 | /* $OpenBSD: rsa.h,v 1.37 2018/02/20 17:42:32 tb 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 | * |
@@ -404,6 +404,9 @@ void RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | |||
404 | int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); | 404 | int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); |
405 | void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); | 405 | void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); |
406 | int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); | 406 | int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); |
407 | void RSA_clear_flags(RSA *r, int flags); | ||
408 | int RSA_test_flags(const RSA *r, int flags); | ||
409 | void RSA_set_flags(RSA *r, int flags); | ||
407 | 410 | ||
408 | RSA *RSAPublicKey_dup(RSA *rsa); | 411 | RSA *RSAPublicKey_dup(RSA *rsa); |
409 | RSA *RSAPrivateKey_dup(RSA *rsa); | 412 | RSA *RSAPrivateKey_dup(RSA *rsa); |
diff --git a/src/lib/libcrypto/rsa/rsa_lib.c b/src/lib/libcrypto/rsa/rsa_lib.c index 426c52f24a..544846f825 100644 --- a/src/lib/libcrypto/rsa/rsa_lib.c +++ b/src/lib/libcrypto/rsa/rsa_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: rsa_lib.c,v 1.35 2018/02/18 12:57:14 tb Exp $ */ | 1 | /* $OpenBSD: rsa_lib.c,v 1.36 2018/02/20 17:42:32 tb 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 | * |
@@ -352,3 +352,21 @@ RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) | |||
352 | 352 | ||
353 | return 1; | 353 | return 1; |
354 | } | 354 | } |
355 | |||
356 | void | ||
357 | RSA_clear_flags(RSA *r, int flags) | ||
358 | { | ||
359 | r->flags &= ~flags; | ||
360 | } | ||
361 | |||
362 | int | ||
363 | RSA_test_flags(const RSA *r, int flags) | ||
364 | { | ||
365 | return r->flags & flags; | ||
366 | } | ||
367 | |||
368 | void | ||
369 | RSA_set_flags(RSA *r, int flags) | ||
370 | { | ||
371 | r->flags |= flags; | ||
372 | } | ||