[openssl-dev] API Problems in current master

Richard Moore richmoore44 at gmail.com
Sun Mar 13 22:29:25 UTC 2016


That's great, thanks Rainer. I'll give those a try.

Rich.

On 13 March 2016 at 14:41, Rainer Jung <rainer.jung at kippdata.de> wrote:

> Am 13.03.2016 um 14:34 schrieb Richard Moore:
>
>> I'm currently testing the new release by trying to port Qt to use it
>> (with the compatibility stuff disabled). Here are the first problems
>> I've hit:
>>
>> How do we get the certificate serial number? We were doing
>> x509->cert_info->serialNumber to get it as an ASN1_INTEGER.
>>
>
> ASN1_INTEGER *X509_get_serialNumber(X509 *x);
>
> implemented in crypto/x509/x509_cmp.c:
>
> ASN1_INTEGER *X509_get_serialNumber(X509 *a)
> {
>     return &a->cert_info.serialNumber;
> }
>
> https://www.openssl.org/docs/manmaster/crypto/EVP_PKEY_type.html says:
>> "EVP_PKEY_type() returns the type of key corresponding to the value
>> type. The type of a key can be obtained with EVP_PKEY_type(pkey->type)."
>> except it can't
>> because the structure is now opaque.
>>
>
> The docs should be fixed, but there's:
>
> int EVP_PKEY_id(const EVP_PKEY *pkey);
> int EVP_PKEY_base_id(const EVP_PKEY *pkey);
>
> implemented in crypto/evp/p_lib.c:
>
> int EVP_PKEY_id(const EVP_PKEY *pkey)
> {
>     return pkey->type;
> }
>
> int EVP_PKEY_base_id(const EVP_PKEY *pkey)
> {
>     return EVP_PKEY_type(pkey->type);
> }
>
> HTH
>
> Regards,
>
> Rainer
> --
> openssl-dev mailing list
> To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-dev/attachments/20160313/66745fe8/attachment-0001.html>


More information about the openssl-dev mailing list