summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rsa
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lib/libcrypto/rsa/rsa.h5
-rw-r--r--src/lib/libcrypto/rsa/rsa_lib.c20
2 files changed, 23 insertions, 2 deletions
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,
404int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); 404int RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp);
405void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); 405void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q);
406int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); 406int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
407void RSA_clear_flags(RSA *r, int flags);
408int RSA_test_flags(const RSA *r, int flags);
409void RSA_set_flags(RSA *r, int flags);
407 410
408RSA *RSAPublicKey_dup(RSA *rsa); 411RSA *RSAPublicKey_dup(RSA *rsa);
409RSA *RSAPrivateKey_dup(RSA *rsa); 412RSA *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
356void
357RSA_clear_flags(RSA *r, int flags)
358{
359 r->flags &= ~flags;
360}
361
362int
363RSA_test_flags(const RSA *r, int flags)
364{
365 return r->flags & flags;
366}
367
368void
369RSA_set_flags(RSA *r, int flags)
370{
371 r->flags |= flags;
372}