Add ECDSA signature R and S to X509 structure

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

 



I have an ECDSA signature supplied to me as R and S byte arrays and lengths (from an HSM).

How do I add them to the X509 structure?

Is there an API, a set of calls, or do you have any hints?

~~

For RSA, I simply filled in the ASN1_BIT_STRING length, data, and flags, but an RSA signature is a simply BIT_STRING.

For ECDSA, the BIT_STRING is a SEQUENCE of two INTEGERs.

I could construct the SEQUENCE DER manually and then add it as with RSA, but that seems like a hack. Is there a better way?

Is there a better way for RSA? I suspect that peering inside the ASN1_BIT_STRING will break for openssl 1.1.




[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