OpenSSL: update vendor sources to match 3.5.5 content
MFC with: f25b8c9fb4
MFC after: 1 week
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by apps/progs.pl
|
||||
*
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by apps/progs.pl
|
||||
*
|
||||
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2026 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* 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
|
||||
|
||||
@@ -9,13 +9,16 @@
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#include "internal/e_os.h"
|
||||
#include "internal/param_names.h"
|
||||
#include <string.h>
|
||||
|
||||
/* Machine generated TRIE -- generated by util/perl/OpenSSL/paramnames.pm */
|
||||
/* clang-format off */
|
||||
int ossl_param_find_pidx(const char *s)
|
||||
{
|
||||
switch(s[0]) {
|
||||
@@ -3363,4 +3366,5 @@ int ossl_param_find_pidx(const char *s)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* clang-format on */
|
||||
/* End of TRIE */
|
||||
|
||||
@@ -7,7 +7,7 @@ modulesdir=${libdir}/ossl-modules
|
||||
|
||||
Name: OpenSSL-libcrypto
|
||||
Description: OpenSSL cryptography library
|
||||
Version: 3.5.4
|
||||
Version: 3.5.5
|
||||
Libs: -L${libdir} -lcrypto
|
||||
Libs.private: -pthread
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -5,7 +5,7 @@ includedir=${prefix}/include
|
||||
|
||||
Name: OpenSSL-libssl
|
||||
Description: Secure Sockets Layer and cryptography libraries
|
||||
Version: 3.5.4
|
||||
Version: 3.5.5
|
||||
Requires.private: libcrypto
|
||||
Libs: -L${libdir} -lssl
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -5,5 +5,5 @@ includedir=${prefix}/include
|
||||
|
||||
Name: OpenSSL
|
||||
Description: Secure Sockets Layer and cryptography libraries and tools
|
||||
Version: 3.5.4
|
||||
Version: 3.5.5
|
||||
Requires: libssl libcrypto
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* clang-format off */
|
||||
/* WARNING: do not edit! */
|
||||
/* Generated by Makefile from include/crypto/bn_conf.h.in */
|
||||
/* clang-format on */
|
||||
/*
|
||||
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
@@ -10,8 +12,8 @@
|
||||
*/
|
||||
|
||||
#ifndef OSSL_CRYPTO_BN_CONF_H
|
||||
# define OSSL_CRYPTO_BN_CONF_H
|
||||
# pragma once
|
||||
#define OSSL_CRYPTO_BN_CONF_H
|
||||
#pragma once
|
||||
|
||||
/*
|
||||
* The contents of this file are not used in the UEFI build, as
|
||||
@@ -22,9 +24,15 @@
|
||||
/* Should we define BN_DIV2W here? */
|
||||
|
||||
/* Only one for the following should be defined */
|
||||
/* clang-format off */
|
||||
#define SIXTY_FOUR_BIT_LONG
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
#undef SIXTY_FOUR_BIT
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
#undef THIRTY_TWO_BIT
|
||||
/* clang-format on */
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
/* clang-format off */
|
||||
/* WARNING: do not edit! */
|
||||
/* Generated by Makefile from include/crypto/dso_conf.h.in */
|
||||
/* clang-format on */
|
||||
/*
|
||||
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
@@ -10,10 +12,14 @@
|
||||
*/
|
||||
|
||||
#ifndef OSSL_CRYPTO_DSO_CONF_H
|
||||
# define OSSL_CRYPTO_DSO_CONF_H
|
||||
# pragma once
|
||||
#define OSSL_CRYPTO_DSO_CONF_H
|
||||
#pragma once
|
||||
|
||||
/* clang-format off */
|
||||
# define DSO_DLFCN
|
||||
# define HAVE_DLFCN_H
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# define DSO_EXTENSION ".so"
|
||||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
@@ -9,11 +9,14 @@
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
int ossl_param_find_pidx(const char *s);
|
||||
|
||||
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
||||
/* clang-format off */
|
||||
#define NUM_PIDX 346
|
||||
|
||||
#define PIDX_ALG_PARAM_ALGORITHM_ID 0
|
||||
@@ -467,3 +470,4 @@ int ossl_param_find_pidx(const char *s);
|
||||
#define PIDX_STORE_PARAM_PROPERTIES 7
|
||||
#define PIDX_STORE_PARAM_SERIAL 344
|
||||
#define PIDX_STORE_PARAM_SUBJECT 345
|
||||
/* clang-format on */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -12,32 +12,34 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CMP_H
|
||||
# define OPENSSL_CMP_H
|
||||
#define OPENSSL_CMP_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# ifndef OPENSSL_NO_CMP
|
||||
#include <openssl/opensslconf.h>
|
||||
#ifndef OPENSSL_NO_CMP
|
||||
|
||||
# include <openssl/crmf.h>
|
||||
# include <openssl/cmperr.h>
|
||||
# include <openssl/cmp_util.h>
|
||||
# include <openssl/http.h>
|
||||
#include <openssl/crmf.h>
|
||||
#include <openssl/cmperr.h>
|
||||
#include <openssl/cmp_util.h>
|
||||
#include <openssl/http.h>
|
||||
|
||||
/* explicit #includes not strictly needed since implied by the above: */
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define OSSL_CMP_PVNO_2 2
|
||||
# define OSSL_CMP_PVNO_3 3
|
||||
# define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
||||
#define OSSL_CMP_PVNO_2 2
|
||||
#define OSSL_CMP_PVNO_3 3
|
||||
#define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
||||
|
||||
/*-
|
||||
* PKIFailureInfo ::= BIT STRING {
|
||||
@@ -106,68 +108,68 @@ extern "C" {
|
||||
* -- certificate already exists
|
||||
* }
|
||||
*/
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
||||
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
||||
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
||||
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
||||
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
||||
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
||||
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
||||
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
||||
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
||||
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
||||
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
||||
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
||||
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
||||
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
||||
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
||||
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
||||
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
||||
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
||||
# define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
||||
#define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
||||
#define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
||||
#define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
||||
#define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
||||
#define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
||||
#define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
||||
#define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
||||
#define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
||||
#define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
||||
#define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
||||
#define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
||||
#define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
||||
#define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
||||
#define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
||||
#define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
||||
#define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
||||
#define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
||||
#define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
||||
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
||||
# if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
||||
# error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
||||
# endif
|
||||
#if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
||||
#error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
||||
#endif
|
||||
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
||||
|
||||
# define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
||||
# define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
||||
# define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
||||
# define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
||||
# define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
||||
# define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
||||
# define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
||||
# define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
||||
# define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
||||
# define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
||||
# define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
||||
# define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
||||
# define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
||||
# define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
||||
# define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
||||
# define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
||||
# define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
||||
#define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
||||
#define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
||||
#define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
||||
#define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
||||
#define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
||||
#define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
||||
#define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
||||
#define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
||||
#define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
||||
#define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
||||
#define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
||||
#define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
||||
#define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
||||
#define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
||||
#define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
||||
#define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
||||
|
||||
/*-
|
||||
* PKIStatus ::= INTEGER {
|
||||
@@ -194,22 +196,22 @@ typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
||||
* -- CertReqMsg
|
||||
* }
|
||||
*/
|
||||
# define OSSL_CMP_PKISTATUS_request -3
|
||||
# define OSSL_CMP_PKISTATUS_trans -2
|
||||
# define OSSL_CMP_PKISTATUS_unspecified -1
|
||||
# define OSSL_CMP_PKISTATUS_accepted 0
|
||||
# define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
||||
# define OSSL_CMP_PKISTATUS_rejection 2
|
||||
# define OSSL_CMP_PKISTATUS_waiting 3
|
||||
# define OSSL_CMP_PKISTATUS_revocationWarning 4
|
||||
# define OSSL_CMP_PKISTATUS_revocationNotification 5
|
||||
# define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
||||
#define OSSL_CMP_PKISTATUS_request -3
|
||||
#define OSSL_CMP_PKISTATUS_trans -2
|
||||
#define OSSL_CMP_PKISTATUS_unspecified -1
|
||||
#define OSSL_CMP_PKISTATUS_accepted 0
|
||||
#define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
||||
#define OSSL_CMP_PKISTATUS_rejection 2
|
||||
#define OSSL_CMP_PKISTATUS_waiting 3
|
||||
#define OSSL_CMP_PKISTATUS_revocationWarning 4
|
||||
#define OSSL_CMP_PKISTATUS_revocationNotification 5
|
||||
#define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
||||
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
||||
|
||||
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
||||
|
||||
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
||||
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
||||
#define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
||||
#define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
||||
|
||||
/* data type declarations */
|
||||
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
||||
@@ -219,6 +221,7 @@ typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
||||
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
||||
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
||||
@@ -246,8 +249,10 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_
|
||||
#define sk_OSSL_CMP_CERTSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
||||
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
||||
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
||||
@@ -275,8 +280,10 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
||||
#define sk_OSSL_CMP_ITAV_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_ITAV_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_ITAV_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
||||
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
||||
@@ -304,21 +311,23 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CR
|
||||
#define sk_OSSL_CMP_CRLSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CRLSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CRLSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
||||
# define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
||||
#define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
||||
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
||||
# define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
||||
# define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
||||
# define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
||||
# define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
||||
# define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
||||
#define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
||||
#define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
||||
#define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
||||
#define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
||||
#define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
||||
|
||||
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
||||
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
||||
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
||||
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
||||
@@ -346,7 +355,9 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
||||
#define sk_OSSL_CMP_PKISI_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_PKISI_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_PKISI_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
||||
@@ -374,9 +385,11 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, O
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTREPMESSAGE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTREPMESSAGE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
||||
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
||||
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
||||
@@ -404,6 +417,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CMP_CERTRESPONSE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTRESPONSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
||||
|
||||
/*
|
||||
@@ -413,55 +427,55 @@ typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
||||
/* from cmp_asn.c */
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
||||
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
||||
ASN1_TYPE *value);
|
||||
ASN1_TYPE *value);
|
||||
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
||||
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
||||
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
||||
OSSL_CMP_ITAV *itav);
|
||||
OSSL_CMP_ITAV *itav);
|
||||
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
||||
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
||||
*certProfile);
|
||||
*certProfile);
|
||||
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
||||
STACK_OF(ASN1_UTF8STRING) **out);
|
||||
STACK_OF(ASN1_UTF8STRING) **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
||||
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
||||
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
||||
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
||||
const X509 *newWithOld,
|
||||
const X509 *oldWithNew);
|
||||
const X509 *newWithOld,
|
||||
const X509 *oldWithNew);
|
||||
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
||||
X509 **newWithNew,
|
||||
X509 **newWithOld,
|
||||
X509 **oldWithNew);
|
||||
X509 **newWithNew,
|
||||
X509 **newWithOld,
|
||||
X509 **oldWithNew);
|
||||
|
||||
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
||||
const X509 *cert, int only_DN);
|
||||
const X509 *cert, int only_DN);
|
||||
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
||||
const GENERAL_NAMES *issuer,
|
||||
const ASN1_TIME *thisUpdate);
|
||||
const GENERAL_NAMES *issuer,
|
||||
const ASN1_TIME *thisUpdate);
|
||||
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
||||
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
||||
ASN1_TIME **thisUpdate);
|
||||
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
||||
ASN1_TIME **thisUpdate);
|
||||
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
||||
OSSL_CMP_ITAV
|
||||
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
||||
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
||||
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
||||
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
||||
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
||||
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
||||
OSSL_CMP_ITAV
|
||||
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
||||
OSSL_CMP_ATAVS *keySpec);
|
||||
OSSL_CMP_ATAVS *keySpec);
|
||||
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
|
||||
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
||||
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
||||
ASN1_TYPE *value);
|
||||
ASN1_TYPE *value);
|
||||
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
||||
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
||||
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
||||
@@ -479,35 +493,35 @@ int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
||||
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
||||
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
||||
/* CMP general options: */
|
||||
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
||||
#define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
||||
/* CMP transfer options: */
|
||||
# define OSSL_CMP_OPT_KEEP_ALIVE 10
|
||||
# define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
||||
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
||||
# define OSSL_CMP_OPT_USE_TLS 13
|
||||
#define OSSL_CMP_OPT_KEEP_ALIVE 10
|
||||
#define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
||||
#define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
||||
#define OSSL_CMP_OPT_USE_TLS 13
|
||||
/* CMP request options: */
|
||||
# define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
||||
# define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
||||
# define OSSL_CMP_OPT_POPO_METHOD 24
|
||||
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
||||
# define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
||||
# define OSSL_CMP_OPT_REVOCATION_REASON 27
|
||||
#define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
||||
#define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
||||
#define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
||||
#define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
||||
#define OSSL_CMP_OPT_POPO_METHOD 24
|
||||
#define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
||||
#define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
||||
#define OSSL_CMP_OPT_REVOCATION_REASON 27
|
||||
/* CMP protection options: */
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
||||
# define OSSL_CMP_OPT_OWF_ALGNID 32
|
||||
# define OSSL_CMP_OPT_MAC_ALGNID 33
|
||||
# define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
||||
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
||||
# define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
||||
# define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
||||
#define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
||||
#define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
||||
#define OSSL_CMP_OPT_OWF_ALGNID 32
|
||||
#define OSSL_CMP_OPT_MAC_ALGNID 33
|
||||
#define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
||||
#define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
||||
#define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
||||
#define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
||||
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
||||
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
||||
/* CMP-specific callback for logging and outputting the error queue: */
|
||||
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
||||
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
#define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
||||
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
||||
/* message transfer: */
|
||||
@@ -516,13 +530,13 @@ int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
||||
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
||||
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
||||
# ifndef OPENSSL_NO_HTTP
|
||||
#ifndef OPENSSL_NO_HTTP
|
||||
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
# endif
|
||||
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
#endif
|
||||
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
@@ -530,28 +544,28 @@ void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
||||
# define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
||||
#define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
||||
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
||||
# define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
||||
#define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
||||
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
||||
/* client authentication: */
|
||||
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
||||
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
||||
STACK_OF(X509) *candidates);
|
||||
STACK_OF(X509) *candidates);
|
||||
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
||||
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
||||
const unsigned char *ref, int len);
|
||||
const unsigned char *ref, int len);
|
||||
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
||||
const unsigned char *sec, int len);
|
||||
const unsigned char *sec, int len);
|
||||
/* CMP message header and extra certificates: */
|
||||
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
||||
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(OSSL_CMP_ITAV)
|
||||
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
||||
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
||||
STACK_OF(X509) *extraCertsOut);
|
||||
STACK_OF(X509) *extraCertsOut);
|
||||
/* certificate template: */
|
||||
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
||||
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
||||
@@ -559,7 +573,7 @@ int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
||||
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
||||
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
||||
const GENERAL_NAME *name);
|
||||
const GENERAL_NAME *name);
|
||||
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
||||
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
||||
@@ -568,10 +582,10 @@ int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
||||
/* misc body contents: */
|
||||
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
||||
/* certificate confirmation: */
|
||||
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
int fail_info, const char **txt);
|
||||
typedef int (*OSSL_CMP_certConf_cb_t)(OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
int fail_info, const char **txt);
|
||||
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
||||
const char **text);
|
||||
const char **text);
|
||||
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
@@ -579,31 +593,30 @@ void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
||||
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
||||
# define OSSL_CMP_PKISI_BUFLEN 1024
|
||||
#define OSSL_CMP_PKISI_BUFLEN 1024
|
||||
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *id);
|
||||
const ASN1_OCTET_STRING *id);
|
||||
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
|
||||
/* from cmp_status.c */
|
||||
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
||||
size_t bufsize);
|
||||
size_t bufsize);
|
||||
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
||||
char *buf, size_t bufsize);
|
||||
char *buf, size_t bufsize);
|
||||
OSSL_CMP_PKISI *
|
||||
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
||||
|
||||
/* from cmp_hdr.c */
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const
|
||||
OSSL_CMP_PKIHEADER *hdr);
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
||||
STACK_OF(OSSL_CMP_ITAV)
|
||||
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
||||
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
||||
|
||||
/* from cmp_msg.c */
|
||||
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
||||
@@ -613,7 +626,7 @@ int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
||||
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
||||
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
||||
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
||||
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
||||
@@ -621,107 +634,106 @@ int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
||||
/* from cmp_vfy.c */
|
||||
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
||||
X509_STORE *trusted_store, X509 *cert);
|
||||
X509_STORE *trusted_store, X509 *cert);
|
||||
|
||||
/* from cmp_http.c */
|
||||
# ifndef OPENSSL_NO_HTTP
|
||||
#ifndef OPENSSL_NO_HTTP
|
||||
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
# endif
|
||||
const OSSL_CMP_MSG *req);
|
||||
#endif
|
||||
|
||||
/* from cmp_server.c */
|
||||
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
||||
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_MSG *OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
||||
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
||||
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
||||
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
||||
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
||||
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
||||
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const STACK_OF(OSSL_CMP_ITAV) *in,
|
||||
STACK_OF(OSSL_CMP_ITAV) **out);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const STACK_OF(OSSL_CMP_ITAV) *in,
|
||||
STACK_OF(OSSL_CMP_ITAV) **out);
|
||||
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const OSSL_CMP_PKISI *statusInfo,
|
||||
const ASN1_INTEGER *errorCode,
|
||||
const OSSL_CMP_PKIFREETEXT *errDetails);
|
||||
const OSSL_CMP_MSG *req,
|
||||
const OSSL_CMP_PKISI *statusInfo,
|
||||
const ASN1_INTEGER *errorCode,
|
||||
const OSSL_CMP_PKIFREETEXT *errDetails);
|
||||
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
int certReqId,
|
||||
const ASN1_OCTET_STRING *certHash,
|
||||
const OSSL_CMP_PKISI *si);
|
||||
const OSSL_CMP_MSG *req,
|
||||
int certReqId,
|
||||
const ASN1_OCTET_STRING *certHash,
|
||||
const OSSL_CMP_PKISI *si);
|
||||
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
OSSL_CMP_MSG **certReq,
|
||||
int64_t *check_after);
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
OSSL_CMP_MSG **certReq,
|
||||
int64_t *check_after);
|
||||
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
||||
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
||||
OSSL_CMP_SRV_rr_cb_t process_rr,
|
||||
OSSL_CMP_SRV_genm_cb_t process_genm,
|
||||
OSSL_CMP_SRV_error_cb_t process_error,
|
||||
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
||||
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
||||
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
||||
OSSL_CMP_SRV_rr_cb_t process_rr,
|
||||
OSSL_CMP_SRV_genm_cb_t process_genm,
|
||||
OSSL_CMP_SRV_error_cb_t process_error,
|
||||
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
||||
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
||||
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
const OSSL_CMP_MSG *req);
|
||||
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const ASN1_OCTET_STRING *id);
|
||||
const ASN1_OCTET_STRING *id);
|
||||
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
||||
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
||||
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
||||
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
||||
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
int val);
|
||||
|
||||
/* from cmp_client.c */
|
||||
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
||||
const OSSL_CRMF_MSG *crm);
|
||||
# define OSSL_CMP_IR 0
|
||||
# define OSSL_CMP_CR 2
|
||||
# define OSSL_CMP_P10CR 4
|
||||
# define OSSL_CMP_KUR 7
|
||||
# define OSSL_CMP_GENM 21
|
||||
# define OSSL_CMP_ERROR 23
|
||||
# define OSSL_CMP_exec_IR_ses(ctx) \
|
||||
const OSSL_CRMF_MSG *crm);
|
||||
#define OSSL_CMP_IR 0
|
||||
#define OSSL_CMP_CR 2
|
||||
#define OSSL_CMP_P10CR 4
|
||||
#define OSSL_CMP_KUR 7
|
||||
#define OSSL_CMP_GENM 21
|
||||
#define OSSL_CMP_ERROR 23
|
||||
#define OSSL_CMP_exec_IR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
||||
# define OSSL_CMP_exec_CR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_CR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
||||
# define OSSL_CMP_exec_P10CR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_P10CR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
||||
# define OSSL_CMP_exec_KUR_ses(ctx) \
|
||||
#define OSSL_CMP_exec_KUR_ses(ctx) \
|
||||
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
||||
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
||||
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
||||
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
||||
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
||||
|
||||
/* from cmp_genm.c */
|
||||
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
||||
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
||||
const X509 *oldWithOld, X509 **newWithNew,
|
||||
X509 **newWithOld, X509 **oldWithNew);
|
||||
const X509 *oldWithOld, X509 **newWithNew,
|
||||
X509 **newWithOld, X509 **oldWithNew);
|
||||
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
||||
const X509_CRL *last_crl,
|
||||
X509_CRL **crl);
|
||||
const X509_CRL *last_crl,
|
||||
X509_CRL **crl);
|
||||
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
||||
OSSL_CMP_ATAVS **keySpec);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif /* !defined(OPENSSL_CMP_H) */
|
||||
|
||||
@@ -10,26 +10,28 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CMS_H
|
||||
# define OPENSSL_CMS_H
|
||||
# pragma once
|
||||
#define OPENSSL_CMS_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CMS_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CMS_H
|
||||
#endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
# include <openssl/cmserr.h>
|
||||
# ifdef __cplusplus
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/cmserr.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
||||
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
||||
@@ -43,6 +45,7 @@ typedef struct CMS_Receipt_st CMS_Receipt;
|
||||
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
||||
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
||||
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
||||
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
||||
@@ -148,6 +151,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice,
|
||||
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
||||
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
||||
@@ -159,44 +163,44 @@ DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
||||
|
||||
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
# define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
||||
# define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
||||
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
||||
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
||||
|
||||
# define CMS_RECIPINFO_NONE -1
|
||||
# define CMS_RECIPINFO_TRANS 0
|
||||
# define CMS_RECIPINFO_AGREE 1
|
||||
# define CMS_RECIPINFO_KEK 2
|
||||
# define CMS_RECIPINFO_PASS 3
|
||||
# define CMS_RECIPINFO_OTHER 4
|
||||
#define CMS_RECIPINFO_NONE -1
|
||||
#define CMS_RECIPINFO_TRANS 0
|
||||
#define CMS_RECIPINFO_AGREE 1
|
||||
#define CMS_RECIPINFO_KEK 2
|
||||
#define CMS_RECIPINFO_PASS 3
|
||||
#define CMS_RECIPINFO_OTHER 4
|
||||
|
||||
/* S/MIME related flags */
|
||||
|
||||
# define CMS_TEXT 0x1
|
||||
# define CMS_NOCERTS 0x2
|
||||
# define CMS_NO_CONTENT_VERIFY 0x4
|
||||
# define CMS_NO_ATTR_VERIFY 0x8
|
||||
# define CMS_NOSIGS \
|
||||
(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
|
||||
# define CMS_NOINTERN 0x10
|
||||
# define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
||||
# define CMS_NOVERIFY 0x20
|
||||
# define CMS_DETACHED 0x40
|
||||
# define CMS_BINARY 0x80
|
||||
# define CMS_NOATTR 0x100
|
||||
# define CMS_NOSMIMECAP 0x200
|
||||
# define CMS_NOOLDMIMETYPE 0x400
|
||||
# define CMS_CRLFEOL 0x800
|
||||
# define CMS_STREAM 0x1000
|
||||
# define CMS_NOCRL 0x2000
|
||||
# define CMS_PARTIAL 0x4000
|
||||
# define CMS_REUSE_DIGEST 0x8000
|
||||
# define CMS_USE_KEYID 0x10000
|
||||
# define CMS_DEBUG_DECRYPT 0x20000
|
||||
# define CMS_KEY_PARAM 0x40000
|
||||
# define CMS_ASCIICRLF 0x80000
|
||||
# define CMS_CADES 0x100000
|
||||
# define CMS_USE_ORIGINATOR_KEYID 0x200000
|
||||
# define CMS_NO_SIGNING_TIME 0x400000
|
||||
#define CMS_TEXT 0x1
|
||||
#define CMS_NOCERTS 0x2
|
||||
#define CMS_NO_CONTENT_VERIFY 0x4
|
||||
#define CMS_NO_ATTR_VERIFY 0x8
|
||||
#define CMS_NOSIGS \
|
||||
(CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
|
||||
#define CMS_NOINTERN 0x10
|
||||
#define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
||||
#define CMS_NOVERIFY 0x20
|
||||
#define CMS_DETACHED 0x40
|
||||
#define CMS_BINARY 0x80
|
||||
#define CMS_NOATTR 0x100
|
||||
#define CMS_NOSMIMECAP 0x200
|
||||
#define CMS_NOOLDMIMETYPE 0x400
|
||||
#define CMS_CRLFEOL 0x800
|
||||
#define CMS_STREAM 0x1000
|
||||
#define CMS_NOCRL 0x2000
|
||||
#define CMS_PARTIAL 0x4000
|
||||
#define CMS_REUSE_DIGEST 0x8000
|
||||
#define CMS_USE_KEYID 0x10000
|
||||
#define CMS_DEBUG_DECRYPT 0x20000
|
||||
#define CMS_KEY_PARAM 0x40000
|
||||
#define CMS_ASCIICRLF 0x80000
|
||||
#define CMS_CADES 0x100000
|
||||
#define CMS_USE_ORIGINATOR_KEYID 0x200000
|
||||
#define CMS_NO_SIGNING_TIME 0x400000
|
||||
|
||||
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
||||
|
||||
@@ -207,9 +211,9 @@ ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
||||
int CMS_is_detached(CMS_ContentInfo *cms);
|
||||
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
||||
|
||||
# ifdef OPENSSL_PEM_H
|
||||
#ifdef OPENSSL_PEM_H
|
||||
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
||||
# endif
|
||||
#endif
|
||||
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
||||
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
||||
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
||||
@@ -217,83 +221,83 @@ int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
||||
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
||||
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
||||
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
||||
int flags);
|
||||
int flags);
|
||||
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
||||
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
||||
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
||||
|
||||
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
int CMS_final_digest(CMS_ContentInfo *cms,
|
||||
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
||||
unsigned int flags);
|
||||
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
||||
unsigned int flags);
|
||||
|
||||
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags);
|
||||
STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
STACK_OF(X509) *certs, BIO *data,
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
||||
X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, unsigned int flags);
|
||||
X509 *signcert, EVP_PKEY *pkey,
|
||||
STACK_OF(X509) *certs, unsigned int flags);
|
||||
|
||||
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
unsigned int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
||||
const unsigned char *key, size_t keylen,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
const unsigned char *key, size_t keylen,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags);
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const unsigned char *key,
|
||||
size_t keylen, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
||||
const unsigned char *key, size_t keylen);
|
||||
const unsigned char *key, size_t keylen);
|
||||
|
||||
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
||||
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
||||
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
||||
STACK_OF(X509) *certs,
|
||||
X509_STORE *store, unsigned int flags);
|
||||
STACK_OF(X509) *certs,
|
||||
X509_STORE *store, unsigned int flags);
|
||||
|
||||
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
||||
|
||||
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags);
|
||||
const EVP_CIPHER *cipher, unsigned int flags);
|
||||
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
const EVP_CIPHER *cipher, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
BIO *dcont, BIO *out, unsigned int flags);
|
||||
|
||||
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
||||
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
||||
X509 *cert, X509 *peer);
|
||||
X509 *cert, X509 *peer);
|
||||
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
||||
unsigned char *key, size_t keylen,
|
||||
const unsigned char *id, size_t idlen);
|
||||
unsigned char *key, size_t keylen,
|
||||
const unsigned char *id, size_t idlen);
|
||||
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
||||
unsigned char *pass, ossl_ssize_t passlen);
|
||||
unsigned char *pass, ossl_ssize_t passlen);
|
||||
|
||||
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
||||
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
||||
@@ -301,66 +305,66 @@ EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
||||
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
||||
CMS_ContentInfo *
|
||||
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
||||
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
||||
EVP_PKEY *pkey, X509 *cert,
|
||||
ASN1_OCTET_STRING *secret, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
EVP_PKEY *pkey, X509 *cert,
|
||||
ASN1_OCTET_STRING *secret, unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
||||
X509 *recip, unsigned int flags);
|
||||
X509 *recip, unsigned int flags);
|
||||
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
||||
EVP_PKEY *originatorPrivKey, X509 * originator, unsigned int flags);
|
||||
EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
|
||||
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
||||
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
||||
EVP_PKEY **pk, X509 **recip,
|
||||
X509_ALGOR **palg);
|
||||
EVP_PKEY **pk, X509 **recip,
|
||||
X509_ALGOR **palg);
|
||||
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
|
||||
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
||||
unsigned char *key, size_t keylen,
|
||||
unsigned char *id, size_t idlen,
|
||||
ASN1_GENERALIZEDTIME *date,
|
||||
ASN1_OBJECT *otherTypeId,
|
||||
ASN1_TYPE *otherType);
|
||||
unsigned char *key, size_t keylen,
|
||||
unsigned char *id, size_t idlen,
|
||||
ASN1_GENERALIZEDTIME *date,
|
||||
ASN1_OBJECT *otherTypeId,
|
||||
ASN1_TYPE *otherType);
|
||||
|
||||
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
ASN1_GENERALIZEDTIME **pdate,
|
||||
ASN1_OBJECT **potherid,
|
||||
ASN1_TYPE **pothertype);
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
ASN1_GENERALIZEDTIME **pdate,
|
||||
ASN1_OBJECT **potherid,
|
||||
ASN1_TYPE **pothertype);
|
||||
|
||||
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
||||
unsigned char *key, size_t keylen);
|
||||
unsigned char *key, size_t keylen);
|
||||
|
||||
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
||||
const unsigned char *id, size_t idlen);
|
||||
const unsigned char *id, size_t idlen);
|
||||
|
||||
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen);
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen);
|
||||
|
||||
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
||||
int iter, int wrap_nid,
|
||||
int pbe_nid,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen,
|
||||
const EVP_CIPHER *kekciph);
|
||||
int iter, int wrap_nid,
|
||||
int pbe_nid,
|
||||
unsigned char *pass,
|
||||
ossl_ssize_t passlen,
|
||||
const EVP_CIPHER *kekciph);
|
||||
|
||||
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
||||
|
||||
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
||||
|
||||
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
||||
@@ -378,77 +382,77 @@ STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
||||
|
||||
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
||||
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
||||
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
||||
unsigned int flags);
|
||||
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
||||
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
||||
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
||||
|
||||
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
||||
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
||||
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
||||
unsigned int flags);
|
||||
unsigned int flags);
|
||||
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
||||
X509 **signer, X509_ALGOR **pdig,
|
||||
X509_ALGOR **psig);
|
||||
X509 **signer, X509_ALGOR **pdig,
|
||||
X509_ALGOR **psig);
|
||||
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
||||
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
||||
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
||||
STACK_OF(X509) *scerts, X509_STORE *store,
|
||||
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
||||
unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
STACK_OF(X509) *scerts, X509_STORE *store,
|
||||
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
||||
unsigned int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
|
||||
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
||||
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
||||
int algnid, int keysize);
|
||||
int algnid, int keysize);
|
||||
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
||||
|
||||
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
||||
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
||||
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
||||
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
||||
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
const ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
|
||||
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
||||
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int lastpos);
|
||||
const ASN1_OBJECT *obj, int lastpos);
|
||||
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
||||
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
||||
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
||||
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
const ASN1_OBJECT *obj, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int nid, int type,
|
||||
const void *bytes, int len);
|
||||
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
const char *attrname, int type,
|
||||
const void *bytes, int len);
|
||||
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
||||
int lastpos, int type);
|
||||
int lastpos, int type);
|
||||
|
||||
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
||||
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
||||
@@ -463,49 +467,49 @@ CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
||||
|
||||
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
||||
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
||||
ASN1_STRING **pcid,
|
||||
int *pallorfirst,
|
||||
STACK_OF(GENERAL_NAMES) **plist,
|
||||
STACK_OF(GENERAL_NAMES) **prto);
|
||||
ASN1_STRING **pcid,
|
||||
int *pallorfirst,
|
||||
STACK_OF(GENERAL_NAMES) **plist,
|
||||
STACK_OF(GENERAL_NAMES) **prto);
|
||||
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pukm);
|
||||
X509_ALGOR **palg,
|
||||
ASN1_OCTET_STRING **pukm);
|
||||
STACK_OF(CMS_RecipientEncryptedKey)
|
||||
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
||||
|
||||
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
||||
X509_ALGOR **pubalg,
|
||||
ASN1_BIT_STRING **pubkey,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
X509_ALGOR **pubalg,
|
||||
ASN1_BIT_STRING **pubkey,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
X509_NAME **issuer,
|
||||
ASN1_INTEGER **sno);
|
||||
|
||||
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
||||
|
||||
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
ASN1_GENERALIZEDTIME **tm,
|
||||
CMS_OtherKeyAttribute **other,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
ASN1_OCTET_STRING **keyid,
|
||||
ASN1_GENERALIZEDTIME **tm,
|
||||
CMS_OtherKeyAttribute **other,
|
||||
X509_NAME **issuer, ASN1_INTEGER **sno);
|
||||
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
||||
X509 *cert);
|
||||
X509 *cert);
|
||||
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
||||
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
||||
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
||||
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
||||
CMS_RecipientInfo *ri,
|
||||
CMS_RecipientEncryptedKey *rek);
|
||||
CMS_RecipientInfo *ri,
|
||||
CMS_RecipientEncryptedKey *rek);
|
||||
|
||||
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
||||
ASN1_OCTET_STRING *ukm, int keylen);
|
||||
ASN1_OCTET_STRING *ukm, int keylen);
|
||||
|
||||
/* Backward compatibility for spelling errors. */
|
||||
# define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
||||
# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
||||
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
||||
#define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
||||
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,40 +7,40 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_COMP_H
|
||||
# define OPENSSL_COMP_H
|
||||
# pragma once
|
||||
#define OPENSSL_COMP_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_COMP_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_COMP_H
|
||||
#endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/comperr.h>
|
||||
# ifdef __cplusplus
|
||||
#include <openssl/crypto.h>
|
||||
#include <openssl/comperr.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
# ifndef OPENSSL_NO_COMP
|
||||
#ifndef OPENSSL_NO_COMP
|
||||
|
||||
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
||||
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
||||
int COMP_CTX_get_type(const COMP_CTX* comp);
|
||||
int COMP_CTX_get_type(const COMP_CTX *comp);
|
||||
int COMP_get_type(const COMP_METHOD *meth);
|
||||
const char *COMP_get_name(const COMP_METHOD *meth);
|
||||
void COMP_CTX_free(COMP_CTX *ctx);
|
||||
|
||||
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
||||
unsigned char *in, int ilen);
|
||||
unsigned char *in, int ilen);
|
||||
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
||||
unsigned char *in, int ilen);
|
||||
unsigned char *in, int ilen);
|
||||
|
||||
COMP_METHOD *COMP_zlib(void);
|
||||
COMP_METHOD *COMP_zlib_oneshot(void);
|
||||
@@ -49,20 +49,23 @@ COMP_METHOD *COMP_brotli_oneshot(void);
|
||||
COMP_METHOD *COMP_zstd(void);
|
||||
COMP_METHOD *COMP_zstd_oneshot(void);
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define COMP_zlib_cleanup() while(0) continue
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define COMP_zlib_cleanup() \
|
||||
while (0) \
|
||||
continue
|
||||
#endif
|
||||
|
||||
# ifdef OPENSSL_BIO_H
|
||||
#ifdef OPENSSL_BIO_H
|
||||
const BIO_METHOD *BIO_f_zlib(void);
|
||||
const BIO_METHOD *BIO_f_brotli(void);
|
||||
const BIO_METHOD *BIO_f_zstd(void);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
typedef struct ssl_comp_st SSL_COMP;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
||||
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
||||
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
||||
@@ -90,9 +93,9 @@ SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
||||
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
||||
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,28 +10,30 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CONF_H
|
||||
# define OPENSSL_CONF_H
|
||||
# pragma once
|
||||
#ifndef OPENSSL_CONF_H
|
||||
#define OPENSSL_CONF_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CONF_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CONF_H
|
||||
#endif
|
||||
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/lhash.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/conferr.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/e_os2.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/conferr.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
@@ -41,6 +43,7 @@ typedef struct {
|
||||
char *value;
|
||||
} CONF_VALUE;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
||||
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
||||
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
||||
@@ -83,14 +86,15 @@ DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
||||
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
||||
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
struct conf_st;
|
||||
struct conf_method_st;
|
||||
typedef struct conf_method_st CONF_METHOD;
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# include <openssl/conftypes.h>
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#include <openssl/conftypes.h>
|
||||
#endif
|
||||
|
||||
/* Module definitions */
|
||||
typedef struct conf_imodule_st CONF_IMODULE;
|
||||
@@ -100,32 +104,32 @@ STACK_OF(CONF_MODULE);
|
||||
STACK_OF(CONF_IMODULE);
|
||||
|
||||
/* DSO module function typedefs */
|
||||
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
|
||||
typedef void conf_finish_func (CONF_IMODULE *md);
|
||||
typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
|
||||
typedef void conf_finish_func(CONF_IMODULE *md);
|
||||
|
||||
# define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
||||
# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
||||
# define CONF_MFLAGS_SILENT 0x4
|
||||
# define CONF_MFLAGS_NO_DSO 0x8
|
||||
# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
||||
# define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
||||
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
||||
#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
||||
#define CONF_MFLAGS_SILENT 0x4
|
||||
#define CONF_MFLAGS_NO_DSO 0x8
|
||||
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
||||
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
||||
|
||||
int CONF_set_default_method(CONF_METHOD *meth);
|
||||
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
||||
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
||||
long *eline);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
long *eline);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
||||
long *eline);
|
||||
# endif
|
||||
long *eline);
|
||||
#endif
|
||||
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
||||
long *eline);
|
||||
long *eline);
|
||||
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
||||
const char *section);
|
||||
const char *section);
|
||||
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
const char *name);
|
||||
const char *name);
|
||||
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
||||
const char *name);
|
||||
const char *name);
|
||||
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
||||
@@ -136,7 +140,7 @@ OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
||||
#endif
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OPENSSL_no_config() \
|
||||
#define OPENSSL_no_config() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
||||
#endif
|
||||
|
||||
@@ -156,38 +160,40 @@ void NCONF_free(CONF *conf);
|
||||
void NCONF_free_data(CONF *conf);
|
||||
|
||||
int NCONF_load(CONF *conf, const char *file, long *eline);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
||||
# endif
|
||||
#endif
|
||||
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
||||
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
||||
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
||||
const char *section);
|
||||
const char *section);
|
||||
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
||||
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
||||
long *result);
|
||||
long *result);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
||||
#endif
|
||||
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
||||
|
||||
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
|
||||
#define NCONF_get_number(c, g, n, r) NCONF_get_number_e(c, g, n, r)
|
||||
|
||||
/* Module functions */
|
||||
|
||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
||||
const char *appname, unsigned long flags);
|
||||
const char *appname, unsigned long flags);
|
||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
void CONF_modules_unload(int all);
|
||||
void CONF_modules_finish(void);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define CONF_modules_free() while(0) continue
|
||||
#define CONF_modules_free() \
|
||||
while (0) \
|
||||
continue
|
||||
#endif
|
||||
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
||||
conf_finish_func *ffunc);
|
||||
conf_finish_func *ffunc);
|
||||
|
||||
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
||||
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
||||
@@ -202,13 +208,12 @@ void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
||||
char *CONF_get1_default_config_file(void);
|
||||
|
||||
int CONF_parse_list(const char *list, int sep, int nospc,
|
||||
int (*list_cb) (const char *elem, int len, void *usr),
|
||||
void *arg);
|
||||
int (*list_cb)(const char *elem, int len, void *usr),
|
||||
void *arg);
|
||||
|
||||
void OPENSSL_load_builtin_modules(void);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -12,21 +12,22 @@
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_CONFIGURATION_H
|
||||
# define OPENSSL_CONFIGURATION_H
|
||||
# pragma once
|
||||
#define OPENSSL_CONFIGURATION_H
|
||||
#pragma once
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef OPENSSL_ALGORITHM_DEFINES
|
||||
# error OPENSSL_ALGORITHM_DEFINES no longer supported
|
||||
# endif
|
||||
#ifdef OPENSSL_ALGORITHM_DEFINES
|
||||
#error OPENSSL_ALGORITHM_DEFINES no longer supported
|
||||
#endif
|
||||
|
||||
/*
|
||||
* OpenSSL was configured with the following options:
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
# define OPENSSL_CONFIGURED_API 30500
|
||||
# ifndef OPENSSL_RAND_SEED_OS
|
||||
# define OPENSSL_RAND_SEED_OS
|
||||
@@ -164,34 +165,47 @@ extern "C" {
|
||||
# define OPENSSL_NO_STATIC_ENGINE
|
||||
# endif
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* Generate 80386 code? */
|
||||
/* clang-format off */
|
||||
# undef I386_ONLY
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* The following are cipher-specific, but are part of the public API.
|
||||
*/
|
||||
# if !defined(OPENSSL_SYS_UEFI)
|
||||
#if !defined(OPENSSL_SYS_UEFI)
|
||||
/* clang-format off */
|
||||
# undef BN_LLONG
|
||||
/* Only one for the following should be defined */
|
||||
/* clang-format on */
|
||||
/* Only one for the following should be defined */
|
||||
/* clang-format off */
|
||||
# define SIXTY_FOUR_BIT_LONG
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# undef SIXTY_FOUR_BIT
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# undef THIRTY_TWO_BIT
|
||||
# endif
|
||||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
/* clang-format off */
|
||||
# define RC4_INT unsigned int
|
||||
/* clang-format on */
|
||||
|
||||
# if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
||||
# define OPENSSL_NO_COMP_ALG
|
||||
# else
|
||||
# undef OPENSSL_NO_COMP_ALG
|
||||
# endif
|
||||
#if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
||||
#define OPENSSL_NO_COMP_ALG
|
||||
#else
|
||||
#undef OPENSSL_NO_COMP_ALG
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
|
||||
/**
|
||||
* OpenSSL's Configure script generates these values automatically for the host
|
||||
|
||||
@@ -9,113 +9,116 @@
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CORE_NAMES_H
|
||||
# define OPENSSL_CORE_NAMES_H
|
||||
# pragma once
|
||||
#define OPENSSL_CORE_NAMES_H
|
||||
#pragma once
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* OSSL_CIPHER_PARAM_CTS_MODE Values */
|
||||
# define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
||||
# define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
||||
# define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
||||
#define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
||||
#define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
||||
#define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
||||
|
||||
/* Known CIPHER names (not a complete list) */
|
||||
# define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
||||
# define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
||||
# define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
||||
#define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
||||
#define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
||||
#define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
||||
|
||||
/* Known DIGEST names (not a complete list) */
|
||||
# define OSSL_DIGEST_NAME_MD5 "MD5"
|
||||
# define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
||||
# define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
||||
# define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
||||
# define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
||||
# define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
||||
# define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
||||
# define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
||||
# define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
||||
# define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
||||
# define OSSL_DIGEST_NAME_MD2 "MD2"
|
||||
# define OSSL_DIGEST_NAME_MD4 "MD4"
|
||||
# define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
||||
# define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
||||
# define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
||||
# define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
||||
# define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
||||
# define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
||||
# define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
||||
# define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
||||
# define OSSL_DIGEST_NAME_SM3 "SM3"
|
||||
#define OSSL_DIGEST_NAME_MD5 "MD5"
|
||||
#define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
||||
#define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
||||
#define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
||||
#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
||||
#define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
||||
#define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
||||
#define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
||||
#define OSSL_DIGEST_NAME_MD2 "MD2"
|
||||
#define OSSL_DIGEST_NAME_MD4 "MD4"
|
||||
#define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
||||
#define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
||||
#define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
||||
#define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
||||
#define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
||||
#define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
||||
#define OSSL_DIGEST_NAME_SM3 "SM3"
|
||||
|
||||
/* Known MAC names */
|
||||
# define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
||||
# define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
||||
# define OSSL_MAC_NAME_CMAC "CMAC"
|
||||
# define OSSL_MAC_NAME_GMAC "GMAC"
|
||||
# define OSSL_MAC_NAME_HMAC "HMAC"
|
||||
# define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
||||
# define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
||||
# define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
||||
# define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
||||
#define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
||||
#define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
||||
#define OSSL_MAC_NAME_CMAC "CMAC"
|
||||
#define OSSL_MAC_NAME_GMAC "GMAC"
|
||||
#define OSSL_MAC_NAME_HMAC "HMAC"
|
||||
#define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
||||
#define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
||||
#define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
||||
#define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
||||
|
||||
/* Known KDF names */
|
||||
# define OSSL_KDF_NAME_HKDF "HKDF"
|
||||
# define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
||||
# define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
||||
# define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
||||
# define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
||||
# define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
||||
# define OSSL_KDF_NAME_SSKDF "SSKDF"
|
||||
# define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
||||
# define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
||||
# define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
||||
# define OSSL_KDF_NAME_X963KDF "X963KDF"
|
||||
# define OSSL_KDF_NAME_KBKDF "KBKDF"
|
||||
# define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
||||
# define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
||||
#define OSSL_KDF_NAME_HKDF "HKDF"
|
||||
#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
||||
#define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
||||
#define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
||||
#define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
||||
#define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
||||
#define OSSL_KDF_NAME_SSKDF "SSKDF"
|
||||
#define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
||||
#define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
||||
#define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
||||
#define OSSL_KDF_NAME_X963KDF "X963KDF"
|
||||
#define OSSL_KDF_NAME_KBKDF "KBKDF"
|
||||
#define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
||||
#define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
||||
|
||||
/* RSA padding modes */
|
||||
# define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
||||
# define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
||||
# define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
||||
# define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
||||
# define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
||||
#define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
||||
|
||||
/* RSA pss padding salt length */
|
||||
# define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
||||
# define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
||||
# define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
||||
# define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
||||
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
||||
|
||||
/* OSSL_PKEY_PARAM_EC_ENCODING values */
|
||||
# define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
||||
# define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
||||
#define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
||||
#define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
||||
|
||||
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
||||
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
||||
# define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
||||
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
||||
|
||||
# define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
||||
# define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
||||
# define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
||||
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
||||
|
||||
/* PROV_SKEY well known key types */
|
||||
# define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
||||
# define OSSL_SKEY_TYPE_AES "AES"
|
||||
#define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
||||
#define OSSL_SKEY_TYPE_AES "AES"
|
||||
|
||||
/* OSSL_KEM_PARAM_OPERATION values */
|
||||
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
||||
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
||||
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
||||
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
||||
|
||||
/* Provider configuration variables */
|
||||
#define OSSL_PKEY_RETAIN_SEED "pkey_retain_seed"
|
||||
#define OSSL_PKEY_RETAIN_SEED "pkey_retain_seed"
|
||||
|
||||
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
||||
/* clang-format off */
|
||||
# define OSSL_ALG_PARAM_ALGORITHM_ID "algorithm-id"
|
||||
# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
|
||||
# define OSSL_ALG_PARAM_CIPHER "cipher"
|
||||
@@ -567,9 +570,10 @@ extern "C" {
|
||||
# define OSSL_STORE_PARAM_PROPERTIES "properties"
|
||||
# define OSSL_STORE_PARAM_SERIAL "serial"
|
||||
# define OSSL_STORE_PARAM_SUBJECT "subject"
|
||||
/* clang-format on */
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,36 +14,38 @@
|
||||
* CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb.
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CRMF_H
|
||||
# define OPENSSL_CRMF_H
|
||||
#define OPENSSL_CRMF_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_CRMF
|
||||
# include <openssl/opensslv.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/crmferr.h>
|
||||
# include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
||||
# include <openssl/cms.h>
|
||||
#ifndef OPENSSL_NO_CRMF
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/crmferr.h>
|
||||
#include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
||||
#include <openssl/cms.h>
|
||||
|
||||
/* explicit #includes not strictly needed since implied by the above: */
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/x509.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/x509.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
||||
# define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
||||
# define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
||||
# define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
||||
# define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
||||
#define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
||||
#define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
||||
#define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
||||
#define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
||||
#define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
||||
|
||||
# define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
||||
# define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
||||
#define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
||||
#define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
||||
typedef struct ossl_crmf_encryptedvalue_st OSSL_CRMF_ENCRYPTEDVALUE;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
|
||||
|
||||
@@ -53,6 +55,7 @@ DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDKEY)
|
||||
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
||||
#define sk_OSSL_CRMF_MSG_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_MSG_value(sk, idx) ((OSSL_CRMF_MSG *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), (idx)))
|
||||
@@ -80,9 +83,11 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
||||
#define sk_OSSL_CRMF_MSG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_MSG_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_MSG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
|
||||
void OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(OSSL_CRMF_ATTRIBUTETYPEANDVALUE *v);
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value(sk, idx) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx)))
|
||||
@@ -110,6 +115,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUT
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
|
||||
@@ -118,6 +124,7 @@ typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
|
||||
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID)
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTID)
|
||||
#define sk_OSSL_CRMF_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
||||
#define sk_OSSL_CRMF_CERTID_value(sk, idx) ((OSSL_CRMF_CERTID *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), (idx)))
|
||||
@@ -145,6 +152,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTI
|
||||
#define sk_OSSL_CRMF_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_copyfunc_type(copyfunc), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_CRMF_CERTID_set_cmp_func(sk, cmp) ((sk_OSSL_CRMF_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
|
||||
@@ -160,119 +168,112 @@ typedef struct ossl_crmf_optionalvalidity_st OSSL_CRMF_OPTIONALVALIDITY;
|
||||
|
||||
/* crmf_pbm.c */
|
||||
OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OSSL_LIB_CTX *libctx, size_t slen,
|
||||
int owfnid, size_t itercnt,
|
||||
int macnid);
|
||||
int owfnid, size_t itercnt,
|
||||
int macnid);
|
||||
int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq,
|
||||
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
||||
const unsigned char *msg, size_t msglen,
|
||||
const unsigned char *sec, size_t seclen,
|
||||
unsigned char **mac, size_t *maclen);
|
||||
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
||||
const unsigned char *msg, size_t msglen,
|
||||
const unsigned char *sec, size_t seclen,
|
||||
unsigned char **mac, size_t *maclen);
|
||||
|
||||
/* crmf_lib.c */
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *tok);
|
||||
const ASN1_UTF8STRING *tok);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *auth);
|
||||
const ASN1_UTF8STRING *auth);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
|
||||
int
|
||||
OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
OSSL_CRMF_SINGLEPUBINFO *spi);
|
||||
# define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
||||
# define OSSL_CRMF_PUB_METHOD_X500 1
|
||||
# define OSSL_CRMF_PUB_METHOD_WEB 2
|
||||
# define OSSL_CRMF_PUB_METHOD_LDAP 3
|
||||
int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
OSSL_CRMF_SINGLEPUBINFO *spi);
|
||||
#define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
||||
#define OSSL_CRMF_PUB_METHOD_X500 1
|
||||
#define OSSL_CRMF_PUB_METHOD_WEB 2
|
||||
#define OSSL_CRMF_PUB_METHOD_LDAP 3
|
||||
int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
|
||||
int method, GENERAL_NAME *nm);
|
||||
# define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
||||
# define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
||||
int method, GENERAL_NAME *nm);
|
||||
#define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
||||
#define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
||||
int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
||||
int action);
|
||||
int action);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
||||
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
||||
OSSL_CRMF_PKIPUBLICATIONINFO
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
|
||||
const X509_PUBKEY *pubkey);
|
||||
const X509_PUBKEY *pubkey);
|
||||
X509_PUBKEY
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_CERTID *cid);
|
||||
const OSSL_CRMF_CERTID *cid);
|
||||
OSSL_CRMF_CERTID
|
||||
*OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
|
||||
OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
const ASN1_INTEGER *serial);
|
||||
|
||||
int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg,
|
||||
const ASN1_UTF8STRING *utf8pairs);
|
||||
const ASN1_UTF8STRING *utf8pairs);
|
||||
ASN1_UTF8STRING
|
||||
*OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg);
|
||||
int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
|
||||
const OSSL_CRMF_CERTREQUEST *cr);
|
||||
const OSSL_CRMF_CERTREQUEST *cr);
|
||||
OSSL_CRMF_CERTREQUEST
|
||||
*OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg);
|
||||
|
||||
int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
|
||||
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
||||
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
||||
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
|
||||
int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
|
||||
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
|
||||
|
||||
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
|
||||
# define OSSL_CRMF_POPO_NONE -1
|
||||
# define OSSL_CRMF_POPO_RAVERIFIED 0
|
||||
# define OSSL_CRMF_POPO_SIGNATURE 1
|
||||
# define OSSL_CRMF_POPO_KEYENC 2
|
||||
# define OSSL_CRMF_POPO_KEYAGREE 3
|
||||
#define OSSL_CRMF_POPO_NONE -1
|
||||
#define OSSL_CRMF_POPO_RAVERIFIED 0
|
||||
#define OSSL_CRMF_POPO_SIGNATURE 1
|
||||
#define OSSL_CRMF_POPO_KEYENC 2
|
||||
#define OSSL_CRMF_POPO_KEYAGREE 3
|
||||
int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
|
||||
EVP_PKEY *pkey, const EVP_MD *digest,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
EVP_PKEY *pkey, const EVP_MD *digest,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
|
||||
int rid, int acceptRAVerified,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int rid, int acceptRAVerified,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
|
||||
X509_PUBKEY
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const ASN1_INTEGER
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const ASN1_INTEGER *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
X509_EXTENSIONS
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
const ASN1_INTEGER
|
||||
*OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
||||
const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
const ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
||||
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
|
||||
EVP_PKEY *pubkey,
|
||||
const X509_NAME *subject,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
EVP_PKEY *pubkey,
|
||||
const X509_NAME *subject,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey);
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey);
|
||||
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, unsigned int flags);
|
||||
unsigned char
|
||||
*OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, int *outlen);
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, unsigned int flags);
|
||||
unsigned char *OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
|
||||
OSSL_LIB_CTX *libctx, const char *propq,
|
||||
EVP_PKEY *pkey, int *outlen);
|
||||
EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
|
||||
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
|
||||
X509 *cert, ASN1_OCTET_STRING *secret,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
|
||||
X509 *cert, ASN1_OCTET_STRING *secret,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int OSSL_CRMF_MSG_centralkeygen_requested(const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr);
|
||||
# ifndef OPENSSL_NO_CMS
|
||||
#ifndef OPENSSL_NO_CMS
|
||||
OSSL_CRMF_ENCRYPTEDKEY *OSSL_CRMF_ENCRYPTEDKEY_init_envdata(CMS_EnvelopedData *envdata);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined(OPENSSL_NO_CRMF) */
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_CRMF) */
|
||||
#endif /* !defined(OPENSSL_CRMF_H) */
|
||||
|
||||
@@ -11,60 +11,62 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CRYPTO_H
|
||||
# define OPENSSL_CRYPTO_H
|
||||
# pragma once
|
||||
#define OPENSSL_CRYPTO_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CRYPTO_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CRYPTO_H
|
||||
#endif
|
||||
|
||||
# include <stdlib.h>
|
||||
# include <time.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/opensslv.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/cryptoerr.h>
|
||||
# include <openssl/core.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/opensslv.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/cryptoerr.h>
|
||||
#include <openssl/core.h>
|
||||
|
||||
# ifdef CHARSET_EBCDIC
|
||||
# include <openssl/ebcdic.h>
|
||||
# endif
|
||||
#ifdef CHARSET_EBCDIC
|
||||
#include <openssl/ebcdic.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Resolve problems on some operating systems with symbol names that clash
|
||||
* one way or another
|
||||
*/
|
||||
# include <openssl/symhacks.h>
|
||||
#include <openssl/symhacks.h>
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/opensslv.h>
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#include <openssl/opensslv.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSLeay OpenSSL_version_num
|
||||
# define SSLeay_version OpenSSL_version
|
||||
# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
# define SSLEAY_VERSION OPENSSL_VERSION
|
||||
# define SSLEAY_CFLAGS OPENSSL_CFLAGS
|
||||
# define SSLEAY_BUILT_ON OPENSSL_BUILT_ON
|
||||
# define SSLEAY_PLATFORM OPENSSL_PLATFORM
|
||||
# define SSLEAY_DIR OPENSSL_DIR
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define SSLeay OpenSSL_version_num
|
||||
#define SSLeay_version OpenSSL_version
|
||||
#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
#define SSLEAY_VERSION OPENSSL_VERSION
|
||||
#define SSLEAY_CFLAGS OPENSSL_CFLAGS
|
||||
#define SSLEAY_BUILT_ON OPENSSL_BUILT_ON
|
||||
#define SSLEAY_PLATFORM OPENSSL_PLATFORM
|
||||
#define SSLEAY_DIR OPENSSL_DIR
|
||||
|
||||
/*
|
||||
* Old type for allocating dynamic locks. No longer used. Use the new thread
|
||||
@@ -74,7 +76,7 @@ typedef struct {
|
||||
int dummy;
|
||||
} CRYPTO_dynlock;
|
||||
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
typedef void CRYPTO_RWLOCK;
|
||||
|
||||
@@ -86,66 +88,68 @@ void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
|
||||
|
||||
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_add64(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_and(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
|
||||
CRYPTO_RWLOCK *lock);
|
||||
CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
|
||||
int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock);
|
||||
|
||||
/* No longer needed, so this is a no-op */
|
||||
#define OPENSSL_malloc_init() while(0) continue
|
||||
#define OPENSSL_malloc_init() \
|
||||
while (0) \
|
||||
continue
|
||||
|
||||
# define OPENSSL_malloc(num) \
|
||||
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_zalloc(num) \
|
||||
CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_aligned_alloc(num, alignment, freeptr) \
|
||||
CRYPTO_aligned_alloc(num, alignment, freeptr, \
|
||||
OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_realloc(addr, num) \
|
||||
CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_clear_realloc(addr, old_num, num) \
|
||||
CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_clear_free(addr, num) \
|
||||
CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_free(addr) \
|
||||
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_memdup(str, s) \
|
||||
CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_strdup(str) \
|
||||
CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_strndup(str, n) \
|
||||
CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_malloc(num) \
|
||||
CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_zalloc(num) \
|
||||
CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_free(addr) \
|
||||
CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_clear_free(addr, num) \
|
||||
CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_secure_actual_size(ptr) \
|
||||
CRYPTO_secure_actual_size(ptr)
|
||||
#define OPENSSL_malloc(num) \
|
||||
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_zalloc(num) \
|
||||
CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_aligned_alloc(num, alignment, freeptr) \
|
||||
CRYPTO_aligned_alloc(num, alignment, freeptr, \
|
||||
OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_realloc(addr, num) \
|
||||
CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_clear_realloc(addr, old_num, num) \
|
||||
CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_clear_free(addr, num) \
|
||||
CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_free(addr) \
|
||||
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_memdup(str, s) \
|
||||
CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_strdup(str) \
|
||||
CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_strndup(str, n) \
|
||||
CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_malloc(num) \
|
||||
CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_zalloc(num) \
|
||||
CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_free(addr) \
|
||||
CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_clear_free(addr, num) \
|
||||
CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_secure_actual_size(ptr) \
|
||||
CRYPTO_secure_actual_size(ptr)
|
||||
|
||||
size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz);
|
||||
size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz);
|
||||
size_t OPENSSL_strnlen(const char *str, size_t maxlen);
|
||||
int OPENSSL_strtoul(const char *str, char **endptr, int base, unsigned long *num);
|
||||
int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlength,
|
||||
const unsigned char *buf, size_t buflen,
|
||||
const char sep);
|
||||
const unsigned char *buf, size_t buflen,
|
||||
const char sep);
|
||||
char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
|
||||
int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
|
||||
const char *str, const char sep);
|
||||
const char *str, const char sep);
|
||||
unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
|
||||
int OPENSSL_hexchar2int(unsigned char c);
|
||||
int OPENSSL_strcasecmp(const char *s1, const char *s2);
|
||||
int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
|
||||
|
||||
# define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
|
||||
#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
|
||||
|
||||
/*
|
||||
* These functions return the values of OPENSSL_VERSION_MAJOR,
|
||||
@@ -160,32 +164,32 @@ const char *OPENSSL_version_build_metadata(void);
|
||||
|
||||
unsigned long OpenSSL_version_num(void);
|
||||
const char *OpenSSL_version(int type);
|
||||
# define OPENSSL_VERSION 0
|
||||
# define OPENSSL_CFLAGS 1
|
||||
# define OPENSSL_BUILT_ON 2
|
||||
# define OPENSSL_PLATFORM 3
|
||||
# define OPENSSL_DIR 4
|
||||
# define OPENSSL_ENGINES_DIR 5
|
||||
# define OPENSSL_VERSION_STRING 6
|
||||
# define OPENSSL_FULL_VERSION_STRING 7
|
||||
# define OPENSSL_MODULES_DIR 8
|
||||
# define OPENSSL_CPU_INFO 9
|
||||
# define OPENSSL_WINCTX 10
|
||||
#define OPENSSL_VERSION 0
|
||||
#define OPENSSL_CFLAGS 1
|
||||
#define OPENSSL_BUILT_ON 2
|
||||
#define OPENSSL_PLATFORM 3
|
||||
#define OPENSSL_DIR 4
|
||||
#define OPENSSL_ENGINES_DIR 5
|
||||
#define OPENSSL_VERSION_STRING 6
|
||||
#define OPENSSL_FULL_VERSION_STRING 7
|
||||
#define OPENSSL_MODULES_DIR 8
|
||||
#define OPENSSL_CPU_INFO 9
|
||||
#define OPENSSL_WINCTX 10
|
||||
|
||||
const char *OPENSSL_info(int type);
|
||||
/*
|
||||
* The series starts at 1001 to avoid confusion with the OpenSSL_version
|
||||
* types.
|
||||
*/
|
||||
# define OPENSSL_INFO_CONFIG_DIR 1001
|
||||
# define OPENSSL_INFO_ENGINES_DIR 1002
|
||||
# define OPENSSL_INFO_MODULES_DIR 1003
|
||||
# define OPENSSL_INFO_DSO_EXTENSION 1004
|
||||
# define OPENSSL_INFO_DIR_FILENAME_SEPARATOR 1005
|
||||
# define OPENSSL_INFO_LIST_SEPARATOR 1006
|
||||
# define OPENSSL_INFO_SEED_SOURCE 1007
|
||||
# define OPENSSL_INFO_CPU_SETTINGS 1008
|
||||
# define OPENSSL_INFO_WINDOWS_CONTEXT 1009
|
||||
#define OPENSSL_INFO_CONFIG_DIR 1001
|
||||
#define OPENSSL_INFO_ENGINES_DIR 1002
|
||||
#define OPENSSL_INFO_MODULES_DIR 1003
|
||||
#define OPENSSL_INFO_DSO_EXTENSION 1004
|
||||
#define OPENSSL_INFO_DIR_FILENAME_SEPARATOR 1005
|
||||
#define OPENSSL_INFO_LIST_SEPARATOR 1006
|
||||
#define OPENSSL_INFO_SEED_SOURCE 1007
|
||||
#define OPENSSL_INFO_CPU_SETTINGS 1008
|
||||
#define OPENSSL_INFO_WINDOWS_CONTEXT 1009
|
||||
|
||||
int OPENSSL_issetugid(void);
|
||||
|
||||
@@ -194,6 +198,7 @@ struct crypto_ex_data_st {
|
||||
STACK_OF(void) *sk;
|
||||
};
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(void, void, void)
|
||||
#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
|
||||
#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
|
||||
@@ -221,42 +226,42 @@ SKM_DEFINE_STACK_OF_INTERNAL(void, void, void)
|
||||
#define sk_void_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(void) *)OPENSSL_sk_deep_copy(ossl_check_const_void_sk_type(sk), ossl_check_void_copyfunc_type(copyfunc), ossl_check_void_freefunc_type(freefunc)))
|
||||
#define sk_void_set_cmp_func(sk, cmp) ((sk_void_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_void_sk_type(sk), ossl_check_void_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* Per class, we have a STACK of function pointers.
|
||||
*/
|
||||
# define CRYPTO_EX_INDEX_SSL 0
|
||||
# define CRYPTO_EX_INDEX_SSL_CTX 1
|
||||
# define CRYPTO_EX_INDEX_SSL_SESSION 2
|
||||
# define CRYPTO_EX_INDEX_X509 3
|
||||
# define CRYPTO_EX_INDEX_X509_STORE 4
|
||||
# define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
||||
# define CRYPTO_EX_INDEX_DH 6
|
||||
# define CRYPTO_EX_INDEX_DSA 7
|
||||
# define CRYPTO_EX_INDEX_EC_KEY 8
|
||||
# define CRYPTO_EX_INDEX_RSA 9
|
||||
# define CRYPTO_EX_INDEX_ENGINE 10
|
||||
# define CRYPTO_EX_INDEX_UI 11
|
||||
# define CRYPTO_EX_INDEX_BIO 12
|
||||
# define CRYPTO_EX_INDEX_APP 13
|
||||
# define CRYPTO_EX_INDEX_UI_METHOD 14
|
||||
# define CRYPTO_EX_INDEX_RAND_DRBG 15
|
||||
# define CRYPTO_EX_INDEX_DRBG CRYPTO_EX_INDEX_RAND_DRBG
|
||||
# define CRYPTO_EX_INDEX_OSSL_LIB_CTX 16
|
||||
# define CRYPTO_EX_INDEX_EVP_PKEY 17
|
||||
# define CRYPTO_EX_INDEX__COUNT 18
|
||||
#define CRYPTO_EX_INDEX_SSL 0
|
||||
#define CRYPTO_EX_INDEX_SSL_CTX 1
|
||||
#define CRYPTO_EX_INDEX_SSL_SESSION 2
|
||||
#define CRYPTO_EX_INDEX_X509 3
|
||||
#define CRYPTO_EX_INDEX_X509_STORE 4
|
||||
#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
||||
#define CRYPTO_EX_INDEX_DH 6
|
||||
#define CRYPTO_EX_INDEX_DSA 7
|
||||
#define CRYPTO_EX_INDEX_EC_KEY 8
|
||||
#define CRYPTO_EX_INDEX_RSA 9
|
||||
#define CRYPTO_EX_INDEX_ENGINE 10
|
||||
#define CRYPTO_EX_INDEX_UI 11
|
||||
#define CRYPTO_EX_INDEX_BIO 12
|
||||
#define CRYPTO_EX_INDEX_APP 13
|
||||
#define CRYPTO_EX_INDEX_UI_METHOD 14
|
||||
#define CRYPTO_EX_INDEX_RAND_DRBG 15
|
||||
#define CRYPTO_EX_INDEX_DRBG CRYPTO_EX_INDEX_RAND_DRBG
|
||||
#define CRYPTO_EX_INDEX_OSSL_LIB_CTX 16
|
||||
#define CRYPTO_EX_INDEX_EVP_PKEY 17
|
||||
#define CRYPTO_EX_INDEX__COUNT 18
|
||||
|
||||
typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_free (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef int CRYPTO_EX_dup (CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
|
||||
void **from_d, int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
|
||||
void **from_d, int idx, long argl, void *argp);
|
||||
__owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
CRYPTO_EX_new *new_func,
|
||||
CRYPTO_EX_dup *dup_func,
|
||||
CRYPTO_EX_free *free_func);
|
||||
/* No longer use an index. */
|
||||
int CRYPTO_free_ex_index(int class_index, int idx);
|
||||
|
||||
@@ -266,13 +271,13 @@ int CRYPTO_free_ex_index(int class_index, int idx);
|
||||
*/
|
||||
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
|
||||
const CRYPTO_EX_DATA *from);
|
||||
const CRYPTO_EX_DATA *from);
|
||||
|
||||
void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
||||
|
||||
/* Allocate a single item in the CRYPTO_EX_DATA variable */
|
||||
int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
|
||||
int idx);
|
||||
int idx);
|
||||
|
||||
/*
|
||||
* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
|
||||
@@ -281,12 +286,14 @@ int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
|
||||
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
|
||||
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* This function cleans up all "ex_data" state. It mustn't be called under
|
||||
* potential race-conditions.
|
||||
*/
|
||||
# define CRYPTO_cleanup_all_ex_data() while(0) continue
|
||||
#define CRYPTO_cleanup_all_ex_data() \
|
||||
while (0) \
|
||||
continue
|
||||
|
||||
/*
|
||||
* The old locking functions have been removed completely without compatibility
|
||||
@@ -298,66 +305,66 @@ void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
* On the other hand, the locking callbacks are no longer used. Consequently,
|
||||
* the callback management functions can be safely replaced with no-op macros.
|
||||
*/
|
||||
# define CRYPTO_num_locks() (1)
|
||||
# define CRYPTO_set_locking_callback(func)
|
||||
# define CRYPTO_get_locking_callback() (NULL)
|
||||
# define CRYPTO_set_add_lock_callback(func)
|
||||
# define CRYPTO_get_add_lock_callback() (NULL)
|
||||
#define CRYPTO_num_locks() (1)
|
||||
#define CRYPTO_set_locking_callback(func)
|
||||
#define CRYPTO_get_locking_callback() (NULL)
|
||||
#define CRYPTO_set_add_lock_callback(func)
|
||||
#define CRYPTO_get_add_lock_callback() (NULL)
|
||||
|
||||
/*
|
||||
* These defines where used in combination with the old locking callbacks,
|
||||
* they are not called anymore, but old code that's not called might still
|
||||
* use them.
|
||||
*/
|
||||
# define CRYPTO_LOCK 1
|
||||
# define CRYPTO_UNLOCK 2
|
||||
# define CRYPTO_READ 4
|
||||
# define CRYPTO_WRITE 8
|
||||
#define CRYPTO_LOCK 1
|
||||
#define CRYPTO_UNLOCK 2
|
||||
#define CRYPTO_READ 4
|
||||
#define CRYPTO_WRITE 8
|
||||
|
||||
/* This structure is no longer used */
|
||||
typedef struct crypto_threadid_st {
|
||||
int dummy;
|
||||
} CRYPTO_THREADID;
|
||||
/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
|
||||
# define CRYPTO_THREADID_set_numeric(id, val)
|
||||
# define CRYPTO_THREADID_set_pointer(id, ptr)
|
||||
# define CRYPTO_THREADID_set_callback(threadid_func) (0)
|
||||
# define CRYPTO_THREADID_get_callback() (NULL)
|
||||
# define CRYPTO_THREADID_current(id)
|
||||
# define CRYPTO_THREADID_cmp(a, b) (-1)
|
||||
# define CRYPTO_THREADID_cpy(dest, src)
|
||||
# define CRYPTO_THREADID_hash(id) (0UL)
|
||||
#define CRYPTO_THREADID_set_numeric(id, val)
|
||||
#define CRYPTO_THREADID_set_pointer(id, ptr)
|
||||
#define CRYPTO_THREADID_set_callback(threadid_func) (0)
|
||||
#define CRYPTO_THREADID_get_callback() (NULL)
|
||||
#define CRYPTO_THREADID_current(id)
|
||||
#define CRYPTO_THREADID_cmp(a, b) (-1)
|
||||
#define CRYPTO_THREADID_cpy(dest, src)
|
||||
#define CRYPTO_THREADID_hash(id) (0UL)
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
||||
# define CRYPTO_set_id_callback(func)
|
||||
# define CRYPTO_get_id_callback() (NULL)
|
||||
# define CRYPTO_thread_id() (0UL)
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
||||
#define CRYPTO_set_id_callback(func)
|
||||
#define CRYPTO_get_id_callback() (NULL)
|
||||
#define CRYPTO_thread_id() (0UL)
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
|
||||
|
||||
# define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
||||
# define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
||||
# define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function)
|
||||
# define CRYPTO_get_dynlock_create_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_lock_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
#define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
||||
#define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
||||
#define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function)
|
||||
#define CRYPTO_get_dynlock_create_callback() (NULL)
|
||||
#define CRYPTO_get_dynlock_lock_callback() (NULL)
|
||||
#define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
||||
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
|
||||
typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
|
||||
int line);
|
||||
int line);
|
||||
typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
|
||||
int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
|
||||
CRYPTO_realloc_fn realloc_fn,
|
||||
CRYPTO_free_fn free_fn);
|
||||
CRYPTO_realloc_fn realloc_fn,
|
||||
CRYPTO_free_fn free_fn);
|
||||
void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
|
||||
CRYPTO_realloc_fn *realloc_fn,
|
||||
CRYPTO_free_fn *free_fn);
|
||||
CRYPTO_realloc_fn *realloc_fn,
|
||||
CRYPTO_free_fn *free_fn);
|
||||
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_malloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_zalloc(size_t num, const char *file, int line);
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_aligned_alloc(size_t num, size_t align,
|
||||
void **freeptr, const char *file,
|
||||
int line);
|
||||
void **freeptr, const char *file,
|
||||
int line);
|
||||
void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line);
|
||||
char *CRYPTO_strdup(const char *str, const char *file, int line);
|
||||
char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
|
||||
@@ -365,7 +372,7 @@ void CRYPTO_free(void *ptr, const char *file, int line);
|
||||
void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line);
|
||||
void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
|
||||
void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
|
||||
int CRYPTO_secure_malloc_init(size_t sz, size_t minsize);
|
||||
int CRYPTO_secure_malloc_done(void);
|
||||
@@ -373,7 +380,7 @@ OSSL_CRYPTO_ALLOC void *CRYPTO_secure_malloc(size_t num, const char *file, int l
|
||||
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
|
||||
void CRYPTO_secure_free(void *ptr, const char *file, int line);
|
||||
void CRYPTO_secure_clear_free(void *ptr, size_t num,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
int CRYPTO_secure_allocated(const void *ptr);
|
||||
int CRYPTO_secure_malloc_initialized(void);
|
||||
size_t CRYPTO_secure_actual_size(void *ptr);
|
||||
@@ -381,77 +388,77 @@ size_t CRYPTO_secure_used(void);
|
||||
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
/*
|
||||
* The following can be used to detect memory leaks in the library. If
|
||||
* used, it turns on malloc checking
|
||||
*/
|
||||
# define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */
|
||||
# define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */
|
||||
# define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */
|
||||
# define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */
|
||||
#define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */
|
||||
#define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */
|
||||
#define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */
|
||||
#define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */
|
||||
|
||||
/* max allowed length for value of OPENSSL_MALLOC_FAILURES env var. */
|
||||
# define CRYPTO_MEM_CHECK_MAX_FS 256
|
||||
#define CRYPTO_MEM_CHECK_MAX_FS 256
|
||||
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define OPENSSL_mem_debug_push(info) \
|
||||
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_mem_debug_pop() \
|
||||
CRYPTO_mem_debug_pop()
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define OPENSSL_mem_debug_push(info) \
|
||||
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
||||
#define OPENSSL_mem_debug_pop() \
|
||||
CRYPTO_mem_debug_pop()
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_set_mem_debug(int flag);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_ctrl(int mode);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_push(const char *info,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_pop(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_malloc(void *addr, size_t num,
|
||||
int flag,
|
||||
const char *file, int line);
|
||||
int flag,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_realloc(void *addr1, void *addr2,
|
||||
size_t num, int flag,
|
||||
const char *file, int line);
|
||||
size_t num, int flag,
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_free(void *addr, int flag,
|
||||
const char *file, int line);
|
||||
const char *file, int line);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
void *u);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks_fp(FILE *);
|
||||
# endif
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks(BIO *bio);
|
||||
# endif
|
||||
# endif /* OPENSSL_NO_CRYPTO_MDEBUG */
|
||||
#endif
|
||||
#endif /* OPENSSL_NO_CRYPTO_MDEBUG */
|
||||
|
||||
/* die if we have to */
|
||||
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
|
||||
# endif
|
||||
# define OPENSSL_assert(e) \
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define OpenSSLDie(f, l, a) OPENSSL_die((a), (f), (l))
|
||||
#endif
|
||||
#define OPENSSL_assert(e) \
|
||||
(void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
|
||||
|
||||
int OPENSSL_isservice(void);
|
||||
|
||||
void OPENSSL_init(void);
|
||||
# ifdef OPENSSL_SYS_UNIX
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifdef OPENSSL_SYS_UNIX
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_prepare(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_parent(void);
|
||||
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_child(void);
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
|
||||
int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
|
||||
int OPENSSL_gmtime_diff(int *pday, int *psec,
|
||||
const struct tm *from, const struct tm *to);
|
||||
const struct tm *from, const struct tm *to);
|
||||
|
||||
/*
|
||||
* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
|
||||
@@ -460,29 +467,29 @@ int OPENSSL_gmtime_diff(int *pday, int *psec,
|
||||
* into a defined order as the return value when a != b is undefined, other
|
||||
* than to be non-zero.
|
||||
*/
|
||||
int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
|
||||
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len);
|
||||
|
||||
/* Standard initialisation options */
|
||||
# define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
|
||||
# define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
|
||||
# define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
|
||||
# define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
|
||||
# define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
|
||||
# define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
|
||||
# define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
|
||||
# define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
|
||||
# define OPENSSL_INIT_ASYNC 0x00000100L
|
||||
# define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
|
||||
# define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
|
||||
# define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
|
||||
# define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
|
||||
# define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
|
||||
# define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
|
||||
# define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
|
||||
#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
|
||||
#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
|
||||
#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
|
||||
#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
|
||||
#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
|
||||
#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
|
||||
#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
|
||||
#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
|
||||
#define OPENSSL_INIT_ASYNC 0x00000100L
|
||||
#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
|
||||
#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
|
||||
#define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
|
||||
#define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
|
||||
#define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
|
||||
#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
|
||||
#define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
|
||||
/* FREE: 0x00010000L */
|
||||
# define OPENSSL_INIT_ATFORK 0x00020000L
|
||||
#define OPENSSL_INIT_ATFORK 0x00020000L
|
||||
/* OPENSSL_INIT_BASE_ONLY 0x00040000L */
|
||||
# define OPENSSL_INIT_NO_ATEXIT 0x00080000L
|
||||
#define OPENSSL_INIT_NO_ATEXIT 0x00080000L
|
||||
/* OPENSSL_INIT flag range 0x03f00000 reserved for OPENSSL_init_ssl() */
|
||||
/* FREE: 0x04000000L */
|
||||
/* FREE: 0x08000000L */
|
||||
@@ -493,10 +500,9 @@ int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len);
|
||||
/* Max OPENSSL_INIT flag value is 0x80000000 */
|
||||
|
||||
/* openssl and dasync not counted as builtin */
|
||||
# define OPENSSL_INIT_ENGINE_ALL_BUILTIN \
|
||||
#define OPENSSL_INIT_ENGINE_ALL_BUILTIN \
|
||||
(OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
|
||||
| OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | \
|
||||
OPENSSL_INIT_ENGINE_PADLOCK)
|
||||
| OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
|
||||
|
||||
/* Library initialisation functions */
|
||||
void OPENSSL_cleanup(void);
|
||||
@@ -507,48 +513,48 @@ void OPENSSL_thread_stop_ex(OSSL_LIB_CTX *ctx);
|
||||
|
||||
/* Low-level control of initialization */
|
||||
OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
|
||||
const char *config_filename);
|
||||
const char *config_filename);
|
||||
void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
|
||||
const char *config_appname);
|
||||
# endif
|
||||
const char *config_appname);
|
||||
#endif
|
||||
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
|
||||
|
||||
# if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
||||
# if defined(_WIN32)
|
||||
# if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
#if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
||||
#if defined(_WIN32)
|
||||
#if defined(BASETYPES) || defined(_WINDEF_H)
|
||||
/* application has to include <windows.h> in order to use this */
|
||||
typedef DWORD CRYPTO_THREAD_LOCAL;
|
||||
typedef DWORD CRYPTO_THREAD_ID;
|
||||
|
||||
typedef LONG CRYPTO_ONCE;
|
||||
# define CRYPTO_ONCE_STATIC_INIT 0
|
||||
# endif
|
||||
# else
|
||||
# if defined(__TANDEM) && defined(_SPT_MODEL_)
|
||||
# define SPT_THREAD_SIGNAL 1
|
||||
# define SPT_THREAD_AWARE 1
|
||||
# include <spthread.h>
|
||||
# else
|
||||
# include <pthread.h>
|
||||
# endif
|
||||
#define CRYPTO_ONCE_STATIC_INIT 0
|
||||
#endif
|
||||
#else
|
||||
#if defined(__TANDEM) && defined(_SPT_MODEL_)
|
||||
#define SPT_THREAD_SIGNAL 1
|
||||
#define SPT_THREAD_AWARE 1
|
||||
#include <spthread.h>
|
||||
#else
|
||||
#include <pthread.h>
|
||||
#endif
|
||||
typedef pthread_once_t CRYPTO_ONCE;
|
||||
typedef pthread_key_t CRYPTO_THREAD_LOCAL;
|
||||
typedef pthread_t CRYPTO_THREAD_ID;
|
||||
|
||||
# define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT
|
||||
# endif
|
||||
# endif
|
||||
#define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# if !defined(CRYPTO_ONCE_STATIC_INIT)
|
||||
#if !defined(CRYPTO_ONCE_STATIC_INIT)
|
||||
typedef unsigned int CRYPTO_ONCE;
|
||||
typedef unsigned int CRYPTO_THREAD_LOCAL;
|
||||
typedef unsigned int CRYPTO_THREAD_ID;
|
||||
# define CRYPTO_ONCE_STATIC_INIT 0
|
||||
# endif
|
||||
#define CRYPTO_ONCE_STATIC_INIT 0
|
||||
#endif
|
||||
|
||||
int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void));
|
||||
|
||||
@@ -562,9 +568,9 @@ int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
|
||||
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new(void);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new_from_dispatch(const OSSL_CORE_HANDLE *handle,
|
||||
const OSSL_DISPATCH *in);
|
||||
const OSSL_DISPATCH *in);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_new_child(const OSSL_CORE_HANDLE *handle,
|
||||
const OSSL_DISPATCH *in);
|
||||
const OSSL_DISPATCH *in);
|
||||
int OSSL_LIB_CTX_load_config(OSSL_LIB_CTX *ctx, const char *config_file);
|
||||
void OSSL_LIB_CTX_free(OSSL_LIB_CTX *);
|
||||
OSSL_LIB_CTX *OSSL_LIB_CTX_get0_global_default(void);
|
||||
@@ -574,10 +580,9 @@ void OSSL_LIB_CTX_set_conf_diagnostics(OSSL_LIB_CTX *ctx, int value);
|
||||
|
||||
void OSSL_sleep(uint64_t millis);
|
||||
|
||||
|
||||
void *OSSL_LIB_CTX_get_data(OSSL_LIB_CTX *ctx, int index);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,35 +10,37 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_CT_H
|
||||
# define OPENSSL_CT_H
|
||||
# pragma once
|
||||
#define OPENSSL_CT_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CT_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_CT_H
|
||||
#endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_CT
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/cterr.h>
|
||||
# ifdef __cplusplus
|
||||
#ifndef OPENSSL_NO_CT
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/cterr.h>
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
/* Minimum RSA key size, from RFC6962 */
|
||||
# define SCT_MIN_RSA_BITS 2048
|
||||
#define SCT_MIN_RSA_BITS 2048
|
||||
|
||||
/* All hashes are SHA256 in v1 of Certificate Transparency */
|
||||
# define CT_V1_HASHLEN SHA256_DIGEST_LENGTH
|
||||
#define CT_V1_HASHLEN SHA256_DIGEST_LENGTH
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SCT, SCT, SCT)
|
||||
#define sk_SCT_num(sk) OPENSSL_sk_num(ossl_check_const_SCT_sk_type(sk))
|
||||
#define sk_SCT_value(sk, idx) ((SCT *)OPENSSL_sk_value(ossl_check_const_SCT_sk_type(sk), (idx)))
|
||||
@@ -92,7 +94,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(CTLOG, CTLOG, CTLOG)
|
||||
#define sk_CTLOG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CTLOG) *)OPENSSL_sk_deep_copy(ossl_check_const_CTLOG_sk_type(sk), ossl_check_CTLOG_copyfunc_type(copyfunc), ossl_check_CTLOG_freefunc_type(freefunc)))
|
||||
#define sk_CTLOG_set_cmp_func(sk, cmp) ((sk_CTLOG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef enum {
|
||||
CT_LOG_ENTRY_TYPE_NOT_SET = -1,
|
||||
@@ -132,7 +134,7 @@ typedef enum {
|
||||
* with the CT_POLICY_EVAL_CTX.
|
||||
*/
|
||||
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CT_POLICY_EVAL_CTX_new_ex() but the default library
|
||||
@@ -144,7 +146,7 @@ CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
|
||||
void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
|
||||
|
||||
/* Gets the peer certificate that the SCTs are for */
|
||||
X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
|
||||
X509 *CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
|
||||
|
||||
/*
|
||||
* Sets the certificate associated with the received SCTs.
|
||||
@@ -154,7 +156,7 @@ X509* CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
|
||||
int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
|
||||
|
||||
/* Gets the issuer of the aforementioned certificate */
|
||||
X509* CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
|
||||
X509 *CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
|
||||
|
||||
/*
|
||||
* Sets the issuer of the certificate associated with the received SCTs.
|
||||
@@ -168,7 +170,7 @@ const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *c
|
||||
|
||||
/* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */
|
||||
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
|
||||
CTLOG_STORE *log_store);
|
||||
CTLOG_STORE *log_store);
|
||||
|
||||
/*
|
||||
* Gets the time, in milliseconds since the Unix epoch, that will be used as the
|
||||
@@ -200,11 +202,11 @@ SCT *SCT_new(void);
|
||||
* The caller is responsible for calling SCT_free when finished with the SCT.
|
||||
*/
|
||||
SCT *SCT_new_from_base64(unsigned char version,
|
||||
const char *logid_base64,
|
||||
ct_log_entry_type_t entry_type,
|
||||
uint64_t timestamp,
|
||||
const char *extensions_base64,
|
||||
const char *signature_base64);
|
||||
const char *logid_base64,
|
||||
ct_log_entry_type_t entry_type,
|
||||
uint64_t timestamp,
|
||||
const char *extensions_base64,
|
||||
const char *signature_base64);
|
||||
|
||||
/*
|
||||
* Frees the SCT and the underlying data structures.
|
||||
@@ -259,7 +261,7 @@ __owur int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len);
|
||||
* Returns 1 on success, 0 otherwise.
|
||||
*/
|
||||
__owur int SCT_set1_log_id(SCT *sct, const unsigned char *log_id,
|
||||
size_t log_id_len);
|
||||
size_t log_id_len);
|
||||
|
||||
/*
|
||||
* Returns the timestamp for the SCT (epoch time in milliseconds).
|
||||
@@ -305,7 +307,7 @@ void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len);
|
||||
* Returns 1 on success, 0 otherwise.
|
||||
*/
|
||||
__owur int SCT_set1_extensions(SCT *sct, const unsigned char *ext,
|
||||
size_t ext_len);
|
||||
size_t ext_len);
|
||||
|
||||
/*
|
||||
* Set *sig to point to the signature for the SCT. sig must not be NULL.
|
||||
@@ -325,7 +327,7 @@ void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len);
|
||||
* Returns 1 on success, 0 otherwise.
|
||||
*/
|
||||
__owur int SCT_set1_signature(SCT *sct, const unsigned char *sig,
|
||||
size_t sig_len);
|
||||
size_t sig_len);
|
||||
|
||||
/*
|
||||
* The origin of this SCT, e.g. TLS extension, OCSP response, etc.
|
||||
@@ -359,7 +361,7 @@ void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs);
|
||||
* came from, so that the log names can be printed.
|
||||
*/
|
||||
void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent,
|
||||
const char *separator, const CTLOG_STORE *logs);
|
||||
const char *separator, const CTLOG_STORE *logs);
|
||||
|
||||
/*
|
||||
* Gets the last result of validating this SCT.
|
||||
@@ -384,8 +386,7 @@ __owur int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
|
||||
* Returns a negative integer if an error occurs.
|
||||
*/
|
||||
__owur int SCT_LIST_validate(const STACK_OF(SCT) *scts,
|
||||
CT_POLICY_EVAL_CTX *ctx);
|
||||
|
||||
CT_POLICY_EVAL_CTX *ctx);
|
||||
|
||||
/*********************************
|
||||
* SCT parsing and serialization *
|
||||
@@ -416,7 +417,7 @@ __owur int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
||||
* not defined.
|
||||
*/
|
||||
STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
||||
size_t len);
|
||||
size_t len);
|
||||
|
||||
/*
|
||||
* Serialize (to DER format) a stack of SCTs and return the length.
|
||||
@@ -443,7 +444,7 @@ __owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
||||
* not defined.
|
||||
*/
|
||||
STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
||||
long len);
|
||||
long len);
|
||||
|
||||
/*
|
||||
* Serialize (to TLS format) an |sct| and write it to |out|.
|
||||
@@ -482,7 +483,7 @@ SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
|
||||
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
||||
*/
|
||||
CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CTLOG_new_ex except that the default library context and
|
||||
@@ -499,16 +500,16 @@ CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
|
||||
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
||||
*/
|
||||
int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
|
||||
const char *name, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *name, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CTLOG_new_from_base64_ex() except that the default
|
||||
* library context and property query string are used.
|
||||
* Returns 1 on success, 0 on failure.
|
||||
*/
|
||||
int CTLOG_new_from_base64(CTLOG ** ct_log,
|
||||
const char *pkey_base64, const char *name);
|
||||
int CTLOG_new_from_base64(CTLOG **ct_log,
|
||||
const char *pkey_base64, const char *name);
|
||||
|
||||
/*
|
||||
* Deletes a CT log instance and its fields.
|
||||
@@ -519,7 +520,7 @@ void CTLOG_free(CTLOG *log);
|
||||
const char *CTLOG_get0_name(const CTLOG *log);
|
||||
/* Gets the ID of the CT log */
|
||||
void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
|
||||
size_t *log_id_len);
|
||||
size_t *log_id_len);
|
||||
/* Gets the public key of the CT log */
|
||||
EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
|
||||
|
||||
@@ -551,8 +552,8 @@ void CTLOG_STORE_free(CTLOG_STORE *store);
|
||||
* Returns the CT log, or NULL if no match is found.
|
||||
*/
|
||||
const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
|
||||
const uint8_t *log_id,
|
||||
size_t log_id_len);
|
||||
const uint8_t *log_id,
|
||||
size_t log_id_len);
|
||||
|
||||
/*
|
||||
* Loads a CT log list into a |store| from a |file|.
|
||||
@@ -566,8 +567,8 @@ __owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
|
||||
*/
|
||||
__owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -7,52 +7,54 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_ERR_H
|
||||
# define OPENSSL_ERR_H
|
||||
# pragma once
|
||||
#define OPENSSL_ERR_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ERR_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_ERR_H
|
||||
#endif
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#endif
|
||||
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/lhash.h>
|
||||
# include <openssl/cryptoerr_legacy.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/lhash.h>
|
||||
#include <openssl/cryptoerr_legacy.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# ifndef OPENSSL_NO_FILENAMES
|
||||
# define ERR_PUT_error(l,f,r,fn,ln) ERR_put_error(l,f,r,fn,ln)
|
||||
# else
|
||||
# define ERR_PUT_error(l,f,r,fn,ln) ERR_put_error(l,f,r,NULL,0)
|
||||
# endif
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_FILENAMES
|
||||
#define ERR_PUT_error(l, f, r, fn, ln) ERR_put_error(l, f, r, fn, ln)
|
||||
#else
|
||||
#define ERR_PUT_error(l, f, r, fn, ln) ERR_put_error(l, f, r, NULL, 0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# include <limits.h>
|
||||
# include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
|
||||
# define ERR_TXT_MALLOCED 0x01
|
||||
# define ERR_TXT_STRING 0x02
|
||||
#define ERR_TXT_MALLOCED 0x01
|
||||
#define ERR_TXT_STRING 0x02
|
||||
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0) || defined(OSSL_FORCE_ERR_STATE)
|
||||
# define ERR_FLAG_MARK 0x01
|
||||
# define ERR_FLAG_CLEAR 0x02
|
||||
#if !defined(OPENSSL_NO_DEPRECATED_3_0) || defined(OSSL_FORCE_ERR_STATE)
|
||||
#define ERR_FLAG_MARK 0x01
|
||||
#define ERR_FLAG_CLEAR 0x02
|
||||
|
||||
# define ERR_NUM_ERRORS 16
|
||||
#define ERR_NUM_ERRORS 16
|
||||
struct err_state_st {
|
||||
int err_flags[ERR_NUM_ERRORS];
|
||||
int err_marks[ERR_NUM_ERRORS];
|
||||
@@ -65,109 +67,109 @@ struct err_state_st {
|
||||
char *err_func[ERR_NUM_ERRORS];
|
||||
int top, bottom;
|
||||
};
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* library */
|
||||
# define ERR_LIB_NONE 1
|
||||
# define ERR_LIB_SYS 2
|
||||
# define ERR_LIB_BN 3
|
||||
# define ERR_LIB_RSA 4
|
||||
# define ERR_LIB_DH 5
|
||||
# define ERR_LIB_EVP 6
|
||||
# define ERR_LIB_BUF 7
|
||||
# define ERR_LIB_OBJ 8
|
||||
# define ERR_LIB_PEM 9
|
||||
# define ERR_LIB_DSA 10
|
||||
# define ERR_LIB_X509 11
|
||||
#define ERR_LIB_NONE 1
|
||||
#define ERR_LIB_SYS 2
|
||||
#define ERR_LIB_BN 3
|
||||
#define ERR_LIB_RSA 4
|
||||
#define ERR_LIB_DH 5
|
||||
#define ERR_LIB_EVP 6
|
||||
#define ERR_LIB_BUF 7
|
||||
#define ERR_LIB_OBJ 8
|
||||
#define ERR_LIB_PEM 9
|
||||
#define ERR_LIB_DSA 10
|
||||
#define ERR_LIB_X509 11
|
||||
/* #define ERR_LIB_METH 12 */
|
||||
# define ERR_LIB_ASN1 13
|
||||
# define ERR_LIB_CONF 14
|
||||
# define ERR_LIB_CRYPTO 15
|
||||
# define ERR_LIB_EC 16
|
||||
# define ERR_LIB_SSL 20
|
||||
#define ERR_LIB_ASN1 13
|
||||
#define ERR_LIB_CONF 14
|
||||
#define ERR_LIB_CRYPTO 15
|
||||
#define ERR_LIB_EC 16
|
||||
#define ERR_LIB_SSL 20
|
||||
/* #define ERR_LIB_SSL23 21 */
|
||||
/* #define ERR_LIB_SSL2 22 */
|
||||
/* #define ERR_LIB_SSL3 23 */
|
||||
/* #define ERR_LIB_RSAREF 30 */
|
||||
/* #define ERR_LIB_PROXY 31 */
|
||||
# define ERR_LIB_BIO 32
|
||||
# define ERR_LIB_PKCS7 33
|
||||
# define ERR_LIB_X509V3 34
|
||||
# define ERR_LIB_PKCS12 35
|
||||
# define ERR_LIB_RAND 36
|
||||
# define ERR_LIB_DSO 37
|
||||
# define ERR_LIB_ENGINE 38
|
||||
# define ERR_LIB_OCSP 39
|
||||
# define ERR_LIB_UI 40
|
||||
# define ERR_LIB_COMP 41
|
||||
# define ERR_LIB_ECDSA 42
|
||||
# define ERR_LIB_ECDH 43
|
||||
# define ERR_LIB_OSSL_STORE 44
|
||||
# define ERR_LIB_FIPS 45
|
||||
# define ERR_LIB_CMS 46
|
||||
# define ERR_LIB_TS 47
|
||||
# define ERR_LIB_HMAC 48
|
||||
#define ERR_LIB_BIO 32
|
||||
#define ERR_LIB_PKCS7 33
|
||||
#define ERR_LIB_X509V3 34
|
||||
#define ERR_LIB_PKCS12 35
|
||||
#define ERR_LIB_RAND 36
|
||||
#define ERR_LIB_DSO 37
|
||||
#define ERR_LIB_ENGINE 38
|
||||
#define ERR_LIB_OCSP 39
|
||||
#define ERR_LIB_UI 40
|
||||
#define ERR_LIB_COMP 41
|
||||
#define ERR_LIB_ECDSA 42
|
||||
#define ERR_LIB_ECDH 43
|
||||
#define ERR_LIB_OSSL_STORE 44
|
||||
#define ERR_LIB_FIPS 45
|
||||
#define ERR_LIB_CMS 46
|
||||
#define ERR_LIB_TS 47
|
||||
#define ERR_LIB_HMAC 48
|
||||
/* # define ERR_LIB_JPAKE 49 */
|
||||
# define ERR_LIB_CT 50
|
||||
# define ERR_LIB_ASYNC 51
|
||||
# define ERR_LIB_KDF 52
|
||||
# define ERR_LIB_SM2 53
|
||||
# define ERR_LIB_ESS 54
|
||||
# define ERR_LIB_PROP 55
|
||||
# define ERR_LIB_CRMF 56
|
||||
# define ERR_LIB_PROV 57
|
||||
# define ERR_LIB_CMP 58
|
||||
# define ERR_LIB_OSSL_ENCODER 59
|
||||
# define ERR_LIB_OSSL_DECODER 60
|
||||
# define ERR_LIB_HTTP 61
|
||||
#define ERR_LIB_CT 50
|
||||
#define ERR_LIB_ASYNC 51
|
||||
#define ERR_LIB_KDF 52
|
||||
#define ERR_LIB_SM2 53
|
||||
#define ERR_LIB_ESS 54
|
||||
#define ERR_LIB_PROP 55
|
||||
#define ERR_LIB_CRMF 56
|
||||
#define ERR_LIB_PROV 57
|
||||
#define ERR_LIB_CMP 58
|
||||
#define ERR_LIB_OSSL_ENCODER 59
|
||||
#define ERR_LIB_OSSL_DECODER 60
|
||||
#define ERR_LIB_HTTP 61
|
||||
|
||||
# define ERR_LIB_USER 128
|
||||
#define ERR_LIB_USER 128
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define ASN1err(f, r) ERR_raise_data(ERR_LIB_ASN1, (r), NULL)
|
||||
# define ASYNCerr(f, r) ERR_raise_data(ERR_LIB_ASYNC, (r), NULL)
|
||||
# define BIOerr(f, r) ERR_raise_data(ERR_LIB_BIO, (r), NULL)
|
||||
# define BNerr(f, r) ERR_raise_data(ERR_LIB_BN, (r), NULL)
|
||||
# define BUFerr(f, r) ERR_raise_data(ERR_LIB_BUF, (r), NULL)
|
||||
# define CMPerr(f, r) ERR_raise_data(ERR_LIB_CMP, (r), NULL)
|
||||
# define CMSerr(f, r) ERR_raise_data(ERR_LIB_CMS, (r), NULL)
|
||||
# define COMPerr(f, r) ERR_raise_data(ERR_LIB_COMP, (r), NULL)
|
||||
# define CONFerr(f, r) ERR_raise_data(ERR_LIB_CONF, (r), NULL)
|
||||
# define CRMFerr(f, r) ERR_raise_data(ERR_LIB_CRMF, (r), NULL)
|
||||
# define CRYPTOerr(f, r) ERR_raise_data(ERR_LIB_CRYPTO, (r), NULL)
|
||||
# define CTerr(f, r) ERR_raise_data(ERR_LIB_CT, (r), NULL)
|
||||
# define DHerr(f, r) ERR_raise_data(ERR_LIB_DH, (r), NULL)
|
||||
# define DSAerr(f, r) ERR_raise_data(ERR_LIB_DSA, (r), NULL)
|
||||
# define DSOerr(f, r) ERR_raise_data(ERR_LIB_DSO, (r), NULL)
|
||||
# define ECDHerr(f, r) ERR_raise_data(ERR_LIB_ECDH, (r), NULL)
|
||||
# define ECDSAerr(f, r) ERR_raise_data(ERR_LIB_ECDSA, (r), NULL)
|
||||
# define ECerr(f, r) ERR_raise_data(ERR_LIB_EC, (r), NULL)
|
||||
# define ENGINEerr(f, r) ERR_raise_data(ERR_LIB_ENGINE, (r), NULL)
|
||||
# define ESSerr(f, r) ERR_raise_data(ERR_LIB_ESS, (r), NULL)
|
||||
# define EVPerr(f, r) ERR_raise_data(ERR_LIB_EVP, (r), NULL)
|
||||
# define FIPSerr(f, r) ERR_raise_data(ERR_LIB_FIPS, (r), NULL)
|
||||
# define HMACerr(f, r) ERR_raise_data(ERR_LIB_HMAC, (r), NULL)
|
||||
# define HTTPerr(f, r) ERR_raise_data(ERR_LIB_HTTP, (r), NULL)
|
||||
# define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
||||
# define OBJerr(f, r) ERR_raise_data(ERR_LIB_OBJ, (r), NULL)
|
||||
# define OCSPerr(f, r) ERR_raise_data(ERR_LIB_OCSP, (r), NULL)
|
||||
# define OSSL_STOREerr(f, r) ERR_raise_data(ERR_LIB_OSSL_STORE, (r), NULL)
|
||||
# define PEMerr(f, r) ERR_raise_data(ERR_LIB_PEM, (r), NULL)
|
||||
# define PKCS12err(f, r) ERR_raise_data(ERR_LIB_PKCS12, (r), NULL)
|
||||
# define PKCS7err(f, r) ERR_raise_data(ERR_LIB_PKCS7, (r), NULL)
|
||||
# define PROPerr(f, r) ERR_raise_data(ERR_LIB_PROP, (r), NULL)
|
||||
# define PROVerr(f, r) ERR_raise_data(ERR_LIB_PROV, (r), NULL)
|
||||
# define RANDerr(f, r) ERR_raise_data(ERR_LIB_RAND, (r), NULL)
|
||||
# define RSAerr(f, r) ERR_raise_data(ERR_LIB_RSA, (r), NULL)
|
||||
# define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
||||
# define SM2err(f, r) ERR_raise_data(ERR_LIB_SM2, (r), NULL)
|
||||
# define SSLerr(f, r) ERR_raise_data(ERR_LIB_SSL, (r), NULL)
|
||||
# define SYSerr(f, r) ERR_raise_data(ERR_LIB_SYS, (r), NULL)
|
||||
# define TSerr(f, r) ERR_raise_data(ERR_LIB_TS, (r), NULL)
|
||||
# define UIerr(f, r) ERR_raise_data(ERR_LIB_UI, (r), NULL)
|
||||
# define X509V3err(f, r) ERR_raise_data(ERR_LIB_X509V3, (r), NULL)
|
||||
# define X509err(f, r) ERR_raise_data(ERR_LIB_X509, (r), NULL)
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define ASN1err(f, r) ERR_raise_data(ERR_LIB_ASN1, (r), NULL)
|
||||
#define ASYNCerr(f, r) ERR_raise_data(ERR_LIB_ASYNC, (r), NULL)
|
||||
#define BIOerr(f, r) ERR_raise_data(ERR_LIB_BIO, (r), NULL)
|
||||
#define BNerr(f, r) ERR_raise_data(ERR_LIB_BN, (r), NULL)
|
||||
#define BUFerr(f, r) ERR_raise_data(ERR_LIB_BUF, (r), NULL)
|
||||
#define CMPerr(f, r) ERR_raise_data(ERR_LIB_CMP, (r), NULL)
|
||||
#define CMSerr(f, r) ERR_raise_data(ERR_LIB_CMS, (r), NULL)
|
||||
#define COMPerr(f, r) ERR_raise_data(ERR_LIB_COMP, (r), NULL)
|
||||
#define CONFerr(f, r) ERR_raise_data(ERR_LIB_CONF, (r), NULL)
|
||||
#define CRMFerr(f, r) ERR_raise_data(ERR_LIB_CRMF, (r), NULL)
|
||||
#define CRYPTOerr(f, r) ERR_raise_data(ERR_LIB_CRYPTO, (r), NULL)
|
||||
#define CTerr(f, r) ERR_raise_data(ERR_LIB_CT, (r), NULL)
|
||||
#define DHerr(f, r) ERR_raise_data(ERR_LIB_DH, (r), NULL)
|
||||
#define DSAerr(f, r) ERR_raise_data(ERR_LIB_DSA, (r), NULL)
|
||||
#define DSOerr(f, r) ERR_raise_data(ERR_LIB_DSO, (r), NULL)
|
||||
#define ECDHerr(f, r) ERR_raise_data(ERR_LIB_ECDH, (r), NULL)
|
||||
#define ECDSAerr(f, r) ERR_raise_data(ERR_LIB_ECDSA, (r), NULL)
|
||||
#define ECerr(f, r) ERR_raise_data(ERR_LIB_EC, (r), NULL)
|
||||
#define ENGINEerr(f, r) ERR_raise_data(ERR_LIB_ENGINE, (r), NULL)
|
||||
#define ESSerr(f, r) ERR_raise_data(ERR_LIB_ESS, (r), NULL)
|
||||
#define EVPerr(f, r) ERR_raise_data(ERR_LIB_EVP, (r), NULL)
|
||||
#define FIPSerr(f, r) ERR_raise_data(ERR_LIB_FIPS, (r), NULL)
|
||||
#define HMACerr(f, r) ERR_raise_data(ERR_LIB_HMAC, (r), NULL)
|
||||
#define HTTPerr(f, r) ERR_raise_data(ERR_LIB_HTTP, (r), NULL)
|
||||
#define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
||||
#define OBJerr(f, r) ERR_raise_data(ERR_LIB_OBJ, (r), NULL)
|
||||
#define OCSPerr(f, r) ERR_raise_data(ERR_LIB_OCSP, (r), NULL)
|
||||
#define OSSL_STOREerr(f, r) ERR_raise_data(ERR_LIB_OSSL_STORE, (r), NULL)
|
||||
#define PEMerr(f, r) ERR_raise_data(ERR_LIB_PEM, (r), NULL)
|
||||
#define PKCS12err(f, r) ERR_raise_data(ERR_LIB_PKCS12, (r), NULL)
|
||||
#define PKCS7err(f, r) ERR_raise_data(ERR_LIB_PKCS7, (r), NULL)
|
||||
#define PROPerr(f, r) ERR_raise_data(ERR_LIB_PROP, (r), NULL)
|
||||
#define PROVerr(f, r) ERR_raise_data(ERR_LIB_PROV, (r), NULL)
|
||||
#define RANDerr(f, r) ERR_raise_data(ERR_LIB_RAND, (r), NULL)
|
||||
#define RSAerr(f, r) ERR_raise_data(ERR_LIB_RSA, (r), NULL)
|
||||
#define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
||||
#define SM2err(f, r) ERR_raise_data(ERR_LIB_SM2, (r), NULL)
|
||||
#define SSLerr(f, r) ERR_raise_data(ERR_LIB_SSL, (r), NULL)
|
||||
#define SYSerr(f, r) ERR_raise_data(ERR_LIB_SYS, (r), NULL)
|
||||
#define TSerr(f, r) ERR_raise_data(ERR_LIB_TS, (r), NULL)
|
||||
#define UIerr(f, r) ERR_raise_data(ERR_LIB_UI, (r), NULL)
|
||||
#define X509V3err(f, r) ERR_raise_data(ERR_LIB_X509V3, (r), NULL)
|
||||
#define X509err(f, r) ERR_raise_data(ERR_LIB_X509, (r), NULL)
|
||||
#endif
|
||||
|
||||
/*-
|
||||
* The error code packs differently depending on if it records a system
|
||||
@@ -215,28 +217,28 @@ struct err_state_st {
|
||||
*/
|
||||
|
||||
/* Macros to help decode recorded system errors */
|
||||
# define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
|
||||
# define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
|
||||
#define ERR_SYSTEM_FLAG ((unsigned int)INT_MAX + 1)
|
||||
#define ERR_SYSTEM_MASK ((unsigned int)INT_MAX)
|
||||
|
||||
/*
|
||||
* Macros to help decode recorded OpenSSL errors
|
||||
* As expressed above, RFLAGS and REASON overlap by one bit to allow
|
||||
* ERR_R_FATAL to use ERR_RFLAG_FATAL as its reason code.
|
||||
*/
|
||||
# define ERR_LIB_OFFSET 23L
|
||||
# define ERR_LIB_MASK 0xFF
|
||||
# define ERR_RFLAGS_OFFSET 18L
|
||||
# define ERR_RFLAGS_MASK 0x1F
|
||||
# define ERR_REASON_MASK 0X7FFFFF
|
||||
#define ERR_LIB_OFFSET 23L
|
||||
#define ERR_LIB_MASK 0xFF
|
||||
#define ERR_RFLAGS_OFFSET 18L
|
||||
#define ERR_RFLAGS_MASK 0x1F
|
||||
#define ERR_REASON_MASK 0X7FFFFF
|
||||
|
||||
/*
|
||||
* Reason flags are defined pre-shifted to easily combine with the reason
|
||||
* number.
|
||||
*/
|
||||
# define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
|
||||
# define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
|
||||
#define ERR_RFLAG_FATAL (0x1 << ERR_RFLAGS_OFFSET)
|
||||
#define ERR_RFLAG_COMMON (0x2 << ERR_RFLAGS_OFFSET)
|
||||
|
||||
# define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
|
||||
#define ERR_SYSTEM_ERROR(errcode) (((errcode) & ERR_SYSTEM_FLAG) != 0)
|
||||
|
||||
static ossl_unused ossl_inline int ERR_GET_LIB(unsigned long errcode)
|
||||
{
|
||||
@@ -275,102 +277,102 @@ static ossl_unused ossl_inline int ERR_COMMON_ERROR(unsigned long errcode)
|
||||
* ERR_PACK takes reason flags and reason code combined in |reason|.
|
||||
* ERR_PACK ignores |func|, that parameter is just legacy from pre-3.0 OpenSSL.
|
||||
*/
|
||||
# define ERR_PACK(lib,func,reason) \
|
||||
( (((unsigned long)(lib) & ERR_LIB_MASK ) << ERR_LIB_OFFSET) | \
|
||||
(((unsigned long)(reason) & ERR_REASON_MASK)) )
|
||||
#define ERR_PACK(lib, func, reason) \
|
||||
((((unsigned long)(lib) & ERR_LIB_MASK) << ERR_LIB_OFFSET) | (((unsigned long)(reason) & ERR_REASON_MASK)))
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SYS_F_FOPEN 0
|
||||
# define SYS_F_CONNECT 0
|
||||
# define SYS_F_GETSERVBYNAME 0
|
||||
# define SYS_F_SOCKET 0
|
||||
# define SYS_F_IOCTLSOCKET 0
|
||||
# define SYS_F_BIND 0
|
||||
# define SYS_F_LISTEN 0
|
||||
# define SYS_F_ACCEPT 0
|
||||
# define SYS_F_WSASTARTUP 0
|
||||
# define SYS_F_OPENDIR 0
|
||||
# define SYS_F_FREAD 0
|
||||
# define SYS_F_GETADDRINFO 0
|
||||
# define SYS_F_GETNAMEINFO 0
|
||||
# define SYS_F_SETSOCKOPT 0
|
||||
# define SYS_F_GETSOCKOPT 0
|
||||
# define SYS_F_GETSOCKNAME 0
|
||||
# define SYS_F_GETHOSTBYNAME 0
|
||||
# define SYS_F_FFLUSH 0
|
||||
# define SYS_F_OPEN 0
|
||||
# define SYS_F_CLOSE 0
|
||||
# define SYS_F_IOCTL 0
|
||||
# define SYS_F_STAT 0
|
||||
# define SYS_F_FCNTL 0
|
||||
# define SYS_F_FSTAT 0
|
||||
# define SYS_F_SENDFILE 0
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define SYS_F_FOPEN 0
|
||||
#define SYS_F_CONNECT 0
|
||||
#define SYS_F_GETSERVBYNAME 0
|
||||
#define SYS_F_SOCKET 0
|
||||
#define SYS_F_IOCTLSOCKET 0
|
||||
#define SYS_F_BIND 0
|
||||
#define SYS_F_LISTEN 0
|
||||
#define SYS_F_ACCEPT 0
|
||||
#define SYS_F_WSASTARTUP 0
|
||||
#define SYS_F_OPENDIR 0
|
||||
#define SYS_F_FREAD 0
|
||||
#define SYS_F_GETADDRINFO 0
|
||||
#define SYS_F_GETNAMEINFO 0
|
||||
#define SYS_F_SETSOCKOPT 0
|
||||
#define SYS_F_GETSOCKOPT 0
|
||||
#define SYS_F_GETSOCKNAME 0
|
||||
#define SYS_F_GETHOSTBYNAME 0
|
||||
#define SYS_F_FFLUSH 0
|
||||
#define SYS_F_OPEN 0
|
||||
#define SYS_F_CLOSE 0
|
||||
#define SYS_F_IOCTL 0
|
||||
#define SYS_F_STAT 0
|
||||
#define SYS_F_FCNTL 0
|
||||
#define SYS_F_FSTAT 0
|
||||
#define SYS_F_SENDFILE 0
|
||||
#endif
|
||||
|
||||
/*
|
||||
* All ERR_R_ codes must be combined with ERR_RFLAG_COMMON.
|
||||
*/
|
||||
|
||||
/* "we came from here" global reason codes, range 1..255 */
|
||||
# define ERR_R_SYS_LIB (ERR_LIB_SYS/* 2 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_BN_LIB (ERR_LIB_BN/* 3 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_RSA_LIB (ERR_LIB_RSA/* 4 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_DH_LIB (ERR_LIB_DH/* 5 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_EVP_LIB (ERR_LIB_EVP/* 6 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_BUF_LIB (ERR_LIB_BUF/* 7 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_OBJ_LIB (ERR_LIB_OBJ/* 8 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_PEM_LIB (ERR_LIB_PEM/* 9 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_DSA_LIB (ERR_LIB_DSA/* 10 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_X509_LIB (ERR_LIB_X509/* 11 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_ASN1_LIB (ERR_LIB_ASN1/* 13 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_CONF_LIB (ERR_LIB_CONF/* 14 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO/* 15 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_EC_LIB (ERR_LIB_EC/* 16 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_SSL_LIB (ERR_LIB_SSL/* 20 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_BIO_LIB (ERR_LIB_BIO/* 32 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_PKCS7_LIB (ERR_LIB_PKCS7/* 33 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_X509V3_LIB (ERR_LIB_X509V3/* 34 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_PKCS12_LIB (ERR_LIB_PKCS12/* 35 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_RAND_LIB (ERR_LIB_RAND/* 36 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_DSO_LIB (ERR_LIB_DSO/* 37 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_ENGINE_LIB (ERR_LIB_ENGINE/* 38 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_UI_LIB (ERR_LIB_UI/* 40 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_ECDSA_LIB (ERR_LIB_ECDSA/* 42 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_OSSL_STORE_LIB (ERR_LIB_OSSL_STORE/* 44 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_CMS_LIB (ERR_LIB_CMS/* 46 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_TS_LIB (ERR_LIB_TS/* 47 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_CT_LIB (ERR_LIB_CT/* 50 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_PROV_LIB (ERR_LIB_PROV/* 57 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_ESS_LIB (ERR_LIB_ESS/* 54 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_CMP_LIB (ERR_LIB_CMP/* 58 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_OSSL_ENCODER_LIB (ERR_LIB_OSSL_ENCODER/* 59 */ | ERR_RFLAG_COMMON)
|
||||
# define ERR_R_OSSL_DECODER_LIB (ERR_LIB_OSSL_DECODER/* 60 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_SYS_LIB (ERR_LIB_SYS /* 2 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_BN_LIB (ERR_LIB_BN /* 3 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_RSA_LIB (ERR_LIB_RSA /* 4 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_DH_LIB (ERR_LIB_DH /* 5 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_EVP_LIB (ERR_LIB_EVP /* 6 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_BUF_LIB (ERR_LIB_BUF /* 7 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_OBJ_LIB (ERR_LIB_OBJ /* 8 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_PEM_LIB (ERR_LIB_PEM /* 9 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_DSA_LIB (ERR_LIB_DSA /* 10 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_X509_LIB (ERR_LIB_X509 /* 11 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_ASN1_LIB (ERR_LIB_ASN1 /* 13 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_CONF_LIB (ERR_LIB_CONF /* 14 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_CRYPTO_LIB (ERR_LIB_CRYPTO /* 15 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_EC_LIB (ERR_LIB_EC /* 16 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_SSL_LIB (ERR_LIB_SSL /* 20 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_BIO_LIB (ERR_LIB_BIO /* 32 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_PKCS7_LIB (ERR_LIB_PKCS7 /* 33 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_X509V3_LIB (ERR_LIB_X509V3 /* 34 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_PKCS12_LIB (ERR_LIB_PKCS12 /* 35 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_RAND_LIB (ERR_LIB_RAND /* 36 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_DSO_LIB (ERR_LIB_DSO /* 37 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_ENGINE_LIB (ERR_LIB_ENGINE /* 38 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_UI_LIB (ERR_LIB_UI /* 40 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_ECDSA_LIB (ERR_LIB_ECDSA /* 42 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_OSSL_STORE_LIB (ERR_LIB_OSSL_STORE /* 44 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_CMS_LIB (ERR_LIB_CMS /* 46 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_TS_LIB (ERR_LIB_TS /* 47 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_CT_LIB (ERR_LIB_CT /* 50 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_PROV_LIB (ERR_LIB_PROV /* 57 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_ESS_LIB (ERR_LIB_ESS /* 54 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_CMP_LIB (ERR_LIB_CMP /* 58 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_OSSL_ENCODER_LIB (ERR_LIB_OSSL_ENCODER /* 59 */ | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_OSSL_DECODER_LIB (ERR_LIB_OSSL_DECODER /* 60 */ | ERR_RFLAG_COMMON)
|
||||
|
||||
/* Other common error codes, range 256..2^ERR_RFLAGS_OFFSET-1 */
|
||||
# define ERR_R_FATAL (ERR_RFLAG_FATAL|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_MALLOC_FAILURE (256|ERR_R_FATAL)
|
||||
# define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (257|ERR_R_FATAL)
|
||||
# define ERR_R_PASSED_NULL_PARAMETER (258|ERR_R_FATAL)
|
||||
# define ERR_R_INTERNAL_ERROR (259|ERR_R_FATAL)
|
||||
# define ERR_R_DISABLED (260|ERR_R_FATAL)
|
||||
# define ERR_R_INIT_FAIL (261|ERR_R_FATAL)
|
||||
# define ERR_R_PASSED_INVALID_ARGUMENT (262|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_OPERATION_FAIL (263|ERR_R_FATAL)
|
||||
# define ERR_R_INVALID_PROVIDER_FUNCTIONS (264|ERR_R_FATAL)
|
||||
# define ERR_R_INTERRUPTED_OR_CANCELLED (265|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_NESTED_ASN1_ERROR (266|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_MISSING_ASN1_EOS (267|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_UNSUPPORTED (268|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_FETCH_FAILED (269|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_INVALID_PROPERTY_DEFINITION (270|ERR_RFLAG_COMMON)
|
||||
# define ERR_R_UNABLE_TO_GET_READ_LOCK (271|ERR_R_FATAL)
|
||||
# define ERR_R_UNABLE_TO_GET_WRITE_LOCK (272|ERR_R_FATAL)
|
||||
#define ERR_R_FATAL (ERR_RFLAG_FATAL | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_MALLOC_FAILURE (256 | ERR_R_FATAL)
|
||||
#define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED (257 | ERR_R_FATAL)
|
||||
#define ERR_R_PASSED_NULL_PARAMETER (258 | ERR_R_FATAL)
|
||||
#define ERR_R_INTERNAL_ERROR (259 | ERR_R_FATAL)
|
||||
#define ERR_R_DISABLED (260 | ERR_R_FATAL)
|
||||
#define ERR_R_INIT_FAIL (261 | ERR_R_FATAL)
|
||||
#define ERR_R_PASSED_INVALID_ARGUMENT (262 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_OPERATION_FAIL (263 | ERR_R_FATAL)
|
||||
#define ERR_R_INVALID_PROVIDER_FUNCTIONS (264 | ERR_R_FATAL)
|
||||
#define ERR_R_INTERRUPTED_OR_CANCELLED (265 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_NESTED_ASN1_ERROR (266 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_MISSING_ASN1_EOS (267 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_UNSUPPORTED (268 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_FETCH_FAILED (269 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_INVALID_PROPERTY_DEFINITION (270 | ERR_RFLAG_COMMON)
|
||||
#define ERR_R_UNABLE_TO_GET_READ_LOCK (271 | ERR_R_FATAL)
|
||||
#define ERR_R_UNABLE_TO_GET_WRITE_LOCK (272 | ERR_R_FATAL)
|
||||
|
||||
typedef struct ERR_string_data_st {
|
||||
unsigned long error;
|
||||
const char *string;
|
||||
} ERR_STRING_DATA;
|
||||
|
||||
/* clang-format off */
|
||||
DEFINE_LHASH_OF_INTERNAL(ERR_STRING_DATA);
|
||||
#define lh_ERR_STRING_DATA_new(hfn, cmp) ((LHASH_OF(ERR_STRING_DATA) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_ERR_STRING_DATA_lh_hashfunc_type(hfn), ossl_check_ERR_STRING_DATA_lh_compfunc_type(cmp)), lh_ERR_STRING_DATA_hash_thunk, lh_ERR_STRING_DATA_comp_thunk, lh_ERR_STRING_DATA_doall_thunk, lh_ERR_STRING_DATA_doall_arg_thunk))
|
||||
#define lh_ERR_STRING_DATA_free(lh) OPENSSL_LH_free(ossl_check_ERR_STRING_DATA_lh_type(lh))
|
||||
@@ -387,9 +389,10 @@ DEFINE_LHASH_OF_INTERNAL(ERR_STRING_DATA);
|
||||
#define lh_ERR_STRING_DATA_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_ERR_STRING_DATA_lh_type(lh), dl)
|
||||
#define lh_ERR_STRING_DATA_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_ERR_STRING_DATA_lh_type(lh), ossl_check_ERR_STRING_DATA_lh_doallfunc_type(dfn))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* 12 lines and some on an 80 column terminal */
|
||||
#define ERR_MAX_DATA_SIZE 1024
|
||||
#define ERR_MAX_DATA_SIZE 1024
|
||||
|
||||
/* Building blocks */
|
||||
void ERR_new(void);
|
||||
@@ -398,73 +401,73 @@ void ERR_set_error(int lib, int reason, const char *fmt, ...);
|
||||
void ERR_vset_error(int lib, int reason, const char *fmt, va_list args);
|
||||
|
||||
/* Main error raising functions */
|
||||
# define ERR_raise(lib, reason) ERR_raise_data((lib),(reason),NULL)
|
||||
# define ERR_raise_data \
|
||||
(ERR_new(), \
|
||||
ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC), \
|
||||
ERR_set_error)
|
||||
#define ERR_raise(lib, reason) ERR_raise_data((lib), (reason), NULL)
|
||||
#define ERR_raise_data \
|
||||
(ERR_new(), \
|
||||
ERR_set_debug(OPENSSL_FILE, OPENSSL_LINE, OPENSSL_FUNC), \
|
||||
ERR_set_error)
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* Backward compatibility */
|
||||
# define ERR_put_error(lib, func, reason, file, line) \
|
||||
(ERR_new(), \
|
||||
ERR_set_debug((file), (line), OPENSSL_FUNC), \
|
||||
ERR_set_error((lib), (reason), NULL))
|
||||
# endif
|
||||
#define ERR_put_error(lib, func, reason, file, line) \
|
||||
(ERR_new(), \
|
||||
ERR_set_debug((file), (line), OPENSSL_FUNC), \
|
||||
ERR_set_error((lib), (reason), NULL))
|
||||
#endif
|
||||
|
||||
void ERR_set_error_data(char *data, int flags);
|
||||
|
||||
unsigned long ERR_get_error(void);
|
||||
unsigned long ERR_get_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
unsigned long ERR_get_error_line(const char **file, int *line);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
unsigned long ERR_get_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
const char **data, int *flags);
|
||||
#endif
|
||||
unsigned long ERR_peek_error(void);
|
||||
unsigned long ERR_peek_error_line(const char **file, int *line);
|
||||
unsigned long ERR_peek_error_func(const char **func);
|
||||
unsigned long ERR_peek_error_data(const char **data, int *flags);
|
||||
unsigned long ERR_peek_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
unsigned long ERR_peek_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
# endif
|
||||
const char **data, int *flags);
|
||||
#endif
|
||||
unsigned long ERR_peek_last_error(void);
|
||||
unsigned long ERR_peek_last_error_line(const char **file, int *line);
|
||||
unsigned long ERR_peek_last_error_func(const char **func);
|
||||
unsigned long ERR_peek_last_error_data(const char **data, int *flags);
|
||||
unsigned long ERR_peek_last_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
unsigned long ERR_peek_last_error_line_data(const char **file, int *line,
|
||||
const char **data, int *flags);
|
||||
# endif
|
||||
const char **data, int *flags);
|
||||
#endif
|
||||
|
||||
void ERR_clear_error(void);
|
||||
|
||||
char *ERR_error_string(unsigned long e, char *buf);
|
||||
void ERR_error_string_n(unsigned long e, char *buf, size_t len);
|
||||
const char *ERR_lib_error_string(unsigned long e);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
OSSL_DEPRECATEDIN_3_0 const char *ERR_func_error_string(unsigned long e);
|
||||
# endif
|
||||
#endif
|
||||
const char *ERR_reason_error_string(unsigned long e);
|
||||
|
||||
void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
void ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
void ERR_print_errors_fp(FILE *fp);
|
||||
# endif
|
||||
#endif
|
||||
void ERR_print_errors(BIO *bp);
|
||||
|
||||
void ERR_add_error_data(int num, ...);
|
||||
@@ -477,9 +480,11 @@ int ERR_load_strings_const(const ERR_STRING_DATA *str);
|
||||
int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define ERR_load_crypto_strings() \
|
||||
#define ERR_load_crypto_strings() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
|
||||
# define ERR_free_strings() while(0) continue
|
||||
#define ERR_free_strings() \
|
||||
while (0) \
|
||||
continue
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
OSSL_DEPRECATEDIN_1_1_0 void ERR_remove_thread_state(void *);
|
||||
@@ -505,7 +510,7 @@ void OSSL_ERR_STATE_save_to_mark(ERR_STATE *es);
|
||||
void OSSL_ERR_STATE_restore(const ERR_STATE *es);
|
||||
void OSSL_ERR_STATE_free(ERR_STATE *es);
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,27 +10,29 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_ESS_H
|
||||
# define OPENSSL_ESS_H
|
||||
# pragma once
|
||||
#define OPENSSL_ESS_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/esserr.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/esserr.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
#endif
|
||||
|
||||
typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
|
||||
typedef struct ESS_cert_id ESS_CERT_ID;
|
||||
typedef struct ESS_signing_cert ESS_SIGNING_CERT;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID, ESS_CERT_ID, ESS_CERT_ID)
|
||||
#define sk_ESS_CERT_ID_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_sk_type(sk))
|
||||
#define sk_ESS_CERT_ID_value(sk, idx) ((ESS_CERT_ID *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_sk_type(sk), (idx)))
|
||||
@@ -58,11 +60,12 @@ SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID, ESS_CERT_ID, ESS_CERT_ID)
|
||||
#define sk_ESS_CERT_ID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_freefunc_type(freefunc)))
|
||||
#define sk_ESS_CERT_ID_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
|
||||
typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID_V2, ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
||||
#define sk_ESS_CERT_ID_V2_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))
|
||||
#define sk_ESS_CERT_ID_V2_value(sk, idx) ((ESS_CERT_ID_V2 *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), (idx)))
|
||||
@@ -90,6 +93,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID_V2, ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
||||
#define sk_ESS_CERT_ID_V2_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc)))
|
||||
#define sk_ESS_CERT_ID_V2_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_V2_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
|
||||
@@ -110,19 +114,18 @@ DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT_V2)
|
||||
DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2)
|
||||
|
||||
ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
|
||||
const STACK_OF(X509) *certs,
|
||||
int set_issuer_serial);
|
||||
const STACK_OF(X509) *certs,
|
||||
int set_issuer_serial);
|
||||
ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
|
||||
const X509 *signcert,
|
||||
const
|
||||
STACK_OF(X509) *certs,
|
||||
int set_issuer_serial);
|
||||
const X509 *signcert,
|
||||
const STACK_OF(X509) *certs,
|
||||
int set_issuer_serial);
|
||||
int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
|
||||
const ESS_SIGNING_CERT_V2 *ssv2,
|
||||
const STACK_OF(X509) *chain,
|
||||
int require_signing_cert);
|
||||
const ESS_SIGNING_CERT_V2 *ssv2,
|
||||
const STACK_OF(X509) *chain,
|
||||
int require_signing_cert);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -11,31 +11,37 @@
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_FIPSKEY_H
|
||||
# define OPENSSL_FIPSKEY_H
|
||||
# pragma once
|
||||
#define OPENSSL_FIPSKEY_H
|
||||
#pragma once
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The FIPS validation HMAC key, usable as an array initializer.
|
||||
*/
|
||||
/* clang-format off */
|
||||
#define FIPS_KEY_ELEMENTS \
|
||||
0xf4, 0x55, 0x66, 0x50, 0xac, 0x31, 0xd3, 0x54, 0x61, 0x61, 0x0b, 0xac, 0x4e, 0xd8, 0x1b, 0x1a, 0x18, 0x1b, 0x2d, 0x8a, 0x43, 0xea, 0x28, 0x54, 0xcb, 0xae, 0x22, 0xca, 0x74, 0x56, 0x08, 0x13
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* The FIPS validation key, as a string.
|
||||
*/
|
||||
/* clang-format off */
|
||||
#define FIPS_KEY_STRING "f4556650ac31d35461610bac4ed81b1a181b2d8a43ea2854cbae22ca74560813"
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* The FIPS provider vendor name, as a string.
|
||||
*/
|
||||
/* clang-format off */
|
||||
#define FIPS_VENDOR "OpenSSL non-compliant FIPS Provider"
|
||||
/* clang-format on */
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,40 +7,42 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* Header for dynamic hash table routines Author - Eric Young
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_LHASH_H
|
||||
# define OPENSSL_LHASH_H
|
||||
# pragma once
|
||||
#define OPENSSL_LHASH_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_LHASH_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_LHASH_H
|
||||
#endif
|
||||
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/bio.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
#include <openssl/e_os2.h>
|
||||
#include <openssl/bio.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct lhash_node_st OPENSSL_LH_NODE;
|
||||
typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *);
|
||||
typedef int (*OPENSSL_LH_COMPFUNCTHUNK) (const void *, const void *, OPENSSL_LH_COMPFUNC cfn);
|
||||
typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *);
|
||||
typedef unsigned long (*OPENSSL_LH_HASHFUNCTHUNK) (const void *, OPENSSL_LH_HASHFUNC hfn);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNC) (void *);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNC_THUNK) (void *, OPENSSL_LH_DOALL_FUNC doall);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNCARG_THUNK) (void *, void *, OPENSSL_LH_DOALL_FUNCARG doall);
|
||||
typedef int (*OPENSSL_LH_COMPFUNC)(const void *, const void *);
|
||||
typedef int (*OPENSSL_LH_COMPFUNCTHUNK)(const void *, const void *, OPENSSL_LH_COMPFUNC cfn);
|
||||
typedef unsigned long (*OPENSSL_LH_HASHFUNC)(const void *);
|
||||
typedef unsigned long (*OPENSSL_LH_HASHFUNCTHUNK)(const void *, OPENSSL_LH_HASHFUNC hfn);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNC)(void *);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNC_THUNK)(void *, OPENSSL_LH_DOALL_FUNC doall);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNCARG)(void *, void *);
|
||||
typedef void (*OPENSSL_LH_DOALL_FUNCARG_THUNK)(void *, void *, OPENSSL_LH_DOALL_FUNCARG doall);
|
||||
typedef struct lhash_st OPENSSL_LHASH;
|
||||
|
||||
/*
|
||||
@@ -53,44 +55,49 @@ typedef struct lhash_st OPENSSL_LHASH;
|
||||
*/
|
||||
|
||||
/* First: "hash" functions */
|
||||
# define DECLARE_LHASH_HASH_FN(name, o_type) \
|
||||
unsigned long name##_LHASH_HASH(const void *);
|
||||
# define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
|
||||
unsigned long name##_LHASH_HASH(const void *arg) { \
|
||||
const o_type *a = arg; \
|
||||
return name##_hash(a); }
|
||||
# define LHASH_HASH_FN(name) name##_LHASH_HASH
|
||||
#define DECLARE_LHASH_HASH_FN(name, o_type) \
|
||||
unsigned long name##_LHASH_HASH(const void *);
|
||||
#define IMPLEMENT_LHASH_HASH_FN(name, o_type) \
|
||||
unsigned long name##_LHASH_HASH(const void *arg) \
|
||||
{ \
|
||||
const o_type *a = arg; \
|
||||
return name##_hash(a); \
|
||||
}
|
||||
#define LHASH_HASH_FN(name) name##_LHASH_HASH
|
||||
|
||||
/* Second: "compare" functions */
|
||||
# define DECLARE_LHASH_COMP_FN(name, o_type) \
|
||||
int name##_LHASH_COMP(const void *, const void *);
|
||||
# define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
|
||||
int name##_LHASH_COMP(const void *arg1, const void *arg2) { \
|
||||
const o_type *a = arg1; \
|
||||
const o_type *b = arg2; \
|
||||
return name##_cmp(a,b); }
|
||||
# define LHASH_COMP_FN(name) name##_LHASH_COMP
|
||||
#define DECLARE_LHASH_COMP_FN(name, o_type) \
|
||||
int name##_LHASH_COMP(const void *, const void *);
|
||||
#define IMPLEMENT_LHASH_COMP_FN(name, o_type) \
|
||||
int name##_LHASH_COMP(const void *arg1, const void *arg2) \
|
||||
{ \
|
||||
const o_type *a = arg1; \
|
||||
const o_type *b = arg2; \
|
||||
return name##_cmp(a, b); \
|
||||
}
|
||||
#define LHASH_COMP_FN(name) name##_LHASH_COMP
|
||||
|
||||
/* Fourth: "doall_arg" functions */
|
||||
# define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
||||
void name##_LHASH_DOALL_ARG(void *, void *);
|
||||
# define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
||||
void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \
|
||||
o_type *a = arg1; \
|
||||
a_type *b = arg2; \
|
||||
name##_doall_arg(a, b); }
|
||||
# define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
|
||||
#define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
||||
void name##_LHASH_DOALL_ARG(void *, void *);
|
||||
#define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \
|
||||
void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) \
|
||||
{ \
|
||||
o_type *a = arg1; \
|
||||
a_type *b = arg2; \
|
||||
name##_doall_arg(a, b); \
|
||||
}
|
||||
#define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG
|
||||
|
||||
|
||||
# define LH_LOAD_MULT 256
|
||||
#define LH_LOAD_MULT 256
|
||||
|
||||
int OPENSSL_LH_error(OPENSSL_LHASH *lh);
|
||||
OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c);
|
||||
OPENSSL_LHASH *OPENSSL_LH_set_thunks(OPENSSL_LHASH *lh,
|
||||
OPENSSL_LH_HASHFUNCTHUNK hw,
|
||||
OPENSSL_LH_COMPFUNCTHUNK cw,
|
||||
OPENSSL_LH_DOALL_FUNC_THUNK daw,
|
||||
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw);
|
||||
OPENSSL_LH_HASHFUNCTHUNK hw,
|
||||
OPENSSL_LH_COMPFUNCTHUNK cw,
|
||||
OPENSSL_LH_DOALL_FUNC_THUNK daw,
|
||||
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw);
|
||||
void OPENSSL_LH_free(OPENSSL_LHASH *lh);
|
||||
void OPENSSL_LH_flush(OPENSSL_LHASH *lh);
|
||||
void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data);
|
||||
@@ -98,239 +105,249 @@ void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data);
|
||||
void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data);
|
||||
void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func);
|
||||
void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh,
|
||||
OPENSSL_LH_DOALL_FUNCARG func, void *arg);
|
||||
OPENSSL_LH_DOALL_FUNCARG func, void *arg);
|
||||
void OPENSSL_LH_doall_arg_thunk(OPENSSL_LHASH *lh,
|
||||
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw,
|
||||
OPENSSL_LH_DOALL_FUNCARG fn, void *arg);
|
||||
OPENSSL_LH_DOALL_FUNCARG_THUNK daaw,
|
||||
OPENSSL_LH_DOALL_FUNCARG fn, void *arg);
|
||||
|
||||
unsigned long OPENSSL_LH_strhash(const char *c);
|
||||
unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh);
|
||||
unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh);
|
||||
void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load);
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp);
|
||||
# endif
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
#endif
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define _LHASH OPENSSL_LHASH
|
||||
# define LHASH_NODE OPENSSL_LH_NODE
|
||||
# define lh_error OPENSSL_LH_error
|
||||
# define lh_new OPENSSL_LH_new
|
||||
# define lh_free OPENSSL_LH_free
|
||||
# define lh_insert OPENSSL_LH_insert
|
||||
# define lh_delete OPENSSL_LH_delete
|
||||
# define lh_retrieve OPENSSL_LH_retrieve
|
||||
# define lh_doall OPENSSL_LH_doall
|
||||
# define lh_doall_arg OPENSSL_LH_doall_arg
|
||||
# define lh_strhash OPENSSL_LH_strhash
|
||||
# define lh_num_items OPENSSL_LH_num_items
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# define lh_stats OPENSSL_LH_stats
|
||||
# define lh_node_stats OPENSSL_LH_node_stats
|
||||
# define lh_node_usage_stats OPENSSL_LH_node_usage_stats
|
||||
# endif
|
||||
# define lh_stats_bio OPENSSL_LH_stats_bio
|
||||
# define lh_node_stats_bio OPENSSL_LH_node_stats_bio
|
||||
# define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#define _LHASH OPENSSL_LHASH
|
||||
#define LHASH_NODE OPENSSL_LH_NODE
|
||||
#define lh_error OPENSSL_LH_error
|
||||
#define lh_new OPENSSL_LH_new
|
||||
#define lh_free OPENSSL_LH_free
|
||||
#define lh_insert OPENSSL_LH_insert
|
||||
#define lh_delete OPENSSL_LH_delete
|
||||
#define lh_retrieve OPENSSL_LH_retrieve
|
||||
#define lh_doall OPENSSL_LH_doall
|
||||
#define lh_doall_arg OPENSSL_LH_doall_arg
|
||||
#define lh_strhash OPENSSL_LH_strhash
|
||||
#define lh_num_items OPENSSL_LH_num_items
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#define lh_stats OPENSSL_LH_stats
|
||||
#define lh_node_stats OPENSSL_LH_node_stats
|
||||
#define lh_node_usage_stats OPENSSL_LH_node_usage_stats
|
||||
#endif
|
||||
#define lh_stats_bio OPENSSL_LH_stats_bio
|
||||
#define lh_node_stats_bio OPENSSL_LH_node_stats_bio
|
||||
#define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio
|
||||
#endif
|
||||
|
||||
/* Type checking... */
|
||||
|
||||
# define LHASH_OF(type) struct lhash_st_##type
|
||||
#define LHASH_OF(type) struct lhash_st_##type
|
||||
|
||||
/* Helper macro for internal use */
|
||||
# define DEFINE_LHASH_OF_INTERNAL(type) \
|
||||
LHASH_OF(type) { \
|
||||
union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
|
||||
}; \
|
||||
typedef int (*lh_##type##_compfunc)(const type *a, const type *b); \
|
||||
typedef unsigned long (*lh_##type##_hashfunc)(const type *a); \
|
||||
typedef void (*lh_##type##_doallfunc)(type *a); \
|
||||
static ossl_inline unsigned long lh_##type##_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
||||
{ \
|
||||
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
||||
return hfn_conv((const type *)data); \
|
||||
} \
|
||||
static ossl_inline int lh_##type##_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
||||
{ \
|
||||
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
||||
return cfn_conv((const type *)da, (const type *)db); \
|
||||
} \
|
||||
static ossl_inline void lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
||||
doall_conv((type *)node); \
|
||||
} \
|
||||
#define DEFINE_LHASH_OF_INTERNAL(type) \
|
||||
LHASH_OF(type) \
|
||||
{ \
|
||||
union lh_##type##_dummy { \
|
||||
void *d1; \
|
||||
unsigned long d2; \
|
||||
int d3; \
|
||||
} dummy; \
|
||||
}; \
|
||||
typedef int (*lh_##type##_compfunc)(const type *a, const type *b); \
|
||||
typedef unsigned long (*lh_##type##_hashfunc)(const type *a); \
|
||||
typedef void (*lh_##type##_doallfunc)(type * a); \
|
||||
static ossl_inline unsigned long lh_##type##_hash_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
||||
{ \
|
||||
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
||||
return hfn_conv((const type *)data); \
|
||||
} \
|
||||
static ossl_inline int lh_##type##_comp_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
||||
{ \
|
||||
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
||||
return cfn_conv((const type *)da, (const type *)db); \
|
||||
} \
|
||||
static ossl_inline void lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
||||
doall_conv((type *)node); \
|
||||
} \
|
||||
static ossl_inline void lh_##type##_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
||||
doall_conv((type *)node, arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type *\
|
||||
ossl_check_##type##_lh_plain_type(type *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
static ossl_unused ossl_inline const type * \
|
||||
ossl_check_const_##type##_lh_plain_type(const type *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
static ossl_unused ossl_inline const OPENSSL_LHASH * \
|
||||
ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return (const OPENSSL_LHASH *)lh; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LHASH * \
|
||||
ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return (OPENSSL_LHASH *)lh; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC \
|
||||
ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \
|
||||
{ \
|
||||
return (OPENSSL_LH_COMPFUNC)cmp; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC \
|
||||
ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \
|
||||
{ \
|
||||
return (OPENSSL_LH_HASHFUNC)hfn; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC \
|
||||
ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \
|
||||
{ \
|
||||
return (OPENSSL_LH_DOALL_FUNC)dfn; \
|
||||
} \
|
||||
{ \
|
||||
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
||||
doall_conv((type *)node, arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
ossl_check_##type##_lh_plain_type(type *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
static ossl_unused ossl_inline const type * \
|
||||
ossl_check_const_##type##_lh_plain_type(const type *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
static ossl_unused ossl_inline const OPENSSL_LHASH * \
|
||||
ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return (const OPENSSL_LHASH *)lh; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LHASH * \
|
||||
ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return (OPENSSL_LHASH *)lh; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC \
|
||||
ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \
|
||||
{ \
|
||||
return (OPENSSL_LH_COMPFUNC)cmp; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC \
|
||||
ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \
|
||||
{ \
|
||||
return (OPENSSL_LH_HASHFUNC)hfn; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC \
|
||||
ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \
|
||||
{ \
|
||||
return (OPENSSL_LH_DOALL_FUNC)dfn; \
|
||||
} \
|
||||
LHASH_OF(type)
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
# define DEFINE_LHASH_OF_DEPRECATED(type) \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
||||
{ \
|
||||
OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_1
|
||||
#define DEFINE_LHASH_OF_DEPRECATED(type) \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
||||
{ \
|
||||
OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
||||
{ \
|
||||
{ \
|
||||
OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
||||
{ \
|
||||
OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \
|
||||
{ \
|
||||
OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \
|
||||
}
|
||||
# else
|
||||
# define DEFINE_LHASH_OF_DEPRECATED(type)
|
||||
# endif
|
||||
#else
|
||||
#define DEFINE_LHASH_OF_DEPRECATED(type)
|
||||
#endif
|
||||
|
||||
# define DEFINE_LHASH_OF_EX(type) \
|
||||
LHASH_OF(type) { \
|
||||
union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; \
|
||||
}; \
|
||||
static unsigned long \
|
||||
lh_##type##_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
||||
{ \
|
||||
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
||||
return hfn_conv((const type *)data); \
|
||||
} \
|
||||
static int lh_##type##_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
||||
{ \
|
||||
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
||||
return cfn_conv((const type *)da, (const type *)db); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_free(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_flush(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int \
|
||||
lh_##type##_error(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline unsigned long \
|
||||
lh_##type##_num_items(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline unsigned long \
|
||||
lh_##type##_get_down_load(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
|
||||
{ \
|
||||
OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
||||
doall_conv((type *)node); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
||||
doall_conv((type *)node, arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall(LHASH_OF(type) *lh, void (*doall)(type *)) \
|
||||
{ \
|
||||
OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
|
||||
} \
|
||||
static ossl_unused ossl_inline LHASH_OF(type) * \
|
||||
lh_##type##_new(unsigned long (*hfn)(const type *), \
|
||||
int (*cfn)(const type *, const type *)) \
|
||||
{ \
|
||||
#define DEFINE_LHASH_OF_EX(type) \
|
||||
LHASH_OF(type) \
|
||||
{ \
|
||||
union lh_##type##_dummy { \
|
||||
void *d1; \
|
||||
unsigned long d2; \
|
||||
int d3; \
|
||||
} dummy; \
|
||||
}; \
|
||||
static unsigned long \
|
||||
lh_##type##_hfn_thunk(const void *data, OPENSSL_LH_HASHFUNC hfn) \
|
||||
{ \
|
||||
unsigned long (*hfn_conv)(const type *) = (unsigned long (*)(const type *))hfn; \
|
||||
return hfn_conv((const type *)data); \
|
||||
} \
|
||||
static int lh_##type##_cfn_thunk(const void *da, const void *db, OPENSSL_LH_COMPFUNC cfn) \
|
||||
{ \
|
||||
int (*cfn_conv)(const type *, const type *) = (int (*)(const type *, const type *))cfn; \
|
||||
return cfn_conv((const type *)da, (const type *)db); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_free(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
OPENSSL_LH_free((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_flush(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_insert(LHASH_OF(type) *lh, type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline type * \
|
||||
lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \
|
||||
{ \
|
||||
return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int \
|
||||
lh_##type##_error(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline unsigned long \
|
||||
lh_##type##_num_items(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline unsigned long \
|
||||
lh_##type##_get_down_load(LHASH_OF(type) *lh) \
|
||||
{ \
|
||||
return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \
|
||||
{ \
|
||||
OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_thunk(void *node, OPENSSL_LH_DOALL_FUNC doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *) = (void (*)(type *))doall; \
|
||||
doall_conv((type *)node); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_arg_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG doall) \
|
||||
{ \
|
||||
void (*doall_conv)(type *, void *) = (void (*)(type *, void *))doall; \
|
||||
doall_conv((type *)node, arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall(LHASH_OF(type) *lh, void (*doall)(type *)) \
|
||||
{ \
|
||||
OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \
|
||||
} \
|
||||
static ossl_unused ossl_inline LHASH_OF(type) * \
|
||||
lh_##type##_new(unsigned long (*hfn)(const type *), \
|
||||
int (*cfn)(const type *, const type *)) \
|
||||
{ \
|
||||
return (LHASH_OF(type) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn), \
|
||||
lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
|
||||
lh_##type##_doall_thunk, \
|
||||
lh_##type##_doall_arg_thunk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_arg(LHASH_OF(type) *lh, \
|
||||
void (*doallarg)(type *, void *), void *arg) \
|
||||
{ \
|
||||
OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \
|
||||
(OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); \
|
||||
} \
|
||||
lh_##type##_hfn_thunk, lh_##type##_cfn_thunk, \
|
||||
lh_##type##_doall_thunk, \
|
||||
lh_##type##_doall_arg_thunk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_arg(LHASH_OF(type) *lh, \
|
||||
void (*doallarg)(type *, void *), void *arg) \
|
||||
{ \
|
||||
OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \
|
||||
(OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); \
|
||||
} \
|
||||
LHASH_OF(type)
|
||||
|
||||
# define DEFINE_LHASH_OF(type) \
|
||||
DEFINE_LHASH_OF_EX(type); \
|
||||
#define DEFINE_LHASH_OF(type) \
|
||||
DEFINE_LHASH_OF_EX(type); \
|
||||
DEFINE_LHASH_OF_DEPRECATED(type) \
|
||||
LHASH_OF(type)
|
||||
|
||||
@@ -340,25 +357,26 @@ OSSL_DEPRECATEDIN_3_1 void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *
|
||||
#define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \
|
||||
int_implement_lhash_doall(type, argtype, type)
|
||||
|
||||
#define int_implement_lhash_doall(type, argtype, cbargtype) \
|
||||
static ossl_unused ossl_inline void \
|
||||
#define int_implement_lhash_doall(type, argtype, cbargtype) \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_##argtype##_thunk(void *node, void *arg, OPENSSL_LH_DOALL_FUNCARG fn) \
|
||||
{ \
|
||||
void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn; \
|
||||
fn_conv((cbargtype *)node, (argtype *)arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \
|
||||
void (*fn)(cbargtype *, argtype *), \
|
||||
argtype *arg) \
|
||||
{ \
|
||||
OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh, \
|
||||
lh_##type##_doall_##argtype##_thunk, \
|
||||
(OPENSSL_LH_DOALL_FUNCARG)fn, \
|
||||
(void *)arg); \
|
||||
} \
|
||||
{ \
|
||||
void (*fn_conv)(cbargtype *, argtype *) = (void (*)(cbargtype *, argtype *))fn; \
|
||||
fn_conv((cbargtype *)node, (argtype *)arg); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void \
|
||||
lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \
|
||||
void (*fn)(cbargtype *, argtype *), \
|
||||
argtype *arg) \
|
||||
{ \
|
||||
OPENSSL_LH_doall_arg_thunk((OPENSSL_LHASH *)lh, \
|
||||
lh_##type##_doall_##argtype##_thunk, \
|
||||
(OPENSSL_LH_DOALL_FUNCARG)fn, \
|
||||
(void *)arg); \
|
||||
} \
|
||||
LHASH_OF(type)
|
||||
|
||||
/* clang-format off */
|
||||
DEFINE_LHASH_OF_INTERNAL(OPENSSL_STRING);
|
||||
#define lh_OPENSSL_STRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_STRING) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_OPENSSL_STRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_STRING_lh_compfunc_type(cmp)), lh_OPENSSL_STRING_hash_thunk, lh_OPENSSL_STRING_comp_thunk, lh_OPENSSL_STRING_doall_thunk, lh_OPENSSL_STRING_doall_arg_thunk))
|
||||
#define lh_OPENSSL_STRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_STRING_lh_type(lh))
|
||||
@@ -390,8 +408,9 @@ DEFINE_LHASH_OF_INTERNAL(OPENSSL_CSTRING);
|
||||
#define lh_OPENSSL_CSTRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh), dl)
|
||||
#define lh_OPENSSL_CSTRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(dfn))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,20 +10,22 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_OCSP_H
|
||||
# define OPENSSL_OCSP_H
|
||||
# pragma once
|
||||
#define OPENSSL_OCSP_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OCSP_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_OCSP_H
|
||||
#endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/http.h>
|
||||
# include <openssl/asn1.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/http.h>
|
||||
#include <openssl/asn1.h>
|
||||
|
||||
/*
|
||||
* These definitions are outside the OPENSSL_NO_OCSP guard because although for
|
||||
@@ -44,47 +46,46 @@
|
||||
* privilegeWithdrawn (9),
|
||||
* aACompromise (10) }
|
||||
*/
|
||||
# define OCSP_REVOKED_STATUS_NOSTATUS -1
|
||||
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
||||
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
||||
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
||||
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
||||
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
||||
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
||||
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
||||
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
||||
# define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9
|
||||
# define OCSP_REVOKED_STATUS_AACOMPROMISE 10
|
||||
#define OCSP_REVOKED_STATUS_NOSTATUS -1
|
||||
#define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
||||
#define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
||||
#define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
||||
#define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
||||
#define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
||||
#define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
||||
#define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
||||
#define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
||||
#define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9
|
||||
#define OCSP_REVOKED_STATUS_AACOMPROMISE 10
|
||||
|
||||
#ifndef OPENSSL_NO_OCSP
|
||||
|
||||
# ifndef OPENSSL_NO_OCSP
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/ocsperr.h>
|
||||
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/x509v3.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/ocsperr.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Various flags and values */
|
||||
|
||||
# define OCSP_DEFAULT_NONCE_LENGTH 16
|
||||
#define OCSP_DEFAULT_NONCE_LENGTH 16
|
||||
|
||||
# define OCSP_NOCERTS 0x1
|
||||
# define OCSP_NOINTERN 0x2
|
||||
# define OCSP_NOSIGS 0x4
|
||||
# define OCSP_NOCHAIN 0x8
|
||||
# define OCSP_NOVERIFY 0x10
|
||||
# define OCSP_NOEXPLICIT 0x20
|
||||
# define OCSP_NOCASIGN 0x40
|
||||
# define OCSP_NODELEGATED 0x80
|
||||
# define OCSP_NOCHECKS 0x100
|
||||
# define OCSP_TRUSTOTHER 0x200
|
||||
# define OCSP_RESPID_KEY 0x400
|
||||
# define OCSP_NOTIME 0x800
|
||||
# define OCSP_PARTIAL_CHAIN 0x1000
|
||||
#define OCSP_NOCERTS 0x1
|
||||
#define OCSP_NOINTERN 0x2
|
||||
#define OCSP_NOSIGS 0x4
|
||||
#define OCSP_NOCHAIN 0x8
|
||||
#define OCSP_NOVERIFY 0x10
|
||||
#define OCSP_NOEXPLICIT 0x20
|
||||
#define OCSP_NOCASIGN 0x40
|
||||
#define OCSP_NODELEGATED 0x80
|
||||
#define OCSP_NOCHECKS 0x100
|
||||
#define OCSP_TRUSTOTHER 0x200
|
||||
#define OCSP_RESPID_KEY 0x400
|
||||
#define OCSP_NOTIME 0x800
|
||||
#define OCSP_PARTIAL_CHAIN 0x1000
|
||||
|
||||
typedef struct ocsp_cert_id_st OCSP_CERTID;
|
||||
typedef struct ocsp_one_request_st OCSP_ONEREQ;
|
||||
@@ -92,6 +93,7 @@ typedef struct ocsp_req_info_st OCSP_REQINFO;
|
||||
typedef struct ocsp_signature_st OCSP_SIGNATURE;
|
||||
typedef struct ocsp_request_st OCSP_REQUEST;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_CERTID, OCSP_CERTID, OCSP_CERTID)
|
||||
#define sk_OCSP_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
||||
#define sk_OCSP_CERTID_value(sk, idx) ((OCSP_CERTID *)OPENSSL_sk_value(ossl_check_const_OCSP_CERTID_sk_type(sk), (idx)))
|
||||
@@ -145,19 +147,21 @@ SKM_DEFINE_STACK_OF_INTERNAL(OCSP_ONEREQ, OCSP_ONEREQ, OCSP_ONEREQ)
|
||||
#define sk_OCSP_ONEREQ_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_copyfunc_type(copyfunc), ossl_check_OCSP_ONEREQ_freefunc_type(freefunc)))
|
||||
#define sk_OCSP_ONEREQ_set_cmp_func(sk, cmp) ((sk_OCSP_ONEREQ_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
||||
# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
||||
# define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
||||
# define OCSP_RESPONSE_STATUS_TRYLATER 3
|
||||
# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
||||
# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
||||
#define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
||||
#define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
||||
#define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
||||
#define OCSP_RESPONSE_STATUS_TRYLATER 3
|
||||
#define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
||||
#define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
||||
|
||||
typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
|
||||
|
||||
# define V_OCSP_RESPID_NAME 0
|
||||
# define V_OCSP_RESPID_KEY 1
|
||||
#define V_OCSP_RESPID_NAME 0
|
||||
#define V_OCSP_RESPID_KEY 1
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_RESPID, OCSP_RESPID, OCSP_RESPID)
|
||||
#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
||||
#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
|
||||
@@ -185,16 +189,18 @@ SKM_DEFINE_STACK_OF_INTERNAL(OCSP_RESPID, OCSP_RESPID, OCSP_RESPID)
|
||||
#define sk_OCSP_RESPID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_copyfunc_type(copyfunc), ossl_check_OCSP_RESPID_freefunc_type(freefunc)))
|
||||
#define sk_OCSP_RESPID_set_cmp_func(sk, cmp) ((sk_OCSP_RESPID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
|
||||
|
||||
# define V_OCSP_CERTSTATUS_GOOD 0
|
||||
# define V_OCSP_CERTSTATUS_REVOKED 1
|
||||
# define V_OCSP_CERTSTATUS_UNKNOWN 2
|
||||
#define V_OCSP_CERTSTATUS_GOOD 0
|
||||
#define V_OCSP_CERTSTATUS_REVOKED 1
|
||||
#define V_OCSP_CERTSTATUS_UNKNOWN 2
|
||||
|
||||
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
|
||||
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_SINGLERESP, OCSP_SINGLERESP, OCSP_SINGLERESP)
|
||||
#define sk_OCSP_SINGLERESP_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
||||
#define sk_OCSP_SINGLERESP_value(sk, idx) ((OCSP_SINGLERESP *)OPENSSL_sk_value(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), (idx)))
|
||||
@@ -222,6 +228,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OCSP_SINGLERESP, OCSP_SINGLERESP, OCSP_SINGLERESP)
|
||||
#define sk_OCSP_SINGLERESP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_copyfunc_type(copyfunc), ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc)))
|
||||
#define sk_OCSP_SINGLERESP_set_cmp_func(sk, cmp) ((sk_OCSP_SINGLERESP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct ocsp_response_data_st OCSP_RESPDATA;
|
||||
|
||||
@@ -230,76 +237,74 @@ typedef struct ocsp_basic_response_st OCSP_BASICRESP;
|
||||
typedef struct ocsp_crl_id_st OCSP_CRLID;
|
||||
typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
|
||||
|
||||
# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
||||
# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
||||
#define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
||||
#define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
||||
|
||||
# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
|
||||
#define d2i_OCSP_REQUEST_bio(bp, p) ASN1_d2i_bio_of(OCSP_REQUEST, OCSP_REQUEST_new, d2i_OCSP_REQUEST, bp, p)
|
||||
|
||||
# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
|
||||
#define d2i_OCSP_RESPONSE_bio(bp, p) ASN1_d2i_bio_of(OCSP_RESPONSE, OCSP_RESPONSE_new, d2i_OCSP_RESPONSE, bp, p)
|
||||
|
||||
# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
||||
(char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \
|
||||
bp,(char **)(x),cb,NULL)
|
||||
#define PEM_read_bio_OCSP_REQUEST(bp, x, cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
||||
(d2i_of_void *)d2i_OCSP_REQUEST, PEM_STRING_OCSP_REQUEST, \
|
||||
bp, (char **)(x), cb, NULL)
|
||||
|
||||
# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\
|
||||
(char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \
|
||||
bp,(char **)(x),cb,NULL)
|
||||
#define PEM_read_bio_OCSP_RESPONSE(bp, x, cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio( \
|
||||
(d2i_of_void *)d2i_OCSP_RESPONSE, PEM_STRING_OCSP_RESPONSE, \
|
||||
bp, (char **)(x), cb, NULL)
|
||||
|
||||
# define PEM_write_bio_OCSP_REQUEST(bp,o) \
|
||||
PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\
|
||||
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
||||
#define PEM_write_bio_OCSP_REQUEST(bp, o) \
|
||||
PEM_ASN1_write_bio((i2d_of_void *)i2d_OCSP_REQUEST, PEM_STRING_OCSP_REQUEST, \
|
||||
bp, (char *)(o), NULL, NULL, 0, NULL, NULL)
|
||||
|
||||
# define PEM_write_bio_OCSP_RESPONSE(bp,o) \
|
||||
PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
|
||||
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
||||
#define PEM_write_bio_OCSP_RESPONSE(bp, o) \
|
||||
PEM_ASN1_write_bio((i2d_of_void *)i2d_OCSP_RESPONSE, PEM_STRING_OCSP_RESPONSE, \
|
||||
bp, (char *)(o), NULL, NULL, 0, NULL, NULL)
|
||||
|
||||
# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
|
||||
#define i2d_OCSP_RESPONSE_bio(bp, o) ASN1_i2d_bio_of(OCSP_RESPONSE, i2d_OCSP_RESPONSE, bp, o)
|
||||
|
||||
# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
|
||||
#define i2d_OCSP_REQUEST_bio(bp, o) ASN1_i2d_bio_of(OCSP_REQUEST, i2d_OCSP_REQUEST, bp, o)
|
||||
|
||||
# define ASN1_BIT_STRING_digest(data,type,md,len) \
|
||||
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
||||
#define ASN1_BIT_STRING_digest(data, type, md, len) \
|
||||
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING), type, data, md, len)
|
||||
|
||||
# define OCSP_CERTSTATUS_dup(cs)\
|
||||
(OCSP_CERTSTATUS*)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS,\
|
||||
(d2i_of_void *)d2i_OCSP_CERTSTATUS,(char *)(cs))
|
||||
#define OCSP_CERTSTATUS_dup(cs) \
|
||||
(OCSP_CERTSTATUS *)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS, \
|
||||
(d2i_of_void *)d2i_OCSP_CERTSTATUS, (char *)(cs))
|
||||
|
||||
DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID)
|
||||
|
||||
OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
|
||||
const OCSP_REQUEST *req, int buf_size);
|
||||
const OCSP_REQUEST *req, int buf_size);
|
||||
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
|
||||
# define OCSP_REQ_CTX_new(io, buf_size) \
|
||||
OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
|
||||
# define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
|
||||
# define OCSP_REQ_CTX_http(rctx, op, path) \
|
||||
(OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && \
|
||||
OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
|
||||
NULL, NULL, path))
|
||||
# define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
|
||||
# define OCSP_REQ_CTX_i2d(r, it, req) \
|
||||
OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)
|
||||
# define OCSP_REQ_CTX_set1_req(r, req) \
|
||||
OCSP_REQ_CTX_i2d(r, ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)(req))
|
||||
# define OCSP_REQ_CTX_nbio OSSL_HTTP_REQ_CTX_nbio
|
||||
# define OCSP_REQ_CTX_nbio_d2i OSSL_HTTP_REQ_CTX_nbio_d2i
|
||||
# define OCSP_sendreq_nbio(p, r) \
|
||||
OSSL_HTTP_REQ_CTX_nbio_d2i(r, (ASN1_VALUE **)(p), \
|
||||
ASN1_ITEM_rptr(OCSP_RESPONSE))
|
||||
# define OCSP_REQ_CTX_get0_mem_bio OSSL_HTTP_REQ_CTX_get0_mem_bio
|
||||
# define OCSP_set_max_response_length OSSL_HTTP_REQ_CTX_set_max_response_length
|
||||
# endif
|
||||
#define OCSP_REQ_CTX_new(io, buf_size) \
|
||||
OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
|
||||
#define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
|
||||
#define OCSP_REQ_CTX_http(rctx, op, path) \
|
||||
(OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, NULL, NULL, path))
|
||||
#define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
|
||||
#define OCSP_REQ_CTX_i2d(r, it, req) \
|
||||
OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)
|
||||
#define OCSP_REQ_CTX_set1_req(r, req) \
|
||||
OCSP_REQ_CTX_i2d(r, ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)(req))
|
||||
#define OCSP_REQ_CTX_nbio OSSL_HTTP_REQ_CTX_nbio
|
||||
#define OCSP_REQ_CTX_nbio_d2i OSSL_HTTP_REQ_CTX_nbio_d2i
|
||||
#define OCSP_sendreq_nbio(p, r) \
|
||||
OSSL_HTTP_REQ_CTX_nbio_d2i(r, (ASN1_VALUE **)(p), \
|
||||
ASN1_ITEM_rptr(OCSP_RESPONSE))
|
||||
#define OCSP_REQ_CTX_get0_mem_bio OSSL_HTTP_REQ_CTX_get0_mem_bio
|
||||
#define OCSP_set_max_response_length OSSL_HTTP_REQ_CTX_set_max_response_length
|
||||
#endif
|
||||
|
||||
OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
|
||||
const X509 *issuer);
|
||||
const X509 *issuer);
|
||||
|
||||
OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
|
||||
const X509_NAME *issuerName,
|
||||
const ASN1_BIT_STRING *issuerKey,
|
||||
const ASN1_INTEGER *serialNumber);
|
||||
const X509_NAME *issuerName,
|
||||
const ASN1_BIT_STRING *issuerKey,
|
||||
const ASN1_INTEGER *serialNumber);
|
||||
|
||||
OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
|
||||
|
||||
@@ -312,10 +317,10 @@ int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
|
||||
int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
||||
|
||||
int OCSP_request_sign(OCSP_REQUEST *req,
|
||||
X509 *signer,
|
||||
EVP_PKEY *key,
|
||||
const EVP_MD *dgst,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
X509 *signer,
|
||||
EVP_PKEY *key,
|
||||
const EVP_MD *dgst,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
|
||||
int OCSP_response_status(OCSP_RESPONSE *resp);
|
||||
OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
|
||||
@@ -324,36 +329,36 @@ const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
|
||||
const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
|
||||
const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
|
||||
int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
|
||||
STACK_OF(X509) *extra_certs);
|
||||
STACK_OF(X509) *extra_certs);
|
||||
|
||||
int OCSP_resp_count(OCSP_BASICRESP *bs);
|
||||
OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
|
||||
const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
|
||||
const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs);
|
||||
const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
|
||||
int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
|
||||
const ASN1_OCTET_STRING **pid,
|
||||
const X509_NAME **pname);
|
||||
const ASN1_OCTET_STRING **pid,
|
||||
const X509_NAME **pname);
|
||||
int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
|
||||
ASN1_OCTET_STRING **pid,
|
||||
X509_NAME **pname);
|
||||
ASN1_OCTET_STRING **pid,
|
||||
X509_NAME **pname);
|
||||
|
||||
int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
|
||||
int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
|
||||
ASN1_GENERALIZEDTIME **revtime,
|
||||
ASN1_GENERALIZEDTIME **thisupd,
|
||||
ASN1_GENERALIZEDTIME **nextupd);
|
||||
ASN1_GENERALIZEDTIME **revtime,
|
||||
ASN1_GENERALIZEDTIME **thisupd,
|
||||
ASN1_GENERALIZEDTIME **nextupd);
|
||||
int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
|
||||
int *reason,
|
||||
ASN1_GENERALIZEDTIME **revtime,
|
||||
ASN1_GENERALIZEDTIME **thisupd,
|
||||
ASN1_GENERALIZEDTIME **nextupd);
|
||||
int *reason,
|
||||
ASN1_GENERALIZEDTIME **revtime,
|
||||
ASN1_GENERALIZEDTIME **thisupd,
|
||||
ASN1_GENERALIZEDTIME **nextupd);
|
||||
int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
|
||||
ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
|
||||
ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
|
||||
|
||||
int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,
|
||||
X509_STORE *store, unsigned long flags);
|
||||
X509_STORE *store, unsigned long flags);
|
||||
|
||||
# define OCSP_parse_url(url, host, port, path, ssl) \
|
||||
#define OCSP_parse_url(url, host, port, path, ssl) \
|
||||
OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL)
|
||||
|
||||
int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
||||
@@ -363,29 +368,29 @@ int OCSP_request_onereq_count(OCSP_REQUEST *req);
|
||||
OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
|
||||
OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
|
||||
int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
|
||||
ASN1_OCTET_STRING **pikeyHash,
|
||||
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
||||
ASN1_OCTET_STRING **pikeyHash,
|
||||
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
||||
int OCSP_request_is_signed(OCSP_REQUEST *req);
|
||||
OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
|
||||
OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
|
||||
OCSP_CERTID *cid,
|
||||
int status, int reason,
|
||||
ASN1_TIME *revtime,
|
||||
ASN1_TIME *thisupd,
|
||||
ASN1_TIME *nextupd);
|
||||
OCSP_CERTID *cid,
|
||||
int status, int reason,
|
||||
ASN1_TIME *revtime,
|
||||
ASN1_TIME *thisupd,
|
||||
ASN1_TIME *nextupd);
|
||||
int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
|
||||
int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
||||
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
|
||||
X509 *signer, EVP_MD_CTX *ctx,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
X509 *signer, EVP_MD_CTX *ctx,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
||||
int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
||||
int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *propq);
|
||||
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
||||
|
||||
X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
|
||||
@@ -399,14 +404,14 @@ X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
|
||||
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
||||
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
||||
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
|
||||
X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
|
||||
X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
|
||||
void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
|
||||
int *idx);
|
||||
int *idx);
|
||||
int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
|
||||
|
||||
int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
|
||||
@@ -417,35 +422,35 @@ X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
|
||||
X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
|
||||
void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
|
||||
int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
|
||||
|
||||
int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
|
||||
int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
|
||||
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
|
||||
X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
|
||||
void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
|
||||
int *idx);
|
||||
int *idx);
|
||||
int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
|
||||
int crit, unsigned long flags);
|
||||
int crit, unsigned long flags);
|
||||
int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
|
||||
|
||||
int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
|
||||
int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
|
||||
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
|
||||
X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
|
||||
void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
|
||||
int *idx);
|
||||
int *idx);
|
||||
int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
|
||||
int crit, unsigned long flags);
|
||||
int crit, unsigned long flags);
|
||||
int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
|
||||
const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
|
||||
|
||||
@@ -473,11 +478,10 @@ int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
|
||||
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
|
||||
|
||||
int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
||||
X509_STORE *st, unsigned long flags);
|
||||
X509_STORE *st, unsigned long flags);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined(OPENSSL_NO_OCSP) */
|
||||
#endif
|
||||
#endif /* !defined(OPENSSL_NO_OCSP) */
|
||||
#endif
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_OPENSSLV_H
|
||||
# define OPENSSL_OPENSSLV_H
|
||||
# pragma once
|
||||
#define OPENSSL_OPENSSLV_H
|
||||
#pragma once
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* SECTION 1: VERSION DATA. These will change for each release
|
||||
@@ -27,9 +27,15 @@ extern "C" {
|
||||
*
|
||||
* These macros express version number MAJOR.MINOR.PATCH exactly
|
||||
*/
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_MAJOR 3
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_MINOR 5
|
||||
# define OPENSSL_VERSION_PATCH 4
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_PATCH 5
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* Additional version information
|
||||
@@ -39,10 +45,14 @@ extern "C" {
|
||||
*/
|
||||
|
||||
/* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_PRE_RELEASE ""
|
||||
/* clang-format on */
|
||||
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */
|
||||
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_BUILD_METADATA ""
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA
|
||||
@@ -57,14 +67,16 @@ extern "C" {
|
||||
* be related to the API version expressed with the macros above.
|
||||
* This is defined in free form.
|
||||
*/
|
||||
/* clang-format off */
|
||||
# define OPENSSL_SHLIB_VERSION 3
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* SECTION 2: USEFUL MACROS
|
||||
*/
|
||||
|
||||
/* For checking general API compatibility when preprocessing */
|
||||
# define OPENSSL_VERSION_PREREQ(maj,min) \
|
||||
#define OPENSSL_VERSION_PREREQ(maj, min) \
|
||||
((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min))
|
||||
|
||||
/*
|
||||
@@ -74,36 +86,46 @@ extern "C" {
|
||||
* longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
|
||||
* OPENSSL_VERSION_BUILD_METADATA_STR appended.
|
||||
*/
|
||||
# define OPENSSL_VERSION_STR "3.5.4"
|
||||
# define OPENSSL_FULL_VERSION_STR "3.5.4"
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_STR "3.5.5"
|
||||
/* clang-format on */
|
||||
/* clang-format off */
|
||||
# define OPENSSL_FULL_VERSION_STR "3.5.5"
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* SECTION 3: ADDITIONAL METADATA
|
||||
*
|
||||
* These strings are defined separately to allow them to be parsable.
|
||||
*/
|
||||
# define OPENSSL_RELEASE_DATE "30 Sep 2025"
|
||||
/* clang-format off */
|
||||
# define OPENSSL_RELEASE_DATE "27 Jan 2026"
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* SECTION 4: BACKWARD COMPATIBILITY
|
||||
*/
|
||||
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 3.5.4 30 Sep 2025"
|
||||
/* clang-format off */
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL 3.5.5 27 Jan 2026"
|
||||
/* clang-format on */
|
||||
|
||||
/* clang-format off */
|
||||
/* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PP0L */
|
||||
# define OPENSSL_VERSION_NUMBER \
|
||||
( (OPENSSL_VERSION_MAJOR<<28) \
|
||||
|(OPENSSL_VERSION_MINOR<<20) \
|
||||
|(OPENSSL_VERSION_PATCH<<4) \
|
||||
|0x0L )
|
||||
/* clang-format on */
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OPENSSLV_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_OPENSSLV_H
|
||||
#endif
|
||||
|
||||
#endif /* OPENSSL_OPENSSLV_H */
|
||||
#endif /* OPENSSL_OPENSSLV_H */
|
||||
|
||||
@@ -10,51 +10,53 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_PKCS12_H
|
||||
# define OPENSSL_PKCS12_H
|
||||
# pragma once
|
||||
#define OPENSSL_PKCS12_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS12_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_PKCS12_H
|
||||
#endif
|
||||
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/pkcs12err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pkcs12err.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define PKCS12_KEY_ID 1
|
||||
# define PKCS12_IV_ID 2
|
||||
# define PKCS12_MAC_ID 3
|
||||
#define PKCS12_KEY_ID 1
|
||||
#define PKCS12_IV_ID 2
|
||||
#define PKCS12_MAC_ID 3
|
||||
|
||||
/* Default iteration count */
|
||||
# ifndef PKCS12_DEFAULT_ITER
|
||||
# define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER
|
||||
# endif
|
||||
#ifndef PKCS12_DEFAULT_ITER
|
||||
#define PKCS12_DEFAULT_ITER PKCS5_DEFAULT_ITER
|
||||
#endif
|
||||
|
||||
# define PKCS12_MAC_KEY_LENGTH 20
|
||||
#define PKCS12_MAC_KEY_LENGTH 20
|
||||
|
||||
/* The macro is expected to be used only internally. Kept for backwards compatibility. */
|
||||
# define PKCS12_SALT_LEN 8
|
||||
#define PKCS12_SALT_LEN 8
|
||||
|
||||
/* It's not clear if these are actually needed... */
|
||||
# define PKCS12_key_gen PKCS12_key_gen_utf8
|
||||
# define PKCS12_add_friendlyname PKCS12_add_friendlyname_utf8
|
||||
#define PKCS12_key_gen PKCS12_key_gen_utf8
|
||||
#define PKCS12_add_friendlyname PKCS12_add_friendlyname_utf8
|
||||
|
||||
/* MS key usage constants */
|
||||
|
||||
# define KEY_EX 0x10
|
||||
# define KEY_SIG 0x80
|
||||
#define KEY_EX 0x10
|
||||
#define KEY_SIG 0x80
|
||||
|
||||
typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA;
|
||||
|
||||
@@ -62,6 +64,7 @@ typedef struct PKCS12_st PKCS12;
|
||||
|
||||
typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(PKCS12_SAFEBAG, PKCS12_SAFEBAG, PKCS12_SAFEBAG)
|
||||
#define sk_PKCS12_SAFEBAG_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk))
|
||||
#define sk_PKCS12_SAFEBAG_value(sk, idx) ((PKCS12_SAFEBAG *)OPENSSL_sk_value(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk), (idx)))
|
||||
@@ -89,45 +92,46 @@ SKM_DEFINE_STACK_OF_INTERNAL(PKCS12_SAFEBAG, PKCS12_SAFEBAG, PKCS12_SAFEBAG)
|
||||
#define sk_PKCS12_SAFEBAG_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS12_SAFEBAG) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_copyfunc_type(copyfunc), ossl_check_PKCS12_SAFEBAG_freefunc_type(freefunc)))
|
||||
#define sk_PKCS12_SAFEBAG_set_cmp_func(sk, cmp) ((sk_PKCS12_SAFEBAG_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS12_SAFEBAG_sk_type(sk), ossl_check_PKCS12_SAFEBAG_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct pkcs12_bag_st PKCS12_BAGS;
|
||||
|
||||
# define PKCS12_ERROR 0
|
||||
# define PKCS12_OK 1
|
||||
#define PKCS12_ERROR 0
|
||||
#define PKCS12_OK 1
|
||||
|
||||
/* Compatibility macros */
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
|
||||
# define M_PKCS12_bag_type PKCS12_bag_type
|
||||
# define M_PKCS12_cert_bag_type PKCS12_cert_bag_type
|
||||
# define M_PKCS12_crl_bag_type PKCS12_cert_bag_type
|
||||
#define M_PKCS12_bag_type PKCS12_bag_type
|
||||
#define M_PKCS12_cert_bag_type PKCS12_cert_bag_type
|
||||
#define M_PKCS12_crl_bag_type PKCS12_cert_bag_type
|
||||
|
||||
# define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert
|
||||
# define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl
|
||||
# define PKCS12_bag_type PKCS12_SAFEBAG_get_nid
|
||||
# define PKCS12_cert_bag_type PKCS12_SAFEBAG_get_bag_nid
|
||||
# define PKCS12_x5092certbag PKCS12_SAFEBAG_create_cert
|
||||
# define PKCS12_x509crl2certbag PKCS12_SAFEBAG_create_crl
|
||||
# define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf
|
||||
# define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt
|
||||
#define PKCS12_certbag2x509 PKCS12_SAFEBAG_get1_cert
|
||||
#define PKCS12_certbag2scrl PKCS12_SAFEBAG_get1_crl
|
||||
#define PKCS12_bag_type PKCS12_SAFEBAG_get_nid
|
||||
#define PKCS12_cert_bag_type PKCS12_SAFEBAG_get_bag_nid
|
||||
#define PKCS12_x5092certbag PKCS12_SAFEBAG_create_cert
|
||||
#define PKCS12_x509crl2certbag PKCS12_SAFEBAG_create_crl
|
||||
#define PKCS12_MAKE_KEYBAG PKCS12_SAFEBAG_create0_p8inf
|
||||
#define PKCS12_MAKE_SHKEYBAG PKCS12_SAFEBAG_create_pkcs8_encrypt
|
||||
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
OSSL_DEPRECATEDIN_1_1_0 ASN1_TYPE *PKCS12_get_attr(const PKCS12_SAFEBAG *bag,
|
||||
int attr_nid);
|
||||
int attr_nid);
|
||||
#endif
|
||||
|
||||
ASN1_TYPE *PKCS8_get_attr(PKCS8_PRIV_KEY_INFO *p8, int attr_nid);
|
||||
int PKCS12_mac_present(const PKCS12 *p12);
|
||||
void PKCS12_get0_mac(const ASN1_OCTET_STRING **pmac,
|
||||
const X509_ALGOR **pmacalg,
|
||||
const ASN1_OCTET_STRING **psalt,
|
||||
const ASN1_INTEGER **piter,
|
||||
const PKCS12 *p12);
|
||||
const X509_ALGOR **pmacalg,
|
||||
const ASN1_OCTET_STRING **psalt,
|
||||
const ASN1_INTEGER **piter,
|
||||
const PKCS12 *p12);
|
||||
|
||||
const ASN1_TYPE *PKCS12_SAFEBAG_get0_attr(const PKCS12_SAFEBAG *bag,
|
||||
int attr_nid);
|
||||
int attr_nid);
|
||||
const ASN1_OBJECT *PKCS12_SAFEBAG_get0_type(const PKCS12_SAFEBAG *bag);
|
||||
int PKCS12_SAFEBAG_get_nid(const PKCS12_SAFEBAG *bag);
|
||||
int PKCS12_SAFEBAG_get_bag_nid(const PKCS12_SAFEBAG *bag);
|
||||
@@ -149,159 +153,159 @@ PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_secret(int type, int vtype, const unsigned
|
||||
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_p8inf(PKCS8_PRIV_KEY_INFO *p8);
|
||||
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create0_pkcs8(X509_SIG *p8);
|
||||
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt(int pbe_nid,
|
||||
const char *pass,
|
||||
int passlen,
|
||||
unsigned char *salt,
|
||||
int saltlen, int iter,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf);
|
||||
const char *pass,
|
||||
int passlen,
|
||||
unsigned char *salt,
|
||||
int saltlen, int iter,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf);
|
||||
PKCS12_SAFEBAG *PKCS12_SAFEBAG_create_pkcs8_encrypt_ex(int pbe_nid,
|
||||
const char *pass,
|
||||
int passlen,
|
||||
unsigned char *salt,
|
||||
int saltlen, int iter,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
const char *pass,
|
||||
int passlen,
|
||||
unsigned char *salt,
|
||||
int saltlen, int iter,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
|
||||
PKCS12_SAFEBAG *PKCS12_item_pack_safebag(void *obj, const ASN1_ITEM *it,
|
||||
int nid1, int nid2);
|
||||
int nid1, int nid2);
|
||||
PKCS8_PRIV_KEY_INFO *PKCS8_decrypt(const X509_SIG *p8, const char *pass,
|
||||
int passlen);
|
||||
int passlen);
|
||||
PKCS8_PRIV_KEY_INFO *PKCS8_decrypt_ex(const X509_SIG *p8, const char *pass,
|
||||
int passlen, OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
int passlen, OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey(const PKCS12_SAFEBAG *bag,
|
||||
const char *pass, int passlen);
|
||||
const char *pass, int passlen);
|
||||
PKCS8_PRIV_KEY_INFO *PKCS12_decrypt_skey_ex(const PKCS12_SAFEBAG *bag,
|
||||
const char *pass, int passlen,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
const char *pass, int passlen,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
X509_SIG *PKCS8_encrypt(int pbe_nid, const EVP_CIPHER *cipher,
|
||||
const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
|
||||
const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8);
|
||||
X509_SIG *PKCS8_encrypt_ex(int pbe_nid, const EVP_CIPHER *cipher,
|
||||
const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int iter, PKCS8_PRIV_KEY_INFO *p8,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
X509_SIG *PKCS8_set0_pbe(const char *pass, int passlen,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe);
|
||||
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe);
|
||||
X509_SIG *PKCS8_set0_pbe_ex(const char *pass, int passlen,
|
||||
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
PKCS8_PRIV_KEY_INFO *p8inf, X509_ALGOR *pbe,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
PKCS7 *PKCS12_pack_p7data(STACK_OF(PKCS12_SAFEBAG) *sk);
|
||||
STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7data(PKCS7 *p7);
|
||||
PKCS7 *PKCS12_pack_p7encdata(int pbe_nid, const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
STACK_OF(PKCS12_SAFEBAG) *bags);
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
STACK_OF(PKCS12_SAFEBAG) *bags);
|
||||
PKCS7 *PKCS12_pack_p7encdata_ex(int pbe_nid, const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
STACK_OF(PKCS12_SAFEBAG) *bags,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
STACK_OF(PKCS12_SAFEBAG) *bags,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
STACK_OF(PKCS12_SAFEBAG) *PKCS12_unpack_p7encdata(PKCS7 *p7, const char *pass,
|
||||
int passlen);
|
||||
int passlen);
|
||||
|
||||
int PKCS12_pack_authsafes(PKCS12 *p12, STACK_OF(PKCS7) *safes);
|
||||
STACK_OF(PKCS7) *PKCS12_unpack_authsafes(const PKCS12 *p12);
|
||||
|
||||
int PKCS12_add_localkeyid(PKCS12_SAFEBAG *bag, unsigned char *name,
|
||||
int namelen);
|
||||
int namelen);
|
||||
int PKCS12_add_friendlyname_asc(PKCS12_SAFEBAG *bag, const char *name,
|
||||
int namelen);
|
||||
int namelen);
|
||||
int PKCS12_add_friendlyname_utf8(PKCS12_SAFEBAG *bag, const char *name,
|
||||
int namelen);
|
||||
int namelen);
|
||||
int PKCS12_add_CSPName_asc(PKCS12_SAFEBAG *bag, const char *name,
|
||||
int namelen);
|
||||
int namelen);
|
||||
int PKCS12_add_friendlyname_uni(PKCS12_SAFEBAG *bag,
|
||||
const unsigned char *name, int namelen);
|
||||
const unsigned char *name, int namelen);
|
||||
int PKCS12_add1_attr_by_NID(PKCS12_SAFEBAG *bag, int nid, int type,
|
||||
const unsigned char *bytes, int len);
|
||||
const unsigned char *bytes, int len);
|
||||
int PKCS12_add1_attr_by_txt(PKCS12_SAFEBAG *bag, const char *attrname, int type,
|
||||
const unsigned char *bytes, int len);
|
||||
const unsigned char *bytes, int len);
|
||||
int PKCS8_add_keyusage(PKCS8_PRIV_KEY_INFO *p8, int usage);
|
||||
ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs,
|
||||
int attr_nid);
|
||||
int attr_nid);
|
||||
char *PKCS12_get_friendlyname(PKCS12_SAFEBAG *bag);
|
||||
const STACK_OF(X509_ATTRIBUTE) *
|
||||
PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag);
|
||||
void PKCS12_SAFEBAG_set0_attrs(PKCS12_SAFEBAG *bag, STACK_OF(X509_ATTRIBUTE) *attrs);
|
||||
unsigned char *PKCS12_pbe_crypt(const X509_ALGOR *algor,
|
||||
const char *pass, int passlen,
|
||||
const unsigned char *in, int inlen,
|
||||
unsigned char **data, int *datalen,
|
||||
int en_de);
|
||||
const char *pass, int passlen,
|
||||
const unsigned char *in, int inlen,
|
||||
unsigned char **data, int *datalen,
|
||||
int en_de);
|
||||
unsigned char *PKCS12_pbe_crypt_ex(const X509_ALGOR *algor,
|
||||
const char *pass, int passlen,
|
||||
const unsigned char *in, int inlen,
|
||||
unsigned char **data, int *datalen,
|
||||
int en_de, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *pass, int passlen,
|
||||
const unsigned char *in, int inlen,
|
||||
unsigned char **data, int *datalen,
|
||||
int en_de, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
void *PKCS12_item_decrypt_d2i(const X509_ALGOR *algor, const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
const ASN1_OCTET_STRING *oct, int zbuf);
|
||||
const char *pass, int passlen,
|
||||
const ASN1_OCTET_STRING *oct, int zbuf);
|
||||
void *PKCS12_item_decrypt_d2i_ex(const X509_ALGOR *algor, const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
const ASN1_OCTET_STRING *oct, int zbuf,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
const char *pass, int passlen,
|
||||
const ASN1_OCTET_STRING *oct, int zbuf,
|
||||
OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt(X509_ALGOR *algor,
|
||||
const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
void *obj, int zbuf);
|
||||
const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
void *obj, int zbuf);
|
||||
ASN1_OCTET_STRING *PKCS12_item_i2d_encrypt_ex(X509_ALGOR *algor,
|
||||
const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
void *obj, int zbuf,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
const ASN1_ITEM *it,
|
||||
const char *pass, int passlen,
|
||||
void *obj, int zbuf,
|
||||
OSSL_LIB_CTX *ctx,
|
||||
const char *propq);
|
||||
PKCS12 *PKCS12_init(int mode);
|
||||
PKCS12 *PKCS12_init_ex(int mode, OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
int PKCS12_key_gen_asc(const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int PKCS12_key_gen_asc_ex(const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int PKCS12_key_gen_uni(unsigned char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int PKCS12_key_gen_uni_ex(unsigned char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int PKCS12_key_gen_utf8(const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type);
|
||||
int PKCS12_key_gen_utf8_ex(const char *pass, int passlen, unsigned char *salt,
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int saltlen, int id, int iter, int n,
|
||||
unsigned char *out, const EVP_MD *md_type,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
int PKCS12_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
||||
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
||||
const EVP_MD *md_type, int en_de);
|
||||
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
||||
const EVP_MD *md_type, int en_de);
|
||||
int PKCS12_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
|
||||
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
||||
const EVP_MD *md_type, int en_de,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
ASN1_TYPE *param, const EVP_CIPHER *cipher,
|
||||
const EVP_MD *md_type, int en_de,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int PKCS12_gen_mac(PKCS12 *p12, const char *pass, int passlen,
|
||||
unsigned char *mac, unsigned int *maclen);
|
||||
unsigned char *mac, unsigned int *maclen);
|
||||
int PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen);
|
||||
int PKCS12_set_mac(PKCS12 *p12, const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
const EVP_MD *md_type);
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
const EVP_MD *md_type);
|
||||
int PKCS12_set_pbmac1_pbkdf2(PKCS12 *p12, const char *pass, int passlen,
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
const EVP_MD *md_type, const char *prf_md_name);
|
||||
unsigned char *salt, int saltlen, int iter,
|
||||
const EVP_MD *md_type, const char *prf_md_name);
|
||||
int PKCS12_setup_mac(PKCS12 *p12, int iter, unsigned char *salt,
|
||||
int saltlen, const EVP_MD *md_type);
|
||||
int saltlen, const EVP_MD *md_type);
|
||||
unsigned char *OPENSSL_asc2uni(const char *asc, int asclen,
|
||||
unsigned char **uni, int *unilen);
|
||||
unsigned char **uni, int *unilen);
|
||||
char *OPENSSL_uni2asc(const unsigned char *uni, int unilen);
|
||||
unsigned char *OPENSSL_utf82uni(const char *asc, int asclen,
|
||||
unsigned char **uni, int *unilen);
|
||||
unsigned char **uni, int *unilen);
|
||||
char *OPENSSL_uni2utf8(const unsigned char *uni, int unilen);
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(PKCS12)
|
||||
@@ -314,53 +318,53 @@ DECLARE_ASN1_ITEM(PKCS12_AUTHSAFES)
|
||||
|
||||
void PKCS12_PBE_add(void);
|
||||
int PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert,
|
||||
STACK_OF(X509) **ca);
|
||||
STACK_OF(X509) **ca);
|
||||
typedef int PKCS12_create_cb(PKCS12_SAFEBAG *bag, void *cbarg);
|
||||
PKCS12 *PKCS12_create(const char *pass, const char *name, EVP_PKEY *pkey,
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype);
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype);
|
||||
PKCS12 *PKCS12_create_ex(const char *pass, const char *name, EVP_PKEY *pkey,
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
PKCS12 *PKCS12_create_ex2(const char *pass, const char *name, EVP_PKEY *pkey,
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype,
|
||||
OSSL_LIB_CTX *ctx, const char *propq,
|
||||
PKCS12_create_cb *cb, void *cbarg);
|
||||
X509 *cert, STACK_OF(X509) *ca, int nid_key, int nid_cert,
|
||||
int iter, int mac_iter, int keytype,
|
||||
OSSL_LIB_CTX *ctx, const char *propq,
|
||||
PKCS12_create_cb *cb, void *cbarg);
|
||||
|
||||
PKCS12_SAFEBAG *PKCS12_add_cert(STACK_OF(PKCS12_SAFEBAG) **pbags, X509 *cert);
|
||||
PKCS12_SAFEBAG *PKCS12_add_key(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
||||
EVP_PKEY *key, int key_usage, int iter,
|
||||
int key_nid, const char *pass);
|
||||
EVP_PKEY *key, int key_usage, int iter,
|
||||
int key_nid, const char *pass);
|
||||
PKCS12_SAFEBAG *PKCS12_add_key_ex(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
||||
EVP_PKEY *key, int key_usage, int iter,
|
||||
int key_nid, const char *pass,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
EVP_PKEY *key, int key_usage, int iter,
|
||||
int key_nid, const char *pass,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
PKCS12_SAFEBAG *PKCS12_add_secret(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
||||
int nid_type, const unsigned char *value, int len);
|
||||
int nid_type, const unsigned char *value, int len);
|
||||
int PKCS12_add_safe(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,
|
||||
int safe_nid, int iter, const char *pass);
|
||||
int safe_nid, int iter, const char *pass);
|
||||
int PKCS12_add_safe_ex(STACK_OF(PKCS7) **psafes, STACK_OF(PKCS12_SAFEBAG) *bags,
|
||||
int safe_nid, int iter, const char *pass,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
int safe_nid, int iter, const char *pass,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
PKCS12 *PKCS12_add_safes(STACK_OF(PKCS7) *safes, int p7_nid);
|
||||
PKCS12 *PKCS12_add_safes_ex(STACK_OF(PKCS7) *safes, int p7_nid,
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
OSSL_LIB_CTX *ctx, const char *propq);
|
||||
|
||||
int i2d_PKCS12_bio(BIO *bp, const PKCS12 *p12);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int i2d_PKCS12_fp(FILE *fp, const PKCS12 *p12);
|
||||
# endif
|
||||
#endif
|
||||
PKCS12 *d2i_PKCS12_bio(BIO *bp, PKCS12 **p12);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
PKCS12 *d2i_PKCS12_fp(FILE *fp, PKCS12 **p12);
|
||||
# endif
|
||||
#endif
|
||||
int PKCS12_newpass(PKCS12 *p12, const char *oldpass, const char *newpass);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,32 +10,33 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_PKCS7_H
|
||||
# define OPENSSL_PKCS7_H
|
||||
# pragma once
|
||||
#define OPENSSL_PKCS7_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS7_H
|
||||
# endif
|
||||
|
||||
# include <openssl/asn1.h>
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/e_os2.h>
|
||||
|
||||
# include <openssl/symhacks.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/pkcs7err.h>
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_PKCS7_H
|
||||
#endif
|
||||
|
||||
#include <openssl/asn1.h>
|
||||
#include <openssl/bio.h>
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
#include <openssl/symhacks.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/pkcs7err.h>
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*-
|
||||
Encryption_ID DES-CBC
|
||||
@@ -55,7 +56,7 @@ typedef struct pkcs7_issuer_and_serial_st {
|
||||
} PKCS7_ISSUER_AND_SERIAL;
|
||||
|
||||
typedef struct pkcs7_signer_info_st {
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
|
||||
X509_ALGOR *digest_alg;
|
||||
STACK_OF(X509_ATTRIBUTE) *auth_attr; /* [ 0 ] */
|
||||
@@ -66,6 +67,7 @@ typedef struct pkcs7_signer_info_st {
|
||||
EVP_PKEY *pkey;
|
||||
const PKCS7_CTX *ctx;
|
||||
} PKCS7_SIGNER_INFO;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO)
|
||||
#define sk_PKCS7_SIGNER_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk))
|
||||
#define sk_PKCS7_SIGNER_INFO_value(sk, idx) ((PKCS7_SIGNER_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), (idx)))
|
||||
@@ -93,15 +95,17 @@ SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_SIGNER_INFO, PKCS7_SIGNER_INFO, PKCS7_SIGNER_
|
||||
#define sk_PKCS7_SIGNER_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_SIGNER_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_SIGNER_INFO_freefunc_type(freefunc)))
|
||||
#define sk_PKCS7_SIGNER_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_SIGNER_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_SIGNER_INFO_sk_type(sk), ossl_check_PKCS7_SIGNER_INFO_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct pkcs7_recip_info_st {
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
PKCS7_ISSUER_AND_SERIAL *issuer_and_serial;
|
||||
X509_ALGOR *key_enc_algor;
|
||||
ASN1_OCTET_STRING *enc_key;
|
||||
X509 *cert; /* get the pub-key from this */
|
||||
X509 *cert; /* get the pub-key from this */
|
||||
const PKCS7_CTX *ctx;
|
||||
} PKCS7_RECIP_INFO;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_RECIP_INFO, PKCS7_RECIP_INFO, PKCS7_RECIP_INFO)
|
||||
#define sk_PKCS7_RECIP_INFO_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk))
|
||||
#define sk_PKCS7_RECIP_INFO_value(sk, idx) ((PKCS7_RECIP_INFO *)OPENSSL_sk_value(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), (idx)))
|
||||
@@ -129,13 +133,13 @@ SKM_DEFINE_STACK_OF_INTERNAL(PKCS7_RECIP_INFO, PKCS7_RECIP_INFO, PKCS7_RECIP_INF
|
||||
#define sk_PKCS7_RECIP_INFO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7_RECIP_INFO) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_copyfunc_type(copyfunc), ossl_check_PKCS7_RECIP_INFO_freefunc_type(freefunc)))
|
||||
#define sk_PKCS7_RECIP_INFO_set_cmp_func(sk, cmp) ((sk_PKCS7_RECIP_INFO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_RECIP_INFO_sk_type(sk), ossl_check_PKCS7_RECIP_INFO_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct pkcs7_signed_st {
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
STACK_OF(X509_ALGOR) *md_algs; /* md used */
|
||||
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
||||
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
||||
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
||||
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
|
||||
struct pkcs7_st *contents;
|
||||
} PKCS7_SIGNED;
|
||||
@@ -153,30 +157,30 @@ typedef struct pkcs7_enc_content_st {
|
||||
} PKCS7_ENC_CONTENT;
|
||||
|
||||
typedef struct pkcs7_enveloped_st {
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
|
||||
PKCS7_ENC_CONTENT *enc_data;
|
||||
} PKCS7_ENVELOPE;
|
||||
|
||||
typedef struct pkcs7_signedandenveloped_st {
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
ASN1_INTEGER *version; /* version 1 */
|
||||
STACK_OF(X509_ALGOR) *md_algs; /* md used */
|
||||
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
||||
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
||||
STACK_OF(X509) *cert; /* [ 0 ] */ /* name should be 'certificates' */
|
||||
STACK_OF(X509_CRL) *crl; /* [ 1 ] */ /* name should be 'crls' */
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *signer_info;
|
||||
PKCS7_ENC_CONTENT *enc_data;
|
||||
STACK_OF(PKCS7_RECIP_INFO) *recipientinfo;
|
||||
} PKCS7_SIGN_ENVELOPE;
|
||||
|
||||
typedef struct pkcs7_digest_st {
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
X509_ALGOR *md; /* md used */
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
X509_ALGOR *md; /* md used */
|
||||
struct pkcs7_st *contents;
|
||||
ASN1_OCTET_STRING *digest;
|
||||
} PKCS7_DIGEST;
|
||||
|
||||
typedef struct pkcs7_encrypted_st {
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
ASN1_INTEGER *version; /* version 0 */
|
||||
PKCS7_ENC_CONTENT *enc_data;
|
||||
} PKCS7_ENCRYPT;
|
||||
|
||||
@@ -187,10 +191,10 @@ typedef struct pkcs7_st {
|
||||
*/
|
||||
unsigned char *asn1;
|
||||
long length;
|
||||
# define PKCS7_S_HEADER 0
|
||||
# define PKCS7_S_BODY 1
|
||||
# define PKCS7_S_TAIL 2
|
||||
int state; /* used during processing */
|
||||
#define PKCS7_S_HEADER 0
|
||||
#define PKCS7_S_BODY 1
|
||||
#define PKCS7_S_TAIL 2
|
||||
int state; /* used during processing */
|
||||
int detached;
|
||||
ASN1_OBJECT *type;
|
||||
/* content as defined by the type */
|
||||
@@ -217,6 +221,7 @@ typedef struct pkcs7_st {
|
||||
} d;
|
||||
PKCS7_CTX ctx;
|
||||
} PKCS7;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(PKCS7, PKCS7, PKCS7)
|
||||
#define sk_PKCS7_num(sk) OPENSSL_sk_num(ossl_check_const_PKCS7_sk_type(sk))
|
||||
#define sk_PKCS7_value(sk, idx) ((PKCS7 *)OPENSSL_sk_value(ossl_check_const_PKCS7_sk_type(sk), (idx)))
|
||||
@@ -244,73 +249,73 @@ SKM_DEFINE_STACK_OF_INTERNAL(PKCS7, PKCS7, PKCS7)
|
||||
#define sk_PKCS7_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(PKCS7) *)OPENSSL_sk_deep_copy(ossl_check_const_PKCS7_sk_type(sk), ossl_check_PKCS7_copyfunc_type(copyfunc), ossl_check_PKCS7_freefunc_type(freefunc)))
|
||||
#define sk_PKCS7_set_cmp_func(sk, cmp) ((sk_PKCS7_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_PKCS7_sk_type(sk), ossl_check_PKCS7_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#define PKCS7_OP_SET_DETACHED_SIGNATURE 1
|
||||
#define PKCS7_OP_GET_DETACHED_SIGNATURE 2
|
||||
|
||||
# define PKCS7_OP_SET_DETACHED_SIGNATURE 1
|
||||
# define PKCS7_OP_GET_DETACHED_SIGNATURE 2
|
||||
#define PKCS7_get_signed_attributes(si) ((si)->auth_attr)
|
||||
#define PKCS7_get_attributes(si) ((si)->unauth_attr)
|
||||
|
||||
# define PKCS7_get_signed_attributes(si) ((si)->auth_attr)
|
||||
# define PKCS7_get_attributes(si) ((si)->unauth_attr)
|
||||
#define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
|
||||
#define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
|
||||
#define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
|
||||
#define PKCS7_type_is_signedAndEnveloped(a) \
|
||||
(OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
|
||||
#define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
|
||||
#define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
|
||||
|
||||
# define PKCS7_type_is_signed(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_signed)
|
||||
# define PKCS7_type_is_encrypted(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_encrypted)
|
||||
# define PKCS7_type_is_enveloped(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_enveloped)
|
||||
# define PKCS7_type_is_signedAndEnveloped(a) \
|
||||
(OBJ_obj2nid((a)->type) == NID_pkcs7_signedAndEnveloped)
|
||||
# define PKCS7_type_is_data(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_data)
|
||||
# define PKCS7_type_is_digest(a) (OBJ_obj2nid((a)->type) == NID_pkcs7_digest)
|
||||
#define PKCS7_set_detached(p, v) \
|
||||
PKCS7_ctrl(p, PKCS7_OP_SET_DETACHED_SIGNATURE, v, NULL)
|
||||
#define PKCS7_get_detached(p) \
|
||||
PKCS7_ctrl(p, PKCS7_OP_GET_DETACHED_SIGNATURE, 0, NULL)
|
||||
|
||||
# define PKCS7_set_detached(p,v) \
|
||||
PKCS7_ctrl(p,PKCS7_OP_SET_DETACHED_SIGNATURE,v,NULL)
|
||||
# define PKCS7_get_detached(p) \
|
||||
PKCS7_ctrl(p,PKCS7_OP_GET_DETACHED_SIGNATURE,0,NULL)
|
||||
|
||||
# define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
|
||||
#define PKCS7_is_detached(p7) (PKCS7_type_is_signed(p7) && PKCS7_get_detached(p7))
|
||||
|
||||
/* S/MIME related flags */
|
||||
|
||||
# define PKCS7_TEXT 0x1
|
||||
# define PKCS7_NOCERTS 0x2
|
||||
# define PKCS7_NOSIGS 0x4
|
||||
# define PKCS7_NOCHAIN 0x8
|
||||
# define PKCS7_NOINTERN 0x10
|
||||
# define PKCS7_NOVERIFY 0x20
|
||||
# define PKCS7_DETACHED 0x40
|
||||
# define PKCS7_BINARY 0x80
|
||||
# define PKCS7_NOATTR 0x100
|
||||
# define PKCS7_NOSMIMECAP 0x200
|
||||
# define PKCS7_NOOLDMIMETYPE 0x400
|
||||
# define PKCS7_CRLFEOL 0x800
|
||||
# define PKCS7_STREAM 0x1000
|
||||
# define PKCS7_NOCRL 0x2000
|
||||
# define PKCS7_PARTIAL 0x4000
|
||||
# define PKCS7_REUSE_DIGEST 0x8000
|
||||
# define PKCS7_NO_DUAL_CONTENT 0x10000
|
||||
#define PKCS7_TEXT 0x1
|
||||
#define PKCS7_NOCERTS 0x2
|
||||
#define PKCS7_NOSIGS 0x4
|
||||
#define PKCS7_NOCHAIN 0x8
|
||||
#define PKCS7_NOINTERN 0x10
|
||||
#define PKCS7_NOVERIFY 0x20
|
||||
#define PKCS7_DETACHED 0x40
|
||||
#define PKCS7_BINARY 0x80
|
||||
#define PKCS7_NOATTR 0x100
|
||||
#define PKCS7_NOSMIMECAP 0x200
|
||||
#define PKCS7_NOOLDMIMETYPE 0x400
|
||||
#define PKCS7_CRLFEOL 0x800
|
||||
#define PKCS7_STREAM 0x1000
|
||||
#define PKCS7_NOCRL 0x2000
|
||||
#define PKCS7_PARTIAL 0x4000
|
||||
#define PKCS7_REUSE_DIGEST 0x8000
|
||||
#define PKCS7_NO_DUAL_CONTENT 0x10000
|
||||
|
||||
/* Flags: for compatibility with older code */
|
||||
|
||||
# define SMIME_TEXT PKCS7_TEXT
|
||||
# define SMIME_NOCERTS PKCS7_NOCERTS
|
||||
# define SMIME_NOSIGS PKCS7_NOSIGS
|
||||
# define SMIME_NOCHAIN PKCS7_NOCHAIN
|
||||
# define SMIME_NOINTERN PKCS7_NOINTERN
|
||||
# define SMIME_NOVERIFY PKCS7_NOVERIFY
|
||||
# define SMIME_DETACHED PKCS7_DETACHED
|
||||
# define SMIME_BINARY PKCS7_BINARY
|
||||
# define SMIME_NOATTR PKCS7_NOATTR
|
||||
#define SMIME_TEXT PKCS7_TEXT
|
||||
#define SMIME_NOCERTS PKCS7_NOCERTS
|
||||
#define SMIME_NOSIGS PKCS7_NOSIGS
|
||||
#define SMIME_NOCHAIN PKCS7_NOCHAIN
|
||||
#define SMIME_NOINTERN PKCS7_NOINTERN
|
||||
#define SMIME_NOVERIFY PKCS7_NOVERIFY
|
||||
#define SMIME_DETACHED PKCS7_DETACHED
|
||||
#define SMIME_BINARY PKCS7_BINARY
|
||||
#define SMIME_NOATTR PKCS7_NOATTR
|
||||
|
||||
/* CRLF ASCII canonicalisation */
|
||||
# define SMIME_ASCIICRLF 0x80000
|
||||
#define SMIME_ASCIICRLF 0x80000
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(PKCS7_ISSUER_AND_SERIAL)
|
||||
|
||||
int PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
|
||||
const EVP_MD *type, unsigned char *md,
|
||||
unsigned int *len);
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
const EVP_MD *type, unsigned char *md,
|
||||
unsigned int *len);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
PKCS7 *d2i_PKCS7_fp(FILE *fp, PKCS7 **p7);
|
||||
int i2d_PKCS7_fp(FILE *fp, const PKCS7 *p7);
|
||||
# endif
|
||||
#endif
|
||||
DECLARE_ASN1_DUP_FUNCTION(PKCS7)
|
||||
PKCS7 *d2i_PKCS7_bio(BIO *bp, PKCS7 **p7);
|
||||
int i2d_PKCS7_bio(BIO *bp, const PKCS7 *p7);
|
||||
@@ -341,30 +346,30 @@ int PKCS7_set_type(PKCS7 *p7, int type);
|
||||
int PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other);
|
||||
int PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data);
|
||||
int PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
|
||||
const EVP_MD *dgst);
|
||||
const EVP_MD *dgst);
|
||||
int PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si);
|
||||
int PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *p7i);
|
||||
int PKCS7_add_certificate(PKCS7 *p7, X509 *cert);
|
||||
int PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl);
|
||||
int PKCS7_content_new(PKCS7 *p7, int nid);
|
||||
int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx,
|
||||
BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
||||
BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
||||
int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
|
||||
X509 *signer);
|
||||
X509 *signer);
|
||||
|
||||
BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio);
|
||||
int PKCS7_dataFinal(PKCS7 *p7, BIO *bio);
|
||||
BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert);
|
||||
|
||||
PKCS7_SIGNER_INFO *PKCS7_add_signature(PKCS7 *p7, X509 *x509,
|
||||
EVP_PKEY *pkey, const EVP_MD *dgst);
|
||||
EVP_PKEY *pkey, const EVP_MD *dgst);
|
||||
X509 *PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si);
|
||||
int PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md);
|
||||
STACK_OF(PKCS7_SIGNER_INFO) *PKCS7_get_signer_info(PKCS7 *p7);
|
||||
|
||||
PKCS7_RECIP_INFO *PKCS7_add_recipient(PKCS7 *p7, X509 *x509);
|
||||
void PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
|
||||
X509_ALGOR **pdig, X509_ALGOR **psig);
|
||||
X509_ALGOR **pdig, X509_ALGOR **psig);
|
||||
void PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc);
|
||||
int PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri);
|
||||
int PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509);
|
||||
@@ -375,48 +380,48 @@ PKCS7_ISSUER_AND_SERIAL *PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx);
|
||||
ASN1_OCTET_STRING *PKCS7_get_octet_string(PKCS7 *p7);
|
||||
ASN1_OCTET_STRING *PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk);
|
||||
int PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int type,
|
||||
void *data);
|
||||
void *data);
|
||||
int PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
|
||||
void *value);
|
||||
void *value);
|
||||
ASN1_TYPE *PKCS7_get_attribute(const PKCS7_SIGNER_INFO *si, int nid);
|
||||
ASN1_TYPE *PKCS7_get_signed_attribute(const PKCS7_SIGNER_INFO *si, int nid);
|
||||
int PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
|
||||
STACK_OF(X509_ATTRIBUTE) *sk);
|
||||
STACK_OF(X509_ATTRIBUTE) *sk);
|
||||
int PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si,
|
||||
STACK_OF(X509_ATTRIBUTE) *sk);
|
||||
STACK_OF(X509_ATTRIBUTE) *sk);
|
||||
|
||||
PKCS7 *PKCS7_sign(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
BIO *data, int flags);
|
||||
BIO *data, int flags);
|
||||
PKCS7 *PKCS7_sign_ex(X509 *signcert, EVP_PKEY *pkey, STACK_OF(X509) *certs,
|
||||
BIO *data, int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
BIO *data, int flags, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
PKCS7_SIGNER_INFO *PKCS7_sign_add_signer(PKCS7 *p7,
|
||||
X509 *signcert, EVP_PKEY *pkey,
|
||||
const EVP_MD *md, int flags);
|
||||
X509 *signcert, EVP_PKEY *pkey,
|
||||
const EVP_MD *md, int flags);
|
||||
|
||||
int PKCS7_final(PKCS7 *p7, BIO *data, int flags);
|
||||
int PKCS7_verify(PKCS7 *p7, STACK_OF(X509) *certs, X509_STORE *store,
|
||||
BIO *indata, BIO *out, int flags);
|
||||
BIO *indata, BIO *out, int flags);
|
||||
STACK_OF(X509) *PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs,
|
||||
int flags);
|
||||
int flags);
|
||||
PKCS7 *PKCS7_encrypt(STACK_OF(X509) *certs, BIO *in, const EVP_CIPHER *cipher,
|
||||
int flags);
|
||||
int flags);
|
||||
PKCS7 *PKCS7_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
||||
const EVP_CIPHER *cipher, int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
const EVP_CIPHER *cipher, int flags,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
int PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data,
|
||||
int flags);
|
||||
int flags);
|
||||
|
||||
int PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si,
|
||||
STACK_OF(X509_ALGOR) *cap);
|
||||
STACK_OF(X509_ALGOR) *cap);
|
||||
STACK_OF(X509_ALGOR) *PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si);
|
||||
int PKCS7_simple_smimecap(STACK_OF(X509_ALGOR) *sk, int nid, int arg);
|
||||
|
||||
int PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid);
|
||||
int PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t);
|
||||
int PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si,
|
||||
const unsigned char *md, int mdlen);
|
||||
const unsigned char *md, int mdlen);
|
||||
|
||||
int SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags);
|
||||
PKCS7 *SMIME_read_PKCS7_ex(BIO *bio, BIO **bcont, PKCS7 **p7);
|
||||
@@ -424,7 +429,7 @@ PKCS7 *SMIME_read_PKCS7(BIO *bio, BIO **bcont);
|
||||
|
||||
BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7);
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -10,173 +10,175 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_SAFESTACK_H
|
||||
# define OPENSSL_SAFESTACK_H
|
||||
# pragma once
|
||||
#define OPENSSL_SAFESTACK_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SAFESTACK_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_SAFESTACK_H
|
||||
#endif
|
||||
|
||||
# include <openssl/stack.h>
|
||||
# include <openssl/e_os2.h>
|
||||
#include <openssl/stack.h>
|
||||
#include <openssl/e_os2.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define STACK_OF(type) struct stack_st_##type
|
||||
#define STACK_OF(type) struct stack_st_##type
|
||||
|
||||
/* Helper macro for internal use */
|
||||
# define SKM_DEFINE_STACK_OF_INTERNAL(t1, t2, t3) \
|
||||
STACK_OF(t1); \
|
||||
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
||||
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
||||
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
||||
static ossl_unused ossl_inline t2 *ossl_check_##t1##_type(t2 *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
#define SKM_DEFINE_STACK_OF_INTERNAL(t1, t2, t3) \
|
||||
STACK_OF(t1); \
|
||||
typedef int (*sk_##t1##_compfunc)(const t3 *const *a, const t3 *const *b); \
|
||||
typedef void (*sk_##t1##_freefunc)(t3 * a); \
|
||||
typedef t3 *(*sk_##t1##_copyfunc)(const t3 *a); \
|
||||
static ossl_unused ossl_inline t2 *ossl_check_##t1##_type(t2 *ptr) \
|
||||
{ \
|
||||
return ptr; \
|
||||
} \
|
||||
static ossl_unused ossl_inline const OPENSSL_STACK *ossl_check_const_##t1##_sk_type(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (const OPENSSL_STACK *)sk; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_STACK *ossl_check_##t1##_sk_type(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (OPENSSL_STACK *)sk; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_compfunc ossl_check_##t1##_compfunc_type(sk_##t1##_compfunc cmp) \
|
||||
{ \
|
||||
return (OPENSSL_sk_compfunc)cmp; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_copyfunc ossl_check_##t1##_copyfunc_type(sk_##t1##_copyfunc cpy) \
|
||||
{ \
|
||||
return (OPENSSL_sk_copyfunc)cpy; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_freefunc ossl_check_##t1##_freefunc_type(sk_##t1##_freefunc fr) \
|
||||
{ \
|
||||
return (OPENSSL_sk_freefunc)fr; \
|
||||
{ \
|
||||
return (const OPENSSL_STACK *)sk; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_STACK *ossl_check_##t1##_sk_type(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (OPENSSL_STACK *)sk; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_compfunc ossl_check_##t1##_compfunc_type(sk_##t1##_compfunc cmp) \
|
||||
{ \
|
||||
return (OPENSSL_sk_compfunc)cmp; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_copyfunc ossl_check_##t1##_copyfunc_type(sk_##t1##_copyfunc cpy) \
|
||||
{ \
|
||||
return (OPENSSL_sk_copyfunc)cpy; \
|
||||
} \
|
||||
static ossl_unused ossl_inline OPENSSL_sk_freefunc ossl_check_##t1##_freefunc_type(sk_##t1##_freefunc fr) \
|
||||
{ \
|
||||
return (OPENSSL_sk_freefunc)fr; \
|
||||
}
|
||||
|
||||
# define SKM_DEFINE_STACK_OF(t1, t2, t3) \
|
||||
STACK_OF(t1); \
|
||||
typedef int (*sk_##t1##_compfunc)(const t3 * const *a, const t3 *const *b); \
|
||||
typedef void (*sk_##t1##_freefunc)(t3 *a); \
|
||||
typedef t3 * (*sk_##t1##_copyfunc)(const t3 *a); \
|
||||
static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
|
||||
{ \
|
||||
return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_free((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_zero((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \
|
||||
(const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
|
||||
{ \
|
||||
OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
|
||||
{ \
|
||||
return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find_all(STACK_OF(t1) *sk, t2 *ptr, int *pnum) \
|
||||
{ \
|
||||
return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_sort((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) * sk_##t1##_dup(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \
|
||||
sk_##t1##_copyfunc copyfunc, \
|
||||
sk_##t1##_freefunc freefunc) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \
|
||||
(OPENSSL_sk_copyfunc)copyfunc, \
|
||||
(OPENSSL_sk_freefunc)freefunc); \
|
||||
} \
|
||||
#define SKM_DEFINE_STACK_OF(t1, t2, t3) \
|
||||
STACK_OF(t1); \
|
||||
typedef int (*sk_##t1##_compfunc)(const t3 *const *a, const t3 *const *b); \
|
||||
typedef void (*sk_##t1##_freefunc)(t3 * a); \
|
||||
typedef t3 *(*sk_##t1##_copyfunc)(const t3 *a); \
|
||||
static ossl_unused ossl_inline int sk_##t1##_num(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return OPENSSL_sk_num((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_value(const STACK_OF(t1) *sk, int idx) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_value((const OPENSSL_STACK *)sk, idx); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new(sk_##t1##_compfunc compare) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new((OPENSSL_sk_compfunc)compare); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_null(void) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new_null(); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_new_reserve(sk_##t1##_compfunc compare, int n) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_new_reserve((OPENSSL_sk_compfunc)compare, n); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_reserve(STACK_OF(t1) *sk, int n) \
|
||||
{ \
|
||||
return OPENSSL_sk_reserve((OPENSSL_STACK *)sk, n); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_free(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_free((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_zero(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_zero((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_delete(STACK_OF(t1) *sk, int i) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_delete((OPENSSL_STACK *)sk, i); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_delete_ptr(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, \
|
||||
(const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_push(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_push((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_unshift(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_unshift((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_pop(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_pop((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_shift(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_shift((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_pop_free(STACK_OF(t1) *sk, sk_##t1##_freefunc freefunc) \
|
||||
{ \
|
||||
OPENSSL_sk_pop_free((OPENSSL_STACK *)sk, (OPENSSL_sk_freefunc)freefunc); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_insert(STACK_OF(t1) *sk, t2 *ptr, int idx) \
|
||||
{ \
|
||||
return OPENSSL_sk_insert((OPENSSL_STACK *)sk, (const void *)ptr, idx); \
|
||||
} \
|
||||
static ossl_unused ossl_inline t2 *sk_##t1##_set(STACK_OF(t1) *sk, int idx, t2 *ptr) \
|
||||
{ \
|
||||
return (t2 *)OPENSSL_sk_set((OPENSSL_STACK *)sk, idx, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find_ex(STACK_OF(t1) *sk, t2 *ptr) \
|
||||
{ \
|
||||
return OPENSSL_sk_find_ex((OPENSSL_STACK *)sk, (const void *)ptr); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_find_all(STACK_OF(t1) *sk, t2 *ptr, int *pnum) \
|
||||
{ \
|
||||
return OPENSSL_sk_find_all((OPENSSL_STACK *)sk, (const void *)ptr, pnum); \
|
||||
} \
|
||||
static ossl_unused ossl_inline void sk_##t1##_sort(STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
OPENSSL_sk_sort((OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline int sk_##t1##_is_sorted(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return OPENSSL_sk_is_sorted((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_dup(const STACK_OF(t1) *sk) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_dup((const OPENSSL_STACK *)sk); \
|
||||
} \
|
||||
static ossl_unused ossl_inline STACK_OF(t1) *sk_##t1##_deep_copy(const STACK_OF(t1) *sk, \
|
||||
sk_##t1##_copyfunc copyfunc, \
|
||||
sk_##t1##_freefunc freefunc) \
|
||||
{ \
|
||||
return (STACK_OF(t1) *)OPENSSL_sk_deep_copy((const OPENSSL_STACK *)sk, \
|
||||
(OPENSSL_sk_copyfunc)copyfunc, \
|
||||
(OPENSSL_sk_freefunc)freefunc); \
|
||||
} \
|
||||
static ossl_unused ossl_inline sk_##t1##_compfunc sk_##t1##_set_cmp_func(STACK_OF(t1) *sk, sk_##t1##_compfunc compare) \
|
||||
{ \
|
||||
return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \
|
||||
{ \
|
||||
return (sk_##t1##_compfunc)OPENSSL_sk_set_cmp_func((OPENSSL_STACK *)sk, (OPENSSL_sk_compfunc)compare); \
|
||||
}
|
||||
|
||||
# define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
|
||||
# define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
|
||||
# define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
|
||||
# define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \
|
||||
SKM_DEFINE_STACK_OF(t1, const t2, t2)
|
||||
#define DEFINE_STACK_OF(t) SKM_DEFINE_STACK_OF(t, t, t)
|
||||
#define DEFINE_STACK_OF_CONST(t) SKM_DEFINE_STACK_OF(t, const t, t)
|
||||
#define DEFINE_SPECIAL_STACK_OF(t1, t2) SKM_DEFINE_STACK_OF(t1, t2, t2)
|
||||
#define DEFINE_SPECIAL_STACK_OF_CONST(t1, t2) \
|
||||
SKM_DEFINE_STACK_OF(t1, const t2, t2)
|
||||
|
||||
/*-
|
||||
* Strings are special: normally an lhash entry will point to a single
|
||||
@@ -202,6 +204,7 @@ typedef const char *OPENSSL_CSTRING;
|
||||
* chars. So, we have to implement STRING specially for STACK_OF. This is
|
||||
* dealt with in the autogenerated macros below.
|
||||
*/
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_STRING, char, char)
|
||||
#define sk_OPENSSL_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_STRING_sk_type(sk))
|
||||
#define sk_OPENSSL_STRING_value(sk, idx) ((char *)OPENSSL_sk_value(ossl_check_const_OPENSSL_STRING_sk_type(sk), (idx)))
|
||||
@@ -255,6 +258,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_CSTRING, const char, char)
|
||||
#define sk_OPENSSL_CSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_CSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_copyfunc_type(copyfunc), ossl_check_OPENSSL_CSTRING_freefunc_type(freefunc)))
|
||||
#define sk_OPENSSL_CSTRING_set_cmp_func(sk, cmp) ((sk_OPENSSL_CSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_CSTRING_sk_type(sk), ossl_check_OPENSSL_CSTRING_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
/*
|
||||
@@ -262,6 +266,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_CSTRING, const char, char)
|
||||
* These should also be distinguished from "normal" stacks.
|
||||
*/
|
||||
typedef void *OPENSSL_BLOCK;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_BLOCK, void, void)
|
||||
#define sk_OPENSSL_BLOCK_num(sk) OPENSSL_sk_num(ossl_check_const_OPENSSL_BLOCK_sk_type(sk))
|
||||
#define sk_OPENSSL_BLOCK_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), (idx)))
|
||||
@@ -289,9 +294,10 @@ SKM_DEFINE_STACK_OF_INTERNAL(OPENSSL_BLOCK, void, void)
|
||||
#define sk_OPENSSL_BLOCK_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OPENSSL_BLOCK) *)OPENSSL_sk_deep_copy(ossl_check_const_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_copyfunc_type(copyfunc), ossl_check_OPENSSL_BLOCK_freefunc_type(freefunc)))
|
||||
#define sk_OPENSSL_BLOCK_set_cmp_func(sk, cmp) ((sk_OPENSSL_BLOCK_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OPENSSL_BLOCK_sk_type(sk), ossl_check_OPENSSL_BLOCK_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -14,36 +14,39 @@
|
||||
* for the EdelKey project.
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_SRP_H
|
||||
# define OPENSSL_SRP_H
|
||||
# pragma once
|
||||
#define OPENSSL_SRP_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SRP_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_SRP_H
|
||||
#endif
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_SRP
|
||||
# include <stdio.h>
|
||||
# include <string.h>
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/bn.h>
|
||||
# include <openssl/crypto.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/bn.h>
|
||||
#include <openssl/crypto.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
typedef struct SRP_gN_cache_st {
|
||||
char *b64_bn;
|
||||
BIGNUM *bn;
|
||||
} SRP_gN_cache;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache)
|
||||
#define sk_SRP_gN_cache_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_cache_sk_type(sk))
|
||||
#define sk_SRP_gN_cache_value(sk, idx) ((SRP_gN_cache *)OPENSSL_sk_value(ossl_check_const_SRP_gN_cache_sk_type(sk), (idx)))
|
||||
@@ -71,7 +74,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache)
|
||||
#define sk_SRP_gN_cache_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_copyfunc_type(copyfunc), ossl_check_SRP_gN_cache_freefunc_type(freefunc)))
|
||||
#define sk_SRP_gN_cache_set_cmp_func(sk, cmp) ((sk_SRP_gN_cache_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
typedef struct SRP_user_pwd_st {
|
||||
/* Owned by us. */
|
||||
@@ -84,6 +87,7 @@ typedef struct SRP_user_pwd_st {
|
||||
/* Owned by us. */
|
||||
char *info;
|
||||
} SRP_user_pwd;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd)
|
||||
#define sk_SRP_user_pwd_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_user_pwd_sk_type(sk))
|
||||
#define sk_SRP_user_pwd_value(sk, idx) ((SRP_user_pwd *)OPENSSL_sk_value(ossl_check_const_SRP_user_pwd_sk_type(sk), (idx)))
|
||||
@@ -111,6 +115,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd)
|
||||
#define sk_SRP_user_pwd_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_copyfunc_type(copyfunc), ossl_check_SRP_user_pwd_freefunc_type(freefunc)))
|
||||
#define sk_SRP_user_pwd_set_cmp_func(sk, cmp) ((sk_SRP_user_pwd_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
SRP_user_pwd *SRP_user_pwd_new(void);
|
||||
@@ -119,17 +124,17 @@ void SRP_user_pwd_free(SRP_user_pwd *user_pwd);
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g,
|
||||
const BIGNUM *N);
|
||||
const BIGNUM *N);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id,
|
||||
const char *info);
|
||||
const char *info);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v);
|
||||
|
||||
typedef struct SRP_VBASE_st {
|
||||
STACK_OF(SRP_user_pwd) *users_pwd;
|
||||
STACK_OF(SRP_gN_cache) *gN_cache;
|
||||
/* to simulate a user */
|
||||
/* to simulate a user */
|
||||
char *seed_key;
|
||||
const BIGNUM *default_g;
|
||||
const BIGNUM *default_N;
|
||||
@@ -143,6 +148,7 @@ typedef struct SRP_gN_st {
|
||||
const BIGNUM *g;
|
||||
const BIGNUM *N;
|
||||
} SRP_gN;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN)
|
||||
#define sk_SRP_gN_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_sk_type(sk))
|
||||
#define sk_SRP_gN_value(sk, idx) ((SRP_gN *)OPENSSL_sk_value(ossl_check_const_SRP_gN_sk_type(sk), (idx)))
|
||||
@@ -170,7 +176,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN)
|
||||
#define sk_SRP_gN_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_sk_type(sk), ossl_check_SRP_gN_copyfunc_type(copyfunc), ossl_check_SRP_gN_freefunc_type(freefunc)))
|
||||
#define sk_SRP_gN_set_cmp_func(sk, cmp) ((sk_SRP_gN_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_compfunc_type(cmp)))
|
||||
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
SRP_VBASE *SRP_VBASE_new(char *seed_key);
|
||||
@@ -188,40 +194,40 @@ SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt,
|
||||
char **verifier, const char *N, const char *g,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
char **verifier, const char *N, const char *g,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
|
||||
char **verifier, const char *N, const char *g);
|
||||
char **verifier, const char *N, const char *g);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt,
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g, OSSL_LIB_CTX *libctx,
|
||||
const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g);
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g);
|
||||
|
||||
# define SRP_NO_ERROR 0
|
||||
# define SRP_ERR_VBASE_INCOMPLETE_FILE 1
|
||||
# define SRP_ERR_VBASE_BN_LIB 2
|
||||
# define SRP_ERR_OPEN_FILE 3
|
||||
# define SRP_ERR_MEMORY 4
|
||||
#define SRP_NO_ERROR 0
|
||||
#define SRP_ERR_VBASE_INCOMPLETE_FILE 1
|
||||
#define SRP_ERR_VBASE_BN_LIB 2
|
||||
#define SRP_ERR_OPEN_FILE 3
|
||||
#define SRP_ERR_MEMORY 4
|
||||
|
||||
# define DB_srptype 0
|
||||
# define DB_srpverifier 1
|
||||
# define DB_srpsalt 2
|
||||
# define DB_srpid 3
|
||||
# define DB_srpgN 4
|
||||
# define DB_srpinfo 5
|
||||
# undef DB_NUMBER
|
||||
# define DB_NUMBER 6
|
||||
#define DB_srptype 0
|
||||
#define DB_srpverifier 1
|
||||
#define DB_srpsalt 2
|
||||
#define DB_srpid 3
|
||||
#define DB_srpgN 4
|
||||
#define DB_srpinfo 5
|
||||
#undef DB_NUMBER
|
||||
#define DB_NUMBER 6
|
||||
|
||||
# define DB_SRP_INDEX 'I'
|
||||
# define DB_SRP_VALID 'V'
|
||||
# define DB_SRP_REVOKED 'R'
|
||||
# define DB_SRP_MODIF 'v'
|
||||
#define DB_SRP_INDEX 'I'
|
||||
#define DB_SRP_VALID 'V'
|
||||
#define DB_SRP_REVOKED 'R'
|
||||
#define DB_SRP_MODIF 'v'
|
||||
|
||||
/* see srp.c */
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
@@ -232,19 +238,19 @@ SRP_gN *SRP_get_default_gN(const char *id);
|
||||
/* server side .... */
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
|
||||
const BIGNUM *b, const BIGNUM *N);
|
||||
const BIGNUM *b, const BIGNUM *N);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
||||
const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
|
||||
const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
||||
const BIGNUM *v);
|
||||
const BIGNUM *v);
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
|
||||
|
||||
@@ -252,34 +258,34 @@ BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
|
||||
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
|
||||
OSSL_LIB_CTX *libctx, const char *propq);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
|
||||
OSSL_DEPRECATEDIN_3_0
|
||||
int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N);
|
||||
|
||||
# define SRP_MINIMAL_N 1024
|
||||
#define SRP_MINIMAL_N 1024
|
||||
|
||||
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
|
||||
/* This method ignores the configured seed and fails for an unknown user. */
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
OSSL_DEPRECATEDIN_1_1_0
|
||||
SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+1423
-1416
File diff suppressed because it is too large
Load Diff
@@ -10,37 +10,39 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_UI_H
|
||||
# define OPENSSL_UI_H
|
||||
# pragma once
|
||||
#define OPENSSL_UI_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_UI_H
|
||||
# endif
|
||||
#include <openssl/macros.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#define HEADER_UI_H
|
||||
#endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/crypto.h>
|
||||
# endif
|
||||
# include <openssl/safestack.h>
|
||||
# include <openssl/pem.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/uierr.h>
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
#include <openssl/crypto.h>
|
||||
#endif
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/types.h>
|
||||
#include <openssl/uierr.h>
|
||||
|
||||
/* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# ifdef OPENSSL_NO_UI_CONSOLE
|
||||
# define OPENSSL_NO_UI
|
||||
# endif
|
||||
# endif
|
||||
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
#ifdef OPENSSL_NO_UI_CONSOLE
|
||||
#define OPENSSL_NO_UI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* All the following functions return -1 or NULL on error and in some cases
|
||||
@@ -98,21 +100,21 @@ void UI_free(UI *ui);
|
||||
On success, the all return an index of the added information. That index
|
||||
is useful when retrieving results with UI_get0_result(). */
|
||||
int UI_add_input_string(UI *ui, const char *prompt, int flags,
|
||||
char *result_buf, int minsize, int maxsize);
|
||||
char *result_buf, int minsize, int maxsize);
|
||||
int UI_dup_input_string(UI *ui, const char *prompt, int flags,
|
||||
char *result_buf, int minsize, int maxsize);
|
||||
char *result_buf, int minsize, int maxsize);
|
||||
int UI_add_verify_string(UI *ui, const char *prompt, int flags,
|
||||
char *result_buf, int minsize, int maxsize,
|
||||
const char *test_buf);
|
||||
char *result_buf, int minsize, int maxsize,
|
||||
const char *test_buf);
|
||||
int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
|
||||
char *result_buf, int minsize, int maxsize,
|
||||
const char *test_buf);
|
||||
char *result_buf, int minsize, int maxsize,
|
||||
const char *test_buf);
|
||||
int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
||||
const char *ok_chars, const char *cancel_chars,
|
||||
int flags, char *result_buf);
|
||||
const char *ok_chars, const char *cancel_chars,
|
||||
int flags, char *result_buf);
|
||||
int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
||||
const char *ok_chars, const char *cancel_chars,
|
||||
int flags, char *result_buf);
|
||||
const char *ok_chars, const char *cancel_chars,
|
||||
int flags, char *result_buf);
|
||||
int UI_add_info_string(UI *ui, const char *text);
|
||||
int UI_dup_info_string(UI *ui, const char *text);
|
||||
int UI_add_error_string(UI *ui, const char *text);
|
||||
@@ -120,7 +122,7 @@ int UI_dup_error_string(UI *ui, const char *text);
|
||||
|
||||
/* These are the possible flags. They can be or'ed together. */
|
||||
/* Use to have echoing of input */
|
||||
# define UI_INPUT_FLAG_ECHO 0x01
|
||||
#define UI_INPUT_FLAG_ECHO 0x01
|
||||
/*
|
||||
* Use a default password. Where that password is found is completely up to
|
||||
* the application, it might for example be in the user data set with
|
||||
@@ -128,7 +130,7 @@ int UI_dup_error_string(UI *ui, const char *text);
|
||||
* each UI being marked with this flag, or the application might get
|
||||
* confused.
|
||||
*/
|
||||
# define UI_INPUT_FLAG_DEFAULT_PWD 0x02
|
||||
#define UI_INPUT_FLAG_DEFAULT_PWD 0x02
|
||||
|
||||
/*-
|
||||
* The user of these routines may want to define flags of their own. The core
|
||||
@@ -139,8 +141,8 @@ int UI_dup_error_string(UI *ui, const char *text);
|
||||
*
|
||||
* #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE)
|
||||
*
|
||||
*/
|
||||
# define UI_INPUT_FLAG_USER_BASE 16
|
||||
*/
|
||||
#define UI_INPUT_FLAG_USER_BASE 16
|
||||
|
||||
/*-
|
||||
* The following function helps construct a prompt.
|
||||
@@ -160,9 +162,9 @@ int UI_dup_error_string(UI *ui, const char *text);
|
||||
* the value "foo.key", the resulting string is:
|
||||
*
|
||||
* "Enter pass phrase for foo.key:"
|
||||
*/
|
||||
*/
|
||||
char *UI_construct_prompt(UI *ui_method,
|
||||
const char *phrase_desc, const char *object_name);
|
||||
const char *phrase_desc, const char *object_name);
|
||||
|
||||
/*
|
||||
* The following function is used to store a pointer to user-specific data.
|
||||
@@ -197,7 +199,7 @@ int UI_process(UI *ui);
|
||||
* send down an integer, a data pointer or a function pointer, as well as be
|
||||
* used to get information from a UI.
|
||||
*/
|
||||
int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
|
||||
int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f)(void));
|
||||
|
||||
/* The commands */
|
||||
/*
|
||||
@@ -205,19 +207,19 @@ int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
|
||||
* OpenSSL error stack before printing any info or added error messages and
|
||||
* before any prompting.
|
||||
*/
|
||||
# define UI_CTRL_PRINT_ERRORS 1
|
||||
#define UI_CTRL_PRINT_ERRORS 1
|
||||
/*
|
||||
* Check if a UI_process() is possible to do again with the same instance of
|
||||
* a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0
|
||||
* if not.
|
||||
*/
|
||||
# define UI_CTRL_IS_REDOABLE 2
|
||||
#define UI_CTRL_IS_REDOABLE 2
|
||||
|
||||
/* Some methods may use extra data */
|
||||
# define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg)
|
||||
# define UI_get_app_data(s) UI_get_ex_data(s,0)
|
||||
#define UI_set_app_data(s, arg) UI_set_ex_data(s, 0, arg)
|
||||
#define UI_get_app_data(s) UI_get_ex_data(s, 0)
|
||||
|
||||
# define UI_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
#define UI_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef)
|
||||
int UI_set_ex_data(UI *r, int idx, void *arg);
|
||||
void *UI_get_ex_data(const UI *r, int idx);
|
||||
@@ -228,12 +230,12 @@ const UI_METHOD *UI_get_default_method(void);
|
||||
const UI_METHOD *UI_get_method(UI *ui);
|
||||
const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);
|
||||
|
||||
# ifndef OPENSSL_NO_UI_CONSOLE
|
||||
#ifndef OPENSSL_NO_UI_CONSOLE
|
||||
|
||||
/* The method with all the built-in thingies */
|
||||
UI_METHOD *UI_OpenSSL(void);
|
||||
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* NULL method. Literally does nothing, but may serve as a placeholder
|
||||
@@ -290,6 +292,7 @@ const UI_METHOD *UI_null(void);
|
||||
*/
|
||||
typedef struct ui_string_st UI_STRING;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
|
||||
#define sk_UI_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_UI_STRING_sk_type(sk))
|
||||
#define sk_UI_STRING_value(sk, idx) ((UI_STRING *)OPENSSL_sk_value(ossl_check_const_UI_STRING_sk_type(sk), (idx)))
|
||||
@@ -317,6 +320,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
|
||||
#define sk_UI_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(UI_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_UI_STRING_sk_type(sk), ossl_check_UI_STRING_copyfunc_type(copyfunc), ossl_check_UI_STRING_freefunc_type(freefunc)))
|
||||
#define sk_UI_STRING_set_cmp_func(sk, cmp) ((sk_UI_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/*
|
||||
* The different types of strings that are currently supported. This is only
|
||||
@@ -324,42 +328,41 @@ SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
|
||||
*/
|
||||
enum UI_string_types {
|
||||
UIT_NONE = 0,
|
||||
UIT_PROMPT, /* Prompt for a string */
|
||||
UIT_VERIFY, /* Prompt for a string and verify */
|
||||
UIT_BOOLEAN, /* Prompt for a yes/no response */
|
||||
UIT_INFO, /* Send info to the user */
|
||||
UIT_ERROR /* Send an error message to the user */
|
||||
UIT_PROMPT, /* Prompt for a string */
|
||||
UIT_VERIFY, /* Prompt for a string and verify */
|
||||
UIT_BOOLEAN, /* Prompt for a yes/no response */
|
||||
UIT_INFO, /* Send info to the user */
|
||||
UIT_ERROR /* Send an error message to the user */
|
||||
};
|
||||
|
||||
/* Create and manipulate methods */
|
||||
UI_METHOD *UI_create_method(const char *name);
|
||||
void UI_destroy_method(UI_METHOD *ui_method);
|
||||
int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));
|
||||
int UI_method_set_opener(UI_METHOD *method, int (*opener)(UI *ui));
|
||||
int UI_method_set_writer(UI_METHOD *method,
|
||||
int (*writer) (UI *ui, UI_STRING *uis));
|
||||
int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));
|
||||
int (*writer)(UI *ui, UI_STRING *uis));
|
||||
int UI_method_set_flusher(UI_METHOD *method, int (*flusher)(UI *ui));
|
||||
int UI_method_set_reader(UI_METHOD *method,
|
||||
int (*reader) (UI *ui, UI_STRING *uis));
|
||||
int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
|
||||
int (*reader)(UI *ui, UI_STRING *uis));
|
||||
int UI_method_set_closer(UI_METHOD *method, int (*closer)(UI *ui));
|
||||
int UI_method_set_data_duplicator(UI_METHOD *method,
|
||||
void *(*duplicator) (UI *ui, void *ui_data),
|
||||
void (*destructor)(UI *ui, void *ui_data));
|
||||
void *(*duplicator)(UI *ui, void *ui_data),
|
||||
void (*destructor)(UI *ui, void *ui_data));
|
||||
int UI_method_set_prompt_constructor(UI_METHOD *method,
|
||||
char *(*prompt_constructor) (UI *ui,
|
||||
const char
|
||||
*phrase_desc,
|
||||
const char
|
||||
*object_name));
|
||||
char *(*prompt_constructor)(UI *ui,
|
||||
const char
|
||||
*phrase_desc,
|
||||
const char
|
||||
*object_name));
|
||||
int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
|
||||
int (*UI_method_get_opener(const UI_METHOD *method)) (UI *);
|
||||
int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *);
|
||||
int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *);
|
||||
int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *);
|
||||
int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
|
||||
char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
|
||||
(UI *, const char *, const char *);
|
||||
void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
|
||||
void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
|
||||
int (*UI_method_get_opener(const UI_METHOD *method))(UI *);
|
||||
int (*UI_method_get_writer(const UI_METHOD *method))(UI *, UI_STRING *);
|
||||
int (*UI_method_get_flusher(const UI_METHOD *method))(UI *);
|
||||
int (*UI_method_get_reader(const UI_METHOD *method))(UI *, UI_STRING *);
|
||||
int (*UI_method_get_closer(const UI_METHOD *method))(UI *);
|
||||
char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))(UI *, const char *, const char *);
|
||||
void *(*UI_method_get_data_duplicator(const UI_METHOD *method))(UI *, void *);
|
||||
void (*UI_method_get_data_destructor(const UI_METHOD *method))(UI *, void *);
|
||||
const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
|
||||
|
||||
/*
|
||||
@@ -395,13 +398,12 @@ int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len);
|
||||
|
||||
/* A couple of popular utility functions */
|
||||
int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
|
||||
int verify);
|
||||
int verify);
|
||||
int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
|
||||
int verify);
|
||||
int verify);
|
||||
UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -10,15 +10,17 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
/* clang-format off */
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#ifndef OPENSSL_X509_ACERT_H
|
||||
# define OPENSSL_X509_ACERT_H
|
||||
# pragma once
|
||||
#define OPENSSL_X509_ACERT_H
|
||||
#pragma once
|
||||
|
||||
# include <openssl/x509v3.h>
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/pem.h>
|
||||
#include <openssl/x509v3.h>
|
||||
#include <openssl/x509.h>
|
||||
#include <openssl/pem.h>
|
||||
|
||||
typedef struct X509_acert_st X509_ACERT;
|
||||
typedef struct X509_acert_info_st X509_ACERT_INFO;
|
||||
@@ -34,10 +36,10 @@ DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_OBJECT_DIGEST_INFO)
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_ISSUER_SERIAL)
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(X509_ACERT_ISSUER_V2FORM)
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
X509_ACERT *d2i_X509_ACERT_fp(FILE *fp, X509_ACERT **acert);
|
||||
int i2d_X509_ACERT_fp(FILE *fp, const X509_ACERT *acert);
|
||||
# endif
|
||||
#endif
|
||||
|
||||
DECLARE_PEM_rw(X509_ACERT, X509_ACERT)
|
||||
|
||||
@@ -48,16 +50,16 @@ int X509_ACERT_sign(X509_ACERT *x, EVP_PKEY *pkey, const EVP_MD *md);
|
||||
int X509_ACERT_sign_ctx(X509_ACERT *x, EVP_MD_CTX *ctx);
|
||||
int X509_ACERT_verify(X509_ACERT *a, EVP_PKEY *r);
|
||||
|
||||
# define X509_ACERT_VERSION_2 1
|
||||
#define X509_ACERT_VERSION_2 1
|
||||
|
||||
const GENERAL_NAMES *X509_ACERT_get0_holder_entityName(const X509_ACERT *x);
|
||||
const OSSL_ISSUER_SERIAL *X509_ACERT_get0_holder_baseCertId(const X509_ACERT *x);
|
||||
const OSSL_OBJECT_DIGEST_INFO * X509_ACERT_get0_holder_digest(const X509_ACERT *x);
|
||||
const OSSL_OBJECT_DIGEST_INFO *X509_ACERT_get0_holder_digest(const X509_ACERT *x);
|
||||
const X509_NAME *X509_ACERT_get0_issuerName(const X509_ACERT *x);
|
||||
long X509_ACERT_get_version(const X509_ACERT *x);
|
||||
void X509_ACERT_get0_signature(const X509_ACERT *x,
|
||||
const ASN1_BIT_STRING **psig,
|
||||
const X509_ALGOR **palg);
|
||||
const ASN1_BIT_STRING **psig,
|
||||
const X509_ALGOR **palg);
|
||||
int X509_ACERT_get_signature_nid(const X509_ACERT *x);
|
||||
const X509_ALGOR *X509_ACERT_get0_info_sigalg(const X509_ACERT *x);
|
||||
const ASN1_INTEGER *X509_ACERT_get0_serialNumber(const X509_ACERT *x);
|
||||
@@ -67,38 +69,38 @@ const ASN1_BIT_STRING *X509_ACERT_get0_issuerUID(const X509_ACERT *x);
|
||||
|
||||
int X509_ACERT_print(BIO *bp, X509_ACERT *x);
|
||||
int X509_ACERT_print_ex(BIO *bp, X509_ACERT *x, unsigned long nmflags,
|
||||
unsigned long cflag);
|
||||
unsigned long cflag);
|
||||
|
||||
int X509_ACERT_get_attr_count(const X509_ACERT *x);
|
||||
int X509_ACERT_get_attr_by_NID(const X509_ACERT *x, int nid, int lastpos);
|
||||
int X509_ACERT_get_attr_by_OBJ(const X509_ACERT *x, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
int lastpos);
|
||||
X509_ATTRIBUTE *X509_ACERT_get_attr(const X509_ACERT *x, int loc);
|
||||
X509_ATTRIBUTE *X509_ACERT_delete_attr(X509_ACERT *x, int loc);
|
||||
|
||||
void *X509_ACERT_get_ext_d2i(const X509_ACERT *x, int nid, int *crit, int *idx);
|
||||
int X509_ACERT_add1_ext_i2d(X509_ACERT *x, int nid, void *value, int crit,
|
||||
unsigned long flags);
|
||||
unsigned long flags);
|
||||
const STACK_OF(X509_EXTENSION) *X509_ACERT_get0_extensions(const X509_ACERT *x);
|
||||
|
||||
# define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 0
|
||||
# define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 1
|
||||
# define OSSL_OBJECT_DIGEST_INFO_OTHER 2 /* must not be used in RFC 5755 profile */
|
||||
#define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY 0
|
||||
#define OSSL_OBJECT_DIGEST_INFO_PUBLIC_KEY_CERT 1
|
||||
#define OSSL_OBJECT_DIGEST_INFO_OTHER 2 /* must not be used in RFC 5755 profile */
|
||||
int X509_ACERT_set_version(X509_ACERT *x, long version);
|
||||
void X509_ACERT_set0_holder_entityName(X509_ACERT *x, GENERAL_NAMES *name);
|
||||
void X509_ACERT_set0_holder_baseCertId(X509_ACERT *x, OSSL_ISSUER_SERIAL *isss);
|
||||
void X509_ACERT_set0_holder_digest(X509_ACERT *x,
|
||||
OSSL_OBJECT_DIGEST_INFO *dinfo);
|
||||
OSSL_OBJECT_DIGEST_INFO *dinfo);
|
||||
|
||||
int X509_ACERT_add1_attr(X509_ACERT *x, X509_ATTRIBUTE *attr);
|
||||
int X509_ACERT_add1_attr_by_OBJ(X509_ACERT *x, const ASN1_OBJECT *obj,
|
||||
int type, const void *bytes, int len);
|
||||
int type, const void *bytes, int len);
|
||||
int X509_ACERT_add1_attr_by_NID(X509_ACERT *x, int nid, int type,
|
||||
const void *bytes, int len);
|
||||
const void *bytes, int len);
|
||||
int X509_ACERT_add1_attr_by_txt(X509_ACERT *x, const char *attrname, int type,
|
||||
const unsigned char *bytes, int len);
|
||||
const unsigned char *bytes, int len);
|
||||
int X509_ACERT_add_attr_nconf(CONF *conf, const char *section,
|
||||
X509_ACERT *acert);
|
||||
X509_ACERT *acert);
|
||||
|
||||
int X509_ACERT_set1_issuerName(X509_ACERT *x, const X509_NAME *name);
|
||||
int X509_ACERT_set1_serialNumber(X509_ACERT *x, const ASN1_INTEGER *serial);
|
||||
@@ -106,32 +108,33 @@ int X509_ACERT_set1_notBefore(X509_ACERT *x, const ASN1_GENERALIZEDTIME *time);
|
||||
int X509_ACERT_set1_notAfter(X509_ACERT *x, const ASN1_GENERALIZEDTIME *time);
|
||||
|
||||
void OSSL_OBJECT_DIGEST_INFO_get0_digest(const OSSL_OBJECT_DIGEST_INFO *o,
|
||||
int *digestedObjectType,
|
||||
const X509_ALGOR **digestAlgorithm,
|
||||
const ASN1_BIT_STRING **digest);
|
||||
int *digestedObjectType,
|
||||
const X509_ALGOR **digestAlgorithm,
|
||||
const ASN1_BIT_STRING **digest);
|
||||
|
||||
int OSSL_OBJECT_DIGEST_INFO_set1_digest(OSSL_OBJECT_DIGEST_INFO *o,
|
||||
int digestedObjectType,
|
||||
X509_ALGOR *digestAlgorithm,
|
||||
ASN1_BIT_STRING *digest);
|
||||
int digestedObjectType,
|
||||
X509_ALGOR *digestAlgorithm,
|
||||
ASN1_BIT_STRING *digest);
|
||||
|
||||
const X509_NAME *OSSL_ISSUER_SERIAL_get0_issuer(const OSSL_ISSUER_SERIAL *isss);
|
||||
const ASN1_INTEGER *OSSL_ISSUER_SERIAL_get0_serial(const OSSL_ISSUER_SERIAL *isss);
|
||||
const ASN1_BIT_STRING *OSSL_ISSUER_SERIAL_get0_issuerUID(const OSSL_ISSUER_SERIAL *isss);
|
||||
|
||||
int OSSL_ISSUER_SERIAL_set1_issuer(OSSL_ISSUER_SERIAL *isss,
|
||||
const X509_NAME *issuer);
|
||||
const X509_NAME *issuer);
|
||||
int OSSL_ISSUER_SERIAL_set1_serial(OSSL_ISSUER_SERIAL *isss,
|
||||
const ASN1_INTEGER *serial);
|
||||
const ASN1_INTEGER *serial);
|
||||
int OSSL_ISSUER_SERIAL_set1_issuerUID(OSSL_ISSUER_SERIAL *isss,
|
||||
const ASN1_BIT_STRING *uid);
|
||||
const ASN1_BIT_STRING *uid);
|
||||
|
||||
# define OSSL_IETFAS_OCTETS 0
|
||||
# define OSSL_IETFAS_OID 1
|
||||
# define OSSL_IETFAS_STRING 2
|
||||
#define OSSL_IETFAS_OCTETS 0
|
||||
#define OSSL_IETFAS_OID 1
|
||||
#define OSSL_IETFAS_STRING 2
|
||||
|
||||
typedef struct OSSL_IETF_ATTR_SYNTAX_VALUE_st OSSL_IETF_ATTR_SYNTAX_VALUE;
|
||||
typedef struct OSSL_IETF_ATTR_SYNTAX_st OSSL_IETF_ATTR_SYNTAX;
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_IETF_ATTR_SYNTAX_VALUE, OSSL_IETF_ATTR_SYNTAX_VALUE, OSSL_IETF_ATTR_SYNTAX_VALUE)
|
||||
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk))
|
||||
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_value(sk, idx) ((OSSL_IETF_ATTR_SYNTAX_VALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), (idx)))
|
||||
@@ -159,6 +162,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_IETF_ATTR_SYNTAX_VALUE, OSSL_IETF_ATTR_SYNTAX_
|
||||
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_IETF_ATTR_SYNTAX_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_copyfunc_type(copyfunc), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_IETF_ATTR_SYNTAX_VALUE_set_cmp_func(sk, cmp) ((sk_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_sk_type(sk), ossl_check_OSSL_IETF_ATTR_SYNTAX_VALUE_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
DECLARE_ASN1_ITEM(OSSL_IETF_ATTR_SYNTAX_VALUE)
|
||||
DECLARE_ASN1_ALLOC_FUNCTIONS(OSSL_IETF_ATTR_SYNTAX_VALUE)
|
||||
@@ -167,13 +171,13 @@ DECLARE_ASN1_FUNCTIONS(OSSL_IETF_ATTR_SYNTAX)
|
||||
const GENERAL_NAMES *
|
||||
OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(const OSSL_IETF_ATTR_SYNTAX *a);
|
||||
void OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(OSSL_IETF_ATTR_SYNTAX *a,
|
||||
GENERAL_NAMES *names);
|
||||
GENERAL_NAMES *names);
|
||||
|
||||
int OSSL_IETF_ATTR_SYNTAX_get_value_num(const OSSL_IETF_ATTR_SYNTAX *a);
|
||||
void *OSSL_IETF_ATTR_SYNTAX_get0_value(const OSSL_IETF_ATTR_SYNTAX *a,
|
||||
int ind, int *type);
|
||||
int ind, int *type);
|
||||
int OSSL_IETF_ATTR_SYNTAX_add1_value(OSSL_IETF_ATTR_SYNTAX *a, int type,
|
||||
void *data);
|
||||
void *data);
|
||||
int OSSL_IETF_ATTR_SYNTAX_print(BIO *bp, OSSL_IETF_ATTR_SYNTAX *a, int indent);
|
||||
|
||||
struct TARGET_CERT_st {
|
||||
@@ -184,9 +188,9 @@ struct TARGET_CERT_st {
|
||||
|
||||
typedef struct TARGET_CERT_st OSSL_TARGET_CERT;
|
||||
|
||||
# define OSSL_TGT_TARGET_NAME 0
|
||||
# define OSSL_TGT_TARGET_GROUP 1
|
||||
# define OSSL_TGT_TARGET_CERT 2
|
||||
#define OSSL_TGT_TARGET_NAME 0
|
||||
#define OSSL_TGT_TARGET_GROUP 1
|
||||
#define OSSL_TGT_TARGET_CERT 2
|
||||
|
||||
typedef struct TARGET_st {
|
||||
int type;
|
||||
@@ -200,6 +204,7 @@ typedef struct TARGET_st {
|
||||
typedef STACK_OF(OSSL_TARGET) OSSL_TARGETS;
|
||||
typedef STACK_OF(OSSL_TARGETS) OSSL_TARGETING_INFORMATION;
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGET, OSSL_TARGET, OSSL_TARGET)
|
||||
#define sk_OSSL_TARGET_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_TARGET_sk_type(sk))
|
||||
#define sk_OSSL_TARGET_value(sk, idx) ((OSSL_TARGET *)OPENSSL_sk_value(ossl_check_const_OSSL_TARGET_sk_type(sk), (idx)))
|
||||
@@ -227,7 +232,9 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGET, OSSL_TARGET, OSSL_TARGET)
|
||||
#define sk_OSSL_TARGET_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_TARGET) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_copyfunc_type(copyfunc), ossl_check_OSSL_TARGET_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_TARGET_set_cmp_func(sk, cmp) ((sk_OSSL_TARGET_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_TARGET_sk_type(sk), ossl_check_OSSL_TARGET_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGETS, OSSL_TARGETS, OSSL_TARGETS)
|
||||
#define sk_OSSL_TARGETS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_TARGETS_sk_type(sk))
|
||||
#define sk_OSSL_TARGETS_value(sk, idx) ((OSSL_TARGETS *)OPENSSL_sk_value(ossl_check_const_OSSL_TARGETS_sk_type(sk), (idx)))
|
||||
@@ -255,6 +262,7 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_TARGETS, OSSL_TARGETS, OSSL_TARGETS)
|
||||
#define sk_OSSL_TARGETS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_TARGETS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_copyfunc_type(copyfunc), ossl_check_OSSL_TARGETS_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_TARGETS_set_cmp_func(sk, cmp) ((sk_OSSL_TARGETS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_TARGETS_sk_type(sk), ossl_check_OSSL_TARGETS_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_TARGET)
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_TARGETS)
|
||||
@@ -263,6 +271,7 @@ DECLARE_ASN1_FUNCTIONS(OSSL_TARGETING_INFORMATION)
|
||||
typedef STACK_OF(OSSL_ISSUER_SERIAL) OSSL_AUTHORITY_ATTRIBUTE_ID_SYNTAX;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_AUTHORITY_ATTRIBUTE_ID_SYNTAX)
|
||||
|
||||
/* clang-format off */
|
||||
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_ISSUER_SERIAL, OSSL_ISSUER_SERIAL, OSSL_ISSUER_SERIAL)
|
||||
#define sk_OSSL_ISSUER_SERIAL_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk))
|
||||
#define sk_OSSL_ISSUER_SERIAL_value(sk, idx) ((OSSL_ISSUER_SERIAL *)OPENSSL_sk_value(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk), (idx)))
|
||||
@@ -290,5 +299,6 @@ SKM_DEFINE_STACK_OF_INTERNAL(OSSL_ISSUER_SERIAL, OSSL_ISSUER_SERIAL, OSSL_ISSUER
|
||||
#define sk_OSSL_ISSUER_SERIAL_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_ISSUER_SERIAL) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_copyfunc_type(copyfunc), ossl_check_OSSL_ISSUER_SERIAL_freefunc_type(freefunc)))
|
||||
#define sk_OSSL_ISSUER_SERIAL_set_cmp_func(sk, cmp) ((sk_OSSL_ISSUER_SERIAL_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_ISSUER_SERIAL_sk_type(sk), ossl_check_OSSL_ISSUER_SERIAL_compfunc_type(cmp)))
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_digests.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 }
|
||||
@@ -158,3 +159,4 @@ const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE
|
||||
DER_OID_V_id_KMACWithSHAKE256
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "prov/der_dsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-dsa OBJECT IDENTIFIER ::= {
|
||||
@@ -92,3 +93,4 @@ const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha
|
||||
DER_OID_V_id_dsa_with_sha3_512
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_ec.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 }
|
||||
@@ -277,3 +278,4 @@ const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with
|
||||
DER_OID_V_id_ecdsa_with_sha3_512
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_ecx.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 }
|
||||
@@ -42,3 +43,4 @@ const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = {
|
||||
DER_OID_V_id_Ed448
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_ml_dsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-ml-dsa-44 OBJECT IDENTIFIER ::= { sigAlgs 17 }
|
||||
@@ -35,3 +36,4 @@ const unsigned char ossl_der_oid_id_ml_dsa_87[DER_OID_SZ_id_ml_dsa_87] = {
|
||||
DER_OID_V_id_ml_dsa_87
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_rsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 }
|
||||
@@ -172,3 +173,4 @@ const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASign
|
||||
DER_OID_V_mdc2WithRSASignature
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_slh_dsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-slh-dsa-sha2-128s OBJECT IDENTIFIER ::= { sigAlgs 20 }
|
||||
@@ -98,3 +99,4 @@ const unsigned char ossl_der_oid_id_slh_dsa_shake_256f[DER_OID_SZ_id_slh_dsa_sha
|
||||
DER_OID_V_id_slh_dsa_shake_256f
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "prov/der_wrap.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= {
|
||||
@@ -44,3 +45,4 @@ const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = {
|
||||
DER_OID_V_id_aes256_wrap
|
||||
};
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "internal/der.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 }
|
||||
@@ -158,3 +159,4 @@ extern const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWi
|
||||
#define DER_OID_SZ_id_KMACWithSHAKE256 11
|
||||
extern const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "internal/der.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-dsa OBJECT IDENTIFIER ::= {
|
||||
@@ -86,9 +87,10 @@ extern const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_w
|
||||
#define DER_OID_SZ_id_dsa_with_sha3_512 11
|
||||
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* Subject Public Key Info */
|
||||
int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa);
|
||||
/* Signature */
|
||||
int ossl_DER_w_algorithmIdentifier_DSA_with_MD(WPACKET *pkt, int tag,
|
||||
DSA *dsa, int mdnid);
|
||||
DSA *dsa, int mdnid);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "internal/der.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 }
|
||||
@@ -278,9 +279,10 @@ extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecd
|
||||
#define DER_OID_SZ_id_ecdsa_with_sha3_512 11
|
||||
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* Subject Public Key Info */
|
||||
int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec);
|
||||
/* Signature */
|
||||
int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont,
|
||||
EC_KEY *ec, int mdnid);
|
||||
EC_KEY *ec, int mdnid);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "crypto/ecx.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 }
|
||||
@@ -43,6 +44,7 @@ extern const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519];
|
||||
#define DER_OID_SZ_id_Ed448 5
|
||||
extern const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec);
|
||||
int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "crypto/ml_dsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-ml-dsa-44 OBJECT IDENTIFIER ::= { sigAlgs 17 }
|
||||
@@ -36,5 +37,6 @@ extern const unsigned char ossl_der_oid_id_ml_dsa_65[DER_OID_SZ_id_ml_dsa_65];
|
||||
#define DER_OID_SZ_id_ml_dsa_87 11
|
||||
extern const unsigned char ossl_der_oid_id_ml_dsa_87[DER_OID_SZ_id_ml_dsa_87];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
int ossl_DER_w_algorithmIdentifier_ML_DSA(WPACKET *pkt, int tag, ML_DSA_KEY *key);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "internal/der.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 }
|
||||
@@ -173,15 +174,16 @@ extern const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ri
|
||||
#define DER_OID_SZ_mdc2WithRSASignature 7
|
||||
extern const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
/* PSS parameters */
|
||||
int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag,
|
||||
const RSA_PSS_PARAMS_30 *pss);
|
||||
const RSA_PSS_PARAMS_30 *pss);
|
||||
/* Subject Public Key Info */
|
||||
int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa);
|
||||
int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag,
|
||||
int rsa_type,
|
||||
const RSA_PSS_PARAMS_30 *pss);
|
||||
int rsa_type,
|
||||
const RSA_PSS_PARAMS_30 *pss);
|
||||
/* Signature */
|
||||
int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag,
|
||||
int mdnid);
|
||||
int mdnid);
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "crypto/slh_dsa.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-slh-dsa-sha2-128s OBJECT IDENTIFIER ::= { sigAlgs 20 }
|
||||
@@ -99,5 +100,6 @@ extern const unsigned char ossl_der_oid_id_slh_dsa_shake_256s[DER_OID_SZ_id_slh_
|
||||
#define DER_OID_SZ_id_slh_dsa_shake_256f 11
|
||||
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_256f[DER_OID_SZ_id_slh_dsa_shake_256f];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
int ossl_DER_w_algorithmIdentifier_SLH_DSA(WPACKET *pkt, int tag, SLH_DSA_KEY *key);
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "internal/der.h"
|
||||
|
||||
/* Well known OIDs precompiled */
|
||||
/* clang-format off */
|
||||
|
||||
/*
|
||||
* id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= {
|
||||
@@ -44,3 +45,4 @@ extern const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap
|
||||
#define DER_OID_SZ_id_aes256_wrap 11
|
||||
extern const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap];
|
||||
|
||||
/* clang-format on */
|
||||
|
||||
@@ -193,6 +193,7 @@ sub compute_hash {
|
||||
print STDERR "Cannot compute hash on '$fname'\n";
|
||||
return;
|
||||
}
|
||||
binmode($fh, ":crlf");
|
||||
}
|
||||
return (<$fh>, <$fh>);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ADMISSIONS 3ossl"
|
||||
.TH ADMISSIONS 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ADMISSIONS 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_EXTERN_FUNCS 3ossl"
|
||||
.TH ASN1_EXTERN_FUNCS 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_EXTERN_FUNCS 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -143,7 +146,7 @@ macro.
|
||||
.IP \fIasn1_ex_d2i\fR 4
|
||||
.IX Item "asn1_ex_d2i"
|
||||
A "d2i" function responsible for converting DER data with the tag \fItag\fR and
|
||||
class \fIclass\fR into an \fBASN1_VALUE\fR. If \fI*pval\fR is non-NULL then the
|
||||
class \fIclass\fR into an \fBASN1_VALUE\fR. If \fI*pval\fR is non\-NULL then the
|
||||
\&\fBASN_VALUE\fR it points to should be reused. Otherwise a new \fBASN1_VALUE\fR
|
||||
should be allocated and stored in \fI*pval\fR. \fI*in\fR points to the DER data to be
|
||||
decoded and \fIlen\fR is the length of that data. After decoding \fI*in\fR should be
|
||||
@@ -177,7 +180,7 @@ The \fIasn1_ex_i2d\fR entry may be NULL if \fIasn1_ex_i2d_ex\fR has been specifi
|
||||
instead.
|
||||
.Sp
|
||||
The return value should be negative if a fatal error occurred, or 0 if a
|
||||
non-fatal error occurred. Otherwise it should return the length of the encoded
|
||||
non\-fatal error occurred. Otherwise it should return the length of the encoded
|
||||
data.
|
||||
.IP \fIasn1_ex_print\fR 4
|
||||
.IX Item "asn1_ex_print"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_INTEGER_GET_INT64 3ossl"
|
||||
.TH ASN1_INTEGER_GET_INT64 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_INTEGER_GET_INT64 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_INTEGER_NEW 3ossl"
|
||||
.TH ASN1_INTEGER_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_INTEGER_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_LOOKUP 3ossl"
|
||||
.TH ASN1_ITEM_LOOKUP 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_ITEM_LOOKUP 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_OBJECT_NEW 3ossl"
|
||||
.TH ASN1_OBJECT_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_OBJECT_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_TABLE_ADD 3ossl"
|
||||
.TH ASN1_STRING_TABLE_ADD 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_STRING_TABLE_ADD 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_LENGTH 3ossl"
|
||||
.TH ASN1_STRING_LENGTH 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_STRING_LENGTH 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -116,7 +119,7 @@ should be freed using \fBOPENSSL_free()\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
Almost all ASN1 types in OpenSSL are represented as an \fBASN1_STRING\fR
|
||||
structure. Other types such as \fBASN1_OCTET_STRING\fR are simply typedef'ed
|
||||
structure. Other types such as \fBASN1_OCTET_STRING\fR are simply typedef\*(Aqed
|
||||
to \fBASN1_STRING\fR and the functions call the \fBASN1_STRING\fR equivalents.
|
||||
\&\fBASN1_STRING\fR is also used for some \fBCHOICE\fR types which consist
|
||||
entirely of primitive string types such as \fBDirectoryString\fR and
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_NEW 3ossl"
|
||||
.TH ASN1_STRING_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_STRING_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_STRING_PRINT_EX 3ossl"
|
||||
.TH ASN1_STRING_PRINT_EX 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_STRING_PRINT_EX 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -85,9 +88,9 @@ to \fIfp\fR instead.
|
||||
.PP
|
||||
\&\fBASN1_STRING_print()\fR prints \fIstr\fR to \fIout\fR but using a different format to
|
||||
\&\fBASN1_STRING_print_ex()\fR. It replaces unprintable characters (other than CR, LF)
|
||||
with '.'.
|
||||
with \*(Aq.\*(Aq.
|
||||
.PP
|
||||
\&\fBASN1_tag2str()\fR returns a human-readable name of the specified ASN.1 \fItag\fR.
|
||||
\&\fBASN1_tag2str()\fR returns a human\-readable name of the specified ASN.1 \fItag\fR.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
\&\fBASN1_STRING_print()\fR is a deprecated function which should be avoided; use
|
||||
@@ -111,7 +114,7 @@ using exactly four characters for the hex representation. If it is 32 bits then
|
||||
"\eWXXXXXXXX" is used using eight characters of its hex representation. These forms
|
||||
will only be used if UTF8 conversion is not set (see below).
|
||||
.PP
|
||||
Printable characters are normally escaped using the backslash '\e' character. If
|
||||
Printable characters are normally escaped using the backslash \*(Aq\e\*(Aq character. If
|
||||
\&\fBASN1_STRFLGS_ESC_QUOTE\fR is set then the whole string is instead surrounded by
|
||||
double quote characters: this is arguably more readable than the backslash
|
||||
notation. Other characters use the "\eXX" using exactly two characters of the hex
|
||||
@@ -153,7 +156,7 @@ characters written or \-1 if an error occurred.
|
||||
.PP
|
||||
\&\fBASN1_STRING_print()\fR returns 1 on success or 0 on error.
|
||||
.PP
|
||||
\&\fBASN1_tag2str()\fR returns a human-readable name of the specified ASN.1 \fItag\fR.
|
||||
\&\fBASN1_tag2str()\fR returns a human\-readable name of the specified ASN.1 \fItag\fR.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBX509_NAME_print_ex\fR\|(3),
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_TIME_SET 3ossl"
|
||||
.TH ASN1_TIME_SET 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_TIME_SET 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -275,7 +278,7 @@ return 1 if the time is successfully printed out and
|
||||
error occurred (invalid time format).
|
||||
.PP
|
||||
\&\fBASN1_TIME_diff()\fR returns 1 for success and 0 for failure. It can fail if the
|
||||
passed-in time structure has invalid syntax, for example.
|
||||
passed\-in time structure has invalid syntax, for example.
|
||||
.PP
|
||||
\&\fBASN1_TIME_cmp_time_t()\fR and \fBASN1_UTCTIME_cmp_time_t()\fR return \-1 if \fIs\fR is
|
||||
before \fIt\fR, 0 if \fIs\fR equals \fIt\fR, or 1 if \fIs\fR is after \fIt\fR. \-2 is returned
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_TYPE_GET 3ossl"
|
||||
.TH ASN1_TYPE_GET 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_TYPE_GET 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_AUX_CB 3ossl"
|
||||
.TH ASN1_AUX_CB 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_AUX_CB 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -125,7 +128,7 @@ The \fBASN1_AFLG_BROKEN\fR flag is a work around for broken encoders where the
|
||||
sequence length value may not be correct. This should generally not be used.
|
||||
.Sp
|
||||
The \fBASN1_AFLG_CONST_CB\fR flag indicates that the "const" form of the
|
||||
\&\fBASN1_AUX\fR callback should be used in preference to the non-const form.
|
||||
\&\fBASN1_AUX\fR callback should be used in preference to the non\-const form.
|
||||
.IP \fIref_offset\fR 4
|
||||
.IX Item "ref_offset"
|
||||
If the \fBASN1_AFLG_REFCOUNT\fR flag is set then this value is assumed to be an
|
||||
@@ -178,7 +181,7 @@ success or 0 on error.
|
||||
.IP \fBASN1_OP_FREE_POST\fR 4
|
||||
.IX Item "ASN1_OP_FREE_POST"
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
immediately after \fBASN1_VALUE\fR sub-structures are freed.
|
||||
immediately after \fBASN1_VALUE\fR sub\-structures are freed.
|
||||
.IP \fBASN1_OP_D2I_PRE\fR 4
|
||||
.IX Item "ASN1_OP_D2I_PRE"
|
||||
Invoked when processing a \fBCHOICE\fR, \fBSEQUENCE\fR or \fBNDEF_SEQUENCE\fR structure
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_GENERATE_NCONF 3ossl"
|
||||
.TH ASN1_GENERATE_NCONF 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_GENERATE_NCONF 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -234,7 +237,7 @@ SEQUENCE consisting of a BOOL an OID and a UTF8String:
|
||||
.PP
|
||||
This example produces an RSAPrivateKey structure, this is the
|
||||
key contained in the file client.pem in all OpenSSL distributions
|
||||
(note: the field names such as 'coeff' are ignored and are present just
|
||||
(note: the field names such as \*(Aqcoeff\*(Aq are ignored and are present just
|
||||
for clarity):
|
||||
.PP
|
||||
.Vb 3
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_D2I_BIO 3ossl"
|
||||
.TH ASN1_ITEM_D2I_BIO 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_ITEM_D2I_BIO 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -96,9 +99,9 @@ ASN1_item_pack, ASN1_item_unpack_ex, ASN1_item_unpack
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBASN1_item_d2i_ex()\fR decodes the contents of the data stored in \fI*in\fR of length
|
||||
\&\fIlen\fR which must be a DER-encoded ASN.1 structure, using the ASN.1 template
|
||||
\&\fIlen\fR which must be a DER\-encoded ASN.1 structure, using the ASN.1 template
|
||||
\&\fIit\fR. It places the result in \fI*pval\fR unless \fIpval\fR is NULL. If \fI*pval\fR is
|
||||
non-NULL on entry then the \fBASN1_VALUE\fR present there will be reused. Otherwise
|
||||
non\-NULL on entry then the \fBASN1_VALUE\fR present there will be reused. Otherwise
|
||||
a new \fBASN1_VALUE\fR will be allocated. If any algorithm fetches are required
|
||||
during the process then they will use the \fBOSSL_LIB_CTX\fRprovided in the
|
||||
\&\fIlibctx\fR parameter and the property query string in \fIpropq\fR. See
|
||||
@@ -110,7 +113,7 @@ decoded structure.
|
||||
OSSL_LIB_CTX is used (i.e. NULL) and with a NULL property query string.
|
||||
.PP
|
||||
\&\fBASN1_item_d2i_bio_ex()\fR decodes the contents of its input BIO \fIin\fR,
|
||||
which must be a DER-encoded ASN.1 structure, using the ASN.1 template \fIit\fR
|
||||
which must be a DER\-encoded ASN.1 structure, using the ASN.1 template \fIit\fR
|
||||
and places the result in \fI*pval\fR unless \fIpval\fR is NULL.
|
||||
If \fIin\fR is NULL it returns NULL, else a pointer to the parsed structure. If any
|
||||
algorithm fetches are required during the process then they will use the
|
||||
@@ -140,7 +143,7 @@ then the returned return is also set into \fI*oct\fR. If there is an error the o
|
||||
passed in \fBASN1_STRING\fR will not be freed, but the previous value may be cleared when
|
||||
ASN1_STRING_set0(*oct, NULL, 0) is called internally.
|
||||
.PP
|
||||
\&\fBASN1_item_unpack()\fR uses \fBASN1_item_d2i()\fR to decode the DER-encoded \fBASN1_STRING\fR
|
||||
\&\fBASN1_item_unpack()\fR uses \fBASN1_item_d2i()\fR to decode the DER\-encoded \fBASN1_STRING\fR
|
||||
\&\fIoct\fR using the ASN.1 template \fIit\fR.
|
||||
.PP
|
||||
\&\fBASN1_item_unpack_ex()\fR is similar to \fBASN1_item_unpack()\fR, but uses \fBASN1_item_d2i_ex()\fR so
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_NEW 3ossl"
|
||||
.TH ASN1_ITEM_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_ITEM_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASN1_ITEM_SIGN 3ossl"
|
||||
.TH ASN1_ITEM_SIGN 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASN1_ITEM_SIGN 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -145,10 +148,10 @@ zero for failure.
|
||||
.PP
|
||||
All verify functions return 1 if the signature is valid and 0 if the signature
|
||||
check fails. If the signature could not be checked at all because it was
|
||||
ill-formed or some other error occurred then \-1 is returned.
|
||||
ill\-formed or some other error occurred then \-1 is returned.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
In the following example a 'MyObject' object is signed using the key contained
|
||||
In the following example a \*(AqMyObject\*(Aq object is signed using the key contained
|
||||
in an EVP_MD_CTX. The signature is written to MyObject.signature. The object is
|
||||
then output in DER format and then loaded back in and verified.
|
||||
.PP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASYNC_WAIT_CTX_NEW 3ossl"
|
||||
.TH ASYNC_WAIT_CTX_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASYNC_WAIT_CTX_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -108,7 +111,7 @@ ASYNC_STATUS_EAGAIN
|
||||
For an overview of how asynchronous operations are implemented in OpenSSL see
|
||||
\&\fBASYNC_start_job\fR\|(3). An \fBASYNC_WAIT_CTX\fR object represents an asynchronous
|
||||
"session", i.e. a related set of crypto operations. For example in SSL terms
|
||||
this would have a one-to-one correspondence with an SSL connection.
|
||||
this would have a one\-to\-one correspondence with an SSL connection.
|
||||
.PP
|
||||
Application code must create an \fBASYNC_WAIT_CTX\fR using the \fBASYNC_WAIT_CTX_new()\fR
|
||||
function prior to calling \fBASYNC_start_job()\fR (see \fBASYNC_start_job\fR\|(3)). When
|
||||
@@ -122,7 +125,7 @@ is closed), application code cleans up with \fBASYNC_WAIT_CTX_free()\fR.
|
||||
Calling \fBASYNC_WAIT_CTX_get_all_fds()\fR and passing in a pointer to an
|
||||
\&\fBASYNC_WAIT_CTX\fR in the \fIctx\fR parameter will return the wait file descriptors
|
||||
associated with that job in \fI*fd\fR. The number of file descriptors returned will
|
||||
be stored in \fI*numfds\fR. It is the caller's responsibility to ensure that
|
||||
be stored in \fI*numfds\fR. It is the caller\*(Aqs responsibility to ensure that
|
||||
sufficient memory has been allocated in \fI*fd\fR to receive all the file
|
||||
descriptors. Calling \fBASYNC_WAIT_CTX_get_all_fds()\fR with a NULL \fIfd\fR value will
|
||||
return no file descriptors but will still populate \fI*numfds\fR. Therefore,
|
||||
@@ -246,7 +249,7 @@ On Windows platforms the \fI<openssl/async.h>\fR header is dependent on some
|
||||
of the types customarily made available by including \fI<windows.h>\fR. The
|
||||
application developer is likely to require control over when the latter
|
||||
is included, commonly as one of the first included headers. Therefore,
|
||||
it is defined as an application developer's responsibility to include
|
||||
it is defined as an application developer\*(Aqs responsibility to include
|
||||
\&\fI<windows.h>\fR prior to \fI<openssl/async.h>\fR.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "ASYNC_START_JOB 3ossl"
|
||||
.TH ASYNC_START_JOB 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH ASYNC_START_JOB 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -97,16 +100,16 @@ ASYNC_stack_alloc_fn, ASYNC_stack_free_fn, ASYNC_set_mem_functions, ASYNC_get_me
|
||||
OpenSSL implements asynchronous capabilities through an \fBASYNC_JOB\fR. This
|
||||
represents code that can be started and executes until some event occurs. At
|
||||
that point the code can be paused and control returns to user code until some
|
||||
subsequent event indicates that the job can be resumed. It's OpenSSL
|
||||
subsequent event indicates that the job can be resumed. It\*(Aqs OpenSSL
|
||||
specific implementation of cooperative multitasking.
|
||||
.PP
|
||||
The creation of an \fBASYNC_JOB\fR is a relatively expensive operation. Therefore,
|
||||
for efficiency reasons, jobs can be created up front and reused many times. They
|
||||
are held in a pool until they are needed, at which point they are removed from
|
||||
the pool, used, and then returned to the pool when the job completes. If the
|
||||
user application is multi-threaded, then \fBASYNC_init_thread()\fR may be called for
|
||||
user application is multi\-threaded, then \fBASYNC_init_thread()\fR may be called for
|
||||
each thread that will initiate asynchronous jobs. Before
|
||||
user code exits per-thread resources need to be cleaned up. This will normally
|
||||
user code exits per\-thread resources need to be cleaned up. This will normally
|
||||
occur automatically (see \fBOPENSSL_init_crypto\fR\|(3)) but may be explicitly
|
||||
initiated by using \fBASYNC_cleanup_thread()\fR. No asynchronous jobs must be
|
||||
outstanding for the thread when \fBASYNC_cleanup_thread()\fR is called. Failing to
|
||||
@@ -195,7 +198,7 @@ The \fBASYNC_block_pause()\fR function will prevent the currently active job fro
|
||||
pausing. The block will remain in place until a subsequent call to
|
||||
\&\fBASYNC_unblock_pause()\fR. These functions can be nested, e.g. if you call
|
||||
\&\fBASYNC_block_pause()\fR twice then you must call \fBASYNC_unblock_pause()\fR twice in
|
||||
order to re-enable pausing. If these functions are called while there is no
|
||||
order to re\-enable pausing. If these functions are called while there is no
|
||||
currently active job then they have no effect. This functionality can be useful
|
||||
to avoid deadlock scenarios. For example during the execution of an \fBASYNC_JOB\fR
|
||||
an application acquires a lock. It then calls some cryptographic function which
|
||||
@@ -215,7 +218,7 @@ stack memory such as mmap, or using stack memory from the current thread.
|
||||
Using an ASYNC_stack_alloc_fn callback also allows manipulation of the stack
|
||||
size, which defaults to 32k.
|
||||
The stack size can be altered by allocating a stack of a size different to
|
||||
the requested size, and passing back the new stack size in the callback's \fI*num\fR
|
||||
the requested size, and passing back the new stack size in the callback\*(Aqs \fI*num\fR
|
||||
parameter.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
@@ -244,7 +247,7 @@ On Windows platforms the \fI<openssl/async.h>\fR header is dependent on some
|
||||
of the types customarily made available by including \fI<windows.h>\fR. The
|
||||
application developer is likely to require control over when the latter
|
||||
is included, commonly as one of the first included headers. Therefore,
|
||||
it is defined as an application developer's responsibility to include
|
||||
it is defined as an application developer\*(Aqs responsibility to include
|
||||
\&\fI<windows.h>\fR prior to \fI<openssl/async.h>\fR.
|
||||
.SH EXAMPLES
|
||||
.IX Header "EXAMPLES"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BF_ENCRYPT 3ossl"
|
||||
.TH BF_ENCRYPT 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BF_ENCRYPT 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -125,7 +128,7 @@ The mode functions \fBBF_cbc_encrypt()\fR, \fBBF_cfb64_encrypt()\fR and \fBBF_of
|
||||
all operate on variable length data. They all take an initialization vector
|
||||
\&\fBivec\fR which needs to be passed along into the next call of the same function
|
||||
for the same message. \fBivec\fR may be initialized with anything, but the
|
||||
recipient needs to know what it was initialized with, or it won't be able
|
||||
recipient needs to know what it was initialized with, or it won\*(Aqt be able
|
||||
to decrypt. Some programs and protocols simplify this, like SSH, where
|
||||
\&\fBivec\fR is simply initialized to zero.
|
||||
\&\fBBF_cbc_encrypt()\fR operates on data that is a multiple of 8 bytes long, while
|
||||
@@ -156,10 +159,10 @@ the same way.
|
||||
\&\fBBF_encrypt()\fR and \fBBF_decrypt()\fR are the lowest level functions for Blowfish
|
||||
encryption. They encrypt/decrypt the first 64 bits of the vector pointed by
|
||||
\&\fBdata\fR, using the key \fBkey\fR. These functions should not be used unless you
|
||||
implement 'modes' of Blowfish. The alternative is to use \fBBF_ecb_encrypt()\fR.
|
||||
implement \*(Aqmodes\*(Aq of Blowfish. The alternative is to use \fBBF_ecb_encrypt()\fR.
|
||||
If you still want to use these functions, you should be aware that they take
|
||||
each 32\-bit chunk in host-byte order, which is little-endian on little-endian
|
||||
platforms and big-endian on big-endian ones.
|
||||
each 32\-bit chunk in host\-byte order, which is little\-endian on little\-endian
|
||||
platforms and big\-endian on big\-endian ones.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
None of the functions presented here return any value.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_ADDR 3ossl"
|
||||
.TH BIO_ADDR 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_ADDR 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -92,7 +95,7 @@ BIO_ADDR_path_string \- BIO_ADDR routines
|
||||
.IX Header "DESCRIPTION"
|
||||
The \fBBIO_ADDR\fR type is a wrapper around all types of socket
|
||||
addresses that OpenSSL deals with, currently transparently
|
||||
supporting AF_INET, AF_INET6 and AF_UNIX according to what's
|
||||
supporting AF_INET, AF_INET6 and AF_UNIX according to what\*(Aqs
|
||||
available on the platform at hand.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_new()\fR creates a new unfilled \fBBIO_ADDR\fR, to be used
|
||||
@@ -122,14 +125,14 @@ NUL, such as the result of a call to \fBstrlen()\fR).
|
||||
Read on about the addresses in "RAW ADDRESSES" below.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_family()\fR returns the protocol family of the given
|
||||
\&\fBBIO_ADDR\fR. The possible non-error results are one of the
|
||||
\&\fBBIO_ADDR\fR. The possible non\-error results are one of the
|
||||
constants AF_INET, AF_INET6 and AF_UNIX. It will also return AF_UNSPEC if the
|
||||
BIO_ADDR has not been initialised.
|
||||
.PP
|
||||
\&\fBBIO_ADDR_rawaddress()\fR will write the raw address of the given
|
||||
\&\fBBIO_ADDR\fR in the area pointed at by \fBp\fR if \fBp\fR is non-NULL,
|
||||
\&\fBBIO_ADDR\fR in the area pointed at by \fBp\fR if \fBp\fR is non\-NULL,
|
||||
and will set \fB*l\fR to be the amount of bytes the raw address
|
||||
takes up if \fBl\fR is non-NULL.
|
||||
takes up if \fBl\fR is non\-NULL.
|
||||
A technique to only find out the size of the address is a call
|
||||
with \fBp\fR set to \fBNULL\fR. The raw address will be in network byte
|
||||
order, most significant byte first.
|
||||
@@ -176,7 +179,7 @@ OpenSSL error stack.
|
||||
\&\fBBIO_ADDR_copy()\fR returns 1 on success or 0 on error.
|
||||
.PP
|
||||
All other functions described here return 0 or \fBNULL\fR when the
|
||||
information they should return isn't available.
|
||||
information they should return isn\*(Aqt available.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBBIO_connect\fR\|(3), \fBBIO_s_connect\fR\|(3)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_ADDRINFO 3ossl"
|
||||
.TH BIO_ADDRINFO 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_ADDRINFO 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -145,7 +148,7 @@ occurred, and will leave an error indication on the OpenSSL error stack in that
|
||||
case.
|
||||
.PP
|
||||
All other functions described here return 0 or \fBNULL\fR when the
|
||||
information they should return isn't available.
|
||||
information they should return isn\*(Aqt available.
|
||||
.SH NOTES
|
||||
.IX Header "NOTES"
|
||||
The \fBBIO_lookup_ex()\fR implementation uses the platform provided \fBgetaddrinfo()\fR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_CONNECT 3ossl"
|
||||
.TH BIO_CONNECT 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_CONNECT 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -98,7 +101,7 @@ The flags are described in "FLAGS" below.
|
||||
.PP
|
||||
\&\fBBIO_accept_ex()\fR waits for an incoming connections on the given
|
||||
socket \fBaccept_sock\fR. When it gets a connection, the address and
|
||||
port of the peer gets stored in \fBpeer\fR if that one is non-NULL.
|
||||
port of the peer gets stored in \fBpeer\fR if that one is non\-NULL.
|
||||
Accept \fBoptions\fR may be zero or \fBBIO_SOCK_NONBLOCK\fR, and is applied
|
||||
on the accepted socket. The flags are described in "FLAGS" below.
|
||||
.PP
|
||||
@@ -107,7 +110,7 @@ on the accepted socket. The flags are described in "FLAGS" below.
|
||||
.IX Header "FLAGS"
|
||||
.IP BIO_SOCK_KEEPALIVE 4
|
||||
.IX Item "BIO_SOCK_KEEPALIVE"
|
||||
Enables regular sending of keep-alive messages.
|
||||
Enables regular sending of keep\-alive messages.
|
||||
.IP BIO_SOCK_NONBLOCK 4
|
||||
.IX Item "BIO_SOCK_NONBLOCK"
|
||||
Sets the socket to nonblocking mode.
|
||||
@@ -115,7 +118,7 @@ Sets the socket to nonblocking mode.
|
||||
.IX Item "BIO_SOCK_NODELAY"
|
||||
Corresponds to \fBTCP_NODELAY\fR, and disables the Nagle algorithm. With
|
||||
this set, any data will be sent as soon as possible instead of being
|
||||
buffered until there's enough for the socket to send out in one go.
|
||||
buffered until there\*(Aqs enough for the socket to send out in one go.
|
||||
.IP BIO_SOCK_REUSEADDR 4
|
||||
.IX Item "BIO_SOCK_REUSEADDR"
|
||||
Try to reuse the address and port combination for a recently closed
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_CTRL 3ossl"
|
||||
.TH BIO_CTRL 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_CTRL 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -116,7 +119,7 @@ calls.
|
||||
of file related BIOs for example it rewinds the file pointer to the
|
||||
start of the file.
|
||||
.PP
|
||||
\&\fBBIO_seek()\fR resets a file related BIO's (that is file descriptor and
|
||||
\&\fBBIO_seek()\fR resets a file related BIO\*(Aqs (that is file descriptor and
|
||||
FILE BIOs) file position pointer to \fBofs\fR bytes from start of file.
|
||||
.PP
|
||||
\&\fBBIO_tell()\fR returns the current file position of a file related BIO.
|
||||
@@ -140,9 +143,9 @@ Not all BIOs support these calls. \fBBIO_ctrl_pending()\fR and \fBBIO_ctrl_wpend
|
||||
return a size_t type and are functions, \fBBIO_pending()\fR and \fBBIO_wpending()\fR are
|
||||
macros which call \fBBIO_ctrl()\fR.
|
||||
.PP
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data-path for
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
sending. Otherwise, it returns zero.
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data-path for
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
receiving. Otherwise, it returns zero.
|
||||
.PP
|
||||
\&\fBBIO_get_conn_mode()\fR returns the BIO connection mode. \fBBIO_set_conn_mode()\fR sets
|
||||
@@ -174,13 +177,13 @@ return the amount of pending data. \fBBIO_pending()\fR and \fBBIO_wpending()\fR
|
||||
negative value or 0 on error. \fBBIO_ctrl_pending()\fR and \fBBIO_ctrl_wpending()\fR return
|
||||
0 on error.
|
||||
.PP
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data-path for
|
||||
\&\fBBIO_get_ktls_send()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
sending. Otherwise, it returns zero.
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data-path for
|
||||
\&\fBBIO_get_ktls_recv()\fR returns 1 if the BIO is using the Kernel TLS data\-path for
|
||||
receiving. Otherwise, it returns zero.
|
||||
.PP
|
||||
\&\fBBIO_set_conn_mode()\fR returns 1 for success and 0 for failure. \fBBIO_get_conn_mode()\fR
|
||||
returns the current connection mode. Which may contain the bitwise-or of the
|
||||
returns the current connection mode. Which may contain the bitwise\-or of the
|
||||
following flags:
|
||||
.PP
|
||||
.Vb 6
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_BASE64 3ossl"
|
||||
.TH BIO_F_BASE64 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_BASE64 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -93,7 +96,7 @@ skipped, as are lines longer than 1024 bytes.
|
||||
Decoding starts with the first line that is shorter than 1024 bytes (including
|
||||
the newline) and consists of only (at least one) valid base64 characters plus
|
||||
optional whitespace.
|
||||
Decoding stops when base64 padding is encountered, a soft end-of-input
|
||||
Decoding stops when base64 padding is encountered, a soft end\-of\-input
|
||||
character (\fB\-\fR, see \fBEVP_DecodeUpdate\fR\|(3)) occurs as the first byte after a
|
||||
complete group of 4 valid base64 characters is decoded, or when an error occurs
|
||||
(e.g. due to input characters other than valid base64 or whitespace).
|
||||
@@ -157,12 +160,12 @@ data to standard output:
|
||||
.Ve
|
||||
.SH BUGS
|
||||
.IX Header "BUGS"
|
||||
The hyphen character (\fB\-\fR) is treated as an ad hoc soft end-of-input
|
||||
The hyphen character (\fB\-\fR) is treated as an ad hoc soft end\-of\-input
|
||||
character when it occurs at the start of a base64 group of 4 encoded
|
||||
characters.
|
||||
.PP
|
||||
This heuristic works to detect the ends of base64 blocks in PEM or
|
||||
multi-part MIME, provided there are no stray hyphens in the middle
|
||||
multi\-part MIME, provided there are no stray hyphens in the middle
|
||||
input.
|
||||
But it is just a heuristic, and sufficiently unusual input could produce
|
||||
unexpected results.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_BUFFER 3ossl"
|
||||
.TH BIO_F_BUFFER 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_BUFFER 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -112,7 +115,7 @@ Buffering BIOs implement \fBBIO_read_ex()\fR and \fBBIO_gets()\fR by using
|
||||
result in an internal buffer, from which bytes are given back to the
|
||||
caller as appropriate for the call; a \fBBIO_gets()\fR is guaranteed to give
|
||||
the caller a whole line, and \fBBIO_read_ex()\fR is guaranteed to give the
|
||||
caller the number of bytes it asks for, unless there's an error or end
|
||||
caller the number of bytes it asks for, unless there\*(Aqs an error or end
|
||||
of communication is reached in the next BIO. By prepending a
|
||||
buffering BIO to a chain it is therefore possible to provide
|
||||
\&\fBBIO_gets()\fR or exact size \fBBIO_read_ex()\fR functionality if the following
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_CIPHER 3ossl"
|
||||
.TH BIO_F_CIPHER 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_CIPHER 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_MD 3ossl"
|
||||
.TH BIO_F_MD 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_MD 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_NULL 3ossl"
|
||||
.TH BIO_F_NULL 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_NULL 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_PREFIX 3ossl"
|
||||
.TH BIO_F_PREFIX 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_PREFIX 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -88,7 +91,7 @@ By default, there is no prefix, and indentation is set to 0.
|
||||
.PP
|
||||
\&\fBBIO_set_prefix()\fR sets the prefix to be used for future lines of
|
||||
text, using \fIprefix\fR. \fIprefix\fR may be NULL, signifying that there
|
||||
should be no prefix. If \fIprefix\fR isn't NULL, this function makes a
|
||||
should be no prefix. If \fIprefix\fR isn\*(Aqt NULL, this function makes a
|
||||
copy of it.
|
||||
.PP
|
||||
\&\fBBIO_set_indent()\fR sets the indentation to be used for future lines of
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_READBUFFER 3ossl"
|
||||
.TH BIO_F_READBUFFER 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_READBUFFER 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -74,7 +77,7 @@ BIO_f_readbuffer
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_f_readbuffer()\fR returns the read buffering BIO method.
|
||||
.PP
|
||||
This BIO filter can be inserted on top of BIO's that do not support \fBBIO_tell()\fR
|
||||
This BIO filter can be inserted on top of BIO\*(Aqs that do not support \fBBIO_tell()\fR
|
||||
or \fBBIO_seek()\fR (e.g. A file BIO that uses stdin).
|
||||
.PP
|
||||
Data read from a read buffering BIO comes from an internal buffer which is
|
||||
@@ -90,7 +93,7 @@ Read buffering BIOs implement \fBBIO_read_ex()\fR by using \fBBIO_read_ex()\fR o
|
||||
on the next BIO (e.g. a file BIO) in the chain and storing the result in an
|
||||
internal buffer, from which bytes are given back to the caller as appropriate
|
||||
for the call. \fBBIO_read_ex()\fR is guaranteed to give the caller the number of bytes
|
||||
it asks for, unless there's an error or end of communication is reached in the
|
||||
it asks for, unless there\*(Aqs an error or end of communication is reached in the
|
||||
next BIO. The internal buffer can grow to cache the entire contents of the next
|
||||
BIO in the chain. \fBBIO_seek()\fR uses the internal buffer, so that it can only seek
|
||||
into data that is already read.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_F_SSL 3ossl"
|
||||
.TH BIO_F_SSL 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_F_SSL 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -153,7 +156,7 @@ pointer.
|
||||
.PP
|
||||
\&\fBBIO_do_handshake()\fR attempts to complete an SSL handshake on the
|
||||
supplied BIO and establish the SSL connection.
|
||||
For non-SSL BIOs the connection is done typically at TCP level.
|
||||
For non\-SSL BIOs the connection is done typically at TCP level.
|
||||
If domain name resolution yields multiple IP addresses all of them are tried
|
||||
after \fBconnect()\fR failures.
|
||||
The function returns 1 if the connection was established successfully.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_FIND_TYPE 3ossl"
|
||||
.TH BIO_FIND_TYPE 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_FIND_TYPE 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_GET_DATA 3ossl"
|
||||
.TH BIO_GET_DATA 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_GET_DATA 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -83,7 +86,7 @@ The \fBBIO_set_data()\fR function associates the custom data pointed to by \fBpt
|
||||
the BIO. This data can subsequently be retrieved via a call to \fBBIO_get_data()\fR.
|
||||
This can be used by custom BIOs for storing implementation specific information.
|
||||
.PP
|
||||
The \fBBIO_set_init()\fR function sets the value of the BIO's "init" flag to indicate
|
||||
The \fBBIO_set_init()\fR function sets the value of the BIO\*(Aqs "init" flag to indicate
|
||||
whether initialisation has been completed for this BIO or not. A nonzero value
|
||||
indicates that initialisation is complete, whilst zero indicates that it is not.
|
||||
Often initialisation will complete during initial construction of the BIO. For
|
||||
@@ -92,16 +95,16 @@ have occurred (for example through calling custom ctrls). The \fBBIO_get_init()\
|
||||
function returns the value of the "init" flag.
|
||||
.PP
|
||||
The \fBBIO_set_shutdown()\fR and \fBBIO_get_shutdown()\fR functions set and get the state of
|
||||
this BIO's shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource
|
||||
this BIO\*(Aqs shutdown (i.e. BIO_CLOSE) flag. If set then the underlying resource
|
||||
is also closed when the BIO is freed.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_get_data()\fR returns a pointer to the implementation specific custom data
|
||||
associated with this BIO, or NULL if none has been set.
|
||||
.PP
|
||||
\&\fBBIO_get_init()\fR returns the state of the BIO's init flag.
|
||||
\&\fBBIO_get_init()\fR returns the state of the BIO\*(Aqs init flag.
|
||||
.PP
|
||||
\&\fBBIO_get_shutdown()\fR returns the stat of the BIO's shutdown (i.e. BIO_CLOSE) flag.
|
||||
\&\fBBIO_get_shutdown()\fR returns the stat of the BIO\*(Aqs shutdown (i.e. BIO_CLOSE) flag.
|
||||
.SH "SEE ALSO"
|
||||
.IX Header "SEE ALSO"
|
||||
\&\fBbio\fR\|(7), \fBBIO_meth_new\fR\|(3)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_GET_EX_NEW_INDEX 3ossl"
|
||||
.TH BIO_GET_EX_NEW_INDEX 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_GET_EX_NEW_INDEX 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -141,7 +144,7 @@ Applications should instead use \fBEVP_PKEY_set_ex_data()\fR,
|
||||
All functions with a \fITYPE\fR of \fBENGINE\fR are deprecated.
|
||||
Applications using engines should be replaced by providers.
|
||||
.PP
|
||||
These functions handle application-specific data for OpenSSL data
|
||||
These functions handle application\-specific data for OpenSSL data
|
||||
structures.
|
||||
.PP
|
||||
\&\fBTYPE_get_ex_new_index()\fR is a macro that calls \fBCRYPTO_get_ex_new_index()\fR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_GET_RPOLL_DESCRIPTOR 3ossl"
|
||||
.TH BIO_GET_RPOLL_DESCRIPTOR 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_GET_RPOLL_DESCRIPTOR 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -84,7 +87,7 @@ can be used to determine when a BIO object can next be read or written
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_get_rpoll_descriptor()\fR and \fBBIO_get_wpoll_descriptor()\fR, on success, fill
|
||||
\&\fI*desc\fR with a poll descriptor. A poll descriptor is a tagged union structure
|
||||
which represents some kind of OS or non-OS resource which can be used to
|
||||
which represents some kind of OS or non\-OS resource which can be used to
|
||||
synchronise on I/O availability events.
|
||||
.PP
|
||||
\&\fBBIO_get_rpoll_descriptor()\fR outputs a descriptor which can be used to determine
|
||||
@@ -115,7 +118,7 @@ in the \fBBIO_POLL_DESCRIPTOR\fR is valid if it is not set to \-1.
|
||||
.Sp
|
||||
The resource is whatever kind of handle is used by a given OS to represent
|
||||
sockets, which may vary by OS. For example, on Windows, the value is a \fBSOCKET\fR
|
||||
for use with the Winsock API. On POSIX-like platforms, it is a file descriptor.
|
||||
for use with the Winsock API. On POSIX\-like platforms, it is a file descriptor.
|
||||
.Sp
|
||||
Where a poll descriptor of this type is output by \fBBIO_get_rpoll_descriptor()\fR, it
|
||||
should be polled for readability to determine when the BIO might next be able to
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_METH_NEW 3ossl"
|
||||
.TH BIO_METH_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_METH_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -244,7 +247,7 @@ The \fBBIO_meth_get\fR functions return the corresponding function pointers.
|
||||
.IX Header "BUGS"
|
||||
It is not safe to use \f(CW\*(C`BIO_meth_get_\*(C'\fR functions to reuse the \fBBIO\fR
|
||||
implementation of \fBBIO\fRs implemented by OpenSSL itself with
|
||||
application-implemented \fBBIO\fRs. Instead either the applications ought to
|
||||
application\-implemented \fBBIO\fRs. Instead either the applications ought to
|
||||
implement these functions themselves or they should implement a filter BIO.
|
||||
.PP
|
||||
For more details please see <https://github.com/openssl/openssl/issues/26047>.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_NEW 3ossl"
|
||||
.TH BIO_NEW 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_NEW 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_NEW_CMS 3ossl"
|
||||
.TH BIO_NEW_CMS 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_NEW_CMS 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PARSE_HOSTSERV 3ossl"
|
||||
.TH BIO_PARSE_HOSTSERV 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_PARSE_HOSTSERV 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -96,8 +99,8 @@ The syntax the \fBBIO_parse_hostserv()\fR recognises is:
|
||||
\& service
|
||||
.Ve
|
||||
.PP
|
||||
The host part can be a name or an IP address. If it's a IPv6
|
||||
address, it MUST be enclosed in brackets, such as '[::1]'.
|
||||
The host part can be a name or an IP address. If it\*(Aqs a IPv6
|
||||
address, it MUST be enclosed in brackets, such as \*(Aq[::1]\*(Aq.
|
||||
.PP
|
||||
The service part can be a service name or its port number. A service name
|
||||
will be mapped to a port number using the system function \fBgetservbyname()\fR.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PRINTF 3ossl"
|
||||
.TH BIO_PRINTF 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_PRINTF 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_PUSH 3ossl"
|
||||
.TH BIO_PUSH 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_PUSH 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_READ 3ossl"
|
||||
.TH BIO_READ 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_READ 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -96,22 +99,22 @@ in \fIbuf\fR. Usually this operation will attempt to read a line of data
|
||||
from the BIO of maximum length \fIsize\-1\fR. There are exceptions to this,
|
||||
however; for example, \fBBIO_gets()\fR on a digest BIO will calculate and
|
||||
return the digest and other BIOs may not support \fBBIO_gets()\fR at all.
|
||||
The returned string is always NUL-terminated and the '\en' is preserved
|
||||
The returned string is always NUL\-terminated and the \*(Aq\en\*(Aq is preserved
|
||||
if present in the input data.
|
||||
On binary input there may be NUL characters within the string;
|
||||
in this case the return value (if nonnegative) may give an incorrect length.
|
||||
.PP
|
||||
\&\fBBIO_get_line()\fR attempts to read from BIO \fIb\fR a line of data up to the next '\en'
|
||||
\&\fBBIO_get_line()\fR attempts to read from BIO \fIb\fR a line of data up to the next \*(Aq\en\*(Aq
|
||||
or the maximum length \fIsize\-1\fR is reached and places the data in \fIbuf\fR.
|
||||
The returned string is always NUL-terminated and the '\en' is preserved
|
||||
The returned string is always NUL\-terminated and the \*(Aq\en\*(Aq is preserved
|
||||
if present in the input data.
|
||||
On binary input there may be NUL characters within the string;
|
||||
in this case the return value (if nonnegative) gives the actual length read.
|
||||
For implementing this, unfortunately the data needs to be read byte-by-byte.
|
||||
For implementing this, unfortunately the data needs to be read byte\-by\-byte.
|
||||
.PP
|
||||
\&\fBBIO_write()\fR attempts to write \fIlen\fR bytes from \fIbuf\fR to BIO \fIb\fR.
|
||||
.PP
|
||||
\&\fBBIO_puts()\fR attempts to write a NUL-terminated string \fIbuf\fR to BIO \fIb\fR.
|
||||
\&\fBBIO_puts()\fR attempts to write a NUL\-terminated string \fIbuf\fR to BIO \fIb\fR.
|
||||
.SH "RETURN VALUES"
|
||||
.IX Header "RETURN VALUES"
|
||||
\&\fBBIO_read_ex()\fR returns 1 if data was successfully read, and 0 otherwise.
|
||||
@@ -165,7 +168,7 @@ supported by adding a buffering BIO \fBBIO_f_buffer\fR\|(3) to the chain.
|
||||
.SH HISTORY
|
||||
.IX Header "HISTORY"
|
||||
\&\fBBIO_gets()\fR on 1.1.0 and older when called on \fBBIO_fd()\fR based BIO did not
|
||||
keep the '\en' at the end of the line in the buffer.
|
||||
keep the \*(Aq\en\*(Aq at the end of the line in the buffer.
|
||||
.PP
|
||||
\&\fBBIO_get_line()\fR was added in OpenSSL 3.0.
|
||||
.PP
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_ACCEPT 3ossl"
|
||||
.TH BIO_S_ACCEPT 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_S_ACCEPT 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -98,7 +101,7 @@ BIO_set_bind_mode, BIO_get_bind_mode, BIO_do_accept \- accept BIO
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_accept()\fR returns the accept BIO method. This is a wrapper
|
||||
round the platform's TCP/IP socket accept routines.
|
||||
round the platform\*(Aqs TCP/IP socket accept routines.
|
||||
.PP
|
||||
Using accept BIOs, TCP/IP connections can be accepted and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_BIO 3ossl"
|
||||
.TH BIO_S_BIO 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_S_BIO 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -193,7 +196,7 @@ locations for \fBbio1\fR and \fBbio2\fR. Check the error stack for more informat
|
||||
.IX Header "EXAMPLES"
|
||||
The BIO pair can be used to have full control over the network access of an
|
||||
application. The application can call \fBselect()\fR on the socket as required
|
||||
without having to go through the SSL-interface.
|
||||
without having to go through the SSL\-interface.
|
||||
.PP
|
||||
.Vb 1
|
||||
\& BIO *internal_bio, *network_bio;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.\" -*- mode: troff; coding: utf-8 -*-
|
||||
.\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
|
||||
.\" Automatically generated by Pod::Man v6.0.2 (Pod::Simple 3.45)
|
||||
.\"
|
||||
.\" Standard preamble:
|
||||
.\" ========================================================================
|
||||
@@ -52,10 +52,13 @@
|
||||
. \}
|
||||
.\}
|
||||
.rr rF
|
||||
.\"
|
||||
.\" Required to disable full justification in groff 1.23.0.
|
||||
.if n .ds AD l
|
||||
.\" ========================================================================
|
||||
.\"
|
||||
.IX Title "BIO_S_CONNECT 3ossl"
|
||||
.TH BIO_S_CONNECT 3ossl 2025-09-30 3.5.4 OpenSSL
|
||||
.TH BIO_S_CONNECT 3ossl 2026-01-27 3.5.5 OpenSSL
|
||||
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
|
||||
.\" way too many mistakes in technical documents.
|
||||
.if n .ad l
|
||||
@@ -97,7 +100,7 @@ BIO_do_connect \- connect BIO
|
||||
.SH DESCRIPTION
|
||||
.IX Header "DESCRIPTION"
|
||||
\&\fBBIO_s_connect()\fR returns the connect BIO method. This is a wrapper
|
||||
round the platform's TCP/IP socket connection routines.
|
||||
round the platform\*(Aqs TCP/IP socket connection routines.
|
||||
.PP
|
||||
Using connect BIOs, TCP/IP connections can be made and data
|
||||
transferred using only BIO routines. In this way any platform
|
||||
@@ -156,7 +159,7 @@ non blocking I/O is set during the connect process.
|
||||
.PP
|
||||
\&\fBBIO_do_connect()\fR attempts to connect the supplied BIO.
|
||||
This performs an SSL/TLS handshake as far as supported by the BIO.
|
||||
For non-SSL BIOs the connection is done typically at TCP level.
|
||||
For non\-SSL BIOs the connection is done typically at TCP level.
|
||||
If domain name resolution yields multiple IP addresses all of them are tried
|
||||
after \fBconnect()\fR failures.
|
||||
The function returns 1 if the connection was established successfully.
|
||||
@@ -186,7 +189,7 @@ will normally mean that the connection was closed.
|
||||
If the port name is supplied as part of the hostname then this will
|
||||
override any value set with \fBBIO_set_conn_port()\fR. This may be undesirable
|
||||
if the application does not wish to allow connection to arbitrary
|
||||
ports. This can be avoided by checking for the presence of the ':'
|
||||
ports. This can be avoided by checking for the presence of the \*(Aq:\*(Aq
|
||||
character in the passed hostname and either indicating an error or
|
||||
truncating the string at that point.
|
||||
.PP
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user