r value is already checked on line 113 (#1582)

This commit is contained in:
Raul Metsma 2019-01-24 14:15:13 +02:00 committed by Frank Morgner
parent f161c3a178
commit 70d690ace7
1 changed files with 25 additions and 26 deletions

View File

@ -109,7 +109,9 @@ sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
r = sc_pkcs15emu_add_x509_cert(p15card, &cert_obj, &cert_info);
if (r < 0)
return SC_ERROR_INTERNAL;
if (i == 0) {
if (i != 0)
continue;
sc_pkcs15_cert_t *cert = NULL;
r = sc_pkcs15_read_certificate(p15card, &cert_info, &cert);
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;
else
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 }};
u8 *cn_name = NULL;
size_t cn_len = 0;
@ -136,8 +137,6 @@ sc_pkcs15emu_esteid_init (sc_pkcs15_card_t * p15card)
free(cn_name);
sc_pkcs15_free_certificate(cert);
}
}
}
/* the file with key pin info (tries left) */
sc_format_path ("3f000016", &tmppath);