westcos: Avoid strict aliasing violations
This commit is contained in:
parent
b5f26051bb
commit
45e262f537
@ -124,18 +124,17 @@ static int sc_pkcs15emu_westcos_init(sc_pkcs15_card_t * p15card)
|
||||
struct sc_pkcs15_pubkey_info pubkey_info;
|
||||
struct sc_pkcs15_object pubkey_obj;
|
||||
struct sc_pkcs15_pubkey *pkey = NULL;
|
||||
sc_pkcs15_cert_t *cert = NULL;
|
||||
|
||||
memset(&cert_info, 0, sizeof(cert_info));
|
||||
memset(&cert_obj, 0, sizeof(cert_obj));
|
||||
cert_info.id.len = 1;
|
||||
cert_info.id.value[0] = 0x45;
|
||||
cert_info.authority = 0;
|
||||
cert_info.path = path;
|
||||
r = sc_pkcs15_read_certificate(p15card, &cert_info,
|
||||
(sc_pkcs15_cert_t
|
||||
**) (&cert_obj.data));
|
||||
r = sc_pkcs15_read_certificate(p15card, &cert_info, &cert);
|
||||
cert_obj.data = (void *) cert;
|
||||
if (!r) {
|
||||
sc_pkcs15_cert_t *cert =
|
||||
(sc_pkcs15_cert_t *) (cert_obj.data);
|
||||
strlcpy(cert_obj.label, "User certificate",
|
||||
sizeof(cert_obj.label));
|
||||
cert_obj.flags = SC_PKCS15_CO_FLAG_MODIFIABLE;
|
||||
|
Loading…
Reference in New Issue
Block a user