summaryrefslogtreecommitdiffstats
path: root/crypto/cmp/cmp_msg.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-07-11 11:36:48 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-07-30 20:14:49 +0200
commitfafa56a14fc4787060818715c151e1ef7b25e72f (patch)
tree56df8de045d1ffd883d39302fa7fb97276fe8b88 /crypto/cmp/cmp_msg.c
parent87d20a96510ecc78068865423e0fa127d17486de (diff)
Export ossl_cmp_msg_load() as OSSL_CMP_MSG_read(), use it in apps/cmp.c
Fixes #12403 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/12421)
Diffstat (limited to 'crypto/cmp/cmp_msg.c')
-rw-r--r--crypto/cmp/cmp_msg.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/cmp/cmp_msg.c b/crypto/cmp/cmp_msg.c
index d45a803677..2e24f49f3c 100644
--- a/crypto/cmp/cmp_msg.c
+++ b/crypto/cmp/cmp_msg.c
@@ -1008,13 +1008,15 @@ int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg)
|| ossl_cmp_msg_protect(ctx, msg);
}
-OSSL_CMP_MSG *ossl_cmp_msg_load(const char *file)
+OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file)
{
OSSL_CMP_MSG *msg = NULL;
BIO *bio = NULL;
- if (!ossl_assert(file != NULL))
+ if (file == NULL) {
+ CMPerr(0, CMP_R_NULL_ARGUMENT);
return NULL;
+ }
if ((bio = BIO_new_file(file, "rb")) == NULL)
return NULL;