summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trust/persist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/trust/persist.c b/trust/persist.c
index 0e98b46..f70240a 100644
--- a/trust/persist.c
+++ b/trust/persist.c
@@ -39,6 +39,7 @@
#include "constants.h"
#include "debug.h"
#include "lexer.h"
+#include "message.h"
#include "pem.h"
#include "persist.h"
#include "pkcs11.h"
@@ -445,7 +446,7 @@ format_oid (p11_persist *persist,
int len;
int ret;
- if (attr->type != CKA_OBJECT_ID)
+ if (attr->type != CKA_OBJECT_ID || attr->ulValueLen == 0)
return false;
if (!persist->asn1_defs) {
@@ -466,7 +467,7 @@ format_oid (p11_persist *persist,
ret = asn1_der_decoding (&asn, attr->pValue, attr->ulValueLen, message);
if (ret != ASN1_SUCCESS) {
- p11_debug_precond ("invalid oid value: %s", message);
+ p11_message ("invalid oid value: %s", message);
return false;
}