Unwind RSA_generate_multi_prime_key.
Later CLs will unwind the rest of multiprime RSA support. Start with key
generation.
Change-Id: Id20473fd55cf32c27ea4a57f2d2ea11daaffedeb
Reviewed-on: https://boringssl-review.googlesource.com/14870
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/tool/genrsa.cc b/tool/genrsa.cc
index b49ebbc..a82c9cc 100644
--- a/tool/genrsa.cc
+++ b/tool/genrsa.cc
@@ -23,10 +23,6 @@
static const struct argument kArguments[] = {
{
- "-nprimes", kOptionalArgument,
- "The number of primes to generate (default: 2)",
- },
- {
"-bits", kOptionalArgument,
"The number of bits in the modulus (default: 2048)",
},
@@ -43,9 +39,8 @@
return false;
}
- unsigned bits, nprimes = 0;
- if (!GetUnsigned(&bits, "-bits", 2048, args_map) ||
- !GetUnsigned(&nprimes, "-nprimes", 2, args_map)) {
+ unsigned bits;
+ if (!GetUnsigned(&bits, "-bits", 2048, args_map)) {
PrintUsage(kArguments);
return false;
}
@@ -55,7 +50,7 @@
bssl::UniquePtr<BIO> bio(BIO_new_fp(stdout, BIO_NOCLOSE));
if (!BN_set_word(e.get(), RSA_F4) ||
- !RSA_generate_multi_prime_key(rsa.get(), bits, nprimes, e.get(), NULL) ||
+ !RSA_generate_key_ex(rsa.get(), bits, e.get(), NULL) ||
!PEM_write_bio_RSAPrivateKey(bio.get(), rsa.get(), NULL /* cipher */,
NULL /* key */, 0 /* key len */,
NULL /* password callback */,