Skip to content

Commit

Permalink
Don't fail if a candidate certificate has no SANs
Browse files Browse the repository at this point in the history
When we're doing certificate matching and we're asked for the list of
SAN values for a certifiate, and it contains none, don't return an
error, as that will eventually cause the module to just return an error.
Instead, just return an empty list of SAN values so that processing will
continue on to check if other certificates match.
  • Loading branch information
nalind authored and greghudson committed May 10, 2013
1 parent 1e8ec64 commit 2a39ca9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/plugins/preauth/pkinit/pkinit_crypto_nss.c
Original file line number Diff line number Diff line change
Expand Up @@ -3161,12 +3161,8 @@ crypto_cert_get_matching_data(krb5_context context,
md->ku_bits = cert_get_ku_bits(context, cert_handle->cert);
md->eku_bits = cert_get_eku_bits(context, cert_handle->cert, PR_FALSE);
if (cert_retrieve_cert_sans(context, cert_handle->cert,
&md->sans, &md->sans, NULL) != 0) {
free(md->subject_dn);
free(md->issuer_dn);
free(md);
return ENOMEM;
}
&md->sans, &md->sans, NULL) != 0)
md->sans = NULL;
*ret_data = md;
return 0;
}
Expand Down

0 comments on commit 2a39ca9

Please sign in to comment.