summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rsa/rsa_lib.c
diff options
context:
space:
mode:
authorTheo Buehler <tb@cvs.openbsd.org>2018-02-18 12:55:33 +0000
committerTheo Buehler <tb@cvs.openbsd.org>2018-02-18 12:55:33 +0000
commit2afeb742beacaa75a92ae9e4fafe6c79cd74c91b (patch)
tree55d1a1ff765f8a8ea043ef086ab989391544064d /lib/libcrypto/rsa/rsa_lib.c
parent132bb13a3574b2ba7f5461684248daf021448f94 (diff)
Use usual order of RSA_{g,s}et0_key().
ok jsing
Diffstat (limited to 'lib/libcrypto/rsa/rsa_lib.c')
-rw-r--r--lib/libcrypto/rsa/rsa_lib.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/libcrypto/rsa/rsa_lib.c b/lib/libcrypto/rsa/rsa_lib.c
index c31aa935b75..379f4cbe347 100644
--- a/lib/libcrypto/rsa/rsa_lib.c
+++ b/lib/libcrypto/rsa/rsa_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rsa_lib.c,v 1.33 2018/02/18 12:53:46 tb Exp $ */
+/* $OpenBSD: rsa_lib.c,v 1.34 2018/02/18 12:55:32 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -257,6 +257,17 @@ RSA_get_ex_data(const RSA *r, int idx)
return CRYPTO_get_ex_data(&r->ex_data, idx);
}
+void
+RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
+{
+ if (n != NULL)
+ *n = r->n;
+ if (e != NULL)
+ *e = r->e;
+ if (d != NULL)
+ *d = r->d;
+}
+
int
RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
{
@@ -279,16 +290,6 @@ RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d)
return 1;
}
-void
-RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
-{
- if (n != NULL)
- *n = r->n;
- if (e != NULL)
- *e = r->e;
- if (d != NULL)
- *d = r->d;
-}
void
RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q)