Fix PEM certificate loading that sometimes fails
[openssl.git] / test / cmp_testlib.h
index afd32b7ce3e4709df650d29ae9a56bb2e9f1edcc..927751057946eeecc2a1db8b97b1aed7fa0adf02 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
  * Copyright Nokia 2007-2019
  * Copyright Siemens AG 2015-2019
  *
@@ -9,14 +9,14 @@
  * https://www.openssl.org/source/license.html
  */
 
-#ifndef HEADER_CMP_TEST_LIB_H
-# define HEADER_CMP_TEST_LIB_H
+#ifndef OSSL_TEST_CMP_TESTLIB_H
+# define OSSL_TEST_CMP_TESTLIB_H
 
 # include <openssl/cmp.h>
 # include <openssl/pem.h>
 # include <openssl/rand.h>
 
-#include "../crypto/cmp/cmp_int.h"
+# include "../crypto/cmp/cmp_local.h"
 
 # include "testutil.h"
 
 EVP_PKEY *load_pem_key(const char *file);
 X509 *load_pem_cert(const char *file);
 X509_REQ *load_csr(const char *file);
+OSSL_CMP_MSG *load_pkimsg(const char *file);
 int valid_asn1_encoding(const OSSL_CMP_MSG *msg);
 EVP_PKEY *gen_rsa(void);
 int STACK_OF_X509_cmp(const STACK_OF(X509) *sk1, const STACK_OF(X509) *sk2);
 int STACK_OF_X509_push1(STACK_OF(X509) *sk, X509 *cert);
+int print_to_bio_out(const char *func, const char *file, int line,
+                     OSSL_CMP_severity level, const char *msg);
 # endif
 
-#endif /* HEADER_CMP_TEST_LIB_H */
+#endif /* OSSL_TEST_CMP_TESTLIB_H */