Re: [PATCH] X.509: unpack RSA signatureValue field from BIT STRING

2018-03-23 Thread Maciej S. Szmigiero
On 07.03.2018 18:56, Maciej S. Szmigiero wrote: > On 07.03.2018 16:44, David Howells wrote: >> Maciej S. Szmigiero wrote: >> >>> + if (!strcmp(ctx->cert->sig->pkey_algo, "rsa")) { >> >> I'm going to change this to '== 0' rather than '!'. > > No problem. I cannot find this patch in any tree th

Re: [PATCH] X.509: unpack RSA signatureValue field from BIT STRING

2018-03-07 Thread Maciej S. Szmigiero
On 07.03.2018 16:44, David Howells wrote: > Maciej S. Szmigiero wrote: > >> +if (!strcmp(ctx->cert->sig->pkey_algo, "rsa")) { > > I'm going to change this to '== 0' rather than '!'. No problem. > David > Thanks, Maciej

Re: [PATCH] X.509: unpack RSA signatureValue field from BIT STRING

2018-03-07 Thread David Howells
Maciej S. Szmigiero wrote: > + if (!strcmp(ctx->cert->sig->pkey_algo, "rsa")) { I'm going to change this to '== 0' rather than '!'. David

[PATCH] X.509: unpack RSA signatureValue field from BIT STRING

2018-03-06 Thread Maciej S. Szmigiero
The signatureValue field of a X.509 certificate is encoded as a BIT STRING. For RSA signatures this BIT STRING is of so-called primitive subtype, which contains a u8 prefix indicating a count of unused bits in the encoding. We have to strip this prefix from signature data, just as we already do fo