Accessing bignums of a RSA key with OpenSSL 3.0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear all,

Testing migration to OpenSSL 3.0.
Got to update some code building a JWK (in relation to ACME LetsEncrypt protocols).

Having an EVP_PKEY which happens to be a RSA key, I proceeded this way (1.1.1) to extract the bignums needed for inclusion into the JWK:

	// Access the numerical components of the certificate RSA keys.
	BIGNUM* n;
	BIGNUM* e;
	BIGNUM* d;
	RSA_get0_key(cert.RSAkey(), &n, &e, &d);

( my cert.RSAkey() returned RSA* from my embedded EVP_PKEY* through EVP_PKEY_get0_RSA() )

I understand I should now start straight from the EVP_PKEY and use :

	EVP_PKEY_get_bn_param(cert.key(), "name-n?", &n);
	EVP_PKEY_get_bn_param(cert.key(), "name-e?", &e);
	EVP_PKEY_get_bn_param(cert.key(), "name-d?", &d); 

( cert.key() returns EVP_KEY* )

The question is: where can I find the proper names for these bignums out of a RSA key?

__
Best Regards, Meilleures salutations, Met vriendelijke groeten, Mit freundlichen Grüßen,
Olivier Mascia






[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux