diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2019-08-10 14:07:22 +0200 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2019-09-27 11:53:11 +0200 |
commit | 7960dbec6801c1c98c848b81ca00e73625e8970b (patch) | |
tree | 58045a9618ce5668f8b95b966810a35b3285deb3 /test/cmp_testlib.h | |
parent | Reformat param description lines (diff) | |
download | openssl-7960dbec6801c1c98c848b81ca00e73625e8970b.tar.xz openssl-7960dbec6801c1c98c848b81ca00e73625e8970b.zip |
Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
Also includes CRMF (RFC 4211) and HTTP transfer (RFC 6712)
CMP and CRMF API is added to libcrypto, and the "cmp" app to the openssl CLI.
Adds extensive man pages and tests. Integration into build scripts.
Incremental pull request based on OpenSSL commit 8869ad4a39f of 2019-04-02
4th chunk: CMP context/parameters and utilities
in crypto/cmp/cmp_ctx.c, crypto/cmp/cmp_util.c, and related files
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9107)
Diffstat (limited to 'test/cmp_testlib.h')
-rw-r--r-- | test/cmp_testlib.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/cmp_testlib.h b/test/cmp_testlib.h new file mode 100644 index 0000000000..afd32b7ce3 --- /dev/null +++ b/test/cmp_testlib.h @@ -0,0 +1,34 @@ +/* + * Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved. + * Copyright Nokia 2007-2019 + * Copyright Siemens AG 2015-2019 + * + * Licensed under the Apache License 2.0 (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#ifndef HEADER_CMP_TEST_LIB_H +# define HEADER_CMP_TEST_LIB_H + +# include <openssl/cmp.h> +# include <openssl/pem.h> +# include <openssl/rand.h> + +#include "../crypto/cmp/cmp_int.h" + +# include "testutil.h" + +# ifndef OPENSSL_NO_CMP +# define CMP_TEST_REFVALUE_LENGTH 15 /* arbitrary value */ +EVP_PKEY *load_pem_key(const char *file); +X509 *load_pem_cert(const char *file); +X509_REQ *load_csr(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); +# endif + +#endif /* HEADER_CMP_TEST_LIB_H */ |