Fix segfault in C_GetAttributeValue
Fix segfault in C_GetAttributeValue

sec_convert_cert3_to_attribute_list() previously defined serial in two
different scopes - first as a CK_BYTE*, and later on as a char*. This
led to serial_len being set to a valid length, but the CK_BYTE* remained
NULL when processed by C_GetAttributeValue().

On my system this was causing Chrome/Firefox to segfault at
pkcs11-impl.c:667 during the memcpy, due to pTmp->pValue being NULL.

This commit removes the second definition of serial and casts the
existing CK_BYTE* where necessary.

Signed-off-by: Matt Merhar <a760441f7d64e653d0bad7815b42e647b66a1abf@protonmail.com>

sektioneins/scd-pkcs11,sektioneins/scd-pkcs11