Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- micromamba_root/envs/hf_sync/Library/include/openssl/aes.h +109 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/applink.c +151 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/asn1.h +1125 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/asn1err.h +140 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/asn1t.h +935 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/async.h +102 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/asyncerr.h +27 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/bio.h +1028 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/bioerr.h +70 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/blowfish.h +78 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/bn.h +588 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/bnerr.h +45 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/buffer.h +60 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/buffererr.h +23 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/byteorder.h +339 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/camellia.h +117 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cast.h +71 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cmac.h +52 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cmp.h +741 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cmp_util.h +56 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cmperr.h +132 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cms.h +524 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cmserr.h +128 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/comp.h +101 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/comperr.h +36 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/conf.h +219 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/conf_api.h +46 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/conferr.h +50 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/configuration.h +208 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/conftypes.h +44 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/core.h +235 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/core_dispatch.h +1061 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/core_names.h +588 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/core_object.h +41 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/crmf.h +279 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/crmferr.h +55 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/crypto.h +619 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cryptoerr.h +54 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cryptoerr_legacy.h +1466 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/ct.h +574 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/cterr.h +43 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/decoder.h +133 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/decodererr.h +26 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/des.h +211 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/dh.h +333 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/dherr.h +57 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/dsa.h +273 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/dsaerr.h +42 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/dtls1.h +57 -0
- micromamba_root/envs/hf_sync/Library/include/openssl/e_os2.h +306 -0
micromamba_root/envs/hf_sync/Library/include/openssl/aes.h
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_AES_H
|
| 11 |
+
#define OPENSSL_AES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_AES_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#include <stddef.h>
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define AES_BLOCK_SIZE 16
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 29 |
+
|
| 30 |
+
#define AES_ENCRYPT 1
|
| 31 |
+
#define AES_DECRYPT 0
|
| 32 |
+
|
| 33 |
+
#define AES_MAXNR 14
|
| 34 |
+
|
| 35 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 36 |
+
struct aes_key_st {
|
| 37 |
+
#ifdef AES_LONG
|
| 38 |
+
unsigned long rd_key[4 * (AES_MAXNR + 1)];
|
| 39 |
+
#else
|
| 40 |
+
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
| 41 |
+
#endif
|
| 42 |
+
int rounds;
|
| 43 |
+
};
|
| 44 |
+
typedef struct aes_key_st AES_KEY;
|
| 45 |
+
|
| 46 |
+
#endif
|
| 47 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
|
| 49 |
+
OSSL_DEPRECATEDIN_3_0
|
| 50 |
+
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
| 51 |
+
AES_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
| 54 |
+
AES_KEY *key);
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0
|
| 56 |
+
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
| 57 |
+
const AES_KEY *key);
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0
|
| 59 |
+
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
| 60 |
+
const AES_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0
|
| 62 |
+
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 63 |
+
const AES_KEY *key, const int enc);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0
|
| 65 |
+
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 66 |
+
size_t length, const AES_KEY *key,
|
| 67 |
+
unsigned char *ivec, const int enc);
|
| 68 |
+
OSSL_DEPRECATEDIN_3_0
|
| 69 |
+
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 70 |
+
size_t length, const AES_KEY *key,
|
| 71 |
+
unsigned char *ivec, int *num, const int enc);
|
| 72 |
+
OSSL_DEPRECATEDIN_3_0
|
| 73 |
+
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
| 74 |
+
size_t length, const AES_KEY *key,
|
| 75 |
+
unsigned char *ivec, int *num, const int enc);
|
| 76 |
+
OSSL_DEPRECATEDIN_3_0
|
| 77 |
+
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
| 78 |
+
size_t length, const AES_KEY *key,
|
| 79 |
+
unsigned char *ivec, int *num, const int enc);
|
| 80 |
+
OSSL_DEPRECATEDIN_3_0
|
| 81 |
+
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
| 82 |
+
size_t length, const AES_KEY *key,
|
| 83 |
+
unsigned char *ivec, int *num);
|
| 84 |
+
|
| 85 |
+
/* NB: the IV is _two_ blocks long */
|
| 86 |
+
OSSL_DEPRECATEDIN_3_0
|
| 87 |
+
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 88 |
+
size_t length, const AES_KEY *key,
|
| 89 |
+
unsigned char *ivec, const int enc);
|
| 90 |
+
/* NB: the IV is _four_ blocks long */
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0
|
| 92 |
+
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
| 93 |
+
size_t length, const AES_KEY *key, const AES_KEY *key2,
|
| 94 |
+
const unsigned char *ivec, const int enc);
|
| 95 |
+
OSSL_DEPRECATEDIN_3_0
|
| 96 |
+
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
| 97 |
+
unsigned char *out, const unsigned char *in,
|
| 98 |
+
unsigned int inlen);
|
| 99 |
+
OSSL_DEPRECATEDIN_3_0
|
| 100 |
+
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
| 101 |
+
unsigned char *out, const unsigned char *in,
|
| 102 |
+
unsigned int inlen);
|
| 103 |
+
#endif
|
| 104 |
+
|
| 105 |
+
#ifdef __cplusplus
|
| 106 |
+
}
|
| 107 |
+
#endif
|
| 108 |
+
|
| 109 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/applink.c
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2004-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#define APPLINK_STDIN 1
|
| 11 |
+
#define APPLINK_STDOUT 2
|
| 12 |
+
#define APPLINK_STDERR 3
|
| 13 |
+
#define APPLINK_FPRINTF 4
|
| 14 |
+
#define APPLINK_FGETS 5
|
| 15 |
+
#define APPLINK_FREAD 6
|
| 16 |
+
#define APPLINK_FWRITE 7
|
| 17 |
+
#define APPLINK_FSETMOD 8
|
| 18 |
+
#define APPLINK_FEOF 9
|
| 19 |
+
#define APPLINK_FCLOSE 10 /* should not be used */
|
| 20 |
+
|
| 21 |
+
#define APPLINK_FOPEN 11 /* solely for completeness */
|
| 22 |
+
#define APPLINK_FSEEK 12
|
| 23 |
+
#define APPLINK_FTELL 13
|
| 24 |
+
#define APPLINK_FFLUSH 14
|
| 25 |
+
#define APPLINK_FERROR 15
|
| 26 |
+
#define APPLINK_CLEARERR 16
|
| 27 |
+
#define APPLINK_FILENO 17 /* to be used with below */
|
| 28 |
+
|
| 29 |
+
#define APPLINK_OPEN 18 /* formally can't be used, as flags can vary */
|
| 30 |
+
#define APPLINK_READ 19
|
| 31 |
+
#define APPLINK_WRITE 20
|
| 32 |
+
#define APPLINK_LSEEK 21
|
| 33 |
+
#define APPLINK_CLOSE 22
|
| 34 |
+
#define APPLINK_MAX 22 /* always same as last macro */
|
| 35 |
+
|
| 36 |
+
#ifndef APPMACROS_ONLY
|
| 37 |
+
|
| 38 |
+
/*
|
| 39 |
+
* Normally, do not define APPLINK_NO_INCLUDES. Define it if you are using
|
| 40 |
+
* symbol preprocessing and do not want the preprocessing to affect the
|
| 41 |
+
* following included header files. You will need to put these
|
| 42 |
+
* include lines somewhere in the file that is including applink.c.
|
| 43 |
+
*/
|
| 44 |
+
#ifndef APPLINK_NO_INCLUDES
|
| 45 |
+
#include <stdio.h>
|
| 46 |
+
#include <io.h>
|
| 47 |
+
#include <fcntl.h>
|
| 48 |
+
#endif
|
| 49 |
+
|
| 50 |
+
#ifdef __BORLANDC__
|
| 51 |
+
/* _lseek in <io.h> is a function-like macro so we can't take its address */
|
| 52 |
+
#undef _lseek
|
| 53 |
+
#define _lseek lseek
|
| 54 |
+
#endif
|
| 55 |
+
|
| 56 |
+
static void *app_stdin(void)
|
| 57 |
+
{
|
| 58 |
+
return stdin;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
static void *app_stdout(void)
|
| 62 |
+
{
|
| 63 |
+
return stdout;
|
| 64 |
+
}
|
| 65 |
+
|
| 66 |
+
static void *app_stderr(void)
|
| 67 |
+
{
|
| 68 |
+
return stderr;
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
static int app_feof(FILE *fp)
|
| 72 |
+
{
|
| 73 |
+
return feof(fp);
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
static int app_ferror(FILE *fp)
|
| 77 |
+
{
|
| 78 |
+
return ferror(fp);
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
static void app_clearerr(FILE *fp)
|
| 82 |
+
{
|
| 83 |
+
clearerr(fp);
|
| 84 |
+
}
|
| 85 |
+
|
| 86 |
+
static int app_fileno(FILE *fp)
|
| 87 |
+
{
|
| 88 |
+
return _fileno(fp);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
static int app_fsetmod(FILE *fp, char mod)
|
| 92 |
+
{
|
| 93 |
+
return _setmode(_fileno(fp), mod == 'b' ? _O_BINARY : _O_TEXT);
|
| 94 |
+
}
|
| 95 |
+
|
| 96 |
+
#ifdef __cplusplus
|
| 97 |
+
extern "C" {
|
| 98 |
+
#endif
|
| 99 |
+
|
| 100 |
+
__declspec(dllexport) void **
|
| 101 |
+
#if defined(__BORLANDC__)
|
| 102 |
+
/*
|
| 103 |
+
* __stdcall appears to be the only way to get the name
|
| 104 |
+
* decoration right with Borland C. Otherwise it works
|
| 105 |
+
* purely incidentally, as we pass no parameters.
|
| 106 |
+
*/
|
| 107 |
+
__stdcall
|
| 108 |
+
#else
|
| 109 |
+
__cdecl
|
| 110 |
+
#endif
|
| 111 |
+
OPENSSL_Applink(void)
|
| 112 |
+
{
|
| 113 |
+
static int once = 1;
|
| 114 |
+
static void *OPENSSL_ApplinkTable[APPLINK_MAX + 1] = { (void *)APPLINK_MAX };
|
| 115 |
+
|
| 116 |
+
if (once) {
|
| 117 |
+
OPENSSL_ApplinkTable[APPLINK_STDIN] = app_stdin;
|
| 118 |
+
OPENSSL_ApplinkTable[APPLINK_STDOUT] = app_stdout;
|
| 119 |
+
OPENSSL_ApplinkTable[APPLINK_STDERR] = app_stderr;
|
| 120 |
+
OPENSSL_ApplinkTable[APPLINK_FPRINTF] = fprintf;
|
| 121 |
+
OPENSSL_ApplinkTable[APPLINK_FGETS] = fgets;
|
| 122 |
+
OPENSSL_ApplinkTable[APPLINK_FREAD] = fread;
|
| 123 |
+
OPENSSL_ApplinkTable[APPLINK_FWRITE] = fwrite;
|
| 124 |
+
OPENSSL_ApplinkTable[APPLINK_FSETMOD] = app_fsetmod;
|
| 125 |
+
OPENSSL_ApplinkTable[APPLINK_FEOF] = app_feof;
|
| 126 |
+
OPENSSL_ApplinkTable[APPLINK_FCLOSE] = fclose;
|
| 127 |
+
|
| 128 |
+
OPENSSL_ApplinkTable[APPLINK_FOPEN] = fopen;
|
| 129 |
+
OPENSSL_ApplinkTable[APPLINK_FSEEK] = fseek;
|
| 130 |
+
OPENSSL_ApplinkTable[APPLINK_FTELL] = ftell;
|
| 131 |
+
OPENSSL_ApplinkTable[APPLINK_FFLUSH] = fflush;
|
| 132 |
+
OPENSSL_ApplinkTable[APPLINK_FERROR] = app_ferror;
|
| 133 |
+
OPENSSL_ApplinkTable[APPLINK_CLEARERR] = app_clearerr;
|
| 134 |
+
OPENSSL_ApplinkTable[APPLINK_FILENO] = app_fileno;
|
| 135 |
+
|
| 136 |
+
OPENSSL_ApplinkTable[APPLINK_OPEN] = _open;
|
| 137 |
+
OPENSSL_ApplinkTable[APPLINK_READ] = _read;
|
| 138 |
+
OPENSSL_ApplinkTable[APPLINK_WRITE] = _write;
|
| 139 |
+
OPENSSL_ApplinkTable[APPLINK_LSEEK] = _lseek;
|
| 140 |
+
OPENSSL_ApplinkTable[APPLINK_CLOSE] = _close;
|
| 141 |
+
|
| 142 |
+
once = 0;
|
| 143 |
+
}
|
| 144 |
+
|
| 145 |
+
return OPENSSL_ApplinkTable;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
#ifdef __cplusplus
|
| 149 |
+
}
|
| 150 |
+
#endif
|
| 151 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/asn1.h
ADDED
|
@@ -0,0 +1,1125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\asn1.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_ASN1_H
|
| 18 |
+
#define OPENSSL_ASN1_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_ASN1_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#ifndef OPENSSL_NO_STDIO
|
| 27 |
+
#include <stdio.h>
|
| 28 |
+
#endif
|
| 29 |
+
#include <time.h>
|
| 30 |
+
#include <openssl/e_os2.h>
|
| 31 |
+
#include <openssl/opensslconf.h>
|
| 32 |
+
#include <openssl/bio.h>
|
| 33 |
+
#include <openssl/safestack.h>
|
| 34 |
+
#include <openssl/asn1err.h>
|
| 35 |
+
#include <openssl/symhacks.h>
|
| 36 |
+
|
| 37 |
+
#include <openssl/types.h>
|
| 38 |
+
#include <openssl/bn.h>
|
| 39 |
+
|
| 40 |
+
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 41 |
+
#undef OPENSSL_EXTERN
|
| 42 |
+
#define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 43 |
+
#endif
|
| 44 |
+
|
| 45 |
+
#ifdef __cplusplus
|
| 46 |
+
extern "C" {
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#define V_ASN1_UNIVERSAL 0x00
|
| 50 |
+
#define V_ASN1_APPLICATION 0x40
|
| 51 |
+
#define V_ASN1_CONTEXT_SPECIFIC 0x80
|
| 52 |
+
#define V_ASN1_PRIVATE 0xc0
|
| 53 |
+
|
| 54 |
+
#define V_ASN1_CONSTRUCTED 0x20
|
| 55 |
+
#define V_ASN1_PRIMITIVE_TAG 0x1f
|
| 56 |
+
#define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG
|
| 57 |
+
|
| 58 |
+
#define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
|
| 59 |
+
#define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
|
| 60 |
+
#define V_ASN1_ANY -4 /* used in ASN1 template code */
|
| 61 |
+
|
| 62 |
+
#define V_ASN1_UNDEF -1
|
| 63 |
+
/* ASN.1 tag values */
|
| 64 |
+
#define V_ASN1_EOC 0
|
| 65 |
+
#define V_ASN1_BOOLEAN 1
|
| 66 |
+
#define V_ASN1_INTEGER 2
|
| 67 |
+
#define V_ASN1_BIT_STRING 3
|
| 68 |
+
#define V_ASN1_OCTET_STRING 4
|
| 69 |
+
#define V_ASN1_NULL 5
|
| 70 |
+
#define V_ASN1_OBJECT 6
|
| 71 |
+
#define V_ASN1_OBJECT_DESCRIPTOR 7
|
| 72 |
+
#define V_ASN1_EXTERNAL 8
|
| 73 |
+
#define V_ASN1_REAL 9
|
| 74 |
+
#define V_ASN1_ENUMERATED 10
|
| 75 |
+
#define V_ASN1_UTF8STRING 12
|
| 76 |
+
#define V_ASN1_SEQUENCE 16
|
| 77 |
+
#define V_ASN1_SET 17
|
| 78 |
+
#define V_ASN1_NUMERICSTRING 18
|
| 79 |
+
#define V_ASN1_PRINTABLESTRING 19
|
| 80 |
+
#define V_ASN1_T61STRING 20
|
| 81 |
+
#define V_ASN1_TELETEXSTRING 20 /* alias */
|
| 82 |
+
#define V_ASN1_VIDEOTEXSTRING 21
|
| 83 |
+
#define V_ASN1_IA5STRING 22
|
| 84 |
+
#define V_ASN1_UTCTIME 23
|
| 85 |
+
#define V_ASN1_GENERALIZEDTIME 24
|
| 86 |
+
#define V_ASN1_GRAPHICSTRING 25
|
| 87 |
+
#define V_ASN1_ISO64STRING 26
|
| 88 |
+
#define V_ASN1_VISIBLESTRING 26 /* alias */
|
| 89 |
+
#define V_ASN1_GENERALSTRING 27
|
| 90 |
+
#define V_ASN1_UNIVERSALSTRING 28
|
| 91 |
+
#define V_ASN1_BMPSTRING 30
|
| 92 |
+
|
| 93 |
+
/*
|
| 94 |
+
* NB the constants below are used internally by ASN1_INTEGER
|
| 95 |
+
* and ASN1_ENUMERATED to indicate the sign. They are *not* on
|
| 96 |
+
* the wire tag values.
|
| 97 |
+
*/
|
| 98 |
+
|
| 99 |
+
#define V_ASN1_NEG 0x100
|
| 100 |
+
#define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
|
| 101 |
+
#define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
|
| 102 |
+
|
| 103 |
+
/* For use with d2i_ASN1_type_bytes() */
|
| 104 |
+
#define B_ASN1_NUMERICSTRING 0x0001
|
| 105 |
+
#define B_ASN1_PRINTABLESTRING 0x0002
|
| 106 |
+
#define B_ASN1_T61STRING 0x0004
|
| 107 |
+
#define B_ASN1_TELETEXSTRING 0x0004
|
| 108 |
+
#define B_ASN1_VIDEOTEXSTRING 0x0008
|
| 109 |
+
#define B_ASN1_IA5STRING 0x0010
|
| 110 |
+
#define B_ASN1_GRAPHICSTRING 0x0020
|
| 111 |
+
#define B_ASN1_ISO64STRING 0x0040
|
| 112 |
+
#define B_ASN1_VISIBLESTRING 0x0040
|
| 113 |
+
#define B_ASN1_GENERALSTRING 0x0080
|
| 114 |
+
#define B_ASN1_UNIVERSALSTRING 0x0100
|
| 115 |
+
#define B_ASN1_OCTET_STRING 0x0200
|
| 116 |
+
#define B_ASN1_BIT_STRING 0x0400
|
| 117 |
+
#define B_ASN1_BMPSTRING 0x0800
|
| 118 |
+
#define B_ASN1_UNKNOWN 0x1000
|
| 119 |
+
#define B_ASN1_UTF8STRING 0x2000
|
| 120 |
+
#define B_ASN1_UTCTIME 0x4000
|
| 121 |
+
#define B_ASN1_GENERALIZEDTIME 0x8000
|
| 122 |
+
#define B_ASN1_SEQUENCE 0x10000
|
| 123 |
+
/* For use with ASN1_mbstring_copy() */
|
| 124 |
+
#define MBSTRING_FLAG 0x1000
|
| 125 |
+
#define MBSTRING_UTF8 (MBSTRING_FLAG)
|
| 126 |
+
#define MBSTRING_ASC (MBSTRING_FLAG | 1)
|
| 127 |
+
#define MBSTRING_BMP (MBSTRING_FLAG | 2)
|
| 128 |
+
#define MBSTRING_UNIV (MBSTRING_FLAG | 4)
|
| 129 |
+
#define SMIME_OLDMIME 0x400
|
| 130 |
+
#define SMIME_CRLFEOL 0x800
|
| 131 |
+
#define SMIME_STREAM 0x1000
|
| 132 |
+
|
| 133 |
+
/* Stacks for types not otherwise defined in this header */
|
| 134 |
+
/* clang-format off */
|
| 135 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
|
| 136 |
+
#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 137 |
+
#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
|
| 138 |
+
#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 139 |
+
#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
|
| 140 |
+
#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
|
| 141 |
+
#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
|
| 142 |
+
#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
|
| 143 |
+
#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
|
| 144 |
+
#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
|
| 145 |
+
#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
|
| 146 |
+
#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 147 |
+
#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 148 |
+
#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 149 |
+
#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 150 |
+
#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_freefunc_type(freefunc))
|
| 151 |
+
#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
|
| 152 |
+
#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
|
| 153 |
+
#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 154 |
+
#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 155 |
+
#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
|
| 156 |
+
#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
|
| 157 |
+
#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 158 |
+
#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
|
| 159 |
+
#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
|
| 160 |
+
#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 161 |
+
|
| 162 |
+
/* clang-format on */
|
| 163 |
+
|
| 164 |
+
#define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
|
| 165 |
+
/*
|
| 166 |
+
* This indicates that the ASN1_STRING is not a real value but just a place
|
| 167 |
+
* holder for the location where indefinite length constructed data should be
|
| 168 |
+
* inserted in the memory buffer
|
| 169 |
+
*/
|
| 170 |
+
#define ASN1_STRING_FLAG_NDEF 0x010
|
| 171 |
+
|
| 172 |
+
/*
|
| 173 |
+
* This flag is used by the CMS code to indicate that a string is not
|
| 174 |
+
* complete and is a place holder for content when it had all been accessed.
|
| 175 |
+
* The flag will be reset when content has been written to it.
|
| 176 |
+
*/
|
| 177 |
+
|
| 178 |
+
#define ASN1_STRING_FLAG_CONT 0x020
|
| 179 |
+
/*
|
| 180 |
+
* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
|
| 181 |
+
* type.
|
| 182 |
+
*/
|
| 183 |
+
#define ASN1_STRING_FLAG_MSTRING 0x040
|
| 184 |
+
/* String is embedded and only content should be freed */
|
| 185 |
+
#define ASN1_STRING_FLAG_EMBED 0x080
|
| 186 |
+
/* String should be parsed in RFC 5280's time format */
|
| 187 |
+
#define ASN1_STRING_FLAG_X509_TIME 0x100
|
| 188 |
+
/* This is the base type that holds just about everything :-) */
|
| 189 |
+
struct asn1_string_st {
|
| 190 |
+
int length;
|
| 191 |
+
int type;
|
| 192 |
+
unsigned char *data;
|
| 193 |
+
/*
|
| 194 |
+
* The value of the following field depends on the type being held. It
|
| 195 |
+
* is mostly being used for BIT_STRING so if the input data has a
|
| 196 |
+
* non-zero 'unused bits' value, it will be handled correctly
|
| 197 |
+
*/
|
| 198 |
+
long flags;
|
| 199 |
+
};
|
| 200 |
+
|
| 201 |
+
/*
|
| 202 |
+
* ASN1_ENCODING structure: this is used to save the received encoding of an
|
| 203 |
+
* ASN1 type. This is useful to get round problems with invalid encodings
|
| 204 |
+
* which can break signatures.
|
| 205 |
+
*/
|
| 206 |
+
|
| 207 |
+
typedef struct ASN1_ENCODING_st {
|
| 208 |
+
unsigned char *enc; /* DER encoding */
|
| 209 |
+
long len; /* Length of encoding */
|
| 210 |
+
int modified; /* set to 1 if 'enc' is invalid */
|
| 211 |
+
} ASN1_ENCODING;
|
| 212 |
+
|
| 213 |
+
/* Used with ASN1 LONG type: if a long is set to this it is omitted */
|
| 214 |
+
#define ASN1_LONG_UNDEF 0x7fffffffL
|
| 215 |
+
|
| 216 |
+
#define STABLE_FLAGS_MALLOC 0x01
|
| 217 |
+
/*
|
| 218 |
+
* A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted
|
| 219 |
+
* as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting
|
| 220 |
+
* STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias
|
| 221 |
+
* STABLE_FLAGS_CLEAR to reflect this.
|
| 222 |
+
*/
|
| 223 |
+
#define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
|
| 224 |
+
#define STABLE_NO_MASK 0x02
|
| 225 |
+
#define DIRSTRING_TYPE \
|
| 226 |
+
(B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING)
|
| 227 |
+
#define PKCS9STRING_TYPE (DIRSTRING_TYPE | B_ASN1_IA5STRING)
|
| 228 |
+
|
| 229 |
+
struct asn1_string_table_st {
|
| 230 |
+
int nid;
|
| 231 |
+
long minsize;
|
| 232 |
+
long maxsize;
|
| 233 |
+
unsigned long mask;
|
| 234 |
+
unsigned long flags;
|
| 235 |
+
};
|
| 236 |
+
|
| 237 |
+
/* clang-format off */
|
| 238 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
|
| 239 |
+
#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 240 |
+
#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
|
| 241 |
+
#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 242 |
+
#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
|
| 243 |
+
#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
|
| 244 |
+
#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
|
| 245 |
+
#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 246 |
+
#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 247 |
+
#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
|
| 248 |
+
#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 249 |
+
#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 250 |
+
#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 251 |
+
#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 252 |
+
#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 253 |
+
#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
|
| 254 |
+
#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
|
| 255 |
+
#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 256 |
+
#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 257 |
+
#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 258 |
+
#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
|
| 259 |
+
#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 260 |
+
#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 261 |
+
#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
|
| 262 |
+
#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
|
| 263 |
+
#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 264 |
+
|
| 265 |
+
/* clang-format on */
|
| 266 |
+
|
| 267 |
+
/* size limits: this stuff is taken straight from RFC 5280 */
|
| 268 |
+
|
| 269 |
+
#define ub_name 32768
|
| 270 |
+
#define ub_common_name 64
|
| 271 |
+
#define ub_locality_name 128
|
| 272 |
+
#define ub_state_name 128
|
| 273 |
+
#define ub_organization_name 64
|
| 274 |
+
#define ub_organization_unit_name 64
|
| 275 |
+
#define ub_title 64
|
| 276 |
+
#define ub_email_address 128
|
| 277 |
+
|
| 278 |
+
/*
|
| 279 |
+
* Declarations for template structures: for full definitions see asn1t.h
|
| 280 |
+
*/
|
| 281 |
+
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
| 282 |
+
typedef struct ASN1_TLC_st ASN1_TLC;
|
| 283 |
+
/* This is just an opaque pointer */
|
| 284 |
+
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
| 285 |
+
|
| 286 |
+
/* Declare ASN1 functions: the implement macro is in asn1t.h */
|
| 287 |
+
|
| 288 |
+
/*
|
| 289 |
+
* The mysterious 'extern' that's passed to some macros is innocuous,
|
| 290 |
+
* and is there to quiet pre-C99 compilers that may complain about empty
|
| 291 |
+
* arguments in macro calls.
|
| 292 |
+
*/
|
| 293 |
+
|
| 294 |
+
#define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
|
| 295 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
|
| 296 |
+
#define DECLARE_ASN1_FUNCTIONS(type) \
|
| 297 |
+
DECLARE_ASN1_FUNCTIONS_attr(extern, type)
|
| 298 |
+
|
| 299 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
|
| 300 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
|
| 301 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
|
| 302 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
|
| 303 |
+
|
| 304 |
+
#define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
|
| 305 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 306 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
|
| 307 |
+
#define DECLARE_ASN1_FUNCTIONS_name(type, name) \
|
| 308 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
|
| 309 |
+
|
| 310 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
|
| 311 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 312 |
+
DECLARE_ASN1_ITEM_attr(attr, itname)
|
| 313 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
|
| 314 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
|
| 315 |
+
|
| 316 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
|
| 317 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
|
| 318 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
|
| 319 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
|
| 320 |
+
|
| 321 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 322 |
+
attr type *d2i_##name(type **a, const unsigned char **in, long len); \
|
| 323 |
+
attr int i2d_##name(const type *a, unsigned char **out);
|
| 324 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
|
| 325 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
|
| 326 |
+
|
| 327 |
+
#define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
|
| 328 |
+
attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
|
| 329 |
+
#define DECLARE_ASN1_NDEF_FUNCTION(name) \
|
| 330 |
+
DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
|
| 331 |
+
|
| 332 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 333 |
+
attr type *name##_new(void); \
|
| 334 |
+
attr void name##_free(type *a);
|
| 335 |
+
#define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 336 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
|
| 337 |
+
|
| 338 |
+
#define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
|
| 339 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
|
| 340 |
+
#define DECLARE_ASN1_DUP_FUNCTION(type) \
|
| 341 |
+
DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
|
| 342 |
+
|
| 343 |
+
#define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
|
| 344 |
+
attr type *name##_dup(const type *a);
|
| 345 |
+
#define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
|
| 346 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
|
| 347 |
+
|
| 348 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
|
| 349 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
|
| 350 |
+
#define DECLARE_ASN1_PRINT_FUNCTION(stname) \
|
| 351 |
+
DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
|
| 352 |
+
|
| 353 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
|
| 354 |
+
attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 355 |
+
const ASN1_PCTX *pctx);
|
| 356 |
+
#define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
|
| 357 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
|
| 358 |
+
|
| 359 |
+
#define D2I_OF(type) type *(*)(type **, const unsigned char **, long)
|
| 360 |
+
#define I2D_OF(type) int (*)(const type *, unsigned char **)
|
| 361 |
+
|
| 362 |
+
#define CHECKED_D2I_OF(type, d2i) \
|
| 363 |
+
((d2i_of_void *)(1 ? d2i : ((D2I_OF(type))0)))
|
| 364 |
+
#define CHECKED_I2D_OF(type, i2d) \
|
| 365 |
+
((i2d_of_void *)(1 ? i2d : ((I2D_OF(type))0)))
|
| 366 |
+
#define CHECKED_NEW_OF(type, xnew) \
|
| 367 |
+
((void *(*)(void))(1 ? xnew : ((type * (*)(void))0)))
|
| 368 |
+
#define CHECKED_PTR_OF(type, p) \
|
| 369 |
+
((void *)(1 ? p : (type *)0))
|
| 370 |
+
#define CHECKED_PPTR_OF(type, p) \
|
| 371 |
+
((void **)(1 ? p : (type **)0))
|
| 372 |
+
|
| 373 |
+
#define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **, const unsigned char **, long)
|
| 374 |
+
#define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *, unsigned char **)
|
| 375 |
+
#define TYPEDEF_D2I2D_OF(type) \
|
| 376 |
+
TYPEDEF_D2I_OF(type); \
|
| 377 |
+
TYPEDEF_I2D_OF(type)
|
| 378 |
+
|
| 379 |
+
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
| 380 |
+
typedef int i2d_of_void(const void *, unsigned char **);
|
| 381 |
+
typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
|
| 382 |
+
|
| 383 |
+
/*-
|
| 384 |
+
* The following macros and typedefs allow an ASN1_ITEM
|
| 385 |
+
* to be embedded in a structure and referenced. Since
|
| 386 |
+
* the ASN1_ITEM pointers need to be globally accessible
|
| 387 |
+
* (possibly from shared libraries) they may exist in
|
| 388 |
+
* different forms. On platforms that support it the
|
| 389 |
+
* ASN1_ITEM structure itself will be globally exported.
|
| 390 |
+
* Other platforms will export a function that returns
|
| 391 |
+
* an ASN1_ITEM pointer.
|
| 392 |
+
*
|
| 393 |
+
* To handle both cases transparently the macros below
|
| 394 |
+
* should be used instead of hard coding an ASN1_ITEM
|
| 395 |
+
* pointer in a structure.
|
| 396 |
+
*
|
| 397 |
+
* The structure will look like this:
|
| 398 |
+
*
|
| 399 |
+
* typedef struct SOMETHING_st {
|
| 400 |
+
* ...
|
| 401 |
+
* ASN1_ITEM_EXP *iptr;
|
| 402 |
+
* ...
|
| 403 |
+
* } SOMETHING;
|
| 404 |
+
*
|
| 405 |
+
* It would be initialised as e.g.:
|
| 406 |
+
*
|
| 407 |
+
* SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
|
| 408 |
+
*
|
| 409 |
+
* and the actual pointer extracted with:
|
| 410 |
+
*
|
| 411 |
+
* const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
|
| 412 |
+
*
|
| 413 |
+
* Finally an ASN1_ITEM pointer can be extracted from an
|
| 414 |
+
* appropriate reference with: ASN1_ITEM_rptr(X509). This
|
| 415 |
+
* would be used when a function takes an ASN1_ITEM * argument.
|
| 416 |
+
*
|
| 417 |
+
*/
|
| 418 |
+
|
| 419 |
+
/*
|
| 420 |
+
* Platforms that can't easily handle shared global variables are declared as
|
| 421 |
+
* functions returning ASN1_ITEM pointers.
|
| 422 |
+
*/
|
| 423 |
+
|
| 424 |
+
/* ASN1_ITEM pointer exported type */
|
| 425 |
+
typedef const ASN1_ITEM *ASN1_ITEM_EXP(void);
|
| 426 |
+
|
| 427 |
+
/* Macro to obtain ASN1_ITEM pointer from exported type */
|
| 428 |
+
#define ASN1_ITEM_ptr(iptr) (iptr())
|
| 429 |
+
|
| 430 |
+
/* Macro to include ASN1_ITEM pointer from base type */
|
| 431 |
+
#define ASN1_ITEM_ref(iptr) (iptr##_it)
|
| 432 |
+
|
| 433 |
+
#define ASN1_ITEM_rptr(ref) (ref##_it())
|
| 434 |
+
|
| 435 |
+
#define DECLARE_ASN1_ITEM_attr(attr, name) \
|
| 436 |
+
attr const ASN1_ITEM *name##_it(void);
|
| 437 |
+
#define DECLARE_ASN1_ITEM(name) \
|
| 438 |
+
DECLARE_ASN1_ITEM_attr(extern, name)
|
| 439 |
+
|
| 440 |
+
/* Parameters used by ASN1_STRING_print_ex() */
|
| 441 |
+
|
| 442 |
+
/*
|
| 443 |
+
* These determine which characters to escape: RFC2253 special characters,
|
| 444 |
+
* control characters and MSB set characters
|
| 445 |
+
*/
|
| 446 |
+
|
| 447 |
+
#define ASN1_STRFLGS_ESC_2253 1
|
| 448 |
+
#define ASN1_STRFLGS_ESC_CTRL 2
|
| 449 |
+
#define ASN1_STRFLGS_ESC_MSB 4
|
| 450 |
+
|
| 451 |
+
/* Lower 8 bits are reserved as an output type specifier */
|
| 452 |
+
#define ASN1_DTFLGS_TYPE_MASK 0x0FUL
|
| 453 |
+
#define ASN1_DTFLGS_RFC822 0x00UL
|
| 454 |
+
#define ASN1_DTFLGS_ISO8601 0x01UL
|
| 455 |
+
|
| 456 |
+
/*
|
| 457 |
+
* This flag determines how we do escaping: normally RC2253 backslash only,
|
| 458 |
+
* set this to use backslash and quote.
|
| 459 |
+
*/
|
| 460 |
+
|
| 461 |
+
#define ASN1_STRFLGS_ESC_QUOTE 8
|
| 462 |
+
|
| 463 |
+
/* These three flags are internal use only. */
|
| 464 |
+
|
| 465 |
+
/* Character is a valid PrintableString character */
|
| 466 |
+
#define CHARTYPE_PRINTABLESTRING 0x10
|
| 467 |
+
/* Character needs escaping if it is the first character */
|
| 468 |
+
#define CHARTYPE_FIRST_ESC_2253 0x20
|
| 469 |
+
/* Character needs escaping if it is the last character */
|
| 470 |
+
#define CHARTYPE_LAST_ESC_2253 0x40
|
| 471 |
+
|
| 472 |
+
/*
|
| 473 |
+
* NB the internal flags are safely reused below by flags handled at the top
|
| 474 |
+
* level.
|
| 475 |
+
*/
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* If this is set we convert all character strings to UTF8 first
|
| 479 |
+
*/
|
| 480 |
+
|
| 481 |
+
#define ASN1_STRFLGS_UTF8_CONVERT 0x10
|
| 482 |
+
|
| 483 |
+
/*
|
| 484 |
+
* If this is set we don't attempt to interpret content: just assume all
|
| 485 |
+
* strings are 1 byte per character. This will produce some pretty odd
|
| 486 |
+
* looking output!
|
| 487 |
+
*/
|
| 488 |
+
|
| 489 |
+
#define ASN1_STRFLGS_IGNORE_TYPE 0x20
|
| 490 |
+
|
| 491 |
+
/* If this is set we include the string type in the output */
|
| 492 |
+
#define ASN1_STRFLGS_SHOW_TYPE 0x40
|
| 493 |
+
|
| 494 |
+
/*
|
| 495 |
+
* This determines which strings to display and which to 'dump' (hex dump of
|
| 496 |
+
* content octets or DER encoding). We can only dump non character strings or
|
| 497 |
+
* everything. If we don't dump 'unknown' they are interpreted as character
|
| 498 |
+
* strings with 1 octet per character and are subject to the usual escaping
|
| 499 |
+
* options.
|
| 500 |
+
*/
|
| 501 |
+
|
| 502 |
+
#define ASN1_STRFLGS_DUMP_ALL 0x80
|
| 503 |
+
#define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
|
| 504 |
+
|
| 505 |
+
/*
|
| 506 |
+
* These determine what 'dumping' does, we can dump the content octets or the
|
| 507 |
+
* DER encoding: both use the RFC2253 #XXXXX notation.
|
| 508 |
+
*/
|
| 509 |
+
|
| 510 |
+
#define ASN1_STRFLGS_DUMP_DER 0x200
|
| 511 |
+
|
| 512 |
+
/*
|
| 513 |
+
* This flag specifies that RC2254 escaping shall be performed.
|
| 514 |
+
*/
|
| 515 |
+
#define ASN1_STRFLGS_ESC_2254 0x400
|
| 516 |
+
|
| 517 |
+
/*
|
| 518 |
+
* All the string flags consistent with RFC2253, escaping control characters
|
| 519 |
+
* isn't essential in RFC2253 but it is advisable anyway.
|
| 520 |
+
*/
|
| 521 |
+
|
| 522 |
+
#define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN | ASN1_STRFLGS_DUMP_DER)
|
| 523 |
+
|
| 524 |
+
struct asn1_type_st {
|
| 525 |
+
int type;
|
| 526 |
+
union {
|
| 527 |
+
char *ptr;
|
| 528 |
+
ASN1_BOOLEAN boolean;
|
| 529 |
+
ASN1_STRING *asn1_string;
|
| 530 |
+
ASN1_OBJECT *object;
|
| 531 |
+
ASN1_INTEGER *integer;
|
| 532 |
+
ASN1_ENUMERATED *enumerated;
|
| 533 |
+
ASN1_BIT_STRING *bit_string;
|
| 534 |
+
ASN1_OCTET_STRING *octet_string;
|
| 535 |
+
ASN1_PRINTABLESTRING *printablestring;
|
| 536 |
+
ASN1_T61STRING *t61string;
|
| 537 |
+
ASN1_IA5STRING *ia5string;
|
| 538 |
+
ASN1_GENERALSTRING *generalstring;
|
| 539 |
+
ASN1_BMPSTRING *bmpstring;
|
| 540 |
+
ASN1_UNIVERSALSTRING *universalstring;
|
| 541 |
+
ASN1_UTCTIME *utctime;
|
| 542 |
+
ASN1_GENERALIZEDTIME *generalizedtime;
|
| 543 |
+
ASN1_VISIBLESTRING *visiblestring;
|
| 544 |
+
ASN1_UTF8STRING *utf8string;
|
| 545 |
+
/*
|
| 546 |
+
* set and sequence are left complete and still contain the set or
|
| 547 |
+
* sequence bytes
|
| 548 |
+
*/
|
| 549 |
+
ASN1_STRING *set;
|
| 550 |
+
ASN1_STRING *sequence;
|
| 551 |
+
ASN1_VALUE *asn1_value;
|
| 552 |
+
} value;
|
| 553 |
+
};
|
| 554 |
+
|
| 555 |
+
/* clang-format off */
|
| 556 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
|
| 557 |
+
#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 558 |
+
#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
|
| 559 |
+
#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 560 |
+
#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
|
| 561 |
+
#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
|
| 562 |
+
#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
|
| 563 |
+
#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 564 |
+
#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 565 |
+
#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
|
| 566 |
+
#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
|
| 567 |
+
#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 568 |
+
#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 569 |
+
#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 570 |
+
#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 571 |
+
#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_freefunc_type(freefunc))
|
| 572 |
+
#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
|
| 573 |
+
#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
|
| 574 |
+
#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 575 |
+
#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 576 |
+
#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
|
| 577 |
+
#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 578 |
+
#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 579 |
+
#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
|
| 580 |
+
#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
|
| 581 |
+
#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 582 |
+
|
| 583 |
+
/* clang-format on */
|
| 584 |
+
|
| 585 |
+
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
|
| 586 |
+
|
| 587 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
|
| 588 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
|
| 589 |
+
|
| 590 |
+
/* This is used to contain a list of bit names */
|
| 591 |
+
typedef struct BIT_STRING_BITNAME_st {
|
| 592 |
+
int bitnum;
|
| 593 |
+
const char *lname;
|
| 594 |
+
const char *sname;
|
| 595 |
+
} BIT_STRING_BITNAME;
|
| 596 |
+
|
| 597 |
+
#define B_ASN1_TIME \
|
| 598 |
+
B_ASN1_UTCTIME | B_ASN1_GENERALIZEDTIME
|
| 599 |
+
|
| 600 |
+
#define B_ASN1_PRINTABLE \
|
| 601 |
+
B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING | B_ASN1_BIT_STRING | B_ASN1_UNIVERSALSTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING | B_ASN1_SEQUENCE | B_ASN1_UNKNOWN
|
| 602 |
+
|
| 603 |
+
#define B_ASN1_DIRECTORYSTRING \
|
| 604 |
+
B_ASN1_PRINTABLESTRING | B_ASN1_TELETEXSTRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING
|
| 605 |
+
|
| 606 |
+
#define B_ASN1_DISPLAYTEXT \
|
| 607 |
+
B_ASN1_IA5STRING | B_ASN1_VISIBLESTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING
|
| 608 |
+
|
| 609 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
|
| 610 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
| 611 |
+
|
| 612 |
+
int ASN1_TYPE_get(const ASN1_TYPE *a);
|
| 613 |
+
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
| 614 |
+
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
| 615 |
+
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
| 616 |
+
|
| 617 |
+
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
|
| 618 |
+
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
|
| 619 |
+
|
| 620 |
+
/* clang-format off */
|
| 621 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
|
| 622 |
+
#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 623 |
+
#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
|
| 624 |
+
#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 625 |
+
#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
|
| 626 |
+
#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
|
| 627 |
+
#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
|
| 628 |
+
#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 629 |
+
#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 630 |
+
#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
|
| 631 |
+
#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 632 |
+
#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 633 |
+
#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 634 |
+
#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 635 |
+
#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 636 |
+
#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
|
| 637 |
+
#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
|
| 638 |
+
#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 639 |
+
#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 640 |
+
#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 641 |
+
#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
|
| 642 |
+
#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 643 |
+
#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 644 |
+
#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
|
| 645 |
+
#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
|
| 646 |
+
#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 647 |
+
|
| 648 |
+
/* clang-format on */
|
| 649 |
+
|
| 650 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
|
| 651 |
+
|
| 652 |
+
ASN1_STRING *ASN1_STRING_new(void);
|
| 653 |
+
void ASN1_STRING_free(ASN1_STRING *a);
|
| 654 |
+
void ASN1_STRING_clear_free(ASN1_STRING *a);
|
| 655 |
+
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
|
| 656 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
|
| 657 |
+
ASN1_STRING *ASN1_STRING_type_new(int type);
|
| 658 |
+
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
|
| 659 |
+
/*
|
| 660 |
+
* Since this is used to store all sorts of things, via macros, for now,
|
| 661 |
+
* make its data void *
|
| 662 |
+
*/
|
| 663 |
+
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
|
| 664 |
+
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
|
| 665 |
+
int ASN1_STRING_length(const ASN1_STRING *x);
|
| 666 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 667 |
+
OSSL_DEPRECATEDIN_3_0 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
|
| 668 |
+
#endif
|
| 669 |
+
int ASN1_STRING_type(const ASN1_STRING *x);
|
| 670 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 671 |
+
OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
| 672 |
+
#endif
|
| 673 |
+
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
|
| 674 |
+
|
| 675 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
|
| 676 |
+
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
|
| 677 |
+
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
|
| 678 |
+
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
|
| 679 |
+
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
|
| 680 |
+
const unsigned char *flags, int flags_len);
|
| 681 |
+
|
| 682 |
+
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
|
| 683 |
+
BIT_STRING_BITNAME *tbl, int indent);
|
| 684 |
+
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
|
| 685 |
+
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
|
| 686 |
+
BIT_STRING_BITNAME *tbl);
|
| 687 |
+
|
| 688 |
+
/* clang-format off */
|
| 689 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
|
| 690 |
+
#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 691 |
+
#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
|
| 692 |
+
#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 693 |
+
#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
|
| 694 |
+
#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
|
| 695 |
+
#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
|
| 696 |
+
#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 697 |
+
#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 698 |
+
#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
|
| 699 |
+
#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 700 |
+
#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 701 |
+
#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 702 |
+
#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 703 |
+
#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 704 |
+
#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
|
| 705 |
+
#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
|
| 706 |
+
#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 707 |
+
#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 708 |
+
#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 709 |
+
#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
|
| 710 |
+
#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 711 |
+
#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 712 |
+
#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
|
| 713 |
+
#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
|
| 714 |
+
#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 715 |
+
|
| 716 |
+
/* clang-format on */
|
| 717 |
+
|
| 718 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
|
| 719 |
+
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
| 720 |
+
long length);
|
| 721 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
|
| 722 |
+
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
|
| 723 |
+
|
| 724 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
| 725 |
+
|
| 726 |
+
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
| 727 |
+
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
|
| 728 |
+
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
| 729 |
+
int offset_day, long offset_sec);
|
| 730 |
+
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
|
| 731 |
+
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
| 732 |
+
|
| 733 |
+
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
| 734 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
| 735 |
+
time_t t);
|
| 736 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
|
| 737 |
+
time_t t, int offset_day,
|
| 738 |
+
long offset_sec);
|
| 739 |
+
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
|
| 740 |
+
|
| 741 |
+
int ASN1_TIME_diff(int *pday, int *psec,
|
| 742 |
+
const ASN1_TIME *from, const ASN1_TIME *to);
|
| 743 |
+
|
| 744 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
|
| 745 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
|
| 746 |
+
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
|
| 747 |
+
const ASN1_OCTET_STRING *b);
|
| 748 |
+
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
|
| 749 |
+
int len);
|
| 750 |
+
|
| 751 |
+
/* clang-format off */
|
| 752 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
|
| 753 |
+
#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 754 |
+
#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
|
| 755 |
+
#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 756 |
+
#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
|
| 757 |
+
#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
|
| 758 |
+
#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
|
| 759 |
+
#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 760 |
+
#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 761 |
+
#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
|
| 762 |
+
#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 763 |
+
#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 764 |
+
#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 765 |
+
#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 766 |
+
#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 767 |
+
#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
|
| 768 |
+
#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
|
| 769 |
+
#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 770 |
+
#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 771 |
+
#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 772 |
+
#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
|
| 773 |
+
#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 774 |
+
#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 775 |
+
#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
|
| 776 |
+
#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
|
| 777 |
+
#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 778 |
+
|
| 779 |
+
/* clang-format on */
|
| 780 |
+
|
| 781 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
| 782 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
| 783 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
| 784 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
| 785 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
| 786 |
+
|
| 787 |
+
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
|
| 788 |
+
int UTF8_putc(unsigned char *str, int len, unsigned long value);
|
| 789 |
+
|
| 790 |
+
/* clang-format off */
|
| 791 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
|
| 792 |
+
#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 793 |
+
#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
|
| 794 |
+
#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 795 |
+
#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
|
| 796 |
+
#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
|
| 797 |
+
#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
|
| 798 |
+
#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 799 |
+
#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 800 |
+
#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
|
| 801 |
+
#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 802 |
+
#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 803 |
+
#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 804 |
+
#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 805 |
+
#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 806 |
+
#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
|
| 807 |
+
#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
|
| 808 |
+
#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 809 |
+
#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 810 |
+
#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 811 |
+
#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
|
| 812 |
+
#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 813 |
+
#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 814 |
+
#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
|
| 815 |
+
#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
|
| 816 |
+
#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 817 |
+
|
| 818 |
+
/* clang-format on */
|
| 819 |
+
|
| 820 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
|
| 821 |
+
|
| 822 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
|
| 823 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
|
| 824 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
|
| 825 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
|
| 826 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
|
| 827 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
|
| 828 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
| 829 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
| 830 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
| 831 |
+
|
| 832 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
| 833 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
| 834 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
| 835 |
+
|
| 836 |
+
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
| 837 |
+
|
| 838 |
+
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
| 839 |
+
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
|
| 840 |
+
int offset_day, long offset_sec);
|
| 841 |
+
int ASN1_TIME_check(const ASN1_TIME *t);
|
| 842 |
+
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
| 843 |
+
ASN1_GENERALIZEDTIME **out);
|
| 844 |
+
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
| 845 |
+
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
|
| 846 |
+
int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
|
| 847 |
+
int ASN1_TIME_normalize(ASN1_TIME *s);
|
| 848 |
+
int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
|
| 849 |
+
int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
|
| 850 |
+
|
| 851 |
+
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
|
| 852 |
+
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
|
| 853 |
+
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
|
| 854 |
+
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
|
| 855 |
+
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
|
| 856 |
+
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
|
| 857 |
+
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
|
| 858 |
+
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
|
| 859 |
+
|
| 860 |
+
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
|
| 861 |
+
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
|
| 862 |
+
const char *sn, const char *ln);
|
| 863 |
+
|
| 864 |
+
int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
|
| 865 |
+
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
|
| 866 |
+
int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
|
| 867 |
+
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
|
| 868 |
+
|
| 869 |
+
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
|
| 870 |
+
long ASN1_INTEGER_get(const ASN1_INTEGER *a);
|
| 871 |
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
|
| 872 |
+
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
|
| 873 |
+
|
| 874 |
+
int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
|
| 875 |
+
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
|
| 876 |
+
|
| 877 |
+
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
|
| 878 |
+
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
|
| 879 |
+
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
| 880 |
+
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
| 881 |
+
|
| 882 |
+
/* General */
|
| 883 |
+
/* given a string, return the correct type, max is the maximum length */
|
| 884 |
+
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
| 885 |
+
|
| 886 |
+
unsigned long ASN1_tag2bit(int tag);
|
| 887 |
+
|
| 888 |
+
/* SPECIALS */
|
| 889 |
+
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
| 890 |
+
int *pclass, long omax);
|
| 891 |
+
int ASN1_check_infinite_end(unsigned char **p, long len);
|
| 892 |
+
int ASN1_const_check_infinite_end(const unsigned char **p, long len);
|
| 893 |
+
void ASN1_put_object(unsigned char **pp, int constructed, int length,
|
| 894 |
+
int tag, int xclass);
|
| 895 |
+
int ASN1_put_eoc(unsigned char **pp);
|
| 896 |
+
int ASN1_object_size(int constructed, int length, int tag);
|
| 897 |
+
|
| 898 |
+
/* Used to implement other functions */
|
| 899 |
+
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
|
| 900 |
+
|
| 901 |
+
#define ASN1_dup_of(type, i2d, d2i, x) \
|
| 902 |
+
((type *)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
| 903 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 904 |
+
CHECKED_PTR_OF(const type, x)))
|
| 905 |
+
|
| 906 |
+
void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
|
| 907 |
+
int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 908 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 909 |
+
const void *data, const ASN1_OCTET_STRING *id,
|
| 910 |
+
EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
|
| 911 |
+
const char *propq);
|
| 912 |
+
int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 913 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 914 |
+
const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
|
| 915 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 916 |
+
|
| 917 |
+
/* ASN1 alloc/free macros for when a type is only used internally */
|
| 918 |
+
|
| 919 |
+
#define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
|
| 920 |
+
#define M_ASN1_free_of(x, type) \
|
| 921 |
+
ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
|
| 922 |
+
|
| 923 |
+
#ifndef OPENSSL_NO_STDIO
|
| 924 |
+
void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x);
|
| 925 |
+
|
| 926 |
+
#define ASN1_d2i_fp_of(type, xnew, d2i, in, x) \
|
| 927 |
+
((type *)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
| 928 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 929 |
+
in, \
|
| 930 |
+
CHECKED_PPTR_OF(type, x)))
|
| 931 |
+
|
| 932 |
+
void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
|
| 933 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 934 |
+
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
| 935 |
+
int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
|
| 936 |
+
|
| 937 |
+
#define ASN1_i2d_fp_of(type, i2d, out, x) \
|
| 938 |
+
(ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
| 939 |
+
out, \
|
| 940 |
+
CHECKED_PTR_OF(const type, x)))
|
| 941 |
+
|
| 942 |
+
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
|
| 943 |
+
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
|
| 944 |
+
#endif
|
| 945 |
+
|
| 946 |
+
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
| 947 |
+
|
| 948 |
+
void *ASN1_d2i_bio(void *(*xnew)(void), d2i_of_void *d2i, BIO *in, void **x);
|
| 949 |
+
|
| 950 |
+
#define ASN1_d2i_bio_of(type, xnew, d2i, in, x) \
|
| 951 |
+
((type *)ASN1_d2i_bio(CHECKED_NEW_OF(type, xnew), \
|
| 952 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 953 |
+
in, \
|
| 954 |
+
CHECKED_PPTR_OF(type, x)))
|
| 955 |
+
|
| 956 |
+
void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
|
| 957 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 958 |
+
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
|
| 959 |
+
int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
|
| 960 |
+
|
| 961 |
+
#define ASN1_i2d_bio_of(type, i2d, out, x) \
|
| 962 |
+
(ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
| 963 |
+
out, \
|
| 964 |
+
CHECKED_PTR_OF(const type, x)))
|
| 965 |
+
|
| 966 |
+
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
|
| 967 |
+
BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
| 968 |
+
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
|
| 969 |
+
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
|
| 970 |
+
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
|
| 971 |
+
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
|
| 972 |
+
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
|
| 973 |
+
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
|
| 974 |
+
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
|
| 975 |
+
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
|
| 976 |
+
unsigned char *buf, int off);
|
| 977 |
+
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
|
| 978 |
+
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
|
| 979 |
+
int dump);
|
| 980 |
+
const char *ASN1_tag2str(int tag);
|
| 981 |
+
|
| 982 |
+
/* Used to load and write Netscape format cert */
|
| 983 |
+
|
| 984 |
+
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
| 985 |
+
|
| 986 |
+
int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
|
| 987 |
+
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
|
| 988 |
+
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
| 989 |
+
unsigned char *data, int len);
|
| 990 |
+
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
|
| 991 |
+
unsigned char *data, int max_len);
|
| 992 |
+
|
| 993 |
+
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
|
| 994 |
+
void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
|
| 995 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 996 |
+
|
| 997 |
+
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
|
| 998 |
+
ASN1_OCTET_STRING **oct);
|
| 999 |
+
|
| 1000 |
+
void ASN1_STRING_set_default_mask(unsigned long mask);
|
| 1001 |
+
int ASN1_STRING_set_default_mask_asc(const char *p);
|
| 1002 |
+
unsigned long ASN1_STRING_get_default_mask(void);
|
| 1003 |
+
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1004 |
+
int inform, unsigned long mask);
|
| 1005 |
+
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1006 |
+
int inform, unsigned long mask,
|
| 1007 |
+
long minsize, long maxsize);
|
| 1008 |
+
|
| 1009 |
+
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
|
| 1010 |
+
const unsigned char *in, int inlen,
|
| 1011 |
+
int inform, int nid);
|
| 1012 |
+
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
| 1013 |
+
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
|
| 1014 |
+
void ASN1_STRING_TABLE_cleanup(void);
|
| 1015 |
+
|
| 1016 |
+
/* ASN1 template functions */
|
| 1017 |
+
|
| 1018 |
+
/* Old API compatible functions */
|
| 1019 |
+
ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
| 1020 |
+
ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
|
| 1021 |
+
const char *propq);
|
| 1022 |
+
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1023 |
+
ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
|
| 1024 |
+
long len, const ASN1_ITEM *it,
|
| 1025 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1026 |
+
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
|
| 1027 |
+
long len, const ASN1_ITEM *it);
|
| 1028 |
+
int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
|
| 1029 |
+
int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
|
| 1030 |
+
const ASN1_ITEM *it);
|
| 1031 |
+
|
| 1032 |
+
void ASN1_add_oid_module(void);
|
| 1033 |
+
void ASN1_add_stable_module(void);
|
| 1034 |
+
|
| 1035 |
+
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
| 1036 |
+
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
| 1037 |
+
int ASN1_str2mask(const char *str, unsigned long *pmask);
|
| 1038 |
+
|
| 1039 |
+
/* ASN1 Print flags */
|
| 1040 |
+
|
| 1041 |
+
/* Indicate missing OPTIONAL fields */
|
| 1042 |
+
#define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
|
| 1043 |
+
/* Mark start and end of SEQUENCE */
|
| 1044 |
+
#define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
|
| 1045 |
+
/* Mark start and end of SEQUENCE/SET OF */
|
| 1046 |
+
#define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
|
| 1047 |
+
/* Show the ASN1 type of primitives */
|
| 1048 |
+
#define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
|
| 1049 |
+
/* Don't show ASN1 type of ANY */
|
| 1050 |
+
#define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
|
| 1051 |
+
/* Don't show ASN1 type of MSTRINGs */
|
| 1052 |
+
#define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
|
| 1053 |
+
/* Don't show field names in SEQUENCE */
|
| 1054 |
+
#define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
|
| 1055 |
+
/* Show structure names of each SEQUENCE field */
|
| 1056 |
+
#define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
|
| 1057 |
+
/* Don't show structure name even at top level */
|
| 1058 |
+
#define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
|
| 1059 |
+
|
| 1060 |
+
int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
|
| 1061 |
+
const ASN1_ITEM *it, const ASN1_PCTX *pctx);
|
| 1062 |
+
ASN1_PCTX *ASN1_PCTX_new(void);
|
| 1063 |
+
void ASN1_PCTX_free(ASN1_PCTX *p);
|
| 1064 |
+
unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
|
| 1065 |
+
void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1066 |
+
unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
|
| 1067 |
+
void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1068 |
+
unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
|
| 1069 |
+
void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1070 |
+
unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
|
| 1071 |
+
void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1072 |
+
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
|
| 1073 |
+
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1074 |
+
|
| 1075 |
+
ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb)(ASN1_SCTX *ctx));
|
| 1076 |
+
void ASN1_SCTX_free(ASN1_SCTX *p);
|
| 1077 |
+
const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
|
| 1078 |
+
const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
|
| 1079 |
+
unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
|
| 1080 |
+
void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
|
| 1081 |
+
void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
|
| 1082 |
+
|
| 1083 |
+
const BIO_METHOD *BIO_f_asn1(void);
|
| 1084 |
+
|
| 1085 |
+
/* cannot constify val because of CMS_stream() */
|
| 1086 |
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1087 |
+
|
| 1088 |
+
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1089 |
+
const ASN1_ITEM *it);
|
| 1090 |
+
int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1091 |
+
const char *hdr, const ASN1_ITEM *it);
|
| 1092 |
+
/* cannot constify val because of CMS_dataFinal() */
|
| 1093 |
+
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1094 |
+
int ctype_nid, int econt_nid,
|
| 1095 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);
|
| 1096 |
+
int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1097 |
+
int ctype_nid, int econt_nid,
|
| 1098 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it,
|
| 1099 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1100 |
+
ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
|
| 1101 |
+
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
|
| 1102 |
+
const ASN1_ITEM *it, ASN1_VALUE **x,
|
| 1103 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1104 |
+
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
|
| 1105 |
+
int SMIME_text(BIO *in, BIO *out);
|
| 1106 |
+
|
| 1107 |
+
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
| 1108 |
+
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
| 1109 |
+
|
| 1110 |
+
/* Legacy compatibility */
|
| 1111 |
+
#define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
|
| 1112 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 1113 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
|
| 1114 |
+
#define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
|
| 1115 |
+
#define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
|
| 1116 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
|
| 1117 |
+
#define I2D_OF_const(type) I2D_OF(type)
|
| 1118 |
+
#define ASN1_dup_of_const(type, i2d, d2i, x) ASN1_dup_of(type, i2d, d2i, x)
|
| 1119 |
+
#define ASN1_i2d_fp_of_const(type, i2d, out, x) ASN1_i2d_fp_of(type, i2d, out, x)
|
| 1120 |
+
#define ASN1_i2d_bio_of_const(type, i2d, out, x) ASN1_i2d_bio_of(type, i2d, out, x)
|
| 1121 |
+
|
| 1122 |
+
#ifdef __cplusplus
|
| 1123 |
+
}
|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|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_ASN1ERR_H
|
| 12 |
+
#define OPENSSL_ASN1ERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* ASN1 reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define ASN1_R_ADDING_OBJECT 171
|
| 23 |
+
#define ASN1_R_ASN1_PARSE_ERROR 203
|
| 24 |
+
#define ASN1_R_ASN1_SIG_PARSE_ERROR 204
|
| 25 |
+
#define ASN1_R_AUX_ERROR 100
|
| 26 |
+
#define ASN1_R_BAD_OBJECT_HEADER 102
|
| 27 |
+
#define ASN1_R_BAD_TEMPLATE 230
|
| 28 |
+
#define ASN1_R_BMPSTRING_IS_WRONG_LENGTH 214
|
| 29 |
+
#define ASN1_R_BN_LIB 105
|
| 30 |
+
#define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 106
|
| 31 |
+
#define ASN1_R_BUFFER_TOO_SMALL 107
|
| 32 |
+
#define ASN1_R_CIPHER_HAS_NO_OBJECT_IDENTIFIER 108
|
| 33 |
+
#define ASN1_R_CONTEXT_NOT_INITIALISED 217
|
| 34 |
+
#define ASN1_R_DATA_IS_WRONG 109
|
| 35 |
+
#define ASN1_R_DECODE_ERROR 110
|
| 36 |
+
#define ASN1_R_DEPTH_EXCEEDED 174
|
| 37 |
+
#define ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED 198
|
| 38 |
+
#define ASN1_R_ENCODE_ERROR 112
|
| 39 |
+
#define ASN1_R_ERROR_GETTING_TIME 173
|
| 40 |
+
#define ASN1_R_ERROR_LOADING_SECTION 172
|
| 41 |
+
#define ASN1_R_ERROR_SETTING_CIPHER_PARAMS 114
|
| 42 |
+
#define ASN1_R_EXPECTING_AN_INTEGER 115
|
| 43 |
+
#define ASN1_R_EXPECTING_AN_OBJECT 116
|
| 44 |
+
#define ASN1_R_EXPLICIT_LENGTH_MISMATCH 119
|
| 45 |
+
#define ASN1_R_EXPLICIT_TAG_NOT_CONSTRUCTED 120
|
| 46 |
+
#define ASN1_R_FIELD_MISSING 121
|
| 47 |
+
#define ASN1_R_FIRST_NUM_TOO_LARGE 122
|
| 48 |
+
#define ASN1_R_GENERALIZEDTIME_IS_TOO_SHORT 232
|
| 49 |
+
#define ASN1_R_HEADER_TOO_LONG 123
|
| 50 |
+
#define ASN1_R_ILLEGAL_BITSTRING_FORMAT 175
|
| 51 |
+
#define ASN1_R_ILLEGAL_BOOLEAN 176
|
| 52 |
+
#define ASN1_R_ILLEGAL_CHARACTERS 124
|
| 53 |
+
#define ASN1_R_ILLEGAL_FORMAT 177
|
| 54 |
+
#define ASN1_R_ILLEGAL_HEX 178
|
| 55 |
+
#define ASN1_R_ILLEGAL_IMPLICIT_TAG 179
|
| 56 |
+
#define ASN1_R_ILLEGAL_INTEGER 180
|
| 57 |
+
#define ASN1_R_ILLEGAL_NEGATIVE_VALUE 226
|
| 58 |
+
#define ASN1_R_ILLEGAL_NESTED_TAGGING 181
|
| 59 |
+
#define ASN1_R_ILLEGAL_NULL 125
|
| 60 |
+
#define ASN1_R_ILLEGAL_NULL_VALUE 182
|
| 61 |
+
#define ASN1_R_ILLEGAL_OBJECT 183
|
| 62 |
+
#define ASN1_R_ILLEGAL_OPTIONAL_ANY 126
|
| 63 |
+
#define ASN1_R_ILLEGAL_OPTIONS_ON_ITEM_TEMPLATE 170
|
| 64 |
+
#define ASN1_R_ILLEGAL_PADDING 221
|
| 65 |
+
#define ASN1_R_ILLEGAL_TAGGED_ANY 127
|
| 66 |
+
#define ASN1_R_ILLEGAL_TIME_VALUE 184
|
| 67 |
+
#define ASN1_R_ILLEGAL_ZERO_CONTENT 222
|
| 68 |
+
#define ASN1_R_INTEGER_NOT_ASCII_FORMAT 185
|
| 69 |
+
#define ASN1_R_INTEGER_TOO_LARGE_FOR_LONG 128
|
| 70 |
+
#define ASN1_R_INVALID_BIT_STRING_BITS_LEFT 220
|
| 71 |
+
#define ASN1_R_INVALID_BMPSTRING_LENGTH 129
|
| 72 |
+
#define ASN1_R_INVALID_DIGIT 130
|
| 73 |
+
#define ASN1_R_INVALID_MIME_TYPE 205
|
| 74 |
+
#define ASN1_R_INVALID_MODIFIER 186
|
| 75 |
+
#define ASN1_R_INVALID_NUMBER 187
|
| 76 |
+
#define ASN1_R_INVALID_OBJECT_ENCODING 216
|
| 77 |
+
#define ASN1_R_INVALID_SCRYPT_PARAMETERS 227
|
| 78 |
+
#define ASN1_R_INVALID_SEPARATOR 131
|
| 79 |
+
#define ASN1_R_INVALID_STRING_TABLE_VALUE 218
|
| 80 |
+
#define ASN1_R_INVALID_UNIVERSALSTRING_LENGTH 133
|
| 81 |
+
#define ASN1_R_INVALID_UTF8STRING 134
|
| 82 |
+
#define ASN1_R_INVALID_VALUE 219
|
| 83 |
+
#define ASN1_R_LENGTH_TOO_LONG 231
|
| 84 |
+
#define ASN1_R_LIST_ERROR 188
|
| 85 |
+
#define ASN1_R_MIME_NO_CONTENT_TYPE 206
|
| 86 |
+
#define ASN1_R_MIME_PARSE_ERROR 207
|
| 87 |
+
#define ASN1_R_MIME_SIG_PARSE_ERROR 208
|
| 88 |
+
#define ASN1_R_MISSING_EOC 137
|
| 89 |
+
#define ASN1_R_MISSING_SECOND_NUMBER 138
|
| 90 |
+
#define ASN1_R_MISSING_VALUE 189
|
| 91 |
+
#define ASN1_R_MSTRING_NOT_UNIVERSAL 139
|
| 92 |
+
#define ASN1_R_MSTRING_WRONG_TAG 140
|
| 93 |
+
#define ASN1_R_NESTED_ASN1_STRING 197
|
| 94 |
+
#define ASN1_R_NESTED_TOO_DEEP 201
|
| 95 |
+
#define ASN1_R_NON_HEX_CHARACTERS 141
|
| 96 |
+
#define ASN1_R_NOT_ASCII_FORMAT 190
|
| 97 |
+
#define ASN1_R_NOT_ENOUGH_DATA 142
|
| 98 |
+
#define ASN1_R_NO_CONTENT_TYPE 209
|
| 99 |
+
#define ASN1_R_NO_MATCHING_CHOICE_TYPE 143
|
| 100 |
+
#define ASN1_R_NO_MULTIPART_BODY_FAILURE 210
|
| 101 |
+
#define ASN1_R_NO_MULTIPART_BOUNDARY 211
|
| 102 |
+
#define ASN1_R_NO_SIG_CONTENT_TYPE 212
|
| 103 |
+
#define ASN1_R_NULL_IS_WRONG_LENGTH 144
|
| 104 |
+
#define ASN1_R_OBJECT_NOT_ASCII_FORMAT 191
|
| 105 |
+
#define ASN1_R_ODD_NUMBER_OF_CHARS 145
|
| 106 |
+
#define ASN1_R_SECOND_NUMBER_TOO_LARGE 147
|
| 107 |
+
#define ASN1_R_SEQUENCE_LENGTH_MISMATCH 148
|
| 108 |
+
#define ASN1_R_SEQUENCE_NOT_CONSTRUCTED 149
|
| 109 |
+
#define ASN1_R_SEQUENCE_OR_SET_NEEDS_CONFIG 192
|
| 110 |
+
#define ASN1_R_SHORT_LINE 150
|
| 111 |
+
#define ASN1_R_SIG_INVALID_MIME_TYPE 213
|
| 112 |
+
#define ASN1_R_STREAMING_NOT_SUPPORTED 202
|
| 113 |
+
#define ASN1_R_STRING_TOO_LONG 151
|
| 114 |
+
#define ASN1_R_STRING_TOO_SHORT 152
|
| 115 |
+
#define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 154
|
| 116 |
+
#define ASN1_R_TIME_NOT_ASCII_FORMAT 193
|
| 117 |
+
#define ASN1_R_TOO_LARGE 223
|
| 118 |
+
#define ASN1_R_TOO_LONG 155
|
| 119 |
+
#define ASN1_R_TOO_SMALL 224
|
| 120 |
+
#define ASN1_R_TYPE_NOT_CONSTRUCTED 156
|
| 121 |
+
#define ASN1_R_TYPE_NOT_PRIMITIVE 195
|
| 122 |
+
#define ASN1_R_UNEXPECTED_EOC 159
|
| 123 |
+
#define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215
|
| 124 |
+
#define ASN1_R_UNKNOWN_DIGEST 229
|
| 125 |
+
#define ASN1_R_UNKNOWN_FORMAT 160
|
| 126 |
+
#define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161
|
| 127 |
+
#define ASN1_R_UNKNOWN_OBJECT_TYPE 162
|
| 128 |
+
#define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 163
|
| 129 |
+
#define ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM 199
|
| 130 |
+
#define ASN1_R_UNKNOWN_TAG 194
|
| 131 |
+
#define ASN1_R_UNSUPPORTED_ANY_DEFINED_BY_TYPE 164
|
| 132 |
+
#define ASN1_R_UNSUPPORTED_CIPHER 228
|
| 133 |
+
#define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 167
|
| 134 |
+
#define ASN1_R_UNSUPPORTED_TYPE 196
|
| 135 |
+
#define ASN1_R_UTCTIME_IS_TOO_SHORT 233
|
| 136 |
+
#define ASN1_R_WRONG_INTEGER_TYPE 225
|
| 137 |
+
#define ASN1_R_WRONG_PUBLIC_KEY_TYPE 200
|
| 138 |
+
#define ASN1_R_WRONG_TAG 168
|
| 139 |
+
|
| 140 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/asn1t.h
ADDED
|
@@ -0,0 +1,935 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\asn1t.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_ASN1T_H
|
| 18 |
+
#define OPENSSL_ASN1T_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_ASN1T_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <stddef.h>
|
| 27 |
+
#include <openssl/e_os2.h>
|
| 28 |
+
#include <openssl/asn1.h>
|
| 29 |
+
|
| 30 |
+
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 31 |
+
#undef OPENSSL_EXTERN
|
| 32 |
+
#define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
/* ASN1 template defines, structures and functions */
|
| 36 |
+
|
| 37 |
+
#ifdef __cplusplus
|
| 38 |
+
extern "C" {
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
/*-
|
| 42 |
+
* These are the possible values for the itype field of the
|
| 43 |
+
* ASN1_ITEM structure and determine how it is interpreted.
|
| 44 |
+
*
|
| 45 |
+
* For PRIMITIVE types the underlying type
|
| 46 |
+
* determines the behaviour if items is NULL.
|
| 47 |
+
*
|
| 48 |
+
* Otherwise templates must contain a single
|
| 49 |
+
* template and the type is treated in the
|
| 50 |
+
* same way as the type specified in the template.
|
| 51 |
+
*
|
| 52 |
+
* For SEQUENCE types the templates field points
|
| 53 |
+
* to the members, the size field is the
|
| 54 |
+
* structure size.
|
| 55 |
+
*
|
| 56 |
+
* For CHOICE types the templates field points
|
| 57 |
+
* to each possible member (typically a union)
|
| 58 |
+
* and the 'size' field is the offset of the
|
| 59 |
+
* selector.
|
| 60 |
+
*
|
| 61 |
+
* The 'funcs' field is used for application-specific
|
| 62 |
+
* data and functions.
|
| 63 |
+
*
|
| 64 |
+
* The EXTERN type uses a new style d2i/i2d.
|
| 65 |
+
* The new style should be used where possible
|
| 66 |
+
* because it avoids things like the d2i IMPLICIT
|
| 67 |
+
* hack.
|
| 68 |
+
*
|
| 69 |
+
* MSTRING is a multiple string type, it is used
|
| 70 |
+
* for a CHOICE of character strings where the
|
| 71 |
+
* actual strings all occupy an ASN1_STRING
|
| 72 |
+
* structure. In this case the 'utype' field
|
| 73 |
+
* has a special meaning, it is used as a mask
|
| 74 |
+
* of acceptable types using the B_ASN1 constants.
|
| 75 |
+
*
|
| 76 |
+
* NDEF_SEQUENCE is the same as SEQUENCE except
|
| 77 |
+
* that it will use indefinite length constructed
|
| 78 |
+
* encoding if requested.
|
| 79 |
+
*
|
| 80 |
+
*/
|
| 81 |
+
|
| 82 |
+
#define ASN1_ITYPE_PRIMITIVE 0x0
|
| 83 |
+
#define ASN1_ITYPE_SEQUENCE 0x1
|
| 84 |
+
#define ASN1_ITYPE_CHOICE 0x2
|
| 85 |
+
/* unused value 0x3 */
|
| 86 |
+
#define ASN1_ITYPE_EXTERN 0x4
|
| 87 |
+
#define ASN1_ITYPE_MSTRING 0x5
|
| 88 |
+
#define ASN1_ITYPE_NDEF_SEQUENCE 0x6
|
| 89 |
+
|
| 90 |
+
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
|
| 91 |
+
#define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
|
| 92 |
+
|
| 93 |
+
/* Macros for start and end of ASN1_ITEM definition */
|
| 94 |
+
|
| 95 |
+
#define ASN1_ITEM_start(itname) \
|
| 96 |
+
const ASN1_ITEM *itname##_it(void) \
|
| 97 |
+
{ \
|
| 98 |
+
static const ASN1_ITEM local_it = {
|
| 99 |
+
|
| 100 |
+
#define static_ASN1_ITEM_start(itname) \
|
| 101 |
+
static ASN1_ITEM_start(itname)
|
| 102 |
+
|
| 103 |
+
#define ASN1_ITEM_end(itname) \
|
| 104 |
+
} \
|
| 105 |
+
; \
|
| 106 |
+
return &local_it; \
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
/* Macros to aid ASN1 template writing */
|
| 110 |
+
|
| 111 |
+
#define ASN1_ITEM_TEMPLATE(tname) \
|
| 112 |
+
static const ASN1_TEMPLATE tname##_item_tt
|
| 113 |
+
|
| 114 |
+
#define ASN1_ITEM_TEMPLATE_END(tname) \
|
| 115 |
+
; \
|
| 116 |
+
ASN1_ITEM_start(tname) \
|
| 117 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 118 |
+
-1, \
|
| 119 |
+
&tname##_item_tt, \
|
| 120 |
+
0, \
|
| 121 |
+
NULL, \
|
| 122 |
+
0, \
|
| 123 |
+
#tname ASN1_ITEM_end(tname)
|
| 124 |
+
#define static_ASN1_ITEM_TEMPLATE_END(tname) \
|
| 125 |
+
; \
|
| 126 |
+
static_ASN1_ITEM_start(tname) \
|
| 127 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 128 |
+
-1, \
|
| 129 |
+
&tname##_item_tt, \
|
| 130 |
+
0, \
|
| 131 |
+
NULL, \
|
| 132 |
+
0, \
|
| 133 |
+
#tname ASN1_ITEM_end(tname)
|
| 134 |
+
|
| 135 |
+
/* This is a ASN1 type which just embeds a template */
|
| 136 |
+
|
| 137 |
+
/*-
|
| 138 |
+
* This pair helps declare a SEQUENCE. We can do:
|
| 139 |
+
*
|
| 140 |
+
* ASN1_SEQUENCE(stname) = {
|
| 141 |
+
* ... SEQUENCE components ...
|
| 142 |
+
* } ASN1_SEQUENCE_END(stname)
|
| 143 |
+
*
|
| 144 |
+
* This will produce an ASN1_ITEM called stname_it
|
| 145 |
+
* for a structure called stname.
|
| 146 |
+
*
|
| 147 |
+
* If you want the same structure but a different
|
| 148 |
+
* name then use:
|
| 149 |
+
*
|
| 150 |
+
* ASN1_SEQUENCE(itname) = {
|
| 151 |
+
* ... SEQUENCE components ...
|
| 152 |
+
* } ASN1_SEQUENCE_END_name(stname, itname)
|
| 153 |
+
*
|
| 154 |
+
* This will create an item called itname_it using
|
| 155 |
+
* a structure called stname.
|
| 156 |
+
*/
|
| 157 |
+
|
| 158 |
+
#define ASN1_SEQUENCE(tname) \
|
| 159 |
+
static const ASN1_TEMPLATE tname##_seq_tt[]
|
| 160 |
+
|
| 161 |
+
#define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
|
| 162 |
+
|
| 163 |
+
#define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)
|
| 164 |
+
|
| 165 |
+
#define ASN1_SEQUENCE_END_name(stname, tname) \
|
| 166 |
+
; \
|
| 167 |
+
ASN1_ITEM_start(tname) \
|
| 168 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 169 |
+
V_ASN1_SEQUENCE, \
|
| 170 |
+
tname##_seq_tt, \
|
| 171 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 172 |
+
NULL, \
|
| 173 |
+
sizeof(stname), \
|
| 174 |
+
#tname ASN1_ITEM_end(tname)
|
| 175 |
+
|
| 176 |
+
#define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
| 177 |
+
; \
|
| 178 |
+
static_ASN1_ITEM_start(tname) \
|
| 179 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 180 |
+
V_ASN1_SEQUENCE, \
|
| 181 |
+
tname##_seq_tt, \
|
| 182 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 183 |
+
NULL, \
|
| 184 |
+
sizeof(stname), \
|
| 185 |
+
#stname ASN1_ITEM_end(tname)
|
| 186 |
+
|
| 187 |
+
#define ASN1_NDEF_SEQUENCE(tname) \
|
| 188 |
+
ASN1_SEQUENCE(tname)
|
| 189 |
+
|
| 190 |
+
#define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
|
| 191 |
+
ASN1_SEQUENCE_cb(tname, cb)
|
| 192 |
+
|
| 193 |
+
#define ASN1_SEQUENCE_cb(tname, cb) \
|
| 194 |
+
static const ASN1_AUX tname##_aux = { NULL, 0, 0, 0, cb, 0, NULL }; \
|
| 195 |
+
ASN1_SEQUENCE(tname)
|
| 196 |
+
|
| 197 |
+
#define ASN1_SEQUENCE_const_cb(tname, const_cb) \
|
| 198 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_CONST_CB, 0, 0, NULL, 0, const_cb }; \
|
| 199 |
+
ASN1_SEQUENCE(tname)
|
| 200 |
+
|
| 201 |
+
#define ASN1_SEQUENCE_cb_const_cb(tname, cb, const_cb) \
|
| 202 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_CONST_CB, 0, 0, cb, 0, const_cb }; \
|
| 203 |
+
ASN1_SEQUENCE(tname)
|
| 204 |
+
|
| 205 |
+
#define ASN1_SEQUENCE_ref(tname, cb) \
|
| 206 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0, NULL }; \
|
| 207 |
+
ASN1_SEQUENCE(tname)
|
| 208 |
+
|
| 209 |
+
#define ASN1_SEQUENCE_enc(tname, enc, cb) \
|
| 210 |
+
static const ASN1_AUX tname##_aux = { NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc), NULL }; \
|
| 211 |
+
ASN1_SEQUENCE(tname)
|
| 212 |
+
|
| 213 |
+
#define ASN1_NDEF_SEQUENCE_END(tname) \
|
| 214 |
+
; \
|
| 215 |
+
ASN1_ITEM_start(tname) \
|
| 216 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 217 |
+
V_ASN1_SEQUENCE, \
|
| 218 |
+
tname##_seq_tt, \
|
| 219 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 220 |
+
NULL, \
|
| 221 |
+
sizeof(tname), \
|
| 222 |
+
#tname ASN1_ITEM_end(tname)
|
| 223 |
+
#define static_ASN1_NDEF_SEQUENCE_END(tname) \
|
| 224 |
+
; \
|
| 225 |
+
static_ASN1_ITEM_start(tname) \
|
| 226 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 227 |
+
V_ASN1_SEQUENCE, \
|
| 228 |
+
tname##_seq_tt, \
|
| 229 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 230 |
+
NULL, \
|
| 231 |
+
sizeof(tname), \
|
| 232 |
+
#tname ASN1_ITEM_end(tname)
|
| 233 |
+
|
| 234 |
+
#define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 235 |
+
|
| 236 |
+
#define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 237 |
+
#define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)
|
| 238 |
+
|
| 239 |
+
#define ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 240 |
+
; \
|
| 241 |
+
ASN1_ITEM_start(tname) \
|
| 242 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 243 |
+
V_ASN1_SEQUENCE, \
|
| 244 |
+
tname##_seq_tt, \
|
| 245 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 246 |
+
&tname##_aux, \
|
| 247 |
+
sizeof(stname), \
|
| 248 |
+
#tname ASN1_ITEM_end(tname)
|
| 249 |
+
#define static_ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 250 |
+
; \
|
| 251 |
+
static_ASN1_ITEM_start(tname) \
|
| 252 |
+
ASN1_ITYPE_SEQUENCE, \
|
| 253 |
+
V_ASN1_SEQUENCE, \
|
| 254 |
+
tname##_seq_tt, \
|
| 255 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 256 |
+
&tname##_aux, \
|
| 257 |
+
sizeof(stname), \
|
| 258 |
+
#stname ASN1_ITEM_end(tname)
|
| 259 |
+
|
| 260 |
+
#define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
|
| 261 |
+
; \
|
| 262 |
+
ASN1_ITEM_start(tname) \
|
| 263 |
+
ASN1_ITYPE_NDEF_SEQUENCE, \
|
| 264 |
+
V_ASN1_SEQUENCE, \
|
| 265 |
+
tname##_seq_tt, \
|
| 266 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE), \
|
| 267 |
+
&tname##_aux, \
|
| 268 |
+
sizeof(stname), \
|
| 269 |
+
#stname ASN1_ITEM_end(tname)
|
| 270 |
+
|
| 271 |
+
/*-
|
| 272 |
+
* This pair helps declare a CHOICE type. We can do:
|
| 273 |
+
*
|
| 274 |
+
* ASN1_CHOICE(chname) = {
|
| 275 |
+
* ... CHOICE options ...
|
| 276 |
+
* ASN1_CHOICE_END(chname)
|
| 277 |
+
*
|
| 278 |
+
* This will produce an ASN1_ITEM called chname_it
|
| 279 |
+
* for a structure called chname. The structure
|
| 280 |
+
* definition must look like this:
|
| 281 |
+
* typedef struct {
|
| 282 |
+
* int type;
|
| 283 |
+
* union {
|
| 284 |
+
* ASN1_SOMETHING *opt1;
|
| 285 |
+
* ASN1_SOMEOTHER *opt2;
|
| 286 |
+
* } value;
|
| 287 |
+
* } chname;
|
| 288 |
+
*
|
| 289 |
+
* the name of the selector must be 'type'.
|
| 290 |
+
* to use an alternative selector name use the
|
| 291 |
+
* ASN1_CHOICE_END_selector() version.
|
| 292 |
+
*/
|
| 293 |
+
|
| 294 |
+
#define ASN1_CHOICE(tname) \
|
| 295 |
+
static const ASN1_TEMPLATE tname##_ch_tt[]
|
| 296 |
+
|
| 297 |
+
#define ASN1_CHOICE_cb(tname, cb) \
|
| 298 |
+
static const ASN1_AUX tname##_aux = { NULL, 0, 0, 0, cb, 0, NULL }; \
|
| 299 |
+
ASN1_CHOICE(tname)
|
| 300 |
+
|
| 301 |
+
#define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
|
| 302 |
+
|
| 303 |
+
#define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)
|
| 304 |
+
|
| 305 |
+
#define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
|
| 306 |
+
|
| 307 |
+
#define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)
|
| 308 |
+
|
| 309 |
+
#define ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 310 |
+
; \
|
| 311 |
+
ASN1_ITEM_start(tname) \
|
| 312 |
+
ASN1_ITYPE_CHOICE, \
|
| 313 |
+
offsetof(stname, selname), \
|
| 314 |
+
tname##_ch_tt, \
|
| 315 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 316 |
+
NULL, \
|
| 317 |
+
sizeof(stname), \
|
| 318 |
+
#stname ASN1_ITEM_end(tname)
|
| 319 |
+
|
| 320 |
+
#define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 321 |
+
; \
|
| 322 |
+
static_ASN1_ITEM_start(tname) \
|
| 323 |
+
ASN1_ITYPE_CHOICE, \
|
| 324 |
+
offsetof(stname, selname), \
|
| 325 |
+
tname##_ch_tt, \
|
| 326 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 327 |
+
NULL, \
|
| 328 |
+
sizeof(stname), \
|
| 329 |
+
#stname ASN1_ITEM_end(tname)
|
| 330 |
+
|
| 331 |
+
#define ASN1_CHOICE_END_cb(stname, tname, selname) \
|
| 332 |
+
; \
|
| 333 |
+
ASN1_ITEM_start(tname) \
|
| 334 |
+
ASN1_ITYPE_CHOICE, \
|
| 335 |
+
offsetof(stname, selname), \
|
| 336 |
+
tname##_ch_tt, \
|
| 337 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE), \
|
| 338 |
+
&tname##_aux, \
|
| 339 |
+
sizeof(stname), \
|
| 340 |
+
#stname ASN1_ITEM_end(tname)
|
| 341 |
+
|
| 342 |
+
/* This helps with the template wrapper form of ASN1_ITEM */
|
| 343 |
+
|
| 344 |
+
#define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
|
| 345 |
+
(flags), (tag), 0, \
|
| 346 |
+
#name, ASN1_ITEM_ref(type) \
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
/* These help with SEQUENCE or CHOICE components */
|
| 350 |
+
|
| 351 |
+
/* used to declare other types */
|
| 352 |
+
|
| 353 |
+
#define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
|
| 354 |
+
(flags), (tag), offsetof(stname, field), \
|
| 355 |
+
#field, ASN1_ITEM_ref(type) \
|
| 356 |
+
}
|
| 357 |
+
|
| 358 |
+
/* implicit and explicit helper macros */
|
| 359 |
+
|
| 360 |
+
#define ASN1_IMP_EX(stname, field, type, tag, ex) \
|
| 361 |
+
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type)
|
| 362 |
+
|
| 363 |
+
#define ASN1_EXP_EX(stname, field, type, tag, ex) \
|
| 364 |
+
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type)
|
| 365 |
+
|
| 366 |
+
/* Any defined by macros: the field used is in the table itself */
|
| 367 |
+
|
| 368 |
+
#define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
|
| 369 |
+
#define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
|
| 370 |
+
|
| 371 |
+
/* Plain simple type */
|
| 372 |
+
#define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0, 0, stname, field, type)
|
| 373 |
+
/* Embedded simple type */
|
| 374 |
+
#define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 375 |
+
|
| 376 |
+
/* OPTIONAL simple type */
|
| 377 |
+
#define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 378 |
+
#define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 379 |
+
|
| 380 |
+
/* IMPLICIT tagged simple type */
|
| 381 |
+
#define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
|
| 382 |
+
#define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 383 |
+
|
| 384 |
+
/* IMPLICIT tagged OPTIONAL simple type */
|
| 385 |
+
#define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 386 |
+
#define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED)
|
| 387 |
+
|
| 388 |
+
/* Same as above but EXPLICIT */
|
| 389 |
+
|
| 390 |
+
#define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
|
| 391 |
+
#define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 392 |
+
#define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 393 |
+
#define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_EMBED)
|
| 394 |
+
|
| 395 |
+
/* SEQUENCE OF type */
|
| 396 |
+
#define ASN1_SEQUENCE_OF(stname, field, type) \
|
| 397 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
|
| 398 |
+
|
| 399 |
+
/* OPTIONAL SEQUENCE OF */
|
| 400 |
+
#define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
|
| 401 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 402 |
+
|
| 403 |
+
/* Same as above but for SET OF */
|
| 404 |
+
|
| 405 |
+
#define ASN1_SET_OF(stname, field, type) \
|
| 406 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
|
| 407 |
+
|
| 408 |
+
#define ASN1_SET_OF_OPT(stname, field, type) \
|
| 409 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 410 |
+
|
| 411 |
+
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
|
| 412 |
+
|
| 413 |
+
#define ASN1_IMP_SET_OF(stname, field, type, tag) \
|
| 414 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 415 |
+
|
| 416 |
+
#define ASN1_EXP_SET_OF(stname, field, type, tag) \
|
| 417 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 418 |
+
|
| 419 |
+
#define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
|
| 420 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
|
| 421 |
+
|
| 422 |
+
#define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
|
| 423 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF | ASN1_TFLG_OPTIONAL)
|
| 424 |
+
|
| 425 |
+
#define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
|
| 426 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 427 |
+
|
| 428 |
+
#define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 429 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
|
| 430 |
+
|
| 431 |
+
#define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
|
| 432 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 433 |
+
|
| 434 |
+
#define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 435 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF | ASN1_TFLG_OPTIONAL)
|
| 436 |
+
|
| 437 |
+
/* EXPLICIT using indefinite length constructed form */
|
| 438 |
+
#define ASN1_NDEF_EXP(stname, field, type, tag) \
|
| 439 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
|
| 440 |
+
|
| 441 |
+
/* EXPLICIT OPTIONAL using indefinite length constructed form */
|
| 442 |
+
#define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
|
| 443 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL | ASN1_TFLG_NDEF)
|
| 444 |
+
|
| 445 |
+
/* Macros for the ASN1_ADB structure */
|
| 446 |
+
|
| 447 |
+
#define ASN1_ADB(name) \
|
| 448 |
+
static const ASN1_ADB_TABLE name##_adbtbl[]
|
| 449 |
+
|
| 450 |
+
#define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \
|
| 451 |
+
; \
|
| 452 |
+
static const ASN1_ITEM *name##_adb(void) \
|
| 453 |
+
{ \
|
| 454 |
+
static const ASN1_ADB internal_adb = { \
|
| 455 |
+
flags, \
|
| 456 |
+
offsetof(name, field), \
|
| 457 |
+
adb_cb, \
|
| 458 |
+
name##_adbtbl, \
|
| 459 |
+
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE), \
|
| 460 |
+
def, \
|
| 461 |
+
none \
|
| 462 |
+
}; \
|
| 463 |
+
return (const ASN1_ITEM *)&internal_adb; \
|
| 464 |
+
} \
|
| 465 |
+
void dummy_function(void)
|
| 466 |
+
|
| 467 |
+
#define ADB_ENTRY(val, template) { val, template }
|
| 468 |
+
|
| 469 |
+
#define ASN1_ADB_TEMPLATE(name) \
|
| 470 |
+
static const ASN1_TEMPLATE name##_tt
|
| 471 |
+
|
| 472 |
+
/*
|
| 473 |
+
* This is the ASN1 template structure that defines a wrapper round the
|
| 474 |
+
* actual type. It determines the actual position of the field in the value
|
| 475 |
+
* structure, various flags such as OPTIONAL and the field name.
|
| 476 |
+
*/
|
| 477 |
+
|
| 478 |
+
struct ASN1_TEMPLATE_st {
|
| 479 |
+
unsigned long flags; /* Various flags */
|
| 480 |
+
long tag; /* tag, not used if no tagging */
|
| 481 |
+
unsigned long offset; /* Offset of this field in structure */
|
| 482 |
+
const char *field_name; /* Field name */
|
| 483 |
+
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
|
| 484 |
+
};
|
| 485 |
+
|
| 486 |
+
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
|
| 487 |
+
|
| 488 |
+
#define ASN1_TEMPLATE_item(t) (t->item_ptr)
|
| 489 |
+
#define ASN1_TEMPLATE_adb(t) (t->item_ptr)
|
| 490 |
+
|
| 491 |
+
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
|
| 492 |
+
typedef struct ASN1_ADB_st ASN1_ADB;
|
| 493 |
+
|
| 494 |
+
struct ASN1_ADB_st {
|
| 495 |
+
unsigned long flags; /* Various flags */
|
| 496 |
+
unsigned long offset; /* Offset of selector field */
|
| 497 |
+
int (*adb_cb)(long *psel); /* Application callback */
|
| 498 |
+
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
|
| 499 |
+
long tblcount; /* Number of entries in tbl */
|
| 500 |
+
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
|
| 501 |
+
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
|
| 502 |
+
};
|
| 503 |
+
|
| 504 |
+
struct ASN1_ADB_TABLE_st {
|
| 505 |
+
long value; /* NID for an object or value for an int */
|
| 506 |
+
const ASN1_TEMPLATE tt; /* item for this value */
|
| 507 |
+
};
|
| 508 |
+
|
| 509 |
+
/* template flags */
|
| 510 |
+
|
| 511 |
+
/* Field is optional */
|
| 512 |
+
#define ASN1_TFLG_OPTIONAL (0x1)
|
| 513 |
+
|
| 514 |
+
/* Field is a SET OF */
|
| 515 |
+
#define ASN1_TFLG_SET_OF (0x1 << 1)
|
| 516 |
+
|
| 517 |
+
/* Field is a SEQUENCE OF */
|
| 518 |
+
#define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
|
| 519 |
+
|
| 520 |
+
/*
|
| 521 |
+
* Special case: this refers to a SET OF that will be sorted into DER order
|
| 522 |
+
* when encoded *and* the corresponding STACK will be modified to match the
|
| 523 |
+
* new order.
|
| 524 |
+
*/
|
| 525 |
+
#define ASN1_TFLG_SET_ORDER (0x3 << 1)
|
| 526 |
+
|
| 527 |
+
/* Mask for SET OF or SEQUENCE OF */
|
| 528 |
+
#define ASN1_TFLG_SK_MASK (0x3 << 1)
|
| 529 |
+
|
| 530 |
+
/*
|
| 531 |
+
* These flags mean the tag should be taken from the tag field. If EXPLICIT
|
| 532 |
+
* then the underlying type is used for the inner tag.
|
| 533 |
+
*/
|
| 534 |
+
|
| 535 |
+
/* IMPLICIT tagging */
|
| 536 |
+
#define ASN1_TFLG_IMPTAG (0x1 << 3)
|
| 537 |
+
|
| 538 |
+
/* EXPLICIT tagging, inner tag from underlying type */
|
| 539 |
+
#define ASN1_TFLG_EXPTAG (0x2 << 3)
|
| 540 |
+
|
| 541 |
+
#define ASN1_TFLG_TAG_MASK (0x3 << 3)
|
| 542 |
+
|
| 543 |
+
/* context specific IMPLICIT */
|
| 544 |
+
#define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG | ASN1_TFLG_CONTEXT)
|
| 545 |
+
|
| 546 |
+
/* context specific EXPLICIT */
|
| 547 |
+
#define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG | ASN1_TFLG_CONTEXT)
|
| 548 |
+
|
| 549 |
+
/*
|
| 550 |
+
* If tagging is in force these determine the type of tag to use. Otherwise
|
| 551 |
+
* the tag is determined by the underlying type. These values reflect the
|
| 552 |
+
* actual octet format.
|
| 553 |
+
*/
|
| 554 |
+
|
| 555 |
+
/* Universal tag */
|
| 556 |
+
#define ASN1_TFLG_UNIVERSAL (0x0 << 6)
|
| 557 |
+
/* Application tag */
|
| 558 |
+
#define ASN1_TFLG_APPLICATION (0x1 << 6)
|
| 559 |
+
/* Context specific tag */
|
| 560 |
+
#define ASN1_TFLG_CONTEXT (0x2 << 6)
|
| 561 |
+
/* Private tag */
|
| 562 |
+
#define ASN1_TFLG_PRIVATE (0x3 << 6)
|
| 563 |
+
|
| 564 |
+
#define ASN1_TFLG_TAG_CLASS (0x3 << 6)
|
| 565 |
+
|
| 566 |
+
/*
|
| 567 |
+
* These are for ANY DEFINED BY type. In this case the 'item' field points to
|
| 568 |
+
* an ASN1_ADB structure which contains a table of values to decode the
|
| 569 |
+
* relevant type
|
| 570 |
+
*/
|
| 571 |
+
|
| 572 |
+
#define ASN1_TFLG_ADB_MASK (0x3 << 8)
|
| 573 |
+
|
| 574 |
+
#define ASN1_TFLG_ADB_OID (0x1 << 8)
|
| 575 |
+
|
| 576 |
+
#define ASN1_TFLG_ADB_INT (0x1 << 9)
|
| 577 |
+
|
| 578 |
+
/*
|
| 579 |
+
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
|
| 580 |
+
* indefinite length constructed encoding to be used if required.
|
| 581 |
+
*/
|
| 582 |
+
|
| 583 |
+
#define ASN1_TFLG_NDEF (0x1 << 11)
|
| 584 |
+
|
| 585 |
+
/* Field is embedded and not a pointer */
|
| 586 |
+
#define ASN1_TFLG_EMBED (0x1 << 12)
|
| 587 |
+
|
| 588 |
+
/* This is the actual ASN1 item itself */
|
| 589 |
+
|
| 590 |
+
struct ASN1_ITEM_st {
|
| 591 |
+
char itype; /* The item type, primitive, SEQUENCE, CHOICE
|
| 592 |
+
* or extern */
|
| 593 |
+
long utype; /* underlying type */
|
| 594 |
+
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
|
| 595 |
+
* the contents */
|
| 596 |
+
long tcount; /* Number of templates if SEQUENCE or CHOICE */
|
| 597 |
+
const void *funcs; /* further data and type-specific functions */
|
| 598 |
+
/* funcs can be ASN1_PRIMITIVE_FUNCS*, ASN1_EXTERN_FUNCS*, or ASN1_AUX* */
|
| 599 |
+
long size; /* Structure size (usually) */
|
| 600 |
+
const char *sname; /* Structure name */
|
| 601 |
+
};
|
| 602 |
+
|
| 603 |
+
/*
|
| 604 |
+
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
|
| 605 |
+
* like CHOICE
|
| 606 |
+
*/
|
| 607 |
+
|
| 608 |
+
struct ASN1_TLC_st {
|
| 609 |
+
char valid; /* Values below are valid */
|
| 610 |
+
int ret; /* return value */
|
| 611 |
+
long plen; /* length */
|
| 612 |
+
int ptag; /* class value */
|
| 613 |
+
int pclass; /* class value */
|
| 614 |
+
int hdrlen; /* header length */
|
| 615 |
+
};
|
| 616 |
+
|
| 617 |
+
/* Typedefs for ASN1 function pointers */
|
| 618 |
+
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 619 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 620 |
+
ASN1_TLC *ctx);
|
| 621 |
+
|
| 622 |
+
typedef int ASN1_ex_d2i_ex(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 623 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 624 |
+
ASN1_TLC *ctx, OSSL_LIB_CTX *libctx,
|
| 625 |
+
const char *propq);
|
| 626 |
+
typedef int ASN1_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 627 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 628 |
+
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 629 |
+
typedef int ASN1_ex_new_ex_func(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
| 630 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 631 |
+
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 632 |
+
|
| 633 |
+
typedef int ASN1_ex_print_func(BIO *out, const ASN1_VALUE **pval,
|
| 634 |
+
int indent, const char *fname,
|
| 635 |
+
const ASN1_PCTX *pctx);
|
| 636 |
+
|
| 637 |
+
typedef int ASN1_primitive_i2c(const ASN1_VALUE **pval, unsigned char *cont,
|
| 638 |
+
int *putype, const ASN1_ITEM *it);
|
| 639 |
+
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
|
| 640 |
+
int len, int utype, char *free_cont,
|
| 641 |
+
const ASN1_ITEM *it);
|
| 642 |
+
typedef int ASN1_primitive_print(BIO *out, const ASN1_VALUE **pval,
|
| 643 |
+
const ASN1_ITEM *it, int indent,
|
| 644 |
+
const ASN1_PCTX *pctx);
|
| 645 |
+
|
| 646 |
+
typedef struct ASN1_EXTERN_FUNCS_st {
|
| 647 |
+
void *app_data;
|
| 648 |
+
ASN1_ex_new_func *asn1_ex_new;
|
| 649 |
+
ASN1_ex_free_func *asn1_ex_free;
|
| 650 |
+
ASN1_ex_free_func *asn1_ex_clear;
|
| 651 |
+
ASN1_ex_d2i *asn1_ex_d2i;
|
| 652 |
+
ASN1_ex_i2d *asn1_ex_i2d;
|
| 653 |
+
ASN1_ex_print_func *asn1_ex_print;
|
| 654 |
+
ASN1_ex_new_ex_func *asn1_ex_new_ex;
|
| 655 |
+
ASN1_ex_d2i_ex *asn1_ex_d2i_ex;
|
| 656 |
+
} ASN1_EXTERN_FUNCS;
|
| 657 |
+
|
| 658 |
+
typedef struct ASN1_PRIMITIVE_FUNCS_st {
|
| 659 |
+
void *app_data;
|
| 660 |
+
unsigned long flags;
|
| 661 |
+
ASN1_ex_new_func *prim_new;
|
| 662 |
+
ASN1_ex_free_func *prim_free;
|
| 663 |
+
ASN1_ex_free_func *prim_clear;
|
| 664 |
+
ASN1_primitive_c2i *prim_c2i;
|
| 665 |
+
ASN1_primitive_i2c *prim_i2c;
|
| 666 |
+
ASN1_primitive_print *prim_print;
|
| 667 |
+
} ASN1_PRIMITIVE_FUNCS;
|
| 668 |
+
|
| 669 |
+
/*
|
| 670 |
+
* This is the ASN1_AUX structure: it handles various miscellaneous
|
| 671 |
+
* requirements. For example the use of reference counts and an informational
|
| 672 |
+
* callback. The "informational callback" is called at various points during
|
| 673 |
+
* the ASN1 encoding and decoding. It can be used to provide minor
|
| 674 |
+
* customisation of the structures used. This is most useful where the
|
| 675 |
+
* supplied routines *almost* do the right thing but need some extra help at
|
| 676 |
+
* a few points. If the callback returns zero then it is assumed a fatal
|
| 677 |
+
* error has occurred and the main operation should be abandoned. If major
|
| 678 |
+
* changes in the default behaviour are required then an external type is
|
| 679 |
+
* more appropriate.
|
| 680 |
+
* For the operations ASN1_OP_I2D_PRE, ASN1_OP_I2D_POST, ASN1_OP_PRINT_PRE, and
|
| 681 |
+
* ASN1_OP_PRINT_POST, meanwhile a variant of the callback with const parameter
|
| 682 |
+
* 'in' is provided to make clear statically that its input is not modified. If
|
| 683 |
+
* and only if this variant is in use the flag ASN1_AFLG_CONST_CB must be set.
|
| 684 |
+
*/
|
| 685 |
+
|
| 686 |
+
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
|
| 687 |
+
void *exarg);
|
| 688 |
+
typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
| 689 |
+
const ASN1_ITEM *it, void *exarg);
|
| 690 |
+
|
| 691 |
+
typedef struct ASN1_AUX_st {
|
| 692 |
+
void *app_data;
|
| 693 |
+
int flags;
|
| 694 |
+
int ref_offset; /* Offset of reference value */
|
| 695 |
+
int ref_lock; /* Offset of lock value */
|
| 696 |
+
ASN1_aux_cb *asn1_cb;
|
| 697 |
+
int enc_offset; /* Offset of ASN1_ENCODING structure */
|
| 698 |
+
ASN1_aux_const_cb *asn1_const_cb; /* for ASN1_OP_I2D_ and ASN1_OP_PRINT_ */
|
| 699 |
+
} ASN1_AUX;
|
| 700 |
+
|
| 701 |
+
/* For print related callbacks exarg points to this structure */
|
| 702 |
+
typedef struct ASN1_PRINT_ARG_st {
|
| 703 |
+
BIO *out;
|
| 704 |
+
int indent;
|
| 705 |
+
const ASN1_PCTX *pctx;
|
| 706 |
+
} ASN1_PRINT_ARG;
|
| 707 |
+
|
| 708 |
+
/* For streaming related callbacks exarg points to this structure */
|
| 709 |
+
typedef struct ASN1_STREAM_ARG_st {
|
| 710 |
+
/* BIO to stream through */
|
| 711 |
+
BIO *out;
|
| 712 |
+
/* BIO with filters appended */
|
| 713 |
+
BIO *ndef_bio;
|
| 714 |
+
/* Streaming I/O boundary */
|
| 715 |
+
unsigned char **boundary;
|
| 716 |
+
} ASN1_STREAM_ARG;
|
| 717 |
+
|
| 718 |
+
/* Flags in ASN1_AUX */
|
| 719 |
+
|
| 720 |
+
/* Use a reference count */
|
| 721 |
+
#define ASN1_AFLG_REFCOUNT 1
|
| 722 |
+
/* Save the encoding of structure (useful for signatures) */
|
| 723 |
+
#define ASN1_AFLG_ENCODING 2
|
| 724 |
+
/* The Sequence length is invalid */
|
| 725 |
+
#define ASN1_AFLG_BROKEN 4
|
| 726 |
+
/* Use the new asn1_const_cb */
|
| 727 |
+
#define ASN1_AFLG_CONST_CB 8
|
| 728 |
+
|
| 729 |
+
/* operation values for asn1_cb */
|
| 730 |
+
|
| 731 |
+
#define ASN1_OP_NEW_PRE 0
|
| 732 |
+
#define ASN1_OP_NEW_POST 1
|
| 733 |
+
#define ASN1_OP_FREE_PRE 2
|
| 734 |
+
#define ASN1_OP_FREE_POST 3
|
| 735 |
+
#define ASN1_OP_D2I_PRE 4
|
| 736 |
+
#define ASN1_OP_D2I_POST 5
|
| 737 |
+
#define ASN1_OP_I2D_PRE 6
|
| 738 |
+
#define ASN1_OP_I2D_POST 7
|
| 739 |
+
#define ASN1_OP_PRINT_PRE 8
|
| 740 |
+
#define ASN1_OP_PRINT_POST 9
|
| 741 |
+
#define ASN1_OP_STREAM_PRE 10
|
| 742 |
+
#define ASN1_OP_STREAM_POST 11
|
| 743 |
+
#define ASN1_OP_DETACHED_PRE 12
|
| 744 |
+
#define ASN1_OP_DETACHED_POST 13
|
| 745 |
+
#define ASN1_OP_DUP_PRE 14
|
| 746 |
+
#define ASN1_OP_DUP_POST 15
|
| 747 |
+
#define ASN1_OP_GET0_LIBCTX 16
|
| 748 |
+
#define ASN1_OP_GET0_PROPQ 17
|
| 749 |
+
|
| 750 |
+
/* Macro to implement a primitive type */
|
| 751 |
+
#define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
|
| 752 |
+
#define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
|
| 753 |
+
ASN1_ITEM_start(itname) \
|
| 754 |
+
ASN1_ITYPE_PRIMITIVE, \
|
| 755 |
+
V_##vname, NULL, 0, NULL, ex, #itname ASN1_ITEM_end(itname)
|
| 756 |
+
|
| 757 |
+
/* Macro to implement a multi string type */
|
| 758 |
+
#define IMPLEMENT_ASN1_MSTRING(itname, mask) \
|
| 759 |
+
ASN1_ITEM_start(itname) \
|
| 760 |
+
ASN1_ITYPE_MSTRING, \
|
| 761 |
+
mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname ASN1_ITEM_end(itname)
|
| 762 |
+
|
| 763 |
+
#define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
|
| 764 |
+
ASN1_ITEM_start(sname) \
|
| 765 |
+
ASN1_ITYPE_EXTERN, \
|
| 766 |
+
tag, \
|
| 767 |
+
NULL, \
|
| 768 |
+
0, \
|
| 769 |
+
&fptrs, \
|
| 770 |
+
0, \
|
| 771 |
+
#sname ASN1_ITEM_end(sname)
|
| 772 |
+
|
| 773 |
+
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
|
| 774 |
+
|
| 775 |
+
#define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
|
| 776 |
+
|
| 777 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
|
| 778 |
+
|
| 779 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
|
| 780 |
+
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
|
| 781 |
+
|
| 782 |
+
#define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 783 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
|
| 784 |
+
|
| 785 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 786 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
|
| 787 |
+
|
| 788 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
|
| 789 |
+
pre stname *fname##_new(void) \
|
| 790 |
+
{ \
|
| 791 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 792 |
+
} \
|
| 793 |
+
pre void fname##_free(stname *a) \
|
| 794 |
+
{ \
|
| 795 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 796 |
+
}
|
| 797 |
+
|
| 798 |
+
#define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
|
| 799 |
+
stname *fname##_new(void) \
|
| 800 |
+
{ \
|
| 801 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 802 |
+
} \
|
| 803 |
+
void fname##_free(stname *a) \
|
| 804 |
+
{ \
|
| 805 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 806 |
+
}
|
| 807 |
+
|
| 808 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
|
| 809 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 810 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
|
| 811 |
+
|
| 812 |
+
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 813 |
+
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
|
| 814 |
+
{ \
|
| 815 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname)); \
|
| 816 |
+
} \
|
| 817 |
+
int i2d_##fname(const stname *a, unsigned char **out) \
|
| 818 |
+
{ \
|
| 819 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname)); \
|
| 820 |
+
}
|
| 821 |
+
|
| 822 |
+
#define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
|
| 823 |
+
int i2d_##stname##_NDEF(const stname *a, unsigned char **out) \
|
| 824 |
+
{ \
|
| 825 |
+
return ASN1_item_ndef_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname)); \
|
| 826 |
+
}
|
| 827 |
+
|
| 828 |
+
#define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \
|
| 829 |
+
static stname *d2i_##stname(stname **a, \
|
| 830 |
+
const unsigned char **in, long len) \
|
| 831 |
+
{ \
|
| 832 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
|
| 833 |
+
ASN1_ITEM_rptr(stname)); \
|
| 834 |
+
} \
|
| 835 |
+
static int i2d_##stname(const stname *a, unsigned char **out) \
|
| 836 |
+
{ \
|
| 837 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, \
|
| 838 |
+
ASN1_ITEM_rptr(stname)); \
|
| 839 |
+
}
|
| 840 |
+
|
| 841 |
+
#define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
|
| 842 |
+
stname *stname##_dup(const stname *x) \
|
| 843 |
+
{ \
|
| 844 |
+
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
|
| 845 |
+
}
|
| 846 |
+
|
| 847 |
+
#define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
|
| 848 |
+
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
|
| 849 |
+
|
| 850 |
+
#define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
|
| 851 |
+
int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 852 |
+
const ASN1_PCTX *pctx) \
|
| 853 |
+
{ \
|
| 854 |
+
return ASN1_item_print(out, (const ASN1_VALUE *)x, indent, \
|
| 855 |
+
ASN1_ITEM_rptr(itname), pctx); \
|
| 856 |
+
}
|
| 857 |
+
|
| 858 |
+
/* external definitions for primitive types */
|
| 859 |
+
|
| 860 |
+
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
|
| 861 |
+
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
|
| 862 |
+
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
|
| 863 |
+
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
|
| 864 |
+
DECLARE_ASN1_ITEM(CBIGNUM)
|
| 865 |
+
DECLARE_ASN1_ITEM(BIGNUM)
|
| 866 |
+
DECLARE_ASN1_ITEM(INT32)
|
| 867 |
+
DECLARE_ASN1_ITEM(ZINT32)
|
| 868 |
+
DECLARE_ASN1_ITEM(UINT32)
|
| 869 |
+
DECLARE_ASN1_ITEM(ZUINT32)
|
| 870 |
+
DECLARE_ASN1_ITEM(INT64)
|
| 871 |
+
DECLARE_ASN1_ITEM(ZINT64)
|
| 872 |
+
DECLARE_ASN1_ITEM(UINT64)
|
| 873 |
+
DECLARE_ASN1_ITEM(ZUINT64)
|
| 874 |
+
|
| 875 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 876 |
+
/*
|
| 877 |
+
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
| 878 |
+
* underlying C type (long) differs in size depending on the architecture.
|
| 879 |
+
* They are designed with 32-bit longs in mind.
|
| 880 |
+
*/
|
| 881 |
+
DECLARE_ASN1_ITEM(LONG)
|
| 882 |
+
DECLARE_ASN1_ITEM(ZLONG)
|
| 883 |
+
#endif
|
| 884 |
+
|
| 885 |
+
/* clang-format off */
|
| 886 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_VALUE, ASN1_VALUE, ASN1_VALUE)
|
| 887 |
+
#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 888 |
+
#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
|
| 889 |
+
#define sk_ASN1_VALUE_new(cmp) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new(ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 890 |
+
#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
|
| 891 |
+
#define sk_ASN1_VALUE_new_reserve(cmp, n) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_VALUE_compfunc_type(cmp), (n)))
|
| 892 |
+
#define sk_ASN1_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_VALUE_sk_type(sk), (n))
|
| 893 |
+
#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 894 |
+
#define sk_ASN1_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 895 |
+
#define sk_ASN1_VALUE_delete(sk, i) ((ASN1_VALUE *)OPENSSL_sk_delete(ossl_check_ASN1_VALUE_sk_type(sk), (i)))
|
| 896 |
+
#define sk_ASN1_VALUE_delete_ptr(sk, ptr) ((ASN1_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr)))
|
| 897 |
+
#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 898 |
+
#define sk_ASN1_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 899 |
+
#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 900 |
+
#define sk_ASN1_VALUE_shift(sk) ((ASN1_VALUE *)OPENSSL_sk_shift(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 901 |
+
#define sk_ASN1_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_freefunc_type(freefunc))
|
| 902 |
+
#define sk_ASN1_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), (idx))
|
| 903 |
+
#define sk_ASN1_VALUE_set(sk, idx, ptr) ((ASN1_VALUE *)OPENSSL_sk_set(ossl_check_ASN1_VALUE_sk_type(sk), (idx), ossl_check_ASN1_VALUE_type(ptr)))
|
| 904 |
+
#define sk_ASN1_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 905 |
+
#define sk_ASN1_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 906 |
+
#define sk_ASN1_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), pnum)
|
| 907 |
+
#define sk_ASN1_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 908 |
+
#define sk_ASN1_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 909 |
+
#define sk_ASN1_VALUE_dup(sk) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_VALUE_sk_type(sk)))
|
| 910 |
+
#define sk_ASN1_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_copyfunc_type(copyfunc), ossl_check_ASN1_VALUE_freefunc_type(freefunc)))
|
| 911 |
+
#define sk_ASN1_VALUE_set_cmp_func(sk, cmp) ((sk_ASN1_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 912 |
+
|
| 913 |
+
/* clang-format on */
|
| 914 |
+
|
| 915 |
+
/* Functions used internally by the ASN1 code */
|
| 916 |
+
|
| 917 |
+
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 918 |
+
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 919 |
+
|
| 920 |
+
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 921 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 922 |
+
ASN1_TLC *ctx);
|
| 923 |
+
|
| 924 |
+
int ASN1_item_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 925 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 926 |
+
|
| 927 |
+
/* Legacy compatibility */
|
| 928 |
+
#define IMPLEMENT_ASN1_FUNCTIONS_const(name) IMPLEMENT_ASN1_FUNCTIONS(name)
|
| 929 |
+
#define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
|
| 930 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
|
| 931 |
+
|
| 932 |
+
#ifdef __cplusplus
|
| 933 |
+
}
|
| 934 |
+
#endif
|
| 935 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/async.h
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#include <stdlib.h>
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_ASYNC_H
|
| 13 |
+
#define OPENSSL_ASYNC_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/macros.h>
|
| 17 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
#define HEADER_ASYNC_H
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
#if defined(_WIN32)
|
| 22 |
+
#if defined(BASETYPES) || defined(_WINDEF_H)
|
| 23 |
+
/* application has to include <windows.h> to use this */
|
| 24 |
+
#define OSSL_ASYNC_FD HANDLE
|
| 25 |
+
#define OSSL_BAD_ASYNC_FD INVALID_HANDLE_VALUE
|
| 26 |
+
#endif
|
| 27 |
+
#else
|
| 28 |
+
#define OSSL_ASYNC_FD int
|
| 29 |
+
#define OSSL_BAD_ASYNC_FD -1
|
| 30 |
+
#endif
|
| 31 |
+
#include <openssl/asyncerr.h>
|
| 32 |
+
|
| 33 |
+
#ifdef __cplusplus
|
| 34 |
+
extern "C" {
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
typedef struct async_job_st ASYNC_JOB;
|
| 38 |
+
typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
|
| 39 |
+
typedef int (*ASYNC_callback_fn)(void *arg);
|
| 40 |
+
|
| 41 |
+
#define ASYNC_ERR 0
|
| 42 |
+
#define ASYNC_NO_JOBS 1
|
| 43 |
+
#define ASYNC_PAUSE 2
|
| 44 |
+
#define ASYNC_FINISH 3
|
| 45 |
+
|
| 46 |
+
#define ASYNC_STATUS_UNSUPPORTED 0
|
| 47 |
+
#define ASYNC_STATUS_ERR 1
|
| 48 |
+
#define ASYNC_STATUS_OK 2
|
| 49 |
+
#define ASYNC_STATUS_EAGAIN 3
|
| 50 |
+
|
| 51 |
+
int ASYNC_init_thread(size_t max_size, size_t init_size);
|
| 52 |
+
void ASYNC_cleanup_thread(void);
|
| 53 |
+
|
| 54 |
+
#ifdef OSSL_ASYNC_FD
|
| 55 |
+
ASYNC_WAIT_CTX *ASYNC_WAIT_CTX_new(void);
|
| 56 |
+
void ASYNC_WAIT_CTX_free(ASYNC_WAIT_CTX *ctx);
|
| 57 |
+
int ASYNC_WAIT_CTX_set_wait_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 58 |
+
OSSL_ASYNC_FD fd,
|
| 59 |
+
void *custom_data,
|
| 60 |
+
void (*cleanup)(ASYNC_WAIT_CTX *, const void *,
|
| 61 |
+
OSSL_ASYNC_FD, void *));
|
| 62 |
+
int ASYNC_WAIT_CTX_get_fd(ASYNC_WAIT_CTX *ctx, const void *key,
|
| 63 |
+
OSSL_ASYNC_FD *fd, void **custom_data);
|
| 64 |
+
int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
|
| 65 |
+
size_t *numfds);
|
| 66 |
+
int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
|
| 67 |
+
ASYNC_callback_fn *callback,
|
| 68 |
+
void **callback_arg);
|
| 69 |
+
int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
|
| 70 |
+
ASYNC_callback_fn callback,
|
| 71 |
+
void *callback_arg);
|
| 72 |
+
int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
|
| 73 |
+
int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
|
| 74 |
+
int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd,
|
| 75 |
+
size_t *numaddfds, OSSL_ASYNC_FD *delfd,
|
| 76 |
+
size_t *numdelfds);
|
| 77 |
+
int ASYNC_WAIT_CTX_clear_fd(ASYNC_WAIT_CTX *ctx, const void *key);
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
int ASYNC_is_capable(void);
|
| 81 |
+
|
| 82 |
+
typedef void *(*ASYNC_stack_alloc_fn)(size_t *num);
|
| 83 |
+
typedef void (*ASYNC_stack_free_fn)(void *addr);
|
| 84 |
+
|
| 85 |
+
int ASYNC_set_mem_functions(ASYNC_stack_alloc_fn alloc_fn,
|
| 86 |
+
ASYNC_stack_free_fn free_fn);
|
| 87 |
+
void ASYNC_get_mem_functions(ASYNC_stack_alloc_fn *alloc_fn,
|
| 88 |
+
ASYNC_stack_free_fn *free_fn);
|
| 89 |
+
|
| 90 |
+
int ASYNC_start_job(ASYNC_JOB **job, ASYNC_WAIT_CTX *ctx, int *ret,
|
| 91 |
+
int (*func)(void *), void *args, size_t size);
|
| 92 |
+
int ASYNC_pause_job(void);
|
| 93 |
+
|
| 94 |
+
ASYNC_JOB *ASYNC_get_current_job(void);
|
| 95 |
+
ASYNC_WAIT_CTX *ASYNC_get_wait_ctx(ASYNC_JOB *job);
|
| 96 |
+
void ASYNC_block_pause(void);
|
| 97 |
+
void ASYNC_unblock_pause(void);
|
| 98 |
+
|
| 99 |
+
#ifdef __cplusplus
|
| 100 |
+
}
|
| 101 |
+
#endif
|
| 102 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/asyncerr.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_ASYNCERR_H
|
| 12 |
+
#define OPENSSL_ASYNCERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* ASYNC reason codes.
|
| 21 |
+
*/
|
| 22 |
+
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
/* clang-format off */
|
| 13 |
+
|
| 14 |
+
/* clang-format on */
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_BIO_H
|
| 17 |
+
#define OPENSSL_BIO_H
|
| 18 |
+
#pragma once
|
| 19 |
+
|
| 20 |
+
#include <openssl/macros.h>
|
| 21 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 22 |
+
#define HEADER_BIO_H
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/e_os2.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_STDIO
|
| 28 |
+
#include <stdio.h>
|
| 29 |
+
#endif
|
| 30 |
+
#include <stdarg.h>
|
| 31 |
+
|
| 32 |
+
#include <openssl/crypto.h>
|
| 33 |
+
#include <openssl/bioerr.h>
|
| 34 |
+
#include <openssl/core.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
/* There are the classes of BIOs */
|
| 41 |
+
#define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 42 |
+
#define BIO_TYPE_FILTER 0x0200
|
| 43 |
+
#define BIO_TYPE_SOURCE_SINK 0x0400
|
| 44 |
+
|
| 45 |
+
/* These are the 'types' of BIOs */
|
| 46 |
+
#define BIO_TYPE_NONE 0
|
| 47 |
+
#define BIO_TYPE_MEM (1 | BIO_TYPE_SOURCE_SINK)
|
| 48 |
+
#define BIO_TYPE_FILE (2 | BIO_TYPE_SOURCE_SINK)
|
| 49 |
+
|
| 50 |
+
#define BIO_TYPE_FD (4 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 51 |
+
#define BIO_TYPE_SOCKET (5 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 52 |
+
#define BIO_TYPE_NULL (6 | BIO_TYPE_SOURCE_SINK)
|
| 53 |
+
#define BIO_TYPE_SSL (7 | BIO_TYPE_FILTER)
|
| 54 |
+
#define BIO_TYPE_MD (8 | BIO_TYPE_FILTER)
|
| 55 |
+
#define BIO_TYPE_BUFFER (9 | BIO_TYPE_FILTER)
|
| 56 |
+
#define BIO_TYPE_CIPHER (10 | BIO_TYPE_FILTER)
|
| 57 |
+
#define BIO_TYPE_BASE64 (11 | BIO_TYPE_FILTER)
|
| 58 |
+
#define BIO_TYPE_CONNECT (12 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 59 |
+
#define BIO_TYPE_ACCEPT (13 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 60 |
+
|
| 61 |
+
#define BIO_TYPE_NBIO_TEST (16 | BIO_TYPE_FILTER) /* server proxy BIO */
|
| 62 |
+
#define BIO_TYPE_NULL_FILTER (17 | BIO_TYPE_FILTER)
|
| 63 |
+
#define BIO_TYPE_BIO (19 | BIO_TYPE_SOURCE_SINK) /* half a BIO pair */
|
| 64 |
+
#define BIO_TYPE_LINEBUFFER (20 | BIO_TYPE_FILTER)
|
| 65 |
+
#define BIO_TYPE_DGRAM (21 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 66 |
+
#define BIO_TYPE_ASN1 (22 | BIO_TYPE_FILTER)
|
| 67 |
+
#define BIO_TYPE_COMP (23 | BIO_TYPE_FILTER)
|
| 68 |
+
#ifndef OPENSSL_NO_SCTP
|
| 69 |
+
#define BIO_TYPE_DGRAM_SCTP (24 | BIO_TYPE_SOURCE_SINK | BIO_TYPE_DESCRIPTOR)
|
| 70 |
+
#endif
|
| 71 |
+
#define BIO_TYPE_CORE_TO_PROV (25 | BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
#define BIO_TYPE_DGRAM_PAIR (26 | BIO_TYPE_SOURCE_SINK)
|
| 73 |
+
#define BIO_TYPE_DGRAM_MEM (27 | BIO_TYPE_SOURCE_SINK)
|
| 74 |
+
|
| 75 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_START 128
|
| 77 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 78 |
+
#define BIO_TYPE_MASK 0xFF
|
| 79 |
+
|
| 80 |
+
/*
|
| 81 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 82 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 83 |
+
*/
|
| 84 |
+
#define BIO_NOCLOSE 0x00
|
| 85 |
+
#define BIO_CLOSE 0x01
|
| 86 |
+
|
| 87 |
+
/*
|
| 88 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 89 |
+
*/
|
| 90 |
+
#define BIO_CTRL_RESET 1 /* opt - rewind/zero etc */
|
| 91 |
+
#define BIO_CTRL_EOF 2 /* opt - are we at the eof */
|
| 92 |
+
#define BIO_CTRL_INFO 3 /* opt - extra tit-bits */
|
| 93 |
+
#define BIO_CTRL_SET 4 /* man - set the 'IO' type */
|
| 94 |
+
#define BIO_CTRL_GET 5 /* man - get the 'IO' type */
|
| 95 |
+
#define BIO_CTRL_PUSH 6 /* opt - internal, used to signify change */
|
| 96 |
+
#define BIO_CTRL_POP 7 /* opt - internal, used to signify change */
|
| 97 |
+
#define BIO_CTRL_GET_CLOSE 8 /* man - set the 'close' on free */
|
| 98 |
+
#define BIO_CTRL_SET_CLOSE 9 /* man - set the 'close' on free */
|
| 99 |
+
#define BIO_CTRL_PENDING 10 /* opt - is their more data buffered */
|
| 100 |
+
#define BIO_CTRL_FLUSH 11 /* opt - 'flush' buffered output */
|
| 101 |
+
#define BIO_CTRL_DUP 12 /* man - extra stuff for 'duped' BIO */
|
| 102 |
+
#define BIO_CTRL_WPENDING 13 /* opt - number of bytes still to write */
|
| 103 |
+
#define BIO_CTRL_SET_CALLBACK 14 /* opt - set callback function */
|
| 104 |
+
#define BIO_CTRL_GET_CALLBACK 15 /* opt - set callback function */
|
| 105 |
+
|
| 106 |
+
#define BIO_CTRL_PEEK 29 /* BIO_f_buffer special */
|
| 107 |
+
#define BIO_CTRL_SET_FILENAME 30 /* BIO_s_file special */
|
| 108 |
+
|
| 109 |
+
/* dgram BIO stuff */
|
| 110 |
+
#define BIO_CTRL_DGRAM_CONNECT 31 /* BIO dgram special */
|
| 111 |
+
#define BIO_CTRL_DGRAM_SET_CONNECTED 32 /* allow for an externally connected \
|
| 112 |
+
* socket to be passed in */
|
| 113 |
+
#define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33 /* setsockopt, essentially */
|
| 114 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34 /* getsockopt, essentially */
|
| 115 |
+
#define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35 /* setsockopt, essentially */
|
| 116 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36 /* getsockopt, essentially */
|
| 117 |
+
|
| 118 |
+
#define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37 /* flag whether the last */
|
| 119 |
+
#define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38 /* I/O operation timed out */
|
| 120 |
+
|
| 121 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 122 |
+
#define BIO_CTRL_DGRAM_MTU_DISCOVER 39 /* set DF bit on egress packets */
|
| 123 |
+
/* #endif */
|
| 124 |
+
|
| 125 |
+
#define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */
|
| 126 |
+
#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 127 |
+
#define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */
|
| 128 |
+
#define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for MTU. \
|
| 129 |
+
* want to use this if asking \
|
| 130 |
+
* the kernel fails */
|
| 131 |
+
|
| 132 |
+
#define BIO_CTRL_DGRAM_MTU_EXCEEDED 43 /* check whether the MTU was \
|
| 133 |
+
* exceed in the previous write \
|
| 134 |
+
* operation */
|
| 135 |
+
|
| 136 |
+
#define BIO_CTRL_DGRAM_GET_PEER 46
|
| 137 |
+
#define BIO_CTRL_DGRAM_SET_PEER 44 /* Destination for the data */
|
| 138 |
+
|
| 139 |
+
#define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45 /* Next DTLS handshake timeout \
|
| 140 |
+
* to adjust socket timeouts */
|
| 141 |
+
#define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 142 |
+
|
| 143 |
+
#define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 144 |
+
|
| 145 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 146 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 147 |
+
#ifndef OPENSSL_NO_SCTP
|
| 148 |
+
/* SCTP stuff */
|
| 149 |
+
#define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 150 |
+
#define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 151 |
+
#define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 152 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 153 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 154 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 155 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 156 |
+
#define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 157 |
+
#define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 158 |
+
#define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 159 |
+
#endif
|
| 160 |
+
|
| 161 |
+
#define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 162 |
+
|
| 163 |
+
/*
|
| 164 |
+
* internal BIO:
|
| 165 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 166 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 167 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 168 |
+
*/
|
| 169 |
+
|
| 170 |
+
#define BIO_CTRL_GET_KTLS_SEND 73
|
| 171 |
+
#define BIO_CTRL_GET_KTLS_RECV 76
|
| 172 |
+
|
| 173 |
+
#define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 174 |
+
#define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 175 |
+
|
| 176 |
+
/* BIO_f_prefix controls */
|
| 177 |
+
#define BIO_CTRL_SET_PREFIX 79
|
| 178 |
+
#define BIO_CTRL_SET_INDENT 80
|
| 179 |
+
#define BIO_CTRL_GET_INDENT 81
|
| 180 |
+
|
| 181 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 182 |
+
#define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 183 |
+
#define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 184 |
+
#define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 185 |
+
#define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 186 |
+
#define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 187 |
+
#define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 188 |
+
#define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 189 |
+
|
| 190 |
+
/*
|
| 191 |
+
* internal BIO:
|
| 192 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 193 |
+
*/
|
| 194 |
+
|
| 195 |
+
#define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 196 |
+
#define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 197 |
+
#define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 198 |
+
#define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 199 |
+
|
| 200 |
+
#define BIO_DGRAM_CAP_NONE 0U
|
| 201 |
+
#define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 202 |
+
#define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 203 |
+
#define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 204 |
+
#define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 205 |
+
|
| 206 |
+
#ifndef OPENSSL_NO_KTLS
|
| 207 |
+
#define BIO_get_ktls_send(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 209 |
+
#define BIO_get_ktls_recv(b) \
|
| 210 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 211 |
+
#else
|
| 212 |
+
#define BIO_get_ktls_send(b) (0)
|
| 213 |
+
#define BIO_get_ktls_recv(b) (0)
|
| 214 |
+
#endif
|
| 215 |
+
|
| 216 |
+
/* modifiers */
|
| 217 |
+
#define BIO_FP_READ 0x02
|
| 218 |
+
#define BIO_FP_WRITE 0x04
|
| 219 |
+
#define BIO_FP_APPEND 0x08
|
| 220 |
+
#define BIO_FP_TEXT 0x10
|
| 221 |
+
|
| 222 |
+
#define BIO_FLAGS_READ 0x01
|
| 223 |
+
#define BIO_FLAGS_WRITE 0x02
|
| 224 |
+
#define BIO_FLAGS_IO_SPECIAL 0x04
|
| 225 |
+
#define BIO_FLAGS_RWS (BIO_FLAGS_READ | BIO_FLAGS_WRITE | BIO_FLAGS_IO_SPECIAL)
|
| 226 |
+
#define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 227 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 228 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 229 |
+
#define BIO_FLAGS_UPLINK 0
|
| 230 |
+
#endif
|
| 231 |
+
|
| 232 |
+
#define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 233 |
+
|
| 234 |
+
/*
|
| 235 |
+
* This is used with memory BIOs:
|
| 236 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 237 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 238 |
+
*/
|
| 239 |
+
#define BIO_FLAGS_MEM_RDONLY 0x200
|
| 240 |
+
#define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 241 |
+
#define BIO_FLAGS_IN_EOF 0x800
|
| 242 |
+
|
| 243 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 244 |
+
|
| 245 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 246 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 247 |
+
|
| 248 |
+
int BIO_get_new_index(void);
|
| 249 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 250 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 251 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 252 |
+
|
| 253 |
+
#define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 254 |
+
#define BIO_set_retry_special(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL | BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
#define BIO_set_retry_read(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_READ | BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
#define BIO_set_retry_write(b) \
|
| 259 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE | BIO_FLAGS_SHOULD_RETRY))
|
| 260 |
+
|
| 261 |
+
/* These are normally used internally in BIOs */
|
| 262 |
+
#define BIO_clear_retry_flags(b) \
|
| 263 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
#define BIO_get_retry_flags(b) \
|
| 265 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS | BIO_FLAGS_SHOULD_RETRY))
|
| 266 |
+
|
| 267 |
+
/* These should be used by the application to tell why we should retry */
|
| 268 |
+
#define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 269 |
+
#define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 270 |
+
#define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 271 |
+
#define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 272 |
+
#define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 276 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 277 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 278 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 279 |
+
* the code.
|
| 280 |
+
*/
|
| 281 |
+
/*
|
| 282 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 283 |
+
*/
|
| 284 |
+
#define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 285 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 286 |
+
#define BIO_RR_CONNECT 0x02
|
| 287 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 288 |
+
#define BIO_RR_ACCEPT 0x03
|
| 289 |
+
|
| 290 |
+
/* These are passed by the BIO callback */
|
| 291 |
+
#define BIO_CB_FREE 0x01
|
| 292 |
+
#define BIO_CB_READ 0x02
|
| 293 |
+
#define BIO_CB_WRITE 0x03
|
| 294 |
+
#define BIO_CB_PUTS 0x04
|
| 295 |
+
#define BIO_CB_GETS 0x05
|
| 296 |
+
#define BIO_CB_CTRL 0x06
|
| 297 |
+
#define BIO_CB_RECVMMSG 0x07
|
| 298 |
+
#define BIO_CB_SENDMMSG 0x08
|
| 299 |
+
|
| 300 |
+
/*
|
| 301 |
+
* The callback is called before and after the underling operation, The
|
| 302 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 303 |
+
*/
|
| 304 |
+
#define BIO_CB_RETURN 0x80
|
| 305 |
+
#define BIO_CB_return(a) ((a) | BIO_CB_RETURN)
|
| 306 |
+
#define BIO_cb_pre(a) (!((a) & BIO_CB_RETURN))
|
| 307 |
+
#define BIO_cb_post(a) ((a) & BIO_CB_RETURN)
|
| 308 |
+
|
| 309 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 310 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 311 |
+
long argl, long ret);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 313 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 314 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 315 |
+
const char *argp, int argi,
|
| 316 |
+
long argl, long ret);
|
| 317 |
+
#endif
|
| 318 |
+
|
| 319 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 320 |
+
size_t len, int argi,
|
| 321 |
+
long argl, int ret, size_t *processed);
|
| 322 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 323 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 324 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 325 |
+
int argi, long argl, int ret, size_t *processed);
|
| 326 |
+
|
| 327 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 328 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 329 |
+
|
| 330 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 331 |
+
|
| 332 |
+
const char *BIO_method_name(const BIO *b);
|
| 333 |
+
int BIO_method_type(const BIO *b);
|
| 334 |
+
|
| 335 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 336 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 337 |
+
|
| 338 |
+
/* clang-format off */
|
| 339 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 340 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 341 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 342 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 343 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 344 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 345 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 346 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 347 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 348 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 349 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 350 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 351 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 352 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 353 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 354 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk), ossl_check_BIO_freefunc_type(freefunc))
|
| 355 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 356 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 357 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 358 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 359 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 360 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 361 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 362 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 363 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 364 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 365 |
+
|
| 366 |
+
/* clang-format on */
|
| 367 |
+
|
| 368 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 369 |
+
typedef int asn1_ps_func(BIO *b, unsigned char **pbuf, int *plen,
|
| 370 |
+
void *parg);
|
| 371 |
+
|
| 372 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn)(BIO *b,
|
| 373 |
+
void *context,
|
| 374 |
+
void *buf);
|
| 375 |
+
#ifndef OPENSSL_NO_SCTP
|
| 376 |
+
/* SCTP parameter structs */
|
| 377 |
+
struct bio_dgram_sctp_sndinfo {
|
| 378 |
+
uint16_t snd_sid;
|
| 379 |
+
uint16_t snd_flags;
|
| 380 |
+
uint32_t snd_ppid;
|
| 381 |
+
uint32_t snd_context;
|
| 382 |
+
};
|
| 383 |
+
|
| 384 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 385 |
+
uint16_t rcv_sid;
|
| 386 |
+
uint16_t rcv_ssn;
|
| 387 |
+
uint16_t rcv_flags;
|
| 388 |
+
uint32_t rcv_ppid;
|
| 389 |
+
uint32_t rcv_tsn;
|
| 390 |
+
uint32_t rcv_cumtsn;
|
| 391 |
+
uint32_t rcv_context;
|
| 392 |
+
};
|
| 393 |
+
|
| 394 |
+
struct bio_dgram_sctp_prinfo {
|
| 395 |
+
uint16_t pr_policy;
|
| 396 |
+
uint32_t pr_value;
|
| 397 |
+
};
|
| 398 |
+
#endif
|
| 399 |
+
|
| 400 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 401 |
+
typedef struct bio_msg_st {
|
| 402 |
+
void *data;
|
| 403 |
+
size_t data_len;
|
| 404 |
+
BIO_ADDR *peer, *local;
|
| 405 |
+
uint64_t flags;
|
| 406 |
+
} BIO_MSG;
|
| 407 |
+
|
| 408 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 409 |
+
BIO_MSG *msg;
|
| 410 |
+
size_t stride, num_msg;
|
| 411 |
+
uint64_t flags;
|
| 412 |
+
size_t *msgs_processed;
|
| 413 |
+
} BIO_MMSG_CB_ARGS;
|
| 414 |
+
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 416 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 417 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 418 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 419 |
+
|
| 420 |
+
typedef struct bio_poll_descriptor_st {
|
| 421 |
+
uint32_t type;
|
| 422 |
+
union {
|
| 423 |
+
int fd;
|
| 424 |
+
void *custom;
|
| 425 |
+
uintptr_t custom_ui;
|
| 426 |
+
SSL *ssl;
|
| 427 |
+
} value;
|
| 428 |
+
} BIO_POLL_DESCRIPTOR;
|
| 429 |
+
|
| 430 |
+
/*
|
| 431 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 432 |
+
*/
|
| 433 |
+
|
| 434 |
+
#define BIO_C_SET_CONNECT 100
|
| 435 |
+
#define BIO_C_DO_STATE_MACHINE 101
|
| 436 |
+
#define BIO_C_SET_NBIO 102
|
| 437 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 438 |
+
#define BIO_C_SET_FD 104
|
| 439 |
+
#define BIO_C_GET_FD 105
|
| 440 |
+
#define BIO_C_SET_FILE_PTR 106
|
| 441 |
+
#define BIO_C_GET_FILE_PTR 107
|
| 442 |
+
#define BIO_C_SET_FILENAME 108
|
| 443 |
+
#define BIO_C_SET_SSL 109
|
| 444 |
+
#define BIO_C_GET_SSL 110
|
| 445 |
+
#define BIO_C_SET_MD 111
|
| 446 |
+
#define BIO_C_GET_MD 112
|
| 447 |
+
#define BIO_C_GET_CIPHER_STATUS 113
|
| 448 |
+
#define BIO_C_SET_BUF_MEM 114
|
| 449 |
+
#define BIO_C_GET_BUF_MEM_PTR 115
|
| 450 |
+
#define BIO_C_GET_BUFF_NUM_LINES 116
|
| 451 |
+
#define BIO_C_SET_BUFF_SIZE 117
|
| 452 |
+
#define BIO_C_SET_ACCEPT 118
|
| 453 |
+
#define BIO_C_SSL_MODE 119
|
| 454 |
+
#define BIO_C_GET_MD_CTX 120
|
| 455 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 456 |
+
#define BIO_C_SET_BUFF_READ_DATA 122 /* data to read first */
|
| 457 |
+
#define BIO_C_GET_CONNECT 123
|
| 458 |
+
#define BIO_C_GET_ACCEPT 124
|
| 459 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 460 |
+
#define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 461 |
+
#define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 462 |
+
#define BIO_C_FILE_SEEK 128
|
| 463 |
+
#define BIO_C_GET_CIPHER_CTX 129
|
| 464 |
+
#define BIO_C_SET_BUF_MEM_EOF_RETURN 130 /* return end of input \
|
| 465 |
+
* value */
|
| 466 |
+
#define BIO_C_SET_BIND_MODE 131
|
| 467 |
+
#define BIO_C_GET_BIND_MODE 132
|
| 468 |
+
#define BIO_C_FILE_TELL 133
|
| 469 |
+
#define BIO_C_GET_SOCKS 134
|
| 470 |
+
#define BIO_C_SET_SOCKS 135
|
| 471 |
+
|
| 472 |
+
#define BIO_C_SET_WRITE_BUF_SIZE 136 /* for BIO_s_bio */
|
| 473 |
+
#define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 474 |
+
#define BIO_C_MAKE_BIO_PAIR 138
|
| 475 |
+
#define BIO_C_DESTROY_BIO_PAIR 139
|
| 476 |
+
#define BIO_C_GET_WRITE_GUARANTEE 140
|
| 477 |
+
#define BIO_C_GET_READ_REQUEST 141
|
| 478 |
+
#define BIO_C_SHUTDOWN_WR 142
|
| 479 |
+
#define BIO_C_NREAD0 143
|
| 480 |
+
#define BIO_C_NREAD 144
|
| 481 |
+
#define BIO_C_NWRITE0 145
|
| 482 |
+
#define BIO_C_NWRITE 146
|
| 483 |
+
#define BIO_C_RESET_READ_REQUEST 147
|
| 484 |
+
#define BIO_C_SET_MD_CTX 148
|
| 485 |
+
|
| 486 |
+
#define BIO_C_SET_PREFIX 149
|
| 487 |
+
#define BIO_C_GET_PREFIX 150
|
| 488 |
+
#define BIO_C_SET_SUFFIX 151
|
| 489 |
+
#define BIO_C_GET_SUFFIX 152
|
| 490 |
+
|
| 491 |
+
#define BIO_C_SET_EX_ARG 153
|
| 492 |
+
#define BIO_C_GET_EX_ARG 154
|
| 493 |
+
|
| 494 |
+
#define BIO_C_SET_CONNECT_MODE 155
|
| 495 |
+
|
| 496 |
+
#define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 497 |
+
|
| 498 |
+
#define BIO_C_SET_SOCK_TYPE 157
|
| 499 |
+
#define BIO_C_GET_SOCK_TYPE 158
|
| 500 |
+
#define BIO_C_GET_DGRAM_BIO 159
|
| 501 |
+
|
| 502 |
+
#define BIO_set_app_data(s, arg) BIO_set_ex_data(s, 0, arg)
|
| 503 |
+
#define BIO_get_app_data(s) BIO_get_ex_data(s, 0)
|
| 504 |
+
|
| 505 |
+
#define BIO_set_nbio(b, n) BIO_ctrl(b, BIO_C_SET_NBIO, (n), NULL)
|
| 506 |
+
#define BIO_set_tfo(b, n) BIO_ctrl(b, BIO_C_SET_TFO, (n), NULL)
|
| 507 |
+
|
| 508 |
+
#ifndef OPENSSL_NO_SOCK
|
| 509 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 510 |
+
/* Note: the underlying operating system may not support some of them */
|
| 511 |
+
#define BIO_FAMILY_IPV4 4
|
| 512 |
+
#define BIO_FAMILY_IPV6 6
|
| 513 |
+
#define BIO_FAMILY_IPANY 256
|
| 514 |
+
|
| 515 |
+
/* BIO_s_connect() */
|
| 516 |
+
#define BIO_set_conn_hostname(b, name) BIO_ctrl(b, BIO_C_SET_CONNECT, 0, \
|
| 517 |
+
(char *)(name))
|
| 518 |
+
#define BIO_set_conn_port(b, port) BIO_ctrl(b, BIO_C_SET_CONNECT, 1, \
|
| 519 |
+
(char *)(port))
|
| 520 |
+
#define BIO_set_conn_address(b, addr) BIO_ctrl(b, BIO_C_SET_CONNECT, 2, \
|
| 521 |
+
(char *)(addr))
|
| 522 |
+
#define BIO_set_conn_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_CONNECT, 3, f)
|
| 523 |
+
#define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 0))
|
| 524 |
+
#define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 1))
|
| 525 |
+
#define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b, BIO_C_GET_CONNECT, 2))
|
| 526 |
+
#define BIO_get_conn_ip_family(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 3, NULL)
|
| 527 |
+
#define BIO_get_conn_mode(b) BIO_ctrl(b, BIO_C_GET_CONNECT, 4, NULL)
|
| 528 |
+
#define BIO_set_conn_mode(b, n) BIO_ctrl(b, BIO_C_SET_CONNECT_MODE, (n), NULL)
|
| 529 |
+
#define BIO_set_sock_type(b, t) BIO_ctrl(b, BIO_C_SET_SOCK_TYPE, (t), NULL)
|
| 530 |
+
#define BIO_get_sock_type(b) BIO_ctrl(b, BIO_C_GET_SOCK_TYPE, 0, NULL)
|
| 531 |
+
#define BIO_get0_dgram_bio(b, p) BIO_ctrl(b, BIO_C_GET_DGRAM_BIO, 0, (void *)(BIO **)(p))
|
| 532 |
+
|
| 533 |
+
/* BIO_s_accept() */
|
| 534 |
+
#define BIO_set_accept_name(b, name) BIO_ctrl(b, BIO_C_SET_ACCEPT, 0, \
|
| 535 |
+
(char *)(name))
|
| 536 |
+
#define BIO_set_accept_port(b, port) BIO_ctrl(b, BIO_C_SET_ACCEPT, 1, \
|
| 537 |
+
(char *)(port))
|
| 538 |
+
#define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 0))
|
| 539 |
+
#define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 1))
|
| 540 |
+
#define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 2))
|
| 541 |
+
#define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b, BIO_C_GET_ACCEPT, 3))
|
| 542 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 543 |
+
#define BIO_set_nbio_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 2, (n) ? (void *)"a" : NULL)
|
| 544 |
+
#define BIO_set_accept_bios(b, bio) BIO_ctrl(b, BIO_C_SET_ACCEPT, 3, \
|
| 545 |
+
(char *)(bio))
|
| 546 |
+
#define BIO_set_accept_ip_family(b, f) BIO_int_ctrl(b, BIO_C_SET_ACCEPT, 4, f)
|
| 547 |
+
#define BIO_get_accept_ip_family(b) BIO_ctrl(b, BIO_C_GET_ACCEPT, 4, NULL)
|
| 548 |
+
#define BIO_set_tfo_accept(b, n) BIO_ctrl(b, BIO_C_SET_ACCEPT, 5, (n) ? (void *)"a" : NULL)
|
| 549 |
+
|
| 550 |
+
/* Aliases kept for backward compatibility */
|
| 551 |
+
#define BIO_BIND_NORMAL 0
|
| 552 |
+
#define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 553 |
+
#define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 554 |
+
#define BIO_set_bind_mode(b, mode) BIO_ctrl(b, BIO_C_SET_BIND_MODE, mode, NULL)
|
| 555 |
+
#define BIO_get_bind_mode(b) BIO_ctrl(b, BIO_C_GET_BIND_MODE, 0, NULL)
|
| 556 |
+
#endif /* OPENSSL_NO_SOCK */
|
| 557 |
+
|
| 558 |
+
#define BIO_do_connect(b) BIO_do_handshake(b)
|
| 559 |
+
#define BIO_do_accept(b) BIO_do_handshake(b)
|
| 560 |
+
|
| 561 |
+
#define BIO_do_handshake(b) BIO_ctrl(b, BIO_C_DO_STATE_MACHINE, 0, NULL)
|
| 562 |
+
|
| 563 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 564 |
+
#define BIO_set_fd(b, fd, c) BIO_int_ctrl(b, BIO_C_SET_FD, c, fd)
|
| 565 |
+
#define BIO_get_fd(b, c) BIO_ctrl(b, BIO_C_GET_FD, 0, (char *)(c))
|
| 566 |
+
|
| 567 |
+
/* BIO_s_file() */
|
| 568 |
+
#define BIO_set_fp(b, fp, c) BIO_ctrl(b, BIO_C_SET_FILE_PTR, c, (char *)(fp))
|
| 569 |
+
#define BIO_get_fp(b, fpp) BIO_ctrl(b, BIO_C_GET_FILE_PTR, 0, (char *)(fpp))
|
| 570 |
+
|
| 571 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 572 |
+
#define BIO_seek(b, ofs) (int)BIO_ctrl(b, BIO_C_FILE_SEEK, ofs, NULL)
|
| 573 |
+
#define BIO_tell(b) (int)BIO_ctrl(b, BIO_C_FILE_TELL, 0, NULL)
|
| 574 |
+
|
| 575 |
+
/*
|
| 576 |
+
* name is cast to lose const, but might be better to route through a
|
| 577 |
+
* function so we can do it safely
|
| 578 |
+
*/
|
| 579 |
+
#ifdef CONST_STRICT
|
| 580 |
+
/*
|
| 581 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 582 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 583 |
+
*/
|
| 584 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 585 |
+
#else
|
| 586 |
+
#define BIO_read_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE | BIO_FP_READ, (char *)(name))
|
| 588 |
+
#endif
|
| 589 |
+
#define BIO_write_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 590 |
+
BIO_CLOSE | BIO_FP_WRITE, name)
|
| 591 |
+
#define BIO_append_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 592 |
+
BIO_CLOSE | BIO_FP_APPEND, name)
|
| 593 |
+
#define BIO_rw_filename(b, name) (int)BIO_ctrl(b, BIO_C_SET_FILENAME, \
|
| 594 |
+
BIO_CLOSE | BIO_FP_READ | BIO_FP_WRITE, name)
|
| 595 |
+
|
| 596 |
+
/*
|
| 597 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 598 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 599 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 600 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 601 |
+
*/
|
| 602 |
+
#define BIO_set_ssl(b, ssl, c) BIO_ctrl(b, BIO_C_SET_SSL, c, (char *)(ssl))
|
| 603 |
+
#define BIO_get_ssl(b, sslp) BIO_ctrl(b, BIO_C_GET_SSL, 0, (char *)(sslp))
|
| 604 |
+
#define BIO_set_ssl_mode(b, client) BIO_ctrl(b, BIO_C_SSL_MODE, client, NULL)
|
| 605 |
+
#define BIO_set_ssl_renegotiate_bytes(b, num) \
|
| 606 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_BYTES, num, NULL)
|
| 607 |
+
#define BIO_get_num_renegotiates(b) \
|
| 608 |
+
BIO_ctrl(b, BIO_C_GET_SSL_NUM_RENEGOTIATES, 0, NULL)
|
| 609 |
+
#define BIO_set_ssl_renegotiate_timeout(b, seconds) \
|
| 610 |
+
BIO_ctrl(b, BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT, seconds, NULL)
|
| 611 |
+
|
| 612 |
+
/* defined in evp.h */
|
| 613 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 614 |
+
|
| 615 |
+
#define BIO_get_mem_data(b, pp) BIO_ctrl(b, BIO_CTRL_INFO, 0, (char *)(pp))
|
| 616 |
+
#define BIO_set_mem_buf(b, bm, c) BIO_ctrl(b, BIO_C_SET_BUF_MEM, c, (char *)(bm))
|
| 617 |
+
#define BIO_get_mem_ptr(b, pp) BIO_ctrl(b, BIO_C_GET_BUF_MEM_PTR, 0, \
|
| 618 |
+
(char *)(pp))
|
| 619 |
+
#define BIO_set_mem_eof_return(b, v) \
|
| 620 |
+
BIO_ctrl(b, BIO_C_SET_BUF_MEM_EOF_RETURN, v, NULL)
|
| 621 |
+
|
| 622 |
+
/* For the BIO_f_buffer() type */
|
| 623 |
+
#define BIO_get_buffer_num_lines(b) BIO_ctrl(b, BIO_C_GET_BUFF_NUM_LINES, 0, NULL)
|
| 624 |
+
#define BIO_set_buffer_size(b, size) BIO_ctrl(b, BIO_C_SET_BUFF_SIZE, size, NULL)
|
| 625 |
+
#define BIO_set_read_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 0)
|
| 626 |
+
#define BIO_set_write_buffer_size(b, size) BIO_int_ctrl(b, BIO_C_SET_BUFF_SIZE, size, 1)
|
| 627 |
+
#define BIO_set_buffer_read_data(b, buf, num) BIO_ctrl(b, BIO_C_SET_BUFF_READ_DATA, num, buf)
|
| 628 |
+
|
| 629 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 630 |
+
#define BIO_dup_state(b, ret) BIO_ctrl(b, BIO_CTRL_DUP, 0, (char *)(ret))
|
| 631 |
+
|
| 632 |
+
#define BIO_reset(b) (int)BIO_ctrl(b, BIO_CTRL_RESET, 0, NULL)
|
| 633 |
+
#define BIO_eof(b) (int)BIO_ctrl(b, BIO_CTRL_EOF, 0, NULL)
|
| 634 |
+
#define BIO_set_close(b, c) (int)BIO_ctrl(b, BIO_CTRL_SET_CLOSE, (c), NULL)
|
| 635 |
+
#define BIO_get_close(b) (int)BIO_ctrl(b, BIO_CTRL_GET_CLOSE, 0, NULL)
|
| 636 |
+
#define BIO_pending(b) (int)BIO_ctrl(b, BIO_CTRL_PENDING, 0, NULL)
|
| 637 |
+
#define BIO_wpending(b) (int)BIO_ctrl(b, BIO_CTRL_WPENDING, 0, NULL)
|
| 638 |
+
/* ...pending macros have inappropriate return type */
|
| 639 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 640 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 641 |
+
#define BIO_flush(b) (int)BIO_ctrl(b, BIO_CTRL_FLUSH, 0, NULL)
|
| 642 |
+
#define BIO_get_info_callback(b, cbp) (int)BIO_ctrl(b, BIO_CTRL_GET_CALLBACK, 0, \
|
| 643 |
+
cbp)
|
| 644 |
+
#define BIO_set_info_callback(b, cb) (int)BIO_callback_ctrl(b, BIO_CTRL_SET_CALLBACK, cb)
|
| 645 |
+
|
| 646 |
+
/* For the BIO_f_buffer() type */
|
| 647 |
+
#define BIO_buffer_get_num_lines(b) BIO_ctrl(b, BIO_CTRL_GET, 0, NULL)
|
| 648 |
+
#define BIO_buffer_peek(b, s, l) BIO_ctrl(b, BIO_CTRL_PEEK, (l), (s))
|
| 649 |
+
|
| 650 |
+
/* For BIO_s_bio() */
|
| 651 |
+
#define BIO_set_write_buf_size(b, size) (int)BIO_ctrl(b, BIO_C_SET_WRITE_BUF_SIZE, size, NULL)
|
| 652 |
+
#define BIO_get_write_buf_size(b, size) (size_t)BIO_ctrl(b, BIO_C_GET_WRITE_BUF_SIZE, size, NULL)
|
| 653 |
+
#define BIO_make_bio_pair(b1, b2) (int)BIO_ctrl(b1, BIO_C_MAKE_BIO_PAIR, 0, b2)
|
| 654 |
+
#define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b, BIO_C_DESTROY_BIO_PAIR, 0, NULL)
|
| 655 |
+
#define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 656 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 657 |
+
#define BIO_get_write_guarantee(b) (int)BIO_ctrl(b, BIO_C_GET_WRITE_GUARANTEE, 0, NULL)
|
| 658 |
+
#define BIO_get_read_request(b) (int)BIO_ctrl(b, BIO_C_GET_READ_REQUEST, 0, NULL)
|
| 659 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 660 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 661 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 662 |
+
|
| 663 |
+
/* ctrl macros for dgram */
|
| 664 |
+
#define BIO_ctrl_dgram_connect(b, peer) \
|
| 665 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_CONNECT, 0, (char *)(peer))
|
| 666 |
+
#define BIO_ctrl_set_connected(b, peer) \
|
| 667 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 668 |
+
#define BIO_dgram_recv_timedout(b) \
|
| 669 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 670 |
+
#define BIO_dgram_send_timedout(b) \
|
| 671 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 672 |
+
#define BIO_dgram_get_peer(b, peer) \
|
| 673 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 674 |
+
#define BIO_dgram_set_peer(b, peer) \
|
| 675 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 676 |
+
#define BIO_dgram_detect_peer_addr(b, peer) \
|
| 677 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 678 |
+
#define BIO_dgram_get_mtu_overhead(b) \
|
| 679 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 680 |
+
#define BIO_dgram_get_local_addr_cap(b) \
|
| 681 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 682 |
+
#define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 683 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 684 |
+
#define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 685 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 686 |
+
#define BIO_dgram_get_effective_caps(b) \
|
| 687 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 688 |
+
#define BIO_dgram_get_caps(b) \
|
| 689 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 690 |
+
#define BIO_dgram_set_caps(b, caps) \
|
| 691 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 692 |
+
#define BIO_dgram_get_no_trunc(b) \
|
| 693 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 694 |
+
#define BIO_dgram_set_no_trunc(b, enable) \
|
| 695 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 696 |
+
#define BIO_dgram_get_mtu(b) \
|
| 697 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 698 |
+
#define BIO_dgram_set_mtu(b, mtu) \
|
| 699 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 700 |
+
#define BIO_dgram_set0_local_addr(b, addr) \
|
| 701 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 702 |
+
|
| 703 |
+
/* ctrl macros for BIO_f_prefix */
|
| 704 |
+
#define BIO_set_prefix(b, p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 705 |
+
#define BIO_set_indent(b, i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 706 |
+
#define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 707 |
+
|
| 708 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 709 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 710 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 711 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 712 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 713 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 714 |
+
|
| 715 |
+
/* For BIO_f_asn1() */
|
| 716 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 717 |
+
asn1_ps_func *prefix_free);
|
| 718 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 719 |
+
asn1_ps_func **pprefix_free);
|
| 720 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 721 |
+
asn1_ps_func *suffix_free);
|
| 722 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 723 |
+
asn1_ps_func **psuffix_free);
|
| 724 |
+
|
| 725 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 726 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 727 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 728 |
+
#ifndef OPENSSL_NO_STDIO
|
| 729 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 730 |
+
#endif
|
| 731 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 732 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 733 |
+
int BIO_free(BIO *a);
|
| 734 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 735 |
+
void *BIO_get_data(BIO *a);
|
| 736 |
+
void BIO_set_init(BIO *a, int init);
|
| 737 |
+
int BIO_get_init(BIO *a);
|
| 738 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 739 |
+
int BIO_get_shutdown(BIO *a);
|
| 740 |
+
void BIO_vfree(BIO *a);
|
| 741 |
+
int BIO_up_ref(BIO *a);
|
| 742 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 743 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 744 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 745 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 746 |
+
size_t *msgs_processed);
|
| 747 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 748 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 749 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 750 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 751 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 752 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 753 |
+
size_t *msgs_processed);
|
| 754 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 755 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 756 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 757 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 758 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 759 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 760 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 761 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 762 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 763 |
+
BIO *BIO_pop(BIO *b);
|
| 764 |
+
void BIO_free_all(BIO *a);
|
| 765 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 766 |
+
BIO *BIO_next(BIO *b);
|
| 767 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 768 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 769 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 770 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 771 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 772 |
+
|
| 773 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 774 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 775 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 776 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 777 |
+
|
| 778 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 779 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 780 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 781 |
+
#endif
|
| 782 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 783 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 784 |
+
#ifndef OPENSSL_NO_SOCK
|
| 785 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 786 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 788 |
+
#endif
|
| 789 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 790 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 791 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 792 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 796 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 797 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 798 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 800 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 801 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 802 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 803 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 804 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 805 |
+
#ifndef OPENSSL_NO_SCTP
|
| 806 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 807 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 808 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 809 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 810 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 811 |
+
void *context);
|
| 812 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 813 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 814 |
+
#endif
|
| 815 |
+
#endif
|
| 816 |
+
|
| 817 |
+
#ifndef OPENSSL_NO_SOCK
|
| 818 |
+
int BIO_sock_should_retry(int i);
|
| 819 |
+
int BIO_sock_non_fatal_error(int error);
|
| 820 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 821 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 822 |
+
#endif
|
| 823 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 824 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 825 |
+
|
| 826 |
+
int BIO_fd_should_retry(int i);
|
| 827 |
+
int BIO_fd_non_fatal_error(int error);
|
| 828 |
+
int BIO_dump_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 829 |
+
void *u, const void *s, int len);
|
| 830 |
+
int BIO_dump_indent_cb(int (*cb)(const void *data, size_t len, void *u),
|
| 831 |
+
void *u, const void *s, int len, int indent);
|
| 832 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 833 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 834 |
+
#ifndef OPENSSL_NO_STDIO
|
| 835 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 836 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 837 |
+
#endif
|
| 838 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 839 |
+
int datalen);
|
| 840 |
+
|
| 841 |
+
#ifndef OPENSSL_NO_SOCK
|
| 842 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 843 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 844 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 845 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 846 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 847 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 848 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 849 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 850 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 851 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 852 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 853 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 854 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 855 |
+
|
| 856 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 857 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 858 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 859 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 860 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 861 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 862 |
+
|
| 863 |
+
enum BIO_hostserv_priorities {
|
| 864 |
+
BIO_PARSE_PRIO_HOST,
|
| 865 |
+
BIO_PARSE_PRIO_SERV
|
| 866 |
+
};
|
| 867 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 868 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 869 |
+
enum BIO_lookup_type {
|
| 870 |
+
BIO_LOOKUP_CLIENT,
|
| 871 |
+
BIO_LOOKUP_SERVER
|
| 872 |
+
};
|
| 873 |
+
int BIO_lookup(const char *host, const char *service,
|
| 874 |
+
enum BIO_lookup_type lookup_type,
|
| 875 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 876 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 877 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 878 |
+
BIO_ADDRINFO **res);
|
| 879 |
+
int BIO_sock_error(int sock);
|
| 880 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 881 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 882 |
+
int BIO_sock_init(void);
|
| 883 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 884 |
+
#define BIO_sock_cleanup() \
|
| 885 |
+
while (0) \
|
| 886 |
+
continue
|
| 887 |
+
#endif
|
| 888 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 889 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 890 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 891 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 892 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 893 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 894 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 895 |
+
#endif
|
| 896 |
+
|
| 897 |
+
union BIO_sock_info_u {
|
| 898 |
+
BIO_ADDR *addr;
|
| 899 |
+
};
|
| 900 |
+
enum BIO_sock_info_type {
|
| 901 |
+
BIO_SOCK_INFO_ADDRESS
|
| 902 |
+
};
|
| 903 |
+
int BIO_sock_info(int sock,
|
| 904 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 905 |
+
|
| 906 |
+
#define BIO_SOCK_REUSEADDR 0x01
|
| 907 |
+
#define BIO_SOCK_V6_ONLY 0x02
|
| 908 |
+
#define BIO_SOCK_KEEPALIVE 0x04
|
| 909 |
+
#define BIO_SOCK_NONBLOCK 0x08
|
| 910 |
+
#define BIO_SOCK_NODELAY 0x10
|
| 911 |
+
#define BIO_SOCK_TFO 0x20
|
| 912 |
+
|
| 913 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 914 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 915 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 916 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 917 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 918 |
+
int BIO_closesocket(int sock);
|
| 919 |
+
|
| 920 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 921 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 922 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 923 |
+
#endif /* OPENSSL_NO_SOCK*/
|
| 924 |
+
|
| 925 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 926 |
+
|
| 927 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 928 |
+
BIO **bio2, size_t writebuf2);
|
| 929 |
+
#ifndef OPENSSL_NO_DGRAM
|
| 930 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 931 |
+
BIO **bio2, size_t writebuf2);
|
| 932 |
+
#endif
|
| 933 |
+
|
| 934 |
+
/*
|
| 935 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 936 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 937 |
+
* value.
|
| 938 |
+
*/
|
| 939 |
+
|
| 940 |
+
void BIO_copy_next_retry(BIO *b);
|
| 941 |
+
|
| 942 |
+
/*
|
| 943 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 944 |
+
*/
|
| 945 |
+
|
| 946 |
+
#define ossl_bio__attr__(x)
|
| 947 |
+
#if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 948 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 949 |
+
&& !defined(__APPLE__)
|
| 950 |
+
/*
|
| 951 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 952 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 953 |
+
*/
|
| 954 |
+
#if __STDC_VERSION__ >= 199901L
|
| 955 |
+
#undef ossl_bio__attr__
|
| 956 |
+
#define ossl_bio__attr__ __attribute__
|
| 957 |
+
#if __GNUC__ * 10 + __GNUC_MINOR__ >= 44
|
| 958 |
+
#define ossl_bio__printf__ __gnu_printf__
|
| 959 |
+
#else
|
| 960 |
+
#define ossl_bio__printf__ __printf__
|
| 961 |
+
#endif
|
| 962 |
+
#endif
|
| 963 |
+
#endif
|
| 964 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 965 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 966 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 967 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 968 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 969 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 970 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 971 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 972 |
+
#undef ossl_bio__attr__
|
| 973 |
+
#undef ossl_bio__printf__
|
| 974 |
+
|
| 975 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 976 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 977 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 978 |
+
int (*write)(BIO *, const char *, int));
|
| 979 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 980 |
+
int (*bwrite)(BIO *, const char *, size_t, size_t *));
|
| 981 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 982 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 983 |
+
uint64_t, size_t *));
|
| 984 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 985 |
+
int (*read)(BIO *, char *, int));
|
| 986 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 987 |
+
int (*bread)(BIO *, char *, size_t, size_t *));
|
| 988 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 989 |
+
int (*f)(BIO *, BIO_MSG *, size_t, size_t,
|
| 990 |
+
uint64_t, size_t *));
|
| 991 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 992 |
+
int (*puts)(BIO *, const char *));
|
| 993 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 994 |
+
int (*ossl_gets)(BIO *, char *, int));
|
| 995 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 996 |
+
long (*ctrl)(BIO *, int, long, void *));
|
| 997 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create)(BIO *));
|
| 998 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy)(BIO *));
|
| 999 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 1000 |
+
long (*callback_ctrl)(BIO *, int,
|
| 1001 |
+
BIO_info_cb *));
|
| 1002 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 1003 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1004 |
+
int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom))(BIO *, const char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom))(BIO *, char *,
|
| 1012 |
+
size_t, size_t *);
|
| 1013 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1014 |
+
size_t, size_t,
|
| 1015 |
+
uint64_t, size_t *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom))(BIO *, const char *);
|
| 1017 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom))(BIO *, char *, int);
|
| 1018 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1019 |
+
long, void *);
|
| 1020 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion))(BIO *);
|
| 1021 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom))(BIO *);
|
| 1022 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom))(BIO *, int,
|
| 1023 |
+
BIO_info_cb *);
|
| 1024 |
+
#endif
|
| 1025 |
+
#ifdef __cplusplus
|
| 1026 |
+
}
|
| 1027 |
+
#endif
|
| 1028 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/bioerr.h
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BIOERR_H
|
| 12 |
+
#define OPENSSL_BIOERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BIO reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define BIO_R_ACCEPT_ERROR 100
|
| 23 |
+
#define BIO_R_ADDRINFO_ADDR_IS_NOT_AF_INET 141
|
| 24 |
+
#define BIO_R_AMBIGUOUS_HOST_OR_SERVICE 129
|
| 25 |
+
#define BIO_R_BAD_FOPEN_MODE 101
|
| 26 |
+
#define BIO_R_BROKEN_PIPE 124
|
| 27 |
+
#define BIO_R_CONNECT_ERROR 103
|
| 28 |
+
#define BIO_R_CONNECT_TIMEOUT 147
|
| 29 |
+
#define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107
|
| 30 |
+
#define BIO_R_GETSOCKNAME_ERROR 132
|
| 31 |
+
#define BIO_R_GETSOCKNAME_TRUNCATED_ADDRESS 133
|
| 32 |
+
#define BIO_R_GETTING_SOCKTYPE 134
|
| 33 |
+
#define BIO_R_INVALID_ARGUMENT 125
|
| 34 |
+
#define BIO_R_INVALID_SOCKET 135
|
| 35 |
+
#define BIO_R_IN_USE 123
|
| 36 |
+
#define BIO_R_LENGTH_TOO_LONG 102
|
| 37 |
+
#define BIO_R_LISTEN_V6_ONLY 136
|
| 38 |
+
#define BIO_R_LOCAL_ADDR_NOT_AVAILABLE 111
|
| 39 |
+
#define BIO_R_LOOKUP_RETURNED_NOTHING 142
|
| 40 |
+
#define BIO_R_MALFORMED_HOST_OR_SERVICE 130
|
| 41 |
+
#define BIO_R_NBIO_CONNECT_ERROR 110
|
| 42 |
+
#define BIO_R_NON_FATAL 112
|
| 43 |
+
#define BIO_R_NO_ACCEPT_ADDR_OR_SERVICE_SPECIFIED 143
|
| 44 |
+
#define BIO_R_NO_HOSTNAME_OR_SERVICE_SPECIFIED 144
|
| 45 |
+
#define BIO_R_NO_PORT_DEFINED 113
|
| 46 |
+
#define BIO_R_NO_SUCH_FILE 128
|
| 47 |
+
#define BIO_R_NULL_PARAMETER 115 /* unused */
|
| 48 |
+
#define BIO_R_TFO_DISABLED 106
|
| 49 |
+
#define BIO_R_TFO_NO_KERNEL_SUPPORT 108
|
| 50 |
+
#define BIO_R_TRANSFER_ERROR 104
|
| 51 |
+
#define BIO_R_TRANSFER_TIMEOUT 105
|
| 52 |
+
#define BIO_R_UNABLE_TO_BIND_SOCKET 117
|
| 53 |
+
#define BIO_R_UNABLE_TO_CREATE_SOCKET 118
|
| 54 |
+
#define BIO_R_UNABLE_TO_KEEPALIVE 137
|
| 55 |
+
#define BIO_R_UNABLE_TO_LISTEN_SOCKET 119
|
| 56 |
+
#define BIO_R_UNABLE_TO_NODELAY 138
|
| 57 |
+
#define BIO_R_UNABLE_TO_REUSEADDR 139
|
| 58 |
+
#define BIO_R_UNABLE_TO_TFO 109
|
| 59 |
+
#define BIO_R_UNAVAILABLE_IP_FAMILY 145
|
| 60 |
+
#define BIO_R_UNINITIALIZED 120
|
| 61 |
+
#define BIO_R_UNKNOWN_INFO_TYPE 140
|
| 62 |
+
#define BIO_R_UNSUPPORTED_IP_FAMILY 146
|
| 63 |
+
#define BIO_R_UNSUPPORTED_METHOD 121
|
| 64 |
+
#define BIO_R_UNSUPPORTED_PROTOCOL_FAMILY 131
|
| 65 |
+
#define BIO_R_WRITE_TO_READ_ONLY_BIO 126
|
| 66 |
+
#define BIO_R_WSASTARTUP 122
|
| 67 |
+
#define BIO_R_PORT_MISMATCH 150
|
| 68 |
+
#define BIO_R_PEER_ADDR_NOT_AVAILABLE 151
|
| 69 |
+
|
| 70 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/blowfish.h
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BLOWFISH_H
|
| 11 |
+
#define OPENSSL_BLOWFISH_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BLOWFISH_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_BF
|
| 22 |
+
#include <openssl/e_os2.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define BF_BLOCK 8
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define BF_ENCRYPT 1
|
| 32 |
+
#define BF_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*-
|
| 35 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 36 |
+
* ! BF_LONG has to be at least 32 bits wide. !
|
| 37 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 38 |
+
*/
|
| 39 |
+
#define BF_LONG unsigned int
|
| 40 |
+
|
| 41 |
+
#define BF_ROUNDS 16
|
| 42 |
+
|
| 43 |
+
typedef struct bf_key_st {
|
| 44 |
+
BF_LONG P[BF_ROUNDS + 2];
|
| 45 |
+
BF_LONG S[4 * 256];
|
| 46 |
+
} BF_KEY;
|
| 47 |
+
|
| 48 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 49 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len,
|
| 51 |
+
const unsigned char *data);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
| 53 |
+
OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
| 54 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
|
| 55 |
+
unsigned char *out, const BF_KEY *key,
|
| 56 |
+
int enc);
|
| 57 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in,
|
| 58 |
+
unsigned char *out, long length,
|
| 59 |
+
const BF_KEY *schedule,
|
| 60 |
+
unsigned char *ivec, int enc);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
long length, const BF_KEY *schedule,
|
| 64 |
+
unsigned char *ivec, int *num,
|
| 65 |
+
int enc);
|
| 66 |
+
OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in,
|
| 67 |
+
unsigned char *out,
|
| 68 |
+
long length, const BF_KEY *schedule,
|
| 69 |
+
unsigned char *ivec, int *num);
|
| 70 |
+
OSSL_DEPRECATEDIN_3_0 const char *BF_options(void);
|
| 71 |
+
#endif
|
| 72 |
+
|
| 73 |
+
#ifdef __cpl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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BN_H
|
| 12 |
+
#define OPENSSL_BN_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/macros.h>
|
| 16 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 17 |
+
#define HEADER_BN_H
|
| 18 |
+
#endif
|
| 19 |
+
|
| 20 |
+
#include <openssl/e_os2.h>
|
| 21 |
+
#ifndef OPENSSL_NO_STDIO
|
| 22 |
+
#include <stdio.h>
|
| 23 |
+
#endif
|
| 24 |
+
#include <openssl/opensslconf.h>
|
| 25 |
+
#include <openssl/types.h>
|
| 26 |
+
#include <openssl/crypto.h>
|
| 27 |
+
#include <openssl/bnerr.h>
|
| 28 |
+
|
| 29 |
+
#ifdef __cplusplus
|
| 30 |
+
extern "C" {
|
| 31 |
+
#endif
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* 64-bit processor with LP64 ABI
|
| 35 |
+
*/
|
| 36 |
+
#ifdef SIXTY_FOUR_BIT_LONG
|
| 37 |
+
#define BN_ULONG unsigned long
|
| 38 |
+
#define BN_BYTES 8
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* 64-bit processor other than LP64 ABI
|
| 43 |
+
*/
|
| 44 |
+
#ifdef SIXTY_FOUR_BIT
|
| 45 |
+
#define BN_ULONG unsigned long long
|
| 46 |
+
#define BN_BYTES 8
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
#ifdef THIRTY_TWO_BIT
|
| 50 |
+
#define BN_ULONG unsigned int
|
| 51 |
+
#define BN_BYTES 4
|
| 52 |
+
#endif
|
| 53 |
+
|
| 54 |
+
#define BN_BITS2 (BN_BYTES * 8)
|
| 55 |
+
#define BN_BITS (BN_BITS2 * 2)
|
| 56 |
+
#define BN_TBIT ((BN_ULONG)1 << (BN_BITS2 - 1))
|
| 57 |
+
|
| 58 |
+
#define BN_FLG_MALLOCED 0x01
|
| 59 |
+
#define BN_FLG_STATIC_DATA 0x02
|
| 60 |
+
|
| 61 |
+
/*
|
| 62 |
+
* avoid leaking exponent information through timing,
|
| 63 |
+
* BN_mod_exp_mont() will call BN_mod_exp_mont_consttime,
|
| 64 |
+
* BN_div() will call BN_div_no_branch,
|
| 65 |
+
* BN_mod_inverse() will call bn_mod_inverse_no_branch.
|
| 66 |
+
*/
|
| 67 |
+
#define BN_FLG_CONSTTIME 0x04
|
| 68 |
+
#define BN_FLG_SECURE 0x08
|
| 69 |
+
|
| 70 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 71 |
+
/* deprecated name for the flag */
|
| 72 |
+
#define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
| 73 |
+
#define BN_FLG_FREE 0x8000 /* used for debugging */
|
| 74 |
+
#endif
|
| 75 |
+
|
| 76 |
+
void BN_set_flags(BIGNUM *b, int n);
|
| 77 |
+
int BN_get_flags(const BIGNUM *b, int n);
|
| 78 |
+
|
| 79 |
+
/* Values for |top| in BN_rand() */
|
| 80 |
+
#define BN_RAND_TOP_ANY -1
|
| 81 |
+
#define BN_RAND_TOP_ONE 0
|
| 82 |
+
#define BN_RAND_TOP_TWO 1
|
| 83 |
+
|
| 84 |
+
/* Values for |bottom| in BN_rand() */
|
| 85 |
+
#define BN_RAND_BOTTOM_ANY 0
|
| 86 |
+
#define BN_RAND_BOTTOM_ODD 1
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* get a clone of a BIGNUM with changed flags, for *temporary* use only (the
|
| 90 |
+
* two BIGNUMs cannot be used in parallel!). Also only for *read only* use. The
|
| 91 |
+
* value |dest| should be a newly allocated BIGNUM obtained via BN_new() that
|
| 92 |
+
* has not been otherwise initialised or used.
|
| 93 |
+
*/
|
| 94 |
+
void BN_with_flags(BIGNUM *dest, const BIGNUM *b, int flags);
|
| 95 |
+
|
| 96 |
+
/* Wrapper function to make using BN_GENCB easier */
|
| 97 |
+
int BN_GENCB_call(BN_GENCB *cb, int a, int b);
|
| 98 |
+
|
| 99 |
+
BN_GENCB *BN_GENCB_new(void);
|
| 100 |
+
void BN_GENCB_free(BN_GENCB *cb);
|
| 101 |
+
|
| 102 |
+
/* Populate a BN_GENCB structure with an "old"-style callback */
|
| 103 |
+
void BN_GENCB_set_old(BN_GENCB *gencb, void (*callback)(int, int, void *),
|
| 104 |
+
void *cb_arg);
|
| 105 |
+
|
| 106 |
+
/* Populate a BN_GENCB structure with a "new"-style callback */
|
| 107 |
+
void BN_GENCB_set(BN_GENCB *gencb, int (*callback)(int, int, BN_GENCB *),
|
| 108 |
+
void *cb_arg);
|
| 109 |
+
|
| 110 |
+
void *BN_GENCB_get_arg(BN_GENCB *cb);
|
| 111 |
+
|
| 112 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 113 |
+
#define BN_prime_checks 0 /* default: select number of iterations based \
|
| 114 |
+
* on the size of the number */
|
| 115 |
+
|
| 116 |
+
/*
|
| 117 |
+
* BN_prime_checks_for_size() returns the number of Miller-Rabin iterations
|
| 118 |
+
* that will be done for checking that a random number is probably prime. The
|
| 119 |
+
* error rate for accepting a composite number as prime depends on the size of
|
| 120 |
+
* the prime |b|. The error rates used are for calculating an RSA key with 2 primes,
|
| 121 |
+
* and so the level is what you would expect for a key of double the size of the
|
| 122 |
+
* prime.
|
| 123 |
+
*
|
| 124 |
+
* This table is generated using the algorithm of FIPS PUB 186-4
|
| 125 |
+
* Digital Signature Standard (DSS), section F.1, page 117.
|
| 126 |
+
* (https://dx.doi.org/10.6028/NIST.FIPS.186-4)
|
| 127 |
+
*
|
| 128 |
+
* The following magma script was used to generate the output:
|
| 129 |
+
* securitybits:=125;
|
| 130 |
+
* k:=1024;
|
| 131 |
+
* for t:=1 to 65 do
|
| 132 |
+
* for M:=3 to Floor(2*Sqrt(k-1)-1) do
|
| 133 |
+
* S:=0;
|
| 134 |
+
* // Sum over m
|
| 135 |
+
* for m:=3 to M do
|
| 136 |
+
* s:=0;
|
| 137 |
+
* // Sum over j
|
| 138 |
+
* for j:=2 to m do
|
| 139 |
+
* s+:=(RealField(32)!2)^-(j+(k-1)/j);
|
| 140 |
+
* end for;
|
| 141 |
+
* S+:=2^(m-(m-1)*t)*s;
|
| 142 |
+
* end for;
|
| 143 |
+
* A:=2^(k-2-M*t);
|
| 144 |
+
* B:=8*(Pi(RealField(32))^2-6)/3*2^(k-2)*S;
|
| 145 |
+
* pkt:=2.00743*Log(2)*k*2^-k*(A+B);
|
| 146 |
+
* seclevel:=Floor(-Log(2,pkt));
|
| 147 |
+
* if seclevel ge securitybits then
|
| 148 |
+
* printf "k: %5o, security: %o bits (t: %o, M: %o)\n",k,seclevel,t,M;
|
| 149 |
+
* break;
|
| 150 |
+
* end if;
|
| 151 |
+
* end for;
|
| 152 |
+
* if seclevel ge securitybits then break; end if;
|
| 153 |
+
* end for;
|
| 154 |
+
*
|
| 155 |
+
* It can be run online at:
|
| 156 |
+
* http://magma.maths.usyd.edu.au/calc
|
| 157 |
+
*
|
| 158 |
+
* And will output:
|
| 159 |
+
* k: 1024, security: 129 bits (t: 6, M: 23)
|
| 160 |
+
*
|
| 161 |
+
* k is the number of bits of the prime, securitybits is the level we want to
|
| 162 |
+
* reach.
|
| 163 |
+
*
|
| 164 |
+
* prime length | RSA key size | # MR tests | security level
|
| 165 |
+
* -------------+--------------|------------+---------------
|
| 166 |
+
* (b) >= 6394 | >= 12788 | 3 | 256 bit
|
| 167 |
+
* (b) >= 3747 | >= 7494 | 3 | 192 bit
|
| 168 |
+
* (b) >= 1345 | >= 2690 | 4 | 128 bit
|
| 169 |
+
* (b) >= 1080 | >= 2160 | 5 | 128 bit
|
| 170 |
+
* (b) >= 852 | >= 1704 | 5 | 112 bit
|
| 171 |
+
* (b) >= 476 | >= 952 | 5 | 80 bit
|
| 172 |
+
* (b) >= 400 | >= 800 | 6 | 80 bit
|
| 173 |
+
* (b) >= 347 | >= 694 | 7 | 80 bit
|
| 174 |
+
* (b) >= 308 | >= 616 | 8 | 80 bit
|
| 175 |
+
* (b) >= 55 | >= 110 | 27 | 64 bit
|
| 176 |
+
* (b) >= 6 | >= 12 | 34 | 64 bit
|
| 177 |
+
*/
|
| 178 |
+
|
| 179 |
+
#define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : (b) >= 1345 ? 4 \
|
| 180 |
+
: (b) >= 476 ? 5 \
|
| 181 |
+
: (b) >= 400 ? 6 \
|
| 182 |
+
: (b) >= 347 ? 7 \
|
| 183 |
+
: (b) >= 308 ? 8 \
|
| 184 |
+
: (b) >= 55 ? 27 \
|
| 185 |
+
: /* b >= 6 */ 34)
|
| 186 |
+
#endif
|
| 187 |
+
|
| 188 |
+
#define BN_num_bytes(a) ((BN_num_bits(a) + 7) / 8)
|
| 189 |
+
|
| 190 |
+
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 191 |
+
int BN_is_zero(const BIGNUM *a);
|
| 192 |
+
int BN_is_one(const BIGNUM *a);
|
| 193 |
+
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 194 |
+
int BN_is_odd(const BIGNUM *a);
|
| 195 |
+
|
| 196 |
+
#define BN_one(a) (BN_set_word((a), 1))
|
| 197 |
+
|
| 198 |
+
void BN_zero_ex(BIGNUM *a);
|
| 199 |
+
|
| 200 |
+
#if OPENSSL_API_LEVEL > 908
|
| 201 |
+
#define BN_zero(a) BN_zero_ex(a)
|
| 202 |
+
#else
|
| 203 |
+
#define BN_zero(a) (BN_set_word((a), 0))
|
| 204 |
+
#endif
|
| 205 |
+
|
| 206 |
+
const BIGNUM *BN_value_one(void);
|
| 207 |
+
char *BN_options(void);
|
| 208 |
+
BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
|
| 209 |
+
BN_CTX *BN_CTX_new(void);
|
| 210 |
+
BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
|
| 211 |
+
BN_CTX *BN_CTX_secure_new(void);
|
| 212 |
+
void BN_CTX_free(BN_CTX *c);
|
| 213 |
+
void BN_CTX_start(BN_CTX *ctx);
|
| 214 |
+
BIGNUM *BN_CTX_get(BN_CTX *ctx);
|
| 215 |
+
void BN_CTX_end(BN_CTX *ctx);
|
| 216 |
+
int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 217 |
+
unsigned int strength, BN_CTX *ctx);
|
| 218 |
+
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 219 |
+
int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 220 |
+
unsigned int strength, BN_CTX *ctx);
|
| 221 |
+
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 222 |
+
int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
|
| 223 |
+
BN_CTX *ctx);
|
| 224 |
+
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 225 |
+
int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
|
| 226 |
+
unsigned int strength, BN_CTX *ctx);
|
| 227 |
+
int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 228 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 229 |
+
OSSL_DEPRECATEDIN_3_0
|
| 230 |
+
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 231 |
+
OSSL_DEPRECATEDIN_3_0
|
| 232 |
+
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 233 |
+
#endif
|
| 234 |
+
int BN_num_bits(const BIGNUM *a);
|
| 235 |
+
int BN_num_bits_word(BN_ULONG l);
|
| 236 |
+
int BN_security_bits(int L, int N);
|
| 237 |
+
BIGNUM *BN_new(void);
|
| 238 |
+
BIGNUM *BN_secure_new(void);
|
| 239 |
+
void BN_clear_free(BIGNUM *a);
|
| 240 |
+
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
| 241 |
+
void BN_swap(BIGNUM *a, BIGNUM *b);
|
| 242 |
+
BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 243 |
+
BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 244 |
+
int BN_bn2bin(const BIGNUM *a, unsigned char *to);
|
| 245 |
+
int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 246 |
+
int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);
|
| 247 |
+
BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 248 |
+
BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 249 |
+
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 250 |
+
int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);
|
| 251 |
+
BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 252 |
+
BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 253 |
+
int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 254 |
+
int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);
|
| 255 |
+
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 256 |
+
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
| 257 |
+
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 258 |
+
int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 259 |
+
int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 260 |
+
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 261 |
+
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 262 |
+
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
|
| 263 |
+
/** BN_set_negative sets sign of a BIGNUM
|
| 264 |
+
* \param b pointer to the BIGNUM object
|
| 265 |
+
* \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
|
| 266 |
+
*/
|
| 267 |
+
void BN_set_negative(BIGNUM *b, int n);
|
| 268 |
+
/** BN_is_negative returns 1 if the BIGNUM is negative
|
| 269 |
+
* \param b pointer to the BIGNUM object
|
| 270 |
+
* \return 1 if a < 0 and 0 otherwise
|
| 271 |
+
*/
|
| 272 |
+
int BN_is_negative(const BIGNUM *b);
|
| 273 |
+
|
| 274 |
+
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
| 275 |
+
BN_CTX *ctx);
|
| 276 |
+
#define BN_mod(rem, m, d, ctx) BN_div(NULL, (rem), (m), (d), (ctx))
|
| 277 |
+
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
|
| 278 |
+
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 279 |
+
BN_CTX *ctx);
|
| 280 |
+
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 281 |
+
const BIGNUM *m);
|
| 282 |
+
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 283 |
+
BN_CTX *ctx);
|
| 284 |
+
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 285 |
+
const BIGNUM *m);
|
| 286 |
+
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 287 |
+
BN_CTX *ctx);
|
| 288 |
+
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 289 |
+
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 290 |
+
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
|
| 291 |
+
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
|
| 292 |
+
BN_CTX *ctx);
|
| 293 |
+
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
|
| 294 |
+
|
| 295 |
+
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
| 296 |
+
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
|
| 297 |
+
int BN_mul_word(BIGNUM *a, BN_ULONG w);
|
| 298 |
+
int BN_add_word(BIGNUM *a, BN_ULONG w);
|
| 299 |
+
int BN_sub_word(BIGNUM *a, BN_ULONG w);
|
| 300 |
+
int BN_set_word(BIGNUM *a, BN_ULONG w);
|
| 301 |
+
BN_ULONG BN_get_word(const BIGNUM *a);
|
| 302 |
+
|
| 303 |
+
int BN_cmp(const BIGNUM *a, const BIGNUM *b);
|
| 304 |
+
void BN_free(BIGNUM *a);
|
| 305 |
+
int BN_is_bit_set(const BIGNUM *a, int n);
|
| 306 |
+
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 307 |
+
int BN_lshift1(BIGNUM *r, const BIGNUM *a);
|
| 308 |
+
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 309 |
+
|
| 310 |
+
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 311 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 312 |
+
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 313 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 314 |
+
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
| 315 |
+
const BIGNUM *m, BN_CTX *ctx,
|
| 316 |
+
BN_MONT_CTX *in_mont);
|
| 317 |
+
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
| 318 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 319 |
+
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
| 320 |
+
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
| 321 |
+
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 322 |
+
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 323 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 324 |
+
int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
|
| 325 |
+
const BIGNUM *m1, BN_MONT_CTX *in_mont1,
|
| 326 |
+
BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
|
| 327 |
+
const BIGNUM *m2, BN_MONT_CTX *in_mont2,
|
| 328 |
+
BN_CTX *ctx);
|
| 329 |
+
|
| 330 |
+
int BN_mask_bits(BIGNUM *a, int n);
|
| 331 |
+
#ifndef OPENSSL_NO_STDIO
|
| 332 |
+
int BN_print_fp(FILE *fp, const BIGNUM *a);
|
| 333 |
+
#endif
|
| 334 |
+
int BN_print(BIO *bio, const BIGNUM *a);
|
| 335 |
+
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
|
| 336 |
+
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 337 |
+
int BN_rshift1(BIGNUM *r, const BIGNUM *a);
|
| 338 |
+
void BN_clear(BIGNUM *a);
|
| 339 |
+
BIGNUM *BN_dup(const BIGNUM *a);
|
| 340 |
+
int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
|
| 341 |
+
int BN_set_bit(BIGNUM *a, int n);
|
| 342 |
+
int BN_clear_bit(BIGNUM *a, int n);
|
| 343 |
+
char *BN_bn2hex(const BIGNUM *a);
|
| 344 |
+
char *BN_bn2dec(const BIGNUM *a);
|
| 345 |
+
int BN_hex2bn(BIGNUM **a, const char *str);
|
| 346 |
+
int BN_dec2bn(BIGNUM **a, const char *str);
|
| 347 |
+
int BN_asc2bn(BIGNUM **a, const char *str);
|
| 348 |
+
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 349 |
+
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
|
| 350 |
+
* -2 for
|
| 351 |
+
* error */
|
| 352 |
+
int BN_are_coprime(BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 353 |
+
BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
| 354 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 355 |
+
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
| 356 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 357 |
+
|
| 358 |
+
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
| 359 |
+
|
| 360 |
+
/* Deprecated versions */
|
| 361 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 362 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 363 |
+
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
| 364 |
+
const BIGNUM *add, const BIGNUM *rem,
|
| 365 |
+
void (*callback)(int, int, void *),
|
| 366 |
+
void *cb_arg);
|
| 367 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 368 |
+
int BN_is_prime(const BIGNUM *p, int nchecks,
|
| 369 |
+
void (*callback)(int, int, void *),
|
| 370 |
+
BN_CTX *ctx, void *cb_arg);
|
| 371 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 372 |
+
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
| 373 |
+
void (*callback)(int, int, void *),
|
| 374 |
+
BN_CTX *ctx, void *cb_arg,
|
| 375 |
+
int do_trial_division);
|
| 376 |
+
#endif
|
| 377 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 378 |
+
OSSL_DEPRECATEDIN_3_0
|
| 379 |
+
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
| 380 |
+
OSSL_DEPRECATEDIN_3_0
|
| 381 |
+
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
| 382 |
+
int do_trial_division, BN_GENCB *cb);
|
| 383 |
+
#endif
|
| 384 |
+
/* Newer versions */
|
| 385 |
+
int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
| 386 |
+
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
|
| 387 |
+
BN_CTX *ctx);
|
| 388 |
+
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
| 389 |
+
const BIGNUM *rem, BN_GENCB *cb);
|
| 390 |
+
int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
|
| 391 |
+
|
| 392 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 393 |
+
OSSL_DEPRECATEDIN_3_0
|
| 394 |
+
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
| 395 |
+
|
| 396 |
+
OSSL_DEPRECATEDIN_3_0
|
| 397 |
+
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
| 398 |
+
const BIGNUM *Xp, const BIGNUM *Xp1,
|
| 399 |
+
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
| 400 |
+
BN_GENCB *cb);
|
| 401 |
+
OSSL_DEPRECATEDIN_3_0
|
| 402 |
+
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
|
| 403 |
+
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
| 404 |
+
BN_CTX *ctx, BN_GENCB *cb);
|
| 405 |
+
#endif
|
| 406 |
+
|
| 407 |
+
BN_MONT_CTX *BN_MONT_CTX_new(void);
|
| 408 |
+
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 409 |
+
BN_MONT_CTX *mont, BN_CTX *ctx);
|
| 410 |
+
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 411 |
+
BN_CTX *ctx);
|
| 412 |
+
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 413 |
+
BN_CTX *ctx);
|
| 414 |
+
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
| 415 |
+
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
|
| 416 |
+
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
| 417 |
+
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
|
| 418 |
+
const BIGNUM *mod, BN_CTX *ctx);
|
| 419 |
+
|
| 420 |
+
/* BN_BLINDING flags */
|
| 421 |
+
#define BN_BLINDING_NO_UPDATE 0x00000001
|
| 422 |
+
#define BN_BLINDING_NO_RECREATE 0x00000002
|
| 423 |
+
|
| 424 |
+
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
|
| 425 |
+
void BN_BLINDING_free(BN_BLINDING *b);
|
| 426 |
+
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
|
| 427 |
+
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 428 |
+
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 429 |
+
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
| 430 |
+
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
| 431 |
+
BN_CTX *);
|
| 432 |
+
|
| 433 |
+
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
|
| 434 |
+
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
|
| 435 |
+
int BN_BLINDING_lock(BN_BLINDING *b);
|
| 436 |
+
int BN_BLINDING_unlock(BN_BLINDING *b);
|
| 437 |
+
|
| 438 |
+
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
| 439 |
+
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
| 440 |
+
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
| 441 |
+
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
| 442 |
+
int (*bn_mod_exp)(BIGNUM *r,
|
| 443 |
+
const BIGNUM *a,
|
| 444 |
+
const BIGNUM *p,
|
| 445 |
+
const BIGNUM *m,
|
| 446 |
+
BN_CTX *ctx,
|
| 447 |
+
BN_MONT_CTX *m_ctx),
|
| 448 |
+
BN_MONT_CTX *m_ctx);
|
| 449 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 450 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 451 |
+
void BN_set_params(int mul, int high, int low, int mont);
|
| 452 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 453 |
+
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
| 454 |
+
#endif
|
| 455 |
+
|
| 456 |
+
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
| 457 |
+
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
|
| 458 |
+
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
|
| 459 |
+
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
|
| 460 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 461 |
+
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 462 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 463 |
+
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
| 464 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 465 |
+
|
| 466 |
+
#ifndef OPENSSL_NO_EC2M
|
| 467 |
+
|
| 468 |
+
/*
|
| 469 |
+
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
|
| 470 |
+
* The BIGNUM::neg property of BIGNUMs representing binary polynomials is
|
| 471 |
+
* ignored. Note that input arguments are not const so that their bit arrays
|
| 472 |
+
* can be expanded to the appropriate size if needed.
|
| 473 |
+
*/
|
| 474 |
+
|
| 475 |
+
/*
|
| 476 |
+
* r = a + b
|
| 477 |
+
*/
|
| 478 |
+
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 479 |
+
#define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
| 480 |
+
/*
|
| 481 |
+
* r=a mod p
|
| 482 |
+
*/
|
| 483 |
+
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
|
| 484 |
+
/* r = (a * b) mod p */
|
| 485 |
+
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 486 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 487 |
+
/* r = (a * a) mod p */
|
| 488 |
+
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 489 |
+
/* r = (1 / b) mod p */
|
| 490 |
+
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
|
| 491 |
+
/* r = (a / b) mod p */
|
| 492 |
+
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 493 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 494 |
+
/* r = (a ^ b) mod p */
|
| 495 |
+
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 496 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 497 |
+
/* r = sqrt(a) mod p */
|
| 498 |
+
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 499 |
+
BN_CTX *ctx);
|
| 500 |
+
/* r^2 + r = a mod p */
|
| 501 |
+
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 502 |
+
BN_CTX *ctx);
|
| 503 |
+
#define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
| 504 |
+
/*-
|
| 505 |
+
* Some functions allow for representation of the irreducible polynomials
|
| 506 |
+
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
|
| 507 |
+
* t^p[0] + t^p[1] + ... + t^p[k]
|
| 508 |
+
* where m = p[0] > p[1] > ... > p[k] = 0.
|
| 509 |
+
*/
|
| 510 |
+
/* r = a mod p */
|
| 511 |
+
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
|
| 512 |
+
/* r = (a * b) mod p */
|
| 513 |
+
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 514 |
+
const int p[], BN_CTX *ctx);
|
| 515 |
+
/* r = (a * a) mod p */
|
| 516 |
+
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
|
| 517 |
+
BN_CTX *ctx);
|
| 518 |
+
/* r = (1 / b) mod p */
|
| 519 |
+
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
|
| 520 |
+
BN_CTX *ctx);
|
| 521 |
+
/* r = (a / b) mod p */
|
| 522 |
+
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 523 |
+
const int p[], BN_CTX *ctx);
|
| 524 |
+
/* r = (a ^ b) mod p */
|
| 525 |
+
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 526 |
+
const int p[], BN_CTX *ctx);
|
| 527 |
+
/* r = sqrt(a) mod p */
|
| 528 |
+
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
|
| 529 |
+
const int p[], BN_CTX *ctx);
|
| 530 |
+
/* r^2 + r = a mod p */
|
| 531 |
+
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
|
| 532 |
+
const int p[], BN_CTX *ctx);
|
| 533 |
+
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
|
| 534 |
+
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
|
| 535 |
+
|
| 536 |
+
#endif
|
| 537 |
+
|
| 538 |
+
/*
|
| 539 |
+
* faster mod functions for the 'NIST primes' 0 <= a < p^2
|
| 540 |
+
*/
|
| 541 |
+
int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 542 |
+
int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 543 |
+
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 544 |
+
int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 545 |
+
int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 546 |
+
|
| 547 |
+
const BIGNUM *BN_get0_nist_prime_192(void);
|
| 548 |
+
const BIGNUM *BN_get0_nist_prime_224(void);
|
| 549 |
+
const BIGNUM *BN_get0_nist_prime_256(void);
|
| 550 |
+
const BIGNUM *BN_get0_nist_prime_384(void);
|
| 551 |
+
const BIGNUM *BN_get0_nist_prime_521(void);
|
| 552 |
+
|
| 553 |
+
int (*BN_nist_mod_func(const BIGNUM *p))(BIGNUM *r, const BIGNUM *a,
|
| 554 |
+
const BIGNUM *field, BN_CTX *ctx);
|
| 555 |
+
|
| 556 |
+
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
|
| 557 |
+
const BIGNUM *priv, const unsigned char *message,
|
| 558 |
+
size_t message_len, BN_CTX *ctx);
|
| 559 |
+
|
| 560 |
+
/* Primes from RFC 2409 */
|
| 561 |
+
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
|
| 562 |
+
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
|
| 563 |
+
|
| 564 |
+
/* Primes from RFC 3526 */
|
| 565 |
+
BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
|
| 566 |
+
BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
|
| 567 |
+
BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
|
| 568 |
+
BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
|
| 569 |
+
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
|
| 570 |
+
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
|
| 571 |
+
|
| 572 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 573 |
+
#define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
| 574 |
+
#define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
| 575 |
+
#define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
| 576 |
+
#define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
|
| 577 |
+
#define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
|
| 578 |
+
#define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
|
| 579 |
+
#define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
|
| 580 |
+
#define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
|
| 581 |
+
#endif
|
| 582 |
+
|
| 583 |
+
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 584 |
+
|
| 585 |
+
#ifdef __cplusplus
|
| 586 |
+
}
|
| 587 |
+
#endif
|
| 588 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/bnerr.h
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BNERR_H
|
| 12 |
+
#define OPENSSL_BNERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BN reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define BN_R_ARG2_LT_ARG3 100
|
| 23 |
+
#define BN_R_BAD_RECIPROCAL 101
|
| 24 |
+
#define BN_R_BIGNUM_TOO_LONG 114
|
| 25 |
+
#define BN_R_BITS_TOO_SMALL 118
|
| 26 |
+
#define BN_R_CALLED_WITH_EVEN_MODULUS 102
|
| 27 |
+
#define BN_R_DIV_BY_ZERO 103
|
| 28 |
+
#define BN_R_ENCODING_ERROR 104
|
| 29 |
+
#define BN_R_EXPAND_ON_STATIC_BIGNUM_DATA 105
|
| 30 |
+
#define BN_R_INPUT_NOT_REDUCED 110
|
| 31 |
+
#define BN_R_INVALID_LENGTH 106
|
| 32 |
+
#define BN_R_INVALID_RANGE 115
|
| 33 |
+
#define BN_R_INVALID_SHIFT 119
|
| 34 |
+
#define BN_R_NOT_A_SQUARE 111
|
| 35 |
+
#define BN_R_NOT_INITIALIZED 107
|
| 36 |
+
#define BN_R_NO_INVERSE 108
|
| 37 |
+
#define BN_R_NO_PRIME_CANDIDATE 121
|
| 38 |
+
#define BN_R_NO_SOLUTION 116
|
| 39 |
+
#define BN_R_NO_SUITABLE_DIGEST 120
|
| 40 |
+
#define BN_R_PRIVATE_KEY_TOO_LARGE 117
|
| 41 |
+
#define BN_R_P_IS_NOT_PRIME 112
|
| 42 |
+
#define BN_R_TOO_MANY_ITERATIONS 113
|
| 43 |
+
#define BN_R_TOO_MANY_TEMPORARY_VARIABLES 109
|
| 44 |
+
|
| 45 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/buffer.h
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BUFFER_H
|
| 11 |
+
#define OPENSSL_BUFFER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_BUFFER_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/types.h>
|
| 20 |
+
#ifndef OPENSSL_CRYPTO_H
|
| 21 |
+
#include <openssl/crypto.h>
|
| 22 |
+
#endif
|
| 23 |
+
#include <openssl/buffererr.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
#include <stddef.h>
|
| 30 |
+
#include <sys/types.h>
|
| 31 |
+
|
| 32 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 33 |
+
#define BUF_strdup(s) OPENSSL_strdup(s)
|
| 34 |
+
#define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
| 35 |
+
#define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
| 36 |
+
#define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
| 37 |
+
#define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
| 38 |
+
#define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
struct buf_mem_st {
|
| 42 |
+
size_t length; /* current number of bytes */
|
| 43 |
+
char *data;
|
| 44 |
+
size_t max; /* size of buffer */
|
| 45 |
+
unsigned long flags;
|
| 46 |
+
};
|
| 47 |
+
|
| 48 |
+
#define BUF_MEM_FLAG_SECURE 0x01
|
| 49 |
+
|
| 50 |
+
BUF_MEM *BUF_MEM_new(void);
|
| 51 |
+
BUF_MEM *BUF_MEM_new_ex(unsigned long flags);
|
| 52 |
+
void BUF_MEM_free(BUF_MEM *a);
|
| 53 |
+
size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
|
| 54 |
+
size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
|
| 55 |
+
void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
|
| 56 |
+
|
| 57 |
+
#ifdef __cplusplus
|
| 58 |
+
}
|
| 59 |
+
#endif
|
| 60 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/buffererr.h
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_BUFFERERR_H
|
| 12 |
+
#define OPENSSL_BUFFERERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* BUF reason codes.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/byteorder.h
AD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
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_BYTEORDER_H
|
| 11 |
+
#define OPENSSL_BYTEORDER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/e_os2.h>
|
| 15 |
+
#include <string.h>
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* "Modern" compilers do a decent job of optimising these functions to just a
|
| 19 |
+
* couple of instruction ([swap +] store, or load [+ swap]) when either no
|
| 20 |
+
* swapping is required, or a suitable swap instruction is available.
|
| 21 |
+
*/
|
| 22 |
+
|
| 23 |
+
#if defined(_MSC_VER) && _MSC_VER >= 1300
|
| 24 |
+
#include <stdlib.h>
|
| 25 |
+
#pragma intrinsic(_byteswap_ushort)
|
| 26 |
+
#pragma intrinsic(_byteswap_ulong)
|
| 27 |
+
#pragma intrinsic(_byteswap_uint64)
|
| 28 |
+
#define OSSL_HTOBE16(x) _byteswap_ushort(x)
|
| 29 |
+
#define OSSL_HTOBE32(x) _byteswap_ulong(x)
|
| 30 |
+
#define OSSL_HTOBE64(x) _byteswap_uint64(x)
|
| 31 |
+
#define OSSL_BE16TOH(x) _byteswap_ushort(x)
|
| 32 |
+
#define OSSL_BE32TOH(x) _byteswap_ulong(x)
|
| 33 |
+
#define OSSL_BE64TOH(x) _byteswap_uint64(x)
|
| 34 |
+
#define OSSL_HTOLE16(x) (x)
|
| 35 |
+
#define OSSL_HTOLE32(x) (x)
|
| 36 |
+
#define OSSL_HTOLE64(x) (x)
|
| 37 |
+
#define OSSL_LE16TOH(x) (x)
|
| 38 |
+
#define OSSL_LE32TOH(x) (x)
|
| 39 |
+
#define OSSL_LE64TOH(x) (x)
|
| 40 |
+
|
| 41 |
+
#elif defined(__GLIBC__) && defined(__GLIBC_PREREQ)
|
| 42 |
+
#if (__GLIBC_PREREQ(2, 19)) && defined(_DEFAULT_SOURCE)
|
| 43 |
+
#include <endian.h>
|
| 44 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 45 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 46 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 47 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 48 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 49 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 50 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 51 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 52 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 53 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 54 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 55 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
| 59 |
+
#if defined(__OpenBSD__)
|
| 60 |
+
#include <sys/types.h>
|
| 61 |
+
#else
|
| 62 |
+
#include <sys/endian.h>
|
| 63 |
+
#endif
|
| 64 |
+
#define OSSL_HTOBE16(x) htobe16(x)
|
| 65 |
+
#define OSSL_HTOBE32(x) htobe32(x)
|
| 66 |
+
#define OSSL_HTOBE64(x) htobe64(x)
|
| 67 |
+
#define OSSL_BE16TOH(x) be16toh(x)
|
| 68 |
+
#define OSSL_BE32TOH(x) be32toh(x)
|
| 69 |
+
#define OSSL_BE64TOH(x) be64toh(x)
|
| 70 |
+
#define OSSL_HTOLE16(x) htole16(x)
|
| 71 |
+
#define OSSL_HTOLE32(x) htole32(x)
|
| 72 |
+
#define OSSL_HTOLE64(x) htole64(x)
|
| 73 |
+
#define OSSL_LE16TOH(x) le16toh(x)
|
| 74 |
+
#define OSSL_LE32TOH(x) le32toh(x)
|
| 75 |
+
#define OSSL_LE64TOH(x) le64toh(x)
|
| 76 |
+
|
| 77 |
+
#elif defined(__APPLE__)
|
| 78 |
+
#include <libkern/OSByteOrder.h>
|
| 79 |
+
#define OSSL_HTOBE16(x) OSSwapHostToBigInt16(x)
|
| 80 |
+
#define OSSL_HTOBE32(x) OSSwapHostToBigInt32(x)
|
| 81 |
+
#define OSSL_HTOBE64(x) OSSwapHostToBigInt64(x)
|
| 82 |
+
#define OSSL_BE16TOH(x) OSSwapBigToHostInt16(x)
|
| 83 |
+
#define OSSL_BE32TOH(x) OSSwapBigToHostInt32(x)
|
| 84 |
+
#define OSSL_BE64TOH(x) OSSwapBigToHostInt64(x)
|
| 85 |
+
#define OSSL_HTOLE16(x) OSSwapHostToLittleInt16(x)
|
| 86 |
+
#define OSSL_HTOLE32(x) OSSwapHostToLittleInt32(x)
|
| 87 |
+
#define OSSL_HTOLE64(x) OSSwapHostToLittleInt64(x)
|
| 88 |
+
#define OSSL_LE16TOH(x) OSSwapLittleToHostInt16(x)
|
| 89 |
+
#define OSSL_LE32TOH(x) OSSwapLittleToHostInt32(x)
|
| 90 |
+
#define OSSL_LE64TOH(x) OSSwapLittleToHostInt64(x)
|
| 91 |
+
|
| 92 |
+
#endif
|
| 93 |
+
|
| 94 |
+
static ossl_inline ossl_unused unsigned char *
|
| 95 |
+
OPENSSL_store_u16_le(unsigned char *out, uint16_t val)
|
| 96 |
+
{
|
| 97 |
+
#ifdef OSSL_HTOLE16
|
| 98 |
+
uint16_t t = OSSL_HTOLE16(val);
|
| 99 |
+
|
| 100 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 101 |
+
return out + 2;
|
| 102 |
+
#else
|
| 103 |
+
*out++ = (val & 0xff);
|
| 104 |
+
*out++ = (val >> 8) & 0xff;
|
| 105 |
+
return out;
|
| 106 |
+
#endif
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
static ossl_inline ossl_unused unsigned char *
|
| 110 |
+
OPENSSL_store_u16_be(unsigned char *out, uint16_t val)
|
| 111 |
+
{
|
| 112 |
+
#ifdef OSSL_HTOBE16
|
| 113 |
+
uint16_t t = OSSL_HTOBE16(val);
|
| 114 |
+
|
| 115 |
+
memcpy(out, (unsigned char *)&t, 2);
|
| 116 |
+
return out + 2;
|
| 117 |
+
#else
|
| 118 |
+
*out++ = (val >> 8) & 0xff;
|
| 119 |
+
*out++ = (val & 0xff);
|
| 120 |
+
return out;
|
| 121 |
+
#endif
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
static ossl_inline ossl_unused unsigned char *
|
| 125 |
+
OPENSSL_store_u32_le(unsigned char *out, uint32_t val)
|
| 126 |
+
{
|
| 127 |
+
#ifdef OSSL_HTOLE32
|
| 128 |
+
uint32_t t = OSSL_HTOLE32(val);
|
| 129 |
+
|
| 130 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 131 |
+
return out + 4;
|
| 132 |
+
#else
|
| 133 |
+
*out++ = (val & 0xff);
|
| 134 |
+
*out++ = (val >> 8) & 0xff;
|
| 135 |
+
*out++ = (val >> 16) & 0xff;
|
| 136 |
+
*out++ = (val >> 24) & 0xff;
|
| 137 |
+
return out;
|
| 138 |
+
#endif
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
static ossl_inline ossl_unused unsigned char *
|
| 142 |
+
OPENSSL_store_u32_be(unsigned char *out, uint32_t val)
|
| 143 |
+
{
|
| 144 |
+
#ifdef OSSL_HTOBE32
|
| 145 |
+
uint32_t t = OSSL_HTOBE32(val);
|
| 146 |
+
|
| 147 |
+
memcpy(out, (unsigned char *)&t, 4);
|
| 148 |
+
return out + 4;
|
| 149 |
+
#else
|
| 150 |
+
*out++ = (val >> 24) & 0xff;
|
| 151 |
+
*out++ = (val >> 16) & 0xff;
|
| 152 |
+
*out++ = (val >> 8) & 0xff;
|
| 153 |
+
*out++ = (val & 0xff);
|
| 154 |
+
return out;
|
| 155 |
+
#endif
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
static ossl_inline ossl_unused unsigned char *
|
| 159 |
+
OPENSSL_store_u64_le(unsigned char *out, uint64_t val)
|
| 160 |
+
{
|
| 161 |
+
#ifdef OSSL_HTOLE64
|
| 162 |
+
uint64_t t = OSSL_HTOLE64(val);
|
| 163 |
+
|
| 164 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 165 |
+
return out + 8;
|
| 166 |
+
#else
|
| 167 |
+
*out++ = (val & 0xff);
|
| 168 |
+
*out++ = (val >> 8) & 0xff;
|
| 169 |
+
*out++ = (val >> 16) & 0xff;
|
| 170 |
+
*out++ = (val >> 24) & 0xff;
|
| 171 |
+
*out++ = (val >> 32) & 0xff;
|
| 172 |
+
*out++ = (val >> 40) & 0xff;
|
| 173 |
+
*out++ = (val >> 48) & 0xff;
|
| 174 |
+
*out++ = (val >> 56) & 0xff;
|
| 175 |
+
return out;
|
| 176 |
+
#endif
|
| 177 |
+
}
|
| 178 |
+
|
| 179 |
+
static ossl_inline ossl_unused unsigned char *
|
| 180 |
+
OPENSSL_store_u64_be(unsigned char *out, uint64_t val)
|
| 181 |
+
{
|
| 182 |
+
#ifdef OSSL_HTOLE64
|
| 183 |
+
uint64_t t = OSSL_HTOBE64(val);
|
| 184 |
+
|
| 185 |
+
memcpy(out, (unsigned char *)&t, 8);
|
| 186 |
+
return out + 8;
|
| 187 |
+
#else
|
| 188 |
+
*out++ = (val >> 56) & 0xff;
|
| 189 |
+
*out++ = (val >> 48) & 0xff;
|
| 190 |
+
*out++ = (val >> 40) & 0xff;
|
| 191 |
+
*out++ = (val >> 32) & 0xff;
|
| 192 |
+
*out++ = (val >> 24) & 0xff;
|
| 193 |
+
*out++ = (val >> 16) & 0xff;
|
| 194 |
+
*out++ = (val >> 8) & 0xff;
|
| 195 |
+
*out++ = (val & 0xff);
|
| 196 |
+
return out;
|
| 197 |
+
#endif
|
| 198 |
+
}
|
| 199 |
+
|
| 200 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 201 |
+
OPENSSL_load_u16_le(uint16_t *val, const unsigned char *in)
|
| 202 |
+
{
|
| 203 |
+
#ifdef OSSL_LE16TOH
|
| 204 |
+
uint16_t t;
|
| 205 |
+
|
| 206 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 207 |
+
*val = OSSL_LE16TOH(t);
|
| 208 |
+
return in + 2;
|
| 209 |
+
#else
|
| 210 |
+
uint16_t b0 = *in++;
|
| 211 |
+
uint16_t b1 = *in++;
|
| 212 |
+
|
| 213 |
+
*val = b0 | (b1 << 8);
|
| 214 |
+
return in;
|
| 215 |
+
#endif
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 219 |
+
OPENSSL_load_u16_be(uint16_t *val, const unsigned char *in)
|
| 220 |
+
{
|
| 221 |
+
#ifdef OSSL_LE16TOH
|
| 222 |
+
uint16_t t;
|
| 223 |
+
|
| 224 |
+
memcpy((unsigned char *)&t, in, 2);
|
| 225 |
+
*val = OSSL_BE16TOH(t);
|
| 226 |
+
return in + 2;
|
| 227 |
+
#else
|
| 228 |
+
uint16_t b1 = *in++;
|
| 229 |
+
uint16_t b0 = *in++;
|
| 230 |
+
|
| 231 |
+
*val = b0 | (b1 << 8);
|
| 232 |
+
return in;
|
| 233 |
+
#endif
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 237 |
+
OPENSSL_load_u32_le(uint32_t *val, const unsigned char *in)
|
| 238 |
+
{
|
| 239 |
+
#ifdef OSSL_LE32TOH
|
| 240 |
+
uint32_t t;
|
| 241 |
+
|
| 242 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 243 |
+
*val = OSSL_LE32TOH(t);
|
| 244 |
+
return in + 4;
|
| 245 |
+
#else
|
| 246 |
+
uint32_t b0 = *in++;
|
| 247 |
+
uint32_t b1 = *in++;
|
| 248 |
+
uint32_t b2 = *in++;
|
| 249 |
+
uint32_t b3 = *in++;
|
| 250 |
+
|
| 251 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 252 |
+
return in;
|
| 253 |
+
#endif
|
| 254 |
+
}
|
| 255 |
+
|
| 256 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 257 |
+
OPENSSL_load_u32_be(uint32_t *val, const unsigned char *in)
|
| 258 |
+
{
|
| 259 |
+
#ifdef OSSL_LE32TOH
|
| 260 |
+
uint32_t t;
|
| 261 |
+
|
| 262 |
+
memcpy((unsigned char *)&t, in, 4);
|
| 263 |
+
*val = OSSL_BE32TOH(t);
|
| 264 |
+
return in + 4;
|
| 265 |
+
#else
|
| 266 |
+
uint32_t b3 = *in++;
|
| 267 |
+
uint32_t b2 = *in++;
|
| 268 |
+
uint32_t b1 = *in++;
|
| 269 |
+
uint32_t b0 = *in++;
|
| 270 |
+
|
| 271 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24);
|
| 272 |
+
return in;
|
| 273 |
+
#endif
|
| 274 |
+
}
|
| 275 |
+
|
| 276 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 277 |
+
OPENSSL_load_u64_le(uint64_t *val, const unsigned char *in)
|
| 278 |
+
{
|
| 279 |
+
#ifdef OSSL_LE64TOH
|
| 280 |
+
uint64_t t;
|
| 281 |
+
|
| 282 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 283 |
+
*val = OSSL_LE64TOH(t);
|
| 284 |
+
return in + 8;
|
| 285 |
+
#else
|
| 286 |
+
uint64_t b0 = *in++;
|
| 287 |
+
uint64_t b1 = *in++;
|
| 288 |
+
uint64_t b2 = *in++;
|
| 289 |
+
uint64_t b3 = *in++;
|
| 290 |
+
uint64_t b4 = *in++;
|
| 291 |
+
uint64_t b5 = *in++;
|
| 292 |
+
uint64_t b6 = *in++;
|
| 293 |
+
uint64_t b7 = *in++;
|
| 294 |
+
|
| 295 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 296 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 297 |
+
return in;
|
| 298 |
+
#endif
|
| 299 |
+
}
|
| 300 |
+
|
| 301 |
+
static ossl_inline ossl_unused const unsigned char *
|
| 302 |
+
OPENSSL_load_u64_be(uint64_t *val, const unsigned char *in)
|
| 303 |
+
{
|
| 304 |
+
#ifdef OSSL_LE64TOH
|
| 305 |
+
uint64_t t;
|
| 306 |
+
|
| 307 |
+
memcpy((unsigned char *)&t, in, 8);
|
| 308 |
+
*val = OSSL_BE64TOH(t);
|
| 309 |
+
return in + 8;
|
| 310 |
+
#else
|
| 311 |
+
uint64_t b7 = *in++;
|
| 312 |
+
uint64_t b6 = *in++;
|
| 313 |
+
uint64_t b5 = *in++;
|
| 314 |
+
uint64_t b4 = *in++;
|
| 315 |
+
uint64_t b3 = *in++;
|
| 316 |
+
uint64_t b2 = *in++;
|
| 317 |
+
uint64_t b1 = *in++;
|
| 318 |
+
uint64_t b0 = *in++;
|
| 319 |
+
|
| 320 |
+
*val = b0 | (b1 << 8) | (b2 << 16) | (b3 << 24)
|
| 321 |
+
| (b4 << 32) | (b5 << 40) | (b6 << 48) | (b7 << 56);
|
| 322 |
+
return in;
|
| 323 |
+
#endif
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
#undef OSSL_HTOBE16
|
| 327 |
+
#undef OSSL_HTOBE32
|
| 328 |
+
#undef OSSL_HTOBE64
|
| 329 |
+
#undef OSSL_BE16TOH
|
| 330 |
+
#undef OSSL_BE32TOH
|
| 331 |
+
#undef OSSL_BE64TOH
|
| 332 |
+
#undef OSSL_HTOLE16
|
| 333 |
+
#undef OSSL_HTOLE32
|
| 334 |
+
#undef OSSL_HTOLE64
|
| 335 |
+
#undef OSSL_LE16TOH
|
| 336 |
+
#undef OSSL_LE32TOH
|
| 337 |
+
#undef OSSL_LE64TOH
|
| 338 |
+
|
| 339 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/camellia.h
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CAMELLIA_H
|
| 11 |
+
#define OPENSSL_CAMELLIA_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAMELLIA_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAMELLIA
|
| 22 |
+
#include <stddef.h>
|
| 23 |
+
#ifdef __cplusplus
|
| 24 |
+
extern "C" {
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#define CAMELLIA_BLOCK_SIZE 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAMELLIA_ENCRYPT 1
|
| 32 |
+
#define CAMELLIA_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Because array size can't be a const in C, the following two are macros.
|
| 36 |
+
* Both sizes are in bytes.
|
| 37 |
+
*/
|
| 38 |
+
|
| 39 |
+
/* This should be a hidden type, but EVP requires that the size be known */
|
| 40 |
+
|
| 41 |
+
#define CAMELLIA_TABLE_BYTE_LEN 272
|
| 42 |
+
#define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
| 43 |
+
|
| 44 |
+
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
|
| 45 |
+
* with WORD */
|
| 46 |
+
|
| 47 |
+
struct camellia_key_st {
|
| 48 |
+
union {
|
| 49 |
+
double d; /* ensures 64-bit align */
|
| 50 |
+
KEY_TABLE_TYPE rd_key;
|
| 51 |
+
} u;
|
| 52 |
+
int grand_rounds;
|
| 53 |
+
};
|
| 54 |
+
typedef struct camellia_key_st CAMELLIA_KEY;
|
| 55 |
+
|
| 56 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 57 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey,
|
| 59 |
+
const int bits,
|
| 60 |
+
CAMELLIA_KEY *key);
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in,
|
| 62 |
+
unsigned char *out,
|
| 63 |
+
const CAMELLIA_KEY *key);
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in,
|
| 65 |
+
unsigned char *out,
|
| 66 |
+
const CAMELLIA_KEY *key);
|
| 67 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in,
|
| 68 |
+
unsigned char *out,
|
| 69 |
+
const CAMELLIA_KEY *key,
|
| 70 |
+
const int enc);
|
| 71 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in,
|
| 72 |
+
unsigned char *out,
|
| 73 |
+
size_t length,
|
| 74 |
+
const CAMELLIA_KEY *key,
|
| 75 |
+
unsigned char *ivec,
|
| 76 |
+
const int enc);
|
| 77 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in,
|
| 78 |
+
unsigned char *out,
|
| 79 |
+
size_t length,
|
| 80 |
+
const CAMELLIA_KEY *key,
|
| 81 |
+
unsigned char *ivec,
|
| 82 |
+
int *num,
|
| 83 |
+
const int enc);
|
| 84 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in,
|
| 85 |
+
unsigned char *out,
|
| 86 |
+
size_t length,
|
| 87 |
+
const CAMELLIA_KEY *key,
|
| 88 |
+
unsigned char *ivec,
|
| 89 |
+
int *num,
|
| 90 |
+
const int enc);
|
| 91 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in,
|
| 92 |
+
unsigned char *out,
|
| 93 |
+
size_t length,
|
| 94 |
+
const CAMELLIA_KEY *key,
|
| 95 |
+
unsigned char *ivec,
|
| 96 |
+
int *num,
|
| 97 |
+
const int enc);
|
| 98 |
+
OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in,
|
| 99 |
+
unsigned char *out,
|
| 100 |
+
size_t length,
|
| 101 |
+
const CAMELLIA_KEY *key,
|
| 102 |
+
unsigned char *ivec,
|
| 103 |
+
int *num);
|
| 104 |
+
OSSL_DEPRECATEDIN_3_0
|
| 105 |
+
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
| 106 |
+
size_t length, const CAMELLIA_KEY *key,
|
| 107 |
+
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
| 108 |
+
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
| 109 |
+
unsigned int *num);
|
| 110 |
+
#endif
|
| 111 |
+
|
| 112 |
+
#ifdef __cplusplus
|
| 113 |
+
}
|
| 114 |
+
#endif
|
| 115 |
+
#endif
|
| 116 |
+
|
| 117 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cast.h
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CAST_H
|
| 11 |
+
#define OPENSSL_CAST_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CAST_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_CAST
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#define CAST_BLOCK 8
|
| 27 |
+
#define CAST_KEY_LENGTH 16
|
| 28 |
+
|
| 29 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
|
| 31 |
+
#define CAST_ENCRYPT 1
|
| 32 |
+
#define CAST_DECRYPT 0
|
| 33 |
+
|
| 34 |
+
#define CAST_LONG unsigned int
|
| 35 |
+
|
| 36 |
+
typedef struct cast_key_st {
|
| 37 |
+
CAST_LONG data[32];
|
| 38 |
+
int short_key; /* Use reduced rounds for short key */
|
| 39 |
+
} CAST_KEY;
|
| 40 |
+
|
| 41 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 42 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 43 |
+
OSSL_DEPRECATEDIN_3_0
|
| 44 |
+
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
| 45 |
+
OSSL_DEPRECATEDIN_3_0
|
| 46 |
+
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
| 47 |
+
const CAST_KEY *key, int enc);
|
| 48 |
+
OSSL_DEPRECATEDIN_3_0
|
| 49 |
+
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0
|
| 51 |
+
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0
|
| 53 |
+
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
| 54 |
+
long length, const CAST_KEY *ks, unsigned char *iv,
|
| 55 |
+
int enc);
|
| 56 |
+
OSSL_DEPRECATEDIN_3_0
|
| 57 |
+
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 58 |
+
long length, const CAST_KEY *schedule,
|
| 59 |
+
unsigned char *ivec, int *num, int enc);
|
| 60 |
+
OSSL_DEPRECATEDIN_3_0
|
| 61 |
+
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 62 |
+
long length, const CAST_KEY *schedule,
|
| 63 |
+
unsigned char *ivec, int *num);
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
#ifdef __cplusplus
|
| 67 |
+
}
|
| 68 |
+
#endif
|
| 69 |
+
#endif
|
| 70 |
+
|
| 71 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cmac.h
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CMAC_H
|
| 11 |
+
#define OPENSSL_CMAC_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CMAC_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMAC
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/evp.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 28 |
+
/* Opaque */
|
| 29 |
+
typedef struct CMAC_CTX_st CMAC_CTX;
|
| 30 |
+
#endif
|
| 31 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 32 |
+
OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void);
|
| 33 |
+
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx);
|
| 34 |
+
OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx);
|
| 35 |
+
OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
|
| 36 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
|
| 37 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx,
|
| 38 |
+
const void *key, size_t keylen,
|
| 39 |
+
const EVP_CIPHER *cipher, ENGINE *impl);
|
| 40 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx,
|
| 41 |
+
const void *data, size_t dlen);
|
| 42 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx,
|
| 43 |
+
unsigned char *out, size_t *poutlen);
|
| 44 |
+
OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx);
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
#ifdef __cplusplus
|
| 48 |
+
}
|
| 49 |
+
#endif
|
| 50 |
+
|
| 51 |
+
#endif
|
| 52 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cmp.h
ADDED
|
@@ -0,0 +1,741 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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emens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
/* clang-format off */
|
| 16 |
+
|
| 17 |
+
/* clang-format on */
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_CMP_H
|
| 20 |
+
#define OPENSSL_CMP_H
|
| 21 |
+
|
| 22 |
+
#include <openssl/opensslconf.h>
|
| 23 |
+
#ifndef OPENSSL_NO_CMP
|
| 24 |
+
|
| 25 |
+
#include <openssl/crmf.h>
|
| 26 |
+
#include <openssl/cmperr.h>
|
| 27 |
+
#include <openssl/cmp_util.h>
|
| 28 |
+
#include <openssl/http.h>
|
| 29 |
+
|
| 30 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 31 |
+
#include <openssl/types.h>
|
| 32 |
+
#include <openssl/safestack.h>
|
| 33 |
+
#include <openssl/x509.h>
|
| 34 |
+
#include <openssl/x509v3.h>
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
#define OSSL_CMP_PVNO_2 2
|
| 41 |
+
#define OSSL_CMP_PVNO_3 3
|
| 42 |
+
#define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
| 43 |
+
|
| 44 |
+
/*-
|
| 45 |
+
* PKIFailureInfo ::= BIT STRING {
|
| 46 |
+
* -- since we can fail in more than one way!
|
| 47 |
+
* -- More codes may be added in the future if/when required.
|
| 48 |
+
* badAlg (0),
|
| 49 |
+
* -- unrecognized or unsupported Algorithm Identifier
|
| 50 |
+
* badMessageCheck (1),
|
| 51 |
+
* -- integrity check failed (e.g., signature did not verify)
|
| 52 |
+
* badRequest (2),
|
| 53 |
+
* -- transaction not permitted or supported
|
| 54 |
+
* badTime (3),
|
| 55 |
+
* -- messageTime was not sufficiently close to the system time,
|
| 56 |
+
* -- as defined by local policy
|
| 57 |
+
* badCertId (4),
|
| 58 |
+
* -- no certificate could be found matching the provided criteria
|
| 59 |
+
* badDataFormat (5),
|
| 60 |
+
* -- the data submitted has the wrong format
|
| 61 |
+
* wrongAuthority (6),
|
| 62 |
+
* -- the authority indicated in the request is different from the
|
| 63 |
+
* -- one creating the response token
|
| 64 |
+
* incorrectData (7),
|
| 65 |
+
* -- the requester's data is incorrect (for notary services)
|
| 66 |
+
* missingTimeStamp (8),
|
| 67 |
+
* -- when the timestamp is missing but should be there
|
| 68 |
+
* -- (by policy)
|
| 69 |
+
* badPOP (9),
|
| 70 |
+
* -- the proof-of-possession failed
|
| 71 |
+
* certRevoked (10),
|
| 72 |
+
* -- the certificate has already been revoked
|
| 73 |
+
* certConfirmed (11),
|
| 74 |
+
* -- the certificate has already been confirmed
|
| 75 |
+
* wrongIntegrity (12),
|
| 76 |
+
* -- invalid integrity, password based instead of signature or
|
| 77 |
+
* -- vice versa
|
| 78 |
+
* badRecipientNonce (13),
|
| 79 |
+
* -- invalid recipient nonce, either missing or wrong value
|
| 80 |
+
* timeNotAvailable (14),
|
| 81 |
+
* -- the TSA's time source is not available
|
| 82 |
+
* unacceptedPolicy (15),
|
| 83 |
+
* -- the requested TSA policy is not supported by the TSA.
|
| 84 |
+
* unacceptedExtension (16),
|
| 85 |
+
* -- the requested extension is not supported by the TSA.
|
| 86 |
+
* addInfoNotAvailable (17),
|
| 87 |
+
* -- the additional information requested could not be
|
| 88 |
+
* -- understood or is not available
|
| 89 |
+
* badSenderNonce (18),
|
| 90 |
+
* -- invalid sender nonce, either missing or wrong size
|
| 91 |
+
* badCertTemplate (19),
|
| 92 |
+
* -- invalid cert. template or missing mandatory information
|
| 93 |
+
* signerNotTrusted (20),
|
| 94 |
+
* -- signer of the message unknown or not trusted
|
| 95 |
+
* transactionIdInUse (21),
|
| 96 |
+
* -- the transaction identifier is already in use
|
| 97 |
+
* unsupportedVersion (22),
|
| 98 |
+
* -- the version of the message is not supported
|
| 99 |
+
* notAuthorized (23),
|
| 100 |
+
* -- the sender was not authorized to make the preceding
|
| 101 |
+
* -- request or perform the preceding action
|
| 102 |
+
* systemUnavail (24),
|
| 103 |
+
* -- the request cannot be handled due to system unavailability
|
| 104 |
+
* systemFailure (25),
|
| 105 |
+
* -- the request cannot be handled due to system failure
|
| 106 |
+
* duplicateCertReq (26)
|
| 107 |
+
* -- certificate cannot be issued because a duplicate
|
| 108 |
+
* -- certificate already exists
|
| 109 |
+
* }
|
| 110 |
+
*/
|
| 111 |
+
#define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
| 112 |
+
#define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
| 113 |
+
#define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
| 114 |
+
#define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
| 115 |
+
#define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
| 116 |
+
#define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
| 117 |
+
#define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
| 118 |
+
#define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
| 119 |
+
#define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
| 120 |
+
#define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
| 121 |
+
#define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
| 122 |
+
#define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
| 123 |
+
#define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
| 124 |
+
#define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
| 125 |
+
#define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
| 126 |
+
#define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
| 127 |
+
#define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
| 128 |
+
#define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
| 129 |
+
#define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
| 130 |
+
#define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
| 131 |
+
#define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
| 132 |
+
#define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
| 133 |
+
#define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
| 134 |
+
#define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
| 135 |
+
#define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
| 136 |
+
#define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
| 137 |
+
#define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
| 138 |
+
#define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
| 139 |
+
#define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
| 140 |
+
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
| 141 |
+
#if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
| 142 |
+
#error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
| 143 |
+
#endif
|
| 144 |
+
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
| 145 |
+
|
| 146 |
+
#define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
| 147 |
+
#define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
| 148 |
+
#define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
| 149 |
+
#define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
| 150 |
+
#define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
| 151 |
+
#define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
| 152 |
+
#define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
| 153 |
+
#define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
| 154 |
+
#define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
| 155 |
+
#define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
| 156 |
+
#define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
| 157 |
+
#define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
| 158 |
+
#define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
| 159 |
+
#define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
| 160 |
+
#define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
| 161 |
+
#define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
| 162 |
+
#define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
| 163 |
+
#define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
| 164 |
+
#define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
| 165 |
+
#define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
| 166 |
+
#define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
| 167 |
+
#define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
| 168 |
+
#define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
| 169 |
+
#define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
| 170 |
+
#define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
| 171 |
+
#define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
| 172 |
+
#define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
| 173 |
+
|
| 174 |
+
/*-
|
| 175 |
+
* PKIStatus ::= INTEGER {
|
| 176 |
+
* accepted (0),
|
| 177 |
+
* -- you got exactly what you asked for
|
| 178 |
+
* grantedWithMods (1),
|
| 179 |
+
* -- you got something like what you asked for; the
|
| 180 |
+
* -- requester is responsible for ascertaining the differences
|
| 181 |
+
* rejection (2),
|
| 182 |
+
* -- you don't get it, more information elsewhere in the message
|
| 183 |
+
* waiting (3),
|
| 184 |
+
* -- the request body part has not yet been processed; expect to
|
| 185 |
+
* -- hear more later (note: proper handling of this status
|
| 186 |
+
* -- response MAY use the polling req/rep PKIMessages specified
|
| 187 |
+
* -- in Section 5.3.22; alternatively, polling in the underlying
|
| 188 |
+
* -- transport layer MAY have some utility in this regard)
|
| 189 |
+
* revocationWarning (4),
|
| 190 |
+
* -- this message contains a warning that a revocation is
|
| 191 |
+
* -- imminent
|
| 192 |
+
* revocationNotification (5),
|
| 193 |
+
* -- notification that a revocation has occurred
|
| 194 |
+
* keyUpdateWarning (6)
|
| 195 |
+
* -- update already done for the oldCertId specified in
|
| 196 |
+
* -- CertReqMsg
|
| 197 |
+
* }
|
| 198 |
+
*/
|
| 199 |
+
#define OSSL_CMP_PKISTATUS_rejected_by_client -5
|
| 200 |
+
#define OSSL_CMP_PKISTATUS_checking_response -4
|
| 201 |
+
#define OSSL_CMP_PKISTATUS_request -3
|
| 202 |
+
#define OSSL_CMP_PKISTATUS_trans -2
|
| 203 |
+
#define OSSL_CMP_PKISTATUS_unspecified -1
|
| 204 |
+
#define OSSL_CMP_PKISTATUS_accepted 0
|
| 205 |
+
#define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
| 206 |
+
#define OSSL_CMP_PKISTATUS_rejection 2
|
| 207 |
+
#define OSSL_CMP_PKISTATUS_waiting 3
|
| 208 |
+
#define OSSL_CMP_PKISTATUS_revocationWarning 4
|
| 209 |
+
#define OSSL_CMP_PKISTATUS_revocationNotification 5
|
| 210 |
+
#define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
| 211 |
+
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
| 212 |
+
|
| 213 |
+
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
| 214 |
+
|
| 215 |
+
#define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
| 216 |
+
#define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
| 217 |
+
|
| 218 |
+
/* data type declarations */
|
| 219 |
+
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
| 220 |
+
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
| 221 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
| 222 |
+
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
| 223 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
| 224 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
| 225 |
+
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
| 226 |
+
/* clang-format off */
|
| 227 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
| 228 |
+
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 229 |
+
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
| 230 |
+
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 231 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
| 232 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)))
|
| 233 |
+
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
| 234 |
+
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 235 |
+
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 236 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete(sk, i) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (i)))
|
| 237 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 238 |
+
#define sk_OSSL_CMP_CERTSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 239 |
+
#define sk_OSSL_CMP_CERTSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 240 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 241 |
+
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 242 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
| 243 |
+
#define sk_OSSL_CMP_CERTSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), (idx))
|
| 244 |
+
#define sk_OSSL_CMP_CERTSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 245 |
+
#define sk_OSSL_CMP_CERTSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 246 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 247 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), pnum)
|
| 248 |
+
#define sk_OSSL_CMP_CERTSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 249 |
+
#define sk_OSSL_CMP_CERTSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 250 |
+
#define sk_OSSL_CMP_CERTSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 251 |
+
#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)))
|
| 252 |
+
#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)))
|
| 253 |
+
|
| 254 |
+
/* clang-format on */
|
| 255 |
+
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
| 256 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
| 257 |
+
/* clang-format off */
|
| 258 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
| 259 |
+
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 260 |
+
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
| 261 |
+
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 262 |
+
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
| 263 |
+
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)))
|
| 264 |
+
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
| 265 |
+
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 266 |
+
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 267 |
+
#define sk_OSSL_CMP_ITAV_delete(sk, i) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (i)))
|
| 268 |
+
#define sk_OSSL_CMP_ITAV_delete_ptr(sk, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 269 |
+
#define sk_OSSL_CMP_ITAV_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 270 |
+
#define sk_OSSL_CMP_ITAV_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 271 |
+
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 272 |
+
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 273 |
+
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
| 274 |
+
#define sk_OSSL_CMP_ITAV_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), (idx))
|
| 275 |
+
#define sk_OSSL_CMP_ITAV_set(sk, idx, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_set(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (idx), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 276 |
+
#define sk_OSSL_CMP_ITAV_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 277 |
+
#define sk_OSSL_CMP_ITAV_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 278 |
+
#define sk_OSSL_CMP_ITAV_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), pnum)
|
| 279 |
+
#define sk_OSSL_CMP_ITAV_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 280 |
+
#define sk_OSSL_CMP_ITAV_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 281 |
+
#define sk_OSSL_CMP_ITAV_dup(sk) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk)))
|
| 282 |
+
#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)))
|
| 283 |
+
#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)))
|
| 284 |
+
|
| 285 |
+
/* clang-format on */
|
| 286 |
+
|
| 287 |
+
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
| 288 |
+
/* clang-format off */
|
| 289 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
| 290 |
+
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 291 |
+
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
| 292 |
+
#define sk_OSSL_CMP_CRLSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 293 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_null() ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_null())
|
| 294 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp), (n)))
|
| 295 |
+
#define sk_OSSL_CMP_CRLSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (n))
|
| 296 |
+
#define sk_OSSL_CMP_CRLSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 297 |
+
#define sk_OSSL_CMP_CRLSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 298 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete(sk, i) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (i)))
|
| 299 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 300 |
+
#define sk_OSSL_CMP_CRLSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 301 |
+
#define sk_OSSL_CMP_CRLSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 302 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 303 |
+
#define sk_OSSL_CMP_CRLSTATUS_shift(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 304 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc))
|
| 305 |
+
#define sk_OSSL_CMP_CRLSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), (idx))
|
| 306 |
+
#define sk_OSSL_CMP_CRLSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 307 |
+
#define sk_OSSL_CMP_CRLSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 308 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 309 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), pnum)
|
| 310 |
+
#define sk_OSSL_CMP_CRLSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 311 |
+
#define sk_OSSL_CMP_CRLSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 312 |
+
#define sk_OSSL_CMP_CRLSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 313 |
+
#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)))
|
| 314 |
+
#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)))
|
| 315 |
+
|
| 316 |
+
/* clang-format on */
|
| 317 |
+
|
| 318 |
+
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
| 319 |
+
#define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
| 320 |
+
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
| 321 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
| 322 |
+
#define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
| 323 |
+
#define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
| 324 |
+
#define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
| 325 |
+
#define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
| 326 |
+
#define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
| 327 |
+
|
| 328 |
+
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
| 329 |
+
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
| 330 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
| 331 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
| 332 |
+
/* clang-format off */
|
| 333 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
| 334 |
+
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 335 |
+
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
| 336 |
+
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 337 |
+
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
| 338 |
+
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)))
|
| 339 |
+
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
| 340 |
+
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 341 |
+
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 342 |
+
#define sk_OSSL_CMP_PKISI_delete(sk, i) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (i)))
|
| 343 |
+
#define sk_OSSL_CMP_PKISI_delete_ptr(sk, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 344 |
+
#define sk_OSSL_CMP_PKISI_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 345 |
+
#define sk_OSSL_CMP_PKISI_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 346 |
+
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 347 |
+
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 348 |
+
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
| 349 |
+
#define sk_OSSL_CMP_PKISI_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), (idx))
|
| 350 |
+
#define sk_OSSL_CMP_PKISI_set(sk, idx, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_set(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (idx), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 351 |
+
#define sk_OSSL_CMP_PKISI_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 352 |
+
#define sk_OSSL_CMP_PKISI_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 353 |
+
#define sk_OSSL_CMP_PKISI_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), pnum)
|
| 354 |
+
#define sk_OSSL_CMP_PKISI_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 355 |
+
#define sk_OSSL_CMP_PKISI_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 356 |
+
#define sk_OSSL_CMP_PKISI_dup(sk) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk)))
|
| 357 |
+
#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)))
|
| 358 |
+
#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)))
|
| 359 |
+
|
| 360 |
+
/* clang-format on */
|
| 361 |
+
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
| 362 |
+
/* clang-format off */
|
| 363 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
| 364 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 365 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
| 366 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 367 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
| 368 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)))
|
| 369 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
| 370 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 371 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 372 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete(sk, i) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (i)))
|
| 373 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 374 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 375 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 376 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 377 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 378 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
| 379 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), (idx))
|
| 380 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set(sk, idx, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 381 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 382 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 383 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), pnum)
|
| 384 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 385 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 386 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_dup(sk) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 387 |
+
#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)))
|
| 388 |
+
#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)))
|
| 389 |
+
|
| 390 |
+
/* clang-format on */
|
| 391 |
+
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
| 392 |
+
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
| 393 |
+
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
| 394 |
+
/* clang-format off */
|
| 395 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
| 396 |
+
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 397 |
+
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
| 398 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 399 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
| 400 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)))
|
| 401 |
+
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
| 402 |
+
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 403 |
+
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 404 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete(sk, i) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (i)))
|
| 405 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 406 |
+
#define sk_OSSL_CMP_CERTRESPONSE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 407 |
+
#define sk_OSSL_CMP_CERTRESPONSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 408 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 409 |
+
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 410 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
| 411 |
+
#define sk_OSSL_CMP_CERTRESPONSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), (idx))
|
| 412 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set(sk, idx, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 413 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 414 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 415 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), pnum)
|
| 416 |
+
#define sk_OSSL_CMP_CERTRESPONSE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 417 |
+
#define sk_OSSL_CMP_CERTRESPONSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 418 |
+
#define sk_OSSL_CMP_CERTRESPONSE_dup(sk) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 419 |
+
#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)))
|
| 420 |
+
#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)))
|
| 421 |
+
|
| 422 |
+
/* clang-format on */
|
| 423 |
+
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
| 424 |
+
|
| 425 |
+
/*
|
| 426 |
+
* function DECLARATIONS
|
| 427 |
+
*/
|
| 428 |
+
|
| 429 |
+
/* from cmp_asn.c */
|
| 430 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 431 |
+
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
| 432 |
+
ASN1_TYPE *value);
|
| 433 |
+
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
| 434 |
+
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
| 435 |
+
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
| 436 |
+
OSSL_CMP_ITAV *itav);
|
| 437 |
+
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
| 438 |
+
|
| 439 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
| 440 |
+
*certProfile);
|
| 441 |
+
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
| 442 |
+
STACK_OF(ASN1_UTF8STRING) **out);
|
| 443 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
| 444 |
+
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
| 445 |
+
|
| 446 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
| 447 |
+
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
| 448 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
| 449 |
+
const X509 *newWithOld,
|
| 450 |
+
const X509 *oldWithNew);
|
| 451 |
+
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
| 452 |
+
X509 **newWithNew,
|
| 453 |
+
X509 **newWithOld,
|
| 454 |
+
X509 **oldWithNew);
|
| 455 |
+
|
| 456 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
| 457 |
+
const X509 *cert, int only_DN);
|
| 458 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
| 459 |
+
const GENERAL_NAMES *issuer,
|
| 460 |
+
const ASN1_TIME *thisUpdate);
|
| 461 |
+
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
| 462 |
+
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
| 463 |
+
ASN1_TIME **thisUpdate);
|
| 464 |
+
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
| 465 |
+
OSSL_CMP_ITAV
|
| 466 |
+
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
| 467 |
+
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
| 468 |
+
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
| 469 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
| 470 |
+
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
| 471 |
+
OSSL_CMP_ITAV
|
| 472 |
+
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
| 473 |
+
OSSL_CMP_ATAVS *keySpec);
|
| 474 |
+
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
| 475 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 476 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 477 |
+
|
| 478 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 479 |
+
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
| 480 |
+
ASN1_TYPE *value);
|
| 481 |
+
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
| 482 |
+
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
| 483 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
| 484 |
+
X509_ALGOR *OSSL_CMP_ATAV_get0_algId(const OSSL_CMP_ATAV *atav);
|
| 485 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_rsaKeyLen(int len);
|
| 486 |
+
int OSSL_CMP_ATAV_get_rsaKeyLen(const OSSL_CMP_ATAV *atav);
|
| 487 |
+
int OSSL_CMP_ATAV_push1(OSSL_CMP_ATAVS **sk_p, const OSSL_CMP_ATAV *atav);
|
| 488 |
+
|
| 489 |
+
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
| 490 |
+
|
| 491 |
+
/* from cmp_ctx.c */
|
| 492 |
+
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 493 |
+
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
| 494 |
+
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
| 495 |
+
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
| 496 |
+
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
| 497 |
+
/* CMP general options: */
|
| 498 |
+
#define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
| 499 |
+
/* CMP transfer options: */
|
| 500 |
+
#define OSSL_CMP_OPT_KEEP_ALIVE 10
|
| 501 |
+
#define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
| 502 |
+
#define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
| 503 |
+
#define OSSL_CMP_OPT_USE_TLS 13
|
| 504 |
+
/* CMP request options: */
|
| 505 |
+
#define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
| 506 |
+
#define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
| 507 |
+
#define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
| 508 |
+
#define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
| 509 |
+
#define OSSL_CMP_OPT_POPO_METHOD 24
|
| 510 |
+
#define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
| 511 |
+
#define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
| 512 |
+
#define OSSL_CMP_OPT_REVOCATION_REASON 27
|
| 513 |
+
/* CMP protection options: */
|
| 514 |
+
#define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
| 515 |
+
#define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
| 516 |
+
#define OSSL_CMP_OPT_OWF_ALGNID 32
|
| 517 |
+
#define OSSL_CMP_OPT_MAC_ALGNID 33
|
| 518 |
+
#define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
| 519 |
+
#define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
| 520 |
+
#define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
| 521 |
+
#define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
| 522 |
+
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
| 523 |
+
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
| 524 |
+
/* CMP-specific callback for logging and outputting the error queue: */
|
| 525 |
+
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
| 526 |
+
#define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
| 527 |
+
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
| 528 |
+
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
| 529 |
+
/* message transfer: */
|
| 530 |
+
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
| 531 |
+
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
| 532 |
+
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
| 533 |
+
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
| 534 |
+
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
| 535 |
+
#ifndef OPENSSL_NO_HTTP
|
| 536 |
+
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
| 537 |
+
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 538 |
+
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 539 |
+
#endif
|
| 540 |
+
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t)(OSSL_CMP_CTX *ctx,
|
| 541 |
+
const OSSL_CMP_MSG *req);
|
| 542 |
+
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
| 543 |
+
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 544 |
+
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 545 |
+
/* server authentication: */
|
| 546 |
+
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 547 |
+
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 548 |
+
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
| 549 |
+
#define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
| 550 |
+
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
| 551 |
+
#define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
| 552 |
+
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
| 553 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
| 554 |
+
/* client authentication: */
|
| 555 |
+
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 556 |
+
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
| 557 |
+
STACK_OF(X509) *candidates);
|
| 558 |
+
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
| 559 |
+
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
| 560 |
+
const unsigned char *ref, int len);
|
| 561 |
+
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
| 562 |
+
const unsigned char *sec, int len);
|
| 563 |
+
/* CMP message header and extra certificates: */
|
| 564 |
+
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 565 |
+
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 566 |
+
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
| 567 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 568 |
+
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
| 569 |
+
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
| 570 |
+
STACK_OF(X509) *extraCertsOut);
|
| 571 |
+
/* certificate template: */
|
| 572 |
+
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
| 573 |
+
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
| 574 |
+
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 575 |
+
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
| 576 |
+
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 577 |
+
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
| 578 |
+
const GENERAL_NAME *name);
|
| 579 |
+
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
| 580 |
+
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
| 581 |
+
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
| 582 |
+
int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 583 |
+
int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
| 584 |
+
/* misc body contents: */
|
| 585 |
+
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 586 |
+
/* certificate confirmation: */
|
| 587 |
+
typedef int (*OSSL_CMP_certConf_cb_t)(OSSL_CMP_CTX *ctx, X509 *cert,
|
| 588 |
+
int fail_info, const char **txt);
|
| 589 |
+
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
| 590 |
+
const char **text);
|
| 591 |
+
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
| 592 |
+
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 593 |
+
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 594 |
+
/* result fetching: */
|
| 595 |
+
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
| 596 |
+
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
| 597 |
+
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
| 598 |
+
#define OSSL_CMP_PKISI_BUFLEN 1024
|
| 599 |
+
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
| 600 |
+
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
| 601 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
| 602 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
| 603 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
| 604 |
+
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
| 605 |
+
const ASN1_OCTET_STRING *id);
|
| 606 |
+
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
| 607 |
+
const ASN1_OCTET_STRING *nonce);
|
| 608 |
+
|
| 609 |
+
/* from cmp_status.c */
|
| 610 |
+
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
| 611 |
+
size_t bufsize);
|
| 612 |
+
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
| 613 |
+
char *buf, size_t bufsize);
|
| 614 |
+
OSSL_CMP_PKISI *
|
| 615 |
+
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
| 616 |
+
|
| 617 |
+
/* from cmp_hdr.c */
|
| 618 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
|
| 619 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
| 620 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 621 |
+
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
| 622 |
+
|
| 623 |
+
/* from cmp_msg.c */
|
| 624 |
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
| 625 |
+
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
| 626 |
+
X509_PUBKEY *OSSL_CMP_MSG_get0_certreq_publickey(const OSSL_CMP_MSG *msg);
|
| 627 |
+
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 628 |
+
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 629 |
+
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
| 630 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
| 631 |
+
const char *propq);
|
| 632 |
+
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
| 633 |
+
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
| 634 |
+
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
| 635 |
+
|
| 636 |
+
/* from cmp_vfy.c */
|
| 637 |
+
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
| 638 |
+
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
| 639 |
+
X509_STORE *trusted_store, X509 *cert);
|
| 640 |
+
|
| 641 |
+
/* from cmp_http.c */
|
| 642 |
+
#ifndef OPENSSL_NO_HTTP
|
| 643 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
| 644 |
+
const OSSL_CMP_MSG *req);
|
| 645 |
+
#endif
|
| 646 |
+
|
| 647 |
+
/* from cmp_server.c */
|
| 648 |
+
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
| 649 |
+
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 650 |
+
const OSSL_CMP_MSG *req);
|
| 651 |
+
OSSL_CMP_MSG *OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
| 652 |
+
const OSSL_CMP_MSG *req);
|
| 653 |
+
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 654 |
+
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
| 655 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
| 656 |
+
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
| 657 |
+
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
| 658 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 659 |
+
const OSSL_CMP_MSG *req,
|
| 660 |
+
const X509_NAME *issuer,
|
| 661 |
+
const ASN1_INTEGER *serial);
|
| 662 |
+
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 663 |
+
const OSSL_CMP_MSG *req,
|
| 664 |
+
const STACK_OF(OSSL_CMP_ITAV) *in,
|
| 665 |
+
STACK_OF(OSSL_CMP_ITAV) **out);
|
| 666 |
+
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 667 |
+
const OSSL_CMP_MSG *req,
|
| 668 |
+
const OSSL_CMP_PKISI *statusInfo,
|
| 669 |
+
const ASN1_INTEGER *errorCode,
|
| 670 |
+
const OSSL_CMP_PKIFREETEXT *errDetails);
|
| 671 |
+
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 672 |
+
const OSSL_CMP_MSG *req,
|
| 673 |
+
int certReqId,
|
| 674 |
+
const ASN1_OCTET_STRING *certHash,
|
| 675 |
+
const OSSL_CMP_PKISI *si);
|
| 676 |
+
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 677 |
+
const OSSL_CMP_MSG *req, int certReqId,
|
| 678 |
+
OSSL_CMP_MSG **certReq,
|
| 679 |
+
int64_t *check_after);
|
| 680 |
+
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
| 681 |
+
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
| 682 |
+
OSSL_CMP_SRV_rr_cb_t process_rr,
|
| 683 |
+
OSSL_CMP_SRV_genm_cb_t process_genm,
|
| 684 |
+
OSSL_CMP_SRV_error_cb_t process_error,
|
| 685 |
+
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
| 686 |
+
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
| 687 |
+
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 688 |
+
const OSSL_CMP_MSG *req);
|
| 689 |
+
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 690 |
+
const ASN1_OCTET_STRING *id);
|
| 691 |
+
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 692 |
+
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
| 693 |
+
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
| 694 |
+
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 695 |
+
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 696 |
+
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 697 |
+
int val);
|
| 698 |
+
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 699 |
+
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 700 |
+
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 701 |
+
int val);
|
| 702 |
+
|
| 703 |
+
/* from cmp_client.c */
|
| 704 |
+
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 705 |
+
const OSSL_CRMF_MSG *crm);
|
| 706 |
+
#define OSSL_CMP_IR 0
|
| 707 |
+
#define OSSL_CMP_CR 2
|
| 708 |
+
#define OSSL_CMP_P10CR 4
|
| 709 |
+
#define OSSL_CMP_KUR 7
|
| 710 |
+
#define OSSL_CMP_GENM 21
|
| 711 |
+
#define OSSL_CMP_ERROR 23
|
| 712 |
+
#define OSSL_CMP_exec_IR_ses(ctx) \
|
| 713 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
| 714 |
+
#define OSSL_CMP_exec_CR_ses(ctx) \
|
| 715 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
| 716 |
+
#define OSSL_CMP_exec_P10CR_ses(ctx) \
|
| 717 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
| 718 |
+
#define OSSL_CMP_exec_KUR_ses(ctx) \
|
| 719 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
| 720 |
+
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 721 |
+
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
| 722 |
+
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
| 723 |
+
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
| 724 |
+
|
| 725 |
+
/* from cmp_genm.c */
|
| 726 |
+
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
| 727 |
+
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
| 728 |
+
const X509 *oldWithOld, X509 **newWithNew,
|
| 729 |
+
X509 **newWithOld, X509 **oldWithNew);
|
| 730 |
+
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
| 731 |
+
const X509_CRL *last_crl,
|
| 732 |
+
X509_CRL **crl);
|
| 733 |
+
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
| 734 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 735 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 736 |
+
|
| 737 |
+
#ifdef __cplusplus
|
| 738 |
+
}
|
| 739 |
+
#endif
|
| 740 |
+
#endif /* !defined(OPENSSL_NO_CMP) */
|
| 741 |
+
#endif /* !defined(OPENSSL_CMP_H) */
|
micromamba_root/envs/hf_sync/Library/include/openssl/cmp_util.h
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright Nokia 2007-2019
|
| 4 |
+
* Copyright Siemens AG 2015-2019
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_CMP_UTIL_H
|
| 13 |
+
#define OPENSSL_CMP_UTIL_H
|
| 14 |
+
#pragma once
|
| 15 |
+
|
| 16 |
+
#include <openssl/opensslconf.h>
|
| 17 |
+
#ifndef OPENSSL_NO_CMP
|
| 18 |
+
|
| 19 |
+
#include <openssl/macros.h>
|
| 20 |
+
#include <openssl/trace.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
int OSSL_CMP_log_open(void);
|
| 27 |
+
void OSSL_CMP_log_close(void);
|
| 28 |
+
#define OSSL_CMP_LOG_PREFIX "CMP "
|
| 29 |
+
|
| 30 |
+
/*
|
| 31 |
+
* generalized logging/error callback mirroring the severity levels of syslog.h
|
| 32 |
+
*/
|
| 33 |
+
typedef int OSSL_CMP_severity;
|
| 34 |
+
#define OSSL_CMP_LOG_EMERG 0
|
| 35 |
+
#define OSSL_CMP_LOG_ALERT 1
|
| 36 |
+
#define OSSL_CMP_LOG_CRIT 2
|
| 37 |
+
#define OSSL_CMP_LOG_ERR 3
|
| 38 |
+
#define OSSL_CMP_LOG_WARNING 4
|
| 39 |
+
#define OSSL_CMP_LOG_NOTICE 5
|
| 40 |
+
#define OSSL_CMP_LOG_INFO 6
|
| 41 |
+
#define OSSL_CMP_LOG_DEBUG 7
|
| 42 |
+
#define OSSL_CMP_LOG_TRACE 8
|
| 43 |
+
#define OSSL_CMP_LOG_MAX OSSL_CMP_LOG_TRACE
|
| 44 |
+
typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
|
| 45 |
+
OSSL_CMP_severity level, const char *msg);
|
| 46 |
+
|
| 47 |
+
int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
|
| 48 |
+
int line, OSSL_CMP_severity level, const char *msg);
|
| 49 |
+
/* use of the logging callback for outputting error queue */
|
| 50 |
+
void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
|
| 51 |
+
|
| 52 |
+
#ifdef __cplusplus
|
| 53 |
+
}
|
| 54 |
+
#endif
|
| 55 |
+
#endif /* !defined(OPENSSL_NO_CMP) */
|
| 56 |
+
#endif /* !defined(OPENSSL_CMP_UTIL_H) */
|
micromamba_root/envs/hf_sync/Library/include/openssl/cmperr.h
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CMPERR_H
|
| 12 |
+
#define OPENSSL_CMPERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMP
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CMP reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CMP_R_ALGORITHM_NOT_SUPPORTED 139
|
| 25 |
+
#define CMP_R_BAD_CHECKAFTER_IN_POLLREP 167
|
| 26 |
+
#define CMP_R_BAD_REQUEST_ID 108
|
| 27 |
+
#define CMP_R_CERTHASH_UNMATCHED 156
|
| 28 |
+
#define CMP_R_CERTID_NOT_FOUND 109
|
| 29 |
+
#define CMP_R_CERTIFICATE_NOT_ACCEPTED 169
|
| 30 |
+
#define CMP_R_CERTIFICATE_NOT_FOUND 112
|
| 31 |
+
#define CMP_R_CERTREQMSG_NOT_FOUND 157
|
| 32 |
+
#define CMP_R_CERTRESPONSE_NOT_FOUND 113
|
| 33 |
+
#define CMP_R_CERT_AND_KEY_DO_NOT_MATCH 114
|
| 34 |
+
#define CMP_R_CHECKAFTER_OUT_OF_RANGE 181
|
| 35 |
+
#define CMP_R_ENCOUNTERED_KEYUPDATEWARNING 176
|
| 36 |
+
#define CMP_R_ENCOUNTERED_WAITING 162
|
| 37 |
+
#define CMP_R_ERROR_CALCULATING_PROTECTION 115
|
| 38 |
+
#define CMP_R_ERROR_CREATING_CERTCONF 116
|
| 39 |
+
#define CMP_R_ERROR_CREATING_CERTREP 117
|
| 40 |
+
#define CMP_R_ERROR_CREATING_CERTREQ 163
|
| 41 |
+
#define CMP_R_ERROR_CREATING_ERROR 118
|
| 42 |
+
#define CMP_R_ERROR_CREATING_GENM 119
|
| 43 |
+
#define CMP_R_ERROR_CREATING_GENP 120
|
| 44 |
+
#define CMP_R_ERROR_CREATING_PKICONF 122
|
| 45 |
+
#define CMP_R_ERROR_CREATING_POLLREP 123
|
| 46 |
+
#define CMP_R_ERROR_CREATING_POLLREQ 124
|
| 47 |
+
#define CMP_R_ERROR_CREATING_RP 125
|
| 48 |
+
#define CMP_R_ERROR_CREATING_RR 126
|
| 49 |
+
#define CMP_R_ERROR_PARSING_PKISTATUS 107
|
| 50 |
+
#define CMP_R_ERROR_PROCESSING_MESSAGE 158
|
| 51 |
+
#define CMP_R_ERROR_PROTECTING_MESSAGE 127
|
| 52 |
+
#define CMP_R_ERROR_SETTING_CERTHASH 128
|
| 53 |
+
#define CMP_R_ERROR_UNEXPECTED_CERTCONF 160
|
| 54 |
+
#define CMP_R_ERROR_VALIDATING_PROTECTION 140
|
| 55 |
+
#define CMP_R_ERROR_VALIDATING_SIGNATURE 171
|
| 56 |
+
#define CMP_R_EXPECTED_POLLREQ 104
|
| 57 |
+
#define CMP_R_FAILED_BUILDING_OWN_CHAIN 164
|
| 58 |
+
#define CMP_R_FAILED_EXTRACTING_CENTRAL_GEN_KEY 203
|
| 59 |
+
#define CMP_R_FAILED_EXTRACTING_PUBKEY 141
|
| 60 |
+
#define CMP_R_FAILURE_OBTAINING_RANDOM 110
|
| 61 |
+
#define CMP_R_FAIL_INFO_OUT_OF_RANGE 129
|
| 62 |
+
#define CMP_R_GENERATE_CERTREQTEMPLATE 197
|
| 63 |
+
#define CMP_R_GENERATE_CRLSTATUS 198
|
| 64 |
+
#define CMP_R_GETTING_GENP 192
|
| 65 |
+
#define CMP_R_GET_ITAV 199
|
| 66 |
+
#define CMP_R_INVALID_ARGS 100
|
| 67 |
+
#define CMP_R_INVALID_GENP 193
|
| 68 |
+
#define CMP_R_INVALID_KEYSPEC 202
|
| 69 |
+
#define CMP_R_INVALID_OPTION 174
|
| 70 |
+
#define CMP_R_INVALID_ROOTCAKEYUPDATE 195
|
| 71 |
+
#define CMP_R_MISSING_CENTRAL_GEN_KEY 204
|
| 72 |
+
#define CMP_R_MISSING_CERTID 165
|
| 73 |
+
#define CMP_R_MISSING_KEY_INPUT_FOR_CREATING_PROTECTION 130
|
| 74 |
+
#define CMP_R_MISSING_KEY_USAGE_DIGITALSIGNATURE 142
|
| 75 |
+
#define CMP_R_MISSING_P10CSR 121
|
| 76 |
+
#define CMP_R_MISSING_PBM_SECRET 166
|
| 77 |
+
#define CMP_R_MISSING_PRIVATE_KEY 131
|
| 78 |
+
#define CMP_R_MISSING_PRIVATE_KEY_FOR_POPO 190
|
| 79 |
+
#define CMP_R_MISSING_PROTECTION 143
|
| 80 |
+
#define CMP_R_MISSING_PUBLIC_KEY 183
|
| 81 |
+
#define CMP_R_MISSING_REFERENCE_CERT 168
|
| 82 |
+
#define CMP_R_MISSING_SECRET 178
|
| 83 |
+
#define CMP_R_MISSING_SENDER_IDENTIFICATION 111
|
| 84 |
+
#define CMP_R_MISSING_TRUST_ANCHOR 179
|
| 85 |
+
#define CMP_R_MISSING_TRUST_STORE 144
|
| 86 |
+
#define CMP_R_MULTIPLE_REQUESTS_NOT_SUPPORTED 161
|
| 87 |
+
#define CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED 170
|
| 88 |
+
#define CMP_R_MULTIPLE_SAN_SOURCES 102
|
| 89 |
+
#define CMP_R_NO_STDIO 194
|
| 90 |
+
#define CMP_R_NO_SUITABLE_SENDER_CERT 145
|
| 91 |
+
#define CMP_R_NULL_ARGUMENT 103
|
| 92 |
+
#define CMP_R_PKIBODY_ERROR 146
|
| 93 |
+
#define CMP_R_PKISTATUSINFO_NOT_FOUND 132
|
| 94 |
+
#define CMP_R_POLLING_FAILED 172
|
| 95 |
+
#define CMP_R_POTENTIALLY_INVALID_CERTIFICATE 147
|
| 96 |
+
#define CMP_R_RECEIVED_ERROR 180
|
| 97 |
+
#define CMP_R_RECIPNONCE_UNMATCHED 148
|
| 98 |
+
#define CMP_R_REQUEST_NOT_ACCEPTED 149
|
| 99 |
+
#define CMP_R_REQUEST_REJECTED_BY_SERVER 182
|
| 100 |
+
#define CMP_R_SENDER_GENERALNAME_TYPE_NOT_SUPPORTED 150
|
| 101 |
+
#define CMP_R_SRVCERT_DOES_NOT_VALIDATE_MSG 151
|
| 102 |
+
#define CMP_R_TOTAL_TIMEOUT 184
|
| 103 |
+
#define CMP_R_TRANSACTIONID_UNMATCHED 152
|
| 104 |
+
#define CMP_R_TRANSFER_ERROR 159
|
| 105 |
+
#define CMP_R_UNCLEAN_CTX 191
|
| 106 |
+
#define CMP_R_UNEXPECTED_CENTRAL_GEN_KEY 205
|
| 107 |
+
#define CMP_R_UNEXPECTED_CERTPROFILE 196
|
| 108 |
+
#define CMP_R_UNEXPECTED_CRLSTATUSLIST 201
|
| 109 |
+
#define CMP_R_UNEXPECTED_PKIBODY 133
|
| 110 |
+
#define CMP_R_UNEXPECTED_PKISTATUS 185
|
| 111 |
+
#define CMP_R_UNEXPECTED_POLLREQ 105
|
| 112 |
+
#define CMP_R_UNEXPECTED_PVNO 153
|
| 113 |
+
#define CMP_R_UNEXPECTED_SENDER 106
|
| 114 |
+
#define CMP_R_UNKNOWN_ALGORITHM_ID 134
|
| 115 |
+
#define CMP_R_UNKNOWN_CERT_TYPE 135
|
| 116 |
+
#define CMP_R_UNKNOWN_CRL_ISSUER 200
|
| 117 |
+
#define CMP_R_UNKNOWN_PKISTATUS 186
|
| 118 |
+
#define CMP_R_UNSUPPORTED_ALGORITHM 136
|
| 119 |
+
#define CMP_R_UNSUPPORTED_KEY_TYPE 137
|
| 120 |
+
#define CMP_R_UNSUPPORTED_PKIBODY 101
|
| 121 |
+
#define CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC 154
|
| 122 |
+
#define CMP_R_VALUE_TOO_LARGE 175
|
| 123 |
+
#define CMP_R_VALUE_TOO_SMALL 177
|
| 124 |
+
#define CMP_R_WRONG_ALGORITHM_OID 138
|
| 125 |
+
#define CMP_R_WRONG_CERTID 189
|
| 126 |
+
#define CMP_R_WRONG_CERTID_IN_RP 187
|
| 127 |
+
#define CMP_R_WRONG_PBM_VALUE 155
|
| 128 |
+
#define CMP_R_WRONG_RP_COMPONENT_COUNT 188
|
| 129 |
+
#define CMP_R_WRONG_SERIAL_IN_RP 173
|
| 130 |
+
|
| 131 |
+
#endif
|
| 132 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cms.h
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\cms.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMS_H
|
| 18 |
+
#define OPENSSL_CMS_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CMS_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/opensslconf.h>
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_CMS
|
| 29 |
+
#include <openssl/x509.h>
|
| 30 |
+
#include <openssl/x509v3.h>
|
| 31 |
+
#include <openssl/cmserr.h>
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
| 37 |
+
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
| 38 |
+
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
| 39 |
+
typedef struct CMS_SignedData_st CMS_SignedData;
|
| 40 |
+
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
| 41 |
+
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
| 42 |
+
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
| 43 |
+
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
|
| 44 |
+
typedef struct CMS_Receipt_st CMS_Receipt;
|
| 45 |
+
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
| 46 |
+
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
| 47 |
+
|
| 48 |
+
/* clang-format off */
|
| 49 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
| 50 |
+
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 51 |
+
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
| 52 |
+
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 53 |
+
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
|
| 54 |
+
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
|
| 55 |
+
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
| 56 |
+
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 57 |
+
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 58 |
+
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
| 59 |
+
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 60 |
+
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 61 |
+
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 62 |
+
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 63 |
+
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 64 |
+
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
| 65 |
+
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
| 66 |
+
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 67 |
+
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 68 |
+
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 69 |
+
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
| 70 |
+
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 71 |
+
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 72 |
+
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
| 73 |
+
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
| 74 |
+
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 75 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
| 76 |
+
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 77 |
+
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
| 78 |
+
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 79 |
+
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
|
| 80 |
+
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
|
| 81 |
+
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
| 82 |
+
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 83 |
+
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 84 |
+
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
| 85 |
+
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 86 |
+
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 87 |
+
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 88 |
+
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 89 |
+
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 90 |
+
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
| 91 |
+
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
| 92 |
+
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 93 |
+
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 94 |
+
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 95 |
+
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
| 96 |
+
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 97 |
+
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 98 |
+
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 99 |
+
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
| 100 |
+
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 101 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
| 102 |
+
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 103 |
+
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
| 104 |
+
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 105 |
+
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
|
| 106 |
+
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
|
| 107 |
+
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
| 108 |
+
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 109 |
+
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 110 |
+
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
| 111 |
+
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 112 |
+
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 113 |
+
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 114 |
+
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 115 |
+
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 116 |
+
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
| 117 |
+
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
| 118 |
+
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 119 |
+
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 120 |
+
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 121 |
+
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
| 122 |
+
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 123 |
+
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 124 |
+
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
| 125 |
+
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
| 126 |
+
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 127 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
| 128 |
+
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 129 |
+
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
| 130 |
+
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 131 |
+
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
|
| 132 |
+
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
|
| 133 |
+
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
| 134 |
+
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 135 |
+
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 136 |
+
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
| 137 |
+
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 138 |
+
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 139 |
+
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 140 |
+
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 141 |
+
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 142 |
+
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
| 143 |
+
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
| 144 |
+
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 145 |
+
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 146 |
+
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 147 |
+
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
| 148 |
+
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 149 |
+
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 150 |
+
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 151 |
+
#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)))
|
| 152 |
+
#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)))
|
| 153 |
+
|
| 154 |
+
/* clang-format on */
|
| 155 |
+
|
| 156 |
+
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
| 157 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
| 158 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
| 159 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
| 160 |
+
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
| 161 |
+
|
| 162 |
+
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
| 163 |
+
|
| 164 |
+
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 165 |
+
|
| 166 |
+
#define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
| 167 |
+
#define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
| 168 |
+
|
| 169 |
+
#define CMS_RECIPINFO_NONE -1
|
| 170 |
+
#define CMS_RECIPINFO_TRANS 0
|
| 171 |
+
#define CMS_RECIPINFO_AGREE 1
|
| 172 |
+
#define CMS_RECIPINFO_KEK 2
|
| 173 |
+
#define CMS_RECIPINFO_PASS 3
|
| 174 |
+
#define CMS_RECIPINFO_OTHER 4
|
| 175 |
+
#define CMS_RECIPINFO_KEM 5
|
| 176 |
+
|
| 177 |
+
/* S/MIME related flags */
|
| 178 |
+
|
| 179 |
+
#define CMS_TEXT 0x1
|
| 180 |
+
#define CMS_NOCERTS 0x2
|
| 181 |
+
#define CMS_NO_CONTENT_VERIFY 0x4
|
| 182 |
+
#define CMS_NO_ATTR_VERIFY 0x8
|
| 183 |
+
#define CMS_NOSIGS \
|
| 184 |
+
(CMS_NO_CONTENT_VERIFY | CMS_NO_ATTR_VERIFY)
|
| 185 |
+
#define CMS_NOINTERN 0x10
|
| 186 |
+
#define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
| 187 |
+
#define CMS_NOVERIFY 0x20
|
| 188 |
+
#define CMS_DETACHED 0x40
|
| 189 |
+
#define CMS_BINARY 0x80
|
| 190 |
+
#define CMS_NOATTR 0x100
|
| 191 |
+
#define CMS_NOSMIMECAP 0x200
|
| 192 |
+
#define CMS_NOOLDMIMETYPE 0x400
|
| 193 |
+
#define CMS_CRLFEOL 0x800
|
| 194 |
+
#define CMS_STREAM 0x1000
|
| 195 |
+
#define CMS_NOCRL 0x2000
|
| 196 |
+
#define CMS_PARTIAL 0x4000
|
| 197 |
+
#define CMS_REUSE_DIGEST 0x8000
|
| 198 |
+
#define CMS_USE_KEYID 0x10000
|
| 199 |
+
#define CMS_DEBUG_DECRYPT 0x20000
|
| 200 |
+
#define CMS_KEY_PARAM 0x40000
|
| 201 |
+
#define CMS_ASCIICRLF 0x80000
|
| 202 |
+
#define CMS_CADES 0x100000
|
| 203 |
+
#define CMS_USE_ORIGINATOR_KEYID 0x200000
|
| 204 |
+
#define CMS_NO_SIGNING_TIME 0x400000
|
| 205 |
+
|
| 206 |
+
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
| 207 |
+
|
| 208 |
+
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
| 209 |
+
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
| 210 |
+
|
| 211 |
+
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
| 212 |
+
int CMS_is_detached(CMS_ContentInfo *cms);
|
| 213 |
+
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
| 214 |
+
|
| 215 |
+
#ifdef OPENSSL_PEM_H
|
| 216 |
+
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
| 217 |
+
#endif
|
| 218 |
+
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
| 219 |
+
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
| 220 |
+
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
| 221 |
+
|
| 222 |
+
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
| 223 |
+
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
| 224 |
+
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
| 225 |
+
int flags);
|
| 226 |
+
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
| 227 |
+
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
| 228 |
+
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
| 229 |
+
|
| 230 |
+
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
| 231 |
+
unsigned int flags);
|
| 232 |
+
int CMS_final_digest(CMS_ContentInfo *cms,
|
| 233 |
+
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
| 234 |
+
unsigned int flags);
|
| 235 |
+
|
| 236 |
+
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
| 237 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 238 |
+
unsigned int flags);
|
| 239 |
+
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
| 240 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 241 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 242 |
+
const char *propq);
|
| 243 |
+
|
| 244 |
+
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
| 245 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 246 |
+
STACK_OF(X509) *certs, unsigned int flags);
|
| 247 |
+
|
| 248 |
+
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
| 249 |
+
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
| 250 |
+
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
| 251 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 252 |
+
|
| 253 |
+
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 254 |
+
unsigned int flags);
|
| 255 |
+
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
| 256 |
+
unsigned int flags);
|
| 257 |
+
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
| 258 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 259 |
+
const char *propq);
|
| 260 |
+
|
| 261 |
+
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
| 262 |
+
const unsigned char *key, size_t keylen,
|
| 263 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 264 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
| 265 |
+
const unsigned char *key,
|
| 266 |
+
size_t keylen, unsigned int flags);
|
| 267 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
| 268 |
+
const unsigned char *key,
|
| 269 |
+
size_t keylen, unsigned int flags,
|
| 270 |
+
OSSL_LIB_CTX *libctx,
|
| 271 |
+
const char *propq);
|
| 272 |
+
|
| 273 |
+
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
| 274 |
+
const unsigned char *key, size_t keylen);
|
| 275 |
+
|
| 276 |
+
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 277 |
+
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
| 278 |
+
|
| 279 |
+
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
| 280 |
+
STACK_OF(X509) *certs,
|
| 281 |
+
X509_STORE *store, unsigned int flags);
|
| 282 |
+
|
| 283 |
+
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
| 284 |
+
|
| 285 |
+
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
| 286 |
+
const EVP_CIPHER *cipher, unsigned int flags);
|
| 287 |
+
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 288 |
+
const EVP_CIPHER *cipher, unsigned int flags,
|
| 289 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 290 |
+
|
| 291 |
+
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
| 292 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 293 |
+
|
| 294 |
+
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
| 295 |
+
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
| 296 |
+
X509 *cert, X509 *peer);
|
| 297 |
+
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
| 298 |
+
unsigned char *key, size_t keylen,
|
| 299 |
+
const unsigned char *id, size_t idlen);
|
| 300 |
+
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
| 301 |
+
unsigned char *pass, ossl_ssize_t passlen);
|
| 302 |
+
|
| 303 |
+
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
| 304 |
+
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
| 305 |
+
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
| 306 |
+
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
| 307 |
+
CMS_ContentInfo *
|
| 308 |
+
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
| 309 |
+
const char *propq);
|
| 310 |
+
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
| 311 |
+
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
| 312 |
+
OSSL_LIB_CTX *libctx,
|
| 313 |
+
const char *propq);
|
| 314 |
+
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
| 315 |
+
EVP_PKEY *pkey, X509 *cert,
|
| 316 |
+
ASN1_OCTET_STRING *secret, unsigned int flags,
|
| 317 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 318 |
+
|
| 319 |
+
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
| 320 |
+
X509 *recip, unsigned int flags);
|
| 321 |
+
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
| 322 |
+
EVP_PKEY *originatorPrivKey, X509 *originator, unsigned int flags);
|
| 323 |
+
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
| 324 |
+
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 325 |
+
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
| 326 |
+
EVP_PKEY **pk, X509 **recip,
|
| 327 |
+
X509_ALGOR **palg);
|
| 328 |
+
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
| 329 |
+
ASN1_OCTET_STRING **keyid,
|
| 330 |
+
X509_NAME **issuer,
|
| 331 |
+
ASN1_INTEGER **sno);
|
| 332 |
+
|
| 333 |
+
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
| 334 |
+
unsigned char *key, size_t keylen,
|
| 335 |
+
unsigned char *id, size_t idlen,
|
| 336 |
+
ASN1_GENERALIZEDTIME *date,
|
| 337 |
+
ASN1_OBJECT *otherTypeId,
|
| 338 |
+
ASN1_TYPE *otherType);
|
| 339 |
+
|
| 340 |
+
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
| 341 |
+
X509_ALGOR **palg,
|
| 342 |
+
ASN1_OCTET_STRING **pid,
|
| 343 |
+
ASN1_GENERALIZEDTIME **pdate,
|
| 344 |
+
ASN1_OBJECT **potherid,
|
| 345 |
+
ASN1_TYPE **pothertype);
|
| 346 |
+
|
| 347 |
+
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
| 348 |
+
unsigned char *key, size_t keylen);
|
| 349 |
+
|
| 350 |
+
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
| 351 |
+
const unsigned char *id, size_t idlen);
|
| 352 |
+
|
| 353 |
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
| 354 |
+
unsigned char *pass,
|
| 355 |
+
ossl_ssize_t passlen);
|
| 356 |
+
|
| 357 |
+
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
| 358 |
+
int iter, int wrap_nid,
|
| 359 |
+
int pbe_nid,
|
| 360 |
+
unsigned char *pass,
|
| 361 |
+
ossl_ssize_t passlen,
|
| 362 |
+
const EVP_CIPHER *kekciph);
|
| 363 |
+
|
| 364 |
+
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 365 |
+
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 366 |
+
|
| 367 |
+
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 368 |
+
unsigned int flags);
|
| 369 |
+
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
| 370 |
+
|
| 371 |
+
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
| 372 |
+
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
| 373 |
+
|
| 374 |
+
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
|
| 375 |
+
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 376 |
+
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 377 |
+
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
|
| 378 |
+
|
| 379 |
+
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
|
| 380 |
+
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 381 |
+
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 382 |
+
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
| 383 |
+
|
| 384 |
+
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
| 385 |
+
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
| 386 |
+
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
| 387 |
+
unsigned int flags);
|
| 388 |
+
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
| 389 |
+
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
| 390 |
+
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
| 391 |
+
|
| 392 |
+
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
| 393 |
+
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
| 394 |
+
ASN1_OCTET_STRING **keyid,
|
| 395 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 396 |
+
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
| 397 |
+
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 398 |
+
unsigned int flags);
|
| 399 |
+
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
| 400 |
+
X509 **signer, X509_ALGOR **pdig,
|
| 401 |
+
X509_ALGOR **psig);
|
| 402 |
+
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
| 403 |
+
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
| 404 |
+
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
| 405 |
+
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
| 406 |
+
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
| 407 |
+
STACK_OF(X509) *scerts, X509_STORE *store,
|
| 408 |
+
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
| 409 |
+
unsigned int flags,
|
| 410 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 411 |
+
|
| 412 |
+
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
| 413 |
+
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
| 414 |
+
int algnid, int keysize);
|
| 415 |
+
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
| 416 |
+
|
| 417 |
+
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
| 418 |
+
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 419 |
+
int lastpos);
|
| 420 |
+
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
| 421 |
+
int lastpos);
|
| 422 |
+
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
| 423 |
+
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
| 424 |
+
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 425 |
+
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 426 |
+
const ASN1_OBJECT *obj, int type,
|
| 427 |
+
const void *bytes, int len);
|
| 428 |
+
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 429 |
+
int nid, int type,
|
| 430 |
+
const void *bytes, int len);
|
| 431 |
+
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 432 |
+
const char *attrname, int type,
|
| 433 |
+
const void *bytes, int len);
|
| 434 |
+
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
| 435 |
+
const ASN1_OBJECT *oid,
|
| 436 |
+
int lastpos, int type);
|
| 437 |
+
|
| 438 |
+
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
| 439 |
+
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 440 |
+
int lastpos);
|
| 441 |
+
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
| 442 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 443 |
+
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
| 444 |
+
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
| 445 |
+
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 446 |
+
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 447 |
+
const ASN1_OBJECT *obj, int type,
|
| 448 |
+
const void *bytes, int len);
|
| 449 |
+
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 450 |
+
int nid, int type,
|
| 451 |
+
const void *bytes, int len);
|
| 452 |
+
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 453 |
+
const char *attrname, int type,
|
| 454 |
+
const void *bytes, int len);
|
| 455 |
+
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
| 456 |
+
int lastpos, int type);
|
| 457 |
+
|
| 458 |
+
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
| 459 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
| 460 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 461 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 462 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
| 463 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
| 464 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 465 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 466 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
| 467 |
+
OSSL_LIB_CTX *libctx);
|
| 468 |
+
|
| 469 |
+
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
| 470 |
+
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
| 471 |
+
ASN1_STRING **pcid,
|
| 472 |
+
int *pallorfirst,
|
| 473 |
+
STACK_OF(GENERAL_NAMES) **plist,
|
| 474 |
+
STACK_OF(GENERAL_NAMES) **prto);
|
| 475 |
+
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
| 476 |
+
X509_ALGOR **palg,
|
| 477 |
+
ASN1_OCTET_STRING **pukm);
|
| 478 |
+
STACK_OF(CMS_RecipientEncryptedKey)
|
| 479 |
+
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
| 480 |
+
|
| 481 |
+
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
| 482 |
+
X509_ALGOR **pubalg,
|
| 483 |
+
ASN1_BIT_STRING **pubkey,
|
| 484 |
+
ASN1_OCTET_STRING **keyid,
|
| 485 |
+
X509_NAME **issuer,
|
| 486 |
+
ASN1_INTEGER **sno);
|
| 487 |
+
|
| 488 |
+
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 489 |
+
|
| 490 |
+
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
| 491 |
+
ASN1_OCTET_STRING **keyid,
|
| 492 |
+
ASN1_GENERALIZEDTIME **tm,
|
| 493 |
+
CMS_OtherKeyAttribute **other,
|
| 494 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 495 |
+
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
| 496 |
+
X509 *cert);
|
| 497 |
+
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 498 |
+
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
| 499 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
| 500 |
+
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
| 501 |
+
CMS_RecipientInfo *ri,
|
| 502 |
+
CMS_RecipientEncryptedKey *rek);
|
| 503 |
+
|
| 504 |
+
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
| 505 |
+
ASN1_OCTET_STRING *ukm, int keylen);
|
| 506 |
+
|
| 507 |
+
int CMS_RecipientInfo_kemri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 508 |
+
int CMS_RecipientInfo_kemri_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 509 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kemri_get0_ctx(CMS_RecipientInfo *ri);
|
| 510 |
+
X509_ALGOR *CMS_RecipientInfo_kemri_get0_kdf_alg(CMS_RecipientInfo *ri);
|
| 511 |
+
int CMS_RecipientInfo_kemri_set_ukm(CMS_RecipientInfo *ri,
|
| 512 |
+
const unsigned char *ukm,
|
| 513 |
+
int ukmLength);
|
| 514 |
+
|
| 515 |
+
/* Backward compatibility for spelling errors. */
|
| 516 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
| 517 |
+
#define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
| 518 |
+
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
| 519 |
+
|
| 520 |
+
#ifdef __cplusplus
|
| 521 |
+
}
|
| 522 |
+
#endif
|
| 523 |
+
#endif
|
| 524 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cmserr.h
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CMSERR_H
|
| 12 |
+
#define OPENSSL_CMSERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CMS
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CMS reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CMS_R_ADD_SIGNER_ERROR 99
|
| 25 |
+
#define CMS_R_ATTRIBUTE_ERROR 161
|
| 26 |
+
#define CMS_R_CERTIFICATE_ALREADY_PRESENT 175
|
| 27 |
+
#define CMS_R_CERTIFICATE_HAS_NO_KEYID 160
|
| 28 |
+
#define CMS_R_CERTIFICATE_VERIFY_ERROR 100
|
| 29 |
+
#define CMS_R_CIPHER_AEAD_IN_ENVELOPED_DATA 200
|
| 30 |
+
#define CMS_R_CIPHER_AEAD_SET_TAG_ERROR 184
|
| 31 |
+
#define CMS_R_CIPHER_GET_TAG 185
|
| 32 |
+
#define CMS_R_CIPHER_INITIALISATION_ERROR 101
|
| 33 |
+
#define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102
|
| 34 |
+
#define CMS_R_CMS_DATAFINAL_ERROR 103
|
| 35 |
+
#define CMS_R_CMS_LIB 104
|
| 36 |
+
#define CMS_R_CONTENTIDENTIFIER_MISMATCH 170
|
| 37 |
+
#define CMS_R_CONTENT_NOT_FOUND 105
|
| 38 |
+
#define CMS_R_CONTENT_TYPE_MISMATCH 171
|
| 39 |
+
#define CMS_R_CONTENT_TYPE_NOT_COMPRESSED_DATA 106
|
| 40 |
+
#define CMS_R_CONTENT_TYPE_NOT_ENVELOPED_DATA 107
|
| 41 |
+
#define CMS_R_CONTENT_TYPE_NOT_SIGNED_DATA 108
|
| 42 |
+
#define CMS_R_CONTENT_VERIFY_ERROR 109
|
| 43 |
+
#define CMS_R_CTRL_ERROR 110
|
| 44 |
+
#define CMS_R_CTRL_FAILURE 111
|
| 45 |
+
#define CMS_R_DECODE_ERROR 187
|
| 46 |
+
#define CMS_R_DECRYPT_ERROR 112
|
| 47 |
+
#define CMS_R_ERROR_GETTING_PUBLIC_KEY 113
|
| 48 |
+
#define CMS_R_ERROR_READING_MESSAGEDIGEST_ATTRIBUTE 114
|
| 49 |
+
#define CMS_R_ERROR_SETTING_KEY 115
|
| 50 |
+
#define CMS_R_ERROR_SETTING_RECIPIENTINFO 116
|
| 51 |
+
#define CMS_R_ERROR_UNSUPPORTED_STATIC_KEY_AGREEMENT 196
|
| 52 |
+
#define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR 183
|
| 53 |
+
#define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117
|
| 54 |
+
#define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176
|
| 55 |
+
#define CMS_R_INVALID_KEY_LENGTH 118
|
| 56 |
+
#define CMS_R_INVALID_LABEL 190
|
| 57 |
+
#define CMS_R_INVALID_OAEP_PARAMETERS 191
|
| 58 |
+
#define CMS_R_KDF_PARAMETER_ERROR 186
|
| 59 |
+
#define CMS_R_MD_BIO_INIT_ERROR 119
|
| 60 |
+
#define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120
|
| 61 |
+
#define CMS_R_MESSAGEDIGEST_WRONG_LENGTH 121
|
| 62 |
+
#define CMS_R_MSGSIGDIGEST_ERROR 172
|
| 63 |
+
#define CMS_R_MSGSIGDIGEST_VERIFICATION_FAILURE 162
|
| 64 |
+
#define CMS_R_MSGSIGDIGEST_WRONG_LENGTH 163
|
| 65 |
+
#define CMS_R_NEED_ONE_SIGNER 164
|
| 66 |
+
#define CMS_R_NOT_A_SIGNED_RECEIPT 165
|
| 67 |
+
#define CMS_R_NOT_ENCRYPTED_DATA 122
|
| 68 |
+
#define CMS_R_NOT_KEK 123
|
| 69 |
+
#define CMS_R_NOT_KEM 197
|
| 70 |
+
#define CMS_R_NOT_KEY_AGREEMENT 181
|
| 71 |
+
#define CMS_R_NOT_KEY_TRANSPORT 124
|
| 72 |
+
#define CMS_R_NOT_PWRI 177
|
| 73 |
+
#define CMS_R_NOT_SUPPORTED_FOR_THIS_KEY_TYPE 125
|
| 74 |
+
#define CMS_R_NO_CIPHER 126
|
| 75 |
+
#define CMS_R_NO_CONTENT 127
|
| 76 |
+
#define CMS_R_NO_CONTENT_TYPE 173
|
| 77 |
+
#define CMS_R_NO_DEFAULT_DIGEST 128
|
| 78 |
+
#define CMS_R_NO_DIGEST_SET 129
|
| 79 |
+
#define CMS_R_NO_KEY 130
|
| 80 |
+
#define CMS_R_NO_KEY_OR_CERT 174
|
| 81 |
+
#define CMS_R_NO_MATCHING_DIGEST 131
|
| 82 |
+
#define CMS_R_NO_MATCHING_RECIPIENT 132
|
| 83 |
+
#define CMS_R_NO_MATCHING_SIGNATURE 166
|
| 84 |
+
#define CMS_R_NO_MSGSIGDIGEST 167
|
| 85 |
+
#define CMS_R_NO_PASSWORD 178
|
| 86 |
+
#define CMS_R_NO_PRIVATE_KEY 133
|
| 87 |
+
#define CMS_R_NO_PUBLIC_KEY 134
|
| 88 |
+
#define CMS_R_NO_RECEIPT_REQUEST 168
|
| 89 |
+
#define CMS_R_NO_SIGNERS 135
|
| 90 |
+
#define CMS_R_OPERATION_UNSUPPORTED 182
|
| 91 |
+
#define CMS_R_PEER_KEY_ERROR 188
|
| 92 |
+
#define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136
|
| 93 |
+
#define CMS_R_RECEIPT_DECODE_ERROR 169
|
| 94 |
+
#define CMS_R_RECIPIENT_ERROR 137
|
| 95 |
+
#define CMS_R_SHARED_INFO_ERROR 189
|
| 96 |
+
#define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138
|
| 97 |
+
#define CMS_R_SIGNFINAL_ERROR 139
|
| 98 |
+
#define CMS_R_SMIME_TEXT_ERROR 140
|
| 99 |
+
#define CMS_R_STORE_INIT_ERROR 141
|
| 100 |
+
#define CMS_R_TYPE_NOT_COMPRESSED_DATA 142
|
| 101 |
+
#define CMS_R_TYPE_NOT_DATA 143
|
| 102 |
+
#define CMS_R_TYPE_NOT_DIGESTED_DATA 144
|
| 103 |
+
#define CMS_R_TYPE_NOT_ENCRYPTED_DATA 145
|
| 104 |
+
#define CMS_R_TYPE_NOT_ENVELOPED_DATA 146
|
| 105 |
+
#define CMS_R_UNABLE_TO_FINALIZE_CONTEXT 147
|
| 106 |
+
#define CMS_R_UNKNOWN_CIPHER 148
|
| 107 |
+
#define CMS_R_UNKNOWN_DIGEST_ALGORITHM 149
|
| 108 |
+
#define CMS_R_UNKNOWN_ID 150
|
| 109 |
+
#define CMS_R_UNKNOWN_KDF_ALGORITHM 198
|
| 110 |
+
#define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151
|
| 111 |
+
#define CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM 194
|
| 112 |
+
#define CMS_R_UNSUPPORTED_CONTENT_TYPE 152
|
| 113 |
+
#define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE 192
|
| 114 |
+
#define CMS_R_UNSUPPORTED_KDF_ALGORITHM 199
|
| 115 |
+
#define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153
|
| 116 |
+
#define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179
|
| 117 |
+
#define CMS_R_UNSUPPORTED_LABEL_SOURCE 193
|
| 118 |
+
#define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155
|
| 119 |
+
#define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154
|
| 120 |
+
#define CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM 195
|
| 121 |
+
#define CMS_R_UNSUPPORTED_TYPE 156
|
| 122 |
+
#define CMS_R_UNWRAP_ERROR 157
|
| 123 |
+
#define CMS_R_UNWRAP_FAILURE 180
|
| 124 |
+
#define CMS_R_VERIFICATION_FAILURE 158
|
| 125 |
+
#define CMS_R_WRAP_ERROR 159
|
| 126 |
+
|
| 127 |
+
#endif
|
| 128 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
/* clang-format off */
|
| 11 |
+
|
| 12 |
+
/* clang-format on */
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_COMP_H
|
| 15 |
+
#define OPENSSL_COMP_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#include <openssl/macros.h>
|
| 19 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
#define HEADER_COMP_H
|
| 21 |
+
#endif
|
| 22 |
+
|
| 23 |
+
#include <openssl/opensslconf.h>
|
| 24 |
+
|
| 25 |
+
#include <openssl/crypto.h>
|
| 26 |
+
#include <openssl/comperr.h>
|
| 27 |
+
#ifdef __cplusplus
|
| 28 |
+
extern "C" {
|
| 29 |
+
#endif
|
| 30 |
+
|
| 31 |
+
#ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX *comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
#define COMP_zlib_cleanup() \
|
| 54 |
+
while (0) \
|
| 55 |
+
continue
|
| 56 |
+
#endif
|
| 57 |
+
|
| 58 |
+
#ifdef OPENSSL_BIO_H
|
| 59 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 60 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 61 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#endif
|
| 65 |
+
|
| 66 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 67 |
+
|
| 68 |
+
/* clang-format off */
|
| 69 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 70 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 71 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 72 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 73 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 74 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 75 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 76 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 77 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 78 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 79 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 80 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 81 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 82 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 83 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 84 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 85 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 86 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 87 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 88 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 89 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 90 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 91 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 92 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 93 |
+
#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)))
|
| 94 |
+
#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)))
|
| 95 |
+
|
| 96 |
+
/* clang-format on */
|
| 97 |
+
|
| 98 |
+
#ifdef __cplusplus
|
| 99 |
+
}
|
| 100 |
+
#endif
|
| 101 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/comperr.h
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_COMPERR_H
|
| 12 |
+
#define OPENSSL_COMPERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_COMP
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* COMP reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define COMP_R_BROTLI_DECODE_ERROR 102
|
| 25 |
+
#define COMP_R_BROTLI_ENCODE_ERROR 103
|
| 26 |
+
#define COMP_R_BROTLI_NOT_SUPPORTED 104
|
| 27 |
+
#define COMP_R_ZLIB_DEFLATE_ERROR 99
|
| 28 |
+
#define COMP_R_ZLIB_INFLATE_ERROR 100
|
| 29 |
+
#define COMP_R_ZLIB_NOT_SUPPORTED 101
|
| 30 |
+
#define COMP_R_ZSTD_COMPRESS_ERROR 105
|
| 31 |
+
#define COMP_R_ZSTD_DECODE_ERROR 106
|
| 32 |
+
#define COMP_R_ZSTD_DECOMPRESS_ERROR 107
|
| 33 |
+
#define COMP_R_ZSTD_NOT_SUPPORTED 108
|
| 34 |
+
|
| 35 |
+
#endif
|
| 36 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/conf.h
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\conf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CONF_H
|
| 18 |
+
#define OPENSSL_CONF_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CONF_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/bio.h>
|
| 27 |
+
#include <openssl/lhash.h>
|
| 28 |
+
#include <openssl/safestack.h>
|
| 29 |
+
#include <openssl/e_os2.h>
|
| 30 |
+
#include <openssl/types.h>
|
| 31 |
+
#include <openssl/conferr.h>
|
| 32 |
+
#ifndef OPENSSL_NO_STDIO
|
| 33 |
+
#include <stdio.h>
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
#ifdef __cplusplus
|
| 37 |
+
extern "C" {
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
typedef struct {
|
| 41 |
+
char *section;
|
| 42 |
+
char *name;
|
| 43 |
+
char *value;
|
| 44 |
+
} CONF_VALUE;
|
| 45 |
+
|
| 46 |
+
/* clang-format off */
|
| 47 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
| 48 |
+
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 49 |
+
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
| 50 |
+
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 51 |
+
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
| 52 |
+
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
| 53 |
+
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
| 54 |
+
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
| 55 |
+
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
| 56 |
+
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
| 57 |
+
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
| 58 |
+
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 59 |
+
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 60 |
+
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 61 |
+
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 62 |
+
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
| 63 |
+
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
| 64 |
+
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
| 65 |
+
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 66 |
+
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 67 |
+
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
| 68 |
+
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
| 69 |
+
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 70 |
+
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
| 71 |
+
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
| 72 |
+
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 73 |
+
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
| 74 |
+
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
| 75 |
+
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
| 76 |
+
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
| 77 |
+
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
| 78 |
+
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 79 |
+
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 80 |
+
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
| 81 |
+
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
| 82 |
+
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 83 |
+
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 84 |
+
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 85 |
+
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
| 86 |
+
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
| 87 |
+
#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))
|
| 88 |
+
|
| 89 |
+
/* clang-format on */
|
| 90 |
+
|
| 91 |
+
struct conf_st;
|
| 92 |
+
struct conf_method_st;
|
| 93 |
+
typedef struct conf_method_st CONF_METHOD;
|
| 94 |
+
|
| 95 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 96 |
+
#include <openssl/conftypes.h>
|
| 97 |
+
#endif
|
| 98 |
+
|
| 99 |
+
/* Module definitions */
|
| 100 |
+
typedef struct conf_imodule_st CONF_IMODULE;
|
| 101 |
+
typedef struct conf_module_st CONF_MODULE;
|
| 102 |
+
|
| 103 |
+
STACK_OF(CONF_MODULE);
|
| 104 |
+
STACK_OF(CONF_IMODULE);
|
| 105 |
+
|
| 106 |
+
/* DSO module function typedefs */
|
| 107 |
+
typedef int conf_init_func(CONF_IMODULE *md, const CONF *cnf);
|
| 108 |
+
typedef void conf_finish_func(CONF_IMODULE *md);
|
| 109 |
+
|
| 110 |
+
#define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
| 111 |
+
#define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
| 112 |
+
#define CONF_MFLAGS_SILENT 0x4
|
| 113 |
+
#define CONF_MFLAGS_NO_DSO 0x8
|
| 114 |
+
#define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
| 115 |
+
#define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
| 116 |
+
|
| 117 |
+
int CONF_set_default_method(CONF_METHOD *meth);
|
| 118 |
+
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
| 119 |
+
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
| 120 |
+
long *eline);
|
| 121 |
+
#ifndef OPENSSL_NO_STDIO
|
| 122 |
+
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
| 123 |
+
long *eline);
|
| 124 |
+
#endif
|
| 125 |
+
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
| 126 |
+
long *eline);
|
| 127 |
+
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
| 128 |
+
const char *section);
|
| 129 |
+
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 130 |
+
const char *name);
|
| 131 |
+
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 132 |
+
const char *name);
|
| 133 |
+
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
| 134 |
+
#ifndef OPENSSL_NO_STDIO
|
| 135 |
+
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
| 136 |
+
#endif
|
| 137 |
+
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
| 138 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 139 |
+
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
| 140 |
+
#endif
|
| 141 |
+
|
| 142 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 143 |
+
#define OPENSSL_no_config() \
|
| 144 |
+
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
| 145 |
+
#endif
|
| 146 |
+
|
| 147 |
+
/*
|
| 148 |
+
* New conf code. The semantics are different from the functions above. If
|
| 149 |
+
* that wasn't the case, the above functions would have been replaced
|
| 150 |
+
*/
|
| 151 |
+
|
| 152 |
+
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
| 153 |
+
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
| 154 |
+
CONF *NCONF_new(CONF_METHOD *meth);
|
| 155 |
+
CONF_METHOD *NCONF_default(void);
|
| 156 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 157 |
+
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
| 158 |
+
#endif
|
| 159 |
+
void NCONF_free(CONF *conf);
|
| 160 |
+
void NCONF_free_data(CONF *conf);
|
| 161 |
+
|
| 162 |
+
int NCONF_load(CONF *conf, const char *file, long *eline);
|
| 163 |
+
#ifndef OPENSSL_NO_STDIO
|
| 164 |
+
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
| 165 |
+
#endif
|
| 166 |
+
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
| 167 |
+
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
| 168 |
+
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
| 169 |
+
const char *section);
|
| 170 |
+
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
| 171 |
+
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
| 172 |
+
long *result);
|
| 173 |
+
#ifndef OPENSSL_NO_STDIO
|
| 174 |
+
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
| 175 |
+
#endif
|
| 176 |
+
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
| 177 |
+
|
| 178 |
+
#define NCONF_get_number(c, g, n, r) NCONF_get_number_e(c, g, n, r)
|
| 179 |
+
|
| 180 |
+
/* Module functions */
|
| 181 |
+
|
| 182 |
+
int CONF_modules_load(const CONF *cnf, const char *appname,
|
| 183 |
+
unsigned long flags);
|
| 184 |
+
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
| 185 |
+
const char *appname, unsigned long flags);
|
| 186 |
+
int CONF_modules_load_file(const char *filename, const char *appname,
|
| 187 |
+
unsigned long flags);
|
| 188 |
+
void CONF_modules_unload(int all);
|
| 189 |
+
void CONF_modules_finish(void);
|
| 190 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 191 |
+
#define CONF_modules_free() \
|
| 192 |
+
while (0) \
|
| 193 |
+
continue
|
| 194 |
+
#endif
|
| 195 |
+
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
| 196 |
+
conf_finish_func *ffunc);
|
| 197 |
+
|
| 198 |
+
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
| 199 |
+
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
| 200 |
+
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
| 201 |
+
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
| 202 |
+
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
| 203 |
+
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
| 204 |
+
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
| 205 |
+
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
| 206 |
+
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
| 207 |
+
|
| 208 |
+
char *CONF_get1_default_config_file(void);
|
| 209 |
+
|
| 210 |
+
int CONF_parse_list(const char *list, int sep, int nospc,
|
| 211 |
+
int (*list_cb)(const char *elem, int len, void *usr),
|
| 212 |
+
void *arg);
|
| 213 |
+
|
| 214 |
+
void OPENSSL_load_builtin_modules(void);
|
| 215 |
+
|
| 216 |
+
#ifdef __cplusplus
|
| 217 |
+
}
|
| 218 |
+
#endif
|
| 219 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/conf_api.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CONF_API_H
|
| 11 |
+
#define OPENSSL_CONF_API_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_CONF_API_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/lhash.h>
|
| 20 |
+
#include <openssl/conf.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/* Up until OpenSSL 0.9.5a, this was new_section */
|
| 27 |
+
CONF_VALUE *_CONF_new_section(CONF *conf, const char *section);
|
| 28 |
+
/* Up until OpenSSL 0.9.5a, this was get_section */
|
| 29 |
+
CONF_VALUE *_CONF_get_section(const CONF *conf, const char *section);
|
| 30 |
+
/* Up until OpenSSL 0.9.5a, this was CONF_get_section */
|
| 31 |
+
STACK_OF(CONF_VALUE) *_CONF_get_section_values(const CONF *conf,
|
| 32 |
+
const char *section);
|
| 33 |
+
|
| 34 |
+
int _CONF_add_string(CONF *conf, CONF_VALUE *section, CONF_VALUE *value);
|
| 35 |
+
char *_CONF_get_string(const CONF *conf, const char *section,
|
| 36 |
+
const char *name);
|
| 37 |
+
long _CONF_get_number(const CONF *conf, const char *section,
|
| 38 |
+
const char *name);
|
| 39 |
+
|
| 40 |
+
int _CONF_new_data(CONF *conf);
|
| 41 |
+
void _CONF_free_data(CONF *conf);
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
}
|
| 45 |
+
#endif
|
| 46 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/conferr.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CONFERR_H
|
| 12 |
+
#define OPENSSL_CONFERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* CONF reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define CONF_R_ERROR_LOADING_DSO 110
|
| 23 |
+
#define CONF_R_INVALID_PRAGMA 122
|
| 24 |
+
#define CONF_R_LIST_CANNOT_BE_NULL 115
|
| 25 |
+
#define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123
|
| 26 |
+
#define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
| 27 |
+
#define CONF_R_MISSING_EQUAL_SIGN 101
|
| 28 |
+
#define CONF_R_MISSING_INIT_FUNCTION 112
|
| 29 |
+
#define CONF_R_MODULE_INITIALIZATION_ERROR 109
|
| 30 |
+
#define CONF_R_NO_CLOSE_BRACE 102
|
| 31 |
+
#define CONF_R_NO_CONF 105
|
| 32 |
+
#define CONF_R_NO_CONF_OR_ENVIRONMENT_VARIABLE 106
|
| 33 |
+
#define CONF_R_NO_SECTION 107
|
| 34 |
+
#define CONF_R_NO_SUCH_FILE 114
|
| 35 |
+
#define CONF_R_NO_VALUE 108
|
| 36 |
+
#define CONF_R_NUMBER_TOO_LARGE 121
|
| 37 |
+
#define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124
|
| 38 |
+
#define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111
|
| 39 |
+
#define CONF_R_RECURSIVE_SECTION_REFERENCE 126
|
| 40 |
+
#define CONF_R_RELATIVE_PATH 125
|
| 41 |
+
#define CONF_R_SSL_COMMAND_SECTION_EMPTY 117
|
| 42 |
+
#define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118
|
| 43 |
+
#define CONF_R_SSL_SECTION_EMPTY 119
|
| 44 |
+
#define CONF_R_SSL_SECTION_NOT_FOUND 120
|
| 45 |
+
#define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103
|
| 46 |
+
#define CONF_R_UNKNOWN_MODULE_NAME 113
|
| 47 |
+
#define CONF_R_VARIABLE_EXPANSION_TOO_LONG 116
|
| 48 |
+
#define CONF_R_VARIABLE_HAS_NO_VALUE 104
|
| 49 |
+
|
| 50 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/configuration.h
ADDED
|
@@ -0,0 +1,208 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by configdata.pm from Configurations\common0.tmpl, Configurations\windows-makefile.tmpl
|
| 4 |
+
* via makefile.in
|
| 5 |
+
*
|
| 6 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONFIGURATION_H
|
| 15 |
+
#define OPENSSL_CONFIGURATION_H
|
| 16 |
+
#pragma once
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
#ifdef OPENSSL_ALGORITHM_DEFINES
|
| 23 |
+
#error OPENSSL_ALGORITHM_DEFINES no longer supported
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* OpenSSL was configured with the following options:
|
| 28 |
+
*/
|
| 29 |
+
|
| 30 |
+
/* clang-format off */
|
| 31 |
+
# ifndef OPENSSL_SYS_WIN64A
|
| 32 |
+
# define OPENSSL_SYS_WIN64A 1
|
| 33 |
+
# endif
|
| 34 |
+
# define OPENSSL_CONFIGURED_API 30600
|
| 35 |
+
# ifndef OPENSSL_RAND_SEED_OS
|
| 36 |
+
# define OPENSSL_RAND_SEED_OS
|
| 37 |
+
# endif
|
| 38 |
+
# ifndef OPENSSL_THREADS
|
| 39 |
+
# define OPENSSL_THREADS
|
| 40 |
+
# endif
|
| 41 |
+
# ifndef OPENSSL_NO_ACVP_TESTS
|
| 42 |
+
# define OPENSSL_NO_ACVP_TESTS
|
| 43 |
+
# endif
|
| 44 |
+
# ifndef OPENSSL_NO_AFALGENG
|
| 45 |
+
# define OPENSSL_NO_AFALGENG
|
| 46 |
+
# endif
|
| 47 |
+
# ifndef OPENSSL_NO_ALLOCFAIL_TESTS
|
| 48 |
+
# define OPENSSL_NO_ALLOCFAIL_TESTS
|
| 49 |
+
# endif
|
| 50 |
+
# ifndef OPENSSL_NO_ASAN
|
| 51 |
+
# define OPENSSL_NO_ASAN
|
| 52 |
+
# endif
|
| 53 |
+
# ifndef OPENSSL_NO_BROTLI
|
| 54 |
+
# define OPENSSL_NO_BROTLI
|
| 55 |
+
# endif
|
| 56 |
+
# ifndef OPENSSL_NO_BROTLI_DYNAMIC
|
| 57 |
+
# define OPENSSL_NO_BROTLI_DYNAMIC
|
| 58 |
+
# endif
|
| 59 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
| 60 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG
|
| 61 |
+
# endif
|
| 62 |
+
# ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 63 |
+
# define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
|
| 64 |
+
# endif
|
| 65 |
+
# ifndef OPENSSL_NO_DEMOS
|
| 66 |
+
# define OPENSSL_NO_DEMOS
|
| 67 |
+
# endif
|
| 68 |
+
# ifndef OPENSSL_NO_DEVCRYPTOENG
|
| 69 |
+
# define OPENSSL_NO_DEVCRYPTOENG
|
| 70 |
+
# endif
|
| 71 |
+
# ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 72 |
+
# define OPENSSL_NO_EC_NISTP_64_GCC_128
|
| 73 |
+
# endif
|
| 74 |
+
# ifndef OPENSSL_NO_EGD
|
| 75 |
+
# define OPENSSL_NO_EGD
|
| 76 |
+
# endif
|
| 77 |
+
# ifndef OPENSSL_NO_EXTERNAL_TESTS
|
| 78 |
+
# define OPENSSL_NO_EXTERNAL_TESTS
|
| 79 |
+
# endif
|
| 80 |
+
# ifndef OPENSSL_NO_FIPS_JITTER
|
| 81 |
+
# define OPENSSL_NO_FIPS_JITTER
|
| 82 |
+
# endif
|
| 83 |
+
# ifndef OPENSSL_NO_FIPS_POST
|
| 84 |
+
# define OPENSSL_NO_FIPS_POST
|
| 85 |
+
# endif
|
| 86 |
+
# ifndef OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 87 |
+
# define OPENSSL_NO_FIPS_SECURITYCHECKS
|
| 88 |
+
# endif
|
| 89 |
+
# ifndef OPENSSL_NO_FUZZ_AFL
|
| 90 |
+
# define OPENSSL_NO_FUZZ_AFL
|
| 91 |
+
# endif
|
| 92 |
+
# ifndef OPENSSL_NO_FUZZ_LIBFUZZER
|
| 93 |
+
# define OPENSSL_NO_FUZZ_LIBFUZZER
|
| 94 |
+
# endif
|
| 95 |
+
# ifndef OPENSSL_NO_H3DEMO
|
| 96 |
+
# define OPENSSL_NO_H3DEMO
|
| 97 |
+
# endif
|
| 98 |
+
# ifndef OPENSSL_NO_HQINTEROP
|
| 99 |
+
# define OPENSSL_NO_HQINTEROP
|
| 100 |
+
# endif
|
| 101 |
+
# ifndef OPENSSL_NO_JITTER
|
| 102 |
+
# define OPENSSL_NO_JITTER
|
| 103 |
+
# endif
|
| 104 |
+
# ifndef OPENSSL_NO_KTLS
|
| 105 |
+
# define OPENSSL_NO_KTLS
|
| 106 |
+
# endif
|
| 107 |
+
# ifndef OPENSSL_NO_LMS
|
| 108 |
+
# define OPENSSL_NO_LMS
|
| 109 |
+
# endif
|
| 110 |
+
# ifndef OPENSSL_NO_LOADERENG
|
| 111 |
+
# define OPENSSL_NO_LOADERENG
|
| 112 |
+
# endif
|
| 113 |
+
# ifndef OPENSSL_NO_MD2
|
| 114 |
+
# define OPENSSL_NO_MD2
|
| 115 |
+
# endif
|
| 116 |
+
# ifndef OPENSSL_NO_MSAN
|
| 117 |
+
# define OPENSSL_NO_MSAN
|
| 118 |
+
# endif
|
| 119 |
+
# ifndef OPENSSL_NO_PIE
|
| 120 |
+
# define OPENSSL_NO_PIE
|
| 121 |
+
# endif
|
| 122 |
+
# ifndef OPENSSL_NO_RC5
|
| 123 |
+
# define OPENSSL_NO_RC5
|
| 124 |
+
# endif
|
| 125 |
+
# ifndef OPENSSL_NO_SCTP
|
| 126 |
+
# define OPENSSL_NO_SCTP
|
| 127 |
+
# endif
|
| 128 |
+
# ifndef OPENSSL_NO_SSL3
|
| 129 |
+
# define OPENSSL_NO_SSL3
|
| 130 |
+
# endif
|
| 131 |
+
# ifndef OPENSSL_NO_SSL3_METHOD
|
| 132 |
+
# define OPENSSL_NO_SSL3_METHOD
|
| 133 |
+
# endif
|
| 134 |
+
# ifndef OPENSSL_NO_SSLKEYLOG
|
| 135 |
+
# define OPENSSL_NO_SSLKEYLOG
|
| 136 |
+
# endif
|
| 137 |
+
# ifndef OPENSSL_NO_TFO
|
| 138 |
+
# define OPENSSL_NO_TFO
|
| 139 |
+
# endif
|
| 140 |
+
# ifndef OPENSSL_NO_TRACE
|
| 141 |
+
# define OPENSSL_NO_TRACE
|
| 142 |
+
# endif
|
| 143 |
+
# ifndef OPENSSL_NO_UBSAN
|
| 144 |
+
# define OPENSSL_NO_UBSAN
|
| 145 |
+
# endif
|
| 146 |
+
# ifndef OPENSSL_NO_UNIT_TEST
|
| 147 |
+
# define OPENSSL_NO_UNIT_TEST
|
| 148 |
+
# endif
|
| 149 |
+
# ifndef OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 150 |
+
# define OPENSSL_NO_WEAK_SSL_CIPHERS
|
| 151 |
+
# endif
|
| 152 |
+
# ifndef OPENSSL_NO_ZLIB
|
| 153 |
+
# define OPENSSL_NO_ZLIB
|
| 154 |
+
# endif
|
| 155 |
+
# ifndef OPENSSL_NO_ZLIB_DYNAMIC
|
| 156 |
+
# define OPENSSL_NO_ZLIB_DYNAMIC
|
| 157 |
+
# endif
|
| 158 |
+
# ifndef OPENSSL_NO_ZSTD
|
| 159 |
+
# define OPENSSL_NO_ZSTD
|
| 160 |
+
# endif
|
| 161 |
+
# ifndef OPENSSL_NO_ZSTD_DYNAMIC
|
| 162 |
+
# define OPENSSL_NO_ZSTD_DYNAMIC
|
| 163 |
+
# endif
|
| 164 |
+
# ifndef OPENSSL_NO_DYNAMIC_ENGINE
|
| 165 |
+
# define OPENSSL_NO_DYNAMIC_ENGINE
|
| 166 |
+
# endif
|
| 167 |
+
|
| 168 |
+
/* clang-format on */
|
| 169 |
+
|
| 170 |
+
/* Generate 80386 code? */
|
| 171 |
+
/* clang-format off */
|
| 172 |
+
# undef I386_ONLY
|
| 173 |
+
/* clang-format on */
|
| 174 |
+
|
| 175 |
+
/*
|
| 176 |
+
* The following are cipher-specific, but are part of the public API.
|
| 177 |
+
*/
|
| 178 |
+
#if !defined(OPENSSL_SYS_UEFI)
|
| 179 |
+
/* clang-format off */
|
| 180 |
+
# undef BN_LLONG
|
| 181 |
+
/* clang-format on */
|
| 182 |
+
/* Only one for the following should be defined */
|
| 183 |
+
/* clang-format off */
|
| 184 |
+
# undef SIXTY_FOUR_BIT_LONG
|
| 185 |
+
/* clang-format on */
|
| 186 |
+
/* clang-format off */
|
| 187 |
+
# define SIXTY_FOUR_BIT
|
| 188 |
+
/* clang-format on */
|
| 189 |
+
/* clang-format off */
|
| 190 |
+
# undef THIRTY_TWO_BIT
|
| 191 |
+
/* clang-format on */
|
| 192 |
+
#endif
|
| 193 |
+
|
| 194 |
+
/* clang-format off */
|
| 195 |
+
# define RC4_INT unsigned int
|
| 196 |
+
/* clang-format on */
|
| 197 |
+
|
| 198 |
+
#if defined(OPENSSL_NO_COMP) || (defined(OPENSSL_NO_BROTLI) && defined(OPENSSL_NO_ZSTD) && defined(OPENSSL_NO_ZLIB))
|
| 199 |
+
#define OPENSSL_NO_COMP_ALG
|
| 200 |
+
#else
|
| 201 |
+
#undef OPENSSL_NO_COMP_ALG
|
| 202 |
+
#endif
|
| 203 |
+
|
| 204 |
+
#ifdef __cplusplus
|
| 205 |
+
}
|
| 206 |
+
#endif
|
| 207 |
+
|
| 208 |
+
#endif /* OPENSSL_CONFIGURATION_H */
|
micromamba_root/envs/hf_sync/Library/include/openssl/conftypes.h
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CONFTYPES_H
|
| 11 |
+
#define OPENSSL_CONFTYPES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_CONF_H
|
| 15 |
+
#include <openssl/conf.h>
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* The contents of this file are deprecated and will be made opaque
|
| 20 |
+
*/
|
| 21 |
+
struct conf_method_st {
|
| 22 |
+
const char *name;
|
| 23 |
+
CONF *(*create)(CONF_METHOD *meth);
|
| 24 |
+
int (*init)(CONF *conf);
|
| 25 |
+
int (*destroy)(CONF *conf);
|
| 26 |
+
int (*destroy_data)(CONF *conf);
|
| 27 |
+
int (*load_bio)(CONF *conf, BIO *bp, long *eline);
|
| 28 |
+
int (*dump)(const CONF *conf, BIO *bp);
|
| 29 |
+
int (*is_number)(const CONF *conf, char c);
|
| 30 |
+
int (*to_int)(const CONF *conf, char c);
|
| 31 |
+
int (*load)(CONF *conf, const char *name, long *eline);
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
struct conf_st {
|
| 35 |
+
CONF_METHOD *meth;
|
| 36 |
+
void *meth_data;
|
| 37 |
+
LHASH_OF(CONF_VALUE) *data;
|
| 38 |
+
int flag_dollarid;
|
| 39 |
+
int flag_abspath;
|
| 40 |
+
char *includedir;
|
| 41 |
+
OSSL_LIB_CTX *libctx;
|
| 42 |
+
};
|
| 43 |
+
|
| 44 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/core.h
ADDED
|
@@ -0,0 +1,235 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CORE_H
|
| 11 |
+
#define OPENSSL_CORE_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <stddef.h>
|
| 15 |
+
#include <openssl/types.h>
|
| 16 |
+
|
| 17 |
+
#ifdef __cplusplus
|
| 18 |
+
extern "C" {
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
/*-
|
| 22 |
+
* Base types
|
| 23 |
+
* ----------
|
| 24 |
+
*
|
| 25 |
+
* These are the types that the OpenSSL core and providers have in common
|
| 26 |
+
* to communicate data between them.
|
| 27 |
+
*/
|
| 28 |
+
|
| 29 |
+
/* Opaque handles to be used with core upcall functions from providers */
|
| 30 |
+
typedef struct ossl_core_handle_st OSSL_CORE_HANDLE;
|
| 31 |
+
typedef struct openssl_core_ctx_st OPENSSL_CORE_CTX;
|
| 32 |
+
typedef struct ossl_core_bio_st OSSL_CORE_BIO;
|
| 33 |
+
|
| 34 |
+
/*
|
| 35 |
+
* Dispatch table element. function_id numbers and the functions are defined
|
| 36 |
+
* in core_dispatch.h, see macros with 'OSSL_CORE_MAKE_FUNC' in their names.
|
| 37 |
+
*
|
| 38 |
+
* An array of these is always terminated by function_id == 0
|
| 39 |
+
*/
|
| 40 |
+
struct ossl_dispatch_st {
|
| 41 |
+
int function_id;
|
| 42 |
+
void (*function)(void);
|
| 43 |
+
};
|
| 44 |
+
|
| 45 |
+
#define OSSL_DISPATCH_END \
|
| 46 |
+
{ 0, NULL }
|
| 47 |
+
|
| 48 |
+
/*
|
| 49 |
+
* Other items, essentially an int<->pointer map element.
|
| 50 |
+
*
|
| 51 |
+
* We make this type distinct from OSSL_DISPATCH to ensure that dispatch
|
| 52 |
+
* tables remain tables with function pointers only.
|
| 53 |
+
*
|
| 54 |
+
* This is used whenever we need to pass things like a table of error reason
|
| 55 |
+
* codes <-> reason string maps, ...
|
| 56 |
+
*
|
| 57 |
+
* Usage determines which field works as key if any, rather than field order.
|
| 58 |
+
*
|
| 59 |
+
* An array of these is always terminated by id == 0 && ptr == NULL
|
| 60 |
+
*/
|
| 61 |
+
struct ossl_item_st {
|
| 62 |
+
unsigned int id;
|
| 63 |
+
void *ptr;
|
| 64 |
+
};
|
| 65 |
+
|
| 66 |
+
/*
|
| 67 |
+
* Type to tie together algorithm names, property definition string and
|
| 68 |
+
* the algorithm implementation in the form of a dispatch table.
|
| 69 |
+
*
|
| 70 |
+
* An array of these is always terminated by algorithm_names == NULL
|
| 71 |
+
*/
|
| 72 |
+
struct ossl_algorithm_st {
|
| 73 |
+
const char *algorithm_names; /* key */
|
| 74 |
+
const char *property_definition; /* key */
|
| 75 |
+
const OSSL_DISPATCH *implementation;
|
| 76 |
+
const char *algorithm_description;
|
| 77 |
+
};
|
| 78 |
+
|
| 79 |
+
/*
|
| 80 |
+
* Type to pass object data in a uniform way, without exposing the object
|
| 81 |
+
* structure.
|
| 82 |
+
*
|
| 83 |
+
* An array of these is always terminated by key == NULL
|
| 84 |
+
*/
|
| 85 |
+
struct ossl_param_st {
|
| 86 |
+
const char *key; /* the name of the parameter */
|
| 87 |
+
unsigned int data_type; /* declare what kind of content is in buffer */
|
| 88 |
+
void *data; /* value being passed in or out */
|
| 89 |
+
size_t data_size; /* data size */
|
| 90 |
+
size_t return_size; /* returned content size */
|
| 91 |
+
};
|
| 92 |
+
|
| 93 |
+
/* Currently supported OSSL_PARAM data types */
|
| 94 |
+
/*
|
| 95 |
+
* OSSL_PARAM_INTEGER and OSSL_PARAM_UNSIGNED_INTEGER
|
| 96 |
+
* are arbitrary length and therefore require an arbitrarily sized buffer,
|
| 97 |
+
* since they may be used to pass numbers larger than what is natively
|
| 98 |
+
* available.
|
| 99 |
+
*
|
| 100 |
+
* The number must be buffered in native form, i.e. MSB first on B_ENDIAN
|
| 101 |
+
* systems and LSB first on L_ENDIAN systems. This means that arbitrary
|
| 102 |
+
* native integers can be stored in the buffer, just make sure that the
|
| 103 |
+
* buffer size is correct and the buffer itself is properly aligned (for
|
| 104 |
+
* example by having the buffer field point at a C integer).
|
| 105 |
+
*/
|
| 106 |
+
#define OSSL_PARAM_INTEGER 1
|
| 107 |
+
#define OSSL_PARAM_UNSIGNED_INTEGER 2
|
| 108 |
+
/*-
|
| 109 |
+
* OSSL_PARAM_REAL
|
| 110 |
+
* is a C binary floating point values in native form and alignment.
|
| 111 |
+
*/
|
| 112 |
+
#define OSSL_PARAM_REAL 3
|
| 113 |
+
/*-
|
| 114 |
+
* OSSL_PARAM_UTF8_STRING
|
| 115 |
+
* is a printable string. It is expected to be printed as it is.
|
| 116 |
+
*/
|
| 117 |
+
#define OSSL_PARAM_UTF8_STRING 4
|
| 118 |
+
/*-
|
| 119 |
+
* OSSL_PARAM_OCTET_STRING
|
| 120 |
+
* is a string of bytes with no further specification. It is expected to be
|
| 121 |
+
* printed as a hexdump.
|
| 122 |
+
*/
|
| 123 |
+
#define OSSL_PARAM_OCTET_STRING 5
|
| 124 |
+
/*-
|
| 125 |
+
* OSSL_PARAM_UTF8_PTR
|
| 126 |
+
* is a pointer to a printable string. It is expected to be printed as it is.
|
| 127 |
+
*
|
| 128 |
+
* The difference between this and OSSL_PARAM_UTF8_STRING is that only pointers
|
| 129 |
+
* are manipulated for this type.
|
| 130 |
+
*
|
| 131 |
+
* This is more relevant for parameter requests, where the responding
|
| 132 |
+
* function doesn't need to copy the data to the provided buffer, but
|
| 133 |
+
* sets the provided buffer to point at the actual data instead.
|
| 134 |
+
*
|
| 135 |
+
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
| 136 |
+
* data and its location are constant.
|
| 137 |
+
*
|
| 138 |
+
* EXTRA WARNING! If you are not completely sure you most likely want
|
| 139 |
+
* to use the OSSL_PARAM_UTF8_STRING type.
|
| 140 |
+
*/
|
| 141 |
+
#define OSSL_PARAM_UTF8_PTR 6
|
| 142 |
+
/*-
|
| 143 |
+
* OSSL_PARAM_OCTET_PTR
|
| 144 |
+
* is a pointer to a string of bytes with no further specification. It is
|
| 145 |
+
* expected to be printed as a hexdump.
|
| 146 |
+
*
|
| 147 |
+
* The difference between this and OSSL_PARAM_OCTET_STRING is that only pointers
|
| 148 |
+
* are manipulated for this type.
|
| 149 |
+
*
|
| 150 |
+
* This is more relevant for parameter requests, where the responding
|
| 151 |
+
* function doesn't need to copy the data to the provided buffer, but
|
| 152 |
+
* sets the provided buffer to point at the actual data instead.
|
| 153 |
+
*
|
| 154 |
+
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
| 155 |
+
* data and its location are constant.
|
| 156 |
+
*
|
| 157 |
+
* EXTRA WARNING! If you are not completely sure you most likely want
|
| 158 |
+
* to use the OSSL_PARAM_OCTET_STRING type.
|
| 159 |
+
*/
|
| 160 |
+
#define OSSL_PARAM_OCTET_PTR 7
|
| 161 |
+
|
| 162 |
+
/*
|
| 163 |
+
* Typedef for the thread stop handling callback. Used both internally and by
|
| 164 |
+
* providers.
|
| 165 |
+
*
|
| 166 |
+
* Providers may register for notifications about threads stopping by
|
| 167 |
+
* registering a callback to hear about such events. Providers register the
|
| 168 |
+
* callback using the OSSL_FUNC_CORE_THREAD_START function in the |in| dispatch
|
| 169 |
+
* table passed to OSSL_provider_init(). The arg passed back to a provider will
|
| 170 |
+
* be the provider side context object.
|
| 171 |
+
*/
|
| 172 |
+
typedef void (*OSSL_thread_stop_handler_fn)(void *arg);
|
| 173 |
+
|
| 174 |
+
/*-
|
| 175 |
+
* Provider entry point
|
| 176 |
+
* --------------------
|
| 177 |
+
*
|
| 178 |
+
* This function is expected to be present in any dynamically loadable
|
| 179 |
+
* provider module. By definition, if this function doesn't exist in a
|
| 180 |
+
* module, that module is not an OpenSSL provider module.
|
| 181 |
+
*/
|
| 182 |
+
/*-
|
| 183 |
+
* |handle| pointer to opaque type OSSL_CORE_HANDLE. This can be used
|
| 184 |
+
* together with some functions passed via |in| to query data.
|
| 185 |
+
* |in| is the array of functions that the Core passes to the provider.
|
| 186 |
+
* |out| will be the array of base functions that the provider passes
|
| 187 |
+
* back to the Core.
|
| 188 |
+
* |provctx| a provider side context object, optionally created if the
|
| 189 |
+
* provider needs it. This value is passed to other provider
|
| 190 |
+
* functions, notably other context constructors.
|
| 191 |
+
*/
|
| 192 |
+
typedef int(OSSL_provider_init_fn)(const OSSL_CORE_HANDLE *handle,
|
| 193 |
+
const OSSL_DISPATCH *in,
|
| 194 |
+
const OSSL_DISPATCH **out,
|
| 195 |
+
void **provctx);
|
| 196 |
+
#ifdef __VMS
|
| 197 |
+
#pragma names save
|
| 198 |
+
#pragma names uppercase, truncated
|
| 199 |
+
#endif
|
| 200 |
+
OPENSSL_EXPORT OSSL_provider_init_fn OSSL_provider_init;
|
| 201 |
+
#ifdef __VMS
|
| 202 |
+
#pragma names restore
|
| 203 |
+
#endif
|
| 204 |
+
|
| 205 |
+
/*
|
| 206 |
+
* Generic callback function signature.
|
| 207 |
+
*
|
| 208 |
+
* The expectation is that any provider function that wants to offer
|
| 209 |
+
* a callback / hook can do so by taking an argument with this type,
|
| 210 |
+
* as well as a pointer to caller-specific data. When calling the
|
| 211 |
+
* callback, the provider function can populate an OSSL_PARAM array
|
| 212 |
+
* with data of its choice and pass that in the callback call, along
|
| 213 |
+
* with the caller data argument.
|
| 214 |
+
*
|
| 215 |
+
* libcrypto may use the OSSL_PARAM array to create arguments for an
|
| 216 |
+
* application callback it knows about.
|
| 217 |
+
*/
|
| 218 |
+
typedef int(OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
|
| 219 |
+
typedef int(OSSL_INOUT_CALLBACK)(const OSSL_PARAM in_params[],
|
| 220 |
+
OSSL_PARAM out_params[], void *arg);
|
| 221 |
+
/*
|
| 222 |
+
* Passphrase callback function signature
|
| 223 |
+
*
|
| 224 |
+
* This is similar to the generic callback function above, but adds a
|
| 225 |
+
* result parameter.
|
| 226 |
+
*/
|
| 227 |
+
typedef int(OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
|
| 228 |
+
size_t *pass_len,
|
| 229 |
+
const OSSL_PARAM params[], void *arg);
|
| 230 |
+
|
| 231 |
+
#ifdef __cplusplus
|
| 232 |
+
}
|
| 233 |
+
#endif
|
| 234 |
+
|
| 235 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/core_dispatch.h
ADDED
|
@@ -0,0 +1,1061 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2026 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CORE_NUMBERS_H
|
| 11 |
+
#define OPENSSL_CORE_NUMBERS_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <stdarg.h>
|
| 15 |
+
#include <openssl/core.h>
|
| 16 |
+
#include <openssl/indicator.h>
|
| 17 |
+
|
| 18 |
+
#ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
#endif
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* Generic function pointer for provider method arrays, or other contexts where
|
| 24 |
+
* functions of various signatures must occupy a common slot in an array of
|
| 25 |
+
* structures.
|
| 26 |
+
*/
|
| 27 |
+
typedef void (*OSSL_FUNC)(void);
|
| 28 |
+
|
| 29 |
+
/*-
|
| 30 |
+
* Identities
|
| 31 |
+
* ----------
|
| 32 |
+
*
|
| 33 |
+
* All series start with 1, to allow 0 to be an array terminator.
|
| 34 |
+
* For any FUNC identity, we also provide a function signature typedef
|
| 35 |
+
* and a static inline function to extract a function pointer from a
|
| 36 |
+
* OSSL_DISPATCH element in a type safe manner.
|
| 37 |
+
*
|
| 38 |
+
* Names:
|
| 39 |
+
* for any function base name 'foo' (uppercase form 'FOO'), we will have
|
| 40 |
+
* the following:
|
| 41 |
+
* - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
|
| 42 |
+
* thereof (to be specified further down)
|
| 43 |
+
* - a function signature typedef with the name OSSL_FUNC_'foo'_fn
|
| 44 |
+
* - a function pointer extractor function with the name OSSL_FUNC_'foo'
|
| 45 |
+
*/
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Helper macro to create the function signature typedef and the extractor
|
| 49 |
+
* |type| is the return-type of the function, |name| is the name of the
|
| 50 |
+
* function to fetch, and |args| is a parenthesized list of parameters
|
| 51 |
+
* for the function (that is, it is |name|'s function signature).
|
| 52 |
+
* Note: This is considered a "reserved" internal macro. Applications should
|
| 53 |
+
* not use this or assume its existence.
|
| 54 |
+
*/
|
| 55 |
+
#define OSSL_CORE_MAKE_FUNC(type, name, args) \
|
| 56 |
+
typedef type(OSSL_FUNC_##name##_fn) args; \
|
| 57 |
+
static ossl_unused ossl_inline \
|
| 58 |
+
OSSL_FUNC_##name##_fn * \
|
| 59 |
+
OSSL_FUNC_##name(const OSSL_DISPATCH *opf) \
|
| 60 |
+
{ \
|
| 61 |
+
return (OSSL_FUNC_##name##_fn *)opf->function; \
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* Core function identities, for the two OSSL_DISPATCH tables being passed
|
| 66 |
+
* in the OSSL_provider_init call.
|
| 67 |
+
*
|
| 68 |
+
* 0 serves as a marker for the end of the OSSL_DISPATCH array, and must
|
| 69 |
+
* therefore NEVER be used as a function identity.
|
| 70 |
+
*/
|
| 71 |
+
/* Functions provided by the Core to the provider, reserved numbers 1-1023 */
|
| 72 |
+
#define OSSL_FUNC_CORE_GETTABLE_PARAMS 1
|
| 73 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 74 |
+
core_gettable_params, (const OSSL_CORE_HANDLE *prov))
|
| 75 |
+
#define OSSL_FUNC_CORE_GET_PARAMS 2
|
| 76 |
+
OSSL_CORE_MAKE_FUNC(int, core_get_params, (const OSSL_CORE_HANDLE *prov, OSSL_PARAM params[]))
|
| 77 |
+
#define OSSL_FUNC_CORE_THREAD_START 3
|
| 78 |
+
OSSL_CORE_MAKE_FUNC(int, core_thread_start, (const OSSL_CORE_HANDLE *prov, OSSL_thread_stop_handler_fn handfn, void *arg))
|
| 79 |
+
#define OSSL_FUNC_CORE_GET_LIBCTX 4
|
| 80 |
+
OSSL_CORE_MAKE_FUNC(OPENSSL_CORE_CTX *, core_get_libctx,
|
| 81 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 82 |
+
#define OSSL_FUNC_CORE_NEW_ERROR 5
|
| 83 |
+
OSSL_CORE_MAKE_FUNC(void, core_new_error, (const OSSL_CORE_HANDLE *prov))
|
| 84 |
+
#define OSSL_FUNC_CORE_SET_ERROR_DEBUG 6
|
| 85 |
+
OSSL_CORE_MAKE_FUNC(void, core_set_error_debug,
|
| 86 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 87 |
+
const char *file, int line, const char *func))
|
| 88 |
+
#define OSSL_FUNC_CORE_VSET_ERROR 7
|
| 89 |
+
OSSL_CORE_MAKE_FUNC(void, core_vset_error,
|
| 90 |
+
(const OSSL_CORE_HANDLE *prov,
|
| 91 |
+
uint32_t reason, const char *fmt, va_list args))
|
| 92 |
+
#define OSSL_FUNC_CORE_SET_ERROR_MARK 8
|
| 93 |
+
OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_CORE_HANDLE *prov))
|
| 94 |
+
#define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK 9
|
| 95 |
+
OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
|
| 96 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 97 |
+
#define OSSL_FUNC_CORE_POP_ERROR_TO_MARK 10
|
| 98 |
+
OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 99 |
+
|
| 100 |
+
/* Functions to access the OBJ database */
|
| 101 |
+
|
| 102 |
+
#define OSSL_FUNC_CORE_OBJ_ADD_SIGID 11
|
| 103 |
+
#define OSSL_FUNC_CORE_OBJ_CREATE 12
|
| 104 |
+
|
| 105 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_add_sigid,
|
| 106 |
+
(const OSSL_CORE_HANDLE *prov, const char *sign_name,
|
| 107 |
+
const char *digest_name, const char *pkey_name))
|
| 108 |
+
OSSL_CORE_MAKE_FUNC(int, core_obj_create,
|
| 109 |
+
(const OSSL_CORE_HANDLE *prov, const char *oid,
|
| 110 |
+
const char *sn, const char *ln))
|
| 111 |
+
|
| 112 |
+
/* Memory allocation, freeing, clearing. */
|
| 113 |
+
#define OSSL_FUNC_CRYPTO_MALLOC 20
|
| 114 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 115 |
+
CRYPTO_malloc, (size_t num, const char *file, int line))
|
| 116 |
+
#define OSSL_FUNC_CRYPTO_ZALLOC 21
|
| 117 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 118 |
+
CRYPTO_zalloc, (size_t num, const char *file, int line))
|
| 119 |
+
#define OSSL_FUNC_CRYPTO_FREE 22
|
| 120 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 121 |
+
CRYPTO_free, (void *ptr, const char *file, int line))
|
| 122 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_FREE 23
|
| 123 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 124 |
+
CRYPTO_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 125 |
+
#define OSSL_FUNC_CRYPTO_REALLOC 24
|
| 126 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 127 |
+
CRYPTO_realloc, (void *addr, size_t num, const char *file, int line))
|
| 128 |
+
#define OSSL_FUNC_CRYPTO_CLEAR_REALLOC 25
|
| 129 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 130 |
+
CRYPTO_clear_realloc, (void *addr, size_t old_num, size_t num, const char *file, int line))
|
| 131 |
+
#define OSSL_FUNC_CRYPTO_SECURE_MALLOC 26
|
| 132 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 133 |
+
CRYPTO_secure_malloc, (size_t num, const char *file, int line))
|
| 134 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ZALLOC 27
|
| 135 |
+
OSSL_CORE_MAKE_FUNC(void *,
|
| 136 |
+
CRYPTO_secure_zalloc, (size_t num, const char *file, int line))
|
| 137 |
+
#define OSSL_FUNC_CRYPTO_SECURE_FREE 28
|
| 138 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 139 |
+
CRYPTO_secure_free, (void *ptr, const char *file, int line))
|
| 140 |
+
#define OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE 29
|
| 141 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 142 |
+
CRYPTO_secure_clear_free, (void *ptr, size_t num, const char *file, int line))
|
| 143 |
+
#define OSSL_FUNC_CRYPTO_SECURE_ALLOCATED 30
|
| 144 |
+
OSSL_CORE_MAKE_FUNC(int,
|
| 145 |
+
CRYPTO_secure_allocated, (const void *ptr))
|
| 146 |
+
#define OSSL_FUNC_OPENSSL_CLEANSE 31
|
| 147 |
+
OSSL_CORE_MAKE_FUNC(void,
|
| 148 |
+
OPENSSL_cleanse, (void *ptr, size_t len))
|
| 149 |
+
|
| 150 |
+
/* Bio functions provided by the core */
|
| 151 |
+
#define OSSL_FUNC_BIO_NEW_FILE 40
|
| 152 |
+
#define OSSL_FUNC_BIO_NEW_MEMBUF 41
|
| 153 |
+
#define OSSL_FUNC_BIO_READ_EX 42
|
| 154 |
+
#define OSSL_FUNC_BIO_WRITE_EX 43
|
| 155 |
+
#define OSSL_FUNC_BIO_UP_REF 44
|
| 156 |
+
#define OSSL_FUNC_BIO_FREE 45
|
| 157 |
+
#define OSSL_FUNC_BIO_VPRINTF 46
|
| 158 |
+
#define OSSL_FUNC_BIO_VSNPRINTF 47
|
| 159 |
+
#define OSSL_FUNC_BIO_PUTS 48
|
| 160 |
+
#define OSSL_FUNC_BIO_GETS 49
|
| 161 |
+
#define OSSL_FUNC_BIO_CTRL 50
|
| 162 |
+
|
| 163 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_file, (const char *filename, const char *mode))
|
| 164 |
+
OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_membuf, (const void *buf, int len))
|
| 165 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (OSSL_CORE_BIO *bio, void *data, size_t data_len, size_t *bytes_read))
|
| 166 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_write_ex, (OSSL_CORE_BIO *bio, const void *data, size_t data_len, size_t *written))
|
| 167 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_gets, (OSSL_CORE_BIO *bio, char *buf, int size))
|
| 168 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_puts, (OSSL_CORE_BIO *bio, const char *str))
|
| 169 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_up_ref, (OSSL_CORE_BIO *bio))
|
| 170 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_free, (OSSL_CORE_BIO *bio))
|
| 171 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (OSSL_CORE_BIO *bio, const char *format, va_list args))
|
| 172 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
|
| 173 |
+
(char *buf, size_t n, const char *fmt, va_list args))
|
| 174 |
+
OSSL_CORE_MAKE_FUNC(int, BIO_ctrl, (OSSL_CORE_BIO *bio, int cmd, long num, void *ptr))
|
| 175 |
+
|
| 176 |
+
/* New seeding functions prototypes with the 101-104 series */
|
| 177 |
+
#define OSSL_FUNC_CLEANUP_USER_ENTROPY 96
|
| 178 |
+
#define OSSL_FUNC_CLEANUP_USER_NONCE 97
|
| 179 |
+
#define OSSL_FUNC_GET_USER_ENTROPY 98
|
| 180 |
+
#define OSSL_FUNC_GET_USER_NONCE 99
|
| 181 |
+
|
| 182 |
+
#define OSSL_FUNC_INDICATOR_CB 95
|
| 183 |
+
OSSL_CORE_MAKE_FUNC(void, indicator_cb, (OPENSSL_CORE_CTX *ctx, OSSL_INDICATOR_CALLBACK **cb))
|
| 184 |
+
#define OSSL_FUNC_SELF_TEST_CB 100
|
| 185 |
+
OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb, void **cbarg))
|
| 186 |
+
|
| 187 |
+
/* Functions to get seed material from the operating system */
|
| 188 |
+
#define OSSL_FUNC_GET_ENTROPY 101
|
| 189 |
+
#define OSSL_FUNC_CLEANUP_ENTROPY 102
|
| 190 |
+
#define OSSL_FUNC_GET_NONCE 103
|
| 191 |
+
#define OSSL_FUNC_CLEANUP_NONCE 104
|
| 192 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 193 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, int entropy, size_t min_len, size_t max_len))
|
| 194 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 195 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_entropy, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 196 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 197 |
+
OSSL_CORE_MAKE_FUNC(size_t, get_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char **pout, size_t min_len, size_t max_len, const void *salt, size_t salt_len))
|
| 198 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 199 |
+
OSSL_CORE_MAKE_FUNC(void, cleanup_user_nonce, (const OSSL_CORE_HANDLE *handle, unsigned char *buf, size_t len))
|
| 200 |
+
|
| 201 |
+
/* Functions to access the core's providers */
|
| 202 |
+
#define OSSL_FUNC_PROVIDER_REGISTER_CHILD_CB 105
|
| 203 |
+
#define OSSL_FUNC_PROVIDER_DEREGISTER_CHILD_CB 106
|
| 204 |
+
#define OSSL_FUNC_PROVIDER_NAME 107
|
| 205 |
+
#define OSSL_FUNC_PROVIDER_GET0_PROVIDER_CTX 108
|
| 206 |
+
#define OSSL_FUNC_PROVIDER_GET0_DISPATCH 109
|
| 207 |
+
#define OSSL_FUNC_PROVIDER_UP_REF 110
|
| 208 |
+
#define OSSL_FUNC_PROVIDER_FREE 111
|
| 209 |
+
|
| 210 |
+
OSSL_CORE_MAKE_FUNC(int, provider_register_child_cb,
|
| 211 |
+
(const OSSL_CORE_HANDLE *handle,
|
| 212 |
+
int (*create_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 213 |
+
int (*remove_cb)(const OSSL_CORE_HANDLE *provider, void *cbdata),
|
| 214 |
+
int (*global_props_cb)(const char *props, void *cbdata),
|
| 215 |
+
void *cbdata))
|
| 216 |
+
OSSL_CORE_MAKE_FUNC(void, provider_deregister_child_cb,
|
| 217 |
+
(const OSSL_CORE_HANDLE *handle))
|
| 218 |
+
OSSL_CORE_MAKE_FUNC(const char *, provider_name,
|
| 219 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 220 |
+
OSSL_CORE_MAKE_FUNC(void *, provider_get0_provider_ctx,
|
| 221 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 222 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_DISPATCH *, provider_get0_dispatch,
|
| 223 |
+
(const OSSL_CORE_HANDLE *prov))
|
| 224 |
+
OSSL_CORE_MAKE_FUNC(int, provider_up_ref,
|
| 225 |
+
(const OSSL_CORE_HANDLE *prov, int activate))
|
| 226 |
+
OSSL_CORE_MAKE_FUNC(int, provider_free,
|
| 227 |
+
(const OSSL_CORE_HANDLE *prov, int deactivate))
|
| 228 |
+
|
| 229 |
+
/* Additional error functions provided by the core */
|
| 230 |
+
#define OSSL_FUNC_CORE_COUNT_TO_MARK 120
|
| 231 |
+
OSSL_CORE_MAKE_FUNC(int, core_count_to_mark, (const OSSL_CORE_HANDLE *prov))
|
| 232 |
+
|
| 233 |
+
/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
|
| 234 |
+
#define OSSL_FUNC_PROVIDER_TEARDOWN 1024
|
| 235 |
+
OSSL_CORE_MAKE_FUNC(void, provider_teardown, (void *provctx))
|
| 236 |
+
#define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS 1025
|
| 237 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 238 |
+
provider_gettable_params, (void *provctx))
|
| 239 |
+
#define OSSL_FUNC_PROVIDER_GET_PARAMS 1026
|
| 240 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_params, (void *provctx, OSSL_PARAM params[]))
|
| 241 |
+
#define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027
|
| 242 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *, provider_query_operation,
|
| 243 |
+
(void *provctx, int operation_id, int *no_store))
|
| 244 |
+
#define OSSL_FUNC_PROVIDER_UNQUERY_OPERATION 1028
|
| 245 |
+
OSSL_CORE_MAKE_FUNC(void, provider_unquery_operation,
|
| 246 |
+
(void *provctx, int operation_id, const OSSL_ALGORITHM *))
|
| 247 |
+
#define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1029
|
| 248 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *, provider_get_reason_strings,
|
| 249 |
+
(void *provctx))
|
| 250 |
+
#define OSSL_FUNC_PROVIDER_GET_CAPABILITIES 1030
|
| 251 |
+
OSSL_CORE_MAKE_FUNC(int, provider_get_capabilities, (void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg))
|
| 252 |
+
#define OSSL_FUNC_PROVIDER_SELF_TEST 1031
|
| 253 |
+
OSSL_CORE_MAKE_FUNC(int, provider_self_test, (void *provctx))
|
| 254 |
+
#define OSSL_FUNC_PROVIDER_RANDOM_BYTES 1032
|
| 255 |
+
OSSL_CORE_MAKE_FUNC(int, provider_random_bytes, (void *provctx, int which, void *buf, size_t n, unsigned int strength))
|
| 256 |
+
|
| 257 |
+
/* Libssl related functions */
|
| 258 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_SEND 2001
|
| 259 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_send,
|
| 260 |
+
(SSL *s, const unsigned char *buf, size_t buf_len,
|
| 261 |
+
size_t *consumed, void *arg))
|
| 262 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RECV_RCD 2002
|
| 263 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_recv_rcd,
|
| 264 |
+
(SSL *s, const unsigned char **buf, size_t *bytes_read,
|
| 265 |
+
void *arg))
|
| 266 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_CRYPTO_RELEASE_RCD 2003
|
| 267 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_crypto_release_rcd,
|
| 268 |
+
(SSL *s, size_t bytes_read, void *arg))
|
| 269 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_YIELD_SECRET 2004
|
| 270 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_yield_secret,
|
| 271 |
+
(SSL *s, uint32_t prot_level, int direction,
|
| 272 |
+
const unsigned char *secret, size_t secret_len, void *arg))
|
| 273 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_GOT_TRANSPORT_PARAMS 2005
|
| 274 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_got_transport_params,
|
| 275 |
+
(SSL *s, const unsigned char *params, size_t params_len,
|
| 276 |
+
void *arg))
|
| 277 |
+
#define OSSL_FUNC_SSL_QUIC_TLS_ALERT 2006
|
| 278 |
+
OSSL_CORE_MAKE_FUNC(int, SSL_QUIC_TLS_alert,
|
| 279 |
+
(SSL *s, unsigned char alert_code, void *arg))
|
| 280 |
+
|
| 281 |
+
/* Operations */
|
| 282 |
+
|
| 283 |
+
#define OSSL_OP_DIGEST 1
|
| 284 |
+
#define OSSL_OP_CIPHER 2 /* Symmetric Ciphers */
|
| 285 |
+
#define OSSL_OP_MAC 3
|
| 286 |
+
#define OSSL_OP_KDF 4
|
| 287 |
+
#define OSSL_OP_RAND 5
|
| 288 |
+
#define OSSL_OP_KEYMGMT 10
|
| 289 |
+
#define OSSL_OP_KEYEXCH 11
|
| 290 |
+
#define OSSL_OP_SIGNATURE 12
|
| 291 |
+
#define OSSL_OP_ASYM_CIPHER 13
|
| 292 |
+
#define OSSL_OP_KEM 14
|
| 293 |
+
#define OSSL_OP_SKEYMGMT 15
|
| 294 |
+
/* New section for non-EVP operations */
|
| 295 |
+
#define OSSL_OP_ENCODER 20
|
| 296 |
+
#define OSSL_OP_DECODER 21
|
| 297 |
+
#define OSSL_OP_STORE 22
|
| 298 |
+
/* Highest known operation number */
|
| 299 |
+
#define OSSL_OP__HIGHEST 22
|
| 300 |
+
|
| 301 |
+
/* Digests */
|
| 302 |
+
|
| 303 |
+
#define OSSL_FUNC_DIGEST_NEWCTX 1
|
| 304 |
+
#define OSSL_FUNC_DIGEST_INIT 2
|
| 305 |
+
#define OSSL_FUNC_DIGEST_UPDATE 3
|
| 306 |
+
#define OSSL_FUNC_DIGEST_FINAL 4
|
| 307 |
+
#define OSSL_FUNC_DIGEST_DIGEST 5
|
| 308 |
+
#define OSSL_FUNC_DIGEST_FREECTX 6
|
| 309 |
+
#define OSSL_FUNC_DIGEST_DUPCTX 7
|
| 310 |
+
#define OSSL_FUNC_DIGEST_GET_PARAMS 8
|
| 311 |
+
#define OSSL_FUNC_DIGEST_SET_CTX_PARAMS 9
|
| 312 |
+
#define OSSL_FUNC_DIGEST_GET_CTX_PARAMS 10
|
| 313 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_PARAMS 11
|
| 314 |
+
#define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS 12
|
| 315 |
+
#define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS 13
|
| 316 |
+
#define OSSL_FUNC_DIGEST_SQUEEZE 14
|
| 317 |
+
#define OSSL_FUNC_DIGEST_COPYCTX 15
|
| 318 |
+
|
| 319 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_newctx, (void *provctx))
|
| 320 |
+
OSSL_CORE_MAKE_FUNC(int, digest_init, (void *dctx, const OSSL_PARAM params[]))
|
| 321 |
+
OSSL_CORE_MAKE_FUNC(int, digest_update,
|
| 322 |
+
(void *dctx, const unsigned char *in, size_t inl))
|
| 323 |
+
OSSL_CORE_MAKE_FUNC(int, digest_final,
|
| 324 |
+
(void *dctx,
|
| 325 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 326 |
+
OSSL_CORE_MAKE_FUNC(int, digest_squeeze,
|
| 327 |
+
(void *dctx,
|
| 328 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 329 |
+
OSSL_CORE_MAKE_FUNC(int, digest_digest,
|
| 330 |
+
(void *provctx, const unsigned char *in, size_t inl,
|
| 331 |
+
unsigned char *out, size_t *outl, size_t outsz))
|
| 332 |
+
|
| 333 |
+
OSSL_CORE_MAKE_FUNC(void, digest_freectx, (void *dctx))
|
| 334 |
+
OSSL_CORE_MAKE_FUNC(void *, digest_dupctx, (void *dctx))
|
| 335 |
+
OSSL_CORE_MAKE_FUNC(void, digest_copyctx, (void *outctx, void *inctx))
|
| 336 |
+
|
| 337 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_params, (OSSL_PARAM params[]))
|
| 338 |
+
OSSL_CORE_MAKE_FUNC(int, digest_set_ctx_params,
|
| 339 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 340 |
+
OSSL_CORE_MAKE_FUNC(int, digest_get_ctx_params,
|
| 341 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 342 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params,
|
| 343 |
+
(void *provctx))
|
| 344 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params,
|
| 345 |
+
(void *dctx, void *provctx))
|
| 346 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params,
|
| 347 |
+
(void *dctx, void *provctx))
|
| 348 |
+
|
| 349 |
+
/* Symmetric Ciphers */
|
| 350 |
+
|
| 351 |
+
#define OSSL_FUNC_CIPHER_NEWCTX 1
|
| 352 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_INIT 2
|
| 353 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_INIT 3
|
| 354 |
+
#define OSSL_FUNC_CIPHER_UPDATE 4
|
| 355 |
+
#define OSSL_FUNC_CIPHER_FINAL 5
|
| 356 |
+
#define OSSL_FUNC_CIPHER_CIPHER 6
|
| 357 |
+
#define OSSL_FUNC_CIPHER_FREECTX 7
|
| 358 |
+
#define OSSL_FUNC_CIPHER_DUPCTX 8
|
| 359 |
+
#define OSSL_FUNC_CIPHER_GET_PARAMS 9
|
| 360 |
+
#define OSSL_FUNC_CIPHER_GET_CTX_PARAMS 10
|
| 361 |
+
#define OSSL_FUNC_CIPHER_SET_CTX_PARAMS 11
|
| 362 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_PARAMS 12
|
| 363 |
+
#define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS 13
|
| 364 |
+
#define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS 14
|
| 365 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_ENCRYPT_INIT 15
|
| 366 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_DECRYPT_INIT 16
|
| 367 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_UPDATE 17
|
| 368 |
+
#define OSSL_FUNC_CIPHER_PIPELINE_FINAL 18
|
| 369 |
+
#define OSSL_FUNC_CIPHER_ENCRYPT_SKEY_INIT 19
|
| 370 |
+
#define OSSL_FUNC_CIPHER_DECRYPT_SKEY_INIT 20
|
| 371 |
+
|
| 372 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_newctx, (void *provctx))
|
| 373 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 374 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_init, (void *cctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 375 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_update,
|
| 376 |
+
(void *cctx,
|
| 377 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 378 |
+
const unsigned char *in, size_t inl))
|
| 379 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_final,
|
| 380 |
+
(void *cctx,
|
| 381 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 382 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_cipher,
|
| 383 |
+
(void *cctx,
|
| 384 |
+
unsigned char *out, size_t *outl, size_t outsize,
|
| 385 |
+
const unsigned char *in, size_t inl))
|
| 386 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_encrypt_init,
|
| 387 |
+
(void *cctx,
|
| 388 |
+
const unsigned char *key, size_t keylen,
|
| 389 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 390 |
+
const OSSL_PARAM params[]))
|
| 391 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_decrypt_init,
|
| 392 |
+
(void *cctx,
|
| 393 |
+
const unsigned char *key, size_t keylen,
|
| 394 |
+
size_t numpipes, const unsigned char **iv, size_t ivlen,
|
| 395 |
+
const OSSL_PARAM params[]))
|
| 396 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_update,
|
| 397 |
+
(void *cctx, size_t numpipes,
|
| 398 |
+
unsigned char **out, size_t *outl, const size_t *outsize,
|
| 399 |
+
const unsigned char **in, const size_t *inl))
|
| 400 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_pipeline_final,
|
| 401 |
+
(void *cctx, size_t numpipes,
|
| 402 |
+
unsigned char **out, size_t *outl, const size_t *outsize))
|
| 403 |
+
OSSL_CORE_MAKE_FUNC(void, cipher_freectx, (void *cctx))
|
| 404 |
+
OSSL_CORE_MAKE_FUNC(void *, cipher_dupctx, (void *cctx))
|
| 405 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_params, (OSSL_PARAM params[]))
|
| 406 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_get_ctx_params, (void *cctx, OSSL_PARAM params[]))
|
| 407 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_set_ctx_params, (void *cctx, const OSSL_PARAM params[]))
|
| 408 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params,
|
| 409 |
+
(void *provctx))
|
| 410 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params,
|
| 411 |
+
(void *cctx, void *provctx))
|
| 412 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params,
|
| 413 |
+
(void *cctx, void *provctx))
|
| 414 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_encrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 415 |
+
OSSL_CORE_MAKE_FUNC(int, cipher_decrypt_skey_init, (void *cctx, void *skeydata, const unsigned char *iv, size_t ivlen, const OSSL_PARAM params[]))
|
| 416 |
+
|
| 417 |
+
/* MACs */
|
| 418 |
+
|
| 419 |
+
#define OSSL_FUNC_MAC_NEWCTX 1
|
| 420 |
+
#define OSSL_FUNC_MAC_DUPCTX 2
|
| 421 |
+
#define OSSL_FUNC_MAC_FREECTX 3
|
| 422 |
+
#define OSSL_FUNC_MAC_INIT 4
|
| 423 |
+
#define OSSL_FUNC_MAC_UPDATE 5
|
| 424 |
+
#define OSSL_FUNC_MAC_FINAL 6
|
| 425 |
+
#define OSSL_FUNC_MAC_GET_PARAMS 7
|
| 426 |
+
#define OSSL_FUNC_MAC_GET_CTX_PARAMS 8
|
| 427 |
+
#define OSSL_FUNC_MAC_SET_CTX_PARAMS 9
|
| 428 |
+
#define OSSL_FUNC_MAC_GETTABLE_PARAMS 10
|
| 429 |
+
#define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS 11
|
| 430 |
+
#define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS 12
|
| 431 |
+
#define OSSL_FUNC_MAC_INIT_SKEY 13
|
| 432 |
+
|
| 433 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_newctx, (void *provctx))
|
| 434 |
+
OSSL_CORE_MAKE_FUNC(void *, mac_dupctx, (void *src))
|
| 435 |
+
OSSL_CORE_MAKE_FUNC(void, mac_freectx, (void *mctx))
|
| 436 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init, (void *mctx, const unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 437 |
+
OSSL_CORE_MAKE_FUNC(int, mac_update,
|
| 438 |
+
(void *mctx, const unsigned char *in, size_t inl))
|
| 439 |
+
OSSL_CORE_MAKE_FUNC(int, mac_final,
|
| 440 |
+
(void *mctx,
|
| 441 |
+
unsigned char *out, size_t *outl, size_t outsize))
|
| 442 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void *provctx))
|
| 443 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params,
|
| 444 |
+
(void *mctx, void *provctx))
|
| 445 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params,
|
| 446 |
+
(void *mctx, void *provctx))
|
| 447 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_params, (OSSL_PARAM params[]))
|
| 448 |
+
OSSL_CORE_MAKE_FUNC(int, mac_get_ctx_params,
|
| 449 |
+
(void *mctx, OSSL_PARAM params[]))
|
| 450 |
+
OSSL_CORE_MAKE_FUNC(int, mac_set_ctx_params,
|
| 451 |
+
(void *mctx, const OSSL_PARAM params[]))
|
| 452 |
+
OSSL_CORE_MAKE_FUNC(int, mac_init_skey, (void *mctx, void *key, const OSSL_PARAM params[]))
|
| 453 |
+
|
| 454 |
+
/*-
|
| 455 |
+
* Symmetric key management
|
| 456 |
+
*
|
| 457 |
+
* The Key Management takes care of provider side of symmetric key objects, and
|
| 458 |
+
* includes essentially everything that manipulates the keys themselves and
|
| 459 |
+
* their parameters.
|
| 460 |
+
*
|
| 461 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 462 |
+
* to contain parameters if the key has any, and the secret key.
|
| 463 |
+
*
|
| 464 |
+
* Key objects are created with OSSL_FUNC_skeymgmt_import() (there is no
|
| 465 |
+
* dedicated memory allocation function), exported with
|
| 466 |
+
* OSSL_FUNC_skeymgmt_export() and destroyed with OSSL_FUNC_keymgmt_free().
|
| 467 |
+
*
|
| 468 |
+
*/
|
| 469 |
+
|
| 470 |
+
/* Key data subset selection - individual bits */
|
| 471 |
+
#define OSSL_SKEYMGMT_SELECT_PARAMETERS 0x01
|
| 472 |
+
#define OSSL_SKEYMGMT_SELECT_SECRET_KEY 0x02
|
| 473 |
+
|
| 474 |
+
/* Key data subset selection - combinations */
|
| 475 |
+
#define OSSL_SKEYMGMT_SELECT_ALL \
|
| 476 |
+
(OSSL_SKEYMGMT_SELECT_PARAMETERS | OSSL_SKEYMGMT_SELECT_SECRET_KEY)
|
| 477 |
+
|
| 478 |
+
#define OSSL_FUNC_SKEYMGMT_FREE 1
|
| 479 |
+
#define OSSL_FUNC_SKEYMGMT_IMPORT 2
|
| 480 |
+
#define OSSL_FUNC_SKEYMGMT_EXPORT 3
|
| 481 |
+
#define OSSL_FUNC_SKEYMGMT_GENERATE 4
|
| 482 |
+
#define OSSL_FUNC_SKEYMGMT_GET_KEY_ID 5
|
| 483 |
+
#define OSSL_FUNC_SKEYMGMT_IMP_SETTABLE_PARAMS 6
|
| 484 |
+
#define OSSL_FUNC_SKEYMGMT_GEN_SETTABLE_PARAMS 7
|
| 485 |
+
|
| 486 |
+
OSSL_CORE_MAKE_FUNC(void, skeymgmt_free, (void *keydata))
|
| 487 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 488 |
+
skeymgmt_imp_settable_params, (void *provctx))
|
| 489 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_import, (void *provctx, int selection, const OSSL_PARAM params[]))
|
| 490 |
+
OSSL_CORE_MAKE_FUNC(int, skeymgmt_export,
|
| 491 |
+
(void *keydata, int selection,
|
| 492 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 493 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 494 |
+
skeymgmt_gen_settable_params, (void *provctx))
|
| 495 |
+
OSSL_CORE_MAKE_FUNC(void *, skeymgmt_generate, (void *provctx, const OSSL_PARAM params[]))
|
| 496 |
+
OSSL_CORE_MAKE_FUNC(const char *, skeymgmt_get_key_id, (void *keydata))
|
| 497 |
+
|
| 498 |
+
/* KDFs and PRFs */
|
| 499 |
+
|
| 500 |
+
#define OSSL_FUNC_KDF_NEWCTX 1
|
| 501 |
+
#define OSSL_FUNC_KDF_DUPCTX 2
|
| 502 |
+
#define OSSL_FUNC_KDF_FREECTX 3
|
| 503 |
+
#define OSSL_FUNC_KDF_RESET 4
|
| 504 |
+
#define OSSL_FUNC_KDF_DERIVE 5
|
| 505 |
+
#define OSSL_FUNC_KDF_GETTABLE_PARAMS 6
|
| 506 |
+
#define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS 7
|
| 507 |
+
#define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS 8
|
| 508 |
+
#define OSSL_FUNC_KDF_GET_PARAMS 9
|
| 509 |
+
#define OSSL_FUNC_KDF_GET_CTX_PARAMS 10
|
| 510 |
+
#define OSSL_FUNC_KDF_SET_CTX_PARAMS 11
|
| 511 |
+
#define OSSL_FUNC_KDF_SET_SKEY 12
|
| 512 |
+
#define OSSL_FUNC_KDF_DERIVE_SKEY 13
|
| 513 |
+
|
| 514 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_newctx, (void *provctx))
|
| 515 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_dupctx, (void *src))
|
| 516 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_freectx, (void *kctx))
|
| 517 |
+
OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
|
| 518 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_derive, (void *kctx, unsigned char *key, size_t keylen, const OSSL_PARAM params[]))
|
| 519 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void *provctx))
|
| 520 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params,
|
| 521 |
+
(void *kctx, void *provctx))
|
| 522 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params,
|
| 523 |
+
(void *kctx, void *provctx))
|
| 524 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_params, (OSSL_PARAM params[]))
|
| 525 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_get_ctx_params,
|
| 526 |
+
(void *kctx, OSSL_PARAM params[]))
|
| 527 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_set_ctx_params,
|
| 528 |
+
(void *kctx, const OSSL_PARAM params[]))
|
| 529 |
+
OSSL_CORE_MAKE_FUNC(int, kdf_set_skey,
|
| 530 |
+
(void *kctx, void *skeydata, const char *paramname))
|
| 531 |
+
OSSL_CORE_MAKE_FUNC(void *, kdf_derive_skey, (void *ctx, const char *key_type, void *provctx, OSSL_FUNC_skeymgmt_import_fn *import, size_t keylen, const OSSL_PARAM params[]))
|
| 532 |
+
|
| 533 |
+
/* RAND */
|
| 534 |
+
|
| 535 |
+
#define OSSL_FUNC_RAND_NEWCTX 1
|
| 536 |
+
#define OSSL_FUNC_RAND_FREECTX 2
|
| 537 |
+
#define OSSL_FUNC_RAND_INSTANTIATE 3
|
| 538 |
+
#define OSSL_FUNC_RAND_UNINSTANTIATE 4
|
| 539 |
+
#define OSSL_FUNC_RAND_GENERATE 5
|
| 540 |
+
#define OSSL_FUNC_RAND_RESEED 6
|
| 541 |
+
#define OSSL_FUNC_RAND_NONCE 7
|
| 542 |
+
#define OSSL_FUNC_RAND_ENABLE_LOCKING 8
|
| 543 |
+
#define OSSL_FUNC_RAND_LOCK 9
|
| 544 |
+
#define OSSL_FUNC_RAND_UNLOCK 10
|
| 545 |
+
#define OSSL_FUNC_RAND_GETTABLE_PARAMS 11
|
| 546 |
+
#define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS 12
|
| 547 |
+
#define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS 13
|
| 548 |
+
#define OSSL_FUNC_RAND_GET_PARAMS 14
|
| 549 |
+
#define OSSL_FUNC_RAND_GET_CTX_PARAMS 15
|
| 550 |
+
#define OSSL_FUNC_RAND_SET_CTX_PARAMS 16
|
| 551 |
+
#define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 17
|
| 552 |
+
#define OSSL_FUNC_RAND_GET_SEED 18
|
| 553 |
+
#define OSSL_FUNC_RAND_CLEAR_SEED 19
|
| 554 |
+
|
| 555 |
+
OSSL_CORE_MAKE_FUNC(void *, rand_newctx,
|
| 556 |
+
(void *provctx, void *parent,
|
| 557 |
+
const OSSL_DISPATCH *parent_calls))
|
| 558 |
+
OSSL_CORE_MAKE_FUNC(void, rand_freectx, (void *vctx))
|
| 559 |
+
OSSL_CORE_MAKE_FUNC(int, rand_instantiate,
|
| 560 |
+
(void *vdrbg, unsigned int strength,
|
| 561 |
+
int prediction_resistance,
|
| 562 |
+
const unsigned char *pstr, size_t pstr_len,
|
| 563 |
+
const OSSL_PARAM params[]))
|
| 564 |
+
OSSL_CORE_MAKE_FUNC(int, rand_uninstantiate, (void *vdrbg))
|
| 565 |
+
OSSL_CORE_MAKE_FUNC(int, rand_generate,
|
| 566 |
+
(void *vctx, unsigned char *out, size_t outlen,
|
| 567 |
+
unsigned int strength, int prediction_resistance,
|
| 568 |
+
const unsigned char *addin, size_t addin_len))
|
| 569 |
+
OSSL_CORE_MAKE_FUNC(int, rand_reseed,
|
| 570 |
+
(void *vctx, int prediction_resistance,
|
| 571 |
+
const unsigned char *ent, size_t ent_len,
|
| 572 |
+
const unsigned char *addin, size_t addin_len))
|
| 573 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_nonce,
|
| 574 |
+
(void *vctx, unsigned char *out, unsigned int strength,
|
| 575 |
+
size_t min_noncelen, size_t max_noncelen))
|
| 576 |
+
OSSL_CORE_MAKE_FUNC(int, rand_enable_locking, (void *vctx))
|
| 577 |
+
OSSL_CORE_MAKE_FUNC(int, rand_lock, (void *vctx))
|
| 578 |
+
OSSL_CORE_MAKE_FUNC(void, rand_unlock, (void *vctx))
|
| 579 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_params, (void *provctx))
|
| 580 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_gettable_ctx_params,
|
| 581 |
+
(void *vctx, void *provctx))
|
| 582 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, rand_settable_ctx_params,
|
| 583 |
+
(void *vctx, void *provctx))
|
| 584 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_params, (OSSL_PARAM params[]))
|
| 585 |
+
OSSL_CORE_MAKE_FUNC(int, rand_get_ctx_params,
|
| 586 |
+
(void *vctx, OSSL_PARAM params[]))
|
| 587 |
+
OSSL_CORE_MAKE_FUNC(int, rand_set_ctx_params,
|
| 588 |
+
(void *vctx, const OSSL_PARAM params[]))
|
| 589 |
+
OSSL_CORE_MAKE_FUNC(void, rand_set_callbacks,
|
| 590 |
+
(void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
|
| 591 |
+
OSSL_CALLBACK *cleanup_entropy,
|
| 592 |
+
OSSL_INOUT_CALLBACK *get_nonce,
|
| 593 |
+
OSSL_CALLBACK *cleanup_nonce, void *arg))
|
| 594 |
+
OSSL_CORE_MAKE_FUNC(int, rand_verify_zeroization,
|
| 595 |
+
(void *vctx))
|
| 596 |
+
OSSL_CORE_MAKE_FUNC(size_t, rand_get_seed,
|
| 597 |
+
(void *vctx, unsigned char **buffer,
|
| 598 |
+
int entropy, size_t min_len, size_t max_len,
|
| 599 |
+
int prediction_resistance,
|
| 600 |
+
const unsigned char *adin, size_t adin_len))
|
| 601 |
+
OSSL_CORE_MAKE_FUNC(void, rand_clear_seed,
|
| 602 |
+
(void *vctx, unsigned char *buffer, size_t b_len))
|
| 603 |
+
|
| 604 |
+
/*-
|
| 605 |
+
* Key management
|
| 606 |
+
*
|
| 607 |
+
* The Key Management takes care of provider side key objects, and includes
|
| 608 |
+
* all current functionality to create them, destroy them, set parameters
|
| 609 |
+
* and key material, etc, essentially everything that manipulates the keys
|
| 610 |
+
* themselves and their parameters.
|
| 611 |
+
*
|
| 612 |
+
* The key objects are commonly referred to as |keydata|, and it MUST be able
|
| 613 |
+
* to contain parameters if the key has any, the public key and the private
|
| 614 |
+
* key. All parts are optional, but their presence determines what can be
|
| 615 |
+
* done with the key object in terms of encryption, signature, and so on.
|
| 616 |
+
* The assumption from libcrypto is that the key object contains any of the
|
| 617 |
+
* following data combinations:
|
| 618 |
+
*
|
| 619 |
+
* - parameters only
|
| 620 |
+
* - public key only
|
| 621 |
+
* - public key + private key
|
| 622 |
+
* - parameters + public key
|
| 623 |
+
* - parameters + public key + private key
|
| 624 |
+
*
|
| 625 |
+
* What "parameters", "public key" and "private key" means in detail is left
|
| 626 |
+
* to the implementation. In the case of DH and DSA, they would typically
|
| 627 |
+
* include domain parameters, while for certain variants of RSA, they would
|
| 628 |
+
* typically include PSS or OAEP parameters.
|
| 629 |
+
*
|
| 630 |
+
* Key objects are created with OSSL_FUNC_keymgmt_new() and destroyed with
|
| 631 |
+
* OSSL_FUNC_keymgmt_free(). Key objects can have data filled in with
|
| 632 |
+
* OSSL_FUNC_keymgmt_import().
|
| 633 |
+
*
|
| 634 |
+
* Three functions are made available to check what selection of data is
|
| 635 |
+
* present in a key object: OSSL_FUNC_keymgmt_has_parameters(),
|
| 636 |
+
* OSSL_FUNC_keymgmt_has_public_key(), and OSSL_FUNC_keymgmt_has_private_key(),
|
| 637 |
+
*/
|
| 638 |
+
|
| 639 |
+
/* Key data subset selection - individual bits */
|
| 640 |
+
#define OSSL_KEYMGMT_SELECT_PRIVATE_KEY 0x01
|
| 641 |
+
#define OSSL_KEYMGMT_SELECT_PUBLIC_KEY 0x02
|
| 642 |
+
#define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS 0x04
|
| 643 |
+
#define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS 0x80
|
| 644 |
+
|
| 645 |
+
/* Key data subset selection - combinations */
|
| 646 |
+
#define OSSL_KEYMGMT_SELECT_ALL_PARAMETERS \
|
| 647 |
+
(OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS \
|
| 648 |
+
| OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
|
| 649 |
+
#define OSSL_KEYMGMT_SELECT_KEYPAIR \
|
| 650 |
+
(OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY)
|
| 651 |
+
#define OSSL_KEYMGMT_SELECT_ALL \
|
| 652 |
+
(OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS)
|
| 653 |
+
|
| 654 |
+
#define OSSL_KEYMGMT_VALIDATE_FULL_CHECK 0
|
| 655 |
+
#define OSSL_KEYMGMT_VALIDATE_QUICK_CHECK 1
|
| 656 |
+
|
| 657 |
+
/* Basic key object creation */
|
| 658 |
+
#define OSSL_FUNC_KEYMGMT_NEW 1
|
| 659 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_new, (void *provctx))
|
| 660 |
+
|
| 661 |
+
/* Generation, a more complex constructor */
|
| 662 |
+
#define OSSL_FUNC_KEYMGMT_GEN_INIT 2
|
| 663 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
|
| 664 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
|
| 665 |
+
#define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
|
| 666 |
+
#define OSSL_FUNC_KEYMGMT_GEN 6
|
| 667 |
+
#define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 7
|
| 668 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 15
|
| 669 |
+
#define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 16
|
| 670 |
+
|
| 671 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen_init,
|
| 672 |
+
(void *provctx, int selection, const OSSL_PARAM params[]))
|
| 673 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_template,
|
| 674 |
+
(void *genctx, void *templ))
|
| 675 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_params,
|
| 676 |
+
(void *genctx, const OSSL_PARAM params[]))
|
| 677 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
| 678 |
+
keymgmt_gen_settable_params,
|
| 679 |
+
(void *genctx, void *provctx))
|
| 680 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_get_params,
|
| 681 |
+
(void *genctx, OSSL_PARAM params[]))
|
| 682 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gen_gettable_params,
|
| 683 |
+
(void *genctx, void *provctx))
|
| 684 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen,
|
| 685 |
+
(void *genctx, OSSL_CALLBACK *cb, void *cbarg))
|
| 686 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_gen_cleanup, (void *genctx))
|
| 687 |
+
|
| 688 |
+
/* Key loading by object reference */
|
| 689 |
+
#define OSSL_FUNC_KEYMGMT_LOAD 8
|
| 690 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_load,
|
| 691 |
+
(const void *reference, size_t reference_sz))
|
| 692 |
+
|
| 693 |
+
/* Basic key object destruction */
|
| 694 |
+
#define OSSL_FUNC_KEYMGMT_FREE 10
|
| 695 |
+
OSSL_CORE_MAKE_FUNC(void, keymgmt_free, (void *keydata))
|
| 696 |
+
|
| 697 |
+
/* Key object information, with discovery */
|
| 698 |
+
#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
|
| 699 |
+
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
|
| 700 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_get_params,
|
| 701 |
+
(void *keydata, OSSL_PARAM params[]))
|
| 702 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_gettable_params,
|
| 703 |
+
(void *provctx))
|
| 704 |
+
|
| 705 |
+
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
|
| 706 |
+
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
|
| 707 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_set_params,
|
| 708 |
+
(void *keydata, const OSSL_PARAM params[]))
|
| 709 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_settable_params,
|
| 710 |
+
(void *provctx))
|
| 711 |
+
|
| 712 |
+
/* Key checks - discovery of supported operations */
|
| 713 |
+
#define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 20
|
| 714 |
+
OSSL_CORE_MAKE_FUNC(const char *, keymgmt_query_operation_name,
|
| 715 |
+
(int operation_id))
|
| 716 |
+
|
| 717 |
+
/* Key checks - key data content checks */
|
| 718 |
+
#define OSSL_FUNC_KEYMGMT_HAS 21
|
| 719 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_has, (const void *keydata, int selection))
|
| 720 |
+
|
| 721 |
+
/* Key checks - validation */
|
| 722 |
+
#define OSSL_FUNC_KEYMGMT_VALIDATE 22
|
| 723 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_validate, (const void *keydata, int selection, int checktype))
|
| 724 |
+
|
| 725 |
+
/* Key checks - matching */
|
| 726 |
+
#define OSSL_FUNC_KEYMGMT_MATCH 23
|
| 727 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_match,
|
| 728 |
+
(const void *keydata1, const void *keydata2,
|
| 729 |
+
int selection))
|
| 730 |
+
|
| 731 |
+
/* Import and export functions, with discovery */
|
| 732 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT 40
|
| 733 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES 41
|
| 734 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT 42
|
| 735 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES 43
|
| 736 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_import,
|
| 737 |
+
(void *keydata, int selection, const OSSL_PARAM params[]))
|
| 738 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types,
|
| 739 |
+
(int selection))
|
| 740 |
+
OSSL_CORE_MAKE_FUNC(int, keymgmt_export,
|
| 741 |
+
(void *keydata, int selection,
|
| 742 |
+
OSSL_CALLBACK *param_cb, void *cbarg))
|
| 743 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types,
|
| 744 |
+
(int selection))
|
| 745 |
+
|
| 746 |
+
/* Dup function, constructor */
|
| 747 |
+
#define OSSL_FUNC_KEYMGMT_DUP 44
|
| 748 |
+
OSSL_CORE_MAKE_FUNC(void *, keymgmt_dup,
|
| 749 |
+
(const void *keydata_from, int selection))
|
| 750 |
+
|
| 751 |
+
/* Extended import and export functions */
|
| 752 |
+
#define OSSL_FUNC_KEYMGMT_IMPORT_TYPES_EX 45
|
| 753 |
+
#define OSSL_FUNC_KEYMGMT_EXPORT_TYPES_EX 46
|
| 754 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types_ex,
|
| 755 |
+
(void *provctx, int selection))
|
| 756 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_export_types_ex,
|
| 757 |
+
(void *provctx, int selection))
|
| 758 |
+
|
| 759 |
+
/* Key Exchange */
|
| 760 |
+
|
| 761 |
+
#define OSSL_FUNC_KEYEXCH_NEWCTX 1
|
| 762 |
+
#define OSSL_FUNC_KEYEXCH_INIT 2
|
| 763 |
+
#define OSSL_FUNC_KEYEXCH_DERIVE 3
|
| 764 |
+
#define OSSL_FUNC_KEYEXCH_SET_PEER 4
|
| 765 |
+
#define OSSL_FUNC_KEYEXCH_FREECTX 5
|
| 766 |
+
#define OSSL_FUNC_KEYEXCH_DUPCTX 6
|
| 767 |
+
#define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS 7
|
| 768 |
+
#define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS 8
|
| 769 |
+
#define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS 9
|
| 770 |
+
#define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS 10
|
| 771 |
+
#define OSSL_FUNC_KEYEXCH_DERIVE_SKEY 11
|
| 772 |
+
|
| 773 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_newctx, (void *provctx))
|
| 774 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 775 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_derive, (void *ctx, unsigned char *secret, size_t *secretlen, size_t outlen))
|
| 776 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_peer, (void *ctx, void *provkey))
|
| 777 |
+
OSSL_CORE_MAKE_FUNC(void, keyexch_freectx, (void *ctx))
|
| 778 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_dupctx, (void *ctx))
|
| 779 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_set_ctx_params, (void *ctx, const OSSL_PARAM params[]))
|
| 780 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_settable_ctx_params,
|
| 781 |
+
(void *ctx, void *provctx))
|
| 782 |
+
OSSL_CORE_MAKE_FUNC(int, keyexch_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 783 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_gettable_ctx_params,
|
| 784 |
+
(void *ctx, void *provctx))
|
| 785 |
+
OSSL_CORE_MAKE_FUNC(void *, keyexch_derive_skey, (void *ctx, const char *key_type, void *provctx, OSSL_FUNC_skeymgmt_import_fn *import, size_t keylen, const OSSL_PARAM params[]))
|
| 786 |
+
|
| 787 |
+
/* Signature */
|
| 788 |
+
|
| 789 |
+
#define OSSL_FUNC_SIGNATURE_NEWCTX 1
|
| 790 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_INIT 2
|
| 791 |
+
#define OSSL_FUNC_SIGNATURE_SIGN 3
|
| 792 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_INIT 4
|
| 793 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY 5
|
| 794 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT 6
|
| 795 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER 7
|
| 796 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
|
| 797 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
|
| 798 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
|
| 799 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
|
| 800 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
|
| 801 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
|
| 802 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
|
| 803 |
+
#define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
|
| 804 |
+
#define OSSL_FUNC_SIGNATURE_FREECTX 16
|
| 805 |
+
#define OSSL_FUNC_SIGNATURE_DUPCTX 17
|
| 806 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
|
| 807 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
|
| 808 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
|
| 809 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
|
| 810 |
+
#define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
|
| 811 |
+
#define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
|
| 812 |
+
#define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
|
| 813 |
+
#define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
|
| 814 |
+
#define OSSL_FUNC_SIGNATURE_QUERY_KEY_TYPES 26
|
| 815 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_INIT 27
|
| 816 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_UPDATE 28
|
| 817 |
+
#define OSSL_FUNC_SIGNATURE_SIGN_MESSAGE_FINAL 29
|
| 818 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_INIT 30
|
| 819 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_UPDATE 31
|
| 820 |
+
#define OSSL_FUNC_SIGNATURE_VERIFY_MESSAGE_FINAL 32
|
| 821 |
+
|
| 822 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_newctx, (void *provctx, const char *propq))
|
| 823 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 824 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign, (void *ctx, unsigned char *sig, size_t *siglen, size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 825 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_init,
|
| 826 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 827 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_update,
|
| 828 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 829 |
+
OSSL_CORE_MAKE_FUNC(int, signature_sign_message_final,
|
| 830 |
+
(void *ctx, unsigned char *sig,
|
| 831 |
+
size_t *siglen, size_t sigsize))
|
| 832 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 833 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify, (void *ctx, const unsigned char *sig, size_t siglen, const unsigned char *tbs, size_t tbslen))
|
| 834 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_init,
|
| 835 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 836 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_update,
|
| 837 |
+
(void *ctx, const unsigned char *in, size_t inlen))
|
| 838 |
+
/*
|
| 839 |
+
* signature_verify_final requires that the signature to be verified against
|
| 840 |
+
* is specified via an OSSL_PARAM.
|
| 841 |
+
*/
|
| 842 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_message_final, (void *ctx))
|
| 843 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover_init,
|
| 844 |
+
(void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 845 |
+
OSSL_CORE_MAKE_FUNC(int, signature_verify_recover,
|
| 846 |
+
(void *ctx, unsigned char *rout, size_t *routlen,
|
| 847 |
+
size_t routsize, const unsigned char *sig, size_t siglen))
|
| 848 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_init,
|
| 849 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 850 |
+
const OSSL_PARAM params[]))
|
| 851 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_update,
|
| 852 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 853 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_final,
|
| 854 |
+
(void *ctx, unsigned char *sig, size_t *siglen,
|
| 855 |
+
size_t sigsize))
|
| 856 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_sign,
|
| 857 |
+
(void *ctx, unsigned char *sigret, size_t *siglen,
|
| 858 |
+
size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
| 859 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_init,
|
| 860 |
+
(void *ctx, const char *mdname, void *provkey,
|
| 861 |
+
const OSSL_PARAM params[]))
|
| 862 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_update,
|
| 863 |
+
(void *ctx, const unsigned char *data, size_t datalen))
|
| 864 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_final,
|
| 865 |
+
(void *ctx, const unsigned char *sig, size_t siglen))
|
| 866 |
+
OSSL_CORE_MAKE_FUNC(int, signature_digest_verify,
|
| 867 |
+
(void *ctx, const unsigned char *sig, size_t siglen,
|
| 868 |
+
const unsigned char *tbs, size_t tbslen))
|
| 869 |
+
OSSL_CORE_MAKE_FUNC(void, signature_freectx, (void *ctx))
|
| 870 |
+
OSSL_CORE_MAKE_FUNC(void *, signature_dupctx, (void *ctx))
|
| 871 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_params,
|
| 872 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 873 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_params,
|
| 874 |
+
(void *ctx, void *provctx))
|
| 875 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_params,
|
| 876 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 877 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_params,
|
| 878 |
+
(void *ctx, void *provctx))
|
| 879 |
+
OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_md_params,
|
| 880 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 881 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_md_params,
|
| 882 |
+
(void *ctx))
|
| 883 |
+
OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_md_params,
|
| 884 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 885 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_md_params,
|
| 886 |
+
(void *ctx))
|
| 887 |
+
OSSL_CORE_MAKE_FUNC(const char **, signature_query_key_types, (void))
|
| 888 |
+
|
| 889 |
+
/* Asymmetric Ciphers */
|
| 890 |
+
|
| 891 |
+
#define OSSL_FUNC_ASYM_CIPHER_NEWCTX 1
|
| 892 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT 2
|
| 893 |
+
#define OSSL_FUNC_ASYM_CIPHER_ENCRYPT 3
|
| 894 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT 4
|
| 895 |
+
#define OSSL_FUNC_ASYM_CIPHER_DECRYPT 5
|
| 896 |
+
#define OSSL_FUNC_ASYM_CIPHER_FREECTX 6
|
| 897 |
+
#define OSSL_FUNC_ASYM_CIPHER_DUPCTX 7
|
| 898 |
+
#define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS 8
|
| 899 |
+
#define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS 9
|
| 900 |
+
#define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS 10
|
| 901 |
+
#define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS 11
|
| 902 |
+
|
| 903 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_newctx, (void *provctx))
|
| 904 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 905 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 906 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 907 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt, (void *ctx, unsigned char *out, size_t *outlen, size_t outsize, const unsigned char *in, size_t inlen))
|
| 908 |
+
OSSL_CORE_MAKE_FUNC(void, asym_cipher_freectx, (void *ctx))
|
| 909 |
+
OSSL_CORE_MAKE_FUNC(void *, asym_cipher_dupctx, (void *ctx))
|
| 910 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_get_ctx_params,
|
| 911 |
+
(void *ctx, OSSL_PARAM params[]))
|
| 912 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_gettable_ctx_params,
|
| 913 |
+
(void *ctx, void *provctx))
|
| 914 |
+
OSSL_CORE_MAKE_FUNC(int, asym_cipher_set_ctx_params,
|
| 915 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 916 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_settable_ctx_params,
|
| 917 |
+
(void *ctx, void *provctx))
|
| 918 |
+
|
| 919 |
+
/* Asymmetric Key encapsulation */
|
| 920 |
+
#define OSSL_FUNC_KEM_NEWCTX 1
|
| 921 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE_INIT 2
|
| 922 |
+
#define OSSL_FUNC_KEM_ENCAPSULATE 3
|
| 923 |
+
#define OSSL_FUNC_KEM_DECAPSULATE_INIT 4
|
| 924 |
+
#define OSSL_FUNC_KEM_DECAPSULATE 5
|
| 925 |
+
#define OSSL_FUNC_KEM_FREECTX 6
|
| 926 |
+
#define OSSL_FUNC_KEM_DUPCTX 7
|
| 927 |
+
#define OSSL_FUNC_KEM_GET_CTX_PARAMS 8
|
| 928 |
+
#define OSSL_FUNC_KEM_GETTABLE_CTX_PARAMS 9
|
| 929 |
+
#define OSSL_FUNC_KEM_SET_CTX_PARAMS 10
|
| 930 |
+
#define OSSL_FUNC_KEM_SETTABLE_CTX_PARAMS 11
|
| 931 |
+
#define OSSL_FUNC_KEM_AUTH_ENCAPSULATE_INIT 12
|
| 932 |
+
#define OSSL_FUNC_KEM_AUTH_DECAPSULATE_INIT 13
|
| 933 |
+
|
| 934 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_newctx, (void *provctx))
|
| 935 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 936 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_encapsulate_init, (void *ctx, void *provkey, void *authprivkey, const OSSL_PARAM params[]))
|
| 937 |
+
OSSL_CORE_MAKE_FUNC(int, kem_encapsulate, (void *ctx, unsigned char *out, size_t *outlen, unsigned char *secret, size_t *secretlen))
|
| 938 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate_init, (void *ctx, void *provkey, const OSSL_PARAM params[]))
|
| 939 |
+
OSSL_CORE_MAKE_FUNC(int, kem_auth_decapsulate_init, (void *ctx, void *provkey, void *authpubkey, const OSSL_PARAM params[]))
|
| 940 |
+
OSSL_CORE_MAKE_FUNC(int, kem_decapsulate, (void *ctx, unsigned char *out, size_t *outlen, const unsigned char *in, size_t inlen))
|
| 941 |
+
OSSL_CORE_MAKE_FUNC(void, kem_freectx, (void *ctx))
|
| 942 |
+
OSSL_CORE_MAKE_FUNC(void *, kem_dupctx, (void *ctx))
|
| 943 |
+
OSSL_CORE_MAKE_FUNC(int, kem_get_ctx_params, (void *ctx, OSSL_PARAM params[]))
|
| 944 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_gettable_ctx_params,
|
| 945 |
+
(void *ctx, void *provctx))
|
| 946 |
+
OSSL_CORE_MAKE_FUNC(int, kem_set_ctx_params,
|
| 947 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 948 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kem_settable_ctx_params,
|
| 949 |
+
(void *ctx, void *provctx))
|
| 950 |
+
|
| 951 |
+
/* Encoders and decoders */
|
| 952 |
+
#define OSSL_FUNC_ENCODER_NEWCTX 1
|
| 953 |
+
#define OSSL_FUNC_ENCODER_FREECTX 2
|
| 954 |
+
#define OSSL_FUNC_ENCODER_GET_PARAMS 3
|
| 955 |
+
#define OSSL_FUNC_ENCODER_GETTABLE_PARAMS 4
|
| 956 |
+
#define OSSL_FUNC_ENCODER_SET_CTX_PARAMS 5
|
| 957 |
+
#define OSSL_FUNC_ENCODER_SETTABLE_CTX_PARAMS 6
|
| 958 |
+
#define OSSL_FUNC_ENCODER_DOES_SELECTION 10
|
| 959 |
+
#define OSSL_FUNC_ENCODER_ENCODE 11
|
| 960 |
+
#define OSSL_FUNC_ENCODER_IMPORT_OBJECT 20
|
| 961 |
+
#define OSSL_FUNC_ENCODER_FREE_OBJECT 21
|
| 962 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_newctx, (void *provctx))
|
| 963 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_freectx, (void *ctx))
|
| 964 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_get_params, (OSSL_PARAM params[]))
|
| 965 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_gettable_params,
|
| 966 |
+
(void *provctx))
|
| 967 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_set_ctx_params,
|
| 968 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 969 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, encoder_settable_ctx_params,
|
| 970 |
+
(void *provctx))
|
| 971 |
+
|
| 972 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_does_selection,
|
| 973 |
+
(void *provctx, int selection))
|
| 974 |
+
OSSL_CORE_MAKE_FUNC(int, encoder_encode,
|
| 975 |
+
(void *ctx, OSSL_CORE_BIO *out,
|
| 976 |
+
const void *obj_raw, const OSSL_PARAM obj_abstract[],
|
| 977 |
+
int selection,
|
| 978 |
+
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
|
| 979 |
+
|
| 980 |
+
OSSL_CORE_MAKE_FUNC(void *, encoder_import_object,
|
| 981 |
+
(void *ctx, int selection, const OSSL_PARAM params[]))
|
| 982 |
+
OSSL_CORE_MAKE_FUNC(void, encoder_free_object, (void *obj))
|
| 983 |
+
|
| 984 |
+
#define OSSL_FUNC_DECODER_NEWCTX 1
|
| 985 |
+
#define OSSL_FUNC_DECODER_FREECTX 2
|
| 986 |
+
#define OSSL_FUNC_DECODER_GET_PARAMS 3
|
| 987 |
+
#define OSSL_FUNC_DECODER_GETTABLE_PARAMS 4
|
| 988 |
+
#define OSSL_FUNC_DECODER_SET_CTX_PARAMS 5
|
| 989 |
+
#define OSSL_FUNC_DECODER_SETTABLE_CTX_PARAMS 6
|
| 990 |
+
#define OSSL_FUNC_DECODER_DOES_SELECTION 10
|
| 991 |
+
#define OSSL_FUNC_DECODER_DECODE 11
|
| 992 |
+
#define OSSL_FUNC_DECODER_EXPORT_OBJECT 20
|
| 993 |
+
OSSL_CORE_MAKE_FUNC(void *, decoder_newctx, (void *provctx))
|
| 994 |
+
OSSL_CORE_MAKE_FUNC(void, decoder_freectx, (void *ctx))
|
| 995 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_get_params, (OSSL_PARAM params[]))
|
| 996 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_gettable_params,
|
| 997 |
+
(void *provctx))
|
| 998 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_set_ctx_params,
|
| 999 |
+
(void *ctx, const OSSL_PARAM params[]))
|
| 1000 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, decoder_settable_ctx_params,
|
| 1001 |
+
(void *provctx))
|
| 1002 |
+
|
| 1003 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_does_selection,
|
| 1004 |
+
(void *provctx, int selection))
|
| 1005 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_decode,
|
| 1006 |
+
(void *ctx, OSSL_CORE_BIO *in, int selection,
|
| 1007 |
+
OSSL_CALLBACK *data_cb, void *data_cbarg,
|
| 1008 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1009 |
+
OSSL_CORE_MAKE_FUNC(int, decoder_export_object,
|
| 1010 |
+
(void *ctx, const void *objref, size_t objref_sz,
|
| 1011 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1012 |
+
|
| 1013 |
+
/*-
|
| 1014 |
+
* Store
|
| 1015 |
+
*
|
| 1016 |
+
* Objects are scanned by using the 'open', 'load', 'eof' and 'close'
|
| 1017 |
+
* functions, which implement an OSSL_STORE loader.
|
| 1018 |
+
*
|
| 1019 |
+
* store_load() works in a way that's very similar to the decoders, in
|
| 1020 |
+
* that they pass an abstract object through a callback, either as a DER
|
| 1021 |
+
* octet string or as an object reference, which libcrypto will have to
|
| 1022 |
+
* deal with.
|
| 1023 |
+
*/
|
| 1024 |
+
|
| 1025 |
+
#define OSSL_FUNC_STORE_OPEN 1
|
| 1026 |
+
#define OSSL_FUNC_STORE_ATTACH 2
|
| 1027 |
+
#define OSSL_FUNC_STORE_SETTABLE_CTX_PARAMS 3
|
| 1028 |
+
#define OSSL_FUNC_STORE_SET_CTX_PARAMS 4
|
| 1029 |
+
#define OSSL_FUNC_STORE_LOAD 5
|
| 1030 |
+
#define OSSL_FUNC_STORE_EOF 6
|
| 1031 |
+
#define OSSL_FUNC_STORE_CLOSE 7
|
| 1032 |
+
#define OSSL_FUNC_STORE_EXPORT_OBJECT 8
|
| 1033 |
+
#define OSSL_FUNC_STORE_DELETE 9
|
| 1034 |
+
#define OSSL_FUNC_STORE_OPEN_EX 10
|
| 1035 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open, (void *provctx, const char *uri))
|
| 1036 |
+
OSSL_CORE_MAKE_FUNC(void *, store_attach, (void *provctx, OSSL_CORE_BIO *in))
|
| 1037 |
+
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, store_settable_ctx_params,
|
| 1038 |
+
(void *provctx))
|
| 1039 |
+
OSSL_CORE_MAKE_FUNC(int, store_set_ctx_params,
|
| 1040 |
+
(void *loaderctx, const OSSL_PARAM params[]))
|
| 1041 |
+
OSSL_CORE_MAKE_FUNC(int, store_load,
|
| 1042 |
+
(void *loaderctx,
|
| 1043 |
+
OSSL_CALLBACK *object_cb, void *object_cbarg,
|
| 1044 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1045 |
+
OSSL_CORE_MAKE_FUNC(int, store_eof, (void *loaderctx))
|
| 1046 |
+
OSSL_CORE_MAKE_FUNC(int, store_close, (void *loaderctx))
|
| 1047 |
+
OSSL_CORE_MAKE_FUNC(int, store_export_object,
|
| 1048 |
+
(void *loaderctx, const void *objref, size_t objref_sz,
|
| 1049 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg))
|
| 1050 |
+
OSSL_CORE_MAKE_FUNC(int, store_delete,
|
| 1051 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1052 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1053 |
+
OSSL_CORE_MAKE_FUNC(void *, store_open_ex,
|
| 1054 |
+
(void *provctx, const char *uri, const OSSL_PARAM params[],
|
| 1055 |
+
OSSL_PASSPHRASE_CALLBACK *pw_cb, void *pw_cbarg))
|
| 1056 |
+
|
| 1057 |
+
#ifdef __cplusplus
|
| 1058 |
+
}
|
| 1059 |
+
#endif
|
| 1060 |
+
|
| 1061 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/core_names.h
ADDED
|
@@ -0,0 +1,588 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\core_names.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
/* clang-format off */
|
| 13 |
+
|
| 14 |
+
/* clang-format on */
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_CORE_NAMES_H
|
| 17 |
+
#define OPENSSL_CORE_NAMES_H
|
| 18 |
+
#pragma once
|
| 19 |
+
|
| 20 |
+
#ifdef __cplusplus
|
| 21 |
+
extern "C" {
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
/* OSSL_CIPHER_PARAM_CTS_MODE Values */
|
| 25 |
+
#define OSSL_CIPHER_CTS_MODE_CS1 "CS1"
|
| 26 |
+
#define OSSL_CIPHER_CTS_MODE_CS2 "CS2"
|
| 27 |
+
#define OSSL_CIPHER_CTS_MODE_CS3 "CS3"
|
| 28 |
+
|
| 29 |
+
/* Known CIPHER names (not a complete list) */
|
| 30 |
+
#define OSSL_CIPHER_NAME_AES_128_GCM_SIV "AES-128-GCM-SIV"
|
| 31 |
+
#define OSSL_CIPHER_NAME_AES_192_GCM_SIV "AES-192-GCM-SIV"
|
| 32 |
+
#define OSSL_CIPHER_NAME_AES_256_GCM_SIV "AES-256-GCM-SIV"
|
| 33 |
+
|
| 34 |
+
/* Known DIGEST names (not a complete list) */
|
| 35 |
+
#define OSSL_DIGEST_NAME_MD5 "MD5"
|
| 36 |
+
#define OSSL_DIGEST_NAME_MD5_SHA1 "MD5-SHA1"
|
| 37 |
+
#define OSSL_DIGEST_NAME_SHA1 "SHA1"
|
| 38 |
+
#define OSSL_DIGEST_NAME_SHA2_224 "SHA2-224"
|
| 39 |
+
#define OSSL_DIGEST_NAME_SHA2_256 "SHA2-256"
|
| 40 |
+
#define OSSL_DIGEST_NAME_SHA2_256_192 "SHA2-256/192"
|
| 41 |
+
#define OSSL_DIGEST_NAME_SHA2_384 "SHA2-384"
|
| 42 |
+
#define OSSL_DIGEST_NAME_SHA2_512 "SHA2-512"
|
| 43 |
+
#define OSSL_DIGEST_NAME_SHA2_512_224 "SHA2-512/224"
|
| 44 |
+
#define OSSL_DIGEST_NAME_SHA2_512_256 "SHA2-512/256"
|
| 45 |
+
#define OSSL_DIGEST_NAME_MD2 "MD2"
|
| 46 |
+
#define OSSL_DIGEST_NAME_MD4 "MD4"
|
| 47 |
+
#define OSSL_DIGEST_NAME_MDC2 "MDC2"
|
| 48 |
+
#define OSSL_DIGEST_NAME_RIPEMD160 "RIPEMD160"
|
| 49 |
+
#define OSSL_DIGEST_NAME_SHA3_224 "SHA3-224"
|
| 50 |
+
#define OSSL_DIGEST_NAME_SHA3_256 "SHA3-256"
|
| 51 |
+
#define OSSL_DIGEST_NAME_SHA3_384 "SHA3-384"
|
| 52 |
+
#define OSSL_DIGEST_NAME_SHA3_512 "SHA3-512"
|
| 53 |
+
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
| 54 |
+
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
| 55 |
+
#define OSSL_DIGEST_NAME_SM3 "SM3"
|
| 56 |
+
|
| 57 |
+
/* Known MAC names */
|
| 58 |
+
#define OSSL_MAC_NAME_BLAKE2BMAC "BLAKE2BMAC"
|
| 59 |
+
#define OSSL_MAC_NAME_BLAKE2SMAC "BLAKE2SMAC"
|
| 60 |
+
#define OSSL_MAC_NAME_CMAC "CMAC"
|
| 61 |
+
#define OSSL_MAC_NAME_GMAC "GMAC"
|
| 62 |
+
#define OSSL_MAC_NAME_HMAC "HMAC"
|
| 63 |
+
#define OSSL_MAC_NAME_KMAC128 "KMAC128"
|
| 64 |
+
#define OSSL_MAC_NAME_KMAC256 "KMAC256"
|
| 65 |
+
#define OSSL_MAC_NAME_POLY1305 "POLY1305"
|
| 66 |
+
#define OSSL_MAC_NAME_SIPHASH "SIPHASH"
|
| 67 |
+
|
| 68 |
+
/* Known KDF names */
|
| 69 |
+
#define OSSL_KDF_NAME_HKDF "HKDF"
|
| 70 |
+
#define OSSL_KDF_NAME_HKDF_SHA256 "HKDF-SHA256"
|
| 71 |
+
#define OSSL_KDF_NAME_HKDF_SHA384 "HKDF-SHA384"
|
| 72 |
+
#define OSSL_KDF_NAME_HKDF_SHA512 "HKDF-SHA512"
|
| 73 |
+
#define OSSL_KDF_NAME_TLS1_3_KDF "TLS13-KDF"
|
| 74 |
+
#define OSSL_KDF_NAME_PBKDF1 "PBKDF1"
|
| 75 |
+
#define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
| 76 |
+
#define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
| 77 |
+
#define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
| 78 |
+
#define OSSL_KDF_NAME_SSKDF "SSKDF"
|
| 79 |
+
#define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
| 80 |
+
#define OSSL_KDF_NAME_X942KDF_ASN1 "X942KDF-ASN1"
|
| 81 |
+
#define OSSL_KDF_NAME_X942KDF_CONCAT "X942KDF-CONCAT"
|
| 82 |
+
#define OSSL_KDF_NAME_X963KDF "X963KDF"
|
| 83 |
+
#define OSSL_KDF_NAME_KBKDF "KBKDF"
|
| 84 |
+
#define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
| 85 |
+
#define OSSL_KDF_NAME_HMACDRBGKDF "HMAC-DRBG-KDF"
|
| 86 |
+
|
| 87 |
+
/* RSA padding modes */
|
| 88 |
+
#define OSSL_PKEY_RSA_PAD_MODE_NONE "none"
|
| 89 |
+
#define OSSL_PKEY_RSA_PAD_MODE_PKCSV15 "pkcs1"
|
| 90 |
+
#define OSSL_PKEY_RSA_PAD_MODE_OAEP "oaep"
|
| 91 |
+
#define OSSL_PKEY_RSA_PAD_MODE_X931 "x931"
|
| 92 |
+
#define OSSL_PKEY_RSA_PAD_MODE_PSS "pss"
|
| 93 |
+
|
| 94 |
+
/* RSA pss padding salt length */
|
| 95 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_DIGEST "digest"
|
| 96 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_MAX "max"
|
| 97 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO "auto"
|
| 98 |
+
#define OSSL_PKEY_RSA_PSS_SALT_LEN_AUTO_DIGEST_MAX "auto-digestmax"
|
| 99 |
+
|
| 100 |
+
/* OSSL_PKEY_PARAM_EC_ENCODING values */
|
| 101 |
+
#define OSSL_PKEY_EC_ENCODING_EXPLICIT "explicit"
|
| 102 |
+
#define OSSL_PKEY_EC_ENCODING_GROUP "named_curve"
|
| 103 |
+
|
| 104 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_UNCOMPRESSED "uncompressed"
|
| 105 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_COMPRESSED "compressed"
|
| 106 |
+
#define OSSL_PKEY_EC_POINT_CONVERSION_FORMAT_HYBRID "hybrid"
|
| 107 |
+
|
| 108 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_DEFAULT "default"
|
| 109 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED "named"
|
| 110 |
+
#define OSSL_PKEY_EC_GROUP_CHECK_NAMED_NIST "named-nist"
|
| 111 |
+
|
| 112 |
+
/* PROV_SKEY well known key types */
|
| 113 |
+
#define OSSL_SKEY_TYPE_GENERIC "GENERIC-SECRET"
|
| 114 |
+
#define OSSL_SKEY_TYPE_AES "AES"
|
| 115 |
+
|
| 116 |
+
/* OSSL_KEM_PARAM_OPERATION values */
|
| 117 |
+
#define OSSL_KEM_PARAM_OPERATION_RSASVE "RSASVE"
|
| 118 |
+
#define OSSL_KEM_PARAM_OPERATION_DHKEM "DHKEM"
|
| 119 |
+
|
| 120 |
+
/* Provider configuration variables */
|
| 121 |
+
#define OSSL_PKEY_RETAIN_SEED "pkey_retain_seed"
|
| 122 |
+
|
| 123 |
+
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
| 124 |
+
/* clang-format off */
|
| 125 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID "algorithm-id"
|
| 126 |
+
# define OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS "algorithm-id-params"
|
| 127 |
+
# define OSSL_ALG_PARAM_CIPHER "cipher"
|
| 128 |
+
# define OSSL_ALG_PARAM_DIGEST "digest"
|
| 129 |
+
# define OSSL_ALG_PARAM_ENGINE "engine"
|
| 130 |
+
# define OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR "fips-indicator"
|
| 131 |
+
# define OSSL_ALG_PARAM_MAC "mac"
|
| 132 |
+
# define OSSL_ALG_PARAM_PROPERTIES "properties"
|
| 133 |
+
# define OSSL_ALG_PARAM_SECURITY_CATEGORY "security-category"
|
| 134 |
+
# define OSSL_ASYM_CIPHER_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 135 |
+
# define OSSL_ASYM_CIPHER_PARAM_ENGINE OSSL_PKEY_PARAM_ENGINE
|
| 136 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 137 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 138 |
+
# define OSSL_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED
|
| 139 |
+
# define OSSL_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 140 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 141 |
+
# define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 142 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 143 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS "digest-props"
|
| 144 |
+
# define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
| 145 |
+
# define OSSL_ASYM_CIPHER_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 146 |
+
# define OSSL_ASYM_CIPHER_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 147 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
| 148 |
+
# define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
| 149 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ALG "tls-group-alg"
|
| 150 |
+
# define OSSL_CAPABILITY_TLS_GROUP_ID "tls-group-id"
|
| 151 |
+
# define OSSL_CAPABILITY_TLS_GROUP_IS_KEM "tls-group-is-kem"
|
| 152 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_DTLS "tls-max-dtls"
|
| 153 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MAX_TLS "tls-max-tls"
|
| 154 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_DTLS "tls-min-dtls"
|
| 155 |
+
# define OSSL_CAPABILITY_TLS_GROUP_MIN_TLS "tls-min-tls"
|
| 156 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME "tls-group-name"
|
| 157 |
+
# define OSSL_CAPABILITY_TLS_GROUP_NAME_INTERNAL "tls-group-name-internal"
|
| 158 |
+
# define OSSL_CAPABILITY_TLS_GROUP_SECURITY_BITS "tls-group-sec-bits"
|
| 159 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_CODE_POINT "tls-sigalg-code-point"
|
| 160 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_NAME "tls-sigalg-hash-name"
|
| 161 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_HASH_OID "tls-sigalg-hash-oid"
|
| 162 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_IANA_NAME "tls-sigalg-iana-name"
|
| 163 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE "tls-sigalg-keytype"
|
| 164 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_KEYTYPE_OID "tls-sigalg-keytype-oid"
|
| 165 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_DTLS "tls-max-dtls"
|
| 166 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MAX_TLS "tls-max-tls"
|
| 167 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_DTLS "tls-min-dtls"
|
| 168 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_MIN_TLS "tls-min-tls"
|
| 169 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_NAME "tls-sigalg-name"
|
| 170 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_OID "tls-sigalg-oid"
|
| 171 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SECURITY_BITS "tls-sigalg-sec-bits"
|
| 172 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_NAME "tls-sigalg-sig-name"
|
| 173 |
+
# define OSSL_CAPABILITY_TLS_SIGALG_SIG_OID "tls-sigalg-sig-oid"
|
| 174 |
+
# define OSSL_CIPHER_HMAC_PARAM_MAC OSSL_CIPHER_PARAM_AEAD_TAG
|
| 175 |
+
# define OSSL_CIPHER_PARAM_AEAD "aead"
|
| 176 |
+
# define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
| 177 |
+
# define OSSL_CIPHER_PARAM_AEAD_IV_GENERATED "iv-generated"
|
| 178 |
+
# define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey"
|
| 179 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAG "tag"
|
| 180 |
+
# define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen"
|
| 181 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad"
|
| 182 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad"
|
| 183 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen"
|
| 184 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed"
|
| 185 |
+
# define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv"
|
| 186 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 187 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 188 |
+
# define OSSL_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD "alg_id_param"
|
| 189 |
+
# define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize"
|
| 190 |
+
# define OSSL_CIPHER_PARAM_CTS "cts"
|
| 191 |
+
# define OSSL_CIPHER_PARAM_CTS_MODE "cts_mode"
|
| 192 |
+
# define OSSL_CIPHER_PARAM_CUSTOM_IV "custom-iv"
|
| 193 |
+
# define OSSL_CIPHER_PARAM_DECRYPT_ONLY "decrypt-only"
|
| 194 |
+
# define OSSL_CIPHER_PARAM_ENCRYPT_THEN_MAC "encrypt-then-mac"
|
| 195 |
+
# define OSSL_CIPHER_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 196 |
+
# define OSSL_CIPHER_PARAM_FIPS_ENCRYPT_CHECK "encrypt-check"
|
| 197 |
+
# define OSSL_CIPHER_PARAM_HAS_RAND_KEY "has-randkey"
|
| 198 |
+
# define OSSL_CIPHER_PARAM_IV "iv"
|
| 199 |
+
# define OSSL_CIPHER_PARAM_IVLEN "ivlen"
|
| 200 |
+
# define OSSL_CIPHER_PARAM_KEYLEN "keylen"
|
| 201 |
+
# define OSSL_CIPHER_PARAM_MODE "mode"
|
| 202 |
+
# define OSSL_CIPHER_PARAM_NUM "num"
|
| 203 |
+
# define OSSL_CIPHER_PARAM_PADDING "padding"
|
| 204 |
+
# define OSSL_CIPHER_PARAM_PIPELINE_AEAD_TAG "pipeline-tag"
|
| 205 |
+
# define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey"
|
| 206 |
+
# define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits"
|
| 207 |
+
# define OSSL_CIPHER_PARAM_ROUNDS "rounds"
|
| 208 |
+
# define OSSL_CIPHER_PARAM_SPEED "speed"
|
| 209 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK "tls-multi"
|
| 210 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD "tls1multi_aad"
|
| 211 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN "tls1multi_aadpacklen"
|
| 212 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC "tls1multi_enc"
|
| 213 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN "tls1multi_encin"
|
| 214 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN "tls1multi_enclen"
|
| 215 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE "tls1multi_interleave"
|
| 216 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE "tls1multi_maxbufsz"
|
| 217 |
+
# define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT "tls1multi_maxsndfrag"
|
| 218 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC "tls-mac"
|
| 219 |
+
# define OSSL_CIPHER_PARAM_TLS_MAC_SIZE "tls-mac-size"
|
| 220 |
+
# define OSSL_CIPHER_PARAM_TLS_VERSION "tls-version"
|
| 221 |
+
# define OSSL_CIPHER_PARAM_UPDATED_IV "updated-iv"
|
| 222 |
+
# define OSSL_CIPHER_PARAM_USE_BITS "use-bits"
|
| 223 |
+
# define OSSL_CIPHER_PARAM_XTS_STANDARD "xts_standard"
|
| 224 |
+
# define OSSL_DECODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 225 |
+
# define OSSL_DIGEST_PARAM_ALGID_ABSENT "algid-absent"
|
| 226 |
+
# define OSSL_DIGEST_PARAM_BLOCK_SIZE "blocksize"
|
| 227 |
+
# define OSSL_DIGEST_PARAM_MICALG "micalg"
|
| 228 |
+
# define OSSL_DIGEST_PARAM_PAD_TYPE "pad-type"
|
| 229 |
+
# define OSSL_DIGEST_PARAM_SIZE "size"
|
| 230 |
+
# define OSSL_DIGEST_PARAM_SSL3_MS "ssl3-ms"
|
| 231 |
+
# define OSSL_DIGEST_PARAM_XOF "xof"
|
| 232 |
+
# define OSSL_DIGEST_PARAM_XOFLEN "xoflen"
|
| 233 |
+
# define OSSL_DRBG_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 234 |
+
# define OSSL_DRBG_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 235 |
+
# define OSSL_DRBG_PARAM_ENTROPY_REQUIRED "entropy_required"
|
| 236 |
+
# define OSSL_DRBG_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 237 |
+
# define OSSL_DRBG_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 238 |
+
# define OSSL_DRBG_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 239 |
+
# define OSSL_DRBG_PARAM_MAX_ADINLEN "max_adinlen"
|
| 240 |
+
# define OSSL_DRBG_PARAM_MAX_ENTROPYLEN "max_entropylen"
|
| 241 |
+
# define OSSL_DRBG_PARAM_MAX_LENGTH "maxium_length"
|
| 242 |
+
# define OSSL_DRBG_PARAM_MAX_NONCELEN "max_noncelen"
|
| 243 |
+
# define OSSL_DRBG_PARAM_MAX_PERSLEN "max_perslen"
|
| 244 |
+
# define OSSL_DRBG_PARAM_MIN_ENTROPYLEN "min_entropylen"
|
| 245 |
+
# define OSSL_DRBG_PARAM_MIN_LENGTH "minium_length"
|
| 246 |
+
# define OSSL_DRBG_PARAM_MIN_NONCELEN "min_noncelen"
|
| 247 |
+
# define OSSL_DRBG_PARAM_PREDICTION_RESISTANCE "prediction_resistance"
|
| 248 |
+
# define OSSL_DRBG_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 249 |
+
# define OSSL_DRBG_PARAM_RANDOM_DATA "random_data"
|
| 250 |
+
# define OSSL_DRBG_PARAM_RESEED_COUNTER "reseed_counter"
|
| 251 |
+
# define OSSL_DRBG_PARAM_RESEED_REQUESTS "reseed_requests"
|
| 252 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME "reseed_time"
|
| 253 |
+
# define OSSL_DRBG_PARAM_RESEED_TIME_INTERVAL "reseed_time_interval"
|
| 254 |
+
# define OSSL_DRBG_PARAM_SIZE "size"
|
| 255 |
+
# define OSSL_DRBG_PARAM_USE_DF "use_derivation_function"
|
| 256 |
+
# define OSSL_ENCODER_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 257 |
+
# define OSSL_ENCODER_PARAM_ENCRYPT_LEVEL "encrypt-level"
|
| 258 |
+
# define OSSL_ENCODER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 259 |
+
# define OSSL_ENCODER_PARAM_SAVE_PARAMETERS "save-parameters"
|
| 260 |
+
# define OSSL_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE "ecdh-cofactor-mode"
|
| 261 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 262 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 263 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK
|
| 264 |
+
# define OSSL_EXCHANGE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 265 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST "kdf-digest"
|
| 266 |
+
# define OSSL_EXCHANGE_PARAM_KDF_DIGEST_PROPS "kdf-digest-props"
|
| 267 |
+
# define OSSL_EXCHANGE_PARAM_KDF_OUTLEN "kdf-outlen"
|
| 268 |
+
# define OSSL_EXCHANGE_PARAM_KDF_TYPE "kdf-type"
|
| 269 |
+
# define OSSL_EXCHANGE_PARAM_KDF_UKM "kdf-ukm"
|
| 270 |
+
# define OSSL_EXCHANGE_PARAM_PAD "pad"
|
| 271 |
+
# define OSSL_GEN_PARAM_ITERATION "iteration"
|
| 272 |
+
# define OSSL_GEN_PARAM_POTENTIAL "potential"
|
| 273 |
+
# define OSSL_KDF_PARAM_ARGON2_AD "ad"
|
| 274 |
+
# define OSSL_KDF_PARAM_ARGON2_LANES "lanes"
|
| 275 |
+
# define OSSL_KDF_PARAM_ARGON2_MEMCOST "memcost"
|
| 276 |
+
# define OSSL_KDF_PARAM_ARGON2_VERSION "version"
|
| 277 |
+
# define OSSL_KDF_PARAM_CEK_ALG "cekalg"
|
| 278 |
+
# define OSSL_KDF_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 279 |
+
# define OSSL_KDF_PARAM_CONSTANT "constant"
|
| 280 |
+
# define OSSL_KDF_PARAM_DATA "data"
|
| 281 |
+
# define OSSL_KDF_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 282 |
+
# define OSSL_KDF_PARAM_EARLY_CLEAN "early_clean"
|
| 283 |
+
# define OSSL_KDF_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 284 |
+
# define OSSL_KDF_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 285 |
+
# define OSSL_KDF_PARAM_FIPS_EMS_CHECK "ems_check"
|
| 286 |
+
# define OSSL_KDF_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 287 |
+
# define OSSL_KDF_PARAM_HMACDRBG_ENTROPY "entropy"
|
| 288 |
+
# define OSSL_KDF_PARAM_HMACDRBG_NONCE "nonce"
|
| 289 |
+
# define OSSL_KDF_PARAM_INFO "info"
|
| 290 |
+
# define OSSL_KDF_PARAM_ITER "iter"
|
| 291 |
+
# define OSSL_KDF_PARAM_KBKDF_R "r"
|
| 292 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_L "use-l"
|
| 293 |
+
# define OSSL_KDF_PARAM_KBKDF_USE_SEPARATOR "use-separator"
|
| 294 |
+
# define OSSL_KDF_PARAM_KEY "key"
|
| 295 |
+
# define OSSL_KDF_PARAM_LABEL "label"
|
| 296 |
+
# define OSSL_KDF_PARAM_MAC OSSL_ALG_PARAM_MAC
|
| 297 |
+
# define OSSL_KDF_PARAM_MAC_SIZE "maclen"
|
| 298 |
+
# define OSSL_KDF_PARAM_MODE "mode"
|
| 299 |
+
# define OSSL_KDF_PARAM_PASSWORD "pass"
|
| 300 |
+
# define OSSL_KDF_PARAM_PKCS12_ID "id"
|
| 301 |
+
# define OSSL_KDF_PARAM_PKCS5 "pkcs5"
|
| 302 |
+
# define OSSL_KDF_PARAM_PREFIX "prefix"
|
| 303 |
+
# define OSSL_KDF_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 304 |
+
# define OSSL_KDF_PARAM_SALT "salt"
|
| 305 |
+
# define OSSL_KDF_PARAM_SCRYPT_MAXMEM "maxmem_bytes"
|
| 306 |
+
# define OSSL_KDF_PARAM_SCRYPT_N "n"
|
| 307 |
+
# define OSSL_KDF_PARAM_SCRYPT_P "p"
|
| 308 |
+
# define OSSL_KDF_PARAM_SCRYPT_R "r"
|
| 309 |
+
# define OSSL_KDF_PARAM_SECRET "secret"
|
| 310 |
+
# define OSSL_KDF_PARAM_SEED "seed"
|
| 311 |
+
# define OSSL_KDF_PARAM_SIZE "size"
|
| 312 |
+
# define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id"
|
| 313 |
+
# define OSSL_KDF_PARAM_SSHKDF_TYPE "type"
|
| 314 |
+
# define OSSL_KDF_PARAM_SSHKDF_XCGHASH "xcghash"
|
| 315 |
+
# define OSSL_KDF_PARAM_THREADS "threads"
|
| 316 |
+
# define OSSL_KDF_PARAM_UKM "ukm"
|
| 317 |
+
# define OSSL_KDF_PARAM_X942_ACVPINFO "acvp-info"
|
| 318 |
+
# define OSSL_KDF_PARAM_X942_PARTYUINFO "partyu-info"
|
| 319 |
+
# define OSSL_KDF_PARAM_X942_PARTYVINFO "partyv-info"
|
| 320 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PRIVINFO "supp-privinfo"
|
| 321 |
+
# define OSSL_KDF_PARAM_X942_SUPP_PUBINFO "supp-pubinfo"
|
| 322 |
+
# define OSSL_KDF_PARAM_X942_USE_KEYBITS "use-keybits"
|
| 323 |
+
# define OSSL_KEM_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 324 |
+
# define OSSL_KEM_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 325 |
+
# define OSSL_KEM_PARAM_IKME "ikme"
|
| 326 |
+
# define OSSL_KEM_PARAM_OPERATION "operation"
|
| 327 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING "block_padding"
|
| 328 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING "hs_padding"
|
| 329 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA "max_early_data"
|
| 330 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN "max_frag_len"
|
| 331 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_MODE "mode"
|
| 332 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_OPTIONS "options"
|
| 333 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD "read_ahead"
|
| 334 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC "stream_mac"
|
| 335 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_TLSTREE "tlstree"
|
| 336 |
+
# define OSSL_LIBSSL_RECORD_LAYER_PARAM_USE_ETM "use_etm"
|
| 337 |
+
# define OSSL_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN "read_buffer_len"
|
| 338 |
+
# define OSSL_MAC_PARAM_BLOCK_SIZE "block-size"
|
| 339 |
+
# define OSSL_MAC_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 340 |
+
# define OSSL_MAC_PARAM_CUSTOM "custom"
|
| 341 |
+
# define OSSL_MAC_PARAM_C_ROUNDS "c-rounds"
|
| 342 |
+
# define OSSL_MAC_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 343 |
+
# define OSSL_MAC_PARAM_DIGEST_NOINIT "digest-noinit"
|
| 344 |
+
# define OSSL_MAC_PARAM_DIGEST_ONESHOT "digest-oneshot"
|
| 345 |
+
# define OSSL_MAC_PARAM_D_ROUNDS "d-rounds"
|
| 346 |
+
# define OSSL_MAC_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 347 |
+
# define OSSL_MAC_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 348 |
+
# define OSSL_MAC_PARAM_FIPS_NO_SHORT_MAC OSSL_PROV_PARAM_NO_SHORT_MAC
|
| 349 |
+
# define OSSL_MAC_PARAM_IV "iv"
|
| 350 |
+
# define OSSL_MAC_PARAM_KEY "key"
|
| 351 |
+
# define OSSL_MAC_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 352 |
+
# define OSSL_MAC_PARAM_SALT "salt"
|
| 353 |
+
# define OSSL_MAC_PARAM_SIZE "size"
|
| 354 |
+
# define OSSL_MAC_PARAM_TLS_DATA_SIZE "tls-data-size"
|
| 355 |
+
# define OSSL_MAC_PARAM_XOF "xof"
|
| 356 |
+
# define OSSL_OBJECT_PARAM_DATA "data"
|
| 357 |
+
# define OSSL_OBJECT_PARAM_DATA_STRUCTURE "data-structure"
|
| 358 |
+
# define OSSL_OBJECT_PARAM_DATA_TYPE "data-type"
|
| 359 |
+
# define OSSL_OBJECT_PARAM_DESC "desc"
|
| 360 |
+
# define OSSL_OBJECT_PARAM_INPUT_TYPE "input-type"
|
| 361 |
+
# define OSSL_OBJECT_PARAM_REFERENCE "reference"
|
| 362 |
+
# define OSSL_OBJECT_PARAM_TYPE "type"
|
| 363 |
+
# define OSSL_PASSPHRASE_PARAM_INFO "info"
|
| 364 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID OSSL_ALG_PARAM_ALGORITHM_ID
|
| 365 |
+
# define OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS OSSL_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 366 |
+
# define OSSL_PKEY_PARAM_BITS "bits"
|
| 367 |
+
# define OSSL_PKEY_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
| 368 |
+
# define OSSL_PKEY_PARAM_CMS_KEMRI_KDF_ALGORITHM "kemri-kdf-alg"
|
| 369 |
+
# define OSSL_PKEY_PARAM_CMS_RI_TYPE "ri-type"
|
| 370 |
+
# define OSSL_PKEY_PARAM_DEFAULT_DIGEST "default-digest"
|
| 371 |
+
# define OSSL_PKEY_PARAM_DHKEM_IKM "dhkem-ikm"
|
| 372 |
+
# define OSSL_PKEY_PARAM_DH_GENERATOR "safeprime-generator"
|
| 373 |
+
# define OSSL_PKEY_PARAM_DH_PRIV_LEN "priv_len"
|
| 374 |
+
# define OSSL_PKEY_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
| 375 |
+
# define OSSL_PKEY_PARAM_DIGEST_SIZE "digest-size"
|
| 376 |
+
# define OSSL_PKEY_PARAM_DIST_ID "distid"
|
| 377 |
+
# define OSSL_PKEY_PARAM_EC_A "a"
|
| 378 |
+
# define OSSL_PKEY_PARAM_EC_B "b"
|
| 379 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_M "m"
|
| 380 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K1 "k1"
|
| 381 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K2 "k2"
|
| 382 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_PP_K3 "k3"
|
| 383 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TP_BASIS "tp"
|
| 384 |
+
# define OSSL_PKEY_PARAM_EC_CHAR2_TYPE "basis-type"
|
| 385 |
+
# define OSSL_PKEY_PARAM_EC_COFACTOR "cofactor"
|
| 386 |
+
# define OSSL_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS "decoded-from-explicit"
|
| 387 |
+
# define OSSL_PKEY_PARAM_EC_ENCODING "encoding"
|
| 388 |
+
# define OSSL_PKEY_PARAM_EC_FIELD_TYPE "field-type"
|
| 389 |
+
# define OSSL_PKEY_PARAM_EC_GENERATOR "generator"
|
| 390 |
+
# define OSSL_PKEY_PARAM_EC_GROUP_CHECK_TYPE "group-check"
|
| 391 |
+
# define OSSL_PKEY_PARAM_EC_INCLUDE_PUBLIC "include-public"
|
| 392 |
+
# define OSSL_PKEY_PARAM_EC_ORDER "order"
|
| 393 |
+
# define OSSL_PKEY_PARAM_EC_P "p"
|
| 394 |
+
# define OSSL_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT "point-format"
|
| 395 |
+
# define OSSL_PKEY_PARAM_EC_PUB_X "qx"
|
| 396 |
+
# define OSSL_PKEY_PARAM_EC_PUB_Y "qy"
|
| 397 |
+
# define OSSL_PKEY_PARAM_EC_SEED "seed"
|
| 398 |
+
# define OSSL_PKEY_PARAM_ENCODED_PUBLIC_KEY "encoded-pub-key"
|
| 399 |
+
# define OSSL_PKEY_PARAM_ENGINE OSSL_ALG_PARAM_ENGINE
|
| 400 |
+
# define OSSL_PKEY_PARAM_FFC_COFACTOR "j"
|
| 401 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 402 |
+
# define OSSL_PKEY_PARAM_FFC_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 403 |
+
# define OSSL_PKEY_PARAM_FFC_G "g"
|
| 404 |
+
# define OSSL_PKEY_PARAM_FFC_GINDEX "gindex"
|
| 405 |
+
# define OSSL_PKEY_PARAM_FFC_H "hindex"
|
| 406 |
+
# define OSSL_PKEY_PARAM_FFC_P "p"
|
| 407 |
+
# define OSSL_PKEY_PARAM_FFC_PBITS "pbits"
|
| 408 |
+
# define OSSL_PKEY_PARAM_FFC_PCOUNTER "pcounter"
|
| 409 |
+
# define OSSL_PKEY_PARAM_FFC_Q "q"
|
| 410 |
+
# define OSSL_PKEY_PARAM_FFC_QBITS "qbits"
|
| 411 |
+
# define OSSL_PKEY_PARAM_FFC_SEED "seed"
|
| 412 |
+
# define OSSL_PKEY_PARAM_FFC_TYPE "type"
|
| 413 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_G "validate-g"
|
| 414 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_LEGACY "validate-legacy"
|
| 415 |
+
# define OSSL_PKEY_PARAM_FFC_VALIDATE_PQ "validate-pq"
|
| 416 |
+
# define OSSL_PKEY_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 417 |
+
# define OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK "digest-check"
|
| 418 |
+
# define OSSL_PKEY_PARAM_FIPS_KEY_CHECK "key-check"
|
| 419 |
+
# define OSSL_PKEY_PARAM_FIPS_SIGN_CHECK "sign-check"
|
| 420 |
+
# define OSSL_PKEY_PARAM_GROUP_NAME "group"
|
| 421 |
+
# define OSSL_PKEY_PARAM_IMPLICIT_REJECTION "implicit-rejection"
|
| 422 |
+
# define OSSL_PKEY_PARAM_MANDATORY_DIGEST "mandatory-digest"
|
| 423 |
+
# define OSSL_PKEY_PARAM_MASKGENFUNC "mgf"
|
| 424 |
+
# define OSSL_PKEY_PARAM_MAX_SIZE "max-size"
|
| 425 |
+
# define OSSL_PKEY_PARAM_MGF1_DIGEST "mgf1-digest"
|
| 426 |
+
# define OSSL_PKEY_PARAM_MGF1_PROPERTIES "mgf1-properties"
|
| 427 |
+
# define OSSL_PKEY_PARAM_ML_DSA_INPUT_FORMATS "ml-dsa.input_formats"
|
| 428 |
+
# define OSSL_PKEY_PARAM_ML_DSA_OUTPUT_FORMATS "ml-dsa.output_formats"
|
| 429 |
+
# define OSSL_PKEY_PARAM_ML_DSA_PREFER_SEED "ml-dsa.prefer_seed"
|
| 430 |
+
# define OSSL_PKEY_PARAM_ML_DSA_RETAIN_SEED "ml-dsa.retain_seed"
|
| 431 |
+
# define OSSL_PKEY_PARAM_ML_DSA_SEED "seed"
|
| 432 |
+
# define OSSL_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE "ml-kem.import_pct_type"
|
| 433 |
+
# define OSSL_PKEY_PARAM_ML_KEM_INPUT_FORMATS "ml-kem.input_formats"
|
| 434 |
+
# define OSSL_PKEY_PARAM_ML_KEM_OUTPUT_FORMATS "ml-kem.output_formats"
|
| 435 |
+
# define OSSL_PKEY_PARAM_ML_KEM_PREFER_SEED "ml-kem.prefer_seed"
|
| 436 |
+
# define OSSL_PKEY_PARAM_ML_KEM_RETAIN_SEED "ml-kem.retain_seed"
|
| 437 |
+
# define OSSL_PKEY_PARAM_ML_KEM_SEED "seed"
|
| 438 |
+
# define OSSL_PKEY_PARAM_PAD_MODE "pad-mode"
|
| 439 |
+
# define OSSL_PKEY_PARAM_PRIV_KEY "priv"
|
| 440 |
+
# define OSSL_PKEY_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
| 441 |
+
# define OSSL_PKEY_PARAM_PUB_KEY "pub"
|
| 442 |
+
# define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
|
| 443 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
| 444 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 "rsa-coefficient1"
|
| 445 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 "rsa-coefficient2"
|
| 446 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 "rsa-coefficient3"
|
| 447 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 "rsa-coefficient4"
|
| 448 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 "rsa-coefficient5"
|
| 449 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 "rsa-coefficient6"
|
| 450 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 "rsa-coefficient7"
|
| 451 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 "rsa-coefficient8"
|
| 452 |
+
# define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 "rsa-coefficient9"
|
| 453 |
+
# define OSSL_PKEY_PARAM_RSA_D "d"
|
| 454 |
+
# define OSSL_PKEY_PARAM_RSA_DERIVE_FROM_PQ "rsa-derive-from-pq"
|
| 455 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 456 |
+
# define OSSL_PKEY_PARAM_RSA_DIGEST_PROPS OSSL_PKEY_PARAM_PROPERTIES
|
| 457 |
+
# define OSSL_PKEY_PARAM_RSA_E "e"
|
| 458 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
| 459 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT1 "rsa-exponent1"
|
| 460 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT10 "rsa-exponent10"
|
| 461 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT2 "rsa-exponent2"
|
| 462 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT3 "rsa-exponent3"
|
| 463 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT4 "rsa-exponent4"
|
| 464 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT5 "rsa-exponent5"
|
| 465 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT6 "rsa-exponent6"
|
| 466 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT7 "rsa-exponent7"
|
| 467 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT8 "rsa-exponent8"
|
| 468 |
+
# define OSSL_PKEY_PARAM_RSA_EXPONENT9 "rsa-exponent9"
|
| 469 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
| 470 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR1 "rsa-factor1"
|
| 471 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR10 "rsa-factor10"
|
| 472 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR2 "rsa-factor2"
|
| 473 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR3 "rsa-factor3"
|
| 474 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR4 "rsa-factor4"
|
| 475 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR5 "rsa-factor5"
|
| 476 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR6 "rsa-factor6"
|
| 477 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR7 "rsa-factor7"
|
| 478 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR8 "rsa-factor8"
|
| 479 |
+
# define OSSL_PKEY_PARAM_RSA_FACTOR9 "rsa-factor9"
|
| 480 |
+
# define OSSL_PKEY_PARAM_RSA_MASKGENFUNC OSSL_PKEY_PARAM_MASKGENFUNC
|
| 481 |
+
# define OSSL_PKEY_PARAM_RSA_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 482 |
+
# define OSSL_PKEY_PARAM_RSA_N "n"
|
| 483 |
+
# define OSSL_PKEY_PARAM_RSA_PRIMES "primes"
|
| 484 |
+
# define OSSL_PKEY_PARAM_RSA_PSS_SALTLEN "saltlen"
|
| 485 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P1 "p1"
|
| 486 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_P2 "p2"
|
| 487 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q1 "q1"
|
| 488 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_Q2 "q2"
|
| 489 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP "xp"
|
| 490 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP1 "xp1"
|
| 491 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XP2 "xp2"
|
| 492 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ "xq"
|
| 493 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ1 "xq1"
|
| 494 |
+
# define OSSL_PKEY_PARAM_RSA_TEST_XQ2 "xq2"
|
| 495 |
+
# define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits"
|
| 496 |
+
# define OSSL_PKEY_PARAM_SECURITY_CATEGORY OSSL_ALG_PARAM_SECURITY_CATEGORY
|
| 497 |
+
# define OSSL_PKEY_PARAM_SLH_DSA_SEED "seed"
|
| 498 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_ECDH OSSL_PKEY_PARAM_USE_COFACTOR_FLAG
|
| 499 |
+
# define OSSL_PKEY_PARAM_USE_COFACTOR_FLAG "use-cofactor-flag"
|
| 500 |
+
# define OSSL_PROV_PARAM_BUILDINFO "buildinfo"
|
| 501 |
+
# define OSSL_PROV_PARAM_CORE_MODULE_FILENAME "module-filename"
|
| 502 |
+
# define OSSL_PROV_PARAM_CORE_PROV_NAME "provider-name"
|
| 503 |
+
# define OSSL_PROV_PARAM_CORE_VERSION "openssl-version"
|
| 504 |
+
# define OSSL_PROV_PARAM_DRBG_TRUNC_DIGEST "drbg-no-trunc-md"
|
| 505 |
+
# define OSSL_PROV_PARAM_DSA_SIGN_DISABLED "dsa-sign-disabled"
|
| 506 |
+
# define OSSL_PROV_PARAM_ECDH_COFACTOR_CHECK "ecdh-cofactor-check"
|
| 507 |
+
# define OSSL_PROV_PARAM_HKDF_DIGEST_CHECK "hkdf-digest-check"
|
| 508 |
+
# define OSSL_PROV_PARAM_HKDF_KEY_CHECK "hkdf-key-check"
|
| 509 |
+
# define OSSL_PROV_PARAM_HMAC_KEY_CHECK "hmac-key-check"
|
| 510 |
+
# define OSSL_PROV_PARAM_KBKDF_KEY_CHECK "kbkdf-key-check"
|
| 511 |
+
# define OSSL_PROV_PARAM_KMAC_KEY_CHECK "kmac-key-check"
|
| 512 |
+
# define OSSL_PROV_PARAM_NAME "name"
|
| 513 |
+
# define OSSL_PROV_PARAM_NO_SHORT_MAC "no-short-mac"
|
| 514 |
+
# define OSSL_PROV_PARAM_PBKDF2_LOWER_BOUND_CHECK "pbkdf2-lower-bound-check"
|
| 515 |
+
# define OSSL_PROV_PARAM_RSA_PKCS15_PAD_DISABLED "rsa-pkcs15-pad-disabled"
|
| 516 |
+
# define OSSL_PROV_PARAM_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 517 |
+
# define OSSL_PROV_PARAM_RSA_SIGN_X931_PAD_DISABLED "rsa-sign-x931-pad-disabled"
|
| 518 |
+
# define OSSL_PROV_PARAM_SECURITY_CHECKS "security-checks"
|
| 519 |
+
# define OSSL_PROV_PARAM_SELF_TEST_DESC "st-desc"
|
| 520 |
+
# define OSSL_PROV_PARAM_SELF_TEST_PHASE "st-phase"
|
| 521 |
+
# define OSSL_PROV_PARAM_SELF_TEST_TYPE "st-type"
|
| 522 |
+
# define OSSL_PROV_PARAM_SIGNATURE_DIGEST_CHECK "signature-digest-check"
|
| 523 |
+
# define OSSL_PROV_PARAM_SSHKDF_DIGEST_CHECK "sshkdf-digest-check"
|
| 524 |
+
# define OSSL_PROV_PARAM_SSHKDF_KEY_CHECK "sshkdf-key-check"
|
| 525 |
+
# define OSSL_PROV_PARAM_SSKDF_DIGEST_CHECK "sskdf-digest-check"
|
| 526 |
+
# define OSSL_PROV_PARAM_SSKDF_KEY_CHECK "sskdf-key-check"
|
| 527 |
+
# define OSSL_PROV_PARAM_STATUS "status"
|
| 528 |
+
# define OSSL_PROV_PARAM_TDES_ENCRYPT_DISABLED "tdes-encrypt-disabled"
|
| 529 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_DIGEST_CHECK "tls13-kdf-digest-check"
|
| 530 |
+
# define OSSL_PROV_PARAM_TLS13_KDF_KEY_CHECK "tls13-kdf-key-check"
|
| 531 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_DIGEST_CHECK "tls1-prf-digest-check"
|
| 532 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_EMS_CHECK "tls1-prf-ems-check"
|
| 533 |
+
# define OSSL_PROV_PARAM_TLS1_PRF_KEY_CHECK "tls1-prf-key-check"
|
| 534 |
+
# define OSSL_PROV_PARAM_VERSION "version"
|
| 535 |
+
# define OSSL_PROV_PARAM_X942KDF_KEY_CHECK "x942kdf-key-check"
|
| 536 |
+
# define OSSL_PROV_PARAM_X963KDF_DIGEST_CHECK "x963kdf-digest-check"
|
| 537 |
+
# define OSSL_PROV_PARAM_X963KDF_KEY_CHECK "x963kdf-key-check"
|
| 538 |
+
# define OSSL_RAND_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 539 |
+
# define OSSL_RAND_PARAM_GENERATE "generate"
|
| 540 |
+
# define OSSL_RAND_PARAM_MAX_REQUEST "max_request"
|
| 541 |
+
# define OSSL_RAND_PARAM_STATE "state"
|
| 542 |
+
# define OSSL_RAND_PARAM_STRENGTH "strength"
|
| 543 |
+
# define OSSL_RAND_PARAM_TEST_ENTROPY "test_entropy"
|
| 544 |
+
# define OSSL_RAND_PARAM_TEST_NONCE "test_nonce"
|
| 545 |
+
# define OSSL_SIGNATURE_PARAM_ADD_RANDOM "additional-random"
|
| 546 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID OSSL_PKEY_PARAM_ALGORITHM_ID
|
| 547 |
+
# define OSSL_SIGNATURE_PARAM_ALGORITHM_ID_PARAMS OSSL_PKEY_PARAM_ALGORITHM_ID_PARAMS
|
| 548 |
+
# define OSSL_SIGNATURE_PARAM_CONTEXT_STRING "context-string"
|
| 549 |
+
# define OSSL_SIGNATURE_PARAM_DETERMINISTIC "deterministic"
|
| 550 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST OSSL_PKEY_PARAM_DIGEST
|
| 551 |
+
# define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
|
| 552 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR OSSL_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 553 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_DIGEST_CHECK OSSL_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 554 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_KEY_CHECK OSSL_PKEY_PARAM_FIPS_KEY_CHECK
|
| 555 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_RSA_PSS_SALTLEN_CHECK "rsa-pss-saltlen-check"
|
| 556 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_CHECK OSSL_PKEY_PARAM_FIPS_SIGN_CHECK
|
| 557 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK "sign-x931-pad-check"
|
| 558 |
+
# define OSSL_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE "verify-message"
|
| 559 |
+
# define OSSL_SIGNATURE_PARAM_INSTANCE "instance"
|
| 560 |
+
# define OSSL_SIGNATURE_PARAM_KAT "kat"
|
| 561 |
+
# define OSSL_SIGNATURE_PARAM_MESSAGE_ENCODING "message-encoding"
|
| 562 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
| 563 |
+
# define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
| 564 |
+
# define OSSL_SIGNATURE_PARAM_MU "mu"
|
| 565 |
+
# define OSSL_SIGNATURE_PARAM_NONCE_TYPE "nonce-type"
|
| 566 |
+
# define OSSL_SIGNATURE_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
| 567 |
+
# define OSSL_SIGNATURE_PARAM_PROPERTIES OSSL_PKEY_PARAM_PROPERTIES
|
| 568 |
+
# define OSSL_SIGNATURE_PARAM_PSS_SALTLEN "saltlen"
|
| 569 |
+
# define OSSL_SIGNATURE_PARAM_SIGNATURE "signature"
|
| 570 |
+
# define OSSL_SIGNATURE_PARAM_TEST_ENTROPY "test-entropy"
|
| 571 |
+
# define OSSL_SKEY_PARAM_KEY_LENGTH "key-length"
|
| 572 |
+
# define OSSL_SKEY_PARAM_RAW_BYTES "raw-bytes"
|
| 573 |
+
# define OSSL_STORE_PARAM_ALIAS "alias"
|
| 574 |
+
# define OSSL_STORE_PARAM_DIGEST "digest"
|
| 575 |
+
# define OSSL_STORE_PARAM_EXPECT "expect"
|
| 576 |
+
# define OSSL_STORE_PARAM_FINGERPRINT "fingerprint"
|
| 577 |
+
# define OSSL_STORE_PARAM_INPUT_TYPE "input-type"
|
| 578 |
+
# define OSSL_STORE_PARAM_ISSUER "name"
|
| 579 |
+
# define OSSL_STORE_PARAM_PROPERTIES "properties"
|
| 580 |
+
# define OSSL_STORE_PARAM_SERIAL "serial"
|
| 581 |
+
# define OSSL_STORE_PARAM_SUBJECT "subject"
|
| 582 |
+
/* clang-format on */
|
| 583 |
+
|
| 584 |
+
#ifdef __cplusplus
|
| 585 |
+
}
|
| 586 |
+
#endif
|
| 587 |
+
|
| 588 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/core_object.h
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_CORE_OBJECT_H
|
| 11 |
+
#define OPENSSL_CORE_OBJECT_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#ifdef __cplusplus
|
| 15 |
+
extern "C" {
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
/*-
|
| 19 |
+
* Known object types
|
| 20 |
+
*
|
| 21 |
+
* These numbers are used as values for the OSSL_PARAM parameter
|
| 22 |
+
* OSSL_OBJECT_PARAM_TYPE.
|
| 23 |
+
*
|
| 24 |
+
* For most of these types, there's a corresponding libcrypto object type.
|
| 25 |
+
* The corresponding type is indicated with a comment after the number.
|
| 26 |
+
*/
|
| 27 |
+
#define OSSL_OBJECT_UNKNOWN 0
|
| 28 |
+
#define OSSL_OBJECT_NAME 1 /* char * */
|
| 29 |
+
#define OSSL_OBJECT_PKEY 2 /* EVP_PKEY * */
|
| 30 |
+
#define OSSL_OBJECT_CERT 3 /* X509 * */
|
| 31 |
+
#define OSSL_OBJECT_CRL 4 /* X509_CRL * */
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* The rest of the associated OSSL_PARAM elements is described in core_names.h
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
#ifdef __cplusplus
|
| 38 |
+
}
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/crmf.h
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*-
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\crmf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2007-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright Nokia 2007-2019
|
| 7 |
+
* Copyright Siemens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*
|
| 14 |
+
* CRMF (RFC 4211) implementation by M. Peylo, M. Viljanen, and D. von Oheimb.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
/* clang-format off */
|
| 18 |
+
|
| 19 |
+
/* clang-format on */
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_CRMF_H
|
| 22 |
+
#define OPENSSL_CRMF_H
|
| 23 |
+
|
| 24 |
+
#include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
#ifndef OPENSSL_NO_CRMF
|
| 27 |
+
#include <openssl/opensslv.h>
|
| 28 |
+
#include <openssl/safestack.h>
|
| 29 |
+
#include <openssl/crmferr.h>
|
| 30 |
+
#include <openssl/x509v3.h> /* for GENERAL_NAME etc. */
|
| 31 |
+
#include <openssl/cms.h>
|
| 32 |
+
|
| 33 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 34 |
+
#include <openssl/types.h>
|
| 35 |
+
#include <openssl/x509.h>
|
| 36 |
+
|
| 37 |
+
#ifdef __cplusplus
|
| 38 |
+
extern "C" {
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
#define OSSL_CRMF_POPOPRIVKEY_THISMESSAGE 0
|
| 42 |
+
#define OSSL_CRMF_POPOPRIVKEY_SUBSEQUENTMESSAGE 1
|
| 43 |
+
#define OSSL_CRMF_POPOPRIVKEY_DHMAC 2
|
| 44 |
+
#define OSSL_CRMF_POPOPRIVKEY_AGREEMAC 3
|
| 45 |
+
#define OSSL_CRMF_POPOPRIVKEY_ENCRYPTEDKEY 4
|
| 46 |
+
|
| 47 |
+
#define OSSL_CRMF_SUBSEQUENTMESSAGE_ENCRCERT 0
|
| 48 |
+
#define OSSL_CRMF_SUBSEQUENTMESSAGE_CHALLENGERESP 1
|
| 49 |
+
typedef struct ossl_crmf_encryptedvalue_st OSSL_CRMF_ENCRYPTEDVALUE;
|
| 50 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDVALUE)
|
| 51 |
+
|
| 52 |
+
typedef struct ossl_crmf_encryptedkey_st OSSL_CRMF_ENCRYPTEDKEY;
|
| 53 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_ENCRYPTEDKEY)
|
| 54 |
+
|
| 55 |
+
typedef struct ossl_crmf_msg_st OSSL_CRMF_MSG;
|
| 56 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSG)
|
| 57 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_MSG)
|
| 58 |
+
/* clang-format off */
|
| 59 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_MSG, OSSL_CRMF_MSG, OSSL_CRMF_MSG)
|
| 60 |
+
#define sk_OSSL_CRMF_MSG_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
| 61 |
+
#define sk_OSSL_CRMF_MSG_value(sk, idx) ((OSSL_CRMF_MSG *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk), (idx)))
|
| 62 |
+
#define sk_OSSL_CRMF_MSG_new(cmp) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp)))
|
| 63 |
+
#define sk_OSSL_CRMF_MSG_new_null() ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_null())
|
| 64 |
+
#define sk_OSSL_CRMF_MSG_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_MSG_compfunc_type(cmp), (n)))
|
| 65 |
+
#define sk_OSSL_CRMF_MSG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (n))
|
| 66 |
+
#define sk_OSSL_CRMF_MSG_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 67 |
+
#define sk_OSSL_CRMF_MSG_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 68 |
+
#define sk_OSSL_CRMF_MSG_delete(sk, i) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (i)))
|
| 69 |
+
#define sk_OSSL_CRMF_MSG_delete_ptr(sk, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr)))
|
| 70 |
+
#define sk_OSSL_CRMF_MSG_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 71 |
+
#define sk_OSSL_CRMF_MSG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 72 |
+
#define sk_OSSL_CRMF_MSG_pop(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
| 73 |
+
#define sk_OSSL_CRMF_MSG_shift(sk) ((OSSL_CRMF_MSG *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_MSG_sk_type(sk)))
|
| 74 |
+
#define sk_OSSL_CRMF_MSG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_freefunc_type(freefunc))
|
| 75 |
+
#define sk_OSSL_CRMF_MSG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), (idx))
|
| 76 |
+
#define sk_OSSL_CRMF_MSG_set(sk, idx, ptr) ((OSSL_CRMF_MSG *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_MSG_sk_type(sk), (idx), ossl_check_OSSL_CRMF_MSG_type(ptr)))
|
| 77 |
+
#define sk_OSSL_CRMF_MSG_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 78 |
+
#define sk_OSSL_CRMF_MSG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr))
|
| 79 |
+
#define sk_OSSL_CRMF_MSG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_MSG_sk_type(sk), ossl_check_OSSL_CRMF_MSG_type(ptr), pnum)
|
| 80 |
+
#define sk_OSSL_CRMF_MSG_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_MSG_sk_type(sk))
|
| 81 |
+
#define sk_OSSL_CRMF_MSG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk))
|
| 82 |
+
#define sk_OSSL_CRMF_MSG_dup(sk) ((STACK_OF(OSSL_CRMF_MSG) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_MSG_sk_type(sk)))
|
| 83 |
+
#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)))
|
| 84 |
+
#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)))
|
| 85 |
+
|
| 86 |
+
/* clang-format on */
|
| 87 |
+
typedef struct ossl_crmf_attributetypeandvalue_st OSSL_CRMF_ATTRIBUTETYPEANDVALUE;
|
| 88 |
+
void OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(OSSL_CRMF_ATTRIBUTETYPEANDVALUE *v);
|
| 89 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
| 90 |
+
/* clang-format off */
|
| 91 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE, OSSL_CRMF_ATTRIBUTETYPEANDVALUE)
|
| 92 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 93 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value(sk, idx) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx)))
|
| 94 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new(cmp) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp)))
|
| 95 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_null() ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new_null())
|
| 96 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_compfunc_type(cmp), (n)))
|
| 97 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (n))
|
| 98 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 99 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 100 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete(sk, i) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (i)))
|
| 101 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_delete_ptr(sk, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
| 102 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 103 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 104 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 105 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_shift(sk) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 106 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_freefunc_type(freefunc))
|
| 107 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), (idx))
|
| 108 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_set(sk, idx, ptr) ((OSSL_CRMF_ATTRIBUTETYPEANDVALUE *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), (idx), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr)))
|
| 109 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 110 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr))
|
| 111 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk), ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_type(ptr), pnum)
|
| 112 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 113 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk))
|
| 114 |
+
#define sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_dup(sk) ((STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_sk_type(sk)))
|
| 115 |
+
#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)))
|
| 116 |
+
#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)))
|
| 117 |
+
|
| 118 |
+
/* clang-format on */
|
| 119 |
+
|
| 120 |
+
typedef struct ossl_crmf_pbmparameter_st OSSL_CRMF_PBMPARAMETER;
|
| 121 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PBMPARAMETER)
|
| 122 |
+
typedef struct ossl_crmf_poposigningkey_st OSSL_CRMF_POPOSIGNINGKEY;
|
| 123 |
+
typedef struct ossl_crmf_certrequest_st OSSL_CRMF_CERTREQUEST;
|
| 124 |
+
typedef struct ossl_crmf_certid_st OSSL_CRMF_CERTID;
|
| 125 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTID)
|
| 126 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTID)
|
| 127 |
+
/* clang-format off */
|
| 128 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CRMF_CERTID, OSSL_CRMF_CERTID, OSSL_CRMF_CERTID)
|
| 129 |
+
#define sk_OSSL_CRMF_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
| 130 |
+
#define sk_OSSL_CRMF_CERTID_value(sk, idx) ((OSSL_CRMF_CERTID *)OPENSSL_sk_value(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk), (idx)))
|
| 131 |
+
#define sk_OSSL_CRMF_CERTID_new(cmp) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp)))
|
| 132 |
+
#define sk_OSSL_CRMF_CERTID_new_null() ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_null())
|
| 133 |
+
#define sk_OSSL_CRMF_CERTID_new_reserve(cmp, n) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CRMF_CERTID_compfunc_type(cmp), (n)))
|
| 134 |
+
#define sk_OSSL_CRMF_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (n))
|
| 135 |
+
#define sk_OSSL_CRMF_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 136 |
+
#define sk_OSSL_CRMF_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 137 |
+
#define sk_OSSL_CRMF_CERTID_delete(sk, i) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (i)))
|
| 138 |
+
#define sk_OSSL_CRMF_CERTID_delete_ptr(sk, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr)))
|
| 139 |
+
#define sk_OSSL_CRMF_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 140 |
+
#define sk_OSSL_CRMF_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 141 |
+
#define sk_OSSL_CRMF_CERTID_pop(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_pop(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 142 |
+
#define sk_OSSL_CRMF_CERTID_shift(sk) ((OSSL_CRMF_CERTID *)OPENSSL_sk_shift(ossl_check_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 143 |
+
#define sk_OSSL_CRMF_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_freefunc_type(freefunc))
|
| 144 |
+
#define sk_OSSL_CRMF_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), (idx))
|
| 145 |
+
#define sk_OSSL_CRMF_CERTID_set(sk, idx, ptr) ((OSSL_CRMF_CERTID *)OPENSSL_sk_set(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), (idx), ossl_check_OSSL_CRMF_CERTID_type(ptr)))
|
| 146 |
+
#define sk_OSSL_CRMF_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 147 |
+
#define sk_OSSL_CRMF_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr))
|
| 148 |
+
#define sk_OSSL_CRMF_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CRMF_CERTID_sk_type(sk), ossl_check_OSSL_CRMF_CERTID_type(ptr), pnum)
|
| 149 |
+
#define sk_OSSL_CRMF_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CRMF_CERTID_sk_type(sk))
|
| 150 |
+
#define sk_OSSL_CRMF_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk))
|
| 151 |
+
#define sk_OSSL_CRMF_CERTID_dup(sk) ((STACK_OF(OSSL_CRMF_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CRMF_CERTID_sk_type(sk)))
|
| 152 |
+
#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)))
|
| 153 |
+
#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)))
|
| 154 |
+
|
| 155 |
+
/* clang-format on */
|
| 156 |
+
|
| 157 |
+
typedef struct ossl_crmf_pkipublicationinfo_st OSSL_CRMF_PKIPUBLICATIONINFO;
|
| 158 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_PKIPUBLICATIONINFO)
|
| 159 |
+
typedef struct ossl_crmf_singlepubinfo_st OSSL_CRMF_SINGLEPUBINFO;
|
| 160 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_SINGLEPUBINFO)
|
| 161 |
+
typedef struct ossl_crmf_certtemplate_st OSSL_CRMF_CERTTEMPLATE;
|
| 162 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_CERTTEMPLATE)
|
| 163 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CRMF_CERTTEMPLATE)
|
| 164 |
+
typedef STACK_OF(OSSL_CRMF_MSG) OSSL_CRMF_MSGS;
|
| 165 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CRMF_MSGS)
|
| 166 |
+
|
| 167 |
+
typedef struct ossl_crmf_optionalvalidity_st OSSL_CRMF_OPTIONALVALIDITY;
|
| 168 |
+
|
| 169 |
+
/* crmf_pbm.c */
|
| 170 |
+
OSSL_CRMF_PBMPARAMETER *OSSL_CRMF_pbmp_new(OSSL_LIB_CTX *libctx, size_t slen,
|
| 171 |
+
int owfnid, size_t itercnt,
|
| 172 |
+
int macnid);
|
| 173 |
+
int OSSL_CRMF_pbm_new(OSSL_LIB_CTX *libctx, const char *propq,
|
| 174 |
+
const OSSL_CRMF_PBMPARAMETER *pbmp,
|
| 175 |
+
const unsigned char *msg, size_t msglen,
|
| 176 |
+
const unsigned char *sec, size_t seclen,
|
| 177 |
+
unsigned char **mac, size_t *maclen);
|
| 178 |
+
|
| 179 |
+
/* crmf_lib.c */
|
| 180 |
+
int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
|
| 181 |
+
const ASN1_UTF8STRING *tok);
|
| 182 |
+
ASN1_UTF8STRING
|
| 183 |
+
*OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
|
| 184 |
+
int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
|
| 185 |
+
const ASN1_UTF8STRING *auth);
|
| 186 |
+
ASN1_UTF8STRING
|
| 187 |
+
*OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
|
| 188 |
+
int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
| 189 |
+
OSSL_CRMF_SINGLEPUBINFO *spi);
|
| 190 |
+
#define OSSL_CRMF_PUB_METHOD_DONTCARE 0
|
| 191 |
+
#define OSSL_CRMF_PUB_METHOD_X500 1
|
| 192 |
+
#define OSSL_CRMF_PUB_METHOD_WEB 2
|
| 193 |
+
#define OSSL_CRMF_PUB_METHOD_LDAP 3
|
| 194 |
+
int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
|
| 195 |
+
int method, GENERAL_NAME *nm);
|
| 196 |
+
#define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
|
| 197 |
+
#define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
|
| 198 |
+
int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(OSSL_CRMF_PKIPUBLICATIONINFO *pi,
|
| 199 |
+
int action);
|
| 200 |
+
int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
|
| 201 |
+
const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
|
| 202 |
+
OSSL_CRMF_PKIPUBLICATIONINFO
|
| 203 |
+
*OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
|
| 204 |
+
int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
|
| 205 |
+
const X509_PUBKEY *pubkey);
|
| 206 |
+
X509_PUBKEY
|
| 207 |
+
*OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
|
| 208 |
+
int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
|
| 209 |
+
const OSSL_CRMF_CERTID *cid);
|
| 210 |
+
OSSL_CRMF_CERTID
|
| 211 |
+
*OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
|
| 212 |
+
OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
|
| 213 |
+
const ASN1_INTEGER *serial);
|
| 214 |
+
|
| 215 |
+
int OSSL_CRMF_MSG_set1_regInfo_utf8Pairs(OSSL_CRMF_MSG *msg,
|
| 216 |
+
const ASN1_UTF8STRING *utf8pairs);
|
| 217 |
+
ASN1_UTF8STRING
|
| 218 |
+
*OSSL_CRMF_MSG_get0_regInfo_utf8Pairs(const OSSL_CRMF_MSG *msg);
|
| 219 |
+
int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
|
| 220 |
+
const OSSL_CRMF_CERTREQUEST *cr);
|
| 221 |
+
OSSL_CRMF_CERTREQUEST
|
| 222 |
+
*OSSL_CRMF_MSG_get0_regInfo_certReq(const OSSL_CRMF_MSG *msg);
|
| 223 |
+
|
| 224 |
+
int OSSL_CRMF_MSG_set0_validity(OSSL_CRMF_MSG *crm,
|
| 225 |
+
ASN1_TIME *notBefore, ASN1_TIME *notAfter);
|
| 226 |
+
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
|
| 227 |
+
int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
|
| 228 |
+
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
|
| 229 |
+
|
| 230 |
+
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
|
| 231 |
+
#define OSSL_CRMF_POPO_NONE -1
|
| 232 |
+
#define OSSL_CRMF_POPO_RAVERIFIED 0
|
| 233 |
+
#define OSSL_CRMF_POPO_SIGNATURE 1
|
| 234 |
+
#define OSSL_CRMF_POPO_KEYENC 2
|
| 235 |
+
#define OSSL_CRMF_POPO_KEYAGREE 3
|
| 236 |
+
int OSSL_CRMF_MSG_create_popo(int meth, OSSL_CRMF_MSG *crm,
|
| 237 |
+
EVP_PKEY *pkey, const EVP_MD *digest,
|
| 238 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 239 |
+
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
|
| 240 |
+
int rid, int acceptRAVerified,
|
| 241 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 242 |
+
OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
|
| 243 |
+
X509_PUBKEY
|
| 244 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 245 |
+
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 246 |
+
const X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 247 |
+
const ASN1_INTEGER *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 248 |
+
X509_EXTENSIONS
|
| 249 |
+
*OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
| 250 |
+
const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
| 251 |
+
const ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
| 252 |
+
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
|
| 253 |
+
EVP_PKEY *pubkey,
|
| 254 |
+
const X509_NAME *subject,
|
| 255 |
+
const X509_NAME *issuer,
|
| 256 |
+
const ASN1_INTEGER *serial);
|
| 257 |
+
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
| 258 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 259 |
+
EVP_PKEY *pkey);
|
| 260 |
+
X509 *OSSL_CRMF_ENCRYPTEDKEY_get1_encCert(const OSSL_CRMF_ENCRYPTEDKEY *ecert,
|
| 261 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 262 |
+
EVP_PKEY *pkey, unsigned int flags);
|
| 263 |
+
unsigned char *OSSL_CRMF_ENCRYPTEDVALUE_decrypt(const OSSL_CRMF_ENCRYPTEDVALUE *enc,
|
| 264 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 265 |
+
EVP_PKEY *pkey, int *outlen);
|
| 266 |
+
EVP_PKEY *OSSL_CRMF_ENCRYPTEDKEY_get1_pkey(const OSSL_CRMF_ENCRYPTEDKEY *encryptedKey,
|
| 267 |
+
X509_STORE *ts, STACK_OF(X509) *extra, EVP_PKEY *pkey,
|
| 268 |
+
X509 *cert, ASN1_OCTET_STRING *secret,
|
| 269 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 270 |
+
int OSSL_CRMF_MSG_centralkeygen_requested(const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr);
|
| 271 |
+
#ifndef OPENSSL_NO_CMS
|
| 272 |
+
OSSL_CRMF_ENCRYPTEDKEY *OSSL_CRMF_ENCRYPTEDKEY_init_envdata(CMS_EnvelopedData *envdata);
|
| 273 |
+
#endif
|
| 274 |
+
|
| 275 |
+
#ifdef __cplusplus
|
| 276 |
+
}
|
| 277 |
+
#endif
|
| 278 |
+
#endif /* !defined(OPENSSL_NO_CRMF) */
|
| 279 |
+
#endif /* !defined(OPENSSL_CRMF_H) */
|
micromamba_root/envs/hf_sync/Library/include/openssl/crmferr.h
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CRMFERR_H
|
| 12 |
+
#define OPENSSL_CRMFERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CRMF
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CRMF reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CRMF_R_BAD_PBM_ITERATIONCOUNT 100
|
| 25 |
+
#define CRMF_R_CMS_NOT_SUPPORTED 122
|
| 26 |
+
#define CRMF_R_CRMFERROR 102
|
| 27 |
+
#define CRMF_R_ERROR 103
|
| 28 |
+
#define CRMF_R_ERROR_DECODING_CERTIFICATE 104
|
| 29 |
+
#define CRMF_R_ERROR_DECODING_ENCRYPTEDKEY 123
|
| 30 |
+
#define CRMF_R_ERROR_DECRYPTING_CERTIFICATE 105
|
| 31 |
+
#define CRMF_R_ERROR_DECRYPTING_ENCRYPTEDKEY 124
|
| 32 |
+
#define CRMF_R_ERROR_DECRYPTING_ENCRYPTEDVALUE 125
|
| 33 |
+
#define CRMF_R_ERROR_DECRYPTING_SYMMETRIC_KEY 106
|
| 34 |
+
#define CRMF_R_ERROR_SETTING_PURPOSE 126
|
| 35 |
+
#define CRMF_R_ERROR_VERIFYING_ENCRYPTEDKEY 127
|
| 36 |
+
#define CRMF_R_FAILURE_OBTAINING_RANDOM 107
|
| 37 |
+
#define CRMF_R_ITERATIONCOUNT_BELOW_100 108
|
| 38 |
+
#define CRMF_R_MALFORMED_IV 101
|
| 39 |
+
#define CRMF_R_NULL_ARGUMENT 109
|
| 40 |
+
#define CRMF_R_POPOSKINPUT_NOT_SUPPORTED 113
|
| 41 |
+
#define CRMF_R_POPO_INCONSISTENT_CENTRAL_KEYGEN 128
|
| 42 |
+
#define CRMF_R_POPO_INCONSISTENT_PUBLIC_KEY 117
|
| 43 |
+
#define CRMF_R_POPO_MISSING 121
|
| 44 |
+
#define CRMF_R_POPO_MISSING_PUBLIC_KEY 118
|
| 45 |
+
#define CRMF_R_POPO_MISSING_SUBJECT 119
|
| 46 |
+
#define CRMF_R_POPO_RAVERIFIED_NOT_ACCEPTED 120
|
| 47 |
+
#define CRMF_R_SETTING_MAC_ALGOR_FAILURE 110
|
| 48 |
+
#define CRMF_R_SETTING_OWF_ALGOR_FAILURE 111
|
| 49 |
+
#define CRMF_R_UNSUPPORTED_ALGORITHM 112
|
| 50 |
+
#define CRMF_R_UNSUPPORTED_CIPHER 114
|
| 51 |
+
#define CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO 115
|
| 52 |
+
#define CRMF_R_UNSUPPORTED_POPO_METHOD 116
|
| 53 |
+
|
| 54 |
+
#endif
|
| 55 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/crypto.h
ADDED
|
@@ -0,0 +1,619 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\crypto.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
| 7 |
+
*
|
| 8 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 9 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 10 |
+
* in the file LICENSE in the source distribution or at
|
| 11 |
+
* https://www.openssl.org/source/license.html
|
| 12 |
+
*/
|
| 13 |
+
|
| 14 |
+
/* clang-format off */
|
| 15 |
+
|
| 16 |
+
/* clang-format on */
|
| 17 |
+
|
| 18 |
+
#ifndef OPENSSL_CRYPTO_H
|
| 19 |
+
#define OPENSSL_CRYPTO_H
|
| 20 |
+
#pragma once
|
| 21 |
+
|
| 22 |
+
#include <openssl/macros.h>
|
| 23 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 24 |
+
#define HEADER_CRYPTO_H
|
| 25 |
+
#endif
|
| 26 |
+
|
| 27 |
+
#include <stdlib.h>
|
| 28 |
+
#include <time.h>
|
| 29 |
+
|
| 30 |
+
#include <openssl/e_os2.h>
|
| 31 |
+
|
| 32 |
+
#ifndef OPENSSL_NO_STDIO
|
| 33 |
+
#include <stdio.h>
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
#include <openssl/safestack.h>
|
| 37 |
+
#include <openssl/opensslv.h>
|
| 38 |
+
#include <openssl/types.h>
|
| 39 |
+
#include <openssl/opensslconf.h>
|
| 40 |
+
#include <openssl/cryptoerr.h>
|
| 41 |
+
#include <openssl/core.h>
|
| 42 |
+
|
| 43 |
+
#ifdef CHARSET_EBCDIC
|
| 44 |
+
#include <openssl/ebcdic.h>
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Resolve problems on some operating systems with symbol names that clash
|
| 49 |
+
* one way or another
|
| 50 |
+
*/
|
| 51 |
+
#include <openssl/symhacks.h>
|
| 52 |
+
|
| 53 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 54 |
+
#include <openssl/opensslv.h>
|
| 55 |
+
#endif
|
| 56 |
+
|
| 57 |
+
#ifdef __cplusplus
|
| 58 |
+
extern "C" {
|
| 59 |
+
#endif
|
| 60 |
+
|
| 61 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 62 |
+
#define SSLeay OpenSSL_version_num
|
| 63 |
+
#define SSLeay_version OpenSSL_version
|
| 64 |
+
#define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
| 65 |
+
#define SSLEAY_VERSION OPENSSL_VERSION
|
| 66 |
+
#define SSLEAY_CFLAGS OPENSSL_CFLAGS
|
| 67 |
+
#define SSLEAY_BUILT_ON OPENSSL_BUILT_ON
|
| 68 |
+
#define SSLEAY_PLATFORM OPENSSL_PLATFORM
|
| 69 |
+
#define SSLEAY_DIR OPENSSL_DIR
|
| 70 |
+
|
| 71 |
+
/*
|
| 72 |
+
* Old type for allocating dynamic locks. No longer used. Use the new thread
|
| 73 |
+
* API instead.
|
| 74 |
+
*/
|
| 75 |
+
typedef struct {
|
| 76 |
+
int dummy;
|
| 77 |
+
} CRYPTO_dynlock;
|
| 78 |
+
|
| 79 |
+
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
| 80 |
+
|
| 81 |
+
typedef void CRYPTO_RWLOCK;
|
| 82 |
+
|
| 83 |
+
CRYPTO_RWLOCK *CRYPTO_THREAD_lock_new(void);
|
| 84 |
+
__owur int CRYPTO_THREAD_read_lock(CRYPTO_RWLOCK *lock);
|
| 85 |
+
__owur int CRYPTO_THREAD_write_lock(CRYPTO_RWLOCK *lock);
|
| 86 |
+
int CRYPTO_THREAD_unlock(CRYPTO_RWLOCK *lock);
|
| 87 |
+
void CRYPTO_THREAD_lock_free(CRYPTO_RWLOCK *lock);
|
| 88 |
+
|
| 89 |
+
int CRYPTO_atomic_add(int *val, int amount, int *ret, CRYPTO_RWLOCK *lock);
|
| 90 |
+
int CRYPTO_atomic_add64(uint64_t *val, uint64_t op, uint64_t *ret,
|
| 91 |
+
CRYPTO_RWLOCK *lock);
|
| 92 |
+
int CRYPTO_atomic_and(uint64_t *val, uint64_t op, uint64_t *ret,
|
| 93 |
+
CRYPTO_RWLOCK *lock);
|
| 94 |
+
int CRYPTO_atomic_or(uint64_t *val, uint64_t op, uint64_t *ret,
|
| 95 |
+
CRYPTO_RWLOCK *lock);
|
| 96 |
+
int CRYPTO_atomic_load(uint64_t *val, uint64_t *ret, CRYPTO_RWLOCK *lock);
|
| 97 |
+
int CRYPTO_atomic_load_int(int *val, int *ret, CRYPTO_RWLOCK *lock);
|
| 98 |
+
int CRYPTO_atomic_store(uint64_t *dst, uint64_t val, CRYPTO_RWLOCK *lock);
|
| 99 |
+
|
| 100 |
+
/* No longer needed, so this is a no-op */
|
| 101 |
+
#define OPENSSL_malloc_init() \
|
| 102 |
+
while (0) \
|
| 103 |
+
continue
|
| 104 |
+
|
| 105 |
+
#define OPENSSL_malloc(num) \
|
| 106 |
+
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
| 107 |
+
#define OPENSSL_zalloc(num) \
|
| 108 |
+
CRYPTO_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
| 109 |
+
#define OPENSSL_malloc_array(num, size) \
|
| 110 |
+
CRYPTO_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
| 111 |
+
#define OPENSSL_calloc(num, size) \
|
| 112 |
+
CRYPTO_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
| 113 |
+
#define OPENSSL_aligned_alloc(num, alignment, freeptr) \
|
| 114 |
+
CRYPTO_aligned_alloc(num, alignment, freeptr, \
|
| 115 |
+
OPENSSL_FILE, OPENSSL_LINE)
|
| 116 |
+
#define OPENSSL_aligned_alloc_array(num, size, alignment, freeptr) \
|
| 117 |
+
CRYPTO_aligned_alloc_array(num, size, alignment, freeptr, \
|
| 118 |
+
OPENSSL_FILE, OPENSSL_LINE)
|
| 119 |
+
#define OPENSSL_realloc(addr, num) \
|
| 120 |
+
CRYPTO_realloc(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
| 121 |
+
#define OPENSSL_clear_realloc(addr, old_num, num) \
|
| 122 |
+
CRYPTO_clear_realloc(addr, old_num, num, OPENSSL_FILE, OPENSSL_LINE)
|
| 123 |
+
#define OPENSSL_realloc_array(addr, num, size) \
|
| 124 |
+
CRYPTO_realloc_array(addr, num, size, OPENSSL_FILE, OPENSSL_LINE)
|
| 125 |
+
#define OPENSSL_clear_realloc_array(addr, old_num, num, size) \
|
| 126 |
+
CRYPTO_clear_realloc_array(addr, old_num, num, size, \
|
| 127 |
+
OPENSSL_FILE, OPENSSL_LINE)
|
| 128 |
+
#define OPENSSL_clear_free(addr, num) \
|
| 129 |
+
CRYPTO_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
| 130 |
+
#define OPENSSL_free(addr) \
|
| 131 |
+
CRYPTO_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
| 132 |
+
#define OPENSSL_memdup(str, s) \
|
| 133 |
+
CRYPTO_memdup((str), s, OPENSSL_FILE, OPENSSL_LINE)
|
| 134 |
+
#define OPENSSL_strdup(str) \
|
| 135 |
+
CRYPTO_strdup(str, OPENSSL_FILE, OPENSSL_LINE)
|
| 136 |
+
#define OPENSSL_strndup(str, n) \
|
| 137 |
+
CRYPTO_strndup(str, n, OPENSSL_FILE, OPENSSL_LINE)
|
| 138 |
+
#define OPENSSL_secure_malloc(num) \
|
| 139 |
+
CRYPTO_secure_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
| 140 |
+
#define OPENSSL_secure_zalloc(num) \
|
| 141 |
+
CRYPTO_secure_zalloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
| 142 |
+
#define OPENSSL_secure_malloc_array(num, size) \
|
| 143 |
+
CRYPTO_secure_malloc_array(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
| 144 |
+
#define OPENSSL_secure_calloc(num, size) \
|
| 145 |
+
CRYPTO_secure_calloc(num, size, OPENSSL_FILE, OPENSSL_LINE)
|
| 146 |
+
#define OPENSSL_secure_free(addr) \
|
| 147 |
+
CRYPTO_secure_free(addr, OPENSSL_FILE, OPENSSL_LINE)
|
| 148 |
+
#define OPENSSL_secure_clear_free(addr, num) \
|
| 149 |
+
CRYPTO_secure_clear_free(addr, num, OPENSSL_FILE, OPENSSL_LINE)
|
| 150 |
+
#define OPENSSL_secure_actual_size(ptr) \
|
| 151 |
+
CRYPTO_secure_actual_size(ptr)
|
| 152 |
+
|
| 153 |
+
size_t OPENSSL_strlcpy(char *dst, const char *src, size_t siz);
|
| 154 |
+
size_t OPENSSL_strlcat(char *dst, const char *src, size_t siz);
|
| 155 |
+
size_t OPENSSL_strnlen(const char *str, size_t maxlen);
|
| 156 |
+
int OPENSSL_strtoul(const char *str, char **endptr, int base, unsigned long *num);
|
| 157 |
+
int OPENSSL_buf2hexstr_ex(char *str, size_t str_n, size_t *strlength,
|
| 158 |
+
const unsigned char *buf, size_t buflen,
|
| 159 |
+
const char sep);
|
| 160 |
+
char *OPENSSL_buf2hexstr(const unsigned char *buf, long buflen);
|
| 161 |
+
int OPENSSL_hexstr2buf_ex(unsigned char *buf, size_t buf_n, size_t *buflen,
|
| 162 |
+
const char *str, const char sep);
|
| 163 |
+
unsigned char *OPENSSL_hexstr2buf(const char *str, long *buflen);
|
| 164 |
+
int OPENSSL_hexchar2int(unsigned char c);
|
| 165 |
+
int OPENSSL_strcasecmp(const char *s1, const char *s2);
|
| 166 |
+
int OPENSSL_strncasecmp(const char *s1, const char *s2, size_t n);
|
| 167 |
+
|
| 168 |
+
#define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U << (sizeof(int) * 8 - 1)) - 1) / sizeof(type))
|
| 169 |
+
|
| 170 |
+
/*
|
| 171 |
+
* These functions return the values of OPENSSL_VERSION_MAJOR,
|
| 172 |
+
* OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE
|
| 173 |
+
* and OPENSSL_VERSION_BUILD_METADATA, respectively.
|
| 174 |
+
*/
|
| 175 |
+
unsigned int OPENSSL_version_major(void);
|
| 176 |
+
unsigned int OPENSSL_version_minor(void);
|
| 177 |
+
unsigned int OPENSSL_version_patch(void);
|
| 178 |
+
const char *OPENSSL_version_pre_release(void);
|
| 179 |
+
const char *OPENSSL_version_build_metadata(void);
|
| 180 |
+
|
| 181 |
+
unsigned long OpenSSL_version_num(void);
|
| 182 |
+
const char *OpenSSL_version(int type);
|
| 183 |
+
#define OPENSSL_VERSION 0
|
| 184 |
+
#define OPENSSL_CFLAGS 1
|
| 185 |
+
#define OPENSSL_BUILT_ON 2
|
| 186 |
+
#define OPENSSL_PLATFORM 3
|
| 187 |
+
#define OPENSSL_DIR 4
|
| 188 |
+
#define OPENSSL_ENGINES_DIR 5
|
| 189 |
+
#define OPENSSL_VERSION_STRING 6
|
| 190 |
+
#define OPENSSL_FULL_VERSION_STRING 7
|
| 191 |
+
#define OPENSSL_MODULES_DIR 8
|
| 192 |
+
#define OPENSSL_CPU_INFO 9
|
| 193 |
+
#define OPENSSL_WINCTX 10
|
| 194 |
+
|
| 195 |
+
const char *OPENSSL_info(int type);
|
| 196 |
+
/*
|
| 197 |
+
* The series starts at 1001 to avoid confusion with the OpenSSL_version
|
| 198 |
+
* types.
|
| 199 |
+
*/
|
| 200 |
+
#define OPENSSL_INFO_CONFIG_DIR 1001
|
| 201 |
+
#define OPENSSL_INFO_ENGINES_DIR 1002
|
| 202 |
+
#define OPENSSL_INFO_MODULES_DIR 1003
|
| 203 |
+
#define OPENSSL_INFO_DSO_EXTENSION 1004
|
| 204 |
+
#define OPENSSL_INFO_DIR_FILENAME_SEPARATOR 1005
|
| 205 |
+
#define OPENSSL_INFO_LIST_SEPARATOR 1006
|
| 206 |
+
#define OPENSSL_INFO_SEED_SOURCE 1007
|
| 207 |
+
#define OPENSSL_INFO_CPU_SETTINGS 1008
|
| 208 |
+
#define OPENSSL_INFO_WINDOWS_CONTEXT 1009
|
| 209 |
+
|
| 210 |
+
int OPENSSL_issetugid(void);
|
| 211 |
+
|
| 212 |
+
struct crypto_ex_data_st {
|
| 213 |
+
OSSL_LIB_CTX *ctx;
|
| 214 |
+
STACK_OF(void) *sk;
|
| 215 |
+
};
|
| 216 |
+
|
| 217 |
+
/* clang-format off */
|
| 218 |
+
SKM_DEFINE_STACK_OF_INTERNAL(void, void, void)
|
| 219 |
+
#define sk_void_num(sk) OPENSSL_sk_num(ossl_check_const_void_sk_type(sk))
|
| 220 |
+
#define sk_void_value(sk, idx) ((void *)OPENSSL_sk_value(ossl_check_const_void_sk_type(sk), (idx)))
|
| 221 |
+
#define sk_void_new(cmp) ((STACK_OF(void) *)OPENSSL_sk_new(ossl_check_void_compfunc_type(cmp)))
|
| 222 |
+
#define sk_void_new_null() ((STACK_OF(void) *)OPENSSL_sk_new_null())
|
| 223 |
+
#define sk_void_new_reserve(cmp, n) ((STACK_OF(void) *)OPENSSL_sk_new_reserve(ossl_check_void_compfunc_type(cmp), (n)))
|
| 224 |
+
#define sk_void_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_void_sk_type(sk), (n))
|
| 225 |
+
#define sk_void_free(sk) OPENSSL_sk_free(ossl_check_void_sk_type(sk))
|
| 226 |
+
#define sk_void_zero(sk) OPENSSL_sk_zero(ossl_check_void_sk_type(sk))
|
| 227 |
+
#define sk_void_delete(sk, i) ((void *)OPENSSL_sk_delete(ossl_check_void_sk_type(sk), (i)))
|
| 228 |
+
#define sk_void_delete_ptr(sk, ptr) ((void *)OPENSSL_sk_delete_ptr(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr)))
|
| 229 |
+
#define sk_void_push(sk, ptr) OPENSSL_sk_push(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
| 230 |
+
#define sk_void_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
| 231 |
+
#define sk_void_pop(sk) ((void *)OPENSSL_sk_pop(ossl_check_void_sk_type(sk)))
|
| 232 |
+
#define sk_void_shift(sk) ((void *)OPENSSL_sk_shift(ossl_check_void_sk_type(sk)))
|
| 233 |
+
#define sk_void_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_void_sk_type(sk), ossl_check_void_freefunc_type(freefunc))
|
| 234 |
+
#define sk_void_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr), (idx))
|
| 235 |
+
#define sk_void_set(sk, idx, ptr) ((void *)OPENSSL_sk_set(ossl_check_void_sk_type(sk), (idx), ossl_check_void_type(ptr)))
|
| 236 |
+
#define sk_void_find(sk, ptr) OPENSSL_sk_find(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
| 237 |
+
#define sk_void_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr))
|
| 238 |
+
#define sk_void_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_void_sk_type(sk), ossl_check_void_type(ptr), pnum)
|
| 239 |
+
#define sk_void_sort(sk) OPENSSL_sk_sort(ossl_check_void_sk_type(sk))
|
| 240 |
+
#define sk_void_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_void_sk_type(sk))
|
| 241 |
+
#define sk_void_dup(sk) ((STACK_OF(void) *)OPENSSL_sk_dup(ossl_check_const_void_sk_type(sk)))
|
| 242 |
+
#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)))
|
| 243 |
+
#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)))
|
| 244 |
+
|
| 245 |
+
/* clang-format on */
|
| 246 |
+
|
| 247 |
+
/*
|
| 248 |
+
* Per class, we have a STACK of function pointers.
|
| 249 |
+
*/
|
| 250 |
+
#define CRYPTO_EX_INDEX_SSL 0
|
| 251 |
+
#define CRYPTO_EX_INDEX_SSL_CTX 1
|
| 252 |
+
#define CRYPTO_EX_INDEX_SSL_SESSION 2
|
| 253 |
+
#define CRYPTO_EX_INDEX_X509 3
|
| 254 |
+
#define CRYPTO_EX_INDEX_X509_STORE 4
|
| 255 |
+
#define CRYPTO_EX_INDEX_X509_STORE_CTX 5
|
| 256 |
+
#define CRYPTO_EX_INDEX_DH 6
|
| 257 |
+
#define CRYPTO_EX_INDEX_DSA 7
|
| 258 |
+
#define CRYPTO_EX_INDEX_EC_KEY 8
|
| 259 |
+
#define CRYPTO_EX_INDEX_RSA 9
|
| 260 |
+
#define CRYPTO_EX_INDEX_ENGINE 10
|
| 261 |
+
#define CRYPTO_EX_INDEX_UI 11
|
| 262 |
+
#define CRYPTO_EX_INDEX_BIO 12
|
| 263 |
+
#define CRYPTO_EX_INDEX_APP 13
|
| 264 |
+
#define CRYPTO_EX_INDEX_UI_METHOD 14
|
| 265 |
+
#define CRYPTO_EX_INDEX_RAND_DRBG 15
|
| 266 |
+
#define CRYPTO_EX_INDEX_DRBG CRYPTO_EX_INDEX_RAND_DRBG
|
| 267 |
+
#define CRYPTO_EX_INDEX_OSSL_LIB_CTX 16
|
| 268 |
+
#define CRYPTO_EX_INDEX_EVP_PKEY 17
|
| 269 |
+
#define CRYPTO_EX_INDEX__COUNT 18
|
| 270 |
+
|
| 271 |
+
typedef void CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
| 272 |
+
int idx, long argl, void *argp);
|
| 273 |
+
typedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
| 274 |
+
int idx, long argl, void *argp);
|
| 275 |
+
typedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from,
|
| 276 |
+
void **from_d, int idx, long argl, void *argp);
|
| 277 |
+
__owur int CRYPTO_get_ex_new_index(int class_index, long argl, void *argp,
|
| 278 |
+
CRYPTO_EX_new *new_func,
|
| 279 |
+
CRYPTO_EX_dup *dup_func,
|
| 280 |
+
CRYPTO_EX_free *free_func);
|
| 281 |
+
/* No longer use an index. */
|
| 282 |
+
int CRYPTO_free_ex_index(int class_index, int idx);
|
| 283 |
+
|
| 284 |
+
/*
|
| 285 |
+
* Initialise/duplicate/free CRYPTO_EX_DATA variables corresponding to a
|
| 286 |
+
* given class (invokes whatever per-class callbacks are applicable)
|
| 287 |
+
*/
|
| 288 |
+
int CRYPTO_new_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
| 289 |
+
int CRYPTO_dup_ex_data(int class_index, CRYPTO_EX_DATA *to,
|
| 290 |
+
const CRYPTO_EX_DATA *from);
|
| 291 |
+
|
| 292 |
+
void CRYPTO_free_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad);
|
| 293 |
+
|
| 294 |
+
/* Allocate a single item in the CRYPTO_EX_DATA variable */
|
| 295 |
+
int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
|
| 296 |
+
int idx);
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
* Get/set data in a CRYPTO_EX_DATA variable corresponding to a particular
|
| 300 |
+
* index (relative to the class type involved)
|
| 301 |
+
*/
|
| 302 |
+
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
|
| 303 |
+
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
| 304 |
+
|
| 305 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 306 |
+
/*
|
| 307 |
+
* This function cleans up all "ex_data" state. It mustn't be called under
|
| 308 |
+
* potential race-conditions.
|
| 309 |
+
*/
|
| 310 |
+
#define CRYPTO_cleanup_all_ex_data() \
|
| 311 |
+
while (0) \
|
| 312 |
+
continue
|
| 313 |
+
|
| 314 |
+
/*
|
| 315 |
+
* The old locking functions have been removed completely without compatibility
|
| 316 |
+
* macros. This is because the old functions either could not properly report
|
| 317 |
+
* errors, or the returned error values were not clearly documented.
|
| 318 |
+
* Replacing the locking functions with no-ops would cause race condition
|
| 319 |
+
* issues in the affected applications. It is far better for them to fail at
|
| 320 |
+
* compile time.
|
| 321 |
+
* On the other hand, the locking callbacks are no longer used. Consequently,
|
| 322 |
+
* the callback management functions can be safely replaced with no-op macros.
|
| 323 |
+
*/
|
| 324 |
+
#define CRYPTO_num_locks() (1)
|
| 325 |
+
#define CRYPTO_set_locking_callback(func)
|
| 326 |
+
#define CRYPTO_get_locking_callback() (NULL)
|
| 327 |
+
#define CRYPTO_set_add_lock_callback(func)
|
| 328 |
+
#define CRYPTO_get_add_lock_callback() (NULL)
|
| 329 |
+
|
| 330 |
+
/*
|
| 331 |
+
* These defines where used in combination with the old locking callbacks,
|
| 332 |
+
* they are not called anymore, but old code that's not called might still
|
| 333 |
+
* use them.
|
| 334 |
+
*/
|
| 335 |
+
#define CRYPTO_LOCK 1
|
| 336 |
+
#define CRYPTO_UNLOCK 2
|
| 337 |
+
#define CRYPTO_READ 4
|
| 338 |
+
#define CRYPTO_WRITE 8
|
| 339 |
+
|
| 340 |
+
/* This structure is no longer used */
|
| 341 |
+
typedef struct crypto_threadid_st {
|
| 342 |
+
int dummy;
|
| 343 |
+
} CRYPTO_THREADID;
|
| 344 |
+
/* Only use CRYPTO_THREADID_set_[numeric|pointer]() within callbacks */
|
| 345 |
+
#define CRYPTO_THREADID_set_numeric(id, val)
|
| 346 |
+
#define CRYPTO_THREADID_set_pointer(id, ptr)
|
| 347 |
+
#define CRYPTO_THREADID_set_callback(threadid_func) (0)
|
| 348 |
+
#define CRYPTO_THREADID_get_callback() (NULL)
|
| 349 |
+
#define CRYPTO_THREADID_current(id)
|
| 350 |
+
#define CRYPTO_THREADID_cmp(a, b) (-1)
|
| 351 |
+
#define CRYPTO_THREADID_cpy(dest, src)
|
| 352 |
+
#define CRYPTO_THREADID_hash(id) (0UL)
|
| 353 |
+
|
| 354 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
| 355 |
+
#define CRYPTO_set_id_callback(func)
|
| 356 |
+
#define CRYPTO_get_id_callback() (NULL)
|
| 357 |
+
#define CRYPTO_thread_id() (0UL)
|
| 358 |
+
#endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
|
| 359 |
+
|
| 360 |
+
#define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
| 361 |
+
#define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
| 362 |
+
#define CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function)
|
| 363 |
+
#define CRYPTO_get_dynlock_create_callback() (NULL)
|
| 364 |
+
#define CRYPTO_get_dynlock_lock_callback() (NULL)
|
| 365 |
+
#define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
| 366 |
+
#endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
| 367 |
+
|
| 368 |
+
typedef void *(*CRYPTO_malloc_fn)(size_t num, const char *file, int line);
|
| 369 |
+
typedef void *(*CRYPTO_realloc_fn)(void *addr, size_t num, const char *file,
|
| 370 |
+
int line);
|
| 371 |
+
typedef void (*CRYPTO_free_fn)(void *addr, const char *file, int line);
|
| 372 |
+
int CRYPTO_set_mem_functions(CRYPTO_malloc_fn malloc_fn,
|
| 373 |
+
CRYPTO_realloc_fn realloc_fn,
|
| 374 |
+
CRYPTO_free_fn free_fn);
|
| 375 |
+
void CRYPTO_get_mem_functions(CRYPTO_malloc_fn *malloc_fn,
|
| 376 |
+
CRYPTO_realloc_fn *realloc_fn,
|
| 377 |
+
CRYPTO_free_fn *free_fn);
|
| 378 |
+
|
| 379 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_malloc(size_t num, const char *file, int line);
|
| 380 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_zalloc(size_t num, const char *file, int line);
|
| 381 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_malloc_array(size_t num, size_t size,
|
| 382 |
+
const char *file, int line);
|
| 383 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_calloc(size_t num, size_t size,
|
| 384 |
+
const char *file, int line);
|
| 385 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_aligned_alloc(size_t num, size_t align,
|
| 386 |
+
void **freeptr, const char *file,
|
| 387 |
+
int line);
|
| 388 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_aligned_alloc_array(size_t num, size_t size,
|
| 389 |
+
size_t align, void **freeptr,
|
| 390 |
+
const char *file, int line);
|
| 391 |
+
void *CRYPTO_memdup(const void *str, size_t siz, const char *file, int line);
|
| 392 |
+
char *CRYPTO_strdup(const char *str, const char *file, int line);
|
| 393 |
+
char *CRYPTO_strndup(const char *str, size_t s, const char *file, int line);
|
| 394 |
+
void CRYPTO_free(void *ptr, const char *file, int line);
|
| 395 |
+
void CRYPTO_clear_free(void *ptr, size_t num, const char *file, int line);
|
| 396 |
+
void *CRYPTO_realloc(void *addr, size_t num, const char *file, int line);
|
| 397 |
+
void *CRYPTO_clear_realloc(void *addr, size_t old_num, size_t num,
|
| 398 |
+
const char *file, int line);
|
| 399 |
+
void *CRYPTO_realloc_array(void *addr, size_t num, size_t size,
|
| 400 |
+
const char *file, int line);
|
| 401 |
+
void *CRYPTO_clear_realloc_array(void *addr, size_t old_num, size_t num,
|
| 402 |
+
size_t size, const char *file, int line);
|
| 403 |
+
|
| 404 |
+
int CRYPTO_secure_malloc_init(size_t sz, size_t minsize);
|
| 405 |
+
int CRYPTO_secure_malloc_done(void);
|
| 406 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_malloc(size_t num, const char *file, int line);
|
| 407 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_zalloc(size_t num, const char *file, int line);
|
| 408 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_malloc_array(size_t num, size_t size,
|
| 409 |
+
const char *file, int line);
|
| 410 |
+
OSSL_CRYPTO_ALLOC void *CRYPTO_secure_calloc(size_t num, size_t size,
|
| 411 |
+
const char *file, int line);
|
| 412 |
+
void CRYPTO_secure_free(void *ptr, const char *file, int line);
|
| 413 |
+
void CRYPTO_secure_clear_free(void *ptr, size_t num,
|
| 414 |
+
const char *file, int line);
|
| 415 |
+
int CRYPTO_secure_allocated(const void *ptr);
|
| 416 |
+
int CRYPTO_secure_malloc_initialized(void);
|
| 417 |
+
size_t CRYPTO_secure_actual_size(void *ptr);
|
| 418 |
+
size_t CRYPTO_secure_used(void);
|
| 419 |
+
|
| 420 |
+
void OPENSSL_cleanse(void *ptr, size_t len);
|
| 421 |
+
|
| 422 |
+
#ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
| 423 |
+
/*
|
| 424 |
+
* The following can be used to detect memory leaks in the library. If
|
| 425 |
+
* used, it turns on malloc checking
|
| 426 |
+
*/
|
| 427 |
+
#define CRYPTO_MEM_CHECK_OFF 0x0 /* Control only */
|
| 428 |
+
#define CRYPTO_MEM_CHECK_ON 0x1 /* Control and mode bit */
|
| 429 |
+
#define CRYPTO_MEM_CHECK_ENABLE 0x2 /* Control and mode bit */
|
| 430 |
+
#define CRYPTO_MEM_CHECK_DISABLE 0x3 /* Control only */
|
| 431 |
+
|
| 432 |
+
/* max allowed length for value of OPENSSL_MALLOC_FAILURES env var. */
|
| 433 |
+
#define CRYPTO_MEM_CHECK_MAX_FS 256
|
| 434 |
+
|
| 435 |
+
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
| 436 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 437 |
+
#define OPENSSL_mem_debug_push(info) \
|
| 438 |
+
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
| 439 |
+
#define OPENSSL_mem_debug_pop() \
|
| 440 |
+
CRYPTO_mem_debug_pop()
|
| 441 |
+
#endif
|
| 442 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 443 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_set_mem_debug(int flag);
|
| 444 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_ctrl(int mode);
|
| 445 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_push(const char *info,
|
| 446 |
+
const char *file, int line);
|
| 447 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_debug_pop(void);
|
| 448 |
+
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_malloc(void *addr, size_t num,
|
| 449 |
+
int flag,
|
| 450 |
+
const char *file, int line);
|
| 451 |
+
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_realloc(void *addr1, void *addr2,
|
| 452 |
+
size_t num, int flag,
|
| 453 |
+
const char *file, int line);
|
| 454 |
+
OSSL_DEPRECATEDIN_3_0 void CRYPTO_mem_debug_free(void *addr, int flag,
|
| 455 |
+
const char *file, int line);
|
| 456 |
+
OSSL_DEPRECATEDIN_3_0
|
| 457 |
+
int CRYPTO_mem_leaks_cb(int (*cb)(const char *str, size_t len, void *u),
|
| 458 |
+
void *u);
|
| 459 |
+
#endif
|
| 460 |
+
#ifndef OPENSSL_NO_STDIO
|
| 461 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 462 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks_fp(FILE *);
|
| 463 |
+
#endif
|
| 464 |
+
#endif
|
| 465 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 466 |
+
OSSL_DEPRECATEDIN_3_0 int CRYPTO_mem_leaks(BIO *bio);
|
| 467 |
+
#endif
|
| 468 |
+
#endif /* OPENSSL_NO_CRYPTO_MDEBUG */
|
| 469 |
+
|
| 470 |
+
/* die if we have to */
|
| 471 |
+
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
|
| 472 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 473 |
+
#define OpenSSLDie(f, l, a) OPENSSL_die((a), (f), (l))
|
| 474 |
+
#endif
|
| 475 |
+
#define OPENSSL_assert(e) \
|
| 476 |
+
(void)((e) ? 0 : (OPENSSL_die("assertion failed: " #e, OPENSSL_FILE, OPENSSL_LINE), 1))
|
| 477 |
+
|
| 478 |
+
int OPENSSL_isservice(void);
|
| 479 |
+
|
| 480 |
+
void OPENSSL_init(void);
|
| 481 |
+
#ifdef OPENSSL_SYS_UNIX
|
| 482 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 483 |
+
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_prepare(void);
|
| 484 |
+
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_parent(void);
|
| 485 |
+
OSSL_DEPRECATEDIN_3_0 void OPENSSL_fork_child(void);
|
| 486 |
+
#endif
|
| 487 |
+
#endif
|
| 488 |
+
|
| 489 |
+
struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result);
|
| 490 |
+
int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec);
|
| 491 |
+
int OPENSSL_gmtime_diff(int *pday, int *psec,
|
| 492 |
+
const struct tm *from, const struct tm *to);
|
| 493 |
+
|
| 494 |
+
/*
|
| 495 |
+
* CRYPTO_memcmp returns zero iff the |len| bytes at |a| and |b| are equal.
|
| 496 |
+
* It takes an amount of time dependent on |len|, but independent of the
|
| 497 |
+
* contents of |a| and |b|. Unlike memcmp, it cannot be used to put elements
|
| 498 |
+
* into a defined order as the return value when a != b is undefined, other
|
| 499 |
+
* than to be non-zero.
|
| 500 |
+
*/
|
| 501 |
+
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len);
|
| 502 |
+
|
| 503 |
+
/* Standard initialisation options */
|
| 504 |
+
#define OPENSSL_INIT_NO_LOAD_CRYPTO_STRINGS 0x00000001L
|
| 505 |
+
#define OPENSSL_INIT_LOAD_CRYPTO_STRINGS 0x00000002L
|
| 506 |
+
#define OPENSSL_INIT_ADD_ALL_CIPHERS 0x00000004L
|
| 507 |
+
#define OPENSSL_INIT_ADD_ALL_DIGESTS 0x00000008L
|
| 508 |
+
#define OPENSSL_INIT_NO_ADD_ALL_CIPHERS 0x00000010L
|
| 509 |
+
#define OPENSSL_INIT_NO_ADD_ALL_DIGESTS 0x00000020L
|
| 510 |
+
#define OPENSSL_INIT_LOAD_CONFIG 0x00000040L
|
| 511 |
+
#define OPENSSL_INIT_NO_LOAD_CONFIG 0x00000080L
|
| 512 |
+
#define OPENSSL_INIT_ASYNC 0x00000100L
|
| 513 |
+
#define OPENSSL_INIT_ENGINE_RDRAND 0x00000200L
|
| 514 |
+
#define OPENSSL_INIT_ENGINE_DYNAMIC 0x00000400L
|
| 515 |
+
#define OPENSSL_INIT_ENGINE_OPENSSL 0x00000800L
|
| 516 |
+
#define OPENSSL_INIT_ENGINE_CRYPTODEV 0x00001000L
|
| 517 |
+
#define OPENSSL_INIT_ENGINE_CAPI 0x00002000L
|
| 518 |
+
#define OPENSSL_INIT_ENGINE_PADLOCK 0x00004000L
|
| 519 |
+
#define OPENSSL_INIT_ENGINE_AFALG 0x00008000L
|
| 520 |
+
/* FREE: 0x00010000L */
|
| 521 |
+
#define OPENSSL_INIT_ATFORK 0x00020000L
|
| 522 |
+
/* OPENSSL_INIT_BASE_ONLY 0x00040000L */
|
| 523 |
+
#define OPENSSL_INIT_NO_ATEXIT 0x00080000L
|
| 524 |
+
/* OPENSSL_INIT flag range 0x03f00000 reserved for OPENSSL_init_ssl() */
|
| 525 |
+
/* FREE: 0x04000000L */
|
| 526 |
+
/* FREE: 0x08000000L */
|
| 527 |
+
/* FREE: 0x10000000L */
|
| 528 |
+
/* FREE: 0x20000000L */
|
| 529 |
+
/* FREE: 0x40000000L */
|
| 530 |
+
/* FREE: 0x80000000L */
|
| 531 |
+
/* Max OPENSSL_INIT flag value is 0x80000000 */
|
| 532 |
+
|
| 533 |
+
/* openssl and dasync not counted as builtin */
|
| 534 |
+
#define OPENSSL_INIT_ENGINE_ALL_BUILTIN \
|
| 535 |
+
(OPENSSL_INIT_ENGINE_RDRAND | OPENSSL_INIT_ENGINE_DYNAMIC \
|
| 536 |
+
| OPENSSL_INIT_ENGINE_CRYPTODEV | OPENSSL_INIT_ENGINE_CAPI | OPENSSL_INIT_ENGINE_PADLOCK)
|
| 537 |
+
|
| 538 |
+
/* Library initialisation functions */
|
| 539 |
+
void OPENSSL_cleanup(void);
|
| 540 |
+
int OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
|
| 541 |
+
int OPENSSL_atexit(void (*handler)(void));
|
| 542 |
+
void OPENSSL_thread_stop(void);
|
| 543 |
+
void OPENSSL_thread_stop_ex(OSSL_LIB_CTX *ctx);
|
| 544 |
+
|
| 545 |
+
/* Low-level control of initialization */
|
| 546 |
+
OPENSSL_INIT_SETTINGS *OPENSSL_INIT_new(void);
|
| 547 |
+
#ifndef OPENSSL_NO_STDIO
|
| 548 |
+
int OPENSSL_INIT_set_config_filename(OPENSSL_INIT_SETTINGS *settings,
|
| 549 |
+
const char *config_filename);
|
| 550 |
+
void OPENSSL_INIT_set_config_file_flags(OPENSSL_INIT_SETTINGS *settings,
|
| 551 |
+
unsigned long flags);
|
| 552 |
+
int OPENSSL_INIT_set_config_appname(OPENSSL_INIT_SETTINGS *settings,
|
| 553 |
+
const char *config_appname);
|
| 554 |
+
#endif
|
| 555 |
+
void OPENSSL_INIT_free(OPENSSL_INIT_SETTINGS *settings);
|
| 556 |
+
|
| 557 |
+
#if defined(OPENSSL_THREADS) && !defined(CRYPTO_TDEBUG)
|
| 558 |
+
#if defined(_WIN32)
|
| 559 |
+
#if defined(BASETYPES) || defined(_WINDEF_H)
|
| 560 |
+
/* application has to include <windows.h> in order to use this */
|
| 561 |
+
typedef DWORD CRYPTO_THREAD_LOCAL;
|
| 562 |
+
typedef DWORD CRYPTO_THREAD_ID;
|
| 563 |
+
|
| 564 |
+
typedef LONG CRYPTO_ONCE;
|
| 565 |
+
#define CRYPTO_ONCE_STATIC_INIT 0
|
| 566 |
+
#endif
|
| 567 |
+
#else
|
| 568 |
+
#if defined(__TANDEM) && defined(_SPT_MODEL_)
|
| 569 |
+
#define SPT_THREAD_SIGNAL 1
|
| 570 |
+
#define SPT_THREAD_AWARE 1
|
| 571 |
+
#include <spthread.h>
|
| 572 |
+
#else
|
| 573 |
+
#include <pthread.h>
|
| 574 |
+
#endif
|
| 575 |
+
typedef pthread_once_t CRYPTO_ONCE;
|
| 576 |
+
typedef pthread_key_t CRYPTO_THREAD_LOCAL;
|
| 577 |
+
typedef pthread_t CRYPTO_THREAD_ID;
|
| 578 |
+
|
| 579 |
+
#define CRYPTO_ONCE_STATIC_INIT PTHREAD_ONCE_INIT
|
| 580 |
+
#endif
|
| 581 |
+
#endif
|
| 582 |
+
|
| 583 |
+
#if !defined(CRYPTO_ONCE_STATIC_INIT)
|
| 584 |
+
typedef unsigned int CRYPTO_ONCE;
|
| 585 |
+
typedef unsigned int CRYPTO_THREAD_LOCAL;
|
| 586 |
+
typedef unsigned int CRYPTO_THREAD_ID;
|
| 587 |
+
#define CRYPTO_ONCE_STATIC_INIT 0
|
| 588 |
+
#endif
|
| 589 |
+
|
| 590 |
+
int CRYPTO_THREAD_run_once(CRYPTO_ONCE *once, void (*init)(void));
|
| 591 |
+
|
| 592 |
+
int CRYPTO_THREAD_init_local(CRYPTO_THREAD_LOCAL *key, void (*cleanup)(void *));
|
| 593 |
+
void *CRYPTO_THREAD_get_local(CRYPTO_THREAD_LOCAL *key);
|
| 594 |
+
int CRYPTO_THREAD_set_local(CRYPTO_THREAD_LOCAL *key, void *val);
|
| 595 |
+
int CRYPTO_THREAD_cleanup_local(CRYPTO_THREAD_LOCAL *key);
|
| 596 |
+
|
| 597 |
+
CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void);
|
| 598 |
+
int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
|
| 599 |
+
|
| 600 |
+
OSSL_LIB_CTX *OSSL_LIB_CTX_new(void);
|
| 601 |
+
OSSL_LIB_CTX *OSSL_LIB_CTX_new_from_dispatch(const OSSL_CORE_HANDLE *handle,
|
| 602 |
+
const OSSL_DISPATCH *in);
|
| 603 |
+
OSSL_LIB_CTX *OSSL_LIB_CTX_new_child(const OSSL_CORE_HANDLE *handle,
|
| 604 |
+
const OSSL_DISPATCH *in);
|
| 605 |
+
int OSSL_LIB_CTX_load_config(OSSL_LIB_CTX *ctx, const char *config_file);
|
| 606 |
+
void OSSL_LIB_CTX_free(OSSL_LIB_CTX *);
|
| 607 |
+
OSSL_LIB_CTX *OSSL_LIB_CTX_get0_global_default(void);
|
| 608 |
+
OSSL_LIB_CTX *OSSL_LIB_CTX_set0_default(OSSL_LIB_CTX *libctx);
|
| 609 |
+
int OSSL_LIB_CTX_get_conf_diagnostics(OSSL_LIB_CTX *ctx);
|
| 610 |
+
void OSSL_LIB_CTX_set_conf_diagnostics(OSSL_LIB_CTX *ctx, int value);
|
| 611 |
+
|
| 612 |
+
void OSSL_sleep(uint64_t millis);
|
| 613 |
+
|
| 614 |
+
void *OSSL_LIB_CTX_get_data(OSSL_LIB_CTX *ctx, int index);
|
| 615 |
+
|
| 616 |
+
#ifdef __cplusplus
|
| 617 |
+
}
|
| 618 |
+
#endif
|
| 619 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cryptoerr.h
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CRYPTOERR_H
|
| 12 |
+
#define OPENSSL_CRYPTOERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* CRYPTO reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define CRYPTO_R_BAD_ALGORITHM_NAME 117
|
| 23 |
+
#define CRYPTO_R_CONFLICTING_NAMES 118
|
| 24 |
+
#define CRYPTO_R_HEX_STRING_TOO_SHORT 121
|
| 25 |
+
#define CRYPTO_R_ILLEGAL_HEX_DIGIT 102
|
| 26 |
+
#define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106
|
| 27 |
+
#define CRYPTO_R_INSUFFICIENT_PARAM_SIZE 107
|
| 28 |
+
#define CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE 108
|
| 29 |
+
#define CRYPTO_R_INTEGER_OVERFLOW 127
|
| 30 |
+
#define CRYPTO_R_INVALID_NEGATIVE_VALUE 122
|
| 31 |
+
#define CRYPTO_R_INVALID_NULL_ARGUMENT 109
|
| 32 |
+
#define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110
|
| 33 |
+
#define CRYPTO_R_NO_PARAMS_TO_MERGE 131
|
| 34 |
+
#define CRYPTO_R_NO_SPACE_FOR_TERMINATING_NULL 128
|
| 35 |
+
#define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103
|
| 36 |
+
#define CRYPTO_R_PARAM_CANNOT_BE_REPRESENTED_EXACTLY 123
|
| 37 |
+
#define CRYPTO_R_PARAM_NOT_INTEGER_TYPE 124
|
| 38 |
+
#define CRYPTO_R_PARAM_OF_INCOMPATIBLE_TYPE 129
|
| 39 |
+
#define CRYPTO_R_PARAM_UNSIGNED_INTEGER_NEGATIVE_VALUE_UNSUPPORTED 125
|
| 40 |
+
#define CRYPTO_R_PARAM_UNSUPPORTED_FLOATING_POINT_FORMAT 130
|
| 41 |
+
#define CRYPTO_R_PARAM_VALUE_TOO_LARGE_FOR_DESTINATION 126
|
| 42 |
+
#define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104
|
| 43 |
+
#define CRYPTO_R_PROVIDER_SECTION_ERROR 105
|
| 44 |
+
#define CRYPTO_R_RANDOM_SECTION_ERROR 119
|
| 45 |
+
#define CRYPTO_R_SECURE_MALLOC_FAILURE 111
|
| 46 |
+
#define CRYPTO_R_STRING_TOO_LONG 112
|
| 47 |
+
#define CRYPTO_R_TOO_MANY_BYTES 113
|
| 48 |
+
#define CRYPTO_R_TOO_MANY_NAMES 132
|
| 49 |
+
#define CRYPTO_R_TOO_MANY_RECORDS 114
|
| 50 |
+
#define CRYPTO_R_TOO_SMALL_BUFFER 116
|
| 51 |
+
#define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120
|
| 52 |
+
#define CRYPTO_R_ZERO_LENGTH_NUMBER 115
|
| 53 |
+
|
| 54 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cryptoerr_legacy.h
ADDED
|
@@ -0,0 +1,1466 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
/*
|
| 11 |
+
* This header file preserves symbols from pre-3.0 OpenSSL.
|
| 12 |
+
* It should never be included directly, as it's already included
|
| 13 |
+
* by the public {lib}err.h headers, and since it will go away some
|
| 14 |
+
* time in the future.
|
| 15 |
+
*/
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CRYPTOERR_LEGACY_H
|
| 18 |
+
#define OPENSSL_CRYPTOERR_LEGACY_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#include <openssl/symhacks.h>
|
| 23 |
+
|
| 24 |
+
#ifdef __cplusplus
|
| 25 |
+
extern "C" {
|
| 26 |
+
#endif
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 29 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_ASN1_strings(void);
|
| 30 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_ASYNC_strings(void);
|
| 31 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_BIO_strings(void);
|
| 32 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_BN_strings(void);
|
| 33 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_BUF_strings(void);
|
| 34 |
+
#ifndef OPENSSL_NO_CMS
|
| 35 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_CMS_strings(void);
|
| 36 |
+
#endif
|
| 37 |
+
#ifndef OPENSSL_NO_COMP
|
| 38 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_COMP_strings(void);
|
| 39 |
+
#endif
|
| 40 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_CONF_strings(void);
|
| 41 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_CRYPTO_strings(void);
|
| 42 |
+
#ifndef OPENSSL_NO_CT
|
| 43 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_CT_strings(void);
|
| 44 |
+
#endif
|
| 45 |
+
#ifndef OPENSSL_NO_DH
|
| 46 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_DH_strings(void);
|
| 47 |
+
#endif
|
| 48 |
+
#ifndef OPENSSL_NO_DSA
|
| 49 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_DSA_strings(void);
|
| 50 |
+
#endif
|
| 51 |
+
#ifndef OPENSSL_NO_EC
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_EC_strings(void);
|
| 53 |
+
#endif
|
| 54 |
+
#ifndef OPENSSL_NO_ENGINE
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_ENGINE_strings(void);
|
| 56 |
+
#endif
|
| 57 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_ERR_strings(void);
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_EVP_strings(void);
|
| 59 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_KDF_strings(void);
|
| 60 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_OBJ_strings(void);
|
| 61 |
+
#ifndef OPENSSL_NO_OCSP
|
| 62 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_OCSP_strings(void);
|
| 63 |
+
#endif
|
| 64 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_PEM_strings(void);
|
| 65 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_PKCS12_strings(void);
|
| 66 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_PKCS7_strings(void);
|
| 67 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_RAND_strings(void);
|
| 68 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_RSA_strings(void);
|
| 69 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_OSSL_STORE_strings(void);
|
| 70 |
+
#ifndef OPENSSL_NO_TS
|
| 71 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_TS_strings(void);
|
| 72 |
+
#endif
|
| 73 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_UI_strings(void);
|
| 74 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_X509_strings(void);
|
| 75 |
+
OSSL_DEPRECATEDIN_3_0 int ERR_load_X509V3_strings(void);
|
| 76 |
+
|
| 77 |
+
/* Collected _F_ macros from OpenSSL 1.1.1 */
|
| 78 |
+
|
| 79 |
+
/*
|
| 80 |
+
* ASN1 function codes.
|
| 81 |
+
*/
|
| 82 |
+
#define ASN1_F_A2D_ASN1_OBJECT 0
|
| 83 |
+
#define ASN1_F_A2I_ASN1_INTEGER 0
|
| 84 |
+
#define ASN1_F_A2I_ASN1_STRING 0
|
| 85 |
+
#define ASN1_F_APPEND_EXP 0
|
| 86 |
+
#define ASN1_F_ASN1_BIO_INIT 0
|
| 87 |
+
#define ASN1_F_ASN1_BIT_STRING_SET_BIT 0
|
| 88 |
+
#define ASN1_F_ASN1_CB 0
|
| 89 |
+
#define ASN1_F_ASN1_CHECK_TLEN 0
|
| 90 |
+
#define ASN1_F_ASN1_COLLECT 0
|
| 91 |
+
#define ASN1_F_ASN1_D2I_EX_PRIMITIVE 0
|
| 92 |
+
#define ASN1_F_ASN1_D2I_FP 0
|
| 93 |
+
#define ASN1_F_ASN1_D2I_READ_BIO 0
|
| 94 |
+
#define ASN1_F_ASN1_DIGEST 0
|
| 95 |
+
#define ASN1_F_ASN1_DO_ADB 0
|
| 96 |
+
#define ASN1_F_ASN1_DO_LOCK 0
|
| 97 |
+
#define ASN1_F_ASN1_DUP 0
|
| 98 |
+
#define ASN1_F_ASN1_ENC_SAVE 0
|
| 99 |
+
#define ASN1_F_ASN1_EX_C2I 0
|
| 100 |
+
#define ASN1_F_ASN1_FIND_END 0
|
| 101 |
+
#define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 0
|
| 102 |
+
#define ASN1_F_ASN1_GENERATE_V3 0
|
| 103 |
+
#define ASN1_F_ASN1_GET_INT64 0
|
| 104 |
+
#define ASN1_F_ASN1_GET_OBJECT 0
|
| 105 |
+
#define ASN1_F_ASN1_GET_UINT64 0
|
| 106 |
+
#define ASN1_F_ASN1_I2D_BIO 0
|
| 107 |
+
#define ASN1_F_ASN1_I2D_FP 0
|
| 108 |
+
#define ASN1_F_ASN1_ITEM_D2I_FP 0
|
| 109 |
+
#define ASN1_F_ASN1_ITEM_DUP 0
|
| 110 |
+
#define ASN1_F_ASN1_ITEM_EMBED_D2I 0
|
| 111 |
+
#define ASN1_F_ASN1_ITEM_EMBED_NEW 0
|
| 112 |
+
#define ASN1_F_ASN1_ITEM_FLAGS_I2D 0
|
| 113 |
+
#define ASN1_F_ASN1_ITEM_I2D_BIO 0
|
| 114 |
+
#define ASN1_F_ASN1_ITEM_I2D_FP 0
|
| 115 |
+
#define ASN1_F_ASN1_ITEM_PACK 0
|
| 116 |
+
#define ASN1_F_ASN1_ITEM_SIGN 0
|
| 117 |
+
#define ASN1_F_ASN1_ITEM_SIGN_CTX 0
|
| 118 |
+
#define ASN1_F_ASN1_ITEM_UNPACK 0
|
| 119 |
+
#define ASN1_F_ASN1_ITEM_VERIFY 0
|
| 120 |
+
#define ASN1_F_ASN1_MBSTRING_NCOPY 0
|
| 121 |
+
#define ASN1_F_ASN1_OBJECT_NEW 0
|
| 122 |
+
#define ASN1_F_ASN1_OUTPUT_DATA 0
|
| 123 |
+
#define ASN1_F_ASN1_PCTX_NEW 0
|
| 124 |
+
#define ASN1_F_ASN1_PRIMITIVE_NEW 0
|
| 125 |
+
#define ASN1_F_ASN1_SCTX_NEW 0
|
| 126 |
+
#define ASN1_F_ASN1_SIGN 0
|
| 127 |
+
#define ASN1_F_ASN1_STR2TYPE 0
|
| 128 |
+
#define ASN1_F_ASN1_STRING_GET_INT64 0
|
| 129 |
+
#define ASN1_F_ASN1_STRING_GET_UINT64 0
|
| 130 |
+
#define ASN1_F_ASN1_STRING_SET 0
|
| 131 |
+
#define ASN1_F_ASN1_STRING_TABLE_ADD 0
|
| 132 |
+
#define ASN1_F_ASN1_STRING_TO_BN 0
|
| 133 |
+
#define ASN1_F_ASN1_STRING_TYPE_NEW 0
|
| 134 |
+
#define ASN1_F_ASN1_TEMPLATE_EX_D2I 0
|
| 135 |
+
#define ASN1_F_ASN1_TEMPLATE_NEW 0
|
| 136 |
+
#define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 0
|
| 137 |
+
#define ASN1_F_ASN1_TIME_ADJ 0
|
| 138 |
+
#define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 0
|
| 139 |
+
#define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 0
|
| 140 |
+
#define ASN1_F_ASN1_UTCTIME_ADJ 0
|
| 141 |
+
#define ASN1_F_ASN1_VERIFY 0
|
| 142 |
+
#define ASN1_F_B64_READ_ASN1 0
|
| 143 |
+
#define ASN1_F_B64_WRITE_ASN1 0
|
| 144 |
+
#define ASN1_F_BIO_NEW_NDEF 0
|
| 145 |
+
#define ASN1_F_BITSTR_CB 0
|
| 146 |
+
#define ASN1_F_BN_TO_ASN1_STRING 0
|
| 147 |
+
#define ASN1_F_C2I_ASN1_BIT_STRING 0
|
| 148 |
+
#define ASN1_F_C2I_ASN1_INTEGER 0
|
| 149 |
+
#define ASN1_F_C2I_ASN1_OBJECT 0
|
| 150 |
+
#define ASN1_F_C2I_IBUF 0
|
| 151 |
+
#define ASN1_F_C2I_UINT64_INT 0
|
| 152 |
+
#define ASN1_F_COLLECT_DATA 0
|
| 153 |
+
#define ASN1_F_D2I_ASN1_OBJECT 0
|
| 154 |
+
#define ASN1_F_D2I_ASN1_UINTEGER 0
|
| 155 |
+
#define ASN1_F_D2I_AUTOPRIVATEKEY 0
|
| 156 |
+
#define ASN1_F_D2I_PRIVATEKEY 0
|
| 157 |
+
#define ASN1_F_D2I_PUBLICKEY 0
|
| 158 |
+
#define ASN1_F_DO_BUF 0
|
| 159 |
+
#define ASN1_F_DO_CREATE 0
|
| 160 |
+
#define ASN1_F_DO_DUMP 0
|
| 161 |
+
#define ASN1_F_DO_TCREATE 0
|
| 162 |
+
#define ASN1_F_I2A_ASN1_OBJECT 0
|
| 163 |
+
#define ASN1_F_I2D_ASN1_BIO_STREAM 0
|
| 164 |
+
#define ASN1_F_I2D_ASN1_OBJECT 0
|
| 165 |
+
#define ASN1_F_I2D_DSA_PUBKEY 0
|
| 166 |
+
#define ASN1_F_I2D_EC_PUBKEY 0
|
| 167 |
+
#define ASN1_F_I2D_PRIVATEKEY 0
|
| 168 |
+
#define ASN1_F_I2D_PUBLICKEY 0
|
| 169 |
+
#define ASN1_F_I2D_RSA_PUBKEY 0
|
| 170 |
+
#define ASN1_F_LONG_C2I 0
|
| 171 |
+
#define ASN1_F_NDEF_PREFIX 0
|
| 172 |
+
#define ASN1_F_NDEF_SUFFIX 0
|
| 173 |
+
#define ASN1_F_OID_MODULE_INIT 0
|
| 174 |
+
#define ASN1_F_PARSE_TAGGING 0
|
| 175 |
+
#define ASN1_F_PKCS5_PBE2_SET_IV 0
|
| 176 |
+
#define ASN1_F_PKCS5_PBE2_SET_SCRYPT 0
|
| 177 |
+
#define ASN1_F_PKCS5_PBE_SET 0
|
| 178 |
+
#define ASN1_F_PKCS5_PBE_SET0_ALGOR 0
|
| 179 |
+
#define ASN1_F_PKCS5_PBKDF2_SET 0
|
| 180 |
+
#define ASN1_F_PKCS5_SCRYPT_SET 0
|
| 181 |
+
#define ASN1_F_SMIME_READ_ASN1 0
|
| 182 |
+
#define ASN1_F_SMIME_TEXT 0
|
| 183 |
+
#define ASN1_F_STABLE_GET 0
|
| 184 |
+
#define ASN1_F_STBL_MODULE_INIT 0
|
| 185 |
+
#define ASN1_F_UINT32_C2I 0
|
| 186 |
+
#define ASN1_F_UINT32_NEW 0
|
| 187 |
+
#define ASN1_F_UINT64_C2I 0
|
| 188 |
+
#define ASN1_F_UINT64_NEW 0
|
| 189 |
+
#define ASN1_F_X509_CRL_ADD0_REVOKED 0
|
| 190 |
+
#define ASN1_F_X509_INFO_NEW 0
|
| 191 |
+
#define ASN1_F_X509_NAME_ENCODE 0
|
| 192 |
+
#define ASN1_F_X509_NAME_EX_D2I 0
|
| 193 |
+
#define ASN1_F_X509_NAME_EX_NEW 0
|
| 194 |
+
#define ASN1_F_X509_PKEY_NEW 0
|
| 195 |
+
|
| 196 |
+
/*
|
| 197 |
+
* ASYNC function codes.
|
| 198 |
+
*/
|
| 199 |
+
#define ASYNC_F_ASYNC_CTX_NEW 0
|
| 200 |
+
#define ASYNC_F_ASYNC_INIT_THREAD 0
|
| 201 |
+
#define ASYNC_F_ASYNC_JOB_NEW 0
|
| 202 |
+
#define ASYNC_F_ASYNC_PAUSE_JOB 0
|
| 203 |
+
#define ASYNC_F_ASYNC_START_FUNC 0
|
| 204 |
+
#define ASYNC_F_ASYNC_START_JOB 0
|
| 205 |
+
#define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 0
|
| 206 |
+
|
| 207 |
+
/*
|
| 208 |
+
* BIO function codes.
|
| 209 |
+
*/
|
| 210 |
+
#define BIO_F_ACPT_STATE 0
|
| 211 |
+
#define BIO_F_ADDRINFO_WRAP 0
|
| 212 |
+
#define BIO_F_ADDR_STRINGS 0
|
| 213 |
+
#define BIO_F_BIO_ACCEPT 0
|
| 214 |
+
#define BIO_F_BIO_ACCEPT_EX 0
|
| 215 |
+
#define BIO_F_BIO_ACCEPT_NEW 0
|
| 216 |
+
#define BIO_F_BIO_ADDR_NEW 0
|
| 217 |
+
#define BIO_F_BIO_BIND 0
|
| 218 |
+
#define BIO_F_BIO_CALLBACK_CTRL 0
|
| 219 |
+
#define BIO_F_BIO_CONNECT 0
|
| 220 |
+
#define BIO_F_BIO_CONNECT_NEW 0
|
| 221 |
+
#define BIO_F_BIO_CTRL 0
|
| 222 |
+
#define BIO_F_BIO_GETS 0
|
| 223 |
+
#define BIO_F_BIO_GET_HOST_IP 0
|
| 224 |
+
#define BIO_F_BIO_GET_NEW_INDEX 0
|
| 225 |
+
#define BIO_F_BIO_GET_PORT 0
|
| 226 |
+
#define BIO_F_BIO_LISTEN 0
|
| 227 |
+
#define BIO_F_BIO_LOOKUP 0
|
| 228 |
+
#define BIO_F_BIO_LOOKUP_EX 0
|
| 229 |
+
#define BIO_F_BIO_MAKE_PAIR 0
|
| 230 |
+
#define BIO_F_BIO_METH_NEW 0
|
| 231 |
+
#define BIO_F_BIO_NEW 0
|
| 232 |
+
#define BIO_F_BIO_NEW_DGRAM_SCTP 0
|
| 233 |
+
#define BIO_F_BIO_NEW_FILE 0
|
| 234 |
+
#define BIO_F_BIO_NEW_MEM_BUF 0
|
| 235 |
+
#define BIO_F_BIO_NREAD 0
|
| 236 |
+
#define BIO_F_BIO_NREAD0 0
|
| 237 |
+
#define BIO_F_BIO_NWRITE 0
|
| 238 |
+
#define BIO_F_BIO_NWRITE0 0
|
| 239 |
+
#define BIO_F_BIO_PARSE_HOSTSERV 0
|
| 240 |
+
#define BIO_F_BIO_PUTS 0
|
| 241 |
+
#define BIO_F_BIO_READ 0
|
| 242 |
+
#define BIO_F_BIO_READ_EX 0
|
| 243 |
+
#define BIO_F_BIO_READ_INTERN 0
|
| 244 |
+
#define BIO_F_BIO_SOCKET 0
|
| 245 |
+
#define BIO_F_BIO_SOCKET_NBIO 0
|
| 246 |
+
#define BIO_F_BIO_SOCK_INFO 0
|
| 247 |
+
#define BIO_F_BIO_SOCK_INIT 0
|
| 248 |
+
#define BIO_F_BIO_WRITE 0
|
| 249 |
+
#define BIO_F_BIO_WRITE_EX 0
|
| 250 |
+
#define BIO_F_BIO_WRITE_INTERN 0
|
| 251 |
+
#define BIO_F_BUFFER_CTRL 0
|
| 252 |
+
#define BIO_F_CONN_CTRL 0
|
| 253 |
+
#define BIO_F_CONN_STATE 0
|
| 254 |
+
#define BIO_F_DGRAM_SCTP_NEW 0
|
| 255 |
+
#define BIO_F_DGRAM_SCTP_READ 0
|
| 256 |
+
#define BIO_F_DGRAM_SCTP_WRITE 0
|
| 257 |
+
#define BIO_F_DOAPR_OUTCH 0
|
| 258 |
+
#define BIO_F_FILE_CTRL 0
|
| 259 |
+
#define BIO_F_FILE_READ 0
|
| 260 |
+
#define BIO_F_LINEBUFFER_CTRL 0
|
| 261 |
+
#define BIO_F_LINEBUFFER_NEW 0
|
| 262 |
+
#define BIO_F_MEM_WRITE 0
|
| 263 |
+
#define BIO_F_NBIOF_NEW 0
|
| 264 |
+
#define BIO_F_SLG_WRITE 0
|
| 265 |
+
#define BIO_F_SSL_NEW 0
|
| 266 |
+
|
| 267 |
+
/*
|
| 268 |
+
* BN function codes.
|
| 269 |
+
*/
|
| 270 |
+
#define BN_F_BNRAND 0
|
| 271 |
+
#define BN_F_BNRAND_RANGE 0
|
| 272 |
+
#define BN_F_BN_BLINDING_CONVERT_EX 0
|
| 273 |
+
#define BN_F_BN_BLINDING_CREATE_PARAM 0
|
| 274 |
+
#define BN_F_BN_BLINDING_INVERT_EX 0
|
| 275 |
+
#define BN_F_BN_BLINDING_NEW 0
|
| 276 |
+
#define BN_F_BN_BLINDING_UPDATE 0
|
| 277 |
+
#define BN_F_BN_BN2DEC 0
|
| 278 |
+
#define BN_F_BN_BN2HEX 0
|
| 279 |
+
#define BN_F_BN_COMPUTE_WNAF 0
|
| 280 |
+
#define BN_F_BN_CTX_GET 0
|
| 281 |
+
#define BN_F_BN_CTX_NEW 0
|
| 282 |
+
#define BN_F_BN_CTX_START 0
|
| 283 |
+
#define BN_F_BN_DIV 0
|
| 284 |
+
#define BN_F_BN_DIV_RECP 0
|
| 285 |
+
#define BN_F_BN_EXP 0
|
| 286 |
+
#define BN_F_BN_EXPAND_INTERNAL 0
|
| 287 |
+
#define BN_F_BN_GENCB_NEW 0
|
| 288 |
+
#define BN_F_BN_GENERATE_DSA_NONCE 0
|
| 289 |
+
#define BN_F_BN_GENERATE_PRIME_EX 0
|
| 290 |
+
#define BN_F_BN_GF2M_MOD 0
|
| 291 |
+
#define BN_F_BN_GF2M_MOD_EXP 0
|
| 292 |
+
#define BN_F_BN_GF2M_MOD_MUL 0
|
| 293 |
+
#define BN_F_BN_GF2M_MOD_SOLVE_QUAD 0
|
| 294 |
+
#define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 0
|
| 295 |
+
#define BN_F_BN_GF2M_MOD_SQR 0
|
| 296 |
+
#define BN_F_BN_GF2M_MOD_SQRT 0
|
| 297 |
+
#define BN_F_BN_LSHIFT 0
|
| 298 |
+
#define BN_F_BN_MOD_EXP2_MONT 0
|
| 299 |
+
#define BN_F_BN_MOD_EXP_MONT 0
|
| 300 |
+
#define BN_F_BN_MOD_EXP_MONT_CONSTTIME 0
|
| 301 |
+
#define BN_F_BN_MOD_EXP_MONT_WORD 0
|
| 302 |
+
#define BN_F_BN_MOD_EXP_RECP 0
|
| 303 |
+
#define BN_F_BN_MOD_EXP_SIMPLE 0
|
| 304 |
+
#define BN_F_BN_MOD_INVERSE 0
|
| 305 |
+
#define BN_F_BN_MOD_INVERSE_NO_BRANCH 0
|
| 306 |
+
#define BN_F_BN_MOD_LSHIFT_QUICK 0
|
| 307 |
+
#define BN_F_BN_MOD_SQRT 0
|
| 308 |
+
#define BN_F_BN_MONT_CTX_NEW 0
|
| 309 |
+
#define BN_F_BN_MPI2BN 0
|
| 310 |
+
#define BN_F_BN_NEW 0
|
| 311 |
+
#define BN_F_BN_POOL_GET 0
|
| 312 |
+
#define BN_F_BN_RAND 0
|
| 313 |
+
#define BN_F_BN_RAND_RANGE 0
|
| 314 |
+
#define BN_F_BN_RECP_CTX_NEW 0
|
| 315 |
+
#define BN_F_BN_RSHIFT 0
|
| 316 |
+
#define BN_F_BN_SET_WORDS 0
|
| 317 |
+
#define BN_F_BN_STACK_PUSH 0
|
| 318 |
+
#define BN_F_BN_USUB 0
|
| 319 |
+
|
| 320 |
+
/*
|
| 321 |
+
* BUF function codes.
|
| 322 |
+
*/
|
| 323 |
+
#define BUF_F_BUF_MEM_GROW 0
|
| 324 |
+
#define BUF_F_BUF_MEM_GROW_CLEAN 0
|
| 325 |
+
#define BUF_F_BUF_MEM_NEW 0
|
| 326 |
+
|
| 327 |
+
#ifndef OPENSSL_NO_CMS
|
| 328 |
+
/*
|
| 329 |
+
* CMS function codes.
|
| 330 |
+
*/
|
| 331 |
+
#define CMS_F_CHECK_CONTENT 0
|
| 332 |
+
#define CMS_F_CMS_ADD0_CERT 0
|
| 333 |
+
#define CMS_F_CMS_ADD0_RECIPIENT_KEY 0
|
| 334 |
+
#define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 0
|
| 335 |
+
#define CMS_F_CMS_ADD1_RECEIPTREQUEST 0
|
| 336 |
+
#define CMS_F_CMS_ADD1_RECIPIENT_CERT 0
|
| 337 |
+
#define CMS_F_CMS_ADD1_SIGNER 0
|
| 338 |
+
#define CMS_F_CMS_ADD1_SIGNINGTIME 0
|
| 339 |
+
#define CMS_F_CMS_COMPRESS 0
|
| 340 |
+
#define CMS_F_CMS_COMPRESSEDDATA_CREATE 0
|
| 341 |
+
#define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 0
|
| 342 |
+
#define CMS_F_CMS_COPY_CONTENT 0
|
| 343 |
+
#define CMS_F_CMS_COPY_MESSAGEDIGEST 0
|
| 344 |
+
#define CMS_F_CMS_DATA 0
|
| 345 |
+
#define CMS_F_CMS_DATAFINAL 0
|
| 346 |
+
#define CMS_F_CMS_DATAINIT 0
|
| 347 |
+
#define CMS_F_CMS_DECRYPT 0
|
| 348 |
+
#define CMS_F_CMS_DECRYPT_SET1_KEY 0
|
| 349 |
+
#define CMS_F_CMS_DECRYPT_SET1_PASSWORD 0
|
| 350 |
+
#define CMS_F_CMS_DECRYPT_SET1_PKEY 0
|
| 351 |
+
#define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 0
|
| 352 |
+
#define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 0
|
| 353 |
+
#define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 0
|
| 354 |
+
#define CMS_F_CMS_DIGEST_VERIFY 0
|
| 355 |
+
#define CMS_F_CMS_ENCODE_RECEIPT 0
|
| 356 |
+
#define CMS_F_CMS_ENCRYPT 0
|
| 357 |
+
#define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 0
|
| 358 |
+
#define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 0
|
| 359 |
+
#define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 0
|
| 360 |
+
#define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 0
|
| 361 |
+
#define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 0
|
| 362 |
+
#define CMS_F_CMS_ENVELOPEDDATA_CREATE 0
|
| 363 |
+
#define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 0
|
| 364 |
+
#define CMS_F_CMS_ENVELOPED_DATA_INIT 0
|
| 365 |
+
#define CMS_F_CMS_ENV_ASN1_CTRL 0
|
| 366 |
+
#define CMS_F_CMS_FINAL 0
|
| 367 |
+
#define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 0
|
| 368 |
+
#define CMS_F_CMS_GET0_CONTENT 0
|
| 369 |
+
#define CMS_F_CMS_GET0_ECONTENT_TYPE 0
|
| 370 |
+
#define CMS_F_CMS_GET0_ENVELOPED 0
|
| 371 |
+
#define CMS_F_CMS_GET0_REVOCATION_CHOICES 0
|
| 372 |
+
#define CMS_F_CMS_GET0_SIGNED 0
|
| 373 |
+
#define CMS_F_CMS_MSGSIGDIGEST_ADD1 0
|
| 374 |
+
#define CMS_F_CMS_RECEIPTREQUEST_CREATE0 0
|
| 375 |
+
#define CMS_F_CMS_RECEIPT_VERIFY 0
|
| 376 |
+
#define CMS_F_CMS_RECIPIENTINFO_DECRYPT 0
|
| 377 |
+
#define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 0
|
| 378 |
+
#define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 0
|
| 379 |
+
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 0
|
| 380 |
+
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 0
|
| 381 |
+
#define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 0
|
| 382 |
+
#define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 0
|
| 383 |
+
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 0
|
| 384 |
+
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 0
|
| 385 |
+
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 0
|
| 386 |
+
#define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 0
|
| 387 |
+
#define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 0
|
| 388 |
+
#define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 0
|
| 389 |
+
#define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 0
|
| 390 |
+
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 0
|
| 391 |
+
#define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 0
|
| 392 |
+
#define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 0
|
| 393 |
+
#define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 0
|
| 394 |
+
#define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 0
|
| 395 |
+
#define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 0
|
| 396 |
+
#define CMS_F_CMS_SD_ASN1_CTRL 0
|
| 397 |
+
#define CMS_F_CMS_SET1_IAS 0
|
| 398 |
+
#define CMS_F_CMS_SET1_KEYID 0
|
| 399 |
+
#define CMS_F_CMS_SET1_SIGNERIDENTIFIER 0
|
| 400 |
+
#define CMS_F_CMS_SET_DETACHED 0
|
| 401 |
+
#define CMS_F_CMS_SIGN 0
|
| 402 |
+
#define CMS_F_CMS_SIGNED_DATA_INIT 0
|
| 403 |
+
#define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 0
|
| 404 |
+
#define CMS_F_CMS_SIGNERINFO_SIGN 0
|
| 405 |
+
#define CMS_F_CMS_SIGNERINFO_VERIFY 0
|
| 406 |
+
#define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 0
|
| 407 |
+
#define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 0
|
| 408 |
+
#define CMS_F_CMS_SIGN_RECEIPT 0
|
| 409 |
+
#define CMS_F_CMS_SI_CHECK_ATTRIBUTES 0
|
| 410 |
+
#define CMS_F_CMS_STREAM 0
|
| 411 |
+
#define CMS_F_CMS_UNCOMPRESS 0
|
| 412 |
+
#define CMS_F_CMS_VERIFY 0
|
| 413 |
+
#define CMS_F_KEK_UNWRAP_KEY 0
|
| 414 |
+
#endif
|
| 415 |
+
|
| 416 |
+
#ifndef OPENSSL_NO_COMP
|
| 417 |
+
/*
|
| 418 |
+
* COMP function codes.
|
| 419 |
+
*/
|
| 420 |
+
#define COMP_F_BIO_ZLIB_FLUSH 0
|
| 421 |
+
#define COMP_F_BIO_ZLIB_NEW 0
|
| 422 |
+
#define COMP_F_BIO_ZLIB_READ 0
|
| 423 |
+
#define COMP_F_BIO_ZLIB_WRITE 0
|
| 424 |
+
#define COMP_F_COMP_CTX_NEW 0
|
| 425 |
+
#endif
|
| 426 |
+
|
| 427 |
+
/*
|
| 428 |
+
* CONF function codes.
|
| 429 |
+
*/
|
| 430 |
+
#define CONF_F_CONF_DUMP_FP 0
|
| 431 |
+
#define CONF_F_CONF_LOAD 0
|
| 432 |
+
#define CONF_F_CONF_LOAD_FP 0
|
| 433 |
+
#define CONF_F_CONF_PARSE_LIST 0
|
| 434 |
+
#define CONF_F_DEF_LOAD 0
|
| 435 |
+
#define CONF_F_DEF_LOAD_BIO 0
|
| 436 |
+
#define CONF_F_GET_NEXT_FILE 0
|
| 437 |
+
#define CONF_F_MODULE_ADD 0
|
| 438 |
+
#define CONF_F_MODULE_INIT 0
|
| 439 |
+
#define CONF_F_MODULE_LOAD_DSO 0
|
| 440 |
+
#define CONF_F_MODULE_RUN 0
|
| 441 |
+
#define CONF_F_NCONF_DUMP_BIO 0
|
| 442 |
+
#define CONF_F_NCONF_DUMP_FP 0
|
| 443 |
+
#define CONF_F_NCONF_GET_NUMBER_E 0
|
| 444 |
+
#define CONF_F_NCONF_GET_SECTION 0
|
| 445 |
+
#define CONF_F_NCONF_GET_STRING 0
|
| 446 |
+
#define CONF_F_NCONF_LOAD 0
|
| 447 |
+
#define CONF_F_NCONF_LOAD_BIO 0
|
| 448 |
+
#define CONF_F_NCONF_LOAD_FP 0
|
| 449 |
+
#define CONF_F_NCONF_NEW 0
|
| 450 |
+
#define CONF_F_PROCESS_INCLUDE 0
|
| 451 |
+
#define CONF_F_SSL_MODULE_INIT 0
|
| 452 |
+
#define CONF_F_STR_COPY 0
|
| 453 |
+
|
| 454 |
+
/*
|
| 455 |
+
* CRYPTO function codes.
|
| 456 |
+
*/
|
| 457 |
+
#define CRYPTO_F_CMAC_CTX_NEW 0
|
| 458 |
+
#define CRYPTO_F_CRYPTO_DUP_EX_DATA 0
|
| 459 |
+
#define CRYPTO_F_CRYPTO_FREE_EX_DATA 0
|
| 460 |
+
#define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 0
|
| 461 |
+
#define CRYPTO_F_CRYPTO_MEMDUP 0
|
| 462 |
+
#define CRYPTO_F_CRYPTO_NEW_EX_DATA 0
|
| 463 |
+
#define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 0
|
| 464 |
+
#define CRYPTO_F_CRYPTO_OCB128_INIT 0
|
| 465 |
+
#define CRYPTO_F_CRYPTO_SET_EX_DATA 0
|
| 466 |
+
#define CRYPTO_F_GET_AND_LOCK 0
|
| 467 |
+
#define CRYPTO_F_OPENSSL_ATEXIT 0
|
| 468 |
+
#define CRYPTO_F_OPENSSL_BUF2HEXSTR 0
|
| 469 |
+
#define CRYPTO_F_OPENSSL_FOPEN 0
|
| 470 |
+
#define CRYPTO_F_OPENSSL_HEXSTR2BUF 0
|
| 471 |
+
#define CRYPTO_F_OPENSSL_INIT_CRYPTO 0
|
| 472 |
+
#define CRYPTO_F_OPENSSL_LH_NEW 0
|
| 473 |
+
#define CRYPTO_F_OPENSSL_SK_DEEP_COPY 0
|
| 474 |
+
#define CRYPTO_F_OPENSSL_SK_DUP 0
|
| 475 |
+
#define CRYPTO_F_PKEY_HMAC_INIT 0
|
| 476 |
+
#define CRYPTO_F_PKEY_POLY1305_INIT 0
|
| 477 |
+
#define CRYPTO_F_PKEY_SIPHASH_INIT 0
|
| 478 |
+
#define CRYPTO_F_SK_RESERVE 0
|
| 479 |
+
|
| 480 |
+
#ifndef OPENSSL_NO_CT
|
| 481 |
+
/*
|
| 482 |
+
* CT function codes.
|
| 483 |
+
*/
|
| 484 |
+
#define CT_F_CTLOG_NEW 0
|
| 485 |
+
#define CT_F_CTLOG_NEW_FROM_BASE64 0
|
| 486 |
+
#define CT_F_CTLOG_NEW_FROM_CONF 0
|
| 487 |
+
#define CT_F_CTLOG_STORE_LOAD_CTX_NEW 0
|
| 488 |
+
#define CT_F_CTLOG_STORE_LOAD_FILE 0
|
| 489 |
+
#define CT_F_CTLOG_STORE_LOAD_LOG 0
|
| 490 |
+
#define CT_F_CTLOG_STORE_NEW 0
|
| 491 |
+
#define CT_F_CT_BASE64_DECODE 0
|
| 492 |
+
#define CT_F_CT_POLICY_EVAL_CTX_NEW 0
|
| 493 |
+
#define CT_F_CT_V1_LOG_ID_FROM_PKEY 0
|
| 494 |
+
#define CT_F_I2O_SCT 0
|
| 495 |
+
#define CT_F_I2O_SCT_LIST 0
|
| 496 |
+
#define CT_F_I2O_SCT_SIGNATURE 0
|
| 497 |
+
#define CT_F_O2I_SCT 0
|
| 498 |
+
#define CT_F_O2I_SCT_LIST 0
|
| 499 |
+
#define CT_F_O2I_SCT_SIGNATURE 0
|
| 500 |
+
#define CT_F_SCT_CTX_NEW 0
|
| 501 |
+
#define CT_F_SCT_CTX_VERIFY 0
|
| 502 |
+
#define CT_F_SCT_NEW 0
|
| 503 |
+
#define CT_F_SCT_NEW_FROM_BASE64 0
|
| 504 |
+
#define CT_F_SCT_SET0_LOG_ID 0
|
| 505 |
+
#define CT_F_SCT_SET1_EXTENSIONS 0
|
| 506 |
+
#define CT_F_SCT_SET1_LOG_ID 0
|
| 507 |
+
#define CT_F_SCT_SET1_SIGNATURE 0
|
| 508 |
+
#define CT_F_SCT_SET_LOG_ENTRY_TYPE 0
|
| 509 |
+
#define CT_F_SCT_SET_SIGNATURE_NID 0
|
| 510 |
+
#define CT_F_SCT_SET_VERSION 0
|
| 511 |
+
#endif
|
| 512 |
+
|
| 513 |
+
#ifndef OPENSSL_NO_DH
|
| 514 |
+
/*
|
| 515 |
+
* DH function codes.
|
| 516 |
+
*/
|
| 517 |
+
#define DH_F_COMPUTE_KEY 0
|
| 518 |
+
#define DH_F_DHPARAMS_PRINT_FP 0
|
| 519 |
+
#define DH_F_DH_BUILTIN_GENPARAMS 0
|
| 520 |
+
#define DH_F_DH_CHECK_EX 0
|
| 521 |
+
#define DH_F_DH_CHECK_PARAMS_EX 0
|
| 522 |
+
#define DH_F_DH_CHECK_PUB_KEY_EX 0
|
| 523 |
+
#define DH_F_DH_CMS_DECRYPT 0
|
| 524 |
+
#define DH_F_DH_CMS_SET_PEERKEY 0
|
| 525 |
+
#define DH_F_DH_CMS_SET_SHARED_INFO 0
|
| 526 |
+
#define DH_F_DH_METH_DUP 0
|
| 527 |
+
#define DH_F_DH_METH_NEW 0
|
| 528 |
+
#define DH_F_DH_METH_SET1_NAME 0
|
| 529 |
+
#define DH_F_DH_NEW_BY_NID 0
|
| 530 |
+
#define DH_F_DH_NEW_METHOD 0
|
| 531 |
+
#define DH_F_DH_PARAM_DECODE 0
|
| 532 |
+
#define DH_F_DH_PKEY_PUBLIC_CHECK 0
|
| 533 |
+
#define DH_F_DH_PRIV_DECODE 0
|
| 534 |
+
#define DH_F_DH_PRIV_ENCODE 0
|
| 535 |
+
#define DH_F_DH_PUB_DECODE 0
|
| 536 |
+
#define DH_F_DH_PUB_ENCODE 0
|
| 537 |
+
#define DH_F_DO_DH_PRINT 0
|
| 538 |
+
#define DH_F_GENERATE_KEY 0
|
| 539 |
+
#define DH_F_PKEY_DH_CTRL_STR 0
|
| 540 |
+
#define DH_F_PKEY_DH_DERIVE 0
|
| 541 |
+
#define DH_F_PKEY_DH_INIT 0
|
| 542 |
+
#define DH_F_PKEY_DH_KEYGEN 0
|
| 543 |
+
#endif
|
| 544 |
+
|
| 545 |
+
#ifndef OPENSSL_NO_DSA
|
| 546 |
+
/*
|
| 547 |
+
* DSA function codes.
|
| 548 |
+
*/
|
| 549 |
+
#define DSA_F_DSAPARAMS_PRINT 0
|
| 550 |
+
#define DSA_F_DSAPARAMS_PRINT_FP 0
|
| 551 |
+
#define DSA_F_DSA_BUILTIN_PARAMGEN 0
|
| 552 |
+
#define DSA_F_DSA_BUILTIN_PARAMGEN2 0
|
| 553 |
+
#define DSA_F_DSA_DO_SIGN 0
|
| 554 |
+
#define DSA_F_DSA_DO_VERIFY 0
|
| 555 |
+
#define DSA_F_DSA_METH_DUP 0
|
| 556 |
+
#define DSA_F_DSA_METH_NEW 0
|
| 557 |
+
#define DSA_F_DSA_METH_SET1_NAME 0
|
| 558 |
+
#define DSA_F_DSA_NEW_METHOD 0
|
| 559 |
+
#define DSA_F_DSA_PARAM_DECODE 0
|
| 560 |
+
#define DSA_F_DSA_PRINT_FP 0
|
| 561 |
+
#define DSA_F_DSA_PRIV_DECODE 0
|
| 562 |
+
#define DSA_F_DSA_PRIV_ENCODE 0
|
| 563 |
+
#define DSA_F_DSA_PUB_DECODE 0
|
| 564 |
+
#define DSA_F_DSA_PUB_ENCODE 0
|
| 565 |
+
#define DSA_F_DSA_SIGN 0
|
| 566 |
+
#define DSA_F_DSA_SIGN_SETUP 0
|
| 567 |
+
#define DSA_F_DSA_SIG_NEW 0
|
| 568 |
+
#define DSA_F_OLD_DSA_PRIV_DECODE 0
|
| 569 |
+
#define DSA_F_PKEY_DSA_CTRL 0
|
| 570 |
+
#define DSA_F_PKEY_DSA_CTRL_STR 0
|
| 571 |
+
#define DSA_F_PKEY_DSA_KEYGEN 0
|
| 572 |
+
#endif
|
| 573 |
+
|
| 574 |
+
#ifndef OPENSSL_NO_EC
|
| 575 |
+
/*
|
| 576 |
+
* EC function codes.
|
| 577 |
+
*/
|
| 578 |
+
#define EC_F_BN_TO_FELEM 0
|
| 579 |
+
#define EC_F_D2I_ECPARAMETERS 0
|
| 580 |
+
#define EC_F_D2I_ECPKPARAMETERS 0
|
| 581 |
+
#define EC_F_D2I_ECPRIVATEKEY 0
|
| 582 |
+
#define EC_F_DO_EC_KEY_PRINT 0
|
| 583 |
+
#define EC_F_ECDH_CMS_DECRYPT 0
|
| 584 |
+
#define EC_F_ECDH_CMS_SET_SHARED_INFO 0
|
| 585 |
+
#define EC_F_ECDH_COMPUTE_KEY 0
|
| 586 |
+
#define EC_F_ECDH_SIMPLE_COMPUTE_KEY 0
|
| 587 |
+
#define EC_F_ECDSA_DO_SIGN_EX 0
|
| 588 |
+
#define EC_F_ECDSA_DO_VERIFY 0
|
| 589 |
+
#define EC_F_ECDSA_SIGN_EX 0
|
| 590 |
+
#define EC_F_ECDSA_SIGN_SETUP 0
|
| 591 |
+
#define EC_F_ECDSA_SIG_NEW 0
|
| 592 |
+
#define EC_F_ECDSA_VERIFY 0
|
| 593 |
+
#define EC_F_ECD_ITEM_VERIFY 0
|
| 594 |
+
#define EC_F_ECKEY_PARAM2TYPE 0
|
| 595 |
+
#define EC_F_ECKEY_PARAM_DECODE 0
|
| 596 |
+
#define EC_F_ECKEY_PRIV_DECODE 0
|
| 597 |
+
#define EC_F_ECKEY_PRIV_ENCODE 0
|
| 598 |
+
#define EC_F_ECKEY_PUB_DECODE 0
|
| 599 |
+
#define EC_F_ECKEY_PUB_ENCODE 0
|
| 600 |
+
#define EC_F_ECKEY_TYPE2PARAM 0
|
| 601 |
+
#define EC_F_ECPARAMETERS_PRINT 0
|
| 602 |
+
#define EC_F_ECPARAMETERS_PRINT_FP 0
|
| 603 |
+
#define EC_F_ECPKPARAMETERS_PRINT 0
|
| 604 |
+
#define EC_F_ECPKPARAMETERS_PRINT_FP 0
|
| 605 |
+
#define EC_F_ECP_NISTZ256_GET_AFFINE 0
|
| 606 |
+
#define EC_F_ECP_NISTZ256_INV_MOD_ORD 0
|
| 607 |
+
#define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE 0
|
| 608 |
+
#define EC_F_ECP_NISTZ256_POINTS_MUL 0
|
| 609 |
+
#define EC_F_ECP_NISTZ256_PRE_COMP_NEW 0
|
| 610 |
+
#define EC_F_ECP_NISTZ256_WINDOWED_MUL 0
|
| 611 |
+
#define EC_F_ECX_KEY_OP 0
|
| 612 |
+
#define EC_F_ECX_PRIV_ENCODE 0
|
| 613 |
+
#define EC_F_ECX_PUB_ENCODE 0
|
| 614 |
+
#define EC_F_EC_ASN1_GROUP2CURVE 0
|
| 615 |
+
#define EC_F_EC_ASN1_GROUP2FIELDID 0
|
| 616 |
+
#define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 0
|
| 617 |
+
#define EC_F_EC_GF2M_SIMPLE_FIELD_INV 0
|
| 618 |
+
#define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 0
|
| 619 |
+
#define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 0
|
| 620 |
+
#define EC_F_EC_GF2M_SIMPLE_LADDER_POST 0
|
| 621 |
+
#define EC_F_EC_GF2M_SIMPLE_LADDER_PRE 0
|
| 622 |
+
#define EC_F_EC_GF2M_SIMPLE_OCT2POINT 0
|
| 623 |
+
#define EC_F_EC_GF2M_SIMPLE_POINT2OCT 0
|
| 624 |
+
#define EC_F_EC_GF2M_SIMPLE_POINTS_MUL 0
|
| 625 |
+
#define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 0
|
| 626 |
+
#define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 0
|
| 627 |
+
#define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 0
|
| 628 |
+
#define EC_F_EC_GFP_MONT_FIELD_DECODE 0
|
| 629 |
+
#define EC_F_EC_GFP_MONT_FIELD_ENCODE 0
|
| 630 |
+
#define EC_F_EC_GFP_MONT_FIELD_INV 0
|
| 631 |
+
#define EC_F_EC_GFP_MONT_FIELD_MUL 0
|
| 632 |
+
#define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 0
|
| 633 |
+
#define EC_F_EC_GFP_MONT_FIELD_SQR 0
|
| 634 |
+
#define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 0
|
| 635 |
+
#define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 0
|
| 636 |
+
#define EC_F_EC_GFP_NISTP224_POINTS_MUL 0
|
| 637 |
+
#define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 0
|
| 638 |
+
#define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 0
|
| 639 |
+
#define EC_F_EC_GFP_NISTP256_POINTS_MUL 0
|
| 640 |
+
#define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 0
|
| 641 |
+
#define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 0
|
| 642 |
+
#define EC_F_EC_GFP_NISTP521_POINTS_MUL 0
|
| 643 |
+
#define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 0
|
| 644 |
+
#define EC_F_EC_GFP_NIST_FIELD_MUL 0
|
| 645 |
+
#define EC_F_EC_GFP_NIST_FIELD_SQR 0
|
| 646 |
+
#define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 0
|
| 647 |
+
#define EC_F_EC_GFP_SIMPLE_BLIND_COORDINATES 0
|
| 648 |
+
#define EC_F_EC_GFP_SIMPLE_FIELD_INV 0
|
| 649 |
+
#define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 0
|
| 650 |
+
#define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 0
|
| 651 |
+
#define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 0
|
| 652 |
+
#define EC_F_EC_GFP_SIMPLE_OCT2POINT 0
|
| 653 |
+
#define EC_F_EC_GFP_SIMPLE_POINT2OCT 0
|
| 654 |
+
#define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 0
|
| 655 |
+
#define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 0
|
| 656 |
+
#define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 0
|
| 657 |
+
#define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 0
|
| 658 |
+
#define EC_F_EC_GROUP_CHECK 0
|
| 659 |
+
#define EC_F_EC_GROUP_CHECK_DISCRIMINANT 0
|
| 660 |
+
#define EC_F_EC_GROUP_COPY 0
|
| 661 |
+
#define EC_F_EC_GROUP_GET_CURVE 0
|
| 662 |
+
#define EC_F_EC_GROUP_GET_CURVE_GF2M 0
|
| 663 |
+
#define EC_F_EC_GROUP_GET_CURVE_GFP 0
|
| 664 |
+
#define EC_F_EC_GROUP_GET_DEGREE 0
|
| 665 |
+
#define EC_F_EC_GROUP_GET_ECPARAMETERS 0
|
| 666 |
+
#define EC_F_EC_GROUP_GET_ECPKPARAMETERS 0
|
| 667 |
+
#define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 0
|
| 668 |
+
#define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 0
|
| 669 |
+
#define EC_F_EC_GROUP_NEW 0
|
| 670 |
+
#define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 0
|
| 671 |
+
#define EC_F_EC_GROUP_NEW_FROM_DATA 0
|
| 672 |
+
#define EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS 0
|
| 673 |
+
#define EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS 0
|
| 674 |
+
#define EC_F_EC_GROUP_SET_CURVE 0
|
| 675 |
+
#define EC_F_EC_GROUP_SET_CURVE_GF2M 0
|
| 676 |
+
#define EC_F_EC_GROUP_SET_CURVE_GFP 0
|
| 677 |
+
#define EC_F_EC_GROUP_SET_GENERATOR 0
|
| 678 |
+
#define EC_F_EC_GROUP_SET_SEED 0
|
| 679 |
+
#define EC_F_EC_KEY_CHECK_KEY 0
|
| 680 |
+
#define EC_F_EC_KEY_COPY 0
|
| 681 |
+
#define EC_F_EC_KEY_GENERATE_KEY 0
|
| 682 |
+
#define EC_F_EC_KEY_NEW 0
|
| 683 |
+
#define EC_F_EC_KEY_NEW_METHOD 0
|
| 684 |
+
#define EC_F_EC_KEY_OCT2PRIV 0
|
| 685 |
+
#define EC_F_EC_KEY_PRINT 0
|
| 686 |
+
#define EC_F_EC_KEY_PRINT_FP 0
|
| 687 |
+
#define EC_F_EC_KEY_PRIV2BUF 0
|
| 688 |
+
#define EC_F_EC_KEY_PRIV2OCT 0
|
| 689 |
+
#define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 0
|
| 690 |
+
#define EC_F_EC_KEY_SIMPLE_CHECK_KEY 0
|
| 691 |
+
#define EC_F_EC_KEY_SIMPLE_OCT2PRIV 0
|
| 692 |
+
#define EC_F_EC_KEY_SIMPLE_PRIV2OCT 0
|
| 693 |
+
#define EC_F_EC_PKEY_CHECK 0
|
| 694 |
+
#define EC_F_EC_PKEY_PARAM_CHECK 0
|
| 695 |
+
#define EC_F_EC_POINTS_MAKE_AFFINE 0
|
| 696 |
+
#define EC_F_EC_POINTS_MUL 0
|
| 697 |
+
#define EC_F_EC_POINT_ADD 0
|
| 698 |
+
#define EC_F_EC_POINT_BN2POINT 0
|
| 699 |
+
#define EC_F_EC_POINT_CMP 0
|
| 700 |
+
#define EC_F_EC_POINT_COPY 0
|
| 701 |
+
#define EC_F_EC_POINT_DBL 0
|
| 702 |
+
#define EC_F_EC_POINT_GET_AFFINE_COORDINATES 0
|
| 703 |
+
#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 0
|
| 704 |
+
#define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 0
|
| 705 |
+
#define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 0
|
| 706 |
+
#define EC_F_EC_POINT_INVERT 0
|
| 707 |
+
#define EC_F_EC_POINT_IS_AT_INFINITY 0
|
| 708 |
+
#define EC_F_EC_POINT_IS_ON_CURVE 0
|
| 709 |
+
#define EC_F_EC_POINT_MAKE_AFFINE 0
|
| 710 |
+
#define EC_F_EC_POINT_NEW 0
|
| 711 |
+
#define EC_F_EC_POINT_OCT2POINT 0
|
| 712 |
+
#define EC_F_EC_POINT_POINT2BUF 0
|
| 713 |
+
#define EC_F_EC_POINT_POINT2OCT 0
|
| 714 |
+
#define EC_F_EC_POINT_SET_AFFINE_COORDINATES 0
|
| 715 |
+
#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 0
|
| 716 |
+
#define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 0
|
| 717 |
+
#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES 0
|
| 718 |
+
#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 0
|
| 719 |
+
#define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 0
|
| 720 |
+
#define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 0
|
| 721 |
+
#define EC_F_EC_POINT_SET_TO_INFINITY 0
|
| 722 |
+
#define EC_F_EC_PRE_COMP_NEW 0
|
| 723 |
+
#define EC_F_EC_SCALAR_MUL_LADDER 0
|
| 724 |
+
#define EC_F_EC_WNAF_MUL 0
|
| 725 |
+
#define EC_F_EC_WNAF_PRECOMPUTE_MULT 0
|
| 726 |
+
#define EC_F_I2D_ECPARAMETERS 0
|
| 727 |
+
#define EC_F_I2D_ECPKPARAMETERS 0
|
| 728 |
+
#define EC_F_I2D_ECPRIVATEKEY 0
|
| 729 |
+
#define EC_F_I2O_ECPUBLICKEY 0
|
| 730 |
+
#define EC_F_NISTP224_PRE_COMP_NEW 0
|
| 731 |
+
#define EC_F_NISTP256_PRE_COMP_NEW 0
|
| 732 |
+
#define EC_F_NISTP521_PRE_COMP_NEW 0
|
| 733 |
+
#define EC_F_O2I_ECPUBLICKEY 0
|
| 734 |
+
#define EC_F_OLD_EC_PRIV_DECODE 0
|
| 735 |
+
#define EC_F_OSSL_ECDH_COMPUTE_KEY 0
|
| 736 |
+
#define EC_F_OSSL_ECDSA_SIGN_SIG 0
|
| 737 |
+
#define EC_F_OSSL_ECDSA_VERIFY_SIG 0
|
| 738 |
+
#define EC_F_PKEY_ECD_CTRL 0
|
| 739 |
+
#define EC_F_PKEY_ECD_DIGESTSIGN 0
|
| 740 |
+
#define EC_F_PKEY_ECD_DIGESTSIGN25519 0
|
| 741 |
+
#define EC_F_PKEY_ECD_DIGESTSIGN448 0
|
| 742 |
+
#define EC_F_PKEY_ECX_DERIVE 0
|
| 743 |
+
#define EC_F_PKEY_EC_CTRL 0
|
| 744 |
+
#define EC_F_PKEY_EC_CTRL_STR 0
|
| 745 |
+
#define EC_F_PKEY_EC_DERIVE 0
|
| 746 |
+
#define EC_F_PKEY_EC_INIT 0
|
| 747 |
+
#define EC_F_PKEY_EC_KDF_DERIVE 0
|
| 748 |
+
#define EC_F_PKEY_EC_KEYGEN 0
|
| 749 |
+
#define EC_F_PKEY_EC_PARAMGEN 0
|
| 750 |
+
#define EC_F_PKEY_EC_SIGN 0
|
| 751 |
+
#define EC_F_VALIDATE_ECX_DERIVE 0
|
| 752 |
+
#endif
|
| 753 |
+
|
| 754 |
+
#ifndef OPENSSL_NO_ENGINE
|
| 755 |
+
/*
|
| 756 |
+
* ENGINE function codes.
|
| 757 |
+
*/
|
| 758 |
+
#define ENGINE_F_DIGEST_UPDATE 0
|
| 759 |
+
#define ENGINE_F_DYNAMIC_CTRL 0
|
| 760 |
+
#define ENGINE_F_DYNAMIC_GET_DATA_CTX 0
|
| 761 |
+
#define ENGINE_F_DYNAMIC_LOAD 0
|
| 762 |
+
#define ENGINE_F_DYNAMIC_SET_DATA_CTX 0
|
| 763 |
+
#define ENGINE_F_ENGINE_ADD 0
|
| 764 |
+
#define ENGINE_F_ENGINE_BY_ID 0
|
| 765 |
+
#define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 0
|
| 766 |
+
#define ENGINE_F_ENGINE_CTRL 0
|
| 767 |
+
#define ENGINE_F_ENGINE_CTRL_CMD 0
|
| 768 |
+
#define ENGINE_F_ENGINE_CTRL_CMD_STRING 0
|
| 769 |
+
#define ENGINE_F_ENGINE_FINISH 0
|
| 770 |
+
#define ENGINE_F_ENGINE_GET_CIPHER 0
|
| 771 |
+
#define ENGINE_F_ENGINE_GET_DIGEST 0
|
| 772 |
+
#define ENGINE_F_ENGINE_GET_FIRST 0
|
| 773 |
+
#define ENGINE_F_ENGINE_GET_LAST 0
|
| 774 |
+
#define ENGINE_F_ENGINE_GET_NEXT 0
|
| 775 |
+
#define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 0
|
| 776 |
+
#define ENGINE_F_ENGINE_GET_PKEY_METH 0
|
| 777 |
+
#define ENGINE_F_ENGINE_GET_PREV 0
|
| 778 |
+
#define ENGINE_F_ENGINE_INIT 0
|
| 779 |
+
#define ENGINE_F_ENGINE_LIST_ADD 0
|
| 780 |
+
#define ENGINE_F_ENGINE_LIST_REMOVE 0
|
| 781 |
+
#define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 0
|
| 782 |
+
#define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 0
|
| 783 |
+
#define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 0
|
| 784 |
+
#define ENGINE_F_ENGINE_NEW 0
|
| 785 |
+
#define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR 0
|
| 786 |
+
#define ENGINE_F_ENGINE_REMOVE 0
|
| 787 |
+
#define ENGINE_F_ENGINE_SET_DEFAULT_STRING 0
|
| 788 |
+
#define ENGINE_F_ENGINE_SET_ID 0
|
| 789 |
+
#define ENGINE_F_ENGINE_SET_NAME 0
|
| 790 |
+
#define ENGINE_F_ENGINE_TABLE_REGISTER 0
|
| 791 |
+
#define ENGINE_F_ENGINE_UNLOCKED_FINISH 0
|
| 792 |
+
#define ENGINE_F_ENGINE_UP_REF 0
|
| 793 |
+
#define ENGINE_F_INT_CLEANUP_ITEM 0
|
| 794 |
+
#define ENGINE_F_INT_CTRL_HELPER 0
|
| 795 |
+
#define ENGINE_F_INT_ENGINE_CONFIGURE 0
|
| 796 |
+
#define ENGINE_F_INT_ENGINE_MODULE_INIT 0
|
| 797 |
+
#define ENGINE_F_OSSL_HMAC_INIT 0
|
| 798 |
+
#endif
|
| 799 |
+
|
| 800 |
+
/*
|
| 801 |
+
* EVP function codes.
|
| 802 |
+
*/
|
| 803 |
+
#define EVP_F_AESNI_INIT_KEY 0
|
| 804 |
+
#define EVP_F_AESNI_XTS_INIT_KEY 0
|
| 805 |
+
#define EVP_F_AES_GCM_CTRL 0
|
| 806 |
+
#define EVP_F_AES_INIT_KEY 0
|
| 807 |
+
#define EVP_F_AES_OCB_CIPHER 0
|
| 808 |
+
#define EVP_F_AES_T4_INIT_KEY 0
|
| 809 |
+
#define EVP_F_AES_T4_XTS_INIT_KEY 0
|
| 810 |
+
#define EVP_F_AES_WRAP_CIPHER 0
|
| 811 |
+
#define EVP_F_AES_XTS_INIT_KEY 0
|
| 812 |
+
#define EVP_F_ALG_MODULE_INIT 0
|
| 813 |
+
#define EVP_F_ARIA_CCM_INIT_KEY 0
|
| 814 |
+
#define EVP_F_ARIA_GCM_CTRL 0
|
| 815 |
+
#define EVP_F_ARIA_GCM_INIT_KEY 0
|
| 816 |
+
#define EVP_F_ARIA_INIT_KEY 0
|
| 817 |
+
#define EVP_F_B64_NEW 0
|
| 818 |
+
#define EVP_F_CAMELLIA_INIT_KEY 0
|
| 819 |
+
#define EVP_F_CHACHA20_POLY1305_CTRL 0
|
| 820 |
+
#define EVP_F_CMLL_T4_INIT_KEY 0
|
| 821 |
+
#define EVP_F_DES_EDE3_WRAP_CIPHER 0
|
| 822 |
+
#define EVP_F_DO_SIGVER_INIT 0
|
| 823 |
+
#define EVP_F_ENC_NEW 0
|
| 824 |
+
#define EVP_F_EVP_CIPHERINIT_EX 0
|
| 825 |
+
#define EVP_F_EVP_CIPHER_ASN1_TO_PARAM 0
|
| 826 |
+
#define EVP_F_EVP_CIPHER_CTX_COPY 0
|
| 827 |
+
#define EVP_F_EVP_CIPHER_CTX_CTRL 0
|
| 828 |
+
#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 0
|
| 829 |
+
#define EVP_F_EVP_CIPHER_PARAM_TO_ASN1 0
|
| 830 |
+
#define EVP_F_EVP_DECRYPTFINAL_EX 0
|
| 831 |
+
#define EVP_F_EVP_DECRYPTUPDATE 0
|
| 832 |
+
#define EVP_F_EVP_DIGESTFINALXOF 0
|
| 833 |
+
#define EVP_F_EVP_DIGESTINIT_EX 0
|
| 834 |
+
#define EVP_F_EVP_ENCRYPTDECRYPTUPDATE 0
|
| 835 |
+
#define EVP_F_EVP_ENCRYPTFINAL_EX 0
|
| 836 |
+
#define EVP_F_EVP_ENCRYPTUPDATE 0
|
| 837 |
+
#define EVP_F_EVP_MD_CTX_COPY_EX 0
|
| 838 |
+
#define EVP_F_EVP_MD_SIZE 0
|
| 839 |
+
#define EVP_F_EVP_OPENINIT 0
|
| 840 |
+
#define EVP_F_EVP_PBE_ALG_ADD 0
|
| 841 |
+
#define EVP_F_EVP_PBE_ALG_ADD_TYPE 0
|
| 842 |
+
#define EVP_F_EVP_PBE_CIPHERINIT 0
|
| 843 |
+
#define EVP_F_EVP_PBE_SCRYPT 0
|
| 844 |
+
#define EVP_F_EVP_PKCS82PKEY 0
|
| 845 |
+
#define EVP_F_EVP_PKEY2PKCS8 0
|
| 846 |
+
#define EVP_F_EVP_PKEY_ASN1_ADD0 0
|
| 847 |
+
#define EVP_F_EVP_PKEY_CHECK 0
|
| 848 |
+
#define EVP_F_EVP_PKEY_COPY_PARAMETERS 0
|
| 849 |
+
#define EVP_F_EVP_PKEY_CTX_CTRL 0
|
| 850 |
+
#define EVP_F_EVP_PKEY_CTX_CTRL_STR 0
|
| 851 |
+
#define EVP_F_EVP_PKEY_CTX_DUP 0
|
| 852 |
+
#define EVP_F_EVP_PKEY_CTX_MD 0
|
| 853 |
+
#define EVP_F_EVP_PKEY_DECRYPT 0
|
| 854 |
+
#define EVP_F_EVP_PKEY_DECRYPT_INIT 0
|
| 855 |
+
#define EVP_F_EVP_PKEY_DECRYPT_OLD 0
|
| 856 |
+
#define EVP_F_EVP_PKEY_DERIVE 0
|
| 857 |
+
#define EVP_F_EVP_PKEY_DERIVE_INIT 0
|
| 858 |
+
#define EVP_F_EVP_PKEY_DERIVE_SET_PEER 0
|
| 859 |
+
#define EVP_F_EVP_PKEY_ENCRYPT 0
|
| 860 |
+
#define EVP_F_EVP_PKEY_ENCRYPT_INIT 0
|
| 861 |
+
#define EVP_F_EVP_PKEY_ENCRYPT_OLD 0
|
| 862 |
+
#define EVP_F_EVP_PKEY_GET0_DH 0
|
| 863 |
+
#define EVP_F_EVP_PKEY_GET0_DSA 0
|
| 864 |
+
#define EVP_F_EVP_PKEY_GET0_EC_KEY 0
|
| 865 |
+
#define EVP_F_EVP_PKEY_GET0_HMAC 0
|
| 866 |
+
#define EVP_F_EVP_PKEY_GET0_POLY1305 0
|
| 867 |
+
#define EVP_F_EVP_PKEY_GET0_RSA 0
|
| 868 |
+
#define EVP_F_EVP_PKEY_GET0_SIPHASH 0
|
| 869 |
+
#define EVP_F_EVP_PKEY_GET_RAW_PRIVATE_KEY 0
|
| 870 |
+
#define EVP_F_EVP_PKEY_GET_RAW_PUBLIC_KEY 0
|
| 871 |
+
#define EVP_F_EVP_PKEY_KEYGEN 0
|
| 872 |
+
#define EVP_F_EVP_PKEY_KEYGEN_INIT 0
|
| 873 |
+
#define EVP_F_EVP_PKEY_METH_ADD0 0
|
| 874 |
+
#define EVP_F_EVP_PKEY_METH_NEW 0
|
| 875 |
+
#define EVP_F_EVP_PKEY_NEW 0
|
| 876 |
+
#define EVP_F_EVP_PKEY_NEW_CMAC_KEY 0
|
| 877 |
+
#define EVP_F_EVP_PKEY_NEW_RAW_PRIVATE_KEY 0
|
| 878 |
+
#define EVP_F_EVP_PKEY_NEW_RAW_PUBLIC_KEY 0
|
| 879 |
+
#define EVP_F_EVP_PKEY_PARAMGEN 0
|
| 880 |
+
#define EVP_F_EVP_PKEY_PARAMGEN_INIT 0
|
| 881 |
+
#define EVP_F_EVP_PKEY_PARAM_CHECK 0
|
| 882 |
+
#define EVP_F_EVP_PKEY_PUBLIC_CHECK 0
|
| 883 |
+
#define EVP_F_EVP_PKEY_SET1_ENGINE 0
|
| 884 |
+
#define EVP_F_EVP_PKEY_SET_ALIAS_TYPE 0
|
| 885 |
+
#define EVP_F_EVP_PKEY_SIGN 0
|
| 886 |
+
#define EVP_F_EVP_PKEY_SIGN_INIT 0
|
| 887 |
+
#define EVP_F_EVP_PKEY_VERIFY 0
|
| 888 |
+
#define EVP_F_EVP_PKEY_VERIFY_INIT 0
|
| 889 |
+
#define EVP_F_EVP_PKEY_VERIFY_RECOVER 0
|
| 890 |
+
#define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT 0
|
| 891 |
+
#define EVP_F_EVP_SIGNFINAL 0
|
| 892 |
+
#define EVP_F_EVP_VERIFYFINAL 0
|
| 893 |
+
#define EVP_F_INT_CTX_NEW 0
|
| 894 |
+
#define EVP_F_OK_NEW 0
|
| 895 |
+
#define EVP_F_PKCS5_PBE_KEYIVGEN 0
|
| 896 |
+
#define EVP_F_PKCS5_V2_PBE_KEYIVGEN 0
|
| 897 |
+
#define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 0
|
| 898 |
+
#define EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN 0
|
| 899 |
+
#define EVP_F_PKEY_SET_TYPE 0
|
| 900 |
+
#define EVP_F_RC2_MAGIC_TO_METH 0
|
| 901 |
+
#define EVP_F_RC5_CTRL 0
|
| 902 |
+
#define EVP_F_R_32_12_16_INIT_KEY 0
|
| 903 |
+
#define EVP_F_S390X_AES_GCM_CTRL 0
|
| 904 |
+
#define EVP_F_UPDATE 0
|
| 905 |
+
|
| 906 |
+
/*
|
| 907 |
+
* KDF function codes.
|
| 908 |
+
*/
|
| 909 |
+
#define KDF_F_PKEY_HKDF_CTRL_STR 0
|
| 910 |
+
#define KDF_F_PKEY_HKDF_DERIVE 0
|
| 911 |
+
#define KDF_F_PKEY_HKDF_INIT 0
|
| 912 |
+
#define KDF_F_PKEY_SCRYPT_CTRL_STR 0
|
| 913 |
+
#define KDF_F_PKEY_SCRYPT_CTRL_UINT64 0
|
| 914 |
+
#define KDF_F_PKEY_SCRYPT_DERIVE 0
|
| 915 |
+
#define KDF_F_PKEY_SCRYPT_INIT 0
|
| 916 |
+
#define KDF_F_PKEY_SCRYPT_SET_MEMBUF 0
|
| 917 |
+
#define KDF_F_PKEY_TLS1_PRF_CTRL_STR 0
|
| 918 |
+
#define KDF_F_PKEY_TLS1_PRF_DERIVE 0
|
| 919 |
+
#define KDF_F_PKEY_TLS1_PRF_INIT 0
|
| 920 |
+
#define KDF_F_TLS1_PRF_ALG 0
|
| 921 |
+
|
| 922 |
+
/*
|
| 923 |
+
* KDF reason codes.
|
| 924 |
+
*/
|
| 925 |
+
#define KDF_R_INVALID_DIGEST 0
|
| 926 |
+
#define KDF_R_MISSING_ITERATION_COUNT 0
|
| 927 |
+
#define KDF_R_MISSING_KEY 0
|
| 928 |
+
#define KDF_R_MISSING_MESSAGE_DIGEST 0
|
| 929 |
+
#define KDF_R_MISSING_PARAMETER 0
|
| 930 |
+
#define KDF_R_MISSING_PASS 0
|
| 931 |
+
#define KDF_R_MISSING_SALT 0
|
| 932 |
+
#define KDF_R_MISSING_SECRET 0
|
| 933 |
+
#define KDF_R_MISSING_SEED 0
|
| 934 |
+
#define KDF_R_UNKNOWN_PARAMETER_TYPE 0
|
| 935 |
+
#define KDF_R_VALUE_ERROR 0
|
| 936 |
+
#define KDF_R_VALUE_MISSING 0
|
| 937 |
+
|
| 938 |
+
/*
|
| 939 |
+
* OBJ function codes.
|
| 940 |
+
*/
|
| 941 |
+
#define OBJ_F_OBJ_ADD_OBJECT 0
|
| 942 |
+
#define OBJ_F_OBJ_ADD_SIGID 0
|
| 943 |
+
#define OBJ_F_OBJ_CREATE 0
|
| 944 |
+
#define OBJ_F_OBJ_DUP 0
|
| 945 |
+
#define OBJ_F_OBJ_NAME_NEW_INDEX 0
|
| 946 |
+
#define OBJ_F_OBJ_NID2LN 0
|
| 947 |
+
#define OBJ_F_OBJ_NID2OBJ 0
|
| 948 |
+
#define OBJ_F_OBJ_NID2SN 0
|
| 949 |
+
#define OBJ_F_OBJ_TXT2OBJ 0
|
| 950 |
+
|
| 951 |
+
#ifndef OPENSSL_NO_OCSP
|
| 952 |
+
/*
|
| 953 |
+
* OCSP function codes.
|
| 954 |
+
*/
|
| 955 |
+
#define OCSP_F_D2I_OCSP_NONCE 0
|
| 956 |
+
#define OCSP_F_OCSP_BASIC_ADD1_STATUS 0
|
| 957 |
+
#define OCSP_F_OCSP_BASIC_SIGN 0
|
| 958 |
+
#define OCSP_F_OCSP_BASIC_SIGN_CTX 0
|
| 959 |
+
#define OCSP_F_OCSP_BASIC_VERIFY 0
|
| 960 |
+
#define OCSP_F_OCSP_CERT_ID_NEW 0
|
| 961 |
+
#define OCSP_F_OCSP_CHECK_DELEGATED 0
|
| 962 |
+
#define OCSP_F_OCSP_CHECK_IDS 0
|
| 963 |
+
#define OCSP_F_OCSP_CHECK_ISSUER 0
|
| 964 |
+
#define OCSP_F_OCSP_CHECK_VALIDITY 0
|
| 965 |
+
#define OCSP_F_OCSP_MATCH_ISSUERID 0
|
| 966 |
+
#define OCSP_F_OCSP_PARSE_URL 0
|
| 967 |
+
#define OCSP_F_OCSP_REQUEST_SIGN 0
|
| 968 |
+
#define OCSP_F_OCSP_REQUEST_VERIFY 0
|
| 969 |
+
#define OCSP_F_OCSP_RESPONSE_GET1_BASIC 0
|
| 970 |
+
#define OCSP_F_PARSE_HTTP_LINE1 0
|
| 971 |
+
#endif
|
| 972 |
+
|
| 973 |
+
/*
|
| 974 |
+
* PEM function codes.
|
| 975 |
+
*/
|
| 976 |
+
#define PEM_F_B2I_DSS 0
|
| 977 |
+
#define PEM_F_B2I_PVK_BIO 0
|
| 978 |
+
#define PEM_F_B2I_RSA 0
|
| 979 |
+
#define PEM_F_CHECK_BITLEN_DSA 0
|
| 980 |
+
#define PEM_F_CHECK_BITLEN_RSA 0
|
| 981 |
+
#define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 0
|
| 982 |
+
#define PEM_F_D2I_PKCS8PRIVATEKEY_FP 0
|
| 983 |
+
#define PEM_F_DO_B2I 0
|
| 984 |
+
#define PEM_F_DO_B2I_BIO 0
|
| 985 |
+
#define PEM_F_DO_BLOB_HEADER 0
|
| 986 |
+
#define PEM_F_DO_I2B 0
|
| 987 |
+
#define PEM_F_DO_PK8PKEY 0
|
| 988 |
+
#define PEM_F_DO_PK8PKEY_FP 0
|
| 989 |
+
#define PEM_F_DO_PVK_BODY 0
|
| 990 |
+
#define PEM_F_DO_PVK_HEADER 0
|
| 991 |
+
#define PEM_F_GET_HEADER_AND_DATA 0
|
| 992 |
+
#define PEM_F_GET_NAME 0
|
| 993 |
+
#define PEM_F_I2B_PVK 0
|
| 994 |
+
#define PEM_F_I2B_PVK_BIO 0
|
| 995 |
+
#define PEM_F_LOAD_IV 0
|
| 996 |
+
#define PEM_F_PEM_ASN1_READ 0
|
| 997 |
+
#define PEM_F_PEM_ASN1_READ_BIO 0
|
| 998 |
+
#define PEM_F_PEM_ASN1_WRITE 0
|
| 999 |
+
#define PEM_F_PEM_ASN1_WRITE_BIO 0
|
| 1000 |
+
#define PEM_F_PEM_DEF_CALLBACK 0
|
| 1001 |
+
#define PEM_F_PEM_DO_HEADER 0
|
| 1002 |
+
#define PEM_F_PEM_GET_EVP_CIPHER_INFO 0
|
| 1003 |
+
#define PEM_F_PEM_READ 0
|
| 1004 |
+
#define PEM_F_PEM_READ_BIO 0
|
| 1005 |
+
#define PEM_F_PEM_READ_BIO_DHPARAMS 0
|
| 1006 |
+
#define PEM_F_PEM_READ_BIO_EX 0
|
| 1007 |
+
#define PEM_F_PEM_READ_BIO_PARAMETERS 0
|
| 1008 |
+
#define PEM_F_PEM_READ_BIO_PRIVATEKEY 0
|
| 1009 |
+
#define PEM_F_PEM_READ_DHPARAMS 0
|
| 1010 |
+
#define PEM_F_PEM_READ_PRIVATEKEY 0
|
| 1011 |
+
#define PEM_F_PEM_SIGNFINAL 0
|
| 1012 |
+
#define PEM_F_PEM_WRITE 0
|
| 1013 |
+
#define PEM_F_PEM_WRITE_BIO 0
|
| 1014 |
+
#define PEM_F_PEM_WRITE_BIO_PRIVATEKEY_TRADITIONAL 0
|
| 1015 |
+
#define PEM_F_PEM_WRITE_PRIVATEKEY 0
|
| 1016 |
+
#define PEM_F_PEM_X509_INFO_READ 0
|
| 1017 |
+
#define PEM_F_PEM_X509_INFO_READ_BIO 0
|
| 1018 |
+
#define PEM_F_PEM_X509_INFO_WRITE_BIO 0
|
| 1019 |
+
|
| 1020 |
+
/*
|
| 1021 |
+
* PKCS12 function codes.
|
| 1022 |
+
*/
|
| 1023 |
+
#define PKCS12_F_OPENSSL_ASC2UNI 0
|
| 1024 |
+
#define PKCS12_F_OPENSSL_UNI2ASC 0
|
| 1025 |
+
#define PKCS12_F_OPENSSL_UNI2UTF8 0
|
| 1026 |
+
#define PKCS12_F_OPENSSL_UTF82UNI 0
|
| 1027 |
+
#define PKCS12_F_PKCS12_CREATE 0
|
| 1028 |
+
#define PKCS12_F_PKCS12_GEN_MAC 0
|
| 1029 |
+
#define PKCS12_F_PKCS12_INIT 0
|
| 1030 |
+
#define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 0
|
| 1031 |
+
#define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 0
|
| 1032 |
+
#define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 0
|
| 1033 |
+
#define PKCS12_F_PKCS12_KEY_GEN_ASC 0
|
| 1034 |
+
#define PKCS12_F_PKCS12_KEY_GEN_UNI 0
|
| 1035 |
+
#define PKCS12_F_PKCS12_KEY_GEN_UTF8 0
|
| 1036 |
+
#define PKCS12_F_PKCS12_NEWPASS 0
|
| 1037 |
+
#define PKCS12_F_PKCS12_PACK_P7DATA 0
|
| 1038 |
+
#define PKCS12_F_PKCS12_PACK_P7ENCDATA 0
|
| 1039 |
+
#define PKCS12_F_PKCS12_PARSE 0
|
| 1040 |
+
#define PKCS12_F_PKCS12_PBE_CRYPT 0
|
| 1041 |
+
#define PKCS12_F_PKCS12_PBE_KEYIVGEN 0
|
| 1042 |
+
#define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF 0
|
| 1043 |
+
#define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8 0
|
| 1044 |
+
#define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT 0
|
| 1045 |
+
#define PKCS12_F_PKCS12_SETUP_MAC 0
|
| 1046 |
+
#define PKCS12_F_PKCS12_SET_MAC 0
|
| 1047 |
+
#define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 0
|
| 1048 |
+
#define PKCS12_F_PKCS12_UNPACK_P7DATA 0
|
| 1049 |
+
#define PKCS12_F_PKCS12_VERIFY_MAC 0
|
| 1050 |
+
#define PKCS12_F_PKCS8_ENCRYPT 0
|
| 1051 |
+
#define PKCS12_F_PKCS8_SET0_PBE 0
|
| 1052 |
+
|
| 1053 |
+
/*
|
| 1054 |
+
* PKCS7 function codes.
|
| 1055 |
+
*/
|
| 1056 |
+
#define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 0
|
| 1057 |
+
#define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 0
|
| 1058 |
+
#define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 0
|
| 1059 |
+
#define PKCS7_F_PKCS7_ADD_CERTIFICATE 0
|
| 1060 |
+
#define PKCS7_F_PKCS7_ADD_CRL 0
|
| 1061 |
+
#define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 0
|
| 1062 |
+
#define PKCS7_F_PKCS7_ADD_SIGNATURE 0
|
| 1063 |
+
#define PKCS7_F_PKCS7_ADD_SIGNER 0
|
| 1064 |
+
#define PKCS7_F_PKCS7_BIO_ADD_DIGEST 0
|
| 1065 |
+
#define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 0
|
| 1066 |
+
#define PKCS7_F_PKCS7_CTRL 0
|
| 1067 |
+
#define PKCS7_F_PKCS7_DATADECODE 0
|
| 1068 |
+
#define PKCS7_F_PKCS7_DATAFINAL 0
|
| 1069 |
+
#define PKCS7_F_PKCS7_DATAINIT 0
|
| 1070 |
+
#define PKCS7_F_PKCS7_DATAVERIFY 0
|
| 1071 |
+
#define PKCS7_F_PKCS7_DECRYPT 0
|
| 1072 |
+
#define PKCS7_F_PKCS7_DECRYPT_RINFO 0
|
| 1073 |
+
#define PKCS7_F_PKCS7_ENCODE_RINFO 0
|
| 1074 |
+
#define PKCS7_F_PKCS7_ENCRYPT 0
|
| 1075 |
+
#define PKCS7_F_PKCS7_FINAL 0
|
| 1076 |
+
#define PKCS7_F_PKCS7_FIND_DIGEST 0
|
| 1077 |
+
#define PKCS7_F_PKCS7_GET0_SIGNERS 0
|
| 1078 |
+
#define PKCS7_F_PKCS7_RECIP_INFO_SET 0
|
| 1079 |
+
#define PKCS7_F_PKCS7_SET_CIPHER 0
|
| 1080 |
+
#define PKCS7_F_PKCS7_SET_CONTENT 0
|
| 1081 |
+
#define PKCS7_F_PKCS7_SET_DIGEST 0
|
| 1082 |
+
#define PKCS7_F_PKCS7_SET_TYPE 0
|
| 1083 |
+
#define PKCS7_F_PKCS7_SIGN 0
|
| 1084 |
+
#define PKCS7_F_PKCS7_SIGNATUREVERIFY 0
|
| 1085 |
+
#define PKCS7_F_PKCS7_SIGNER_INFO_SET 0
|
| 1086 |
+
#define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 0
|
| 1087 |
+
#define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 0
|
| 1088 |
+
#define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 0
|
| 1089 |
+
#define PKCS7_F_PKCS7_VERIFY 0
|
| 1090 |
+
|
| 1091 |
+
/*
|
| 1092 |
+
* RAND function codes.
|
| 1093 |
+
*/
|
| 1094 |
+
#define RAND_F_DATA_COLLECT_METHOD 0
|
| 1095 |
+
#define RAND_F_DRBG_BYTES 0
|
| 1096 |
+
#define RAND_F_DRBG_GET_ENTROPY 0
|
| 1097 |
+
#define RAND_F_DRBG_SETUP 0
|
| 1098 |
+
#define RAND_F_GET_ENTROPY 0
|
| 1099 |
+
#define RAND_F_RAND_BYTES 0
|
| 1100 |
+
#define RAND_F_RAND_DRBG_ENABLE_LOCKING 0
|
| 1101 |
+
#define RAND_F_RAND_DRBG_GENERATE 0
|
| 1102 |
+
#define RAND_F_RAND_DRBG_GET_ENTROPY 0
|
| 1103 |
+
#define RAND_F_RAND_DRBG_GET_NONCE 0
|
| 1104 |
+
#define RAND_F_RAND_DRBG_INSTANTIATE 0
|
| 1105 |
+
#define RAND_F_RAND_DRBG_NEW 0
|
| 1106 |
+
#define RAND_F_RAND_DRBG_RESEED 0
|
| 1107 |
+
#define RAND_F_RAND_DRBG_RESTART 0
|
| 1108 |
+
#define RAND_F_RAND_DRBG_SET 0
|
| 1109 |
+
#define RAND_F_RAND_DRBG_SET_DEFAULTS 0
|
| 1110 |
+
#define RAND_F_RAND_DRBG_UNINSTANTIATE 0
|
| 1111 |
+
#define RAND_F_RAND_LOAD_FILE 0
|
| 1112 |
+
#define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 0
|
| 1113 |
+
#define RAND_F_RAND_POOL_ADD 0
|
| 1114 |
+
#define RAND_F_RAND_POOL_ADD_BEGIN 0
|
| 1115 |
+
#define RAND_F_RAND_POOL_ADD_END 0
|
| 1116 |
+
#define RAND_F_RAND_POOL_ATTACH 0
|
| 1117 |
+
#define RAND_F_RAND_POOL_BYTES_NEEDED 0
|
| 1118 |
+
#define RAND_F_RAND_POOL_GROW 0
|
| 1119 |
+
#define RAND_F_RAND_POOL_NEW 0
|
| 1120 |
+
#define RAND_F_RAND_PSEUDO_BYTES 0
|
| 1121 |
+
#define RAND_F_RAND_WRITE_FILE 0
|
| 1122 |
+
|
| 1123 |
+
/*
|
| 1124 |
+
* RSA function codes.
|
| 1125 |
+
*/
|
| 1126 |
+
#define RSA_F_CHECK_PADDING_MD 0
|
| 1127 |
+
#define RSA_F_ENCODE_PKCS1 0
|
| 1128 |
+
#define RSA_F_INT_RSA_VERIFY 0
|
| 1129 |
+
#define RSA_F_OLD_RSA_PRIV_DECODE 0
|
| 1130 |
+
#define RSA_F_PKEY_PSS_INIT 0
|
| 1131 |
+
#define RSA_F_PKEY_RSA_CTRL 0
|
| 1132 |
+
#define RSA_F_PKEY_RSA_CTRL_STR 0
|
| 1133 |
+
#define RSA_F_PKEY_RSA_SIGN 0
|
| 1134 |
+
#define RSA_F_PKEY_RSA_VERIFY 0
|
| 1135 |
+
#define RSA_F_PKEY_RSA_VERIFYRECOVER 0
|
| 1136 |
+
#define RSA_F_RSA_ALGOR_TO_MD 0
|
| 1137 |
+
#define RSA_F_RSA_BUILTIN_KEYGEN 0
|
| 1138 |
+
#define RSA_F_RSA_CHECK_KEY 0
|
| 1139 |
+
#define RSA_F_RSA_CHECK_KEY_EX 0
|
| 1140 |
+
#define RSA_F_RSA_CMS_DECRYPT 0
|
| 1141 |
+
#define RSA_F_RSA_CMS_VERIFY 0
|
| 1142 |
+
#define RSA_F_RSA_ITEM_VERIFY 0
|
| 1143 |
+
#define RSA_F_RSA_METH_DUP 0
|
| 1144 |
+
#define RSA_F_RSA_METH_NEW 0
|
| 1145 |
+
#define RSA_F_RSA_METH_SET1_NAME 0
|
| 1146 |
+
#define RSA_F_RSA_MGF1_TO_MD 0
|
| 1147 |
+
#define RSA_F_RSA_MULTIP_INFO_NEW 0
|
| 1148 |
+
#define RSA_F_RSA_NEW_METHOD 0
|
| 1149 |
+
#define RSA_F_RSA_NULL 0
|
| 1150 |
+
#define RSA_F_RSA_NULL_PRIVATE_DECRYPT 0
|
| 1151 |
+
#define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 0
|
| 1152 |
+
#define RSA_F_RSA_NULL_PUBLIC_DECRYPT 0
|
| 1153 |
+
#define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 0
|
| 1154 |
+
#define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 0
|
| 1155 |
+
#define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 0
|
| 1156 |
+
#define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 0
|
| 1157 |
+
#define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 0
|
| 1158 |
+
#define RSA_F_RSA_PADDING_ADD_NONE 0
|
| 1159 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 0
|
| 1160 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 0
|
| 1161 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 0
|
| 1162 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1 0
|
| 1163 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 0
|
| 1164 |
+
#define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 0
|
| 1165 |
+
#define RSA_F_RSA_PADDING_ADD_SSLV23 0
|
| 1166 |
+
#define RSA_F_RSA_PADDING_ADD_X931 0
|
| 1167 |
+
#define RSA_F_RSA_PADDING_CHECK_NONE 0
|
| 1168 |
+
#define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 0
|
| 1169 |
+
#define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1 0
|
| 1170 |
+
#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 0
|
| 1171 |
+
#define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 0
|
| 1172 |
+
#define RSA_F_RSA_PADDING_CHECK_SSLV23 0
|
| 1173 |
+
#define RSA_F_RSA_PADDING_CHECK_X931 0
|
| 1174 |
+
#define RSA_F_RSA_PARAM_DECODE 0
|
| 1175 |
+
#define RSA_F_RSA_PRINT 0
|
| 1176 |
+
#define RSA_F_RSA_PRINT_FP 0
|
| 1177 |
+
#define RSA_F_RSA_PRIV_DECODE 0
|
| 1178 |
+
#define RSA_F_RSA_PRIV_ENCODE 0
|
| 1179 |
+
#define RSA_F_RSA_PSS_GET_PARAM 0
|
| 1180 |
+
#define RSA_F_RSA_PSS_TO_CTX 0
|
| 1181 |
+
#define RSA_F_RSA_PUB_DECODE 0
|
| 1182 |
+
#define RSA_F_RSA_SETUP_BLINDING 0
|
| 1183 |
+
#define RSA_F_RSA_SIGN 0
|
| 1184 |
+
#define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 0
|
| 1185 |
+
#define RSA_F_RSA_VERIFY 0
|
| 1186 |
+
#define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 0
|
| 1187 |
+
#define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 0
|
| 1188 |
+
#define RSA_F_SETUP_TBUF 0
|
| 1189 |
+
|
| 1190 |
+
/*
|
| 1191 |
+
* OSSL_STORE function codes.
|
| 1192 |
+
*/
|
| 1193 |
+
#define OSSL_STORE_F_FILE_CTRL 0
|
| 1194 |
+
#define OSSL_STORE_F_FILE_FIND 0
|
| 1195 |
+
#define OSSL_STORE_F_FILE_GET_PASS 0
|
| 1196 |
+
#define OSSL_STORE_F_FILE_LOAD 0
|
| 1197 |
+
#define OSSL_STORE_F_FILE_LOAD_TRY_DECODE 0
|
| 1198 |
+
#define OSSL_STORE_F_FILE_NAME_TO_URI 0
|
| 1199 |
+
#define OSSL_STORE_F_FILE_OPEN 0
|
| 1200 |
+
#define OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO 0
|
| 1201 |
+
#define OSSL_STORE_F_OSSL_STORE_EXPECT 0
|
| 1202 |
+
#define OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT 0
|
| 1203 |
+
#define OSSL_STORE_F_OSSL_STORE_FIND 0
|
| 1204 |
+
#define OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT 0
|
| 1205 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT 0
|
| 1206 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CRL 0
|
| 1207 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME 0
|
| 1208 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME_DESCRIPTION 0
|
| 1209 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PARAMS 0
|
| 1210 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PKEY 0
|
| 1211 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CERT 0
|
| 1212 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CRL 0
|
| 1213 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_EMBEDDED 0
|
| 1214 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_NAME 0
|
| 1215 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PARAMS 0
|
| 1216 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PKEY 0
|
| 1217 |
+
#define OSSL_STORE_F_OSSL_STORE_INFO_SET0_NAME_DESCRIPTION 0
|
| 1218 |
+
#define OSSL_STORE_F_OSSL_STORE_INIT_ONCE 0
|
| 1219 |
+
#define OSSL_STORE_F_OSSL_STORE_LOADER_NEW 0
|
| 1220 |
+
#define OSSL_STORE_F_OSSL_STORE_OPEN 0
|
| 1221 |
+
#define OSSL_STORE_F_OSSL_STORE_OPEN_INT 0
|
| 1222 |
+
#define OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT 0
|
| 1223 |
+
#define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ALIAS 0
|
| 1224 |
+
#define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 0
|
| 1225 |
+
#define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 0
|
| 1226 |
+
#define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_NAME 0
|
| 1227 |
+
#define OSSL_STORE_F_OSSL_STORE_UNREGISTER_LOADER_INT 0
|
| 1228 |
+
#define OSSL_STORE_F_TRY_DECODE_PARAMS 0
|
| 1229 |
+
#define OSSL_STORE_F_TRY_DECODE_PKCS12 0
|
| 1230 |
+
#define OSSL_STORE_F_TRY_DECODE_PKCS8ENCRYPTED 0
|
| 1231 |
+
|
| 1232 |
+
#ifndef OPENSSL_NO_TS
|
| 1233 |
+
/*
|
| 1234 |
+
* TS function codes.
|
| 1235 |
+
*/
|
| 1236 |
+
#define TS_F_DEF_SERIAL_CB 0
|
| 1237 |
+
#define TS_F_DEF_TIME_CB 0
|
| 1238 |
+
#define TS_F_ESS_ADD_SIGNING_CERT 0
|
| 1239 |
+
#define TS_F_ESS_ADD_SIGNING_CERT_V2 0
|
| 1240 |
+
#define TS_F_ESS_CERT_ID_NEW_INIT 0
|
| 1241 |
+
#define TS_F_ESS_CERT_ID_V2_NEW_INIT 0
|
| 1242 |
+
#define TS_F_ESS_SIGNING_CERT_NEW_INIT 0
|
| 1243 |
+
#define TS_F_ESS_SIGNING_CERT_V2_NEW_INIT 0
|
| 1244 |
+
#define TS_F_INT_TS_RESP_VERIFY_TOKEN 0
|
| 1245 |
+
#define TS_F_PKCS7_TO_TS_TST_INFO 0
|
| 1246 |
+
#define TS_F_TS_ACCURACY_SET_MICROS 0
|
| 1247 |
+
#define TS_F_TS_ACCURACY_SET_MILLIS 0
|
| 1248 |
+
#define TS_F_TS_ACCURACY_SET_SECONDS 0
|
| 1249 |
+
#define TS_F_TS_CHECK_IMPRINTS 0
|
| 1250 |
+
#define TS_F_TS_CHECK_NONCES 0
|
| 1251 |
+
#define TS_F_TS_CHECK_POLICY 0
|
| 1252 |
+
#define TS_F_TS_CHECK_SIGNING_CERTS 0
|
| 1253 |
+
#define TS_F_TS_CHECK_STATUS_INFO 0
|
| 1254 |
+
#define TS_F_TS_COMPUTE_IMPRINT 0
|
| 1255 |
+
#define TS_F_TS_CONF_INVALID 0
|
| 1256 |
+
#define TS_F_TS_CONF_LOAD_CERT 0
|
| 1257 |
+
#define TS_F_TS_CONF_LOAD_CERTS 0
|
| 1258 |
+
#define TS_F_TS_CONF_LOAD_KEY 0
|
| 1259 |
+
#define TS_F_TS_CONF_LOOKUP_FAIL 0
|
| 1260 |
+
#define TS_F_TS_CONF_SET_DEFAULT_ENGINE 0
|
| 1261 |
+
#define TS_F_TS_GET_STATUS_TEXT 0
|
| 1262 |
+
#define TS_F_TS_MSG_IMPRINT_SET_ALGO 0
|
| 1263 |
+
#define TS_F_TS_REQ_SET_MSG_IMPRINT 0
|
| 1264 |
+
#define TS_F_TS_REQ_SET_NONCE 0
|
| 1265 |
+
#define TS_F_TS_REQ_SET_POLICY_ID 0
|
| 1266 |
+
#define TS_F_TS_RESP_CREATE_RESPONSE 0
|
| 1267 |
+
#define TS_F_TS_RESP_CREATE_TST_INFO 0
|
| 1268 |
+
#define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO 0
|
| 1269 |
+
#define TS_F_TS_RESP_CTX_ADD_MD 0
|
| 1270 |
+
#define TS_F_TS_RESP_CTX_ADD_POLICY 0
|
| 1271 |
+
#define TS_F_TS_RESP_CTX_NEW 0
|
| 1272 |
+
#define TS_F_TS_RESP_CTX_SET_ACCURACY 0
|
| 1273 |
+
#define TS_F_TS_RESP_CTX_SET_CERTS 0
|
| 1274 |
+
#define TS_F_TS_RESP_CTX_SET_DEF_POLICY 0
|
| 1275 |
+
#define TS_F_TS_RESP_CTX_SET_SIGNER_CERT 0
|
| 1276 |
+
#define TS_F_TS_RESP_CTX_SET_STATUS_INFO 0
|
| 1277 |
+
#define TS_F_TS_RESP_GET_POLICY 0
|
| 1278 |
+
#define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION 0
|
| 1279 |
+
#define TS_F_TS_RESP_SET_STATUS_INFO 0
|
| 1280 |
+
#define TS_F_TS_RESP_SET_TST_INFO 0
|
| 1281 |
+
#define TS_F_TS_RESP_SIGN 0
|
| 1282 |
+
#define TS_F_TS_RESP_VERIFY_SIGNATURE 0
|
| 1283 |
+
#define TS_F_TS_TST_INFO_SET_ACCURACY 0
|
| 1284 |
+
#define TS_F_TS_TST_INFO_SET_MSG_IMPRINT 0
|
| 1285 |
+
#define TS_F_TS_TST_INFO_SET_NONCE 0
|
| 1286 |
+
#define TS_F_TS_TST_INFO_SET_POLICY_ID 0
|
| 1287 |
+
#define TS_F_TS_TST_INFO_SET_SERIAL 0
|
| 1288 |
+
#define TS_F_TS_TST_INFO_SET_TIME 0
|
| 1289 |
+
#define TS_F_TS_TST_INFO_SET_TSA 0
|
| 1290 |
+
#define TS_F_TS_VERIFY 0
|
| 1291 |
+
#define TS_F_TS_VERIFY_CERT 0
|
| 1292 |
+
#define TS_F_TS_VERIFY_CTX_NEW 0
|
| 1293 |
+
#endif
|
| 1294 |
+
|
| 1295 |
+
/*
|
| 1296 |
+
* UI function codes.
|
| 1297 |
+
*/
|
| 1298 |
+
#define UI_F_CLOSE_CONSOLE 0
|
| 1299 |
+
#define UI_F_ECHO_CONSOLE 0
|
| 1300 |
+
#define UI_F_GENERAL_ALLOCATE_BOOLEAN 0
|
| 1301 |
+
#define UI_F_GENERAL_ALLOCATE_PROMPT 0
|
| 1302 |
+
#define UI_F_NOECHO_CONSOLE 0
|
| 1303 |
+
#define UI_F_OPEN_CONSOLE 0
|
| 1304 |
+
#define UI_F_UI_CONSTRUCT_PROMPT 0
|
| 1305 |
+
#define UI_F_UI_CREATE_METHOD 0
|
| 1306 |
+
#define UI_F_UI_CTRL 0
|
| 1307 |
+
#define UI_F_UI_DUP_ERROR_STRING 0
|
| 1308 |
+
#define UI_F_UI_DUP_INFO_STRING 0
|
| 1309 |
+
#define UI_F_UI_DUP_INPUT_BOOLEAN 0
|
| 1310 |
+
#define UI_F_UI_DUP_INPUT_STRING 0
|
| 1311 |
+
#define UI_F_UI_DUP_USER_DATA 0
|
| 1312 |
+
#define UI_F_UI_DUP_VERIFY_STRING 0
|
| 1313 |
+
#define UI_F_UI_GET0_RESULT 0
|
| 1314 |
+
#define UI_F_UI_GET_RESULT_LENGTH 0
|
| 1315 |
+
#define UI_F_UI_NEW_METHOD 0
|
| 1316 |
+
#define UI_F_UI_PROCESS 0
|
| 1317 |
+
#define UI_F_UI_SET_RESULT 0
|
| 1318 |
+
#define UI_F_UI_SET_RESULT_EX 0
|
| 1319 |
+
|
| 1320 |
+
/*
|
| 1321 |
+
* X509 function codes.
|
| 1322 |
+
*/
|
| 1323 |
+
#define X509_F_ADD_CERT_DIR 0
|
| 1324 |
+
#define X509_F_BUILD_CHAIN 0
|
| 1325 |
+
#define X509_F_BY_FILE_CTRL 0
|
| 1326 |
+
#define X509_F_CHECK_NAME_CONSTRAINTS 0
|
| 1327 |
+
#define X509_F_CHECK_POLICY 0
|
| 1328 |
+
#define X509_F_DANE_I2D 0
|
| 1329 |
+
#define X509_F_DIR_CTRL 0
|
| 1330 |
+
#define X509_F_GET_CERT_BY_SUBJECT 0
|
| 1331 |
+
#define X509_F_I2D_X509_AUX 0
|
| 1332 |
+
#define X509_F_LOOKUP_CERTS_SK 0
|
| 1333 |
+
#define X509_F_NETSCAPE_SPKI_B64_DECODE 0
|
| 1334 |
+
#define X509_F_NETSCAPE_SPKI_B64_ENCODE 0
|
| 1335 |
+
#define X509_F_NEW_DIR 0
|
| 1336 |
+
#define X509_F_X509AT_ADD1_ATTR 0
|
| 1337 |
+
#define X509_F_X509V3_ADD_EXT 0
|
| 1338 |
+
#define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 0
|
| 1339 |
+
#define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 0
|
| 1340 |
+
#define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 0
|
| 1341 |
+
#define X509_F_X509_ATTRIBUTE_GET0_DATA 0
|
| 1342 |
+
#define X509_F_X509_ATTRIBUTE_SET1_DATA 0
|
| 1343 |
+
#define X509_F_X509_CHECK_PRIVATE_KEY 0
|
| 1344 |
+
#define X509_F_X509_CRL_DIFF 0
|
| 1345 |
+
#define X509_F_X509_CRL_METHOD_NEW 0
|
| 1346 |
+
#define X509_F_X509_CRL_PRINT_FP 0
|
| 1347 |
+
#define X509_F_X509_EXTENSION_CREATE_BY_NID 0
|
| 1348 |
+
#define X509_F_X509_EXTENSION_CREATE_BY_OBJ 0
|
| 1349 |
+
#define X509_F_X509_GET_PUBKEY_PARAMETERS 0
|
| 1350 |
+
#define X509_F_X509_LOAD_CERT_CRL_FILE 0
|
| 1351 |
+
#define X509_F_X509_LOAD_CERT_FILE 0
|
| 1352 |
+
#define X509_F_X509_LOAD_CRL_FILE 0
|
| 1353 |
+
#define X509_F_X509_LOOKUP_METH_NEW 0
|
| 1354 |
+
#define X509_F_X509_LOOKUP_NEW 0
|
| 1355 |
+
#define X509_F_X509_NAME_ADD_ENTRY 0
|
| 1356 |
+
#define X509_F_X509_NAME_CANON 0
|
| 1357 |
+
#define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 0
|
| 1358 |
+
#define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 0
|
| 1359 |
+
#define X509_F_X509_NAME_ENTRY_SET_OBJECT 0
|
| 1360 |
+
#define X509_F_X509_NAME_ONELINE 0
|
| 1361 |
+
#define X509_F_X509_NAME_PRINT 0
|
| 1362 |
+
#define X509_F_X509_OBJECT_NEW 0
|
| 1363 |
+
#define X509_F_X509_PRINT_EX_FP 0
|
| 1364 |
+
#define X509_F_X509_PUBKEY_DECODE 0
|
| 1365 |
+
#define X509_F_X509_PUBKEY_GET 0
|
| 1366 |
+
#define X509_F_X509_PUBKEY_GET0 0
|
| 1367 |
+
#define X509_F_X509_PUBKEY_SET 0
|
| 1368 |
+
#define X509_F_X509_REQ_CHECK_PRIVATE_KEY 0
|
| 1369 |
+
#define X509_F_X509_REQ_PRINT_EX 0
|
| 1370 |
+
#define X509_F_X509_REQ_PRINT_FP 0
|
| 1371 |
+
#define X509_F_X509_REQ_TO_X509 0
|
| 1372 |
+
#define X509_F_X509_STORE_ADD_CERT 0
|
| 1373 |
+
#define X509_F_X509_STORE_ADD_CRL 0
|
| 1374 |
+
#define X509_F_X509_STORE_ADD_LOOKUP 0
|
| 1375 |
+
#define X509_F_X509_STORE_CTX_GET1_ISSUER 0
|
| 1376 |
+
#define X509_F_X509_STORE_CTX_INIT 0
|
| 1377 |
+
#define X509_F_X509_STORE_CTX_NEW 0
|
| 1378 |
+
#define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 0
|
| 1379 |
+
#define X509_F_X509_STORE_NEW 0
|
| 1380 |
+
#define X509_F_X509_TO_X509_REQ 0
|
| 1381 |
+
#define X509_F_X509_TRUST_ADD 0
|
| 1382 |
+
#define X509_F_X509_TRUST_SET 0
|
| 1383 |
+
#define X509_F_X509_VERIFY_CERT 0
|
| 1384 |
+
#define X509_F_X509_VERIFY_PARAM_NEW 0
|
| 1385 |
+
|
| 1386 |
+
/*
|
| 1387 |
+
* X509V3 function codes.
|
| 1388 |
+
*/
|
| 1389 |
+
#define X509V3_F_A2I_GENERAL_NAME 0
|
| 1390 |
+
#define X509V3_F_ADDR_VALIDATE_PATH_INTERNAL 0
|
| 1391 |
+
#define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 0
|
| 1392 |
+
#define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 0
|
| 1393 |
+
#define X509V3_F_BIGNUM_TO_STRING 0
|
| 1394 |
+
#define X509V3_F_COPY_EMAIL 0
|
| 1395 |
+
#define X509V3_F_COPY_ISSUER 0
|
| 1396 |
+
#define X509V3_F_DO_DIRNAME 0
|
| 1397 |
+
#define X509V3_F_DO_EXT_I2D 0
|
| 1398 |
+
#define X509V3_F_DO_EXT_NCONF 0
|
| 1399 |
+
#define X509V3_F_GNAMES_FROM_SECTNAME 0
|
| 1400 |
+
#define X509V3_F_I2S_ASN1_ENUMERATED 0
|
| 1401 |
+
#define X509V3_F_I2S_ASN1_IA5STRING 0
|
| 1402 |
+
#define X509V3_F_I2S_ASN1_INTEGER 0
|
| 1403 |
+
#define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 0
|
| 1404 |
+
#define X509V3_F_LEVEL_ADD_NODE 0
|
| 1405 |
+
#define X509V3_F_NOTICE_SECTION 0
|
| 1406 |
+
#define X509V3_F_NREF_NOS 0
|
| 1407 |
+
#define X509V3_F_POLICY_CACHE_CREATE 0
|
| 1408 |
+
#define X509V3_F_POLICY_CACHE_NEW 0
|
| 1409 |
+
#define X509V3_F_POLICY_DATA_NEW 0
|
| 1410 |
+
#define X509V3_F_POLICY_SECTION 0
|
| 1411 |
+
#define X509V3_F_PROCESS_PCI_VALUE 0
|
| 1412 |
+
#define X509V3_F_R2I_CERTPOL 0
|
| 1413 |
+
#define X509V3_F_R2I_PCI 0
|
| 1414 |
+
#define X509V3_F_S2I_ASN1_IA5STRING 0
|
| 1415 |
+
#define X509V3_F_S2I_ASN1_INTEGER 0
|
| 1416 |
+
#define X509V3_F_S2I_ASN1_OCTET_STRING 0
|
| 1417 |
+
#define X509V3_F_S2I_SKEY_ID 0
|
| 1418 |
+
#define X509V3_F_SET_DIST_POINT_NAME 0
|
| 1419 |
+
#define X509V3_F_SXNET_ADD_ID_ASC 0
|
| 1420 |
+
#define X509V3_F_SXNET_ADD_ID_INTEGER 0
|
| 1421 |
+
#define X509V3_F_SXNET_ADD_ID_ULONG 0
|
| 1422 |
+
#define X509V3_F_SXNET_GET_ID_ASC 0
|
| 1423 |
+
#define X509V3_F_SXNET_GET_ID_ULONG 0
|
| 1424 |
+
#define X509V3_F_TREE_INIT 0
|
| 1425 |
+
#define X509V3_F_V2I_ASIDENTIFIERS 0
|
| 1426 |
+
#define X509V3_F_V2I_ASN1_BIT_STRING 0
|
| 1427 |
+
#define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 0
|
| 1428 |
+
#define X509V3_F_V2I_AUTHORITY_KEYID 0
|
| 1429 |
+
#define X509V3_F_V2I_BASIC_CONSTRAINTS 0
|
| 1430 |
+
#define X509V3_F_V2I_CRLD 0
|
| 1431 |
+
#define X509V3_F_V2I_EXTENDED_KEY_USAGE 0
|
| 1432 |
+
#define X509V3_F_V2I_GENERAL_NAMES 0
|
| 1433 |
+
#define X509V3_F_V2I_GENERAL_NAME_EX 0
|
| 1434 |
+
#define X509V3_F_V2I_IDP 0
|
| 1435 |
+
#define X509V3_F_V2I_IPADDRBLOCKS 0
|
| 1436 |
+
#define X509V3_F_V2I_ISSUER_ALT 0
|
| 1437 |
+
#define X509V3_F_V2I_NAME_CONSTRAINTS 0
|
| 1438 |
+
#define X509V3_F_V2I_POLICY_CONSTRAINTS 0
|
| 1439 |
+
#define X509V3_F_V2I_POLICY_MAPPINGS 0
|
| 1440 |
+
#define X509V3_F_V2I_SUBJECT_ALT 0
|
| 1441 |
+
#define X509V3_F_V2I_TLS_FEATURE 0
|
| 1442 |
+
#define X509V3_F_V3_GENERIC_EXTENSION 0
|
| 1443 |
+
#define X509V3_F_X509V3_ADD1_I2D 0
|
| 1444 |
+
#define X509V3_F_X509V3_ADD_VALUE 0
|
| 1445 |
+
#define X509V3_F_X509V3_EXT_ADD 0
|
| 1446 |
+
#define X509V3_F_X509V3_EXT_ADD_ALIAS 0
|
| 1447 |
+
#define X509V3_F_X509V3_EXT_I2D 0
|
| 1448 |
+
#define X509V3_F_X509V3_EXT_NCONF 0
|
| 1449 |
+
#define X509V3_F_X509V3_GET_SECTION 0
|
| 1450 |
+
#define X509V3_F_X509V3_GET_STRING 0
|
| 1451 |
+
#define X509V3_F_X509V3_GET_VALUE_BOOL 0
|
| 1452 |
+
#define X509V3_F_X509V3_PARSE_LIST 0
|
| 1453 |
+
#define X509V3_F_X509_PURPOSE_ADD 0
|
| 1454 |
+
#define X509V3_F_X509_PURPOSE_SET 0
|
| 1455 |
+
|
| 1456 |
+
/*
|
| 1457 |
+
* Compatibility defines.
|
| 1458 |
+
*/
|
| 1459 |
+
#define EVP_R_OPERATON_NOT_INITIALIZED EVP_R_OPERATION_NOT_INITIALIZED
|
| 1460 |
+
|
| 1461 |
+
#endif
|
| 1462 |
+
|
| 1463 |
+
#ifdef __cplusplus
|
| 1464 |
+
}
|
| 1465 |
+
#endif
|
| 1466 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/ct.h
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by makefile from include\openssl\ct.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
/* clang-format off */
|
| 14 |
+
|
| 15 |
+
/* clang-format on */
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CT_H
|
| 18 |
+
#define OPENSSL_CT_H
|
| 19 |
+
#pragma once
|
| 20 |
+
|
| 21 |
+
#include <openssl/macros.h>
|
| 22 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 23 |
+
#define HEADER_CT_H
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <openssl/opensslconf.h>
|
| 27 |
+
|
| 28 |
+
#ifndef OPENSSL_NO_CT
|
| 29 |
+
#include <openssl/types.h>
|
| 30 |
+
#include <openssl/safestack.h>
|
| 31 |
+
#include <openssl/x509.h>
|
| 32 |
+
#include <openssl/cterr.h>
|
| 33 |
+
#ifdef __cplusplus
|
| 34 |
+
extern "C" {
|
| 35 |
+
#endif
|
| 36 |
+
|
| 37 |
+
/* Minimum RSA key size, from RFC6962 */
|
| 38 |
+
#define SCT_MIN_RSA_BITS 2048
|
| 39 |
+
|
| 40 |
+
/* All hashes are SHA256 in v1 of Certificate Transparency */
|
| 41 |
+
#define CT_V1_HASHLEN SHA256_DIGEST_LENGTH
|
| 42 |
+
|
| 43 |
+
/* clang-format off */
|
| 44 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SCT, SCT, SCT)
|
| 45 |
+
#define sk_SCT_num(sk) OPENSSL_sk_num(ossl_check_const_SCT_sk_type(sk))
|
| 46 |
+
#define sk_SCT_value(sk, idx) ((SCT *)OPENSSL_sk_value(ossl_check_const_SCT_sk_type(sk), (idx)))
|
| 47 |
+
#define sk_SCT_new(cmp) ((STACK_OF(SCT) *)OPENSSL_sk_new(ossl_check_SCT_compfunc_type(cmp)))
|
| 48 |
+
#define sk_SCT_new_null() ((STACK_OF(SCT) *)OPENSSL_sk_new_null())
|
| 49 |
+
#define sk_SCT_new_reserve(cmp, n) ((STACK_OF(SCT) *)OPENSSL_sk_new_reserve(ossl_check_SCT_compfunc_type(cmp), (n)))
|
| 50 |
+
#define sk_SCT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SCT_sk_type(sk), (n))
|
| 51 |
+
#define sk_SCT_free(sk) OPENSSL_sk_free(ossl_check_SCT_sk_type(sk))
|
| 52 |
+
#define sk_SCT_zero(sk) OPENSSL_sk_zero(ossl_check_SCT_sk_type(sk))
|
| 53 |
+
#define sk_SCT_delete(sk, i) ((SCT *)OPENSSL_sk_delete(ossl_check_SCT_sk_type(sk), (i)))
|
| 54 |
+
#define sk_SCT_delete_ptr(sk, ptr) ((SCT *)OPENSSL_sk_delete_ptr(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr)))
|
| 55 |
+
#define sk_SCT_push(sk, ptr) OPENSSL_sk_push(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 56 |
+
#define sk_SCT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 57 |
+
#define sk_SCT_pop(sk) ((SCT *)OPENSSL_sk_pop(ossl_check_SCT_sk_type(sk)))
|
| 58 |
+
#define sk_SCT_shift(sk) ((SCT *)OPENSSL_sk_shift(ossl_check_SCT_sk_type(sk)))
|
| 59 |
+
#define sk_SCT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SCT_sk_type(sk), ossl_check_SCT_freefunc_type(freefunc))
|
| 60 |
+
#define sk_SCT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr), (idx))
|
| 61 |
+
#define sk_SCT_set(sk, idx, ptr) ((SCT *)OPENSSL_sk_set(ossl_check_SCT_sk_type(sk), (idx), ossl_check_SCT_type(ptr)))
|
| 62 |
+
#define sk_SCT_find(sk, ptr) OPENSSL_sk_find(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 63 |
+
#define sk_SCT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr))
|
| 64 |
+
#define sk_SCT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SCT_sk_type(sk), ossl_check_SCT_type(ptr), pnum)
|
| 65 |
+
#define sk_SCT_sort(sk) OPENSSL_sk_sort(ossl_check_SCT_sk_type(sk))
|
| 66 |
+
#define sk_SCT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SCT_sk_type(sk))
|
| 67 |
+
#define sk_SCT_dup(sk) ((STACK_OF(SCT) *)OPENSSL_sk_dup(ossl_check_const_SCT_sk_type(sk)))
|
| 68 |
+
#define sk_SCT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SCT) *)OPENSSL_sk_deep_copy(ossl_check_const_SCT_sk_type(sk), ossl_check_SCT_copyfunc_type(copyfunc), ossl_check_SCT_freefunc_type(freefunc)))
|
| 69 |
+
#define sk_SCT_set_cmp_func(sk, cmp) ((sk_SCT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SCT_sk_type(sk), ossl_check_SCT_compfunc_type(cmp)))
|
| 70 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CTLOG, CTLOG, CTLOG)
|
| 71 |
+
#define sk_CTLOG_num(sk) OPENSSL_sk_num(ossl_check_const_CTLOG_sk_type(sk))
|
| 72 |
+
#define sk_CTLOG_value(sk, idx) ((CTLOG *)OPENSSL_sk_value(ossl_check_const_CTLOG_sk_type(sk), (idx)))
|
| 73 |
+
#define sk_CTLOG_new(cmp) ((STACK_OF(CTLOG) *)OPENSSL_sk_new(ossl_check_CTLOG_compfunc_type(cmp)))
|
| 74 |
+
#define sk_CTLOG_new_null() ((STACK_OF(CTLOG) *)OPENSSL_sk_new_null())
|
| 75 |
+
#define sk_CTLOG_new_reserve(cmp, n) ((STACK_OF(CTLOG) *)OPENSSL_sk_new_reserve(ossl_check_CTLOG_compfunc_type(cmp), (n)))
|
| 76 |
+
#define sk_CTLOG_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CTLOG_sk_type(sk), (n))
|
| 77 |
+
#define sk_CTLOG_free(sk) OPENSSL_sk_free(ossl_check_CTLOG_sk_type(sk))
|
| 78 |
+
#define sk_CTLOG_zero(sk) OPENSSL_sk_zero(ossl_check_CTLOG_sk_type(sk))
|
| 79 |
+
#define sk_CTLOG_delete(sk, i) ((CTLOG *)OPENSSL_sk_delete(ossl_check_CTLOG_sk_type(sk), (i)))
|
| 80 |
+
#define sk_CTLOG_delete_ptr(sk, ptr) ((CTLOG *)OPENSSL_sk_delete_ptr(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr)))
|
| 81 |
+
#define sk_CTLOG_push(sk, ptr) OPENSSL_sk_push(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 82 |
+
#define sk_CTLOG_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 83 |
+
#define sk_CTLOG_pop(sk) ((CTLOG *)OPENSSL_sk_pop(ossl_check_CTLOG_sk_type(sk)))
|
| 84 |
+
#define sk_CTLOG_shift(sk) ((CTLOG *)OPENSSL_sk_shift(ossl_check_CTLOG_sk_type(sk)))
|
| 85 |
+
#define sk_CTLOG_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_freefunc_type(freefunc))
|
| 86 |
+
#define sk_CTLOG_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr), (idx))
|
| 87 |
+
#define sk_CTLOG_set(sk, idx, ptr) ((CTLOG *)OPENSSL_sk_set(ossl_check_CTLOG_sk_type(sk), (idx), ossl_check_CTLOG_type(ptr)))
|
| 88 |
+
#define sk_CTLOG_find(sk, ptr) OPENSSL_sk_find(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 89 |
+
#define sk_CTLOG_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr))
|
| 90 |
+
#define sk_CTLOG_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CTLOG_sk_type(sk), ossl_check_CTLOG_type(ptr), pnum)
|
| 91 |
+
#define sk_CTLOG_sort(sk) OPENSSL_sk_sort(ossl_check_CTLOG_sk_type(sk))
|
| 92 |
+
#define sk_CTLOG_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CTLOG_sk_type(sk))
|
| 93 |
+
#define sk_CTLOG_dup(sk) ((STACK_OF(CTLOG) *)OPENSSL_sk_dup(ossl_check_const_CTLOG_sk_type(sk)))
|
| 94 |
+
#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)))
|
| 95 |
+
#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)))
|
| 96 |
+
|
| 97 |
+
/* clang-format on */
|
| 98 |
+
|
| 99 |
+
typedef enum {
|
| 100 |
+
CT_LOG_ENTRY_TYPE_NOT_SET = -1,
|
| 101 |
+
CT_LOG_ENTRY_TYPE_X509 = 0,
|
| 102 |
+
CT_LOG_ENTRY_TYPE_PRECERT = 1
|
| 103 |
+
} ct_log_entry_type_t;
|
| 104 |
+
|
| 105 |
+
typedef enum {
|
| 106 |
+
SCT_VERSION_NOT_SET = -1,
|
| 107 |
+
SCT_VERSION_V1 = 0
|
| 108 |
+
} sct_version_t;
|
| 109 |
+
|
| 110 |
+
typedef enum {
|
| 111 |
+
SCT_SOURCE_UNKNOWN,
|
| 112 |
+
SCT_SOURCE_TLS_EXTENSION,
|
| 113 |
+
SCT_SOURCE_X509V3_EXTENSION,
|
| 114 |
+
SCT_SOURCE_OCSP_STAPLED_RESPONSE
|
| 115 |
+
} sct_source_t;
|
| 116 |
+
|
| 117 |
+
typedef enum {
|
| 118 |
+
SCT_VALIDATION_STATUS_NOT_SET,
|
| 119 |
+
SCT_VALIDATION_STATUS_UNKNOWN_LOG,
|
| 120 |
+
SCT_VALIDATION_STATUS_VALID,
|
| 121 |
+
SCT_VALIDATION_STATUS_INVALID,
|
| 122 |
+
SCT_VALIDATION_STATUS_UNVERIFIED,
|
| 123 |
+
SCT_VALIDATION_STATUS_UNKNOWN_VERSION
|
| 124 |
+
} sct_validation_status_t;
|
| 125 |
+
|
| 126 |
+
/******************************************
|
| 127 |
+
* CT policy evaluation context functions *
|
| 128 |
+
******************************************/
|
| 129 |
+
|
| 130 |
+
/*
|
| 131 |
+
* Creates a new, empty policy evaluation context associated with the given
|
| 132 |
+
* library context and property query string.
|
| 133 |
+
* The caller is responsible for calling CT_POLICY_EVAL_CTX_free when finished
|
| 134 |
+
* with the CT_POLICY_EVAL_CTX.
|
| 135 |
+
*/
|
| 136 |
+
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_ex(OSSL_LIB_CTX *libctx,
|
| 137 |
+
const char *propq);
|
| 138 |
+
|
| 139 |
+
/*
|
| 140 |
+
* The same as CT_POLICY_EVAL_CTX_new_ex() but the default library
|
| 141 |
+
* context and property query string is used.
|
| 142 |
+
*/
|
| 143 |
+
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
|
| 144 |
+
|
| 145 |
+
/* Deletes a policy evaluation context and anything it owns. */
|
| 146 |
+
void CT_POLICY_EVAL_CTX_free(CT_POLICY_EVAL_CTX *ctx);
|
| 147 |
+
|
| 148 |
+
/* Gets the peer certificate that the SCTs are for */
|
| 149 |
+
X509 *CT_POLICY_EVAL_CTX_get0_cert(const CT_POLICY_EVAL_CTX *ctx);
|
| 150 |
+
|
| 151 |
+
/*
|
| 152 |
+
* Sets the certificate associated with the received SCTs.
|
| 153 |
+
* Increments the reference count of cert.
|
| 154 |
+
* Returns 1 on success, 0 otherwise.
|
| 155 |
+
*/
|
| 156 |
+
int CT_POLICY_EVAL_CTX_set1_cert(CT_POLICY_EVAL_CTX *ctx, X509 *cert);
|
| 157 |
+
|
| 158 |
+
/* Gets the issuer of the aforementioned certificate */
|
| 159 |
+
X509 *CT_POLICY_EVAL_CTX_get0_issuer(const CT_POLICY_EVAL_CTX *ctx);
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* Sets the issuer of the certificate associated with the received SCTs.
|
| 163 |
+
* Increments the reference count of issuer.
|
| 164 |
+
* Returns 1 on success, 0 otherwise.
|
| 165 |
+
*/
|
| 166 |
+
int CT_POLICY_EVAL_CTX_set1_issuer(CT_POLICY_EVAL_CTX *ctx, X509 *issuer);
|
| 167 |
+
|
| 168 |
+
/* Gets the CT logs that are trusted sources of SCTs */
|
| 169 |
+
const CTLOG_STORE *CT_POLICY_EVAL_CTX_get0_log_store(const CT_POLICY_EVAL_CTX *ctx);
|
| 170 |
+
|
| 171 |
+
/* Sets the log store that is in use. It must outlive the CT_POLICY_EVAL_CTX. */
|
| 172 |
+
void CT_POLICY_EVAL_CTX_set_shared_CTLOG_STORE(CT_POLICY_EVAL_CTX *ctx,
|
| 173 |
+
CTLOG_STORE *log_store);
|
| 174 |
+
|
| 175 |
+
/*
|
| 176 |
+
* Gets the time, in milliseconds since the Unix epoch, that will be used as the
|
| 177 |
+
* current time when checking whether an SCT was issued in the future.
|
| 178 |
+
* Such SCTs will fail validation, as required by RFC6962.
|
| 179 |
+
*/
|
| 180 |
+
uint64_t CT_POLICY_EVAL_CTX_get_time(const CT_POLICY_EVAL_CTX *ctx);
|
| 181 |
+
|
| 182 |
+
/*
|
| 183 |
+
* Sets the time to evaluate SCTs against, in milliseconds since the Unix epoch.
|
| 184 |
+
* If an SCT's timestamp is after this time, it will be interpreted as having
|
| 185 |
+
* been issued in the future. RFC6962 states that "TLS clients MUST reject SCTs
|
| 186 |
+
* whose timestamp is in the future", so an SCT will not validate in this case.
|
| 187 |
+
*/
|
| 188 |
+
void CT_POLICY_EVAL_CTX_set_time(CT_POLICY_EVAL_CTX *ctx, uint64_t time_in_ms);
|
| 189 |
+
|
| 190 |
+
/*****************
|
| 191 |
+
* SCT functions *
|
| 192 |
+
*****************/
|
| 193 |
+
|
| 194 |
+
/*
|
| 195 |
+
* Creates a new, blank SCT.
|
| 196 |
+
* The caller is responsible for calling SCT_free when finished with the SCT.
|
| 197 |
+
*/
|
| 198 |
+
SCT *SCT_new(void);
|
| 199 |
+
|
| 200 |
+
/*
|
| 201 |
+
* Creates a new SCT from some base64-encoded strings.
|
| 202 |
+
* The caller is responsible for calling SCT_free when finished with the SCT.
|
| 203 |
+
*/
|
| 204 |
+
SCT *SCT_new_from_base64(unsigned char version,
|
| 205 |
+
const char *logid_base64,
|
| 206 |
+
ct_log_entry_type_t entry_type,
|
| 207 |
+
uint64_t timestamp,
|
| 208 |
+
const char *extensions_base64,
|
| 209 |
+
const char *signature_base64);
|
| 210 |
+
|
| 211 |
+
/*
|
| 212 |
+
* Frees the SCT and the underlying data structures.
|
| 213 |
+
*/
|
| 214 |
+
void SCT_free(SCT *sct);
|
| 215 |
+
|
| 216 |
+
/*
|
| 217 |
+
* Free a stack of SCTs, and the underlying SCTs themselves.
|
| 218 |
+
* Intended to be compatible with X509V3_EXT_FREE.
|
| 219 |
+
*/
|
| 220 |
+
void SCT_LIST_free(STACK_OF(SCT) *a);
|
| 221 |
+
|
| 222 |
+
/*
|
| 223 |
+
* Returns the version of the SCT.
|
| 224 |
+
*/
|
| 225 |
+
sct_version_t SCT_get_version(const SCT *sct);
|
| 226 |
+
|
| 227 |
+
/*
|
| 228 |
+
* Set the version of an SCT.
|
| 229 |
+
* Returns 1 on success, 0 if the version is unrecognized.
|
| 230 |
+
*/
|
| 231 |
+
__owur int SCT_set_version(SCT *sct, sct_version_t version);
|
| 232 |
+
|
| 233 |
+
/*
|
| 234 |
+
* Returns the log entry type of the SCT.
|
| 235 |
+
*/
|
| 236 |
+
ct_log_entry_type_t SCT_get_log_entry_type(const SCT *sct);
|
| 237 |
+
|
| 238 |
+
/*
|
| 239 |
+
* Set the log entry type of an SCT.
|
| 240 |
+
* Returns 1 on success, 0 otherwise.
|
| 241 |
+
*/
|
| 242 |
+
__owur int SCT_set_log_entry_type(SCT *sct, ct_log_entry_type_t entry_type);
|
| 243 |
+
|
| 244 |
+
/*
|
| 245 |
+
* Gets the ID of the log that an SCT came from.
|
| 246 |
+
* Ownership of the log ID remains with the SCT.
|
| 247 |
+
* Returns the length of the log ID.
|
| 248 |
+
*/
|
| 249 |
+
size_t SCT_get0_log_id(const SCT *sct, unsigned char **log_id);
|
| 250 |
+
|
| 251 |
+
/*
|
| 252 |
+
* Set the log ID of an SCT to point directly to the *log_id specified.
|
| 253 |
+
* The SCT takes ownership of the specified pointer.
|
| 254 |
+
* Returns 1 on success, 0 otherwise.
|
| 255 |
+
*/
|
| 256 |
+
__owur int SCT_set0_log_id(SCT *sct, unsigned char *log_id, size_t log_id_len);
|
| 257 |
+
|
| 258 |
+
/*
|
| 259 |
+
* Set the log ID of an SCT.
|
| 260 |
+
* This makes a copy of the log_id.
|
| 261 |
+
* Returns 1 on success, 0 otherwise.
|
| 262 |
+
*/
|
| 263 |
+
__owur int SCT_set1_log_id(SCT *sct, const unsigned char *log_id,
|
| 264 |
+
size_t log_id_len);
|
| 265 |
+
|
| 266 |
+
/*
|
| 267 |
+
* Returns the timestamp for the SCT (epoch time in milliseconds).
|
| 268 |
+
*/
|
| 269 |
+
uint64_t SCT_get_timestamp(const SCT *sct);
|
| 270 |
+
|
| 271 |
+
/*
|
| 272 |
+
* Set the timestamp of an SCT (epoch time in milliseconds).
|
| 273 |
+
*/
|
| 274 |
+
void SCT_set_timestamp(SCT *sct, uint64_t timestamp);
|
| 275 |
+
|
| 276 |
+
/*
|
| 277 |
+
* Return the NID for the signature used by the SCT.
|
| 278 |
+
* For CT v1, this will be either NID_sha256WithRSAEncryption or
|
| 279 |
+
* NID_ecdsa_with_SHA256 (or NID_undef if incorrect/unset).
|
| 280 |
+
*/
|
| 281 |
+
int SCT_get_signature_nid(const SCT *sct);
|
| 282 |
+
|
| 283 |
+
/*
|
| 284 |
+
* Set the signature type of an SCT
|
| 285 |
+
* For CT v1, this should be either NID_sha256WithRSAEncryption or
|
| 286 |
+
* NID_ecdsa_with_SHA256.
|
| 287 |
+
* Returns 1 on success, 0 otherwise.
|
| 288 |
+
*/
|
| 289 |
+
__owur int SCT_set_signature_nid(SCT *sct, int nid);
|
| 290 |
+
|
| 291 |
+
/*
|
| 292 |
+
* Set *ext to point to the extension data for the SCT. ext must not be NULL.
|
| 293 |
+
* The SCT retains ownership of this pointer.
|
| 294 |
+
* Returns length of the data pointed to.
|
| 295 |
+
*/
|
| 296 |
+
size_t SCT_get0_extensions(const SCT *sct, unsigned char **ext);
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
* Set the extensions of an SCT to point directly to the *ext specified.
|
| 300 |
+
* The SCT takes ownership of the specified pointer.
|
| 301 |
+
*/
|
| 302 |
+
void SCT_set0_extensions(SCT *sct, unsigned char *ext, size_t ext_len);
|
| 303 |
+
|
| 304 |
+
/*
|
| 305 |
+
* Set the extensions of an SCT.
|
| 306 |
+
* This takes a copy of the ext.
|
| 307 |
+
* Returns 1 on success, 0 otherwise.
|
| 308 |
+
*/
|
| 309 |
+
__owur int SCT_set1_extensions(SCT *sct, const unsigned char *ext,
|
| 310 |
+
size_t ext_len);
|
| 311 |
+
|
| 312 |
+
/*
|
| 313 |
+
* Set *sig to point to the signature for the SCT. sig must not be NULL.
|
| 314 |
+
* The SCT retains ownership of this pointer.
|
| 315 |
+
* Returns length of the data pointed to.
|
| 316 |
+
*/
|
| 317 |
+
size_t SCT_get0_signature(const SCT *sct, unsigned char **sig);
|
| 318 |
+
|
| 319 |
+
/*
|
| 320 |
+
* Set the signature of an SCT to point directly to the *sig specified.
|
| 321 |
+
* The SCT takes ownership of the specified pointer.
|
| 322 |
+
*/
|
| 323 |
+
void SCT_set0_signature(SCT *sct, unsigned char *sig, size_t sig_len);
|
| 324 |
+
|
| 325 |
+
/*
|
| 326 |
+
* Set the signature of an SCT to be a copy of the *sig specified.
|
| 327 |
+
* Returns 1 on success, 0 otherwise.
|
| 328 |
+
*/
|
| 329 |
+
__owur int SCT_set1_signature(SCT *sct, const unsigned char *sig,
|
| 330 |
+
size_t sig_len);
|
| 331 |
+
|
| 332 |
+
/*
|
| 333 |
+
* The origin of this SCT, e.g. TLS extension, OCSP response, etc.
|
| 334 |
+
*/
|
| 335 |
+
sct_source_t SCT_get_source(const SCT *sct);
|
| 336 |
+
|
| 337 |
+
/*
|
| 338 |
+
* Set the origin of this SCT, e.g. TLS extension, OCSP response, etc.
|
| 339 |
+
* Returns 1 on success, 0 otherwise.
|
| 340 |
+
*/
|
| 341 |
+
__owur int SCT_set_source(SCT *sct, sct_source_t source);
|
| 342 |
+
|
| 343 |
+
/*
|
| 344 |
+
* Returns a text string describing the validation status of |sct|.
|
| 345 |
+
*/
|
| 346 |
+
const char *SCT_validation_status_string(const SCT *sct);
|
| 347 |
+
|
| 348 |
+
/*
|
| 349 |
+
* Pretty-prints an |sct| to |out|.
|
| 350 |
+
* It will be indented by the number of spaces specified by |indent|.
|
| 351 |
+
* If |logs| is not NULL, it will be used to lookup the CT log that the SCT came
|
| 352 |
+
* from, so that the log name can be printed.
|
| 353 |
+
*/
|
| 354 |
+
void SCT_print(const SCT *sct, BIO *out, int indent, const CTLOG_STORE *logs);
|
| 355 |
+
|
| 356 |
+
/*
|
| 357 |
+
* Pretty-prints an |sct_list| to |out|.
|
| 358 |
+
* It will be indented by the number of spaces specified by |indent|.
|
| 359 |
+
* SCTs will be delimited by |separator|.
|
| 360 |
+
* If |logs| is not NULL, it will be used to lookup the CT log that each SCT
|
| 361 |
+
* came from, so that the log names can be printed.
|
| 362 |
+
*/
|
| 363 |
+
void SCT_LIST_print(const STACK_OF(SCT) *sct_list, BIO *out, int indent,
|
| 364 |
+
const char *separator, const CTLOG_STORE *logs);
|
| 365 |
+
|
| 366 |
+
/*
|
| 367 |
+
* Gets the last result of validating this SCT.
|
| 368 |
+
* If it has not been validated yet, returns SCT_VALIDATION_STATUS_NOT_SET.
|
| 369 |
+
*/
|
| 370 |
+
sct_validation_status_t SCT_get_validation_status(const SCT *sct);
|
| 371 |
+
|
| 372 |
+
/*
|
| 373 |
+
* Validates the given SCT with the provided context.
|
| 374 |
+
* Sets the "validation_status" field of the SCT.
|
| 375 |
+
* Returns 1 if the SCT is valid and the signature verifies.
|
| 376 |
+
* Returns 0 if the SCT is invalid or could not be verified.
|
| 377 |
+
* Returns -1 if an error occurs.
|
| 378 |
+
*/
|
| 379 |
+
__owur int SCT_validate(SCT *sct, const CT_POLICY_EVAL_CTX *ctx);
|
| 380 |
+
|
| 381 |
+
/*
|
| 382 |
+
* Validates the given list of SCTs with the provided context.
|
| 383 |
+
* Sets the "validation_status" field of each SCT.
|
| 384 |
+
* Returns 1 if there are no invalid SCTs and all signatures verify.
|
| 385 |
+
* Returns 0 if at least one SCT is invalid or could not be verified.
|
| 386 |
+
* Returns a negative integer if an error occurs.
|
| 387 |
+
*/
|
| 388 |
+
__owur int SCT_LIST_validate(const STACK_OF(SCT) *scts,
|
| 389 |
+
CT_POLICY_EVAL_CTX *ctx);
|
| 390 |
+
|
| 391 |
+
/*********************************
|
| 392 |
+
* SCT parsing and serialization *
|
| 393 |
+
*********************************/
|
| 394 |
+
|
| 395 |
+
/*
|
| 396 |
+
* Serialize (to TLS format) a stack of SCTs and return the length.
|
| 397 |
+
* "a" must not be NULL.
|
| 398 |
+
* If "pp" is NULL, just return the length of what would have been serialized.
|
| 399 |
+
* If "pp" is not NULL and "*pp" is null, function will allocate a new pointer
|
| 400 |
+
* for data that caller is responsible for freeing (only if function returns
|
| 401 |
+
* successfully).
|
| 402 |
+
* If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring
|
| 403 |
+
* that "*pp" is large enough to accept all of the serialized data.
|
| 404 |
+
* Returns < 0 on error, >= 0 indicating bytes written (or would have been)
|
| 405 |
+
* on success.
|
| 406 |
+
*/
|
| 407 |
+
__owur int i2o_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
| 408 |
+
|
| 409 |
+
/*
|
| 410 |
+
* Convert TLS format SCT list to a stack of SCTs.
|
| 411 |
+
* If "a" or "*a" is NULL, a new stack will be created that the caller is
|
| 412 |
+
* responsible for freeing (by calling SCT_LIST_free).
|
| 413 |
+
* "**pp" and "*pp" must not be NULL.
|
| 414 |
+
* Upon success, "*pp" will point to after the last bytes read, and a stack
|
| 415 |
+
* will be returned.
|
| 416 |
+
* Upon failure, a NULL pointer will be returned, and the position of "*pp" is
|
| 417 |
+
* not defined.
|
| 418 |
+
*/
|
| 419 |
+
STACK_OF(SCT) *o2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
| 420 |
+
size_t len);
|
| 421 |
+
|
| 422 |
+
/*
|
| 423 |
+
* Serialize (to DER format) a stack of SCTs and return the length.
|
| 424 |
+
* "a" must not be NULL.
|
| 425 |
+
* If "pp" is NULL, just returns the length of what would have been serialized.
|
| 426 |
+
* If "pp" is not NULL and "*pp" is null, function will allocate a new pointer
|
| 427 |
+
* for data that caller is responsible for freeing (only if function returns
|
| 428 |
+
* successfully).
|
| 429 |
+
* If "pp" is NULL and "*pp" is not NULL, caller is responsible for ensuring
|
| 430 |
+
* that "*pp" is large enough to accept all of the serialized data.
|
| 431 |
+
* Returns < 0 on error, >= 0 indicating bytes written (or would have been)
|
| 432 |
+
* on success.
|
| 433 |
+
*/
|
| 434 |
+
__owur int i2d_SCT_LIST(const STACK_OF(SCT) *a, unsigned char **pp);
|
| 435 |
+
|
| 436 |
+
/*
|
| 437 |
+
* Parses an SCT list in DER format and returns it.
|
| 438 |
+
* If "a" or "*a" is NULL, a new stack will be created that the caller is
|
| 439 |
+
* responsible for freeing (by calling SCT_LIST_free).
|
| 440 |
+
* "**pp" and "*pp" must not be NULL.
|
| 441 |
+
* Upon success, "*pp" will point to after the last bytes read, and a stack
|
| 442 |
+
* will be returned.
|
| 443 |
+
* Upon failure, a NULL pointer will be returned, and the position of "*pp" is
|
| 444 |
+
* not defined.
|
| 445 |
+
*/
|
| 446 |
+
STACK_OF(SCT) *d2i_SCT_LIST(STACK_OF(SCT) **a, const unsigned char **pp,
|
| 447 |
+
long len);
|
| 448 |
+
|
| 449 |
+
/*
|
| 450 |
+
* Serialize (to TLS format) an |sct| and write it to |out|.
|
| 451 |
+
* If |out| is null, no SCT will be output but the length will still be returned.
|
| 452 |
+
* If |out| points to a null pointer, a string will be allocated to hold the
|
| 453 |
+
* TLS-format SCT. It is the responsibility of the caller to free it.
|
| 454 |
+
* If |out| points to an allocated string, the TLS-format SCT will be written
|
| 455 |
+
* to it.
|
| 456 |
+
* The length of the SCT in TLS format will be returned.
|
| 457 |
+
*/
|
| 458 |
+
__owur int i2o_SCT(const SCT *sct, unsigned char **out);
|
| 459 |
+
|
| 460 |
+
/*
|
| 461 |
+
* Parses an SCT in TLS format and returns it.
|
| 462 |
+
* If |psct| is not null, it will end up pointing to the parsed SCT. If it
|
| 463 |
+
* already points to a non-null pointer, the pointer will be free'd.
|
| 464 |
+
* |in| should be a pointer to a string containing the TLS-format SCT.
|
| 465 |
+
* |in| will be advanced to the end of the SCT if parsing succeeds.
|
| 466 |
+
* |len| should be the length of the SCT in |in|.
|
| 467 |
+
* Returns NULL if an error occurs.
|
| 468 |
+
* If the SCT is an unsupported version, only the SCT's 'sct' and 'sct_len'
|
| 469 |
+
* fields will be populated (with |in| and |len| respectively).
|
| 470 |
+
*/
|
| 471 |
+
SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
|
| 472 |
+
|
| 473 |
+
/********************
|
| 474 |
+
* CT log functions *
|
| 475 |
+
********************/
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* Creates a new CT log instance with the given |public_key| and |name| and
|
| 479 |
+
* associates it with the give library context |libctx| and property query
|
| 480 |
+
* string |propq|.
|
| 481 |
+
* Takes ownership of |public_key| but copies |name|.
|
| 482 |
+
* Returns NULL if malloc fails or if |public_key| cannot be converted to DER.
|
| 483 |
+
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
| 484 |
+
*/
|
| 485 |
+
CTLOG *CTLOG_new_ex(EVP_PKEY *public_key, const char *name, OSSL_LIB_CTX *libctx,
|
| 486 |
+
const char *propq);
|
| 487 |
+
|
| 488 |
+
/*
|
| 489 |
+
* The same as CTLOG_new_ex except that the default library context and
|
| 490 |
+
* property query string are used.
|
| 491 |
+
*/
|
| 492 |
+
CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
|
| 493 |
+
|
| 494 |
+
/*
|
| 495 |
+
* Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER
|
| 496 |
+
* in |pkey_base64| and associated with the given library context |libctx| and
|
| 497 |
+
* property query string |propq|. The |name| is a string to help users identify
|
| 498 |
+
* this log.
|
| 499 |
+
* Returns 1 on success, 0 on failure.
|
| 500 |
+
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
| 501 |
+
*/
|
| 502 |
+
int CTLOG_new_from_base64_ex(CTLOG **ct_log, const char *pkey_base64,
|
| 503 |
+
const char *name, OSSL_LIB_CTX *libctx,
|
| 504 |
+
const char *propq);
|
| 505 |
+
|
| 506 |
+
/*
|
| 507 |
+
* The same as CTLOG_new_from_base64_ex() except that the default
|
| 508 |
+
* library context and property query string are used.
|
| 509 |
+
* Returns 1 on success, 0 on failure.
|
| 510 |
+
*/
|
| 511 |
+
int CTLOG_new_from_base64(CTLOG **ct_log,
|
| 512 |
+
const char *pkey_base64, const char *name);
|
| 513 |
+
|
| 514 |
+
/*
|
| 515 |
+
* Deletes a CT log instance and its fields.
|
| 516 |
+
*/
|
| 517 |
+
void CTLOG_free(CTLOG *log);
|
| 518 |
+
|
| 519 |
+
/* Gets the name of the CT log */
|
| 520 |
+
const char *CTLOG_get0_name(const CTLOG *log);
|
| 521 |
+
/* Gets the ID of the CT log */
|
| 522 |
+
void CTLOG_get0_log_id(const CTLOG *log, const uint8_t **log_id,
|
| 523 |
+
size_t *log_id_len);
|
| 524 |
+
/* Gets the public key of the CT log */
|
| 525 |
+
EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
|
| 526 |
+
|
| 527 |
+
/**************************
|
| 528 |
+
* CT log store functions *
|
| 529 |
+
**************************/
|
| 530 |
+
|
| 531 |
+
/*
|
| 532 |
+
* Creates a new CT log store and associates it with the given libctx and
|
| 533 |
+
* property query string.
|
| 534 |
+
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
| 535 |
+
*/
|
| 536 |
+
CTLOG_STORE *CTLOG_STORE_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 537 |
+
|
| 538 |
+
/*
|
| 539 |
+
* Same as CTLOG_STORE_new_ex except that the default libctx and
|
| 540 |
+
* property query string are used.
|
| 541 |
+
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
| 542 |
+
*/
|
| 543 |
+
CTLOG_STORE *CTLOG_STORE_new(void);
|
| 544 |
+
|
| 545 |
+
/*
|
| 546 |
+
* Deletes a CT log store and all of the CT log instances held within.
|
| 547 |
+
*/
|
| 548 |
+
void CTLOG_STORE_free(CTLOG_STORE *store);
|
| 549 |
+
|
| 550 |
+
/*
|
| 551 |
+
* Finds a CT log in the store based on its log ID.
|
| 552 |
+
* Returns the CT log, or NULL if no match is found.
|
| 553 |
+
*/
|
| 554 |
+
const CTLOG *CTLOG_STORE_get0_log_by_id(const CTLOG_STORE *store,
|
| 555 |
+
const uint8_t *log_id,
|
| 556 |
+
size_t log_id_len);
|
| 557 |
+
|
| 558 |
+
/*
|
| 559 |
+
* Loads a CT log list into a |store| from a |file|.
|
| 560 |
+
* Returns 1 if loading is successful, or 0 otherwise.
|
| 561 |
+
*/
|
| 562 |
+
__owur int CTLOG_STORE_load_file(CTLOG_STORE *store, const char *file);
|
| 563 |
+
|
| 564 |
+
/*
|
| 565 |
+
* Loads the default CT log list into a |store|.
|
| 566 |
+
* Returns 1 if loading is successful, or 0 otherwise.
|
| 567 |
+
*/
|
| 568 |
+
__owur int CTLOG_STORE_load_default_file(CTLOG_STORE *store);
|
| 569 |
+
|
| 570 |
+
#ifdef __cplusplus
|
| 571 |
+
}
|
| 572 |
+
#endif
|
| 573 |
+
#endif
|
| 574 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/cterr.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_CTERR_H
|
| 12 |
+
#define OPENSSL_CTERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_CT
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CT reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define CT_R_BASE64_DECODE_ERROR 108
|
| 25 |
+
#define CT_R_INVALID_LOG_ID_LENGTH 100
|
| 26 |
+
#define CT_R_LOG_CONF_INVALID 109
|
| 27 |
+
#define CT_R_LOG_CONF_INVALID_KEY 110
|
| 28 |
+
#define CT_R_LOG_CONF_MISSING_DESCRIPTION 111
|
| 29 |
+
#define CT_R_LOG_CONF_MISSING_KEY 112
|
| 30 |
+
#define CT_R_LOG_KEY_INVALID 113
|
| 31 |
+
#define CT_R_SCT_FUTURE_TIMESTAMP 116
|
| 32 |
+
#define CT_R_SCT_INVALID 104
|
| 33 |
+
#define CT_R_SCT_INVALID_SIGNATURE 107
|
| 34 |
+
#define CT_R_SCT_LIST_INVALID 105
|
| 35 |
+
#define CT_R_SCT_LOG_ID_MISMATCH 114
|
| 36 |
+
#define CT_R_SCT_NOT_SET 106
|
| 37 |
+
#define CT_R_SCT_UNSUPPORTED_VERSION 115
|
| 38 |
+
#define CT_R_UNRECOGNIZED_SIGNATURE_NID 101
|
| 39 |
+
#define CT_R_UNSUPPORTED_ENTRY_TYPE 102
|
| 40 |
+
#define CT_R_UNSUPPORTED_VERSION 103
|
| 41 |
+
|
| 42 |
+
#endif
|
| 43 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/decoder.h
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_DECODER_H
|
| 11 |
+
#define OPENSSL_DECODER_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/opensslconf.h>
|
| 15 |
+
|
| 16 |
+
#ifndef OPENSSL_NO_STDIO
|
| 17 |
+
#include <stdio.h>
|
| 18 |
+
#endif
|
| 19 |
+
#include <stdarg.h>
|
| 20 |
+
#include <stddef.h>
|
| 21 |
+
#include <openssl/decodererr.h>
|
| 22 |
+
#include <openssl/types.h>
|
| 23 |
+
#include <openssl/core.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
OSSL_DECODER *OSSL_DECODER_fetch(OSSL_LIB_CTX *libctx, const char *name,
|
| 30 |
+
const char *properties);
|
| 31 |
+
int OSSL_DECODER_up_ref(OSSL_DECODER *encoder);
|
| 32 |
+
void OSSL_DECODER_free(OSSL_DECODER *encoder);
|
| 33 |
+
|
| 34 |
+
const OSSL_PROVIDER *OSSL_DECODER_get0_provider(const OSSL_DECODER *encoder);
|
| 35 |
+
const char *OSSL_DECODER_get0_properties(const OSSL_DECODER *encoder);
|
| 36 |
+
const char *OSSL_DECODER_get0_name(const OSSL_DECODER *decoder);
|
| 37 |
+
const char *OSSL_DECODER_get0_description(const OSSL_DECODER *decoder);
|
| 38 |
+
int OSSL_DECODER_is_a(const OSSL_DECODER *encoder, const char *name);
|
| 39 |
+
|
| 40 |
+
void OSSL_DECODER_do_all_provided(OSSL_LIB_CTX *libctx,
|
| 41 |
+
void (*fn)(OSSL_DECODER *encoder, void *arg),
|
| 42 |
+
void *arg);
|
| 43 |
+
int OSSL_DECODER_names_do_all(const OSSL_DECODER *encoder,
|
| 44 |
+
void (*fn)(const char *name, void *data),
|
| 45 |
+
void *data);
|
| 46 |
+
const OSSL_PARAM *OSSL_DECODER_gettable_params(OSSL_DECODER *decoder);
|
| 47 |
+
int OSSL_DECODER_get_params(OSSL_DECODER *decoder, OSSL_PARAM params[]);
|
| 48 |
+
|
| 49 |
+
const OSSL_PARAM *OSSL_DECODER_settable_ctx_params(OSSL_DECODER *encoder);
|
| 50 |
+
OSSL_DECODER_CTX *OSSL_DECODER_CTX_new(void);
|
| 51 |
+
int OSSL_DECODER_CTX_set_params(OSSL_DECODER_CTX *ctx,
|
| 52 |
+
const OSSL_PARAM params[]);
|
| 53 |
+
void OSSL_DECODER_CTX_free(OSSL_DECODER_CTX *ctx);
|
| 54 |
+
|
| 55 |
+
/* Utilities that help set specific parameters */
|
| 56 |
+
int OSSL_DECODER_CTX_set_passphrase(OSSL_DECODER_CTX *ctx,
|
| 57 |
+
const unsigned char *kstr, size_t klen);
|
| 58 |
+
int OSSL_DECODER_CTX_set_pem_password_cb(OSSL_DECODER_CTX *ctx,
|
| 59 |
+
pem_password_cb *cb, void *cbarg);
|
| 60 |
+
int OSSL_DECODER_CTX_set_passphrase_cb(OSSL_DECODER_CTX *ctx,
|
| 61 |
+
OSSL_PASSPHRASE_CALLBACK *cb,
|
| 62 |
+
void *cbarg);
|
| 63 |
+
int OSSL_DECODER_CTX_set_passphrase_ui(OSSL_DECODER_CTX *ctx,
|
| 64 |
+
const UI_METHOD *ui_method,
|
| 65 |
+
void *ui_data);
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* Utilities to read the object to decode, with the result sent to cb.
|
| 69 |
+
* These will discover all provided methods
|
| 70 |
+
*/
|
| 71 |
+
|
| 72 |
+
int OSSL_DECODER_CTX_set_selection(OSSL_DECODER_CTX *ctx, int selection);
|
| 73 |
+
int OSSL_DECODER_CTX_set_input_type(OSSL_DECODER_CTX *ctx,
|
| 74 |
+
const char *input_type);
|
| 75 |
+
int OSSL_DECODER_CTX_set_input_structure(OSSL_DECODER_CTX *ctx,
|
| 76 |
+
const char *input_structure);
|
| 77 |
+
int OSSL_DECODER_CTX_add_decoder(OSSL_DECODER_CTX *ctx, OSSL_DECODER *decoder);
|
| 78 |
+
int OSSL_DECODER_CTX_add_extra(OSSL_DECODER_CTX *ctx,
|
| 79 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 80 |
+
int OSSL_DECODER_CTX_get_num_decoders(OSSL_DECODER_CTX *ctx);
|
| 81 |
+
|
| 82 |
+
typedef struct ossl_decoder_instance_st OSSL_DECODER_INSTANCE;
|
| 83 |
+
OSSL_DECODER *
|
| 84 |
+
OSSL_DECODER_INSTANCE_get_decoder(OSSL_DECODER_INSTANCE *decoder_inst);
|
| 85 |
+
void *
|
| 86 |
+
OSSL_DECODER_INSTANCE_get_decoder_ctx(OSSL_DECODER_INSTANCE *decoder_inst);
|
| 87 |
+
const char *
|
| 88 |
+
OSSL_DECODER_INSTANCE_get_input_type(OSSL_DECODER_INSTANCE *decoder_inst);
|
| 89 |
+
const char *
|
| 90 |
+
OSSL_DECODER_INSTANCE_get_input_structure(OSSL_DECODER_INSTANCE *decoder_inst,
|
| 91 |
+
int *was_set);
|
| 92 |
+
|
| 93 |
+
typedef int OSSL_DECODER_CONSTRUCT(OSSL_DECODER_INSTANCE *decoder_inst,
|
| 94 |
+
const OSSL_PARAM *params,
|
| 95 |
+
void *construct_data);
|
| 96 |
+
typedef void OSSL_DECODER_CLEANUP(void *construct_data);
|
| 97 |
+
|
| 98 |
+
int OSSL_DECODER_CTX_set_construct(OSSL_DECODER_CTX *ctx,
|
| 99 |
+
OSSL_DECODER_CONSTRUCT *construct);
|
| 100 |
+
int OSSL_DECODER_CTX_set_construct_data(OSSL_DECODER_CTX *ctx,
|
| 101 |
+
void *construct_data);
|
| 102 |
+
int OSSL_DECODER_CTX_set_cleanup(OSSL_DECODER_CTX *ctx,
|
| 103 |
+
OSSL_DECODER_CLEANUP *cleanup);
|
| 104 |
+
OSSL_DECODER_CONSTRUCT *OSSL_DECODER_CTX_get_construct(OSSL_DECODER_CTX *ctx);
|
| 105 |
+
void *OSSL_DECODER_CTX_get_construct_data(OSSL_DECODER_CTX *ctx);
|
| 106 |
+
OSSL_DECODER_CLEANUP *OSSL_DECODER_CTX_get_cleanup(OSSL_DECODER_CTX *ctx);
|
| 107 |
+
|
| 108 |
+
int OSSL_DECODER_export(OSSL_DECODER_INSTANCE *decoder_inst,
|
| 109 |
+
void *reference, size_t reference_sz,
|
| 110 |
+
OSSL_CALLBACK *export_cb, void *export_cbarg);
|
| 111 |
+
|
| 112 |
+
int OSSL_DECODER_from_bio(OSSL_DECODER_CTX *ctx, BIO *in);
|
| 113 |
+
#ifndef OPENSSL_NO_STDIO
|
| 114 |
+
int OSSL_DECODER_from_fp(OSSL_DECODER_CTX *ctx, FILE *in);
|
| 115 |
+
#endif
|
| 116 |
+
int OSSL_DECODER_from_data(OSSL_DECODER_CTX *ctx, const unsigned char **pdata,
|
| 117 |
+
size_t *pdata_len);
|
| 118 |
+
|
| 119 |
+
/*
|
| 120 |
+
* Create the OSSL_DECODER_CTX with an associated type. This will perform
|
| 121 |
+
* an implicit OSSL_DECODER_fetch(), suitable for the object of that type.
|
| 122 |
+
*/
|
| 123 |
+
OSSL_DECODER_CTX *
|
| 124 |
+
OSSL_DECODER_CTX_new_for_pkey(EVP_PKEY **pkey,
|
| 125 |
+
const char *input_type,
|
| 126 |
+
const char *input_struct,
|
| 127 |
+
const char *keytype, int selection,
|
| 128 |
+
OSSL_LIB_CTX *libctx, const char *propquery);
|
| 129 |
+
|
| 130 |
+
#ifdef __cplusplus
|
| 131 |
+
}
|
| 132 |
+
#endif
|
| 133 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/decodererr.h
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_DECODERERR_H
|
| 12 |
+
#define OPENSSL_DECODERERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* OSSL_DECODER reason codes.
|
| 21 |
+
*/
|
| 22 |
+
#define OSSL_DECODER_R_COULD_NOT_DECODE_OBJECT 101
|
| 23 |
+
#define OSSL_DECODER_R_DECODER_NOT_FOUND 102
|
| 24 |
+
#define OSSL_DECODER_R_MISSING_GET_PARAMS 100
|
| 25 |
+
|
| 26 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/des.h
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_DES_H
|
| 11 |
+
#define OPENSSL_DES_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_DES_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifndef OPENSSL_NO_DES
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
#include <openssl/e_os2.h>
|
| 26 |
+
|
| 27 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 28 |
+
typedef unsigned int DES_LONG;
|
| 29 |
+
|
| 30 |
+
#ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 31 |
+
#undef OPENSSL_EXTERN
|
| 32 |
+
#define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 33 |
+
#endif
|
| 34 |
+
|
| 35 |
+
typedef unsigned char DES_cblock[8];
|
| 36 |
+
typedef /* const */ unsigned char const_DES_cblock[8];
|
| 37 |
+
/*
|
| 38 |
+
* With "const", gcc 2.8.1 on Solaris thinks that DES_cblock * and
|
| 39 |
+
* const_DES_cblock * are incompatible pointer types.
|
| 40 |
+
*/
|
| 41 |
+
|
| 42 |
+
typedef struct DES_ks {
|
| 43 |
+
union {
|
| 44 |
+
DES_cblock cblock;
|
| 45 |
+
/*
|
| 46 |
+
* make sure things are correct size on machines with 8 byte longs
|
| 47 |
+
*/
|
| 48 |
+
DES_LONG deslong[2];
|
| 49 |
+
} ks[16];
|
| 50 |
+
} DES_key_schedule;
|
| 51 |
+
|
| 52 |
+
#define DES_KEY_SZ (sizeof(DES_cblock))
|
| 53 |
+
#define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))
|
| 54 |
+
|
| 55 |
+
#define DES_ENCRYPT 1
|
| 56 |
+
#define DES_DECRYPT 0
|
| 57 |
+
|
| 58 |
+
#define DES_CBC_MODE 0
|
| 59 |
+
#define DES_PCBC_MODE 1
|
| 60 |
+
|
| 61 |
+
#define DES_ecb2_encrypt(i, o, k1, k2, e) \
|
| 62 |
+
DES_ecb3_encrypt((i), (o), (k1), (k2), (k1), (e))
|
| 63 |
+
|
| 64 |
+
#define DES_ede2_cbc_encrypt(i, o, l, k1, k2, iv, e) \
|
| 65 |
+
DES_ede3_cbc_encrypt((i), (o), (l), (k1), (k2), (k1), (iv), (e))
|
| 66 |
+
|
| 67 |
+
#define DES_ede2_cfb64_encrypt(i, o, l, k1, k2, iv, n, e) \
|
| 68 |
+
DES_ede3_cfb64_encrypt((i), (o), (l), (k1), (k2), (k1), (iv), (n), (e))
|
| 69 |
+
|
| 70 |
+
#define DES_ede2_ofb64_encrypt(i, o, l, k1, k2, iv, n) \
|
| 71 |
+
DES_ede3_ofb64_encrypt((i), (o), (l), (k1), (k2), (k1), (iv), (n))
|
| 72 |
+
|
| 73 |
+
#define DES_fixup_key_parity DES_set_odd_parity
|
| 74 |
+
#endif
|
| 75 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 76 |
+
OSSL_DEPRECATEDIN_3_0 const char *DES_options(void);
|
| 77 |
+
OSSL_DEPRECATEDIN_3_0
|
| 78 |
+
void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
|
| 79 |
+
DES_key_schedule *ks1, DES_key_schedule *ks2,
|
| 80 |
+
DES_key_schedule *ks3, int enc);
|
| 81 |
+
OSSL_DEPRECATEDIN_3_0
|
| 82 |
+
DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,
|
| 83 |
+
long length, DES_key_schedule *schedule,
|
| 84 |
+
const_DES_cblock *ivec);
|
| 85 |
+
#endif
|
| 86 |
+
/* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */
|
| 87 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 88 |
+
OSSL_DEPRECATEDIN_3_0
|
| 89 |
+
void DES_cbc_encrypt(const unsigned char *input, unsigned char *output,
|
| 90 |
+
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
| 91 |
+
int enc);
|
| 92 |
+
OSSL_DEPRECATEDIN_3_0
|
| 93 |
+
void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output,
|
| 94 |
+
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
| 95 |
+
int enc);
|
| 96 |
+
OSSL_DEPRECATEDIN_3_0
|
| 97 |
+
void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output,
|
| 98 |
+
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
| 99 |
+
const_DES_cblock *inw, const_DES_cblock *outw, int enc);
|
| 100 |
+
OSSL_DEPRECATEDIN_3_0
|
| 101 |
+
void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
| 102 |
+
long length, DES_key_schedule *schedule, DES_cblock *ivec,
|
| 103 |
+
int enc);
|
| 104 |
+
OSSL_DEPRECATEDIN_3_0
|
| 105 |
+
void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
|
| 106 |
+
DES_key_schedule *ks, int enc);
|
| 107 |
+
#endif
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* This is the DES encryption function that gets called by just about every
|
| 111 |
+
* other DES routine in the library. You should not use this function except
|
| 112 |
+
* to implement 'modes' of DES. I say this because the functions that call
|
| 113 |
+
* this routine do the conversion from 'char *' to long, and this needs to be
|
| 114 |
+
* done to make sure 'non-aligned' memory access do not occur. The
|
| 115 |
+
* characters are loaded 'little endian'. Data is a pointer to 2 unsigned
|
| 116 |
+
* long's and ks is the DES_key_schedule to use. enc, is non zero specifies
|
| 117 |
+
* encryption, zero if decryption.
|
| 118 |
+
*/
|
| 119 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 120 |
+
OSSL_DEPRECATEDIN_3_0
|
| 121 |
+
void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc);
|
| 122 |
+
#endif
|
| 123 |
+
|
| 124 |
+
/*
|
| 125 |
+
* This functions is the same as DES_encrypt1() except that the DES initial
|
| 126 |
+
* permutation (IP) and final permutation (FP) have been left out. As for
|
| 127 |
+
* DES_encrypt1(), you should not use this function. It is used by the
|
| 128 |
+
* routines in the library that implement triple DES. IP() DES_encrypt2()
|
| 129 |
+
* DES_encrypt2() DES_encrypt2() FP() is the same as DES_encrypt1()
|
| 130 |
+
* DES_encrypt1() DES_encrypt1() except faster :-).
|
| 131 |
+
*/
|
| 132 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 133 |
+
OSSL_DEPRECATEDIN_3_0
|
| 134 |
+
void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc);
|
| 135 |
+
OSSL_DEPRECATEDIN_3_0
|
| 136 |
+
void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2,
|
| 137 |
+
DES_key_schedule *ks3);
|
| 138 |
+
OSSL_DEPRECATEDIN_3_0
|
| 139 |
+
void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2,
|
| 140 |
+
DES_key_schedule *ks3);
|
| 141 |
+
OSSL_DEPRECATEDIN_3_0
|
| 142 |
+
void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output,
|
| 143 |
+
long length, DES_key_schedule *ks1,
|
| 144 |
+
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
| 145 |
+
DES_cblock *ivec, int enc);
|
| 146 |
+
OSSL_DEPRECATEDIN_3_0
|
| 147 |
+
void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 148 |
+
long length, DES_key_schedule *ks1,
|
| 149 |
+
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
| 150 |
+
DES_cblock *ivec, int *num, int enc);
|
| 151 |
+
OSSL_DEPRECATEDIN_3_0
|
| 152 |
+
void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out,
|
| 153 |
+
int numbits, long length, DES_key_schedule *ks1,
|
| 154 |
+
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
| 155 |
+
DES_cblock *ivec, int enc);
|
| 156 |
+
OSSL_DEPRECATEDIN_3_0
|
| 157 |
+
void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 158 |
+
long length, DES_key_schedule *ks1,
|
| 159 |
+
DES_key_schedule *ks2, DES_key_schedule *ks3,
|
| 160 |
+
DES_cblock *ivec, int *num);
|
| 161 |
+
OSSL_DEPRECATEDIN_3_0
|
| 162 |
+
char *DES_fcrypt(const char *buf, const char *salt, char *ret);
|
| 163 |
+
OSSL_DEPRECATEDIN_3_0
|
| 164 |
+
char *DES_crypt(const char *buf, const char *salt);
|
| 165 |
+
OSSL_DEPRECATEDIN_3_0
|
| 166 |
+
void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
|
| 167 |
+
long length, DES_key_schedule *schedule, DES_cblock *ivec);
|
| 168 |
+
OSSL_DEPRECATEDIN_3_0
|
| 169 |
+
void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
|
| 170 |
+
long length, DES_key_schedule *schedule,
|
| 171 |
+
DES_cblock *ivec, int enc);
|
| 172 |
+
OSSL_DEPRECATEDIN_3_0
|
| 173 |
+
DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
|
| 174 |
+
long length, int out_count, DES_cblock *seed);
|
| 175 |
+
OSSL_DEPRECATEDIN_3_0 int DES_random_key(DES_cblock *ret);
|
| 176 |
+
OSSL_DEPRECATEDIN_3_0 void DES_set_odd_parity(DES_cblock *key);
|
| 177 |
+
OSSL_DEPRECATEDIN_3_0 int DES_check_key_parity(const_DES_cblock *key);
|
| 178 |
+
OSSL_DEPRECATEDIN_3_0 int DES_is_weak_key(const_DES_cblock *key);
|
| 179 |
+
#endif
|
| 180 |
+
/*
|
| 181 |
+
* DES_set_key (= set_key = DES_key_sched = key_sched) calls
|
| 182 |
+
* DES_set_key_checked
|
| 183 |
+
*/
|
| 184 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 185 |
+
OSSL_DEPRECATEDIN_3_0
|
| 186 |
+
int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
|
| 187 |
+
OSSL_DEPRECATEDIN_3_0
|
| 188 |
+
int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
|
| 189 |
+
OSSL_DEPRECATEDIN_3_0
|
| 190 |
+
int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule);
|
| 191 |
+
OSSL_DEPRECATEDIN_3_0
|
| 192 |
+
void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);
|
| 193 |
+
OSSL_DEPRECATEDIN_3_0 void DES_string_to_key(const char *str, DES_cblock *key);
|
| 194 |
+
OSSL_DEPRECATEDIN_3_0
|
| 195 |
+
void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2);
|
| 196 |
+
OSSL_DEPRECATEDIN_3_0
|
| 197 |
+
void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 198 |
+
long length, DES_key_schedule *schedule,
|
| 199 |
+
DES_cblock *ivec, int *num, int enc);
|
| 200 |
+
OSSL_DEPRECATEDIN_3_0
|
| 201 |
+
void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
| 202 |
+
long length, DES_key_schedule *schedule,
|
| 203 |
+
DES_cblock *ivec, int *num);
|
| 204 |
+
#endif
|
| 205 |
+
|
| 206 |
+
#ifdef __cplusplus
|
| 207 |
+
}
|
| 208 |
+
#endif
|
| 209 |
+
#endif
|
| 210 |
+
|
| 211 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/dh.h
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_DH_H
|
| 11 |
+
#define OPENSSL_DH_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_DH_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
#include <openssl/types.h>
|
| 21 |
+
|
| 22 |
+
#ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
#endif
|
| 25 |
+
|
| 26 |
+
#include <stdlib.h>
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* DH parameter generation types used by EVP_PKEY_CTX_set_dh_paramgen_type()
|
| 30 |
+
* Note that additions/changes to this set of values requires corresponding
|
| 31 |
+
* adjustments to range checks in dh_gen()
|
| 32 |
+
*/
|
| 33 |
+
#define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */
|
| 34 |
+
#define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */
|
| 35 |
+
#define DH_PARAMGEN_TYPE_FIPS_186_4 2 /* Use FIPS186-4 standard */
|
| 36 |
+
#define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */
|
| 37 |
+
|
| 38 |
+
int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ);
|
| 39 |
+
int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
|
| 40 |
+
int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx,
|
| 41 |
+
const unsigned char *seed,
|
| 42 |
+
size_t seedlen);
|
| 43 |
+
int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits);
|
| 44 |
+
int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen);
|
| 45 |
+
int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen);
|
| 46 |
+
int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid);
|
| 47 |
+
int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen);
|
| 48 |
+
int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen);
|
| 49 |
+
int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad);
|
| 50 |
+
|
| 51 |
+
int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
|
| 52 |
+
int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx);
|
| 53 |
+
int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid);
|
| 54 |
+
int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid);
|
| 55 |
+
int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
| 56 |
+
int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
|
| 57 |
+
int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
|
| 58 |
+
int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
|
| 59 |
+
int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len);
|
| 60 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 61 |
+
OSSL_DEPRECATEDIN_3_0
|
| 62 |
+
int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
|
| 63 |
+
#endif
|
| 64 |
+
|
| 65 |
+
#define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1)
|
| 66 |
+
#define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2)
|
| 67 |
+
#define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3)
|
| 68 |
+
#define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4)
|
| 69 |
+
#define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5)
|
| 70 |
+
#define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6)
|
| 71 |
+
#define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7)
|
| 72 |
+
#define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8)
|
| 73 |
+
#define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9)
|
| 74 |
+
#define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10)
|
| 75 |
+
#define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11)
|
| 76 |
+
#define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12)
|
| 77 |
+
#define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13)
|
| 78 |
+
#define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14)
|
| 79 |
+
#define EVP_PKEY_CTRL_DH_NID (EVP_PKEY_ALG_CTRL + 15)
|
| 80 |
+
#define EVP_PKEY_CTRL_DH_PAD (EVP_PKEY_ALG_CTRL + 16)
|
| 81 |
+
|
| 82 |
+
/* KDF types */
|
| 83 |
+
#define EVP_PKEY_DH_KDF_NONE 1
|
| 84 |
+
#define EVP_PKEY_DH_KDF_X9_42 2
|
| 85 |
+
|
| 86 |
+
#ifndef OPENSSL_NO_STDIO
|
| 87 |
+
#include <stdio.h>
|
| 88 |
+
#endif
|
| 89 |
+
#ifndef OPENSSL_NO_DH
|
| 90 |
+
#include <openssl/e_os2.h>
|
| 91 |
+
#include <openssl/bio.h>
|
| 92 |
+
#include <openssl/asn1.h>
|
| 93 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 94 |
+
#include <openssl/bn.h>
|
| 95 |
+
#endif
|
| 96 |
+
#include <openssl/dherr.h>
|
| 97 |
+
|
| 98 |
+
#ifndef OPENSSL_DH_MAX_MODULUS_BITS
|
| 99 |
+
#define OPENSSL_DH_MAX_MODULUS_BITS 10000
|
| 100 |
+
#endif
|
| 101 |
+
|
| 102 |
+
#ifndef OPENSSL_DH_CHECK_MAX_MODULUS_BITS
|
| 103 |
+
#define OPENSSL_DH_CHECK_MAX_MODULUS_BITS 32768
|
| 104 |
+
#endif
|
| 105 |
+
|
| 106 |
+
#define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
|
| 107 |
+
|
| 108 |
+
#define DH_FLAG_CACHE_MONT_P 0x01
|
| 109 |
+
|
| 110 |
+
#define DH_FLAG_TYPE_MASK 0xF000
|
| 111 |
+
#define DH_FLAG_TYPE_DH 0x0000
|
| 112 |
+
#define DH_FLAG_TYPE_DHX 0x1000
|
| 113 |
+
|
| 114 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 115 |
+
/*
|
| 116 |
+
* Does nothing. Previously this switched off constant time behaviour.
|
| 117 |
+
*/
|
| 118 |
+
#define DH_FLAG_NO_EXP_CONSTTIME 0x00
|
| 119 |
+
#endif
|
| 120 |
+
|
| 121 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 122 |
+
/*
|
| 123 |
+
* If this flag is set the DH method is FIPS compliant and can be used in
|
| 124 |
+
* FIPS mode. This is set in the validated module method. If an application
|
| 125 |
+
* sets this flag in its own methods it is its responsibility to ensure the
|
| 126 |
+
* result is compliant.
|
| 127 |
+
*/
|
| 128 |
+
|
| 129 |
+
#define DH_FLAG_FIPS_METHOD 0x0400
|
| 130 |
+
|
| 131 |
+
/*
|
| 132 |
+
* If this flag is set the operations normally disabled in FIPS mode are
|
| 133 |
+
* permitted it is then the applications responsibility to ensure that the
|
| 134 |
+
* usage is compliant.
|
| 135 |
+
*/
|
| 136 |
+
|
| 137 |
+
#define DH_FLAG_NON_FIPS_ALLOW 0x0400
|
| 138 |
+
#endif
|
| 139 |
+
|
| 140 |
+
/* Already defined in ossl_typ.h */
|
| 141 |
+
/* typedef struct dh_st DH; */
|
| 142 |
+
/* typedef struct dh_method DH_METHOD; */
|
| 143 |
+
|
| 144 |
+
DECLARE_ASN1_ITEM(DHparams)
|
| 145 |
+
|
| 146 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 147 |
+
#define DH_GENERATOR_2 2
|
| 148 |
+
#define DH_GENERATOR_3 3
|
| 149 |
+
#define DH_GENERATOR_5 5
|
| 150 |
+
|
| 151 |
+
/* DH_check error codes, some of them shared with DH_check_pub_key */
|
| 152 |
+
/*
|
| 153 |
+
* NB: These values must align with the equivalently named macros in
|
| 154 |
+
* internal/ffc.h.
|
| 155 |
+
*/
|
| 156 |
+
#define DH_CHECK_P_NOT_PRIME 0x01
|
| 157 |
+
#define DH_CHECK_P_NOT_SAFE_PRIME 0x02
|
| 158 |
+
#define DH_UNABLE_TO_CHECK_GENERATOR 0x04
|
| 159 |
+
#define DH_NOT_SUITABLE_GENERATOR 0x08
|
| 160 |
+
#define DH_CHECK_Q_NOT_PRIME 0x10
|
| 161 |
+
#define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */
|
| 162 |
+
#define DH_CHECK_INVALID_J_VALUE 0x40
|
| 163 |
+
#define DH_MODULUS_TOO_SMALL 0x80
|
| 164 |
+
#define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */
|
| 165 |
+
|
| 166 |
+
/* DH_check_pub_key error codes */
|
| 167 |
+
#define DH_CHECK_PUBKEY_TOO_SMALL 0x01
|
| 168 |
+
#define DH_CHECK_PUBKEY_TOO_LARGE 0x02
|
| 169 |
+
#define DH_CHECK_PUBKEY_INVALID 0x04
|
| 170 |
+
|
| 171 |
+
/*
|
| 172 |
+
* primes p where (p-1)/2 is prime too are called "safe"; we define this for
|
| 173 |
+
* backward compatibility:
|
| 174 |
+
*/
|
| 175 |
+
#define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
|
| 176 |
+
|
| 177 |
+
#define d2i_DHparams_fp(fp, x) \
|
| 178 |
+
(DH *)ASN1_d2i_fp((void *(*)(void))DH_new, \
|
| 179 |
+
(d2i_of_void *)d2i_DHparams, \
|
| 180 |
+
(fp), \
|
| 181 |
+
(void **)(x))
|
| 182 |
+
#define i2d_DHparams_fp(fp, x) \
|
| 183 |
+
ASN1_i2d_fp(i2d_DHparams, (fp), (unsigned char *)(x))
|
| 184 |
+
#define d2i_DHparams_bio(bp, x) \
|
| 185 |
+
ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
|
| 186 |
+
#define i2d_DHparams_bio(bp, x) \
|
| 187 |
+
ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x)
|
| 188 |
+
|
| 189 |
+
#define d2i_DHxparams_fp(fp, x) \
|
| 190 |
+
(DH *)ASN1_d2i_fp((void *(*)(void))DH_new, \
|
| 191 |
+
(d2i_of_void *)d2i_DHxparams, \
|
| 192 |
+
(fp), \
|
| 193 |
+
(void **)(x))
|
| 194 |
+
#define i2d_DHxparams_fp(fp, x) \
|
| 195 |
+
ASN1_i2d_fp(i2d_DHxparams, (fp), (unsigned char *)(x))
|
| 196 |
+
#define d2i_DHxparams_bio(bp, x) \
|
| 197 |
+
ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
|
| 198 |
+
#define i2d_DHxparams_bio(bp, x) \
|
| 199 |
+
ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x)
|
| 200 |
+
|
| 201 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
|
| 202 |
+
|
| 203 |
+
OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_OpenSSL(void);
|
| 204 |
+
|
| 205 |
+
OSSL_DEPRECATEDIN_3_0 void DH_set_default_method(const DH_METHOD *meth);
|
| 206 |
+
OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
|
| 207 |
+
OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
|
| 208 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_new_method(ENGINE *engine);
|
| 209 |
+
|
| 210 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
|
| 211 |
+
OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
|
| 212 |
+
OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh);
|
| 213 |
+
OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh);
|
| 214 |
+
OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
|
| 215 |
+
OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh);
|
| 216 |
+
|
| 217 |
+
#define DH_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 218 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef)
|
| 219 |
+
|
| 220 |
+
OSSL_DEPRECATEDIN_3_0 int DH_set_ex_data(DH *d, int idx, void *arg);
|
| 221 |
+
OSSL_DEPRECATEDIN_3_0 void *DH_get_ex_data(const DH *d, int idx);
|
| 222 |
+
|
| 223 |
+
OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len,
|
| 224 |
+
int generator,
|
| 225 |
+
BN_GENCB *cb);
|
| 226 |
+
|
| 227 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh);
|
| 228 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh);
|
| 229 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
|
| 230 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check_params(const DH *dh, int *ret);
|
| 231 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
|
| 232 |
+
OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
|
| 233 |
+
int *codes);
|
| 234 |
+
OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
|
| 235 |
+
OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
|
| 236 |
+
const BIGNUM *pub_key, DH *dh);
|
| 237 |
+
OSSL_DEPRECATEDIN_3_0 int DH_compute_key_padded(unsigned char *key,
|
| 238 |
+
const BIGNUM *pub_key, DH *dh);
|
| 239 |
+
|
| 240 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
|
| 241 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams)
|
| 242 |
+
|
| 243 |
+
#ifndef OPENSSL_NO_STDIO
|
| 244 |
+
OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x);
|
| 245 |
+
#endif
|
| 246 |
+
OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x);
|
| 247 |
+
|
| 248 |
+
/* RFC 5114 parameters */
|
| 249 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_get_1024_160(void);
|
| 250 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_224(void);
|
| 251 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_256(void);
|
| 252 |
+
|
| 253 |
+
/* Named parameters, currently RFC7919 and RFC3526 */
|
| 254 |
+
OSSL_DEPRECATEDIN_3_0 DH *DH_new_by_nid(int nid);
|
| 255 |
+
OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh);
|
| 256 |
+
|
| 257 |
+
/* RFC2631 KDF */
|
| 258 |
+
OSSL_DEPRECATEDIN_3_0 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
| 259 |
+
const unsigned char *Z, size_t Zlen,
|
| 260 |
+
ASN1_OBJECT *key_oid,
|
| 261 |
+
const unsigned char *ukm,
|
| 262 |
+
size_t ukmlen, const EVP_MD *md);
|
| 263 |
+
|
| 264 |
+
OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
|
| 265 |
+
const BIGNUM **q, const BIGNUM **g);
|
| 266 |
+
OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
| 267 |
+
OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
|
| 268 |
+
const BIGNUM **priv_key);
|
| 269 |
+
OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
|
| 270 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_p(const DH *dh);
|
| 271 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_q(const DH *dh);
|
| 272 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_g(const DH *dh);
|
| 273 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_priv_key(const DH *dh);
|
| 274 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh);
|
| 275 |
+
OSSL_DEPRECATEDIN_3_0 void DH_clear_flags(DH *dh, int flags);
|
| 276 |
+
OSSL_DEPRECATEDIN_3_0 int DH_test_flags(const DH *dh, int flags);
|
| 277 |
+
OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags);
|
| 278 |
+
OSSL_DEPRECATEDIN_3_0 ENGINE *DH_get0_engine(DH *d);
|
| 279 |
+
OSSL_DEPRECATEDIN_3_0 long DH_get_length(const DH *dh);
|
| 280 |
+
OSSL_DEPRECATEDIN_3_0 int DH_set_length(DH *dh, long length);
|
| 281 |
+
|
| 282 |
+
OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_new(const char *name, int flags);
|
| 283 |
+
OSSL_DEPRECATEDIN_3_0 void DH_meth_free(DH_METHOD *dhm);
|
| 284 |
+
OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
|
| 285 |
+
OSSL_DEPRECATEDIN_3_0 const char *DH_meth_get0_name(const DH_METHOD *dhm);
|
| 286 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
|
| 287 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_get_flags(const DH_METHOD *dhm);
|
| 288 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_flags(DH_METHOD *dhm, int flags);
|
| 289 |
+
OSSL_DEPRECATEDIN_3_0 void *DH_meth_get0_app_data(const DH_METHOD *dhm);
|
| 290 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
|
| 291 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_key(const DH_METHOD *dhm))(DH *);
|
| 292 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_key(DH_METHOD *dhm,
|
| 293 |
+
int (*generate_key)(DH *));
|
| 294 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_compute_key(const DH_METHOD *dhm))(unsigned char *key,
|
| 295 |
+
const BIGNUM *pub_key,
|
| 296 |
+
DH *dh);
|
| 297 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_compute_key(DH_METHOD *dhm,
|
| 298 |
+
int (*compute_key)(unsigned char *key,
|
| 299 |
+
const BIGNUM *pub_key,
|
| 300 |
+
DH *dh));
|
| 301 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))(const DH *, BIGNUM *,
|
| 302 |
+
const BIGNUM *,
|
| 303 |
+
const BIGNUM *,
|
| 304 |
+
const BIGNUM *, BN_CTX *,
|
| 305 |
+
BN_MONT_CTX *);
|
| 306 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
|
| 307 |
+
int (*bn_mod_exp)(const DH *, BIGNUM *,
|
| 308 |
+
const BIGNUM *, const BIGNUM *,
|
| 309 |
+
const BIGNUM *, BN_CTX *,
|
| 310 |
+
BN_MONT_CTX *));
|
| 311 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
|
| 313 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_finish(const DH_METHOD *dhm))(DH *);
|
| 314 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish)(DH *));
|
| 315 |
+
OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_params(const DH_METHOD *dhm))(DH *, int, int,
|
| 316 |
+
BN_GENCB *);
|
| 317 |
+
OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_params(DH_METHOD *dhm,
|
| 318 |
+
int (*generate_params)(DH *, int, int,
|
| 319 |
+
BN_GENCB *));
|
| 320 |
+
#endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 321 |
+
|
| 322 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 323 |
+
OSSL_DEPRECATEDIN_0_9_8 DH *DH_generate_parameters(int prime_len, int generator,
|
| 324 |
+
void (*callback)(int, int,
|
| 325 |
+
void *),
|
| 326 |
+
void *cb_arg);
|
| 327 |
+
#endif
|
| 328 |
+
|
| 329 |
+
#endif
|
| 330 |
+
#ifdef __cplusplus
|
| 331 |
+
}
|
| 332 |
+
#endif
|
| 333 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/dherr.h
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_DHERR_H
|
| 12 |
+
#define OPENSSL_DHERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_DH
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* DH reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define DH_R_BAD_FFC_PARAMETERS 127
|
| 25 |
+
#define DH_R_BAD_GENERATOR 101
|
| 26 |
+
#define DH_R_BN_DECODE_ERROR 109
|
| 27 |
+
#define DH_R_BN_ERROR 106
|
| 28 |
+
#define DH_R_CHECK_INVALID_J_VALUE 115
|
| 29 |
+
#define DH_R_CHECK_INVALID_Q_VALUE 116
|
| 30 |
+
#define DH_R_CHECK_PUBKEY_INVALID 122
|
| 31 |
+
#define DH_R_CHECK_PUBKEY_TOO_LARGE 123
|
| 32 |
+
#define DH_R_CHECK_PUBKEY_TOO_SMALL 124
|
| 33 |
+
#define DH_R_CHECK_P_NOT_PRIME 117
|
| 34 |
+
#define DH_R_CHECK_P_NOT_SAFE_PRIME 118
|
| 35 |
+
#define DH_R_CHECK_Q_NOT_PRIME 119
|
| 36 |
+
#define DH_R_DECODE_ERROR 104
|
| 37 |
+
#define DH_R_INVALID_PARAMETER_NAME 110
|
| 38 |
+
#define DH_R_INVALID_PARAMETER_NID 114
|
| 39 |
+
#define DH_R_INVALID_PUBKEY 102
|
| 40 |
+
#define DH_R_INVALID_SECRET 128
|
| 41 |
+
#define DH_R_INVALID_SIZE 129
|
| 42 |
+
#define DH_R_KDF_PARAMETER_ERROR 112
|
| 43 |
+
#define DH_R_KEYS_NOT_SET 108
|
| 44 |
+
#define DH_R_MISSING_PUBKEY 125
|
| 45 |
+
#define DH_R_MODULUS_TOO_LARGE 103
|
| 46 |
+
#define DH_R_MODULUS_TOO_SMALL 126
|
| 47 |
+
#define DH_R_NOT_SUITABLE_GENERATOR 120
|
| 48 |
+
#define DH_R_NO_PARAMETERS_SET 107
|
| 49 |
+
#define DH_R_NO_PRIVATE_VALUE 100
|
| 50 |
+
#define DH_R_PARAMETER_ENCODING_ERROR 105
|
| 51 |
+
#define DH_R_PEER_KEY_ERROR 111
|
| 52 |
+
#define DH_R_Q_TOO_LARGE 130
|
| 53 |
+
#define DH_R_SHARED_INFO_ERROR 113
|
| 54 |
+
#define DH_R_UNABLE_TO_CHECK_GENERATOR 121
|
| 55 |
+
|
| 56 |
+
#endif
|
| 57 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/dsa.h
ADDED
|
@@ -0,0 +1,273 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_DSA_H
|
| 11 |
+
#define OPENSSL_DSA_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_DSA_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
#include <openssl/types.h>
|
| 21 |
+
|
| 22 |
+
#include <stdlib.h>
|
| 23 |
+
|
| 24 |
+
#ifndef OPENSSL_NO_DSA
|
| 25 |
+
#include <openssl/e_os2.h>
|
| 26 |
+
#include <openssl/asn1.h>
|
| 27 |
+
#include <openssl/bio.h>
|
| 28 |
+
#include <openssl/crypto.h>
|
| 29 |
+
#include <openssl/bn.h>
|
| 30 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 31 |
+
#include <openssl/dh.h>
|
| 32 |
+
#endif
|
| 33 |
+
#include <openssl/dsaerr.h>
|
| 34 |
+
#ifndef OPENSSL_NO_STDIO
|
| 35 |
+
#include <stdio.h>
|
| 36 |
+
#endif
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
#ifdef __cplusplus
|
| 40 |
+
extern "C" {
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits);
|
| 44 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits);
|
| 45 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_md_props(EVP_PKEY_CTX *ctx,
|
| 46 |
+
const char *md_name,
|
| 47 |
+
const char *md_properties);
|
| 48 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
|
| 49 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_type(EVP_PKEY_CTX *ctx, const char *name);
|
| 50 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_seed(EVP_PKEY_CTX *ctx,
|
| 51 |
+
const unsigned char *seed,
|
| 52 |
+
size_t seedlen);
|
| 53 |
+
int EVP_PKEY_CTX_set_dsa_paramgen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
| 54 |
+
|
| 55 |
+
#define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1)
|
| 56 |
+
#define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2)
|
| 57 |
+
#define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3)
|
| 58 |
+
|
| 59 |
+
#ifndef OPENSSL_NO_DSA
|
| 60 |
+
#ifndef OPENSSL_DSA_MAX_MODULUS_BITS
|
| 61 |
+
#define OPENSSL_DSA_MAX_MODULUS_BITS 10000
|
| 62 |
+
#endif
|
| 63 |
+
|
| 64 |
+
#define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
|
| 65 |
+
|
| 66 |
+
typedef struct DSA_SIG_st DSA_SIG;
|
| 67 |
+
DSA_SIG *DSA_SIG_new(void);
|
| 68 |
+
void DSA_SIG_free(DSA_SIG *a);
|
| 69 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(DSA_SIG, DSA_SIG)
|
| 70 |
+
void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
|
| 71 |
+
int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
|
| 72 |
+
|
| 73 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 74 |
+
/*
|
| 75 |
+
* Does nothing. Previously this switched off constant time behaviour.
|
| 76 |
+
*/
|
| 77 |
+
#define DSA_FLAG_NO_EXP_CONSTTIME 0x00
|
| 78 |
+
#endif
|
| 79 |
+
|
| 80 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 81 |
+
#define DSA_FLAG_CACHE_MONT_P 0x01
|
| 82 |
+
|
| 83 |
+
/*
|
| 84 |
+
* If this flag is set the DSA method is FIPS compliant and can be used in
|
| 85 |
+
* FIPS mode. This is set in the validated module method. If an application
|
| 86 |
+
* sets this flag in its own methods it is its responsibility to ensure the
|
| 87 |
+
* result is compliant.
|
| 88 |
+
*/
|
| 89 |
+
|
| 90 |
+
#define DSA_FLAG_FIPS_METHOD 0x0400
|
| 91 |
+
|
| 92 |
+
/*
|
| 93 |
+
* If this flag is set the operations normally disabled in FIPS mode are
|
| 94 |
+
* permitted it is then the applications responsibility to ensure that the
|
| 95 |
+
* usage is compliant.
|
| 96 |
+
*/
|
| 97 |
+
|
| 98 |
+
#define DSA_FLAG_NON_FIPS_ALLOW 0x0400
|
| 99 |
+
#define DSA_FLAG_FIPS_CHECKED 0x0800
|
| 100 |
+
|
| 101 |
+
/* Already defined in ossl_typ.h */
|
| 102 |
+
/* typedef struct dsa_st DSA; */
|
| 103 |
+
/* typedef struct dsa_method DSA_METHOD; */
|
| 104 |
+
|
| 105 |
+
#define d2i_DSAparams_fp(fp, x) \
|
| 106 |
+
(DSA *)ASN1_d2i_fp((void *(*)(void))DSA_new, \
|
| 107 |
+
(d2i_of_void *)d2i_DSAparams, (fp), \
|
| 108 |
+
(void **)(x))
|
| 109 |
+
#define i2d_DSAparams_fp(fp, x) \
|
| 110 |
+
ASN1_i2d_fp(i2d_DSAparams, (fp), (unsigned char *)(x))
|
| 111 |
+
#define d2i_DSAparams_bio(bp, x) \
|
| 112 |
+
ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAparams, bp, x)
|
| 113 |
+
#define i2d_DSAparams_bio(bp, x) \
|
| 114 |
+
ASN1_i2d_bio_of(DSA, i2d_DSAparams, bp, x)
|
| 115 |
+
|
| 116 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DSA, DSAparams)
|
| 117 |
+
OSSL_DEPRECATEDIN_3_0 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen,
|
| 118 |
+
DSA *dsa);
|
| 119 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
|
| 120 |
+
DSA_SIG *sig, DSA *dsa);
|
| 121 |
+
|
| 122 |
+
OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_OpenSSL(void);
|
| 123 |
+
|
| 124 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_set_default_method(const DSA_METHOD *);
|
| 125 |
+
OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
|
| 126 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
|
| 127 |
+
OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_method(DSA *d);
|
| 128 |
+
|
| 129 |
+
OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
|
| 130 |
+
OSSL_DEPRECATEDIN_3_0 DSA *DSA_new_method(ENGINE *engine);
|
| 131 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
|
| 132 |
+
/* "up" the DSA object's reference count */
|
| 133 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_up_ref(DSA *r);
|
| 134 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_size(const DSA *);
|
| 135 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_bits(const DSA *d);
|
| 136 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_security_bits(const DSA *d);
|
| 137 |
+
/* next 4 return -1 on error */
|
| 138 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in,
|
| 139 |
+
BIGNUM **kinvp, BIGNUM **rp);
|
| 140 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_sign(int type, const unsigned char *dgst,
|
| 141 |
+
int dlen, unsigned char *sig,
|
| 142 |
+
unsigned int *siglen, DSA *dsa);
|
| 143 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_verify(int type, const unsigned char *dgst,
|
| 144 |
+
int dgst_len, const unsigned char *sigbuf,
|
| 145 |
+
int siglen, DSA *dsa);
|
| 146 |
+
|
| 147 |
+
#define DSA_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 148 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef)
|
| 149 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg);
|
| 150 |
+
OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx);
|
| 151 |
+
|
| 152 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
|
| 153 |
+
DSA, DSAPublicKey)
|
| 154 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
|
| 155 |
+
DSA, DSAPrivateKey)
|
| 156 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
|
| 157 |
+
DSA, DSAparams)
|
| 158 |
+
#endif
|
| 159 |
+
|
| 160 |
+
#ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 161 |
+
/* Deprecated version */
|
| 162 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 163 |
+
DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len,
|
| 164 |
+
int *counter_ret, unsigned long *h_ret,
|
| 165 |
+
void (*callback)(int, int, void *),
|
| 166 |
+
void *cb_arg);
|
| 167 |
+
#endif
|
| 168 |
+
|
| 169 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 170 |
+
/* New version */
|
| 171 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_generate_parameters_ex(DSA *dsa, int bits,
|
| 172 |
+
const unsigned char *seed,
|
| 173 |
+
int seed_len,
|
| 174 |
+
int *counter_ret,
|
| 175 |
+
unsigned long *h_ret,
|
| 176 |
+
BN_GENCB *cb);
|
| 177 |
+
|
| 178 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
|
| 179 |
+
|
| 180 |
+
OSSL_DEPRECATEDIN_3_0 int DSAparams_print(BIO *bp, const DSA *x);
|
| 181 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_print(BIO *bp, const DSA *x, int off);
|
| 182 |
+
#ifndef OPENSSL_NO_STDIO
|
| 183 |
+
OSSL_DEPRECATEDIN_3_0 int DSAparams_print_fp(FILE *fp, const DSA *x);
|
| 184 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_print_fp(FILE *bp, const DSA *x, int off);
|
| 185 |
+
#endif
|
| 186 |
+
|
| 187 |
+
#define DSS_prime_checks 64
|
| 188 |
+
/*
|
| 189 |
+
* Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
|
| 190 |
+
* have one value here we set the number of checks to 64 which is the 128 bit
|
| 191 |
+
* security level that is the highest level and valid for creating a 3072 bit
|
| 192 |
+
* DSA key.
|
| 193 |
+
*/
|
| 194 |
+
#define DSA_is_prime(n, callback, cb_arg) \
|
| 195 |
+
BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)
|
| 196 |
+
|
| 197 |
+
#ifndef OPENSSL_NO_DH
|
| 198 |
+
/*
|
| 199 |
+
* Convert DSA structure (key or just parameters) into DH structure (be
|
| 200 |
+
* careful to avoid small subgroup attacks when using this!)
|
| 201 |
+
*/
|
| 202 |
+
OSSL_DEPRECATEDIN_3_0 DH *DSA_dup_DH(const DSA *r);
|
| 203 |
+
#endif
|
| 204 |
+
|
| 205 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
|
| 206 |
+
const BIGNUM **q, const BIGNUM **g);
|
| 207 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
| 208 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
|
| 209 |
+
const BIGNUM **priv_key);
|
| 210 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key,
|
| 211 |
+
BIGNUM *priv_key);
|
| 212 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_p(const DSA *d);
|
| 213 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_q(const DSA *d);
|
| 214 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_g(const DSA *d);
|
| 215 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_pub_key(const DSA *d);
|
| 216 |
+
OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_priv_key(const DSA *d);
|
| 217 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_clear_flags(DSA *d, int flags);
|
| 218 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_test_flags(const DSA *d, int flags);
|
| 219 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_set_flags(DSA *d, int flags);
|
| 220 |
+
OSSL_DEPRECATEDIN_3_0 ENGINE *DSA_get0_engine(DSA *d);
|
| 221 |
+
|
| 222 |
+
OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_new(const char *name, int flags);
|
| 223 |
+
OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
|
| 224 |
+
OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
|
| 225 |
+
OSSL_DEPRECATEDIN_3_0 const char *DSA_meth_get0_name(const DSA_METHOD *dsam);
|
| 226 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam,
|
| 227 |
+
const char *name);
|
| 228 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_get_flags(const DSA_METHOD *dsam);
|
| 229 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_flags(DSA_METHOD *dsam, int flags);
|
| 230 |
+
OSSL_DEPRECATEDIN_3_0 void *DSA_meth_get0_app_data(const DSA_METHOD *dsam);
|
| 231 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set0_app_data(DSA_METHOD *dsam,
|
| 232 |
+
void *app_data);
|
| 233 |
+
OSSL_DEPRECATEDIN_3_0 DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))(const unsigned char *, int, DSA *);
|
| 234 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam,
|
| 235 |
+
DSA_SIG *(*sign)(const unsigned char *, int, DSA *));
|
| 236 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))(DSA *, BN_CTX *, BIGNUM **, BIGNUM **);
|
| 237 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
|
| 238 |
+
int (*sign_setup)(DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
|
| 239 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_verify(const DSA_METHOD *dsam))(const unsigned char *, int, DSA_SIG *, DSA *);
|
| 240 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_verify(DSA_METHOD *dsam,
|
| 241 |
+
int (*verify)(const unsigned char *, int, DSA_SIG *, DSA *));
|
| 242 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))(DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
|
| 243 |
+
const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *);
|
| 244 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
|
| 245 |
+
int (*mod_exp)(DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
|
| 246 |
+
const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *,
|
| 247 |
+
BN_MONT_CTX *));
|
| 248 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))(DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
|
| 249 |
+
BN_CTX *, BN_MONT_CTX *);
|
| 250 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
|
| 251 |
+
int (*bn_mod_exp)(DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
|
| 252 |
+
const BIGNUM *, BN_CTX *, BN_MONT_CTX *));
|
| 253 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *);
|
| 254 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_init(DSA_METHOD *dsam,
|
| 255 |
+
int (*init)(DSA *));
|
| 256 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *);
|
| 257 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_finish(DSA_METHOD *dsam,
|
| 258 |
+
int (*finish)(DSA *));
|
| 259 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))(DSA *, int, const unsigned char *, int, int *, unsigned long *,
|
| 260 |
+
BN_GENCB *);
|
| 261 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_paramgen(DSA_METHOD *dsam,
|
| 262 |
+
int (*paramgen)(DSA *, int, const unsigned char *, int, int *,
|
| 263 |
+
unsigned long *, BN_GENCB *));
|
| 264 |
+
OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *);
|
| 265 |
+
OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_keygen(DSA_METHOD *dsam,
|
| 266 |
+
int (*keygen)(DSA *));
|
| 267 |
+
|
| 268 |
+
#endif
|
| 269 |
+
#endif
|
| 270 |
+
#ifdef __cplusplus
|
| 271 |
+
}
|
| 272 |
+
#endif
|
| 273 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/dsaerr.h
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Generated by util/mkerr.pl DO NOT EDIT
|
| 3 |
+
* Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 4 |
+
*
|
| 5 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 6 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 7 |
+
* in the file LICENSE in the source distribution or at
|
| 8 |
+
* https://www.openssl.org/source/license.html
|
| 9 |
+
*/
|
| 10 |
+
|
| 11 |
+
#ifndef OPENSSL_DSAERR_H
|
| 12 |
+
#define OPENSSL_DSAERR_H
|
| 13 |
+
#pragma once
|
| 14 |
+
|
| 15 |
+
#include <openssl/opensslconf.h>
|
| 16 |
+
#include <openssl/symhacks.h>
|
| 17 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
#ifndef OPENSSL_NO_DSA
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* DSA reason codes.
|
| 23 |
+
*/
|
| 24 |
+
#define DSA_R_BAD_FFC_PARAMETERS 114
|
| 25 |
+
#define DSA_R_BAD_Q_VALUE 102
|
| 26 |
+
#define DSA_R_BN_DECODE_ERROR 108
|
| 27 |
+
#define DSA_R_BN_ERROR 109
|
| 28 |
+
#define DSA_R_DECODE_ERROR 104
|
| 29 |
+
#define DSA_R_INVALID_DIGEST_TYPE 106
|
| 30 |
+
#define DSA_R_INVALID_PARAMETERS 112
|
| 31 |
+
#define DSA_R_MISSING_PARAMETERS 101
|
| 32 |
+
#define DSA_R_MISSING_PRIVATE_KEY 111
|
| 33 |
+
#define DSA_R_MODULUS_TOO_LARGE 103
|
| 34 |
+
#define DSA_R_NO_PARAMETERS_SET 107
|
| 35 |
+
#define DSA_R_PARAMETER_ENCODING_ERROR 105
|
| 36 |
+
#define DSA_R_P_NOT_PRIME 115
|
| 37 |
+
#define DSA_R_Q_NOT_PRIME 113
|
| 38 |
+
#define DSA_R_SEED_LEN_SMALL 110
|
| 39 |
+
#define DSA_R_TOO_MANY_RETRIES 116
|
| 40 |
+
|
| 41 |
+
#endif
|
| 42 |
+
#endif
|
micromamba_root/envs/hf_sync/Library/include/openssl/dtls1.h
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_DTLS1_H
|
| 11 |
+
#define OPENSSL_DTLS1_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_DTLS1_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/prov_ssl.h>
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
#include <openssl/opensslconf.h>
|
| 26 |
+
|
| 27 |
+
/* DTLS*_VERSION constants are defined in prov_ssl.h */
|
| 28 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 29 |
+
#define DTLS_MIN_VERSION DTLS1_VERSION
|
| 30 |
+
#define DTLS_MAX_VERSION DTLS1_2_VERSION
|
| 31 |
+
#endif
|
| 32 |
+
#define DTLS1_VERSION_MAJOR 0xFE
|
| 33 |
+
|
| 34 |
+
/* Special value for method supporting multiple versions */
|
| 35 |
+
#define DTLS_ANY_VERSION 0x1FFFF
|
| 36 |
+
|
| 37 |
+
/* lengths of messages */
|
| 38 |
+
|
| 39 |
+
#define DTLS1_COOKIE_LENGTH 255
|
| 40 |
+
|
| 41 |
+
#define DTLS1_RT_HEADER_LENGTH 13
|
| 42 |
+
|
| 43 |
+
#define DTLS1_HM_HEADER_LENGTH 12
|
| 44 |
+
|
| 45 |
+
#define DTLS1_H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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
#ifndef OPENSSL_E_OS2_H
|
| 11 |
+
#define OPENSSL_E_OS2_H
|
| 12 |
+
#pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/macros.h>
|
| 15 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
#define HEADER_E_OS2_H
|
| 17 |
+
#endif
|
| 18 |
+
|
| 19 |
+
#include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
#ifdef __cplusplus
|
| 22 |
+
extern "C" {
|
| 23 |
+
#endif
|
| 24 |
+
|
| 25 |
+
/******************************************************************************
|
| 26 |
+
* Detect operating systems. This probably needs completing.
|
| 27 |
+
* The result is that at least one OPENSSL_SYS_os macro should be defined.
|
| 28 |
+
* However, if none is defined, Unix is assumed.
|
| 29 |
+
**/
|
| 30 |
+
|
| 31 |
+
#define OPENSSL_SYS_UNIX
|
| 32 |
+
|
| 33 |
+
/* --------------------- Microsoft operating systems ---------------------- */
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* Note that MSDOS actually denotes 32-bit environments running on top of
|
| 37 |
+
* MS-DOS, such as DJGPP one.
|
| 38 |
+
*/
|
| 39 |
+
#if defined(OPENSSL_SYS_MSDOS)
|
| 40 |
+
#undef OPENSSL_SYS_UNIX
|
| 41 |
+
#endif
|
| 42 |
+
|
| 43 |
+
/*
|
| 44 |
+
* For 32 bit environment, there seems to be the CygWin environment and then
|
| 45 |
+
* all the others that try to do the same thing Microsoft does...
|
| 46 |
+
*/
|
| 47 |
+
/*
|
| 48 |
+
* UEFI lives here because it might be built with a Microsoft toolchain and
|
| 49 |
+
* we need to avoid the false positive match on Windows.
|
| 50 |
+
*/
|
| 51 |
+
#if defined(OPENSSL_SYS_UEFI)
|
| 52 |
+
#undef OPENSSL_SYS_UNIX
|
| 53 |
+
#elif defined(OPENSSL_SYS_UWIN)
|
| 54 |
+
#undef OPENSSL_SYS_UNIX
|
| 55 |
+
#define OPENSSL_SYS_WIN32_UWIN
|
| 56 |
+
#else
|
| 57 |
+
#if defined(__CYGWIN__) || defined(OPENSSL_SYS_CYGWIN)
|
| 58 |
+
#define OPENSSL_SYS_WIN32_CYGWIN
|
| 59 |
+
#else
|
| 60 |
+
#if defined(_WIN32) || defined(OPENSSL_SYS_WIN32)
|
| 61 |
+
#undef OPENSSL_SYS_UNIX
|
| 62 |
+
#if !defined(OPENSSL_SYS_WIN32)
|
| 63 |
+
#define OPENSSL_SYS_WIN32
|
| 64 |
+
#endif
|
| 65 |
+
#endif
|
| 66 |
+
#if defined(_WIN64) || defined(OPENSSL_SYS_WIN64)
|
| 67 |
+
#undef OPENSSL_SYS_UNIX
|
| 68 |
+
#if !defined(OPENSSL_SYS_WIN64)
|
| 69 |
+
#define OPENSSL_SYS_WIN64
|
| 70 |
+
#endif
|
| 71 |
+
#endif
|
| 72 |
+
#if defined(OPENSSL_SYS_WINNT)
|
| 73 |
+
#undef OPENSSL_SYS_UNIX
|
| 74 |
+
#endif
|
| 75 |
+
#if defined(OPENSSL_SYS_WINCE)
|
| 76 |
+
#undef OPENSSL_SYS_UNIX
|
| 77 |
+
#endif
|
| 78 |
+
#endif
|
| 79 |
+
#endif
|
| 80 |
+
|
| 81 |
+
/* Anything that tries to look like Microsoft is "Windows" */
|
| 82 |
+
#if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_WIN64) || defined(OPENSSL_SYS_WINNT) || defined(OPENSSL_SYS_WINCE)
|
| 83 |
+
#undef OPENSSL_SYS_UNIX
|
| 84 |
+
#define OPENSSL_SYS_WINDOWS
|
| 85 |
+
#ifndef OPENSSL_SYS_MSDOS
|
| 86 |
+
#define OPENSSL_SYS_MSDOS
|
| 87 |
+
#endif
|
| 88 |
+
#endif
|
| 89 |
+
|
| 90 |
+
/*
|
| 91 |
+
* DLL settings. This part is a bit tough, because it's up to the
|
| 92 |
+
* application implementer how he or she will link the application, so it
|
| 93 |
+
* requires some macro to be used.
|
| 94 |
+
*/
|
| 95 |
+
#ifdef OPENSSL_SYS_WINDOWS
|
| 96 |
+
#ifndef OPENSSL_OPT_WINDLL
|
| 97 |
+
#if defined(_WINDLL) /* This is used when building OpenSSL to \
|
| 98 |
+
* indicate that DLL linkage should be used */
|
| 99 |
+
#define OPENSSL_OPT_WINDLL
|
| 100 |
+
#endif
|
| 101 |
+
#endif
|
| 102 |
+
#endif
|
| 103 |
+
|
| 104 |
+
/* ------------------------------- OpenVMS -------------------------------- */
|
| 105 |
+
#if defined(__VMS) || defined(VMS)
|
| 106 |
+
#if !defined(OPENSSL_SYS_VMS)
|
| 107 |
+
#undef OPENSSL_SYS_UNIX
|
| 108 |
+
#define OPENSSL_SYS_VMS
|
| 109 |
+
#endif
|
| 110 |
+
#if defined(__DECC)
|
| 111 |
+
#define OPENSSL_SYS_VMS_DECC
|
| 112 |
+
#elif defined(__DECCXX)
|
| 113 |
+
#define OPENSSL_SYS_VMS_DECC
|
| 114 |
+
#define OPENSSL_SYS_VMS_DECCXX
|
| 115 |
+
#else
|
| 116 |
+
#define OPENSSL_SYS_VMS_NODECC
|
| 117 |
+
#endif
|
| 118 |
+
#endif
|
| 119 |
+
|
| 120 |
+
/* -------------------------------- Unix ---------------------------------- */
|
| 121 |
+
#ifdef OPENSSL_SYS_UNIX
|
| 122 |
+
#if defined(linux) || defined(__linux__) && !defined(OPENSSL_SYS_LINUX)
|
| 123 |
+
#define OPENSSL_SYS_LINUX
|
| 124 |
+
#endif
|
| 125 |
+
#if defined(_AIX) && !defined(OPENSSL_SYS_AIX)
|
| 126 |
+
#define OPENSSL_SYS_AIX
|
| 127 |
+
#endif
|
| 128 |
+
#endif
|
| 129 |
+
|
| 130 |
+
/* -------------------------------- VOS ----------------------------------- */
|
| 131 |
+
#if defined(__VOS__) && !defined(OPENSSL_SYS_VOS)
|
| 132 |
+
#define OPENSSL_SYS_VOS
|
| 133 |
+
#ifdef __HPPA__
|
| 134 |
+
#define OPENSSL_SYS_VOS_HPPA
|
| 135 |
+
#endif
|
| 136 |
+
#ifdef __IA32__
|
| 137 |
+
#define OPENSSL_SYS_VOS_IA32
|
| 138 |
+
#endif
|
| 139 |
+
#endif
|
| 140 |
+
|
| 141 |
+
/* ---------------------------- HP NonStop -------------------------------- */
|
| 142 |
+
#ifdef __TANDEM
|
| 143 |
+
#ifdef _STRING
|
| 144 |
+
#include <strings.h>
|
| 145 |
+
#endif
|
| 146 |
+
#define OPENSSL_USE_BUILD_DATE
|
| 147 |
+
#if defined(OPENSSL_THREADS) && defined(_SPT_MODEL_)
|
| 148 |
+
#define SPT_THREAD_SIGNAL 1
|
| 149 |
+
#define SPT_THREAD_AWARE 1
|
| 150 |
+
#include <spthread.h>
|
| 151 |
+
#elif defined(OPENSSL_THREADS) && defined(_PUT_MODEL_)
|
| 152 |
+
#include <pthread.h>
|
| 153 |
+
#endif
|
| 154 |
+
#endif
|
| 155 |
+
|
| 156 |
+
/**
|
| 157 |
+
* That's it for OS-specific stuff
|
| 158 |
+
*****************************************************************************/
|
| 159 |
+
|
| 160 |
+
/*-
|
| 161 |
+
* OPENSSL_EXTERN is normally used to declare a symbol with possible extra
|
| 162 |
+
* attributes to handle its presence in a shared library.
|
| 163 |
+
* OPENSSL_EXPORT is used to define a symbol with extra possible attributes
|
| 164 |
+
* to make it visible in a shared library.
|
| 165 |
+
* Care needs to be taken when a header file is used both to declare and
|
| 166 |
+
* define symbols. Basically, for any library that exports some global
|
| 167 |
+
* variables, the following code must be present in the header file that
|
| 168 |
+
* declares them, before OPENSSL_EXTERN is used:
|
| 169 |
+
*
|
| 170 |
+
* #ifdef SOME_BUILD_FLAG_MACRO
|
| 171 |
+
* # undef OPENSSL_EXTERN
|
| 172 |
+
* # define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 173 |
+
* #endif
|
| 174 |
+
*
|
| 175 |
+
* The default is to have OPENSSL_EXPORT and OPENSSL_EXTERN
|
| 176 |
+
* have some generally sensible values.
|
| 177 |
+
*/
|
| 178 |
+
|
| 179 |
+
#if defined(OPENSSL_SYS_WINDOWS) && defined(OPENSSL_OPT_WINDLL)
|
| 180 |
+
#define OPENSSL_EXPORT extern __declspec(dllexport)
|
| 181 |
+
#define OPENSSL_EXTERN extern __declspec(dllimport)
|
| 182 |
+
#else
|
| 183 |
+
#define OPENSSL_EXPORT extern
|
| 184 |
+
#define OPENSSL_EXTERN extern
|
| 185 |
+
#endif
|
| 186 |
+
|
| 187 |
+
#ifdef _WIN32
|
| 188 |
+
#ifdef _WIN64
|
| 189 |
+
#define ossl_ssize_t __int64
|
| 190 |
+
#define OSSL_SSIZE_MAX _I64_MAX
|
| 191 |
+
#else
|
| 192 |
+
#define ossl_ssize_t int
|
| 193 |
+
#define OSSL_SSIZE_MAX INT_MAX
|
| 194 |
+
#endif
|
| 195 |
+
#endif
|
| 196 |
+
|
| 197 |
+
#if defined(OPENSSL_SYS_UEFI) && !defined(ossl_ssize_t)
|
| 198 |
+
#define ossl_ssize_t INTN
|
| 199 |
+
#define OSSL_SSIZE_MAX MAX_INTN
|
| 200 |
+
#endif
|
| 201 |
+
|
| 202 |
+
#ifndef ossl_ssize_t
|
| 203 |
+
#include <sys/types.h>
|
| 204 |
+
#define ossl_ssize_t ssize_t
|
| 205 |
+
#if defined(SSIZE_MAX)
|
| 206 |
+
#define OSSL_SSIZE_MAX SSIZE_MAX
|
| 207 |
+
#elif defined(_POSIX_SSIZE_MAX)
|
| 208 |
+
#define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
|
| 209 |
+
#else
|
| 210 |
+
#define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX >> 1))
|
| 211 |
+
#endif
|
| 212 |
+
#endif
|
| 213 |
+
|
| 214 |
+
#if defined(UNUSEDRESULT_DEBUG)
|
| 215 |
+
#define __owur __attribute__((__warn_unused_result__))
|
| 216 |
+
#else
|
| 217 |
+
#define __owur
|
| 218 |
+
#endif
|
| 219 |
+
|
| 220 |
+
/* Standard integer types */
|
| 221 |
+
#define OPENSSL_NO_INTTYPES_H
|
| 222 |
+
#define OPENSSL_NO_STDINT_H
|
| 223 |
+
#if defined(OPENSSL_SYS_UEFI)
|
| 224 |
+
typedef INT8 int8_t;
|
| 225 |
+
typedef UINT8 uint8_t;
|
| 226 |
+
typedef INT16 int16_t;
|
| 227 |
+
typedef UINT16 uint16_t;
|
| 228 |
+
typedef INT32 int32_t;
|
| 229 |
+
typedef UINT32 uint32_t;
|
| 230 |
+
typedef INT64 int64_t;
|
| 231 |
+
typedef UINT64 uint64_t;
|
| 232 |
+
typedef UINTN uintptr_t;
|
| 233 |
+
#elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || defined(__osf__) || defined(__sgi) || defined(__hpux) || defined(OPENSSL_SYS_VMS) || defined(__OpenBSD__)
|
| 234 |
+
#include <inttypes.h>
|
| 235 |
+
#undef OPENSSL_NO_INTTYPES_H
|
| 236 |
+
/* Because the specs say that inttypes.h includes stdint.h if present */
|
| 237 |
+
#undef OPENSSL_NO_STDINT_H
|
| 238 |
+
#elif defined(_MSC_VER) && _MSC_VER < 1600
|
| 239 |
+
/*
|
| 240 |
+
* minimally required typdefs for systems not supporting inttypes.h or
|
| 241 |
+
* stdint.h: currently just older VC++
|
| 242 |
+
*/
|
| 243 |
+
typedef signed char int8_t;
|
| 244 |
+
typedef unsigned char uint8_t;
|
| 245 |
+
typedef short int16_t;
|
| 246 |
+
typedef unsigned short uint16_t;
|
| 247 |
+
typedef int int32_t;
|
| 248 |
+
typedef unsigned int uint32_t;
|
| 249 |
+
typedef __int64 int64_t;
|
| 250 |
+
typedef unsigned __int64 uint64_t;
|
| 251 |
+
#elif defined(OPENSSL_SYS_TANDEM)
|
| 252 |
+
#include <stdint.h>
|
| 253 |
+
#include <sys/types.h>
|
| 254 |
+
#else
|
| 255 |
+
#include <stdint.h>
|
| 256 |
+
#undef OPENSSL_NO_STDINT_H
|
| 257 |
+
#endif
|
| 258 |
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && defined(INTMAX_MAX) && defined(UINTMAX_MAX)
|
| 259 |
+
typedef intmax_t ossl_intmax_t;
|
| 260 |
+
typedef uintmax_t ossl_uintmax_t;
|
| 261 |
+
#else
|
| 262 |
+
/* Fall back to the largest we know we require and can handle */
|
| 263 |
+
typedef int64_t ossl_intmax_t;
|
| 264 |
+
typedef uint64_t ossl_uintmax_t;
|
| 265 |
+
#endif
|
| 266 |
+
|
| 267 |
+
/* ossl_inline: portable inline definition usable in public headers */
|
| 268 |
+
#if !defined(inline) && !defined(__cplusplus)
|
| 269 |
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
|
| 270 |
+
/* just use inline */
|
| 271 |
+
#define ossl_inline inline
|
| 272 |
+
#elif defined(__GNUC__) && __GNUC__ >= 2
|
| 273 |
+
#define ossl_inline __inline__
|
| 274 |
+
#elif defined(_MSC_VER)
|
| 275 |
+
/*
|
| 276 |
+
* Visual Studio: inline is available in C++ only, however
|
| 277 |
+
* __inline is available for C, see
|
| 278 |
+
* http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx
|
| 279 |
+
*/
|
| 280 |
+
#define ossl_inline __inline
|
| 281 |
+
#else
|
| 282 |
+
#define ossl_inline
|
| 283 |
+
#endif
|
| 284 |
+
#else
|
| 285 |
+
#define ossl_inline inline
|
| 286 |
+
#endif
|
| 287 |
+
|
| 288 |
+
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && !defined(__cplusplus)
|
| 289 |
+
#define ossl_noreturn _Noreturn
|
| 290 |
+
#elif defined(__GNUC__) && __GNUC__ >= 2
|
| 291 |
+
#define ossl_noreturn __attribute__((noreturn))
|
| 292 |
+
#else
|
| 293 |
+
#define ossl_noreturn
|
| 294 |
+
#endif
|
| 295 |
+
|
| 296 |
+
/* ossl_unused: portable unused attribute for use in public headers */
|
| 297 |
+
#if defined(__GNUC__)
|
| 298 |
+
#define ossl_unused __attribute__((unused))
|
| 299 |
+
#else
|
| 300 |
+
#define ossl_unused
|
| 301 |
+
#endif
|
| 302 |
+
|
| 303 |
+
#ifdef __cplusplus
|
| 304 |
+
}
|
| 305 |
+
#endif
|
| 306 |
+
#endif
|