aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/print_manifest/print_manifest.c2
-rw-r--r--utils/print_roa/print_roa.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/utils/print_manifest/print_manifest.c b/utils/print_manifest/print_manifest.c
index 6084f07f..27a3ce55 100644
--- a/utils/print_manifest/print_manifest.c
+++ b/utils/print_manifest/print_manifest.c
@@ -107,7 +107,7 @@ static const Manifest *read_manifest(const char *filename, const int print_cms,
for (i = 0; i < sk_CMS_SignerInfo_num(signerInfos); i++) {
ASN1_OCTET_STRING *hash = NULL;
printf("SignerId[%d]: ", i);
- if (CMS_SignerInfo_get0_signer_id(sk_CMS_SignerInfo_value(signerInfos, i), &hash, NULL, NULL))
+ if (CMS_SignerInfo_get0_signer_id(sk_CMS_SignerInfo_value(signerInfos, i), &hash, NULL, NULL) && hash != NULL)
for (j = 0; j < hash->length; j++)
printf("%02x%s", hash->data[j], j == hash->length - 1 ? "" : ":");
else
diff --git a/utils/print_roa/print_roa.c b/utils/print_roa/print_roa.c
index efe76674..33e93e38 100644
--- a/utils/print_roa/print_roa.c
+++ b/utils/print_roa/print_roa.c
@@ -197,7 +197,7 @@ static const ROA *read_roa(const char *filename, const int print_cms, const int
for (i = 0; i < sk_CMS_SignerInfo_num(signerInfos); i++) {
ASN1_OCTET_STRING *hash = NULL;
printf("SignerId[%d]: ", i);
- if (CMS_SignerInfo_get0_signer_id(sk_CMS_SignerInfo_value(signerInfos, i), &hash, NULL, NULL))
+ if (CMS_SignerInfo_get0_signer_id(sk_CMS_SignerInfo_value(signerInfos, i), &hash, NULL, NULL) && hash != NULL)
for (j = 0; j < hash->length; j++)
printf("%02x%s", hash->data[j], j == hash->length - 1 ? "" : ":");
else