Json Web Keys again

Angus Robertson - Magenta Systems Ltd angus at magsys.co.uk
Tue Dec 3 18:03:00 UTC 2019


>> Sorry. My mistake. I actually meant what does EVP_PKEY_id() 
> return.

Also returns 912, the same as base_id.  RSA keys both return 6. 

> So if you get EVP_PKEY_RSA_PSS returned from that I don't 
> currently understand how this:
> 
> RSA *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey)
> {
>     if (pkey->type != EVP_PKEY_RSA && pkey->type != 
> EVP_PKEY_RSA_PSS) {
>         EVPerr(EVP_F_EVP_PKEY_GET0_RSA, 
> EVP_R_EXPECTING_AN_RSA_KEY);
>         return NULL;
>     }
>     return pkey->pkey.rsa;
> }
> 
> Can return the error you saw!! Something strange going on...

Agreed, code looks clear enough, but was this was for 1.1.1 or master?

Just created a new RSA-PSS key with the latest OpenSSL and same error. 

Angus





More information about the openssl-users mailing list