diff --git a/libgamestream/mkcert.c b/libgamestream/mkcert.c index e3f6b9e..4ced6f6 100644 --- a/libgamestream/mkcert.c +++ b/libgamestream/mkcert.c @@ -104,7 +104,18 @@ int mkcert(X509 **x509p, EVP_PKEY **pkeyp, int bits, int serial, int years) { x = *x509p; } - rsa = RSA_generate_key(bits, RSA_F4, NULL, NULL); + BIGNUM* bne = BN_new(); + if (bne == NULL) { + abort(); + goto err; + } + + BN_set_word(bne, RSA_F4); + if (RSA_generate_key_ex(rsa, bits, bne, NULL) == 0) { + abort(); + goto err; + } + if (!EVP_PKEY_assign_RSA(pk, rsa)) { abort(); goto err;