r value is already checked on line 113 (#1582)
This commit is contained in:
parent
f161c3a178
commit
70d690ace7
|
@ -109,7 +109,9 @@ sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
|
||||||
r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info);
|
r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return SC_ERROR_INTERNAL;
|
return SC_ERROR_INTERNAL;
|
||||||
if (i == 0) {
|
if (i != 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
sc_pkcs15_cert_t *cert = NULL;
|
sc_pkcs15_cert_t *cert = NULL;
|
||||||
r = sc_pkcs15_read_certificate(p15card, &cert_info, &cert);
|
r = sc_pkcs15_read_certificate(p15card, &cert_info, &cert);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
|
@ -118,7 +120,6 @@ sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
|
||||||
field_length = cert->key->u.ec.params.field_length;
|
field_length = cert->key->u.ec.params.field_length;
|
||||||
else
|
else
|
||||||
modulus_length = cert->key->u.rsa.modulus.len * 8;
|
modulus_length = cert->key->u.rsa.modulus.len * 8;
|
||||||
if (r == SC_SUCCESS) {
|
|
||||||
static const struct sc_object_id cn_oid = {{ 2, 5, 4, 3, -1 }};
|
static const struct sc_object_id cn_oid = {{ 2, 5, 4, 3, -1 }};
|
||||||
u8 *cn_name = NULL;
|
u8 *cn_name = NULL;
|
||||||
size_t cn_len = 0;
|
size_t cn_len = 0;
|
||||||
|
@ -136,8 +137,6 @@ sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
|
||||||
free(cn_name);
|
free(cn_name);
|
||||||
sc_pkcs15_free_certificate(cert);
|
sc_pkcs15_free_certificate(cert);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* the file with key pin info (tries left) */
|
/* the file with key pin info (tries left) */
|
||||||
sc_format_path ("3f000016", &tmppath);
|
sc_format_path ("3f000016", &tmppath);
|
||||||
|
|
Loading…
Reference in New Issue