Use |, not ||, when decoding CAC key_reference

This quiets two compiler warnings and is almost surely what was actually
meant.  However, I do not have a CAC card to test.
This commit is contained in:
Nathaniel Wesley Filardo 2017-08-31 15:20:41 -04:00 committed by Frank Morgner
parent 789dd16320
commit 5882df745a
1 changed files with 2 additions and 2 deletions

View File

@ -323,8 +323,8 @@ static int sc_pkcs15emu_cac_init(sc_pkcs15_card_t *p15card)
prkey_info.path.len += 2;
}
pubkey_info.native = 1;
pubkey_info.key_reference = ((int)obj_info.id.value[0]) << 8 || obj_info.id.value[1];
prkey_info.key_reference = ((int)obj_info.id.value[0]) << 8 || obj_info.id.value[1];
pubkey_info.key_reference = ((int)obj_info.id.value[0]) << 8 | obj_info.id.value[1];
prkey_info.key_reference = ((int)obj_info.id.value[0]) << 8 | obj_info.id.value[1];
prkey_info.native = 1;
memcpy(cert_obj.label, obj_info.app_label, sizeof(obj_info.app_label));