diff options
author | Joakim Antman <antmanj@gmail.com> | 2022-10-19 19:12:39 +0300 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2022-10-27 14:02:42 +0200 |
commit | 6001ba23e089bad44676a30248ae5afd68da442e (patch) | |
tree | 1435e7db7075cea57a2f0a4685839287bfe8db41 /doc/man3/OSSL_PARAM_BLD.pod | |
parent | 868141d450652008e84d81a13bc9ca3cab8d7af3 (diff) |
Fix parameter names for RSA private key example
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/19443)
(cherry picked from commit c8c678e7d91ca2cea41c6c574cf7656a9404646f)
Diffstat (limited to 'doc/man3/OSSL_PARAM_BLD.pod')
-rw-r--r-- | doc/man3/OSSL_PARAM_BLD.pod | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/doc/man3/OSSL_PARAM_BLD.pod b/doc/man3/OSSL_PARAM_BLD.pod index a41d14713e..455761c20d 100644 --- a/doc/man3/OSSL_PARAM_BLD.pod +++ b/doc/man3/OSSL_PARAM_BLD.pod @@ -134,10 +134,12 @@ support nonnegative B<BIGNUM>s. They return an error on negative B<BIGNUM>s. Both examples creating an OSSL_PARAM array that contains an RSA key. For both, the predefined key variables are: - BIGNUM *p, *q; /* both prime */ - BIGNUM *n; /* = p * q */ - unsigned int e; /* exponent, usually 65537 */ - BIGNUM *d; /* e^-1 */ + BIGNUM *n; /* modulus */ + unsigned int e; /* public exponent */ + BIGNUM *d; /* private exponent */ + BIGNUM *p, *q; /* first two prime factors */ + BIGNUM *dmp1, *dmq1; /* first two CRT exponents */ + BIGNUM *iqmp; /* first CRT coefficient */ =head2 Example 1 @@ -148,11 +150,14 @@ private key. OSSL_PARAM *params = NULL; if (bld == NULL - || !OSSL_PARAM_BLD_push_BN(bld, "p", p) - || !OSSL_PARAM_BLD_push_BN(bld, "q", q) - || !OSSL_PARAM_BLD_push_uint(bld, "e", e) || !OSSL_PARAM_BLD_push_BN(bld, "n", n) + || !OSSL_PARAM_BLD_push_uint(bld, "e", e) || !OSSL_PARAM_BLD_push_BN(bld, "d", d) + || !OSSL_PARAM_BLD_push_BN(bld, "rsa-factor1", p) + || !OSSL_PARAM_BLD_push_BN(bld, "rsa-factor2", q) + || !OSSL_PARAM_BLD_push_BN(bld, "rsa-exponent1", dmp1) + || !OSSL_PARAM_BLD_push_BN(bld, "rsa-exponent2", dmq1) + || !OSSL_PARAM_BLD_push_BN(bld, "rsa-coefficient1", iqmp) || (params = OSSL_PARAM_BLD_to_param(bld)) == NULL) goto err; OSSL_PARAM_BLD_free(bld); @@ -170,7 +175,7 @@ public key. if (nld == NULL || !OSSL_PARAM_BLD_push_BN(bld, "n", n) - || !OSSL_PARAM_BLD_push_BN(bld, "e", e) + || !OSSL_PARAM_BLD_push_uint(bld, "e", e) || (params = OSSL_PARAM_BLD_to_param(bld)) == NULL) goto err; OSSL_PARAM_BLD_free(bld); |