Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11386)
int i;
const X509_CINF *ai, *bi;
+ if (b == NULL)
+ return a != NULL;
+ if (a == NULL)
+ return -1;
ai = &a->cert_info;
bi = &b->cert_info;
i = ASN1_INTEGER_cmp(&ai->serialNumber, &bi->serialNumber);
{
int ret;
- /* Ensure canonical encoding is present and up to date */
+ if (b == NULL)
+ return a != NULL;
+ if (a == NULL)
+ return -1;
+ /* Ensure canonical encoding is present and up to date */
if (!a->canon_enc || a->modified) {
ret = i2d_X509_NAME((X509_NAME *)a, NULL);
if (ret < 0)