Re: Json Web Keys again

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

 




On 03/12/2019 17:23, Angus Robertson - Magenta Systems Ltd wrote:
>> What does EVP_PKEY_base_id() return for your pkey? How did you 
>> create it?
> 
> base_id is 912, EVP_PKEY_RSA_PSS=NID_rsassaPss. 

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

That just does this:

int EVP_PKEY_id(const EVP_PKEY *pkey)
{
    return pkey->type;
}

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...


Matt


> 
> But my code is Pascal so not using your header files directly, seems
> okay though. 
> 
> It was created with OpenSSL APIs and EVP_PKEY_print_private reports:
> RSA-PSS Private-Key: (2048 bit, 2 primes)
> 
> Angus
> 
>  
> 



[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