Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/openssl/cmp_util.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /*
0002  * Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
0003  * Copyright Nokia 2007-2019
0004  * Copyright Siemens AG 2015-2019
0005  *
0006  * Licensed under the Apache License 2.0 (the "License").  You may not use
0007  * this file except in compliance with the License.  You can obtain a copy
0008  * in the file LICENSE in the source distribution or at
0009  * https://www.openssl.org/source/license.html
0010  */
0011 
0012 #ifndef OPENSSL_CMP_UTIL_H
0013 #define OPENSSL_CMP_UTIL_H
0014 #pragma once
0015 
0016 #include <openssl/opensslconf.h>
0017 #ifndef OPENSSL_NO_CMP
0018 
0019 #include <openssl/macros.h>
0020 #include <openssl/trace.h>
0021 
0022 #ifdef __cplusplus
0023 extern "C" {
0024 #endif
0025 
0026 int OSSL_CMP_log_open(void);
0027 void OSSL_CMP_log_close(void);
0028 #define OSSL_CMP_LOG_PREFIX "CMP "
0029 
0030 /*
0031  * generalized logging/error callback mirroring the severity levels of syslog.h
0032  */
0033 typedef int OSSL_CMP_severity;
0034 #define OSSL_CMP_LOG_EMERG 0
0035 #define OSSL_CMP_LOG_ALERT 1
0036 #define OSSL_CMP_LOG_CRIT 2
0037 #define OSSL_CMP_LOG_ERR 3
0038 #define OSSL_CMP_LOG_WARNING 4
0039 #define OSSL_CMP_LOG_NOTICE 5
0040 #define OSSL_CMP_LOG_INFO 6
0041 #define OSSL_CMP_LOG_DEBUG 7
0042 #define OSSL_CMP_LOG_TRACE 8
0043 #define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE
0044 typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
0045     OSSL_CMP_severity level, const char *msg);
0046 
0047 int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
0048     int line, OSSL_CMP_severity level, const char *msg);
0049 /* use of the logging callback for outputting error queue */
0050 void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
0051 
0052 #ifdef __cplusplus
0053 }
0054 #endif
0055 #endif /* !defined(OPENSSL_NO_CMP) */
0056 #endif /* !defined(OPENSSL_CMP_UTIL_H) */