From d56f8567d4fe807dc097febbac7bb4e02ca9dea3 Mon Sep 17 00:00:00 2001 From: Aveen Ismail <42414844+aveenismail@users.noreply.github.com> Date: Wed, 2 Aug 2023 13:30:08 +0200 Subject: [PATCH] PKCS11: Fix returning attribute length (#21) PKCS11: Fix returning attribute length --- pkcs11/util_pkcs11.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkcs11/util_pkcs11.c b/pkcs11/util_pkcs11.c index 715c9503..4f58ed75 100644 --- a/pkcs11/util_pkcs11.c +++ b/pkcs11/util_pkcs11.c @@ -1218,6 +1218,8 @@ static CK_RV get_attribute_opaque(CK_ATTRIBUTE_TYPE type, case CKA_SUBJECT: case CKA_ISSUER: case CKA_SERIAL_NUMBER: + *((CK_BYTE_PTR *) value) = NULL; + *length = 0; break; default: