diff --git a/src/libopensc/card-epass2003.c b/src/libopensc/card-epass2003.c index 49b593f9..299520d6 100644 --- a/src/libopensc/card-epass2003.c +++ b/src/libopensc/card-epass2003.c @@ -1846,11 +1846,6 @@ epass2003_process_fci(struct sc_card *card, sc_file_t * file, const u8 * buf, si case 0x04: file->ef_structure = SC_FILE_EF_LINEAR_FIXED; break; - case 0x03: - case 0x05: - case 0x06: - case 0x07: - break; default: break; } diff --git a/src/libopensc/card-piv.c b/src/libopensc/card-piv.c index 7cbf84b2..a678b768 100644 --- a/src/libopensc/card-piv.c +++ b/src/libopensc/card-piv.c @@ -2131,14 +2131,16 @@ piv_get_serial_nr_from_CHUI(sc_card_t* card, sc_serial_number_t* serial) /* test if guid and the fascn starts with ;9999 (in ISO 4bit + parity code) */ if (!(gbits && fascn[0] == 0xD4 && fascn[1] == 0xE7 && fascn[2] == 0x39 && (fascn[3] | 0x7F) == 0xFF)) { - serial->len = fascnlen < SC_MAX_SERIALNR ? fascnlen : SC_MAX_SERIALNR; + /* fascnlen is 25 */ + serial->len = fascnlen; memcpy (serial->value, fascn, serial->len); r = SC_SUCCESS; gbits = 0; /* set to skip using guid below */ } } if (guid && gbits) { - serial->len = guidlen < SC_MAX_SERIALNR ? guidlen : SC_MAX_SERIALNR; + /* guidlen is 16 */ + serial->len = guidlen; memcpy (serial->value, guid, serial->len); r = SC_SUCCESS; } diff --git a/src/pkcs15init/pkcs15-myeid.c b/src/pkcs15init/pkcs15-myeid.c index 8b927d09..10258667 100644 --- a/src/pkcs15init/pkcs15-myeid.c +++ b/src/pkcs15init/pkcs15-myeid.c @@ -750,7 +750,6 @@ myeid_generate_key(struct sc_profile *profile, struct sc_pkcs15_card *p15card, break; default: LOG_TEST_RET(ctx, SC_ERROR_INVALID_ARGUMENTS, "Unsupported key type"); - break; } sc_log(ctx, "Generate key with ID:%s and path:%s",