aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-11-13 14:38:05 +0000
committerRob Austein <sra@hactrn.net>2008-11-13 14:38:05 +0000
commit8ab0498cce4314abee7a87839b9abc24b44e7220 (patch)
treeeab2b54ce2101bd9912bcb9ce9233be2b0a1e386 /utils
parent766799a690f5c909d19c9f2cb26ff39d526f76c7 (diff)
Don't dump core if CMS wrapper uses the wrong flavor of SID.
svn path=/utils/print_manifest/print_manifest.c; revision=2034
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