Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- llava_next/include/openssl/bn.h +583 -0
- llava_next/include/openssl/buffererr.h +25 -0
- llava_next/include/openssl/cmp.h +597 -0
- llava_next/include/openssl/core_object.h +41 -0
- llava_next/include/openssl/cryptoerr.h +46 -0
- llava_next/include/openssl/des.h +211 -0
- llava_next/include/openssl/dsaerr.h +44 -0
- llava_next/include/openssl/e_os2.h +305 -0
- llava_next/include/openssl/ecdsa.h +10 -0
- llava_next/include/openssl/ess.h +128 -0
- llava_next/include/openssl/esserr.h +32 -0
- llava_next/include/openssl/evp.h +0 -0
- llava_next/include/openssl/kdferr.h +16 -0
- llava_next/include/openssl/macros.h +304 -0
- llava_next/include/openssl/md4.h +63 -0
- llava_next/include/openssl/ocsp.h +483 -0
- llava_next/include/openssl/params.h +160 -0
- llava_next/include/openssl/pkcs12err.h +45 -0
- llava_next/include/openssl/provider.h +60 -0
- llava_next/include/openssl/rand.h +123 -0
- llava_next/include/openssl/randerr.h +68 -0
- llava_next/include/openssl/rc5.h +79 -0
- llava_next/include/openssl/rsaerr.h +107 -0
- llava_next/include/openssl/ssl3.h +347 -0
- llava_next/include/openssl/store.h +369 -0
- llava_next/include/openssl/storeerr.h +49 -0
- llava_next/include/openssl/tls1.h +1225 -0
- llava_next/include/openssl/txt_db.h +63 -0
- llava_next/include/openssl/types.h +236 -0
- llava_next/include/python3.10/cpython/abstract.h +373 -0
- llava_next/include/python3.10/cpython/bytearrayobject.h +20 -0
- llava_next/include/python3.10/cpython/frameobject.h +94 -0
- llava_next/include/python3.10/cpython/initconfig.h +249 -0
- llava_next/include/python3.10/cpython/objimpl.h +100 -0
- llava_next/include/python3.10/cpython/odictobject.h +43 -0
- llava_next/include/python3.10/cpython/picklebufobject.h +31 -0
- llava_next/include/python3.10/cpython/pylifecycle.h +64 -0
- llava_next/include/python3.10/cpython/pythonrun.h +121 -0
- llava_next/include/python3.10/internal/pycore_asdl.h +112 -0
- llava_next/include/python3.10/internal/pycore_ceval.h +114 -0
- llava_next/include/python3.10/internal/pycore_compile.h +44 -0
- llava_next/include/python3.10/internal/pycore_condvar.h +95 -0
- llava_next/include/python3.10/internal/pycore_format.h +27 -0
- llava_next/include/python3.10/internal/pycore_gc.h +181 -0
- llava_next/include/python3.10/internal/pycore_getopt.h +22 -0
- llava_next/include/python3.10/internal/pycore_gil.h +50 -0
- llava_next/include/python3.10/internal/pycore_hamt.h +128 -0
- llava_next/include/python3.10/internal/pycore_hashtable.h +148 -0
- llava_next/include/python3.10/internal/pycore_import.h +17 -0
- llava_next/include/python3.10/internal/pycore_initconfig.h +178 -0
llava_next/include/openssl/bn.h
ADDED
|
@@ -0,0 +1,583 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2021 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 : \
|
| 180 |
+
(b) >= 1345 ? 4 : \
|
| 181 |
+
(b) >= 476 ? 5 : \
|
| 182 |
+
(b) >= 400 ? 6 : \
|
| 183 |
+
(b) >= 347 ? 7 : \
|
| 184 |
+
(b) >= 308 ? 8 : \
|
| 185 |
+
(b) >= 55 ? 27 : \
|
| 186 |
+
/* b >= 6 */ 34)
|
| 187 |
+
# endif
|
| 188 |
+
|
| 189 |
+
# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
|
| 190 |
+
|
| 191 |
+
int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 192 |
+
int BN_is_zero(const BIGNUM *a);
|
| 193 |
+
int BN_is_one(const BIGNUM *a);
|
| 194 |
+
int BN_is_word(const BIGNUM *a, const BN_ULONG w);
|
| 195 |
+
int BN_is_odd(const BIGNUM *a);
|
| 196 |
+
|
| 197 |
+
# define BN_one(a) (BN_set_word((a),1))
|
| 198 |
+
|
| 199 |
+
void BN_zero_ex(BIGNUM *a);
|
| 200 |
+
|
| 201 |
+
# if OPENSSL_API_LEVEL > 908
|
| 202 |
+
# define BN_zero(a) BN_zero_ex(a)
|
| 203 |
+
# else
|
| 204 |
+
# define BN_zero(a) (BN_set_word((a),0))
|
| 205 |
+
# endif
|
| 206 |
+
|
| 207 |
+
const BIGNUM *BN_value_one(void);
|
| 208 |
+
char *BN_options(void);
|
| 209 |
+
BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
|
| 210 |
+
BN_CTX *BN_CTX_new(void);
|
| 211 |
+
BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
|
| 212 |
+
BN_CTX *BN_CTX_secure_new(void);
|
| 213 |
+
void BN_CTX_free(BN_CTX *c);
|
| 214 |
+
void BN_CTX_start(BN_CTX *ctx);
|
| 215 |
+
BIGNUM *BN_CTX_get(BN_CTX *ctx);
|
| 216 |
+
void BN_CTX_end(BN_CTX *ctx);
|
| 217 |
+
int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 218 |
+
unsigned int strength, BN_CTX *ctx);
|
| 219 |
+
int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 220 |
+
int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
|
| 221 |
+
unsigned int strength, BN_CTX *ctx);
|
| 222 |
+
int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 223 |
+
int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
|
| 224 |
+
BN_CTX *ctx);
|
| 225 |
+
int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 226 |
+
int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
|
| 227 |
+
unsigned int strength, BN_CTX *ctx);
|
| 228 |
+
int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 229 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 230 |
+
OSSL_DEPRECATEDIN_3_0
|
| 231 |
+
int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 232 |
+
OSSL_DEPRECATEDIN_3_0
|
| 233 |
+
int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
|
| 234 |
+
# endif
|
| 235 |
+
int BN_num_bits(const BIGNUM *a);
|
| 236 |
+
int BN_num_bits_word(BN_ULONG l);
|
| 237 |
+
int BN_security_bits(int L, int N);
|
| 238 |
+
BIGNUM *BN_new(void);
|
| 239 |
+
BIGNUM *BN_secure_new(void);
|
| 240 |
+
void BN_clear_free(BIGNUM *a);
|
| 241 |
+
BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);
|
| 242 |
+
void BN_swap(BIGNUM *a, BIGNUM *b);
|
| 243 |
+
BIGNUM *BN_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 |
+
BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 247 |
+
int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 248 |
+
BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 249 |
+
int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
|
| 250 |
+
BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
|
| 251 |
+
int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
|
| 252 |
+
int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 253 |
+
int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 254 |
+
int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 255 |
+
int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 256 |
+
int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 257 |
+
int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);
|
| 258 |
+
/** BN_set_negative sets sign of a BIGNUM
|
| 259 |
+
* \param b pointer to the BIGNUM object
|
| 260 |
+
* \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise
|
| 261 |
+
*/
|
| 262 |
+
void BN_set_negative(BIGNUM *b, int n);
|
| 263 |
+
/** BN_is_negative returns 1 if the BIGNUM is negative
|
| 264 |
+
* \param b pointer to the BIGNUM object
|
| 265 |
+
* \return 1 if a < 0 and 0 otherwise
|
| 266 |
+
*/
|
| 267 |
+
int BN_is_negative(const BIGNUM *b);
|
| 268 |
+
|
| 269 |
+
int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d,
|
| 270 |
+
BN_CTX *ctx);
|
| 271 |
+
# define BN_mod(rem,m,d,ctx) BN_div(NULL,(rem),(m),(d),(ctx))
|
| 272 |
+
int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);
|
| 273 |
+
int BN_mod_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 274 |
+
BN_CTX *ctx);
|
| 275 |
+
int BN_mod_add_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 276 |
+
const BIGNUM *m);
|
| 277 |
+
int BN_mod_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 278 |
+
BN_CTX *ctx);
|
| 279 |
+
int BN_mod_sub_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 280 |
+
const BIGNUM *m);
|
| 281 |
+
int BN_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *m,
|
| 282 |
+
BN_CTX *ctx);
|
| 283 |
+
int BN_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 284 |
+
int BN_mod_lshift1(BIGNUM *r, const BIGNUM *a, const BIGNUM *m, BN_CTX *ctx);
|
| 285 |
+
int BN_mod_lshift1_quick(BIGNUM *r, const BIGNUM *a, const BIGNUM *m);
|
| 286 |
+
int BN_mod_lshift(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m,
|
| 287 |
+
BN_CTX *ctx);
|
| 288 |
+
int BN_mod_lshift_quick(BIGNUM *r, const BIGNUM *a, int n, const BIGNUM *m);
|
| 289 |
+
|
| 290 |
+
BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
| 291 |
+
BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);
|
| 292 |
+
int BN_mul_word(BIGNUM *a, BN_ULONG w);
|
| 293 |
+
int BN_add_word(BIGNUM *a, BN_ULONG w);
|
| 294 |
+
int BN_sub_word(BIGNUM *a, BN_ULONG w);
|
| 295 |
+
int BN_set_word(BIGNUM *a, BN_ULONG w);
|
| 296 |
+
BN_ULONG BN_get_word(const BIGNUM *a);
|
| 297 |
+
|
| 298 |
+
int BN_cmp(const BIGNUM *a, const BIGNUM *b);
|
| 299 |
+
void BN_free(BIGNUM *a);
|
| 300 |
+
int BN_is_bit_set(const BIGNUM *a, int n);
|
| 301 |
+
int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 302 |
+
int BN_lshift1(BIGNUM *r, const BIGNUM *a);
|
| 303 |
+
int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 304 |
+
|
| 305 |
+
int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 306 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 307 |
+
int BN_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 308 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 309 |
+
int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p,
|
| 310 |
+
const BIGNUM *m, BN_CTX *ctx,
|
| 311 |
+
BN_MONT_CTX *in_mont);
|
| 312 |
+
int BN_mod_exp_mont_word(BIGNUM *r, BN_ULONG a, const BIGNUM *p,
|
| 313 |
+
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 314 |
+
int BN_mod_exp2_mont(BIGNUM *r, const BIGNUM *a1, const BIGNUM *p1,
|
| 315 |
+
const BIGNUM *a2, const BIGNUM *p2, const BIGNUM *m,
|
| 316 |
+
BN_CTX *ctx, BN_MONT_CTX *m_ctx);
|
| 317 |
+
int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 318 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 319 |
+
int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1,
|
| 320 |
+
const BIGNUM *m1, BN_MONT_CTX *in_mont1,
|
| 321 |
+
BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2,
|
| 322 |
+
const BIGNUM *m2, BN_MONT_CTX *in_mont2,
|
| 323 |
+
BN_CTX *ctx);
|
| 324 |
+
|
| 325 |
+
int BN_mask_bits(BIGNUM *a, int n);
|
| 326 |
+
# ifndef OPENSSL_NO_STDIO
|
| 327 |
+
int BN_print_fp(FILE *fp, const BIGNUM *a);
|
| 328 |
+
# endif
|
| 329 |
+
int BN_print(BIO *bio, const BIGNUM *a);
|
| 330 |
+
int BN_reciprocal(BIGNUM *r, const BIGNUM *m, int len, BN_CTX *ctx);
|
| 331 |
+
int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);
|
| 332 |
+
int BN_rshift1(BIGNUM *r, const BIGNUM *a);
|
| 333 |
+
void BN_clear(BIGNUM *a);
|
| 334 |
+
BIGNUM *BN_dup(const BIGNUM *a);
|
| 335 |
+
int BN_ucmp(const BIGNUM *a, const BIGNUM *b);
|
| 336 |
+
int BN_set_bit(BIGNUM *a, int n);
|
| 337 |
+
int BN_clear_bit(BIGNUM *a, int n);
|
| 338 |
+
char *BN_bn2hex(const BIGNUM *a);
|
| 339 |
+
char *BN_bn2dec(const BIGNUM *a);
|
| 340 |
+
int BN_hex2bn(BIGNUM **a, const char *str);
|
| 341 |
+
int BN_dec2bn(BIGNUM **a, const char *str);
|
| 342 |
+
int BN_asc2bn(BIGNUM **a, const char *str);
|
| 343 |
+
int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);
|
| 344 |
+
int BN_kronecker(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx); /* returns
|
| 345 |
+
* -2 for
|
| 346 |
+
* error */
|
| 347 |
+
BIGNUM *BN_mod_inverse(BIGNUM *ret,
|
| 348 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 349 |
+
BIGNUM *BN_mod_sqrt(BIGNUM *ret,
|
| 350 |
+
const BIGNUM *a, const BIGNUM *n, BN_CTX *ctx);
|
| 351 |
+
|
| 352 |
+
void BN_consttime_swap(BN_ULONG swap, BIGNUM *a, BIGNUM *b, int nwords);
|
| 353 |
+
|
| 354 |
+
/* Deprecated versions */
|
| 355 |
+
# ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 356 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 357 |
+
BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe,
|
| 358 |
+
const BIGNUM *add, const BIGNUM *rem,
|
| 359 |
+
void (*callback) (int, int, void *),
|
| 360 |
+
void *cb_arg);
|
| 361 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 362 |
+
int BN_is_prime(const BIGNUM *p, int nchecks,
|
| 363 |
+
void (*callback) (int, int, void *),
|
| 364 |
+
BN_CTX *ctx, void *cb_arg);
|
| 365 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 366 |
+
int BN_is_prime_fasttest(const BIGNUM *p, int nchecks,
|
| 367 |
+
void (*callback) (int, int, void *),
|
| 368 |
+
BN_CTX *ctx, void *cb_arg,
|
| 369 |
+
int do_trial_division);
|
| 370 |
+
# endif
|
| 371 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 372 |
+
OSSL_DEPRECATEDIN_3_0
|
| 373 |
+
int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
|
| 374 |
+
OSSL_DEPRECATEDIN_3_0
|
| 375 |
+
int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
| 376 |
+
int do_trial_division, BN_GENCB *cb);
|
| 377 |
+
# endif
|
| 378 |
+
/* Newer versions */
|
| 379 |
+
int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
| 380 |
+
const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
|
| 381 |
+
BN_CTX *ctx);
|
| 382 |
+
int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
|
| 383 |
+
const BIGNUM *rem, BN_GENCB *cb);
|
| 384 |
+
int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
|
| 385 |
+
|
| 386 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 387 |
+
OSSL_DEPRECATEDIN_3_0
|
| 388 |
+
int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
|
| 389 |
+
|
| 390 |
+
OSSL_DEPRECATEDIN_3_0
|
| 391 |
+
int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
|
| 392 |
+
const BIGNUM *Xp, const BIGNUM *Xp1,
|
| 393 |
+
const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
|
| 394 |
+
BN_GENCB *cb);
|
| 395 |
+
OSSL_DEPRECATEDIN_3_0
|
| 396 |
+
int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
|
| 397 |
+
BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
|
| 398 |
+
BN_CTX *ctx, BN_GENCB *cb);
|
| 399 |
+
# endif
|
| 400 |
+
|
| 401 |
+
BN_MONT_CTX *BN_MONT_CTX_new(void);
|
| 402 |
+
int BN_mod_mul_montgomery(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 403 |
+
BN_MONT_CTX *mont, BN_CTX *ctx);
|
| 404 |
+
int BN_to_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 405 |
+
BN_CTX *ctx);
|
| 406 |
+
int BN_from_montgomery(BIGNUM *r, const BIGNUM *a, BN_MONT_CTX *mont,
|
| 407 |
+
BN_CTX *ctx);
|
| 408 |
+
void BN_MONT_CTX_free(BN_MONT_CTX *mont);
|
| 409 |
+
int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx);
|
| 410 |
+
BN_MONT_CTX *BN_MONT_CTX_copy(BN_MONT_CTX *to, BN_MONT_CTX *from);
|
| 411 |
+
BN_MONT_CTX *BN_MONT_CTX_set_locked(BN_MONT_CTX **pmont, CRYPTO_RWLOCK *lock,
|
| 412 |
+
const BIGNUM *mod, BN_CTX *ctx);
|
| 413 |
+
|
| 414 |
+
/* BN_BLINDING flags */
|
| 415 |
+
# define BN_BLINDING_NO_UPDATE 0x00000001
|
| 416 |
+
# define BN_BLINDING_NO_RECREATE 0x00000002
|
| 417 |
+
|
| 418 |
+
BN_BLINDING *BN_BLINDING_new(const BIGNUM *A, const BIGNUM *Ai, BIGNUM *mod);
|
| 419 |
+
void BN_BLINDING_free(BN_BLINDING *b);
|
| 420 |
+
int BN_BLINDING_update(BN_BLINDING *b, BN_CTX *ctx);
|
| 421 |
+
int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 422 |
+
int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx);
|
| 423 |
+
int BN_BLINDING_convert_ex(BIGNUM *n, BIGNUM *r, BN_BLINDING *b, BN_CTX *);
|
| 424 |
+
int BN_BLINDING_invert_ex(BIGNUM *n, const BIGNUM *r, BN_BLINDING *b,
|
| 425 |
+
BN_CTX *);
|
| 426 |
+
|
| 427 |
+
int BN_BLINDING_is_current_thread(BN_BLINDING *b);
|
| 428 |
+
void BN_BLINDING_set_current_thread(BN_BLINDING *b);
|
| 429 |
+
int BN_BLINDING_lock(BN_BLINDING *b);
|
| 430 |
+
int BN_BLINDING_unlock(BN_BLINDING *b);
|
| 431 |
+
|
| 432 |
+
unsigned long BN_BLINDING_get_flags(const BN_BLINDING *);
|
| 433 |
+
void BN_BLINDING_set_flags(BN_BLINDING *, unsigned long);
|
| 434 |
+
BN_BLINDING *BN_BLINDING_create_param(BN_BLINDING *b,
|
| 435 |
+
const BIGNUM *e, BIGNUM *m, BN_CTX *ctx,
|
| 436 |
+
int (*bn_mod_exp) (BIGNUM *r,
|
| 437 |
+
const BIGNUM *a,
|
| 438 |
+
const BIGNUM *p,
|
| 439 |
+
const BIGNUM *m,
|
| 440 |
+
BN_CTX *ctx,
|
| 441 |
+
BN_MONT_CTX *m_ctx),
|
| 442 |
+
BN_MONT_CTX *m_ctx);
|
| 443 |
+
# ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
| 444 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 445 |
+
void BN_set_params(int mul, int high, int low, int mont);
|
| 446 |
+
OSSL_DEPRECATEDIN_0_9_8
|
| 447 |
+
int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
|
| 448 |
+
# endif
|
| 449 |
+
|
| 450 |
+
BN_RECP_CTX *BN_RECP_CTX_new(void);
|
| 451 |
+
void BN_RECP_CTX_free(BN_RECP_CTX *recp);
|
| 452 |
+
int BN_RECP_CTX_set(BN_RECP_CTX *recp, const BIGNUM *rdiv, BN_CTX *ctx);
|
| 453 |
+
int BN_mod_mul_reciprocal(BIGNUM *r, const BIGNUM *x, const BIGNUM *y,
|
| 454 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 455 |
+
int BN_mod_exp_recp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 456 |
+
const BIGNUM *m, BN_CTX *ctx);
|
| 457 |
+
int BN_div_recp(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m,
|
| 458 |
+
BN_RECP_CTX *recp, BN_CTX *ctx);
|
| 459 |
+
|
| 460 |
+
# ifndef OPENSSL_NO_EC2M
|
| 461 |
+
|
| 462 |
+
/*
|
| 463 |
+
* Functions for arithmetic over binary polynomials represented by BIGNUMs.
|
| 464 |
+
* The BIGNUM::neg property of BIGNUMs representing binary polynomials is
|
| 465 |
+
* ignored. Note that input arguments are not const so that their bit arrays
|
| 466 |
+
* can be expanded to the appropriate size if needed.
|
| 467 |
+
*/
|
| 468 |
+
|
| 469 |
+
/*
|
| 470 |
+
* r = a + b
|
| 471 |
+
*/
|
| 472 |
+
int BN_GF2m_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);
|
| 473 |
+
# define BN_GF2m_sub(r, a, b) BN_GF2m_add(r, a, b)
|
| 474 |
+
/*
|
| 475 |
+
* r=a mod p
|
| 476 |
+
*/
|
| 477 |
+
int BN_GF2m_mod(BIGNUM *r, const BIGNUM *a, const BIGNUM *p);
|
| 478 |
+
/* r = (a * b) mod p */
|
| 479 |
+
int BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 480 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 481 |
+
/* r = (a * a) mod p */
|
| 482 |
+
int BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 483 |
+
/* r = (1 / b) mod p */
|
| 484 |
+
int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *b, const BIGNUM *p, BN_CTX *ctx);
|
| 485 |
+
/* r = (a / b) mod p */
|
| 486 |
+
int BN_GF2m_mod_div(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 487 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 488 |
+
/* r = (a ^ b) mod p */
|
| 489 |
+
int BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 490 |
+
const BIGNUM *p, BN_CTX *ctx);
|
| 491 |
+
/* r = sqrt(a) mod p */
|
| 492 |
+
int BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 493 |
+
BN_CTX *ctx);
|
| 494 |
+
/* r^2 + r = a mod p */
|
| 495 |
+
int BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
|
| 496 |
+
BN_CTX *ctx);
|
| 497 |
+
# define BN_GF2m_cmp(a, b) BN_ucmp((a), (b))
|
| 498 |
+
/*-
|
| 499 |
+
* Some functions allow for representation of the irreducible polynomials
|
| 500 |
+
* as an unsigned int[], say p. The irreducible f(t) is then of the form:
|
| 501 |
+
* t^p[0] + t^p[1] + ... + t^p[k]
|
| 502 |
+
* where m = p[0] > p[1] > ... > p[k] = 0.
|
| 503 |
+
*/
|
| 504 |
+
/* r = a mod p */
|
| 505 |
+
int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const int p[]);
|
| 506 |
+
/* r = (a * b) mod p */
|
| 507 |
+
int BN_GF2m_mod_mul_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 508 |
+
const int p[], BN_CTX *ctx);
|
| 509 |
+
/* r = (a * a) mod p */
|
| 510 |
+
int BN_GF2m_mod_sqr_arr(BIGNUM *r, const BIGNUM *a, const int p[],
|
| 511 |
+
BN_CTX *ctx);
|
| 512 |
+
/* r = (1 / b) mod p */
|
| 513 |
+
int BN_GF2m_mod_inv_arr(BIGNUM *r, const BIGNUM *b, const int p[],
|
| 514 |
+
BN_CTX *ctx);
|
| 515 |
+
/* r = (a / b) mod p */
|
| 516 |
+
int BN_GF2m_mod_div_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 517 |
+
const int p[], BN_CTX *ctx);
|
| 518 |
+
/* r = (a ^ b) mod p */
|
| 519 |
+
int BN_GF2m_mod_exp_arr(BIGNUM *r, const BIGNUM *a, const BIGNUM *b,
|
| 520 |
+
const int p[], BN_CTX *ctx);
|
| 521 |
+
/* r = sqrt(a) mod p */
|
| 522 |
+
int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a,
|
| 523 |
+
const int p[], BN_CTX *ctx);
|
| 524 |
+
/* r^2 + r = a mod p */
|
| 525 |
+
int BN_GF2m_mod_solve_quad_arr(BIGNUM *r, const BIGNUM *a,
|
| 526 |
+
const int p[], BN_CTX *ctx);
|
| 527 |
+
int BN_GF2m_poly2arr(const BIGNUM *a, int p[], int max);
|
| 528 |
+
int BN_GF2m_arr2poly(const int p[], BIGNUM *a);
|
| 529 |
+
|
| 530 |
+
# endif
|
| 531 |
+
|
| 532 |
+
/*
|
| 533 |
+
* faster mod functions for the 'NIST primes' 0 <= a < p^2
|
| 534 |
+
*/
|
| 535 |
+
int BN_nist_mod_192(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 536 |
+
int BN_nist_mod_224(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 537 |
+
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 538 |
+
int BN_nist_mod_384(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 539 |
+
int BN_nist_mod_521(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);
|
| 540 |
+
|
| 541 |
+
const BIGNUM *BN_get0_nist_prime_192(void);
|
| 542 |
+
const BIGNUM *BN_get0_nist_prime_224(void);
|
| 543 |
+
const BIGNUM *BN_get0_nist_prime_256(void);
|
| 544 |
+
const BIGNUM *BN_get0_nist_prime_384(void);
|
| 545 |
+
const BIGNUM *BN_get0_nist_prime_521(void);
|
| 546 |
+
|
| 547 |
+
int (*BN_nist_mod_func(const BIGNUM *p)) (BIGNUM *r, const BIGNUM *a,
|
| 548 |
+
const BIGNUM *field, BN_CTX *ctx);
|
| 549 |
+
|
| 550 |
+
int BN_generate_dsa_nonce(BIGNUM *out, const BIGNUM *range,
|
| 551 |
+
const BIGNUM *priv, const unsigned char *message,
|
| 552 |
+
size_t message_len, BN_CTX *ctx);
|
| 553 |
+
|
| 554 |
+
/* Primes from RFC 2409 */
|
| 555 |
+
BIGNUM *BN_get_rfc2409_prime_768(BIGNUM *bn);
|
| 556 |
+
BIGNUM *BN_get_rfc2409_prime_1024(BIGNUM *bn);
|
| 557 |
+
|
| 558 |
+
/* Primes from RFC 3526 */
|
| 559 |
+
BIGNUM *BN_get_rfc3526_prime_1536(BIGNUM *bn);
|
| 560 |
+
BIGNUM *BN_get_rfc3526_prime_2048(BIGNUM *bn);
|
| 561 |
+
BIGNUM *BN_get_rfc3526_prime_3072(BIGNUM *bn);
|
| 562 |
+
BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
|
| 563 |
+
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
|
| 564 |
+
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
|
| 565 |
+
|
| 566 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 567 |
+
# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
| 568 |
+
# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
| 569 |
+
# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
| 570 |
+
# define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
|
| 571 |
+
# define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
|
| 572 |
+
# define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
|
| 573 |
+
# define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
|
| 574 |
+
# define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
|
| 575 |
+
# endif
|
| 576 |
+
|
| 577 |
+
int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
|
| 578 |
+
|
| 579 |
+
|
| 580 |
+
# ifdef __cplusplus
|
| 581 |
+
}
|
| 582 |
+
# endif
|
| 583 |
+
#endif
|
llava_next/include/openssl/buffererr.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 21 |
+
/*
|
| 22 |
+
* BUF reason codes.
|
| 23 |
+
*/
|
| 24 |
+
|
| 25 |
+
#endif
|
llava_next/include/openssl/cmp.h
ADDED
|
@@ -0,0 +1,597 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cmp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2007-2023 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 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMP_H
|
| 18 |
+
# define OPENSSL_CMP_H
|
| 19 |
+
|
| 20 |
+
# include <openssl/opensslconf.h>
|
| 21 |
+
# ifndef OPENSSL_NO_CMP
|
| 22 |
+
|
| 23 |
+
# include <openssl/crmf.h>
|
| 24 |
+
# include <openssl/cmperr.h>
|
| 25 |
+
# include <openssl/cmp_util.h>
|
| 26 |
+
# include <openssl/http.h>
|
| 27 |
+
|
| 28 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 29 |
+
# include <openssl/types.h>
|
| 30 |
+
# include <openssl/safestack.h>
|
| 31 |
+
# include <openssl/x509.h>
|
| 32 |
+
# include <openssl/x509v3.h>
|
| 33 |
+
|
| 34 |
+
# ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
# endif
|
| 37 |
+
|
| 38 |
+
# define OSSL_CMP_PVNO 2
|
| 39 |
+
|
| 40 |
+
/*-
|
| 41 |
+
* PKIFailureInfo ::= BIT STRING {
|
| 42 |
+
* -- since we can fail in more than one way!
|
| 43 |
+
* -- More codes may be added in the future if/when required.
|
| 44 |
+
* badAlg (0),
|
| 45 |
+
* -- unrecognized or unsupported Algorithm Identifier
|
| 46 |
+
* badMessageCheck (1),
|
| 47 |
+
* -- integrity check failed (e.g., signature did not verify)
|
| 48 |
+
* badRequest (2),
|
| 49 |
+
* -- transaction not permitted or supported
|
| 50 |
+
* badTime (3),
|
| 51 |
+
* -- messageTime was not sufficiently close to the system time,
|
| 52 |
+
* -- as defined by local policy
|
| 53 |
+
* badCertId (4),
|
| 54 |
+
* -- no certificate could be found matching the provided criteria
|
| 55 |
+
* badDataFormat (5),
|
| 56 |
+
* -- the data submitted has the wrong format
|
| 57 |
+
* wrongAuthority (6),
|
| 58 |
+
* -- the authority indicated in the request is different from the
|
| 59 |
+
* -- one creating the response token
|
| 60 |
+
* incorrectData (7),
|
| 61 |
+
* -- the requester's data is incorrect (for notary services)
|
| 62 |
+
* missingTimeStamp (8),
|
| 63 |
+
* -- when the timestamp is missing but should be there
|
| 64 |
+
* -- (by policy)
|
| 65 |
+
* badPOP (9),
|
| 66 |
+
* -- the proof-of-possession failed
|
| 67 |
+
* certRevoked (10),
|
| 68 |
+
* -- the certificate has already been revoked
|
| 69 |
+
* certConfirmed (11),
|
| 70 |
+
* -- the certificate has already been confirmed
|
| 71 |
+
* wrongIntegrity (12),
|
| 72 |
+
* -- invalid integrity, password based instead of signature or
|
| 73 |
+
* -- vice versa
|
| 74 |
+
* badRecipientNonce (13),
|
| 75 |
+
* -- invalid recipient nonce, either missing or wrong value
|
| 76 |
+
* timeNotAvailable (14),
|
| 77 |
+
* -- the TSA's time source is not available
|
| 78 |
+
* unacceptedPolicy (15),
|
| 79 |
+
* -- the requested TSA policy is not supported by the TSA.
|
| 80 |
+
* unacceptedExtension (16),
|
| 81 |
+
* -- the requested extension is not supported by the TSA.
|
| 82 |
+
* addInfoNotAvailable (17),
|
| 83 |
+
* -- the additional information requested could not be
|
| 84 |
+
* -- understood or is not available
|
| 85 |
+
* badSenderNonce (18),
|
| 86 |
+
* -- invalid sender nonce, either missing or wrong size
|
| 87 |
+
* badCertTemplate (19),
|
| 88 |
+
* -- invalid cert. template or missing mandatory information
|
| 89 |
+
* signerNotTrusted (20),
|
| 90 |
+
* -- signer of the message unknown or not trusted
|
| 91 |
+
* transactionIdInUse (21),
|
| 92 |
+
* -- the transaction identifier is already in use
|
| 93 |
+
* unsupportedVersion (22),
|
| 94 |
+
* -- the version of the message is not supported
|
| 95 |
+
* notAuthorized (23),
|
| 96 |
+
* -- the sender was not authorized to make the preceding
|
| 97 |
+
* -- request or perform the preceding action
|
| 98 |
+
* systemUnavail (24),
|
| 99 |
+
* -- the request cannot be handled due to system unavailability
|
| 100 |
+
* systemFailure (25),
|
| 101 |
+
* -- the request cannot be handled due to system failure
|
| 102 |
+
* duplicateCertReq (26)
|
| 103 |
+
* -- certificate cannot be issued because a duplicate
|
| 104 |
+
* -- certificate already exists
|
| 105 |
+
* }
|
| 106 |
+
*/
|
| 107 |
+
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
| 108 |
+
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
| 109 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
| 110 |
+
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
| 111 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
| 112 |
+
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
| 113 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
| 114 |
+
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
| 115 |
+
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
| 116 |
+
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
| 117 |
+
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
| 118 |
+
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
| 119 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
| 120 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
| 121 |
+
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
| 122 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
| 123 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
| 124 |
+
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
| 125 |
+
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
| 126 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
| 127 |
+
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
| 128 |
+
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
| 129 |
+
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
| 130 |
+
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
| 131 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
| 132 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
| 133 |
+
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
| 134 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
| 135 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
| 136 |
+
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
| 137 |
+
# if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
| 138 |
+
# error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
| 139 |
+
# endif
|
| 140 |
+
|
| 141 |
+
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
| 142 |
+
|
| 143 |
+
# define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
| 144 |
+
# define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
| 145 |
+
# define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
| 146 |
+
# define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
| 147 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
| 148 |
+
# define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
| 149 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
| 150 |
+
# define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
| 151 |
+
# define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
| 152 |
+
# define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
| 153 |
+
# define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
| 154 |
+
# define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
| 155 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
| 156 |
+
# define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
| 157 |
+
# define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
| 158 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
| 159 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
| 160 |
+
# define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
| 161 |
+
# define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
| 162 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
| 163 |
+
# define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
| 164 |
+
# define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
| 165 |
+
# define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
| 166 |
+
# define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
| 167 |
+
# define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
| 168 |
+
# define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
| 169 |
+
# define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
| 170 |
+
|
| 171 |
+
/*-
|
| 172 |
+
* PKIStatus ::= INTEGER {
|
| 173 |
+
* accepted (0),
|
| 174 |
+
* -- you got exactly what you asked for
|
| 175 |
+
* grantedWithMods (1),
|
| 176 |
+
* -- you got something like what you asked for; the
|
| 177 |
+
* -- requester is responsible for ascertaining the differences
|
| 178 |
+
* rejection (2),
|
| 179 |
+
* -- you don't get it, more information elsewhere in the message
|
| 180 |
+
* waiting (3),
|
| 181 |
+
* -- the request body part has not yet been processed; expect to
|
| 182 |
+
* -- hear more later (note: proper handling of this status
|
| 183 |
+
* -- response MAY use the polling req/rep PKIMessages specified
|
| 184 |
+
* -- in Section 5.3.22; alternatively, polling in the underlying
|
| 185 |
+
* -- transport layer MAY have some utility in this regard)
|
| 186 |
+
* revocationWarning (4),
|
| 187 |
+
* -- this message contains a warning that a revocation is
|
| 188 |
+
* -- imminent
|
| 189 |
+
* revocationNotification (5),
|
| 190 |
+
* -- notification that a revocation has occurred
|
| 191 |
+
* keyUpdateWarning (6)
|
| 192 |
+
* -- update already done for the oldCertId specified in
|
| 193 |
+
* -- CertReqMsg
|
| 194 |
+
* }
|
| 195 |
+
*/
|
| 196 |
+
# define OSSL_CMP_PKISTATUS_request -3
|
| 197 |
+
# define OSSL_CMP_PKISTATUS_trans -2
|
| 198 |
+
# define OSSL_CMP_PKISTATUS_unspecified -1
|
| 199 |
+
# define OSSL_CMP_PKISTATUS_accepted 0
|
| 200 |
+
# define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
| 201 |
+
# define OSSL_CMP_PKISTATUS_rejection 2
|
| 202 |
+
# define OSSL_CMP_PKISTATUS_waiting 3
|
| 203 |
+
# define OSSL_CMP_PKISTATUS_revocationWarning 4
|
| 204 |
+
# define OSSL_CMP_PKISTATUS_revocationNotification 5
|
| 205 |
+
# define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
| 206 |
+
|
| 207 |
+
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
| 208 |
+
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
| 209 |
+
|
| 210 |
+
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
| 211 |
+
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
| 212 |
+
|
| 213 |
+
/* data type declarations */
|
| 214 |
+
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
| 215 |
+
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
| 216 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
| 217 |
+
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
| 218 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
| 219 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
| 220 |
+
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
| 221 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
| 222 |
+
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 223 |
+
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
| 224 |
+
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 225 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
| 226 |
+
#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)))
|
| 227 |
+
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
| 228 |
+
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 229 |
+
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 230 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete(sk, i) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (i)))
|
| 231 |
+
#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)))
|
| 232 |
+
#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))
|
| 233 |
+
#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))
|
| 234 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 235 |
+
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 236 |
+
#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))
|
| 237 |
+
#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))
|
| 238 |
+
#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)))
|
| 239 |
+
#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))
|
| 240 |
+
#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))
|
| 241 |
+
#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)
|
| 242 |
+
#define sk_OSSL_CMP_CERTSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 243 |
+
#define sk_OSSL_CMP_CERTSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 244 |
+
#define sk_OSSL_CMP_CERTSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 245 |
+
#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)))
|
| 246 |
+
#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)))
|
| 247 |
+
|
| 248 |
+
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
| 249 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
| 250 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
| 251 |
+
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 252 |
+
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
| 253 |
+
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 254 |
+
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
| 255 |
+
#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)))
|
| 256 |
+
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
| 257 |
+
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 258 |
+
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 259 |
+
#define sk_OSSL_CMP_ITAV_delete(sk, i) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (i)))
|
| 260 |
+
#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)))
|
| 261 |
+
#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))
|
| 262 |
+
#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))
|
| 263 |
+
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 264 |
+
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 265 |
+
#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))
|
| 266 |
+
#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))
|
| 267 |
+
#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)))
|
| 268 |
+
#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))
|
| 269 |
+
#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))
|
| 270 |
+
#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)
|
| 271 |
+
#define sk_OSSL_CMP_ITAV_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 272 |
+
#define sk_OSSL_CMP_ITAV_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 273 |
+
#define sk_OSSL_CMP_ITAV_dup(sk) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk)))
|
| 274 |
+
#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)))
|
| 275 |
+
#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)))
|
| 276 |
+
|
| 277 |
+
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
| 278 |
+
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
| 279 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
| 280 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
| 281 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
| 282 |
+
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 283 |
+
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
| 284 |
+
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 285 |
+
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
| 286 |
+
#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)))
|
| 287 |
+
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
| 288 |
+
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 289 |
+
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 290 |
+
#define sk_OSSL_CMP_PKISI_delete(sk, i) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (i)))
|
| 291 |
+
#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)))
|
| 292 |
+
#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))
|
| 293 |
+
#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))
|
| 294 |
+
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 295 |
+
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 296 |
+
#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))
|
| 297 |
+
#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))
|
| 298 |
+
#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)))
|
| 299 |
+
#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))
|
| 300 |
+
#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))
|
| 301 |
+
#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)
|
| 302 |
+
#define sk_OSSL_CMP_PKISI_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 303 |
+
#define sk_OSSL_CMP_PKISI_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 304 |
+
#define sk_OSSL_CMP_PKISI_dup(sk) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk)))
|
| 305 |
+
#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)))
|
| 306 |
+
#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)))
|
| 307 |
+
|
| 308 |
+
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
| 309 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
| 310 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 311 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
| 312 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 313 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
| 314 |
+
#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)))
|
| 315 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
| 316 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 317 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 318 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete(sk, i) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (i)))
|
| 319 |
+
#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)))
|
| 320 |
+
#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))
|
| 321 |
+
#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))
|
| 322 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 323 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 324 |
+
#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))
|
| 325 |
+
#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))
|
| 326 |
+
#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)))
|
| 327 |
+
#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))
|
| 328 |
+
#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))
|
| 329 |
+
#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)
|
| 330 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 331 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 332 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_dup(sk) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 333 |
+
#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)))
|
| 334 |
+
#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)))
|
| 335 |
+
|
| 336 |
+
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
| 337 |
+
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
| 338 |
+
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
| 339 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
| 340 |
+
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 341 |
+
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
| 342 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 343 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
| 344 |
+
#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)))
|
| 345 |
+
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
| 346 |
+
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 347 |
+
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 348 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete(sk, i) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (i)))
|
| 349 |
+
#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)))
|
| 350 |
+
#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))
|
| 351 |
+
#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))
|
| 352 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 353 |
+
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 354 |
+
#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))
|
| 355 |
+
#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))
|
| 356 |
+
#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)))
|
| 357 |
+
#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))
|
| 358 |
+
#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))
|
| 359 |
+
#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)
|
| 360 |
+
#define sk_OSSL_CMP_CERTRESPONSE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 361 |
+
#define sk_OSSL_CMP_CERTRESPONSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 362 |
+
#define sk_OSSL_CMP_CERTRESPONSE_dup(sk) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 363 |
+
#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)))
|
| 364 |
+
#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)))
|
| 365 |
+
|
| 366 |
+
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
| 367 |
+
|
| 368 |
+
/*
|
| 369 |
+
* function DECLARATIONS
|
| 370 |
+
*/
|
| 371 |
+
|
| 372 |
+
/* from cmp_asn.c */
|
| 373 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 374 |
+
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
| 375 |
+
ASN1_TYPE *value);
|
| 376 |
+
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
| 377 |
+
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
| 378 |
+
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **itav_sk_p,
|
| 379 |
+
OSSL_CMP_ITAV *itav);
|
| 380 |
+
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
| 381 |
+
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
| 382 |
+
|
| 383 |
+
/* from cmp_ctx.c */
|
| 384 |
+
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 385 |
+
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
| 386 |
+
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
| 387 |
+
/* CMP general options: */
|
| 388 |
+
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
| 389 |
+
/* CMP transfer options: */
|
| 390 |
+
# define OSSL_CMP_OPT_KEEP_ALIVE 10
|
| 391 |
+
# define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
| 392 |
+
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
| 393 |
+
/* CMP request options: */
|
| 394 |
+
# define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
| 395 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
| 396 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
| 397 |
+
# define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
| 398 |
+
# define OSSL_CMP_OPT_POPO_METHOD 24
|
| 399 |
+
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
| 400 |
+
# define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
| 401 |
+
# define OSSL_CMP_OPT_REVOCATION_REASON 27
|
| 402 |
+
/* CMP protection options: */
|
| 403 |
+
# define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
| 404 |
+
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
| 405 |
+
# define OSSL_CMP_OPT_OWF_ALGNID 32
|
| 406 |
+
# define OSSL_CMP_OPT_MAC_ALGNID 33
|
| 407 |
+
# define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
| 408 |
+
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
| 409 |
+
# define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
| 410 |
+
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
| 411 |
+
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
| 412 |
+
/* CMP-specific callback for logging and outputting the error queue: */
|
| 413 |
+
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
| 414 |
+
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
| 415 |
+
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
| 416 |
+
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
| 417 |
+
/* message transfer: */
|
| 418 |
+
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
| 419 |
+
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
| 420 |
+
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
| 421 |
+
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
| 422 |
+
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
| 423 |
+
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
| 424 |
+
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 425 |
+
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 426 |
+
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
| 427 |
+
const OSSL_CMP_MSG *req);
|
| 428 |
+
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
| 429 |
+
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 430 |
+
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 431 |
+
/* server authentication: */
|
| 432 |
+
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 433 |
+
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 434 |
+
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
| 435 |
+
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
| 436 |
+
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
| 437 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
| 438 |
+
/* client authentication: */
|
| 439 |
+
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 440 |
+
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
| 441 |
+
STACK_OF(X509) *candidates);
|
| 442 |
+
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
| 443 |
+
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
| 444 |
+
const unsigned char *ref, int len);
|
| 445 |
+
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
| 446 |
+
const unsigned char *sec, int len);
|
| 447 |
+
/* CMP message header and extra certificates: */
|
| 448 |
+
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 449 |
+
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 450 |
+
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
| 451 |
+
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
| 452 |
+
STACK_OF(X509) *extraCertsOut);
|
| 453 |
+
/* certificate template: */
|
| 454 |
+
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
| 455 |
+
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
| 456 |
+
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 457 |
+
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 458 |
+
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
| 459 |
+
const GENERAL_NAME *name);
|
| 460 |
+
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
| 461 |
+
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
| 462 |
+
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
| 463 |
+
int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 464 |
+
int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
| 465 |
+
/* misc body contents: */
|
| 466 |
+
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 467 |
+
/* certificate confirmation: */
|
| 468 |
+
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
| 469 |
+
int fail_info, const char **txt);
|
| 470 |
+
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
| 471 |
+
const char **text);
|
| 472 |
+
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
| 473 |
+
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 474 |
+
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 475 |
+
/* result fetching: */
|
| 476 |
+
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
| 477 |
+
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
| 478 |
+
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
| 479 |
+
# define OSSL_CMP_PKISI_BUFLEN 1024
|
| 480 |
+
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
| 481 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
| 482 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
| 483 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
| 484 |
+
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
| 485 |
+
const ASN1_OCTET_STRING *id);
|
| 486 |
+
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
| 487 |
+
const ASN1_OCTET_STRING *nonce);
|
| 488 |
+
|
| 489 |
+
/* from cmp_status.c */
|
| 490 |
+
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
| 491 |
+
size_t bufsize);
|
| 492 |
+
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
| 493 |
+
char *buf, size_t bufsize);
|
| 494 |
+
OSSL_CMP_PKISI *
|
| 495 |
+
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
| 496 |
+
|
| 497 |
+
/* from cmp_hdr.c */
|
| 498 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const
|
| 499 |
+
OSSL_CMP_PKIHEADER *hdr);
|
| 500 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
| 501 |
+
|
| 502 |
+
/* from cmp_msg.c */
|
| 503 |
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
| 504 |
+
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
| 505 |
+
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 506 |
+
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 507 |
+
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
| 508 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
| 509 |
+
const char *propq);
|
| 510 |
+
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
| 511 |
+
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
| 512 |
+
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
| 513 |
+
|
| 514 |
+
/* from cmp_vfy.c */
|
| 515 |
+
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
| 516 |
+
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
| 517 |
+
X509_STORE *trusted_store, X509 *cert);
|
| 518 |
+
|
| 519 |
+
/* from cmp_http.c */
|
| 520 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
| 521 |
+
const OSSL_CMP_MSG *req);
|
| 522 |
+
|
| 523 |
+
/* from cmp_server.c */
|
| 524 |
+
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
| 525 |
+
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 526 |
+
const OSSL_CMP_MSG *req);
|
| 527 |
+
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
| 528 |
+
const OSSL_CMP_MSG *req);
|
| 529 |
+
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 530 |
+
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
| 531 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
| 532 |
+
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
| 533 |
+
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
| 534 |
+
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
| 535 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 536 |
+
const OSSL_CMP_MSG *req,
|
| 537 |
+
const X509_NAME *issuer,
|
| 538 |
+
const ASN1_INTEGER *serial);
|
| 539 |
+
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 540 |
+
const OSSL_CMP_MSG *req,
|
| 541 |
+
const STACK_OF(OSSL_CMP_ITAV) *in,
|
| 542 |
+
STACK_OF(OSSL_CMP_ITAV) **out);
|
| 543 |
+
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 544 |
+
const OSSL_CMP_MSG *req,
|
| 545 |
+
const OSSL_CMP_PKISI *statusInfo,
|
| 546 |
+
const ASN1_INTEGER *errorCode,
|
| 547 |
+
const OSSL_CMP_PKIFREETEXT *errDetails);
|
| 548 |
+
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 549 |
+
const OSSL_CMP_MSG *req,
|
| 550 |
+
int certReqId,
|
| 551 |
+
const ASN1_OCTET_STRING *certHash,
|
| 552 |
+
const OSSL_CMP_PKISI *si);
|
| 553 |
+
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 554 |
+
const OSSL_CMP_MSG *req, int certReqId,
|
| 555 |
+
OSSL_CMP_MSG **certReq,
|
| 556 |
+
int64_t *check_after);
|
| 557 |
+
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
| 558 |
+
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
| 559 |
+
OSSL_CMP_SRV_rr_cb_t process_rr,
|
| 560 |
+
OSSL_CMP_SRV_genm_cb_t process_genm,
|
| 561 |
+
OSSL_CMP_SRV_error_cb_t process_error,
|
| 562 |
+
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
| 563 |
+
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
| 564 |
+
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 565 |
+
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 566 |
+
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 567 |
+
int val);
|
| 568 |
+
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 569 |
+
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 570 |
+
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 571 |
+
int val);
|
| 572 |
+
|
| 573 |
+
/* from cmp_client.c */
|
| 574 |
+
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 575 |
+
const OSSL_CRMF_MSG *crm);
|
| 576 |
+
# define OSSL_CMP_IR 0
|
| 577 |
+
# define OSSL_CMP_CR 2
|
| 578 |
+
# define OSSL_CMP_P10CR 4
|
| 579 |
+
# define OSSL_CMP_KUR 7
|
| 580 |
+
# define OSSL_CMP_exec_IR_ses(ctx) \
|
| 581 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
| 582 |
+
# define OSSL_CMP_exec_CR_ses(ctx) \
|
| 583 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
| 584 |
+
# define OSSL_CMP_exec_P10CR_ses(ctx) \
|
| 585 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
| 586 |
+
# define OSSL_CMP_exec_KUR_ses(ctx) \
|
| 587 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
| 588 |
+
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 589 |
+
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
| 590 |
+
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
| 591 |
+
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
| 592 |
+
|
| 593 |
+
# ifdef __cplusplus
|
| 594 |
+
}
|
| 595 |
+
# endif
|
| 596 |
+
# endif /* !defined(OPENSSL_NO_CMP) */
|
| 597 |
+
#endif /* !defined(OPENSSL_CMP_H) */
|
llava_next/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
|
llava_next/include/openssl/cryptoerr.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_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 |
+
|
| 21 |
+
/*
|
| 22 |
+
* CRYPTO reason codes.
|
| 23 |
+
*/
|
| 24 |
+
# define CRYPTO_R_BAD_ALGORITHM_NAME 117
|
| 25 |
+
# define CRYPTO_R_CONFLICTING_NAMES 118
|
| 26 |
+
# define CRYPTO_R_HEX_STRING_TOO_SHORT 121
|
| 27 |
+
# define CRYPTO_R_ILLEGAL_HEX_DIGIT 102
|
| 28 |
+
# define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106
|
| 29 |
+
# define CRYPTO_R_INSUFFICIENT_PARAM_SIZE 107
|
| 30 |
+
# define CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE 108
|
| 31 |
+
# define CRYPTO_R_INVALID_NEGATIVE_VALUE 122
|
| 32 |
+
# define CRYPTO_R_INVALID_NULL_ARGUMENT 109
|
| 33 |
+
# define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110
|
| 34 |
+
# define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103
|
| 35 |
+
# define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104
|
| 36 |
+
# define CRYPTO_R_PROVIDER_SECTION_ERROR 105
|
| 37 |
+
# define CRYPTO_R_RANDOM_SECTION_ERROR 119
|
| 38 |
+
# define CRYPTO_R_SECURE_MALLOC_FAILURE 111
|
| 39 |
+
# define CRYPTO_R_STRING_TOO_LONG 112
|
| 40 |
+
# define CRYPTO_R_TOO_MANY_BYTES 113
|
| 41 |
+
# define CRYPTO_R_TOO_MANY_RECORDS 114
|
| 42 |
+
# define CRYPTO_R_TOO_SMALL_BUFFER 116
|
| 43 |
+
# define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120
|
| 44 |
+
# define CRYPTO_R_ZERO_LENGTH_NUMBER 115
|
| 45 |
+
|
| 46 |
+
#endif
|
llava_next/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
|
llava_next/include/openssl/dsaerr.h
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
|
| 20 |
+
# ifndef OPENSSL_NO_DSA
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
/*
|
| 24 |
+
* DSA reason codes.
|
| 25 |
+
*/
|
| 26 |
+
# define DSA_R_BAD_FFC_PARAMETERS 114
|
| 27 |
+
# define DSA_R_BAD_Q_VALUE 102
|
| 28 |
+
# define DSA_R_BN_DECODE_ERROR 108
|
| 29 |
+
# define DSA_R_BN_ERROR 109
|
| 30 |
+
# define DSA_R_DECODE_ERROR 104
|
| 31 |
+
# define DSA_R_INVALID_DIGEST_TYPE 106
|
| 32 |
+
# define DSA_R_INVALID_PARAMETERS 112
|
| 33 |
+
# define DSA_R_MISSING_PARAMETERS 101
|
| 34 |
+
# define DSA_R_MISSING_PRIVATE_KEY 111
|
| 35 |
+
# define DSA_R_MODULUS_TOO_LARGE 103
|
| 36 |
+
# define DSA_R_NO_PARAMETERS_SET 107
|
| 37 |
+
# define DSA_R_PARAMETER_ENCODING_ERROR 105
|
| 38 |
+
# define DSA_R_P_NOT_PRIME 115
|
| 39 |
+
# define DSA_R_Q_NOT_PRIME 113
|
| 40 |
+
# define DSA_R_SEED_LEN_SMALL 110
|
| 41 |
+
# define DSA_R_TOO_MANY_RETRIES 116
|
| 42 |
+
|
| 43 |
+
# endif
|
| 44 |
+
#endif
|
llava_next/include/openssl/e_os2.h
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_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 implementor 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 |
+
# define ossl_ssize_t ssize_t
|
| 204 |
+
# if defined(SSIZE_MAX)
|
| 205 |
+
# define OSSL_SSIZE_MAX SSIZE_MAX
|
| 206 |
+
# elif defined(_POSIX_SSIZE_MAX)
|
| 207 |
+
# define OSSL_SSIZE_MAX _POSIX_SSIZE_MAX
|
| 208 |
+
# else
|
| 209 |
+
# define OSSL_SSIZE_MAX ((ssize_t)(SIZE_MAX>>1))
|
| 210 |
+
# endif
|
| 211 |
+
# endif
|
| 212 |
+
|
| 213 |
+
# if defined(UNUSEDRESULT_DEBUG)
|
| 214 |
+
# define __owur __attribute__((__warn_unused_result__))
|
| 215 |
+
# else
|
| 216 |
+
# define __owur
|
| 217 |
+
# endif
|
| 218 |
+
|
| 219 |
+
/* Standard integer types */
|
| 220 |
+
# define OPENSSL_NO_INTTYPES_H
|
| 221 |
+
# define OPENSSL_NO_STDINT_H
|
| 222 |
+
# if defined(OPENSSL_SYS_UEFI)
|
| 223 |
+
typedef INT8 int8_t;
|
| 224 |
+
typedef UINT8 uint8_t;
|
| 225 |
+
typedef INT16 int16_t;
|
| 226 |
+
typedef UINT16 uint16_t;
|
| 227 |
+
typedef INT32 int32_t;
|
| 228 |
+
typedef UINT32 uint32_t;
|
| 229 |
+
typedef INT64 int64_t;
|
| 230 |
+
typedef UINT64 uint64_t;
|
| 231 |
+
# elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \
|
| 232 |
+
defined(__osf__) || defined(__sgi) || defined(__hpux) || \
|
| 233 |
+
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 |
+
# else
|
| 252 |
+
# include <stdint.h>
|
| 253 |
+
# undef OPENSSL_NO_STDINT_H
|
| 254 |
+
# endif
|
| 255 |
+
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
|
| 256 |
+
defined(INTMAX_MAX) && defined(UINTMAX_MAX)
|
| 257 |
+
typedef intmax_t ossl_intmax_t;
|
| 258 |
+
typedef uintmax_t ossl_uintmax_t;
|
| 259 |
+
# else
|
| 260 |
+
/* Fall back to the largest we know we require and can handle */
|
| 261 |
+
typedef int64_t ossl_intmax_t;
|
| 262 |
+
typedef uint64_t ossl_uintmax_t;
|
| 263 |
+
# endif
|
| 264 |
+
|
| 265 |
+
/* ossl_inline: portable inline definition usable in public headers */
|
| 266 |
+
# if !defined(inline) && !defined(__cplusplus)
|
| 267 |
+
# if defined(__STDC_VERSION__) && __STDC_VERSION__>=199901L
|
| 268 |
+
/* just use inline */
|
| 269 |
+
# define ossl_inline inline
|
| 270 |
+
# elif defined(__GNUC__) && __GNUC__>=2
|
| 271 |
+
# define ossl_inline __inline__
|
| 272 |
+
# elif defined(_MSC_VER)
|
| 273 |
+
/*
|
| 274 |
+
* Visual Studio: inline is available in C++ only, however
|
| 275 |
+
* __inline is available for C, see
|
| 276 |
+
* http://msdn.microsoft.com/en-us/library/z8y1yy88.aspx
|
| 277 |
+
*/
|
| 278 |
+
# define ossl_inline __inline
|
| 279 |
+
# else
|
| 280 |
+
# define ossl_inline
|
| 281 |
+
# endif
|
| 282 |
+
# else
|
| 283 |
+
# define ossl_inline inline
|
| 284 |
+
# endif
|
| 285 |
+
|
| 286 |
+
# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L && \
|
| 287 |
+
!defined(__cplusplus)
|
| 288 |
+
# define ossl_noreturn _Noreturn
|
| 289 |
+
# elif defined(__GNUC__) && __GNUC__ >= 2
|
| 290 |
+
# define ossl_noreturn __attribute__((noreturn))
|
| 291 |
+
# else
|
| 292 |
+
# define ossl_noreturn
|
| 293 |
+
# endif
|
| 294 |
+
|
| 295 |
+
/* ossl_unused: portable unused attribute for use in public headers */
|
| 296 |
+
# if defined(__GNUC__)
|
| 297 |
+
# define ossl_unused __attribute__((unused))
|
| 298 |
+
# else
|
| 299 |
+
# define ossl_unused
|
| 300 |
+
# endif
|
| 301 |
+
|
| 302 |
+
#ifdef __cplusplus
|
| 303 |
+
}
|
| 304 |
+
#endif
|
| 305 |
+
#endif
|
llava_next/include/openssl/ecdsa.h
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2002-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 |
+
#include <openssl/ec.h>
|
llava_next/include/openssl/ess.h
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ess.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2019-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 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ESS_H
|
| 16 |
+
# define OPENSSL_ESS_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
# include <openssl/safestack.h>
|
| 22 |
+
# include <openssl/x509.h>
|
| 23 |
+
# include <openssl/esserr.h>
|
| 24 |
+
|
| 25 |
+
# ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
# endif
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;
|
| 31 |
+
typedef struct ESS_cert_id ESS_CERT_ID;
|
| 32 |
+
typedef struct ESS_signing_cert ESS_SIGNING_CERT;
|
| 33 |
+
|
| 34 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID, ESS_CERT_ID, ESS_CERT_ID)
|
| 35 |
+
#define sk_ESS_CERT_ID_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_sk_type(sk))
|
| 36 |
+
#define sk_ESS_CERT_ID_value(sk, idx) ((ESS_CERT_ID *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_sk_type(sk), (idx)))
|
| 37 |
+
#define sk_ESS_CERT_ID_new(cmp) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_compfunc_type(cmp)))
|
| 38 |
+
#define sk_ESS_CERT_ID_new_null() ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_null())
|
| 39 |
+
#define sk_ESS_CERT_ID_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_compfunc_type(cmp), (n)))
|
| 40 |
+
#define sk_ESS_CERT_ID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_sk_type(sk), (n))
|
| 41 |
+
#define sk_ESS_CERT_ID_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 42 |
+
#define sk_ESS_CERT_ID_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 43 |
+
#define sk_ESS_CERT_ID_delete(sk, i) ((ESS_CERT_ID *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_sk_type(sk), (i)))
|
| 44 |
+
#define sk_ESS_CERT_ID_delete_ptr(sk, ptr) ((ESS_CERT_ID *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr)))
|
| 45 |
+
#define sk_ESS_CERT_ID_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 46 |
+
#define sk_ESS_CERT_ID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 47 |
+
#define sk_ESS_CERT_ID_pop(sk) ((ESS_CERT_ID *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_sk_type(sk)))
|
| 48 |
+
#define sk_ESS_CERT_ID_shift(sk) ((ESS_CERT_ID *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_sk_type(sk)))
|
| 49 |
+
#define sk_ESS_CERT_ID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_sk_type(sk),ossl_check_ESS_CERT_ID_freefunc_type(freefunc))
|
| 50 |
+
#define sk_ESS_CERT_ID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), (idx))
|
| 51 |
+
#define sk_ESS_CERT_ID_set(sk, idx, ptr) ((ESS_CERT_ID *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_type(ptr)))
|
| 52 |
+
#define sk_ESS_CERT_ID_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 53 |
+
#define sk_ESS_CERT_ID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr))
|
| 54 |
+
#define sk_ESS_CERT_ID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_type(ptr), pnum)
|
| 55 |
+
#define sk_ESS_CERT_ID_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_sk_type(sk))
|
| 56 |
+
#define sk_ESS_CERT_ID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_sk_type(sk))
|
| 57 |
+
#define sk_ESS_CERT_ID_dup(sk) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_sk_type(sk)))
|
| 58 |
+
#define sk_ESS_CERT_ID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_freefunc_type(freefunc)))
|
| 59 |
+
#define sk_ESS_CERT_ID_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_sk_type(sk), ossl_check_ESS_CERT_ID_compfunc_type(cmp)))
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;
|
| 64 |
+
typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;
|
| 65 |
+
|
| 66 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ESS_CERT_ID_V2, ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
| 67 |
+
#define sk_ESS_CERT_ID_V2_num(sk) OPENSSL_sk_num(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))
|
| 68 |
+
#define sk_ESS_CERT_ID_V2_value(sk, idx) ((ESS_CERT_ID_V2 *)OPENSSL_sk_value(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), (idx)))
|
| 69 |
+
#define sk_ESS_CERT_ID_V2_new(cmp) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp)))
|
| 70 |
+
#define sk_ESS_CERT_ID_V2_new_null() ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_null())
|
| 71 |
+
#define sk_ESS_CERT_ID_V2_new_reserve(cmp, n) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_new_reserve(ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp), (n)))
|
| 72 |
+
#define sk_ESS_CERT_ID_V2_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (n))
|
| 73 |
+
#define sk_ESS_CERT_ID_V2_free(sk) OPENSSL_sk_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 74 |
+
#define sk_ESS_CERT_ID_V2_zero(sk) OPENSSL_sk_zero(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 75 |
+
#define sk_ESS_CERT_ID_V2_delete(sk, i) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (i)))
|
| 76 |
+
#define sk_ESS_CERT_ID_V2_delete_ptr(sk, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_delete_ptr(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr)))
|
| 77 |
+
#define sk_ESS_CERT_ID_V2_push(sk, ptr) OPENSSL_sk_push(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 78 |
+
#define sk_ESS_CERT_ID_V2_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 79 |
+
#define sk_ESS_CERT_ID_V2_pop(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_pop(ossl_check_ESS_CERT_ID_V2_sk_type(sk)))
|
| 80 |
+
#define sk_ESS_CERT_ID_V2_shift(sk) ((ESS_CERT_ID_V2 *)OPENSSL_sk_shift(ossl_check_ESS_CERT_ID_V2_sk_type(sk)))
|
| 81 |
+
#define sk_ESS_CERT_ID_V2_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ESS_CERT_ID_V2_sk_type(sk),ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc))
|
| 82 |
+
#define sk_ESS_CERT_ID_V2_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), (idx))
|
| 83 |
+
#define sk_ESS_CERT_ID_V2_set(sk, idx, ptr) ((ESS_CERT_ID_V2 *)OPENSSL_sk_set(ossl_check_ESS_CERT_ID_V2_sk_type(sk), (idx), ossl_check_ESS_CERT_ID_V2_type(ptr)))
|
| 84 |
+
#define sk_ESS_CERT_ID_V2_find(sk, ptr) OPENSSL_sk_find(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 85 |
+
#define sk_ESS_CERT_ID_V2_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr))
|
| 86 |
+
#define sk_ESS_CERT_ID_V2_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_type(ptr), pnum)
|
| 87 |
+
#define sk_ESS_CERT_ID_V2_sort(sk) OPENSSL_sk_sort(ossl_check_ESS_CERT_ID_V2_sk_type(sk))
|
| 88 |
+
#define sk_ESS_CERT_ID_V2_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk))
|
| 89 |
+
#define sk_ESS_CERT_ID_V2_dup(sk) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_dup(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk)))
|
| 90 |
+
#define sk_ESS_CERT_ID_V2_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ESS_CERT_ID_V2) *)OPENSSL_sk_deep_copy(ossl_check_const_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_copyfunc_type(copyfunc), ossl_check_ESS_CERT_ID_V2_freefunc_type(freefunc)))
|
| 91 |
+
#define sk_ESS_CERT_ID_V2_set_cmp_func(sk, cmp) ((sk_ESS_CERT_ID_V2_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ESS_CERT_ID_V2_sk_type(sk), ossl_check_ESS_CERT_ID_V2_compfunc_type(cmp)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_ISSUER_SERIAL)
|
| 95 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_ISSUER_SERIAL, ESS_ISSUER_SERIAL)
|
| 96 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
|
| 97 |
+
|
| 98 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID)
|
| 99 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID, ESS_CERT_ID)
|
| 100 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID)
|
| 101 |
+
|
| 102 |
+
DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT)
|
| 103 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)
|
| 104 |
+
|
| 105 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(ESS_CERT_ID_V2)
|
| 106 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only(ESS_CERT_ID_V2, ESS_CERT_ID_V2)
|
| 107 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_CERT_ID_V2)
|
| 108 |
+
|
| 109 |
+
DECLARE_ASN1_FUNCTIONS(ESS_SIGNING_CERT_V2)
|
| 110 |
+
DECLARE_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT_V2)
|
| 111 |
+
|
| 112 |
+
ESS_SIGNING_CERT *OSSL_ESS_signing_cert_new_init(const X509 *signcert,
|
| 113 |
+
const STACK_OF(X509) *certs,
|
| 114 |
+
int set_issuer_serial);
|
| 115 |
+
ESS_SIGNING_CERT_V2 *OSSL_ESS_signing_cert_v2_new_init(const EVP_MD *hash_alg,
|
| 116 |
+
const X509 *signcert,
|
| 117 |
+
const
|
| 118 |
+
STACK_OF(X509) *certs,
|
| 119 |
+
int set_issuer_serial);
|
| 120 |
+
int OSSL_ESS_check_signing_certs(const ESS_SIGNING_CERT *ss,
|
| 121 |
+
const ESS_SIGNING_CERT_V2 *ssv2,
|
| 122 |
+
const STACK_OF(X509) *chain,
|
| 123 |
+
int require_signing_cert);
|
| 124 |
+
|
| 125 |
+
# ifdef __cplusplus
|
| 126 |
+
}
|
| 127 |
+
# endif
|
| 128 |
+
#endif
|
llava_next/include/openssl/esserr.h
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_ESSERR_H
|
| 12 |
+
# define OPENSSL_ESSERR_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/opensslconf.h>
|
| 16 |
+
# include <openssl/symhacks.h>
|
| 17 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
/*
|
| 20 |
+
* ESS reason codes.
|
| 21 |
+
*/
|
| 22 |
+
# define ESS_R_EMPTY_ESS_CERT_ID_LIST 107
|
| 23 |
+
# define ESS_R_ESS_CERT_DIGEST_ERROR 103
|
| 24 |
+
# define ESS_R_ESS_CERT_ID_NOT_FOUND 104
|
| 25 |
+
# define ESS_R_ESS_CERT_ID_WRONG_ORDER 105
|
| 26 |
+
# define ESS_R_ESS_DIGEST_ALG_UNKNOWN 106
|
| 27 |
+
# define ESS_R_ESS_SIGNING_CERTIFICATE_ERROR 102
|
| 28 |
+
# define ESS_R_ESS_SIGNING_CERT_ADD_ERROR 100
|
| 29 |
+
# define ESS_R_ESS_SIGNING_CERT_V2_ADD_ERROR 101
|
| 30 |
+
# define ESS_R_MISSING_SIGNING_CERTIFICATE_ATTRIBUTE 108
|
| 31 |
+
|
| 32 |
+
#endif
|
llava_next/include/openssl/evp.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
llava_next/include/openssl/kdferr.h
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_KDFERR_H
|
| 11 |
+
# define OPENSSL_KDFERR_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/cryptoerr_legacy.h>
|
| 15 |
+
|
| 16 |
+
#endif /* !defined(OPENSSL_KDFERR_H) */
|
llava_next/include/openssl/macros.h
ADDED
|
@@ -0,0 +1,304 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-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_MACROS_H
|
| 11 |
+
# define OPENSSL_MACROS_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
#include <openssl/opensslconf.h>
|
| 15 |
+
#include <openssl/opensslv.h>
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
/* Helper macros for CPP string composition */
|
| 19 |
+
# define OPENSSL_MSTR_HELPER(x) #x
|
| 20 |
+
# define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
|
| 21 |
+
|
| 22 |
+
/*
|
| 23 |
+
* Sometimes OPENSSL_NO_xxx ends up with an empty file and some compilers
|
| 24 |
+
* don't like that. This will hopefully silence them.
|
| 25 |
+
*/
|
| 26 |
+
# define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* Generic deprecation macro
|
| 30 |
+
*
|
| 31 |
+
* If OPENSSL_SUPPRESS_DEPRECATED is defined, then OSSL_DEPRECATED and
|
| 32 |
+
* OSSL_DEPRECATED_FOR become no-ops
|
| 33 |
+
*/
|
| 34 |
+
# ifndef OSSL_DEPRECATED
|
| 35 |
+
# undef OSSL_DEPRECATED_FOR
|
| 36 |
+
# ifndef OPENSSL_SUPPRESS_DEPRECATED
|
| 37 |
+
# if defined(_MSC_VER)
|
| 38 |
+
/*
|
| 39 |
+
* MSVC supports __declspec(deprecated) since MSVC 2003 (13.10),
|
| 40 |
+
* and __declspec(deprecated(message)) since MSVC 2005 (14.00)
|
| 41 |
+
*/
|
| 42 |
+
# if _MSC_VER >= 1400
|
| 43 |
+
# define OSSL_DEPRECATED(since) \
|
| 44 |
+
__declspec(deprecated("Since OpenSSL " # since))
|
| 45 |
+
# define OSSL_DEPRECATED_FOR(since, message) \
|
| 46 |
+
__declspec(deprecated("Since OpenSSL " # since ";" message))
|
| 47 |
+
# elif _MSC_VER >= 1310
|
| 48 |
+
# define OSSL_DEPRECATED(since) __declspec(deprecated)
|
| 49 |
+
# define OSSL_DEPRECATED_FOR(since, message) __declspec(deprecated)
|
| 50 |
+
# endif
|
| 51 |
+
# elif defined(__GNUC__)
|
| 52 |
+
/*
|
| 53 |
+
* According to GCC documentation, deprecations with message appeared in
|
| 54 |
+
* GCC 4.5.0
|
| 55 |
+
*/
|
| 56 |
+
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)
|
| 57 |
+
# define OSSL_DEPRECATED(since) \
|
| 58 |
+
__attribute__((deprecated("Since OpenSSL " # since)))
|
| 59 |
+
# define OSSL_DEPRECATED_FOR(since, message) \
|
| 60 |
+
__attribute__((deprecated("Since OpenSSL " # since ";" message)))
|
| 61 |
+
# elif __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
|
| 62 |
+
# define OSSL_DEPRECATED(since) __attribute__((deprecated))
|
| 63 |
+
# define OSSL_DEPRECATED_FOR(since, message) __attribute__((deprecated))
|
| 64 |
+
# endif
|
| 65 |
+
# elif defined(__SUNPRO_C)
|
| 66 |
+
# if (__SUNPRO_C >= 0x5130)
|
| 67 |
+
# define OSSL_DEPRECATED(since) __attribute__ ((deprecated))
|
| 68 |
+
# define OSSL_DEPRECATED_FOR(since, message) __attribute__ ((deprecated))
|
| 69 |
+
# endif
|
| 70 |
+
# endif
|
| 71 |
+
# endif
|
| 72 |
+
# endif
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* Still not defined? Then define no-op macros. This means these macros
|
| 76 |
+
* are unsuitable for use in a typedef.
|
| 77 |
+
*/
|
| 78 |
+
# ifndef OSSL_DEPRECATED
|
| 79 |
+
# define OSSL_DEPRECATED(since) extern
|
| 80 |
+
# define OSSL_DEPRECATED_FOR(since, message) extern
|
| 81 |
+
# endif
|
| 82 |
+
|
| 83 |
+
/*
|
| 84 |
+
* Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
|
| 85 |
+
* declarations of functions deprecated in or before <version>. If this is
|
| 86 |
+
* undefined, the value of the macro OPENSSL_CONFIGURED_API (defined in
|
| 87 |
+
* <openssl/opensslconf.h>) is the default.
|
| 88 |
+
*
|
| 89 |
+
* For any version number up until version 1.1.x, <version> is expected to be
|
| 90 |
+
* the calculated version number 0xMNNFFPPSL.
|
| 91 |
+
* For version numbers 3.0 and on, <version> is expected to be a computation
|
| 92 |
+
* of the major and minor numbers in decimal using this formula:
|
| 93 |
+
*
|
| 94 |
+
* MAJOR * 10000 + MINOR * 100
|
| 95 |
+
*
|
| 96 |
+
* So version 3.0 becomes 30000, version 3.2 becomes 30200, etc.
|
| 97 |
+
*/
|
| 98 |
+
|
| 99 |
+
/*
|
| 100 |
+
* We use the OPENSSL_API_COMPAT value to define API level macros. These
|
| 101 |
+
* macros are used to enable or disable features at that API version boundary.
|
| 102 |
+
*/
|
| 103 |
+
|
| 104 |
+
# ifdef OPENSSL_API_LEVEL
|
| 105 |
+
# error "OPENSSL_API_LEVEL must not be defined by application"
|
| 106 |
+
# endif
|
| 107 |
+
|
| 108 |
+
/*
|
| 109 |
+
* We figure out what API level was intended by simple numeric comparison.
|
| 110 |
+
* The lowest old style number we recognise is 0x00908000L, so we take some
|
| 111 |
+
* safety margin and assume that anything below 0x00900000L is a new style
|
| 112 |
+
* number. This allows new versions up to and including v943.71.83.
|
| 113 |
+
*/
|
| 114 |
+
# ifdef OPENSSL_API_COMPAT
|
| 115 |
+
# if OPENSSL_API_COMPAT < 0x900000L
|
| 116 |
+
# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
|
| 117 |
+
# else
|
| 118 |
+
# define OPENSSL_API_LEVEL \
|
| 119 |
+
(((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
|
| 120 |
+
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
|
| 121 |
+
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF))
|
| 122 |
+
# endif
|
| 123 |
+
# endif
|
| 124 |
+
|
| 125 |
+
/*
|
| 126 |
+
* If OPENSSL_API_COMPAT wasn't given, we use default numbers to set
|
| 127 |
+
* the API compatibility level.
|
| 128 |
+
*/
|
| 129 |
+
# ifndef OPENSSL_API_LEVEL
|
| 130 |
+
# if OPENSSL_CONFIGURED_API > 0
|
| 131 |
+
# define OPENSSL_API_LEVEL (OPENSSL_CONFIGURED_API)
|
| 132 |
+
# else
|
| 133 |
+
# define OPENSSL_API_LEVEL \
|
| 134 |
+
(OPENSSL_VERSION_MAJOR * 10000 + OPENSSL_VERSION_MINOR * 100)
|
| 135 |
+
# endif
|
| 136 |
+
# endif
|
| 137 |
+
|
| 138 |
+
# if OPENSSL_API_LEVEL > OPENSSL_CONFIGURED_API
|
| 139 |
+
# error "The requested API level higher than the configured API compatibility level"
|
| 140 |
+
# endif
|
| 141 |
+
|
| 142 |
+
/*
|
| 143 |
+
* Check of sane values.
|
| 144 |
+
*/
|
| 145 |
+
/* Can't go higher than the current version. */
|
| 146 |
+
# if OPENSSL_API_LEVEL > (OPENSSL_VERSION_MAJOR * 10000 + OPENSSL_VERSION_MINOR * 100)
|
| 147 |
+
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
| 148 |
+
# endif
|
| 149 |
+
/* OpenSSL will have no version 2.y.z */
|
| 150 |
+
# if OPENSSL_API_LEVEL < 30000 && OPENSSL_API_LEVEL >= 20000
|
| 151 |
+
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
| 152 |
+
# endif
|
| 153 |
+
/* Below 0.9.8 is unacceptably low */
|
| 154 |
+
# if OPENSSL_API_LEVEL < 908
|
| 155 |
+
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
| 156 |
+
# endif
|
| 157 |
+
|
| 158 |
+
/*
|
| 159 |
+
* Define macros for deprecation and simulated removal purposes.
|
| 160 |
+
*
|
| 161 |
+
* The macros OSSL_DEPRECATED_{major}_{minor} are always defined for
|
| 162 |
+
* all OpenSSL versions we care for. They can be used as attributes
|
| 163 |
+
* in function declarations where appropriate.
|
| 164 |
+
*
|
| 165 |
+
* The macros OPENSSL_NO_DEPRECATED_{major}_{minor} are defined for
|
| 166 |
+
* all OpenSSL versions up to or equal to the version given with
|
| 167 |
+
* OPENSSL_API_COMPAT. They are used as guards around anything that's
|
| 168 |
+
* deprecated up to that version, as an effect of the developer option
|
| 169 |
+
* 'no-deprecated'.
|
| 170 |
+
*/
|
| 171 |
+
|
| 172 |
+
# undef OPENSSL_NO_DEPRECATED_3_0
|
| 173 |
+
# undef OPENSSL_NO_DEPRECATED_1_1_1
|
| 174 |
+
# undef OPENSSL_NO_DEPRECATED_1_1_0
|
| 175 |
+
# undef OPENSSL_NO_DEPRECATED_1_0_2
|
| 176 |
+
# undef OPENSSL_NO_DEPRECATED_1_0_1
|
| 177 |
+
# undef OPENSSL_NO_DEPRECATED_1_0_0
|
| 178 |
+
# undef OPENSSL_NO_DEPRECATED_0_9_8
|
| 179 |
+
|
| 180 |
+
# if OPENSSL_API_LEVEL >= 30000
|
| 181 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 182 |
+
# define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
|
| 183 |
+
# define OSSL_DEPRECATEDIN_3_0_FOR(msg) OSSL_DEPRECATED_FOR(3.0, msg)
|
| 184 |
+
# else
|
| 185 |
+
# define OPENSSL_NO_DEPRECATED_3_0
|
| 186 |
+
# endif
|
| 187 |
+
# else
|
| 188 |
+
# define OSSL_DEPRECATEDIN_3_0
|
| 189 |
+
# define OSSL_DEPRECATEDIN_3_0_FOR(msg)
|
| 190 |
+
# endif
|
| 191 |
+
# if OPENSSL_API_LEVEL >= 10101
|
| 192 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 193 |
+
# define OSSL_DEPRECATEDIN_1_1_1 OSSL_DEPRECATED(1.1.1)
|
| 194 |
+
# define OSSL_DEPRECATEDIN_1_1_1_FOR(msg) OSSL_DEPRECATED_FOR(1.1.1, msg)
|
| 195 |
+
# else
|
| 196 |
+
# define OPENSSL_NO_DEPRECATED_1_1_1
|
| 197 |
+
# endif
|
| 198 |
+
# else
|
| 199 |
+
# define OSSL_DEPRECATEDIN_1_1_1
|
| 200 |
+
# define OSSL_DEPRECATEDIN_1_1_1_FOR(msg)
|
| 201 |
+
# endif
|
| 202 |
+
# if OPENSSL_API_LEVEL >= 10100
|
| 203 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 204 |
+
# define OSSL_DEPRECATEDIN_1_1_0 OSSL_DEPRECATED(1.1.0)
|
| 205 |
+
# define OSSL_DEPRECATEDIN_1_1_0_FOR(msg) OSSL_DEPRECATED_FOR(1.1.0, msg)
|
| 206 |
+
# else
|
| 207 |
+
# define OPENSSL_NO_DEPRECATED_1_1_0
|
| 208 |
+
# endif
|
| 209 |
+
# else
|
| 210 |
+
# define OSSL_DEPRECATEDIN_1_1_0
|
| 211 |
+
# define OSSL_DEPRECATEDIN_1_1_0_FOR(msg)
|
| 212 |
+
# endif
|
| 213 |
+
# if OPENSSL_API_LEVEL >= 10002
|
| 214 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 215 |
+
# define OSSL_DEPRECATEDIN_1_0_2 OSSL_DEPRECATED(1.0.2)
|
| 216 |
+
# define OSSL_DEPRECATEDIN_1_0_2_FOR(msg) OSSL_DEPRECATED_FOR(1.0.2, msg)
|
| 217 |
+
# else
|
| 218 |
+
# define OPENSSL_NO_DEPRECATED_1_0_2
|
| 219 |
+
# endif
|
| 220 |
+
# else
|
| 221 |
+
# define OSSL_DEPRECATEDIN_1_0_2
|
| 222 |
+
# define OSSL_DEPRECATEDIN_1_0_2_FOR(msg)
|
| 223 |
+
# endif
|
| 224 |
+
# if OPENSSL_API_LEVEL >= 10001
|
| 225 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 226 |
+
# define OSSL_DEPRECATEDIN_1_0_1 OSSL_DEPRECATED(1.0.1)
|
| 227 |
+
# define OSSL_DEPRECATEDIN_1_0_1_FOR(msg) OSSL_DEPRECATED_FOR(1.0.1, msg)
|
| 228 |
+
# else
|
| 229 |
+
# define OPENSSL_NO_DEPRECATED_1_0_1
|
| 230 |
+
# endif
|
| 231 |
+
# else
|
| 232 |
+
# define OSSL_DEPRECATEDIN_1_0_1
|
| 233 |
+
# define OSSL_DEPRECATEDIN_1_0_1_FOR(msg)
|
| 234 |
+
# endif
|
| 235 |
+
# if OPENSSL_API_LEVEL >= 10000
|
| 236 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 237 |
+
# define OSSL_DEPRECATEDIN_1_0_0 OSSL_DEPRECATED(1.0.0)
|
| 238 |
+
# define OSSL_DEPRECATEDIN_1_0_0_FOR(msg) OSSL_DEPRECATED_FOR(1.0.0, msg)
|
| 239 |
+
# else
|
| 240 |
+
# define OPENSSL_NO_DEPRECATED_1_0_0
|
| 241 |
+
# endif
|
| 242 |
+
# else
|
| 243 |
+
# define OSSL_DEPRECATEDIN_1_0_0
|
| 244 |
+
# define OSSL_DEPRECATEDIN_1_0_0_FOR(msg)
|
| 245 |
+
# endif
|
| 246 |
+
# if OPENSSL_API_LEVEL >= 908
|
| 247 |
+
# ifndef OPENSSL_NO_DEPRECATED
|
| 248 |
+
# define OSSL_DEPRECATEDIN_0_9_8 OSSL_DEPRECATED(0.9.8)
|
| 249 |
+
# define OSSL_DEPRECATEDIN_0_9_8_FOR(msg) OSSL_DEPRECATED_FOR(0.9.8, msg)
|
| 250 |
+
# else
|
| 251 |
+
# define OPENSSL_NO_DEPRECATED_0_9_8
|
| 252 |
+
# endif
|
| 253 |
+
# else
|
| 254 |
+
# define OSSL_DEPRECATEDIN_0_9_8
|
| 255 |
+
# define OSSL_DEPRECATEDIN_0_9_8_FOR(msg)
|
| 256 |
+
# endif
|
| 257 |
+
|
| 258 |
+
/*
|
| 259 |
+
* Make our own variants of __FILE__ and __LINE__, depending on configuration
|
| 260 |
+
*/
|
| 261 |
+
|
| 262 |
+
# ifndef OPENSSL_FILE
|
| 263 |
+
# ifdef OPENSSL_NO_FILENAMES
|
| 264 |
+
# define OPENSSL_FILE ""
|
| 265 |
+
# define OPENSSL_LINE 0
|
| 266 |
+
# else
|
| 267 |
+
# define OPENSSL_FILE __FILE__
|
| 268 |
+
# define OPENSSL_LINE __LINE__
|
| 269 |
+
# endif
|
| 270 |
+
# endif
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* __func__ was standardized in C99, so for any compiler that claims
|
| 274 |
+
* to implement that language level or newer, we assume we can safely
|
| 275 |
+
* use that symbol.
|
| 276 |
+
*
|
| 277 |
+
* GNU C also provides __FUNCTION__ since version 2, which predates
|
| 278 |
+
* C99. We can, however, only use this if __STDC_VERSION__ exists,
|
| 279 |
+
* as it's otherwise not allowed according to ISO C standards (C90).
|
| 280 |
+
* (compiling with GNU C's -pedantic tells us so)
|
| 281 |
+
*
|
| 282 |
+
* If none of the above applies, we check if the compiler is MSVC,
|
| 283 |
+
* and use __FUNCTION__ if that's the case.
|
| 284 |
+
*/
|
| 285 |
+
# ifndef OPENSSL_FUNC
|
| 286 |
+
# if defined(__STDC_VERSION__)
|
| 287 |
+
# if __STDC_VERSION__ >= 199901L
|
| 288 |
+
# define OPENSSL_FUNC __func__
|
| 289 |
+
# elif defined(__GNUC__) && __GNUC__ >= 2
|
| 290 |
+
# define OPENSSL_FUNC __FUNCTION__
|
| 291 |
+
# endif
|
| 292 |
+
# elif defined(_MSC_VER)
|
| 293 |
+
# define OPENSSL_FUNC __FUNCTION__
|
| 294 |
+
# endif
|
| 295 |
+
/*
|
| 296 |
+
* If all these possibilities are exhausted, we give up and use a
|
| 297 |
+
* static string.
|
| 298 |
+
*/
|
| 299 |
+
# ifndef OPENSSL_FUNC
|
| 300 |
+
# define OPENSSL_FUNC "(unknown function)"
|
| 301 |
+
# endif
|
| 302 |
+
# endif
|
| 303 |
+
|
| 304 |
+
#endif /* OPENSSL_MACROS_H */
|
llava_next/include/openssl/md4.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_MD4_H
|
| 11 |
+
# define OPENSSL_MD4_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/macros.h>
|
| 15 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
# define HEADER_MD4_H
|
| 17 |
+
# endif
|
| 18 |
+
|
| 19 |
+
# include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
# ifndef OPENSSL_NO_MD4
|
| 22 |
+
# include <openssl/e_os2.h>
|
| 23 |
+
# include <stddef.h>
|
| 24 |
+
# ifdef __cplusplus
|
| 25 |
+
extern "C" {
|
| 26 |
+
# endif
|
| 27 |
+
|
| 28 |
+
# define MD4_DIGEST_LENGTH 16
|
| 29 |
+
|
| 30 |
+
# if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
| 31 |
+
|
| 32 |
+
/*-
|
| 33 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 34 |
+
* ! MD4_LONG has to be at least 32 bits wide. !
|
| 35 |
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
| 36 |
+
*/
|
| 37 |
+
# define MD4_LONG unsigned int
|
| 38 |
+
|
| 39 |
+
# define MD4_CBLOCK 64
|
| 40 |
+
# define MD4_LBLOCK (MD4_CBLOCK/4)
|
| 41 |
+
|
| 42 |
+
typedef struct MD4state_st {
|
| 43 |
+
MD4_LONG A, B, C, D;
|
| 44 |
+
MD4_LONG Nl, Nh;
|
| 45 |
+
MD4_LONG data[MD4_LBLOCK];
|
| 46 |
+
unsigned int num;
|
| 47 |
+
} MD4_CTX;
|
| 48 |
+
# endif
|
| 49 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c);
|
| 51 |
+
OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len);
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c);
|
| 53 |
+
OSSL_DEPRECATEDIN_3_0 unsigned char *MD4(const unsigned char *d, size_t n,
|
| 54 |
+
unsigned char *md);
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0 void MD4_Transform(MD4_CTX *c, const unsigned char *b);
|
| 56 |
+
# endif
|
| 57 |
+
|
| 58 |
+
# ifdef __cplusplus
|
| 59 |
+
}
|
| 60 |
+
# endif
|
| 61 |
+
# endif
|
| 62 |
+
|
| 63 |
+
#endif
|
llava_next/include/openssl/ocsp.h
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ocsp.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 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_OCSP_H
|
| 16 |
+
# define OPENSSL_OCSP_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_OCSP_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
# include <openssl/http.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* These definitions are outside the OPENSSL_NO_OCSP guard because although for
|
| 30 |
+
* historical reasons they have OCSP_* names, they can actually be used
|
| 31 |
+
* independently of OCSP. E.g. see RFC5280
|
| 32 |
+
*/
|
| 33 |
+
/*-
|
| 34 |
+
* CRLReason ::= ENUMERATED {
|
| 35 |
+
* unspecified (0),
|
| 36 |
+
* keyCompromise (1),
|
| 37 |
+
* cACompromise (2),
|
| 38 |
+
* affiliationChanged (3),
|
| 39 |
+
* superseded (4),
|
| 40 |
+
* cessationOfOperation (5),
|
| 41 |
+
* certificateHold (6),
|
| 42 |
+
* -- value 7 is not used
|
| 43 |
+
* removeFromCRL (8),
|
| 44 |
+
* privilegeWithdrawn (9),
|
| 45 |
+
* aACompromise (10) }
|
| 46 |
+
*/
|
| 47 |
+
# define OCSP_REVOKED_STATUS_NOSTATUS -1
|
| 48 |
+
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
| 49 |
+
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
| 50 |
+
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
| 51 |
+
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
| 52 |
+
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
| 53 |
+
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
| 54 |
+
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
| 55 |
+
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
| 56 |
+
# define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9
|
| 57 |
+
# define OCSP_REVOKED_STATUS_AACOMPROMISE 10
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
# ifndef OPENSSL_NO_OCSP
|
| 61 |
+
|
| 62 |
+
# include <openssl/x509.h>
|
| 63 |
+
# include <openssl/x509v3.h>
|
| 64 |
+
# include <openssl/safestack.h>
|
| 65 |
+
# include <openssl/ocsperr.h>
|
| 66 |
+
|
| 67 |
+
# ifdef __cplusplus
|
| 68 |
+
extern "C" {
|
| 69 |
+
# endif
|
| 70 |
+
|
| 71 |
+
/* Various flags and values */
|
| 72 |
+
|
| 73 |
+
# define OCSP_DEFAULT_NONCE_LENGTH 16
|
| 74 |
+
|
| 75 |
+
# define OCSP_NOCERTS 0x1
|
| 76 |
+
# define OCSP_NOINTERN 0x2
|
| 77 |
+
# define OCSP_NOSIGS 0x4
|
| 78 |
+
# define OCSP_NOCHAIN 0x8
|
| 79 |
+
# define OCSP_NOVERIFY 0x10
|
| 80 |
+
# define OCSP_NOEXPLICIT 0x20
|
| 81 |
+
# define OCSP_NOCASIGN 0x40
|
| 82 |
+
# define OCSP_NODELEGATED 0x80
|
| 83 |
+
# define OCSP_NOCHECKS 0x100
|
| 84 |
+
# define OCSP_TRUSTOTHER 0x200
|
| 85 |
+
# define OCSP_RESPID_KEY 0x400
|
| 86 |
+
# define OCSP_NOTIME 0x800
|
| 87 |
+
# define OCSP_PARTIAL_CHAIN 0x1000
|
| 88 |
+
|
| 89 |
+
typedef struct ocsp_cert_id_st OCSP_CERTID;
|
| 90 |
+
typedef struct ocsp_one_request_st OCSP_ONEREQ;
|
| 91 |
+
typedef struct ocsp_req_info_st OCSP_REQINFO;
|
| 92 |
+
typedef struct ocsp_signature_st OCSP_SIGNATURE;
|
| 93 |
+
typedef struct ocsp_request_st OCSP_REQUEST;
|
| 94 |
+
|
| 95 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_CERTID, OCSP_CERTID, OCSP_CERTID)
|
| 96 |
+
#define sk_OCSP_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 97 |
+
#define sk_OCSP_CERTID_value(sk, idx) ((OCSP_CERTID *)OPENSSL_sk_value(ossl_check_const_OCSP_CERTID_sk_type(sk), (idx)))
|
| 98 |
+
#define sk_OCSP_CERTID_new(cmp) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new(ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 99 |
+
#define sk_OCSP_CERTID_new_null() ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_null())
|
| 100 |
+
#define sk_OCSP_CERTID_new_reserve(cmp, n) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_CERTID_compfunc_type(cmp), (n)))
|
| 101 |
+
#define sk_OCSP_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_CERTID_sk_type(sk), (n))
|
| 102 |
+
#define sk_OCSP_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 103 |
+
#define sk_OCSP_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 104 |
+
#define sk_OCSP_CERTID_delete(sk, i) ((OCSP_CERTID *)OPENSSL_sk_delete(ossl_check_OCSP_CERTID_sk_type(sk), (i)))
|
| 105 |
+
#define sk_OCSP_CERTID_delete_ptr(sk, ptr) ((OCSP_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr)))
|
| 106 |
+
#define sk_OCSP_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 107 |
+
#define sk_OCSP_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 108 |
+
#define sk_OCSP_CERTID_pop(sk) ((OCSP_CERTID *)OPENSSL_sk_pop(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 109 |
+
#define sk_OCSP_CERTID_shift(sk) ((OCSP_CERTID *)OPENSSL_sk_shift(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 110 |
+
#define sk_OCSP_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_CERTID_sk_type(sk),ossl_check_OCSP_CERTID_freefunc_type(freefunc))
|
| 111 |
+
#define sk_OCSP_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), (idx))
|
| 112 |
+
#define sk_OCSP_CERTID_set(sk, idx, ptr) ((OCSP_CERTID *)OPENSSL_sk_set(ossl_check_OCSP_CERTID_sk_type(sk), (idx), ossl_check_OCSP_CERTID_type(ptr)))
|
| 113 |
+
#define sk_OCSP_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 114 |
+
#define sk_OCSP_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 115 |
+
#define sk_OCSP_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), pnum)
|
| 116 |
+
#define sk_OCSP_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 117 |
+
#define sk_OCSP_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 118 |
+
#define sk_OCSP_CERTID_dup(sk) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_CERTID_sk_type(sk)))
|
| 119 |
+
#define sk_OCSP_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_copyfunc_type(copyfunc), ossl_check_OCSP_CERTID_freefunc_type(freefunc)))
|
| 120 |
+
#define sk_OCSP_CERTID_set_cmp_func(sk, cmp) ((sk_OCSP_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 121 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_ONEREQ, OCSP_ONEREQ, OCSP_ONEREQ)
|
| 122 |
+
#define sk_OCSP_ONEREQ_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 123 |
+
#define sk_OCSP_ONEREQ_value(sk, idx) ((OCSP_ONEREQ *)OPENSSL_sk_value(ossl_check_const_OCSP_ONEREQ_sk_type(sk), (idx)))
|
| 124 |
+
#define sk_OCSP_ONEREQ_new(cmp) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new(ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 125 |
+
#define sk_OCSP_ONEREQ_new_null() ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_null())
|
| 126 |
+
#define sk_OCSP_ONEREQ_new_reserve(cmp, n) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_ONEREQ_compfunc_type(cmp), (n)))
|
| 127 |
+
#define sk_OCSP_ONEREQ_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_ONEREQ_sk_type(sk), (n))
|
| 128 |
+
#define sk_OCSP_ONEREQ_free(sk) OPENSSL_sk_free(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 129 |
+
#define sk_OCSP_ONEREQ_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 130 |
+
#define sk_OCSP_ONEREQ_delete(sk, i) ((OCSP_ONEREQ *)OPENSSL_sk_delete(ossl_check_OCSP_ONEREQ_sk_type(sk), (i)))
|
| 131 |
+
#define sk_OCSP_ONEREQ_delete_ptr(sk, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 132 |
+
#define sk_OCSP_ONEREQ_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 133 |
+
#define sk_OCSP_ONEREQ_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 134 |
+
#define sk_OCSP_ONEREQ_pop(sk) ((OCSP_ONEREQ *)OPENSSL_sk_pop(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 135 |
+
#define sk_OCSP_ONEREQ_shift(sk) ((OCSP_ONEREQ *)OPENSSL_sk_shift(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 136 |
+
#define sk_OCSP_ONEREQ_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_ONEREQ_sk_type(sk),ossl_check_OCSP_ONEREQ_freefunc_type(freefunc))
|
| 137 |
+
#define sk_OCSP_ONEREQ_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), (idx))
|
| 138 |
+
#define sk_OCSP_ONEREQ_set(sk, idx, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_set(ossl_check_OCSP_ONEREQ_sk_type(sk), (idx), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 139 |
+
#define sk_OCSP_ONEREQ_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 140 |
+
#define sk_OCSP_ONEREQ_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 141 |
+
#define sk_OCSP_ONEREQ_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), pnum)
|
| 142 |
+
#define sk_OCSP_ONEREQ_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 143 |
+
#define sk_OCSP_ONEREQ_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 144 |
+
#define sk_OCSP_ONEREQ_dup(sk) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_dup(ossl_check_const_OCSP_ONEREQ_sk_type(sk)))
|
| 145 |
+
#define sk_OCSP_ONEREQ_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_copyfunc_type(copyfunc), ossl_check_OCSP_ONEREQ_freefunc_type(freefunc)))
|
| 146 |
+
#define sk_OCSP_ONEREQ_set_cmp_func(sk, cmp) ((sk_OCSP_ONEREQ_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
| 150 |
+
# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
| 151 |
+
# define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
| 152 |
+
# define OCSP_RESPONSE_STATUS_TRYLATER 3
|
| 153 |
+
# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
| 154 |
+
# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
| 155 |
+
|
| 156 |
+
typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
|
| 157 |
+
|
| 158 |
+
# define V_OCSP_RESPID_NAME 0
|
| 159 |
+
# define V_OCSP_RESPID_KEY 1
|
| 160 |
+
|
| 161 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_RESPID, OCSP_RESPID, OCSP_RESPID)
|
| 162 |
+
#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 163 |
+
#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
|
| 164 |
+
#define sk_OCSP_RESPID_new(cmp) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new(ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 165 |
+
#define sk_OCSP_RESPID_new_null() ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_null())
|
| 166 |
+
#define sk_OCSP_RESPID_new_reserve(cmp, n) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_RESPID_compfunc_type(cmp), (n)))
|
| 167 |
+
#define sk_OCSP_RESPID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_RESPID_sk_type(sk), (n))
|
| 168 |
+
#define sk_OCSP_RESPID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 169 |
+
#define sk_OCSP_RESPID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 170 |
+
#define sk_OCSP_RESPID_delete(sk, i) ((OCSP_RESPID *)OPENSSL_sk_delete(ossl_check_OCSP_RESPID_sk_type(sk), (i)))
|
| 171 |
+
#define sk_OCSP_RESPID_delete_ptr(sk, ptr) ((OCSP_RESPID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr)))
|
| 172 |
+
#define sk_OCSP_RESPID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 173 |
+
#define sk_OCSP_RESPID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 174 |
+
#define sk_OCSP_RESPID_pop(sk) ((OCSP_RESPID *)OPENSSL_sk_pop(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 175 |
+
#define sk_OCSP_RESPID_shift(sk) ((OCSP_RESPID *)OPENSSL_sk_shift(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 176 |
+
#define sk_OCSP_RESPID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(sk),ossl_check_OCSP_RESPID_freefunc_type(freefunc))
|
| 177 |
+
#define sk_OCSP_RESPID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), (idx))
|
| 178 |
+
#define sk_OCSP_RESPID_set(sk, idx, ptr) ((OCSP_RESPID *)OPENSSL_sk_set(ossl_check_OCSP_RESPID_sk_type(sk), (idx), ossl_check_OCSP_RESPID_type(ptr)))
|
| 179 |
+
#define sk_OCSP_RESPID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 180 |
+
#define sk_OCSP_RESPID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 181 |
+
#define sk_OCSP_RESPID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), pnum)
|
| 182 |
+
#define sk_OCSP_RESPID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 183 |
+
#define sk_OCSP_RESPID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 184 |
+
#define sk_OCSP_RESPID_dup(sk) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_RESPID_sk_type(sk)))
|
| 185 |
+
#define sk_OCSP_RESPID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_copyfunc_type(copyfunc), ossl_check_OCSP_RESPID_freefunc_type(freefunc)))
|
| 186 |
+
#define sk_OCSP_RESPID_set_cmp_func(sk, cmp) ((sk_OCSP_RESPID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
|
| 190 |
+
|
| 191 |
+
# define V_OCSP_CERTSTATUS_GOOD 0
|
| 192 |
+
# define V_OCSP_CERTSTATUS_REVOKED 1
|
| 193 |
+
# define V_OCSP_CERTSTATUS_UNKNOWN 2
|
| 194 |
+
|
| 195 |
+
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
|
| 196 |
+
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
|
| 197 |
+
|
| 198 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_SINGLERESP, OCSP_SINGLERESP, OCSP_SINGLERESP)
|
| 199 |
+
#define sk_OCSP_SINGLERESP_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 200 |
+
#define sk_OCSP_SINGLERESP_value(sk, idx) ((OCSP_SINGLERESP *)OPENSSL_sk_value(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), (idx)))
|
| 201 |
+
#define sk_OCSP_SINGLERESP_new(cmp) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 202 |
+
#define sk_OCSP_SINGLERESP_new_null() ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_null())
|
| 203 |
+
#define sk_OCSP_SINGLERESP_new_reserve(cmp, n) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp), (n)))
|
| 204 |
+
#define sk_OCSP_SINGLERESP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_SINGLERESP_sk_type(sk), (n))
|
| 205 |
+
#define sk_OCSP_SINGLERESP_free(sk) OPENSSL_sk_free(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 206 |
+
#define sk_OCSP_SINGLERESP_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 207 |
+
#define sk_OCSP_SINGLERESP_delete(sk, i) ((OCSP_SINGLERESP *)OPENSSL_sk_delete(ossl_check_OCSP_SINGLERESP_sk_type(sk), (i)))
|
| 208 |
+
#define sk_OCSP_SINGLERESP_delete_ptr(sk, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 209 |
+
#define sk_OCSP_SINGLERESP_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 210 |
+
#define sk_OCSP_SINGLERESP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 211 |
+
#define sk_OCSP_SINGLERESP_pop(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_pop(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 212 |
+
#define sk_OCSP_SINGLERESP_shift(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_shift(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 213 |
+
#define sk_OCSP_SINGLERESP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_SINGLERESP_sk_type(sk),ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc))
|
| 214 |
+
#define sk_OCSP_SINGLERESP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), (idx))
|
| 215 |
+
#define sk_OCSP_SINGLERESP_set(sk, idx, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_set(ossl_check_OCSP_SINGLERESP_sk_type(sk), (idx), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 216 |
+
#define sk_OCSP_SINGLERESP_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 217 |
+
#define sk_OCSP_SINGLERESP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 218 |
+
#define sk_OCSP_SINGLERESP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), pnum)
|
| 219 |
+
#define sk_OCSP_SINGLERESP_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 220 |
+
#define sk_OCSP_SINGLERESP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 221 |
+
#define sk_OCSP_SINGLERESP_dup(sk) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_dup(ossl_check_const_OCSP_SINGLERESP_sk_type(sk)))
|
| 222 |
+
#define sk_OCSP_SINGLERESP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_copyfunc_type(copyfunc), ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc)))
|
| 223 |
+
#define sk_OCSP_SINGLERESP_set_cmp_func(sk, cmp) ((sk_OCSP_SINGLERESP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
typedef struct ocsp_response_data_st OCSP_RESPDATA;
|
| 227 |
+
|
| 228 |
+
typedef struct ocsp_basic_response_st OCSP_BASICRESP;
|
| 229 |
+
|
| 230 |
+
typedef struct ocsp_crl_id_st OCSP_CRLID;
|
| 231 |
+
typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
|
| 232 |
+
|
| 233 |
+
# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
| 234 |
+
# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
| 235 |
+
|
| 236 |
+
# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
|
| 237 |
+
|
| 238 |
+
# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
|
| 239 |
+
|
| 240 |
+
# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
| 241 |
+
(char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \
|
| 242 |
+
bp,(char **)(x),cb,NULL)
|
| 243 |
+
|
| 244 |
+
# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\
|
| 245 |
+
(char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \
|
| 246 |
+
bp,(char **)(x),cb,NULL)
|
| 247 |
+
|
| 248 |
+
# define PEM_write_bio_OCSP_REQUEST(bp,o) \
|
| 249 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\
|
| 250 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 251 |
+
|
| 252 |
+
# define PEM_write_bio_OCSP_RESPONSE(bp,o) \
|
| 253 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
|
| 254 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 255 |
+
|
| 256 |
+
# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
|
| 257 |
+
|
| 258 |
+
# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
|
| 259 |
+
|
| 260 |
+
# define ASN1_BIT_STRING_digest(data,type,md,len) \
|
| 261 |
+
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
| 262 |
+
|
| 263 |
+
# define OCSP_CERTSTATUS_dup(cs)\
|
| 264 |
+
(OCSP_CERTSTATUS*)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS,\
|
| 265 |
+
(d2i_of_void *)d2i_OCSP_CERTSTATUS,(char *)(cs))
|
| 266 |
+
|
| 267 |
+
DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID)
|
| 268 |
+
|
| 269 |
+
OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
|
| 270 |
+
const OCSP_REQUEST *req, int buf_size);
|
| 271 |
+
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
|
| 272 |
+
|
| 273 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 274 |
+
typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
|
| 275 |
+
# define OCSP_REQ_CTX_new(io, buf_size) \
|
| 276 |
+
OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
|
| 277 |
+
# define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
|
| 278 |
+
# define OCSP_REQ_CTX_http(rctx, op, path) \
|
| 279 |
+
(OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && \
|
| 280 |
+
OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
|
| 281 |
+
NULL, NULL, path))
|
| 282 |
+
# define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
|
| 283 |
+
# define OCSP_REQ_CTX_i2d(r, it, req) \
|
| 284 |
+
OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)
|
| 285 |
+
# define OCSP_REQ_CTX_set1_req(r, req) \
|
| 286 |
+
OCSP_REQ_CTX_i2d(r, ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)(req))
|
| 287 |
+
# define OCSP_REQ_CTX_nbio OSSL_HTTP_REQ_CTX_nbio
|
| 288 |
+
# define OCSP_REQ_CTX_nbio_d2i OSSL_HTTP_REQ_CTX_nbio_d2i
|
| 289 |
+
# define OCSP_sendreq_nbio(p, r) \
|
| 290 |
+
OSSL_HTTP_REQ_CTX_nbio_d2i(r, (ASN1_VALUE **)(p), \
|
| 291 |
+
ASN1_ITEM_rptr(OCSP_RESPONSE))
|
| 292 |
+
# define OCSP_REQ_CTX_get0_mem_bio OSSL_HTTP_REQ_CTX_get0_mem_bio
|
| 293 |
+
# define OCSP_set_max_response_length OSSL_HTTP_REQ_CTX_set_max_response_length
|
| 294 |
+
# endif
|
| 295 |
+
|
| 296 |
+
OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
|
| 297 |
+
const X509 *issuer);
|
| 298 |
+
|
| 299 |
+
OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
|
| 300 |
+
const X509_NAME *issuerName,
|
| 301 |
+
const ASN1_BIT_STRING *issuerKey,
|
| 302 |
+
const ASN1_INTEGER *serialNumber);
|
| 303 |
+
|
| 304 |
+
OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
|
| 305 |
+
|
| 306 |
+
int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
|
| 307 |
+
int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
|
| 308 |
+
int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
|
| 309 |
+
int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
|
| 310 |
+
|
| 311 |
+
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
|
| 312 |
+
int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
| 313 |
+
|
| 314 |
+
int OCSP_request_sign(OCSP_REQUEST *req,
|
| 315 |
+
X509 *signer,
|
| 316 |
+
EVP_PKEY *key,
|
| 317 |
+
const EVP_MD *dgst,
|
| 318 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 319 |
+
|
| 320 |
+
int OCSP_response_status(OCSP_RESPONSE *resp);
|
| 321 |
+
OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
|
| 322 |
+
|
| 323 |
+
const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
|
| 324 |
+
const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
|
| 325 |
+
const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
|
| 326 |
+
int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
|
| 327 |
+
STACK_OF(X509) *extra_certs);
|
| 328 |
+
|
| 329 |
+
int OCSP_resp_count(OCSP_BASICRESP *bs);
|
| 330 |
+
OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
|
| 331 |
+
const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
|
| 332 |
+
const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
|
| 333 |
+
int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
|
| 334 |
+
const ASN1_OCTET_STRING **pid,
|
| 335 |
+
const X509_NAME **pname);
|
| 336 |
+
int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
|
| 337 |
+
ASN1_OCTET_STRING **pid,
|
| 338 |
+
X509_NAME **pname);
|
| 339 |
+
|
| 340 |
+
int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
|
| 341 |
+
int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
|
| 342 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 343 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 344 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 345 |
+
int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
|
| 346 |
+
int *reason,
|
| 347 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 348 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 349 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 350 |
+
int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
|
| 351 |
+
ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
|
| 352 |
+
|
| 353 |
+
int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,
|
| 354 |
+
X509_STORE *store, unsigned long flags);
|
| 355 |
+
|
| 356 |
+
# define OCSP_parse_url(url, host, port, path, ssl) \
|
| 357 |
+
OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL)
|
| 358 |
+
|
| 359 |
+
int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 360 |
+
int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 361 |
+
|
| 362 |
+
int OCSP_request_onereq_count(OCSP_REQUEST *req);
|
| 363 |
+
OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
|
| 364 |
+
OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
|
| 365 |
+
int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
|
| 366 |
+
ASN1_OCTET_STRING **pikeyHash,
|
| 367 |
+
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
| 368 |
+
int OCSP_request_is_signed(OCSP_REQUEST *req);
|
| 369 |
+
OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
|
| 370 |
+
OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
|
| 371 |
+
OCSP_CERTID *cid,
|
| 372 |
+
int status, int reason,
|
| 373 |
+
ASN1_TIME *revtime,
|
| 374 |
+
ASN1_TIME *thisupd,
|
| 375 |
+
ASN1_TIME *nextupd);
|
| 376 |
+
int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
|
| 377 |
+
int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
| 378 |
+
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
| 379 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 380 |
+
int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
|
| 381 |
+
X509 *signer, EVP_MD_CTX *ctx,
|
| 382 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 383 |
+
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
| 384 |
+
int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
|
| 385 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 386 |
+
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
| 387 |
+
int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
|
| 388 |
+
const char *propq);
|
| 389 |
+
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
| 390 |
+
|
| 391 |
+
X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
|
| 392 |
+
|
| 393 |
+
X509_EXTENSION *OCSP_accept_responses_new(char **oids);
|
| 394 |
+
|
| 395 |
+
X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
|
| 396 |
+
|
| 397 |
+
X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
|
| 398 |
+
|
| 399 |
+
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
| 400 |
+
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
| 401 |
+
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
|
| 402 |
+
int lastpos);
|
| 403 |
+
int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
|
| 404 |
+
X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
|
| 405 |
+
X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
|
| 406 |
+
void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
|
| 407 |
+
int *idx);
|
| 408 |
+
int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
|
| 409 |
+
unsigned long flags);
|
| 410 |
+
int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
|
| 411 |
+
|
| 412 |
+
int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
|
| 413 |
+
int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
|
| 414 |
+
int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
|
| 415 |
+
int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
|
| 416 |
+
X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
|
| 417 |
+
X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
|
| 418 |
+
void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
|
| 419 |
+
int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
|
| 420 |
+
unsigned long flags);
|
| 421 |
+
int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
|
| 422 |
+
|
| 423 |
+
int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
|
| 424 |
+
int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
|
| 425 |
+
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
|
| 426 |
+
int lastpos);
|
| 427 |
+
int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
|
| 428 |
+
int lastpos);
|
| 429 |
+
X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
|
| 430 |
+
X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
|
| 431 |
+
void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
|
| 432 |
+
int *idx);
|
| 433 |
+
int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
|
| 434 |
+
int crit, unsigned long flags);
|
| 435 |
+
int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
|
| 436 |
+
|
| 437 |
+
int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
|
| 438 |
+
int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
|
| 439 |
+
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
|
| 440 |
+
int lastpos);
|
| 441 |
+
int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
|
| 442 |
+
int lastpos);
|
| 443 |
+
X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
|
| 444 |
+
X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
|
| 445 |
+
void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
|
| 446 |
+
int *idx);
|
| 447 |
+
int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
|
| 448 |
+
int crit, unsigned long flags);
|
| 449 |
+
int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
|
| 450 |
+
const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
|
| 451 |
+
|
| 452 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP)
|
| 453 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS)
|
| 454 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO)
|
| 455 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP)
|
| 456 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA)
|
| 457 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPID)
|
| 458 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE)
|
| 459 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES)
|
| 460 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ)
|
| 461 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)
|
| 462 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST)
|
| 463 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE)
|
| 464 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO)
|
| 465 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CRLID)
|
| 466 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC)
|
| 467 |
+
|
| 468 |
+
const char *OCSP_response_status_str(long s);
|
| 469 |
+
const char *OCSP_cert_status_str(long s);
|
| 470 |
+
const char *OCSP_crl_reason_str(long s);
|
| 471 |
+
|
| 472 |
+
int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
|
| 473 |
+
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
|
| 474 |
+
|
| 475 |
+
int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
| 476 |
+
X509_STORE *st, unsigned long flags);
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
# ifdef __cplusplus
|
| 480 |
+
}
|
| 481 |
+
# endif
|
| 482 |
+
# endif /* !defined(OPENSSL_NO_OCSP) */
|
| 483 |
+
#endif
|
llava_next/include/openssl/params.h
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright (c) 2019, 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_PARAMS_H
|
| 12 |
+
# define OPENSSL_PARAMS_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/core.h>
|
| 16 |
+
# include <openssl/bn.h>
|
| 17 |
+
|
| 18 |
+
# ifdef __cplusplus
|
| 19 |
+
extern "C" {
|
| 20 |
+
# endif
|
| 21 |
+
|
| 22 |
+
# define OSSL_PARAM_UNMODIFIED ((size_t)-1)
|
| 23 |
+
|
| 24 |
+
# define OSSL_PARAM_END \
|
| 25 |
+
{ NULL, 0, NULL, 0, 0 }
|
| 26 |
+
|
| 27 |
+
# define OSSL_PARAM_DEFN(key, type, addr, sz) \
|
| 28 |
+
{ (key), (type), (addr), (sz), OSSL_PARAM_UNMODIFIED }
|
| 29 |
+
|
| 30 |
+
/* Basic parameter types without return sizes */
|
| 31 |
+
# define OSSL_PARAM_int(key, addr) \
|
| 32 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_INTEGER, (addr), sizeof(int))
|
| 33 |
+
# define OSSL_PARAM_uint(key, addr) \
|
| 34 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (addr), \
|
| 35 |
+
sizeof(unsigned int))
|
| 36 |
+
# define OSSL_PARAM_long(key, addr) \
|
| 37 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_INTEGER, (addr), sizeof(long int))
|
| 38 |
+
# define OSSL_PARAM_ulong(key, addr) \
|
| 39 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (addr), \
|
| 40 |
+
sizeof(unsigned long int))
|
| 41 |
+
# define OSSL_PARAM_int32(key, addr) \
|
| 42 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_INTEGER, (addr), sizeof(int32_t))
|
| 43 |
+
# define OSSL_PARAM_uint32(key, addr) \
|
| 44 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (addr), \
|
| 45 |
+
sizeof(uint32_t))
|
| 46 |
+
# define OSSL_PARAM_int64(key, addr) \
|
| 47 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_INTEGER, (addr), sizeof(int64_t))
|
| 48 |
+
# define OSSL_PARAM_uint64(key, addr) \
|
| 49 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (addr), \
|
| 50 |
+
sizeof(uint64_t))
|
| 51 |
+
# define OSSL_PARAM_size_t(key, addr) \
|
| 52 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (addr), sizeof(size_t))
|
| 53 |
+
# define OSSL_PARAM_time_t(key, addr) \
|
| 54 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_INTEGER, (addr), sizeof(time_t))
|
| 55 |
+
# define OSSL_PARAM_double(key, addr) \
|
| 56 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_REAL, (addr), sizeof(double))
|
| 57 |
+
|
| 58 |
+
# define OSSL_PARAM_BN(key, bn, sz) \
|
| 59 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UNSIGNED_INTEGER, (bn), (sz))
|
| 60 |
+
# define OSSL_PARAM_utf8_string(key, addr, sz) \
|
| 61 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UTF8_STRING, (addr), sz)
|
| 62 |
+
# define OSSL_PARAM_octet_string(key, addr, sz) \
|
| 63 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_OCTET_STRING, (addr), sz)
|
| 64 |
+
|
| 65 |
+
# define OSSL_PARAM_utf8_ptr(key, addr, sz) \
|
| 66 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_UTF8_PTR, (addr), sz)
|
| 67 |
+
# define OSSL_PARAM_octet_ptr(key, addr, sz) \
|
| 68 |
+
OSSL_PARAM_DEFN((key), OSSL_PARAM_OCTET_PTR, (addr), sz)
|
| 69 |
+
|
| 70 |
+
/* Search an OSSL_PARAM array for a matching name */
|
| 71 |
+
OSSL_PARAM *OSSL_PARAM_locate(OSSL_PARAM *p, const char *key);
|
| 72 |
+
const OSSL_PARAM *OSSL_PARAM_locate_const(const OSSL_PARAM *p, const char *key);
|
| 73 |
+
|
| 74 |
+
/* Basic parameter type run-time construction */
|
| 75 |
+
OSSL_PARAM OSSL_PARAM_construct_int(const char *key, int *buf);
|
| 76 |
+
OSSL_PARAM OSSL_PARAM_construct_uint(const char *key, unsigned int *buf);
|
| 77 |
+
OSSL_PARAM OSSL_PARAM_construct_long(const char *key, long int *buf);
|
| 78 |
+
OSSL_PARAM OSSL_PARAM_construct_ulong(const char *key, unsigned long int *buf);
|
| 79 |
+
OSSL_PARAM OSSL_PARAM_construct_int32(const char *key, int32_t *buf);
|
| 80 |
+
OSSL_PARAM OSSL_PARAM_construct_uint32(const char *key, uint32_t *buf);
|
| 81 |
+
OSSL_PARAM OSSL_PARAM_construct_int64(const char *key, int64_t *buf);
|
| 82 |
+
OSSL_PARAM OSSL_PARAM_construct_uint64(const char *key, uint64_t *buf);
|
| 83 |
+
OSSL_PARAM OSSL_PARAM_construct_size_t(const char *key, size_t *buf);
|
| 84 |
+
OSSL_PARAM OSSL_PARAM_construct_time_t(const char *key, time_t *buf);
|
| 85 |
+
OSSL_PARAM OSSL_PARAM_construct_BN(const char *key, unsigned char *buf,
|
| 86 |
+
size_t bsize);
|
| 87 |
+
OSSL_PARAM OSSL_PARAM_construct_double(const char *key, double *buf);
|
| 88 |
+
OSSL_PARAM OSSL_PARAM_construct_utf8_string(const char *key, char *buf,
|
| 89 |
+
size_t bsize);
|
| 90 |
+
OSSL_PARAM OSSL_PARAM_construct_utf8_ptr(const char *key, char **buf,
|
| 91 |
+
size_t bsize);
|
| 92 |
+
OSSL_PARAM OSSL_PARAM_construct_octet_string(const char *key, void *buf,
|
| 93 |
+
size_t bsize);
|
| 94 |
+
OSSL_PARAM OSSL_PARAM_construct_octet_ptr(const char *key, void **buf,
|
| 95 |
+
size_t bsize);
|
| 96 |
+
OSSL_PARAM OSSL_PARAM_construct_end(void);
|
| 97 |
+
|
| 98 |
+
int OSSL_PARAM_allocate_from_text(OSSL_PARAM *to,
|
| 99 |
+
const OSSL_PARAM *paramdefs,
|
| 100 |
+
const char *key, const char *value,
|
| 101 |
+
size_t value_n, int *found);
|
| 102 |
+
|
| 103 |
+
int OSSL_PARAM_get_int(const OSSL_PARAM *p, int *val);
|
| 104 |
+
int OSSL_PARAM_get_uint(const OSSL_PARAM *p, unsigned int *val);
|
| 105 |
+
int OSSL_PARAM_get_long(const OSSL_PARAM *p, long int *val);
|
| 106 |
+
int OSSL_PARAM_get_ulong(const OSSL_PARAM *p, unsigned long int *val);
|
| 107 |
+
int OSSL_PARAM_get_int32(const OSSL_PARAM *p, int32_t *val);
|
| 108 |
+
int OSSL_PARAM_get_uint32(const OSSL_PARAM *p, uint32_t *val);
|
| 109 |
+
int OSSL_PARAM_get_int64(const OSSL_PARAM *p, int64_t *val);
|
| 110 |
+
int OSSL_PARAM_get_uint64(const OSSL_PARAM *p, uint64_t *val);
|
| 111 |
+
int OSSL_PARAM_get_size_t(const OSSL_PARAM *p, size_t *val);
|
| 112 |
+
int OSSL_PARAM_get_time_t(const OSSL_PARAM *p, time_t *val);
|
| 113 |
+
|
| 114 |
+
int OSSL_PARAM_set_int(OSSL_PARAM *p, int val);
|
| 115 |
+
int OSSL_PARAM_set_uint(OSSL_PARAM *p, unsigned int val);
|
| 116 |
+
int OSSL_PARAM_set_long(OSSL_PARAM *p, long int val);
|
| 117 |
+
int OSSL_PARAM_set_ulong(OSSL_PARAM *p, unsigned long int val);
|
| 118 |
+
int OSSL_PARAM_set_int32(OSSL_PARAM *p, int32_t val);
|
| 119 |
+
int OSSL_PARAM_set_uint32(OSSL_PARAM *p, uint32_t val);
|
| 120 |
+
int OSSL_PARAM_set_int64(OSSL_PARAM *p, int64_t val);
|
| 121 |
+
int OSSL_PARAM_set_uint64(OSSL_PARAM *p, uint64_t val);
|
| 122 |
+
int OSSL_PARAM_set_size_t(OSSL_PARAM *p, size_t val);
|
| 123 |
+
int OSSL_PARAM_set_time_t(OSSL_PARAM *p, time_t val);
|
| 124 |
+
|
| 125 |
+
int OSSL_PARAM_get_double(const OSSL_PARAM *p, double *val);
|
| 126 |
+
int OSSL_PARAM_set_double(OSSL_PARAM *p, double val);
|
| 127 |
+
|
| 128 |
+
int OSSL_PARAM_get_BN(const OSSL_PARAM *p, BIGNUM **val);
|
| 129 |
+
int OSSL_PARAM_set_BN(OSSL_PARAM *p, const BIGNUM *val);
|
| 130 |
+
|
| 131 |
+
int OSSL_PARAM_get_utf8_string(const OSSL_PARAM *p, char **val, size_t max_len);
|
| 132 |
+
int OSSL_PARAM_set_utf8_string(OSSL_PARAM *p, const char *val);
|
| 133 |
+
|
| 134 |
+
int OSSL_PARAM_get_octet_string(const OSSL_PARAM *p, void **val, size_t max_len,
|
| 135 |
+
size_t *used_len);
|
| 136 |
+
int OSSL_PARAM_set_octet_string(OSSL_PARAM *p, const void *val, size_t len);
|
| 137 |
+
|
| 138 |
+
int OSSL_PARAM_get_utf8_ptr(const OSSL_PARAM *p, const char **val);
|
| 139 |
+
int OSSL_PARAM_set_utf8_ptr(OSSL_PARAM *p, const char *val);
|
| 140 |
+
|
| 141 |
+
int OSSL_PARAM_get_octet_ptr(const OSSL_PARAM *p, const void **val,
|
| 142 |
+
size_t *used_len);
|
| 143 |
+
int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val,
|
| 144 |
+
size_t used_len);
|
| 145 |
+
|
| 146 |
+
int OSSL_PARAM_get_utf8_string_ptr(const OSSL_PARAM *p, const char **val);
|
| 147 |
+
int OSSL_PARAM_get_octet_string_ptr(const OSSL_PARAM *p, const void **val,
|
| 148 |
+
size_t *used_len);
|
| 149 |
+
|
| 150 |
+
int OSSL_PARAM_modified(const OSSL_PARAM *p);
|
| 151 |
+
void OSSL_PARAM_set_all_unmodified(OSSL_PARAM *p);
|
| 152 |
+
|
| 153 |
+
OSSL_PARAM *OSSL_PARAM_dup(const OSSL_PARAM *p);
|
| 154 |
+
OSSL_PARAM *OSSL_PARAM_merge(const OSSL_PARAM *p1, const OSSL_PARAM *p2);
|
| 155 |
+
void OSSL_PARAM_free(OSSL_PARAM *p);
|
| 156 |
+
|
| 157 |
+
# ifdef __cplusplus
|
| 158 |
+
}
|
| 159 |
+
# endif
|
| 160 |
+
#endif
|
llava_next/include/openssl/pkcs12err.h
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_PKCS12ERR_H
|
| 12 |
+
# define OPENSSL_PKCS12ERR_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/opensslconf.h>
|
| 16 |
+
# include <openssl/symhacks.h>
|
| 17 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* PKCS12 reason codes.
|
| 23 |
+
*/
|
| 24 |
+
# define PKCS12_R_CANT_PACK_STRUCTURE 100
|
| 25 |
+
# define PKCS12_R_CONTENT_TYPE_NOT_DATA 121
|
| 26 |
+
# define PKCS12_R_DECODE_ERROR 101
|
| 27 |
+
# define PKCS12_R_ENCODE_ERROR 102
|
| 28 |
+
# define PKCS12_R_ENCRYPT_ERROR 103
|
| 29 |
+
# define PKCS12_R_ERROR_SETTING_ENCRYPTED_DATA_TYPE 120
|
| 30 |
+
# define PKCS12_R_INVALID_NULL_ARGUMENT 104
|
| 31 |
+
# define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105
|
| 32 |
+
# define PKCS12_R_INVALID_TYPE 112
|
| 33 |
+
# define PKCS12_R_IV_GEN_ERROR 106
|
| 34 |
+
# define PKCS12_R_KEY_GEN_ERROR 107
|
| 35 |
+
# define PKCS12_R_MAC_ABSENT 108
|
| 36 |
+
# define PKCS12_R_MAC_GENERATION_ERROR 109
|
| 37 |
+
# define PKCS12_R_MAC_SETUP_ERROR 110
|
| 38 |
+
# define PKCS12_R_MAC_STRING_SET_ERROR 111
|
| 39 |
+
# define PKCS12_R_MAC_VERIFY_FAILURE 113
|
| 40 |
+
# define PKCS12_R_PARSE_ERROR 114
|
| 41 |
+
# define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116
|
| 42 |
+
# define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118
|
| 43 |
+
# define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119
|
| 44 |
+
|
| 45 |
+
#endif
|
llava_next/include/openssl/provider.h
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2019-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_PROVIDER_H
|
| 11 |
+
# define OPENSSL_PROVIDER_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/core.h>
|
| 15 |
+
|
| 16 |
+
# ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
# endif
|
| 19 |
+
|
| 20 |
+
/* Set the default provider search path */
|
| 21 |
+
int OSSL_PROVIDER_set_default_search_path(OSSL_LIB_CTX *, const char *path);
|
| 22 |
+
|
| 23 |
+
/* Load and unload a provider */
|
| 24 |
+
OSSL_PROVIDER *OSSL_PROVIDER_load(OSSL_LIB_CTX *, const char *name);
|
| 25 |
+
OSSL_PROVIDER *OSSL_PROVIDER_try_load(OSSL_LIB_CTX *, const char *name,
|
| 26 |
+
int retain_fallbacks);
|
| 27 |
+
int OSSL_PROVIDER_unload(OSSL_PROVIDER *prov);
|
| 28 |
+
int OSSL_PROVIDER_available(OSSL_LIB_CTX *, const char *name);
|
| 29 |
+
int OSSL_PROVIDER_do_all(OSSL_LIB_CTX *ctx,
|
| 30 |
+
int (*cb)(OSSL_PROVIDER *provider, void *cbdata),
|
| 31 |
+
void *cbdata);
|
| 32 |
+
|
| 33 |
+
const OSSL_PARAM *OSSL_PROVIDER_gettable_params(const OSSL_PROVIDER *prov);
|
| 34 |
+
int OSSL_PROVIDER_get_params(const OSSL_PROVIDER *prov, OSSL_PARAM params[]);
|
| 35 |
+
int OSSL_PROVIDER_self_test(const OSSL_PROVIDER *prov);
|
| 36 |
+
int OSSL_PROVIDER_get_capabilities(const OSSL_PROVIDER *prov,
|
| 37 |
+
const char *capability,
|
| 38 |
+
OSSL_CALLBACK *cb,
|
| 39 |
+
void *arg);
|
| 40 |
+
|
| 41 |
+
const OSSL_ALGORITHM *OSSL_PROVIDER_query_operation(const OSSL_PROVIDER *prov,
|
| 42 |
+
int operation_id,
|
| 43 |
+
int *no_cache);
|
| 44 |
+
void OSSL_PROVIDER_unquery_operation(const OSSL_PROVIDER *prov,
|
| 45 |
+
int operation_id, const OSSL_ALGORITHM *algs);
|
| 46 |
+
void *OSSL_PROVIDER_get0_provider_ctx(const OSSL_PROVIDER *prov);
|
| 47 |
+
const OSSL_DISPATCH *OSSL_PROVIDER_get0_dispatch(const OSSL_PROVIDER *prov);
|
| 48 |
+
|
| 49 |
+
/* Add a built in providers */
|
| 50 |
+
int OSSL_PROVIDER_add_builtin(OSSL_LIB_CTX *, const char *name,
|
| 51 |
+
OSSL_provider_init_fn *init_fn);
|
| 52 |
+
|
| 53 |
+
/* Information */
|
| 54 |
+
const char *OSSL_PROVIDER_get0_name(const OSSL_PROVIDER *prov);
|
| 55 |
+
|
| 56 |
+
# ifdef __cplusplus
|
| 57 |
+
}
|
| 58 |
+
# endif
|
| 59 |
+
|
| 60 |
+
#endif
|
llava_next/include/openssl/rand.h
ADDED
|
@@ -0,0 +1,123 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_RAND_H
|
| 11 |
+
# define OPENSSL_RAND_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/macros.h>
|
| 15 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
# define HEADER_RAND_H
|
| 17 |
+
# endif
|
| 18 |
+
|
| 19 |
+
# include <stdlib.h>
|
| 20 |
+
# include <openssl/types.h>
|
| 21 |
+
# include <openssl/e_os2.h>
|
| 22 |
+
# include <openssl/randerr.h>
|
| 23 |
+
# include <openssl/evp.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
/*
|
| 30 |
+
* Default security strength (in the sense of [NIST SP 800-90Ar1])
|
| 31 |
+
*
|
| 32 |
+
* NIST SP 800-90Ar1 supports the strength of the DRBG being smaller than that
|
| 33 |
+
* of the cipher by collecting less entropy. The current DRBG implementation
|
| 34 |
+
* does not take RAND_DRBG_STRENGTH into account and sets the strength of the
|
| 35 |
+
* DRBG to that of the cipher.
|
| 36 |
+
*/
|
| 37 |
+
# define RAND_DRBG_STRENGTH 256
|
| 38 |
+
|
| 39 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 40 |
+
struct rand_meth_st {
|
| 41 |
+
int (*seed) (const void *buf, int num);
|
| 42 |
+
int (*bytes) (unsigned char *buf, int num);
|
| 43 |
+
void (*cleanup) (void);
|
| 44 |
+
int (*add) (const void *buf, int num, double randomness);
|
| 45 |
+
int (*pseudorand) (unsigned char *buf, int num);
|
| 46 |
+
int (*status) (void);
|
| 47 |
+
};
|
| 48 |
+
|
| 49 |
+
OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void);
|
| 51 |
+
# ifndef OPENSSL_NO_ENGINE
|
| 52 |
+
OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_engine(ENGINE *engine);
|
| 53 |
+
# endif
|
| 54 |
+
|
| 55 |
+
OSSL_DEPRECATEDIN_3_0 RAND_METHOD *RAND_OpenSSL(void);
|
| 56 |
+
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
| 57 |
+
|
| 58 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 59 |
+
# define RAND_cleanup() while(0) continue
|
| 60 |
+
# endif
|
| 61 |
+
int RAND_bytes(unsigned char *buf, int num);
|
| 62 |
+
int RAND_priv_bytes(unsigned char *buf, int num);
|
| 63 |
+
|
| 64 |
+
/*
|
| 65 |
+
* Equivalent of RAND_priv_bytes() but additionally taking an OSSL_LIB_CTX and
|
| 66 |
+
* a strength.
|
| 67 |
+
*/
|
| 68 |
+
int RAND_priv_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
|
| 69 |
+
unsigned int strength);
|
| 70 |
+
|
| 71 |
+
/*
|
| 72 |
+
* Equivalent of RAND_bytes() but additionally taking an OSSL_LIB_CTX and
|
| 73 |
+
* a strength.
|
| 74 |
+
*/
|
| 75 |
+
int RAND_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num,
|
| 76 |
+
unsigned int strength);
|
| 77 |
+
|
| 78 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 79 |
+
OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
|
| 80 |
+
# endif
|
| 81 |
+
|
| 82 |
+
EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx);
|
| 83 |
+
EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx);
|
| 84 |
+
EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx);
|
| 85 |
+
|
| 86 |
+
int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
|
| 87 |
+
const char *cipher, const char *digest);
|
| 88 |
+
int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed,
|
| 89 |
+
const char *propq);
|
| 90 |
+
|
| 91 |
+
void RAND_seed(const void *buf, int num);
|
| 92 |
+
void RAND_keep_random_devices_open(int keep);
|
| 93 |
+
|
| 94 |
+
# if defined(__ANDROID__) && defined(__NDK_FPABI__)
|
| 95 |
+
__NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */
|
| 96 |
+
# endif
|
| 97 |
+
void RAND_add(const void *buf, int num, double randomness);
|
| 98 |
+
int RAND_load_file(const char *file, long max_bytes);
|
| 99 |
+
int RAND_write_file(const char *file);
|
| 100 |
+
const char *RAND_file_name(char *file, size_t num);
|
| 101 |
+
int RAND_status(void);
|
| 102 |
+
|
| 103 |
+
# ifndef OPENSSL_NO_EGD
|
| 104 |
+
int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes);
|
| 105 |
+
int RAND_egd(const char *path);
|
| 106 |
+
int RAND_egd_bytes(const char *path, int bytes);
|
| 107 |
+
# endif
|
| 108 |
+
|
| 109 |
+
int RAND_poll(void);
|
| 110 |
+
|
| 111 |
+
# if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H))
|
| 112 |
+
/* application has to include <windows.h> in order to use these */
|
| 113 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 114 |
+
OSSL_DEPRECATEDIN_1_1_0 void RAND_screen(void);
|
| 115 |
+
OSSL_DEPRECATEDIN_1_1_0 int RAND_event(UINT, WPARAM, LPARAM);
|
| 116 |
+
# endif
|
| 117 |
+
# endif
|
| 118 |
+
|
| 119 |
+
#ifdef __cplusplus
|
| 120 |
+
}
|
| 121 |
+
#endif
|
| 122 |
+
|
| 123 |
+
#endif
|
llava_next/include/openssl/randerr.h
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_RANDERR_H
|
| 12 |
+
# define OPENSSL_RANDERR_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/opensslconf.h>
|
| 16 |
+
# include <openssl/symhacks.h>
|
| 17 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* RAND reason codes.
|
| 23 |
+
*/
|
| 24 |
+
# define RAND_R_ADDITIONAL_INPUT_TOO_LONG 102
|
| 25 |
+
# define RAND_R_ALREADY_INSTANTIATED 103
|
| 26 |
+
# define RAND_R_ARGUMENT_OUT_OF_RANGE 105
|
| 27 |
+
# define RAND_R_CANNOT_OPEN_FILE 121
|
| 28 |
+
# define RAND_R_DRBG_ALREADY_INITIALIZED 129
|
| 29 |
+
# define RAND_R_DRBG_NOT_INITIALISED 104
|
| 30 |
+
# define RAND_R_ENTROPY_INPUT_TOO_LONG 106
|
| 31 |
+
# define RAND_R_ENTROPY_OUT_OF_RANGE 124
|
| 32 |
+
# define RAND_R_ERROR_ENTROPY_POOL_WAS_IGNORED 127
|
| 33 |
+
# define RAND_R_ERROR_INITIALISING_DRBG 107
|
| 34 |
+
# define RAND_R_ERROR_INSTANTIATING_DRBG 108
|
| 35 |
+
# define RAND_R_ERROR_RETRIEVING_ADDITIONAL_INPUT 109
|
| 36 |
+
# define RAND_R_ERROR_RETRIEVING_ENTROPY 110
|
| 37 |
+
# define RAND_R_ERROR_RETRIEVING_NONCE 111
|
| 38 |
+
# define RAND_R_FAILED_TO_CREATE_LOCK 126
|
| 39 |
+
# define RAND_R_FUNC_NOT_IMPLEMENTED 101
|
| 40 |
+
# define RAND_R_FWRITE_ERROR 123
|
| 41 |
+
# define RAND_R_GENERATE_ERROR 112
|
| 42 |
+
# define RAND_R_INSUFFICIENT_DRBG_STRENGTH 139
|
| 43 |
+
# define RAND_R_INTERNAL_ERROR 113
|
| 44 |
+
# define RAND_R_IN_ERROR_STATE 114
|
| 45 |
+
# define RAND_R_NOT_A_REGULAR_FILE 122
|
| 46 |
+
# define RAND_R_NOT_INSTANTIATED 115
|
| 47 |
+
# define RAND_R_NO_DRBG_IMPLEMENTATION_SELECTED 128
|
| 48 |
+
# define RAND_R_PARENT_LOCKING_NOT_ENABLED 130
|
| 49 |
+
# define RAND_R_PARENT_STRENGTH_TOO_WEAK 131
|
| 50 |
+
# define RAND_R_PERSONALISATION_STRING_TOO_LONG 116
|
| 51 |
+
# define RAND_R_PREDICTION_RESISTANCE_NOT_SUPPORTED 133
|
| 52 |
+
# define RAND_R_PRNG_NOT_SEEDED 100
|
| 53 |
+
# define RAND_R_RANDOM_POOL_OVERFLOW 125
|
| 54 |
+
# define RAND_R_RANDOM_POOL_UNDERFLOW 134
|
| 55 |
+
# define RAND_R_REQUEST_TOO_LARGE_FOR_DRBG 117
|
| 56 |
+
# define RAND_R_RESEED_ERROR 118
|
| 57 |
+
# define RAND_R_SELFTEST_FAILURE 119
|
| 58 |
+
# define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135
|
| 59 |
+
# define RAND_R_TOO_MUCH_NONCE_REQUESTED 136
|
| 60 |
+
# define RAND_R_UNABLE_TO_CREATE_DRBG 143
|
| 61 |
+
# define RAND_R_UNABLE_TO_FETCH_DRBG 144
|
| 62 |
+
# define RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER 141
|
| 63 |
+
# define RAND_R_UNABLE_TO_GET_PARENT_STRENGTH 138
|
| 64 |
+
# define RAND_R_UNABLE_TO_LOCK_PARENT 140
|
| 65 |
+
# define RAND_R_UNSUPPORTED_DRBG_FLAGS 132
|
| 66 |
+
# define RAND_R_UNSUPPORTED_DRBG_TYPE 120
|
| 67 |
+
|
| 68 |
+
#endif
|
llava_next/include/openssl/rc5.h
ADDED
|
@@ -0,0 +1,79 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_RC5_H
|
| 11 |
+
# define OPENSSL_RC5_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/macros.h>
|
| 15 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
# define HEADER_RC5_H
|
| 17 |
+
# endif
|
| 18 |
+
|
| 19 |
+
# include <openssl/opensslconf.h>
|
| 20 |
+
|
| 21 |
+
# ifndef OPENSSL_NO_RC5
|
| 22 |
+
# ifdef __cplusplus
|
| 23 |
+
extern "C" {
|
| 24 |
+
# endif
|
| 25 |
+
|
| 26 |
+
# define RC5_32_BLOCK 8
|
| 27 |
+
# define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */
|
| 28 |
+
|
| 29 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 30 |
+
# define RC5_ENCRYPT 1
|
| 31 |
+
# define RC5_DECRYPT 0
|
| 32 |
+
|
| 33 |
+
# define RC5_32_INT unsigned int
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* This are the only values supported. Tweak the code if you want more The
|
| 37 |
+
* most supported modes will be RC5-32/12/16 RC5-32/16/8
|
| 38 |
+
*/
|
| 39 |
+
# define RC5_8_ROUNDS 8
|
| 40 |
+
# define RC5_12_ROUNDS 12
|
| 41 |
+
# define RC5_16_ROUNDS 16
|
| 42 |
+
|
| 43 |
+
typedef struct rc5_key_st {
|
| 44 |
+
/* Number of rounds */
|
| 45 |
+
int rounds;
|
| 46 |
+
RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)];
|
| 47 |
+
} RC5_32_KEY;
|
| 48 |
+
# endif
|
| 49 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 50 |
+
OSSL_DEPRECATEDIN_3_0 int RC5_32_set_key(RC5_32_KEY *key, int len,
|
| 51 |
+
const unsigned char *data,
|
| 52 |
+
int rounds);
|
| 53 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_ecb_encrypt(const unsigned char *in,
|
| 54 |
+
unsigned char *out,
|
| 55 |
+
RC5_32_KEY *key,
|
| 56 |
+
int enc);
|
| 57 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key);
|
| 58 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key);
|
| 59 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_cbc_encrypt(const unsigned char *in,
|
| 60 |
+
unsigned char *out, long length,
|
| 61 |
+
RC5_32_KEY *ks, unsigned char *iv,
|
| 62 |
+
int enc);
|
| 63 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_cfb64_encrypt(const unsigned char *in,
|
| 64 |
+
unsigned char *out, long length,
|
| 65 |
+
RC5_32_KEY *schedule,
|
| 66 |
+
unsigned char *ivec, int *num,
|
| 67 |
+
int enc);
|
| 68 |
+
OSSL_DEPRECATEDIN_3_0 void RC5_32_ofb64_encrypt(const unsigned char *in,
|
| 69 |
+
unsigned char *out, long length,
|
| 70 |
+
RC5_32_KEY *schedule,
|
| 71 |
+
unsigned char *ivec, int *num);
|
| 72 |
+
# endif
|
| 73 |
+
|
| 74 |
+
# ifdef __cplusplus
|
| 75 |
+
}
|
| 76 |
+
# endif
|
| 77 |
+
# endif
|
| 78 |
+
|
| 79 |
+
#endif
|
llava_next/include/openssl/rsaerr.h
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_RSAERR_H
|
| 12 |
+
# define OPENSSL_RSAERR_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/opensslconf.h>
|
| 16 |
+
# include <openssl/symhacks.h>
|
| 17 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* RSA reason codes.
|
| 23 |
+
*/
|
| 24 |
+
# define RSA_R_ALGORITHM_MISMATCH 100
|
| 25 |
+
# define RSA_R_BAD_E_VALUE 101
|
| 26 |
+
# define RSA_R_BAD_FIXED_HEADER_DECRYPT 102
|
| 27 |
+
# define RSA_R_BAD_PAD_BYTE_COUNT 103
|
| 28 |
+
# define RSA_R_BAD_SIGNATURE 104
|
| 29 |
+
# define RSA_R_BLOCK_TYPE_IS_NOT_01 106
|
| 30 |
+
# define RSA_R_BLOCK_TYPE_IS_NOT_02 107
|
| 31 |
+
# define RSA_R_DATA_GREATER_THAN_MOD_LEN 108
|
| 32 |
+
# define RSA_R_DATA_TOO_LARGE 109
|
| 33 |
+
# define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110
|
| 34 |
+
# define RSA_R_DATA_TOO_LARGE_FOR_MODULUS 132
|
| 35 |
+
# define RSA_R_DATA_TOO_SMALL 111
|
| 36 |
+
# define RSA_R_DATA_TOO_SMALL_FOR_KEY_SIZE 122
|
| 37 |
+
# define RSA_R_DIGEST_DOES_NOT_MATCH 158
|
| 38 |
+
# define RSA_R_DIGEST_NOT_ALLOWED 145
|
| 39 |
+
# define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112
|
| 40 |
+
# define RSA_R_DMP1_NOT_CONGRUENT_TO_D 124
|
| 41 |
+
# define RSA_R_DMQ1_NOT_CONGRUENT_TO_D 125
|
| 42 |
+
# define RSA_R_D_E_NOT_CONGRUENT_TO_1 123
|
| 43 |
+
# define RSA_R_FIRST_OCTET_INVALID 133
|
| 44 |
+
# define RSA_R_ILLEGAL_OR_UNSUPPORTED_PADDING_MODE 144
|
| 45 |
+
# define RSA_R_INVALID_DIGEST 157
|
| 46 |
+
# define RSA_R_INVALID_DIGEST_LENGTH 143
|
| 47 |
+
# define RSA_R_INVALID_HEADER 137
|
| 48 |
+
# define RSA_R_INVALID_KEYPAIR 171
|
| 49 |
+
# define RSA_R_INVALID_KEY_LENGTH 173
|
| 50 |
+
# define RSA_R_INVALID_LABEL 160
|
| 51 |
+
# define RSA_R_INVALID_LENGTH 181
|
| 52 |
+
# define RSA_R_INVALID_MESSAGE_LENGTH 131
|
| 53 |
+
# define RSA_R_INVALID_MGF1_MD 156
|
| 54 |
+
# define RSA_R_INVALID_MODULUS 174
|
| 55 |
+
# define RSA_R_INVALID_MULTI_PRIME_KEY 167
|
| 56 |
+
# define RSA_R_INVALID_OAEP_PARAMETERS 161
|
| 57 |
+
# define RSA_R_INVALID_PADDING 138
|
| 58 |
+
# define RSA_R_INVALID_PADDING_MODE 141
|
| 59 |
+
# define RSA_R_INVALID_PSS_PARAMETERS 149
|
| 60 |
+
# define RSA_R_INVALID_PSS_SALTLEN 146
|
| 61 |
+
# define RSA_R_INVALID_REQUEST 175
|
| 62 |
+
# define RSA_R_INVALID_SALT_LENGTH 150
|
| 63 |
+
# define RSA_R_INVALID_STRENGTH 176
|
| 64 |
+
# define RSA_R_INVALID_TRAILER 139
|
| 65 |
+
# define RSA_R_INVALID_X931_DIGEST 142
|
| 66 |
+
# define RSA_R_IQMP_NOT_INVERSE_OF_Q 126
|
| 67 |
+
# define RSA_R_KEY_PRIME_NUM_INVALID 165
|
| 68 |
+
# define RSA_R_KEY_SIZE_TOO_SMALL 120
|
| 69 |
+
# define RSA_R_LAST_OCTET_INVALID 134
|
| 70 |
+
# define RSA_R_MGF1_DIGEST_NOT_ALLOWED 152
|
| 71 |
+
# define RSA_R_MISSING_PRIVATE_KEY 179
|
| 72 |
+
# define RSA_R_MODULUS_TOO_LARGE 105
|
| 73 |
+
# define RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R 168
|
| 74 |
+
# define RSA_R_MP_EXPONENT_NOT_CONGRUENT_TO_D 169
|
| 75 |
+
# define RSA_R_MP_R_NOT_PRIME 170
|
| 76 |
+
# define RSA_R_NO_PUBLIC_EXPONENT 140
|
| 77 |
+
# define RSA_R_NULL_BEFORE_BLOCK_MISSING 113
|
| 78 |
+
# define RSA_R_N_DOES_NOT_EQUAL_PRODUCT_OF_PRIMES 172
|
| 79 |
+
# define RSA_R_N_DOES_NOT_EQUAL_P_Q 127
|
| 80 |
+
# define RSA_R_OAEP_DECODING_ERROR 121
|
| 81 |
+
# define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 148
|
| 82 |
+
# define RSA_R_PADDING_CHECK_FAILED 114
|
| 83 |
+
# define RSA_R_PAIRWISE_TEST_FAILURE 177
|
| 84 |
+
# define RSA_R_PKCS_DECODING_ERROR 159
|
| 85 |
+
# define RSA_R_PSS_SALTLEN_TOO_SMALL 164
|
| 86 |
+
# define RSA_R_PUB_EXPONENT_OUT_OF_RANGE 178
|
| 87 |
+
# define RSA_R_P_NOT_PRIME 128
|
| 88 |
+
# define RSA_R_Q_NOT_PRIME 129
|
| 89 |
+
# define RSA_R_RANDOMNESS_SOURCE_STRENGTH_INSUFFICIENT 180
|
| 90 |
+
# define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130
|
| 91 |
+
# define RSA_R_SLEN_CHECK_FAILED 136
|
| 92 |
+
# define RSA_R_SLEN_RECOVERY_FAILED 135
|
| 93 |
+
# define RSA_R_SSLV3_ROLLBACK_ATTACK 115
|
| 94 |
+
# define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116
|
| 95 |
+
# define RSA_R_UNKNOWN_ALGORITHM_TYPE 117
|
| 96 |
+
# define RSA_R_UNKNOWN_DIGEST 166
|
| 97 |
+
# define RSA_R_UNKNOWN_MASK_DIGEST 151
|
| 98 |
+
# define RSA_R_UNKNOWN_PADDING_TYPE 118
|
| 99 |
+
# define RSA_R_UNSUPPORTED_ENCRYPTION_TYPE 162
|
| 100 |
+
# define RSA_R_UNSUPPORTED_LABEL_SOURCE 163
|
| 101 |
+
# define RSA_R_UNSUPPORTED_MASK_ALGORITHM 153
|
| 102 |
+
# define RSA_R_UNSUPPORTED_MASK_PARAMETER 154
|
| 103 |
+
# define RSA_R_UNSUPPORTED_SIGNATURE_TYPE 155
|
| 104 |
+
# define RSA_R_VALUE_MISSING 147
|
| 105 |
+
# define RSA_R_WRONG_SIGNATURE_LENGTH 119
|
| 106 |
+
|
| 107 |
+
#endif
|
llava_next/include/openssl/ssl3.h
ADDED
|
@@ -0,0 +1,347 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2021 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_SSL3_H
|
| 12 |
+
# define OPENSSL_SSL3_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/macros.h>
|
| 16 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 17 |
+
# define HEADER_SSL3_H
|
| 18 |
+
# endif
|
| 19 |
+
|
| 20 |
+
# include <openssl/comp.h>
|
| 21 |
+
# include <openssl/buffer.h>
|
| 22 |
+
# include <openssl/evp.h>
|
| 23 |
+
# include <openssl/ssl.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
/*
|
| 30 |
+
* Signalling cipher suite value from RFC 5746
|
| 31 |
+
* (TLS_EMPTY_RENEGOTIATION_INFO_SCSV)
|
| 32 |
+
*/
|
| 33 |
+
# define SSL3_CK_SCSV 0x030000FF
|
| 34 |
+
|
| 35 |
+
/*
|
| 36 |
+
* Signalling cipher suite value from draft-ietf-tls-downgrade-scsv-00
|
| 37 |
+
* (TLS_FALLBACK_SCSV)
|
| 38 |
+
*/
|
| 39 |
+
# define SSL3_CK_FALLBACK_SCSV 0x03005600
|
| 40 |
+
|
| 41 |
+
# define SSL3_CK_RSA_NULL_MD5 0x03000001
|
| 42 |
+
# define SSL3_CK_RSA_NULL_SHA 0x03000002
|
| 43 |
+
# define SSL3_CK_RSA_RC4_40_MD5 0x03000003
|
| 44 |
+
# define SSL3_CK_RSA_RC4_128_MD5 0x03000004
|
| 45 |
+
# define SSL3_CK_RSA_RC4_128_SHA 0x03000005
|
| 46 |
+
# define SSL3_CK_RSA_RC2_40_MD5 0x03000006
|
| 47 |
+
# define SSL3_CK_RSA_IDEA_128_SHA 0x03000007
|
| 48 |
+
# define SSL3_CK_RSA_DES_40_CBC_SHA 0x03000008
|
| 49 |
+
# define SSL3_CK_RSA_DES_64_CBC_SHA 0x03000009
|
| 50 |
+
# define SSL3_CK_RSA_DES_192_CBC3_SHA 0x0300000A
|
| 51 |
+
|
| 52 |
+
# define SSL3_CK_DH_DSS_DES_40_CBC_SHA 0x0300000B
|
| 53 |
+
# define SSL3_CK_DH_DSS_DES_64_CBC_SHA 0x0300000C
|
| 54 |
+
# define SSL3_CK_DH_DSS_DES_192_CBC3_SHA 0x0300000D
|
| 55 |
+
# define SSL3_CK_DH_RSA_DES_40_CBC_SHA 0x0300000E
|
| 56 |
+
# define SSL3_CK_DH_RSA_DES_64_CBC_SHA 0x0300000F
|
| 57 |
+
# define SSL3_CK_DH_RSA_DES_192_CBC3_SHA 0x03000010
|
| 58 |
+
|
| 59 |
+
# define SSL3_CK_DHE_DSS_DES_40_CBC_SHA 0x03000011
|
| 60 |
+
# define SSL3_CK_EDH_DSS_DES_40_CBC_SHA SSL3_CK_DHE_DSS_DES_40_CBC_SHA
|
| 61 |
+
# define SSL3_CK_DHE_DSS_DES_64_CBC_SHA 0x03000012
|
| 62 |
+
# define SSL3_CK_EDH_DSS_DES_64_CBC_SHA SSL3_CK_DHE_DSS_DES_64_CBC_SHA
|
| 63 |
+
# define SSL3_CK_DHE_DSS_DES_192_CBC3_SHA 0x03000013
|
| 64 |
+
# define SSL3_CK_EDH_DSS_DES_192_CBC3_SHA SSL3_CK_DHE_DSS_DES_192_CBC3_SHA
|
| 65 |
+
# define SSL3_CK_DHE_RSA_DES_40_CBC_SHA 0x03000014
|
| 66 |
+
# define SSL3_CK_EDH_RSA_DES_40_CBC_SHA SSL3_CK_DHE_RSA_DES_40_CBC_SHA
|
| 67 |
+
# define SSL3_CK_DHE_RSA_DES_64_CBC_SHA 0x03000015
|
| 68 |
+
# define SSL3_CK_EDH_RSA_DES_64_CBC_SHA SSL3_CK_DHE_RSA_DES_64_CBC_SHA
|
| 69 |
+
# define SSL3_CK_DHE_RSA_DES_192_CBC3_SHA 0x03000016
|
| 70 |
+
# define SSL3_CK_EDH_RSA_DES_192_CBC3_SHA SSL3_CK_DHE_RSA_DES_192_CBC3_SHA
|
| 71 |
+
|
| 72 |
+
# define SSL3_CK_ADH_RC4_40_MD5 0x03000017
|
| 73 |
+
# define SSL3_CK_ADH_RC4_128_MD5 0x03000018
|
| 74 |
+
# define SSL3_CK_ADH_DES_40_CBC_SHA 0x03000019
|
| 75 |
+
# define SSL3_CK_ADH_DES_64_CBC_SHA 0x0300001A
|
| 76 |
+
# define SSL3_CK_ADH_DES_192_CBC_SHA 0x0300001B
|
| 77 |
+
|
| 78 |
+
/* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */
|
| 79 |
+
# define SSL3_RFC_RSA_NULL_MD5 "TLS_RSA_WITH_NULL_MD5"
|
| 80 |
+
# define SSL3_RFC_RSA_NULL_SHA "TLS_RSA_WITH_NULL_SHA"
|
| 81 |
+
# define SSL3_RFC_RSA_DES_192_CBC3_SHA "TLS_RSA_WITH_3DES_EDE_CBC_SHA"
|
| 82 |
+
# define SSL3_RFC_DHE_DSS_DES_192_CBC3_SHA "TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA"
|
| 83 |
+
# define SSL3_RFC_DHE_RSA_DES_192_CBC3_SHA "TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA"
|
| 84 |
+
# define SSL3_RFC_ADH_DES_192_CBC_SHA "TLS_DH_anon_WITH_3DES_EDE_CBC_SHA"
|
| 85 |
+
# define SSL3_RFC_RSA_IDEA_128_SHA "TLS_RSA_WITH_IDEA_CBC_SHA"
|
| 86 |
+
# define SSL3_RFC_RSA_RC4_128_MD5 "TLS_RSA_WITH_RC4_128_MD5"
|
| 87 |
+
# define SSL3_RFC_RSA_RC4_128_SHA "TLS_RSA_WITH_RC4_128_SHA"
|
| 88 |
+
# define SSL3_RFC_ADH_RC4_128_MD5 "TLS_DH_anon_WITH_RC4_128_MD5"
|
| 89 |
+
|
| 90 |
+
# define SSL3_TXT_RSA_NULL_MD5 "NULL-MD5"
|
| 91 |
+
# define SSL3_TXT_RSA_NULL_SHA "NULL-SHA"
|
| 92 |
+
# define SSL3_TXT_RSA_RC4_40_MD5 "EXP-RC4-MD5"
|
| 93 |
+
# define SSL3_TXT_RSA_RC4_128_MD5 "RC4-MD5"
|
| 94 |
+
# define SSL3_TXT_RSA_RC4_128_SHA "RC4-SHA"
|
| 95 |
+
# define SSL3_TXT_RSA_RC2_40_MD5 "EXP-RC2-CBC-MD5"
|
| 96 |
+
# define SSL3_TXT_RSA_IDEA_128_SHA "IDEA-CBC-SHA"
|
| 97 |
+
# define SSL3_TXT_RSA_DES_40_CBC_SHA "EXP-DES-CBC-SHA"
|
| 98 |
+
# define SSL3_TXT_RSA_DES_64_CBC_SHA "DES-CBC-SHA"
|
| 99 |
+
# define SSL3_TXT_RSA_DES_192_CBC3_SHA "DES-CBC3-SHA"
|
| 100 |
+
|
| 101 |
+
# define SSL3_TXT_DH_DSS_DES_40_CBC_SHA "EXP-DH-DSS-DES-CBC-SHA"
|
| 102 |
+
# define SSL3_TXT_DH_DSS_DES_64_CBC_SHA "DH-DSS-DES-CBC-SHA"
|
| 103 |
+
# define SSL3_TXT_DH_DSS_DES_192_CBC3_SHA "DH-DSS-DES-CBC3-SHA"
|
| 104 |
+
# define SSL3_TXT_DH_RSA_DES_40_CBC_SHA "EXP-DH-RSA-DES-CBC-SHA"
|
| 105 |
+
# define SSL3_TXT_DH_RSA_DES_64_CBC_SHA "DH-RSA-DES-CBC-SHA"
|
| 106 |
+
# define SSL3_TXT_DH_RSA_DES_192_CBC3_SHA "DH-RSA-DES-CBC3-SHA"
|
| 107 |
+
|
| 108 |
+
# define SSL3_TXT_DHE_DSS_DES_40_CBC_SHA "EXP-DHE-DSS-DES-CBC-SHA"
|
| 109 |
+
# define SSL3_TXT_DHE_DSS_DES_64_CBC_SHA "DHE-DSS-DES-CBC-SHA"
|
| 110 |
+
# define SSL3_TXT_DHE_DSS_DES_192_CBC3_SHA "DHE-DSS-DES-CBC3-SHA"
|
| 111 |
+
# define SSL3_TXT_DHE_RSA_DES_40_CBC_SHA "EXP-DHE-RSA-DES-CBC-SHA"
|
| 112 |
+
# define SSL3_TXT_DHE_RSA_DES_64_CBC_SHA "DHE-RSA-DES-CBC-SHA"
|
| 113 |
+
# define SSL3_TXT_DHE_RSA_DES_192_CBC3_SHA "DHE-RSA-DES-CBC3-SHA"
|
| 114 |
+
|
| 115 |
+
/*
|
| 116 |
+
* This next block of six "EDH" labels is for backward compatibility with
|
| 117 |
+
* older versions of OpenSSL. New code should use the six "DHE" labels above
|
| 118 |
+
* instead:
|
| 119 |
+
*/
|
| 120 |
+
# define SSL3_TXT_EDH_DSS_DES_40_CBC_SHA "EXP-EDH-DSS-DES-CBC-SHA"
|
| 121 |
+
# define SSL3_TXT_EDH_DSS_DES_64_CBC_SHA "EDH-DSS-DES-CBC-SHA"
|
| 122 |
+
# define SSL3_TXT_EDH_DSS_DES_192_CBC3_SHA "EDH-DSS-DES-CBC3-SHA"
|
| 123 |
+
# define SSL3_TXT_EDH_RSA_DES_40_CBC_SHA "EXP-EDH-RSA-DES-CBC-SHA"
|
| 124 |
+
# define SSL3_TXT_EDH_RSA_DES_64_CBC_SHA "EDH-RSA-DES-CBC-SHA"
|
| 125 |
+
# define SSL3_TXT_EDH_RSA_DES_192_CBC3_SHA "EDH-RSA-DES-CBC3-SHA"
|
| 126 |
+
|
| 127 |
+
# define SSL3_TXT_ADH_RC4_40_MD5 "EXP-ADH-RC4-MD5"
|
| 128 |
+
# define SSL3_TXT_ADH_RC4_128_MD5 "ADH-RC4-MD5"
|
| 129 |
+
# define SSL3_TXT_ADH_DES_40_CBC_SHA "EXP-ADH-DES-CBC-SHA"
|
| 130 |
+
# define SSL3_TXT_ADH_DES_64_CBC_SHA "ADH-DES-CBC-SHA"
|
| 131 |
+
# define SSL3_TXT_ADH_DES_192_CBC_SHA "ADH-DES-CBC3-SHA"
|
| 132 |
+
|
| 133 |
+
# define SSL3_SSL_SESSION_ID_LENGTH 32
|
| 134 |
+
# define SSL3_MAX_SSL_SESSION_ID_LENGTH 32
|
| 135 |
+
|
| 136 |
+
# define SSL3_MASTER_SECRET_SIZE 48
|
| 137 |
+
# define SSL3_RANDOM_SIZE 32
|
| 138 |
+
# define SSL3_SESSION_ID_SIZE 32
|
| 139 |
+
# define SSL3_RT_HEADER_LENGTH 5
|
| 140 |
+
|
| 141 |
+
# define SSL3_HM_HEADER_LENGTH 4
|
| 142 |
+
|
| 143 |
+
# ifndef SSL3_ALIGN_PAYLOAD
|
| 144 |
+
/*
|
| 145 |
+
* Some will argue that this increases memory footprint, but it's not
|
| 146 |
+
* actually true. Point is that malloc has to return at least 64-bit aligned
|
| 147 |
+
* pointers, meaning that allocating 5 bytes wastes 3 bytes in either case.
|
| 148 |
+
* Suggested pre-gaping simply moves these wasted bytes from the end of
|
| 149 |
+
* allocated region to its front, but makes data payload aligned, which
|
| 150 |
+
* improves performance:-)
|
| 151 |
+
*/
|
| 152 |
+
# define SSL3_ALIGN_PAYLOAD 8
|
| 153 |
+
# else
|
| 154 |
+
# if (SSL3_ALIGN_PAYLOAD&(SSL3_ALIGN_PAYLOAD-1))!=0
|
| 155 |
+
# error "insane SSL3_ALIGN_PAYLOAD"
|
| 156 |
+
# undef SSL3_ALIGN_PAYLOAD
|
| 157 |
+
# endif
|
| 158 |
+
# endif
|
| 159 |
+
|
| 160 |
+
/*
|
| 161 |
+
* This is the maximum MAC (digest) size used by the SSL library. Currently
|
| 162 |
+
* maximum of 20 is used by SHA1, but we reserve for future extension for
|
| 163 |
+
* 512-bit hashes.
|
| 164 |
+
*/
|
| 165 |
+
|
| 166 |
+
# define SSL3_RT_MAX_MD_SIZE 64
|
| 167 |
+
|
| 168 |
+
/*
|
| 169 |
+
* Maximum block size used in all ciphersuites. Currently 16 for AES.
|
| 170 |
+
*/
|
| 171 |
+
|
| 172 |
+
# define SSL_RT_MAX_CIPHER_BLOCK_SIZE 16
|
| 173 |
+
|
| 174 |
+
# define SSL3_RT_MAX_EXTRA (16384)
|
| 175 |
+
|
| 176 |
+
/* Maximum plaintext length: defined by SSL/TLS standards */
|
| 177 |
+
# define SSL3_RT_MAX_PLAIN_LENGTH 16384
|
| 178 |
+
/* Maximum compression overhead: defined by SSL/TLS standards */
|
| 179 |
+
# define SSL3_RT_MAX_COMPRESSED_OVERHEAD 1024
|
| 180 |
+
|
| 181 |
+
/*
|
| 182 |
+
* The standards give a maximum encryption overhead of 1024 bytes. In
|
| 183 |
+
* practice the value is lower than this. The overhead is the maximum number
|
| 184 |
+
* of padding bytes (256) plus the mac size.
|
| 185 |
+
*/
|
| 186 |
+
# define SSL3_RT_MAX_ENCRYPTED_OVERHEAD (256 + SSL3_RT_MAX_MD_SIZE)
|
| 187 |
+
# define SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD 256
|
| 188 |
+
|
| 189 |
+
/*
|
| 190 |
+
* OpenSSL currently only uses a padding length of at most one block so the
|
| 191 |
+
* send overhead is smaller.
|
| 192 |
+
*/
|
| 193 |
+
|
| 194 |
+
# define SSL3_RT_SEND_MAX_ENCRYPTED_OVERHEAD \
|
| 195 |
+
(SSL_RT_MAX_CIPHER_BLOCK_SIZE + SSL3_RT_MAX_MD_SIZE)
|
| 196 |
+
|
| 197 |
+
/* If compression isn't used don't include the compression overhead */
|
| 198 |
+
|
| 199 |
+
# ifdef OPENSSL_NO_COMP
|
| 200 |
+
# define SSL3_RT_MAX_COMPRESSED_LENGTH SSL3_RT_MAX_PLAIN_LENGTH
|
| 201 |
+
# else
|
| 202 |
+
# define SSL3_RT_MAX_COMPRESSED_LENGTH \
|
| 203 |
+
(SSL3_RT_MAX_PLAIN_LENGTH+SSL3_RT_MAX_COMPRESSED_OVERHEAD)
|
| 204 |
+
# endif
|
| 205 |
+
# define SSL3_RT_MAX_ENCRYPTED_LENGTH \
|
| 206 |
+
(SSL3_RT_MAX_ENCRYPTED_OVERHEAD+SSL3_RT_MAX_COMPRESSED_LENGTH)
|
| 207 |
+
# define SSL3_RT_MAX_TLS13_ENCRYPTED_LENGTH \
|
| 208 |
+
(SSL3_RT_MAX_PLAIN_LENGTH + SSL3_RT_MAX_TLS13_ENCRYPTED_OVERHEAD)
|
| 209 |
+
# define SSL3_RT_MAX_PACKET_SIZE \
|
| 210 |
+
(SSL3_RT_MAX_ENCRYPTED_LENGTH+SSL3_RT_HEADER_LENGTH)
|
| 211 |
+
|
| 212 |
+
# define SSL3_MD_CLIENT_FINISHED_CONST "\x43\x4C\x4E\x54"
|
| 213 |
+
# define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52"
|
| 214 |
+
|
| 215 |
+
/* SSL3_VERSION is defined in prov_ssl.h */
|
| 216 |
+
# define SSL3_VERSION_MAJOR 0x03
|
| 217 |
+
# define SSL3_VERSION_MINOR 0x00
|
| 218 |
+
|
| 219 |
+
# define SSL3_RT_CHANGE_CIPHER_SPEC 20
|
| 220 |
+
# define SSL3_RT_ALERT 21
|
| 221 |
+
# define SSL3_RT_HANDSHAKE 22
|
| 222 |
+
# define SSL3_RT_APPLICATION_DATA 23
|
| 223 |
+
|
| 224 |
+
/* Pseudo content types to indicate additional parameters */
|
| 225 |
+
# define TLS1_RT_CRYPTO 0x1000
|
| 226 |
+
# define TLS1_RT_CRYPTO_PREMASTER (TLS1_RT_CRYPTO | 0x1)
|
| 227 |
+
# define TLS1_RT_CRYPTO_CLIENT_RANDOM (TLS1_RT_CRYPTO | 0x2)
|
| 228 |
+
# define TLS1_RT_CRYPTO_SERVER_RANDOM (TLS1_RT_CRYPTO | 0x3)
|
| 229 |
+
# define TLS1_RT_CRYPTO_MASTER (TLS1_RT_CRYPTO | 0x4)
|
| 230 |
+
|
| 231 |
+
# define TLS1_RT_CRYPTO_READ 0x0000
|
| 232 |
+
# define TLS1_RT_CRYPTO_WRITE 0x0100
|
| 233 |
+
# define TLS1_RT_CRYPTO_MAC (TLS1_RT_CRYPTO | 0x5)
|
| 234 |
+
# define TLS1_RT_CRYPTO_KEY (TLS1_RT_CRYPTO | 0x6)
|
| 235 |
+
# define TLS1_RT_CRYPTO_IV (TLS1_RT_CRYPTO | 0x7)
|
| 236 |
+
# define TLS1_RT_CRYPTO_FIXED_IV (TLS1_RT_CRYPTO | 0x8)
|
| 237 |
+
|
| 238 |
+
/* Pseudo content types for SSL/TLS header info */
|
| 239 |
+
# define SSL3_RT_HEADER 0x100
|
| 240 |
+
# define SSL3_RT_INNER_CONTENT_TYPE 0x101
|
| 241 |
+
|
| 242 |
+
# define SSL3_AL_WARNING 1
|
| 243 |
+
# define SSL3_AL_FATAL 2
|
| 244 |
+
|
| 245 |
+
# define SSL3_AD_CLOSE_NOTIFY 0
|
| 246 |
+
# define SSL3_AD_UNEXPECTED_MESSAGE 10/* fatal */
|
| 247 |
+
# define SSL3_AD_BAD_RECORD_MAC 20/* fatal */
|
| 248 |
+
# define SSL3_AD_DECOMPRESSION_FAILURE 30/* fatal */
|
| 249 |
+
# define SSL3_AD_HANDSHAKE_FAILURE 40/* fatal */
|
| 250 |
+
# define SSL3_AD_NO_CERTIFICATE 41
|
| 251 |
+
# define SSL3_AD_BAD_CERTIFICATE 42
|
| 252 |
+
# define SSL3_AD_UNSUPPORTED_CERTIFICATE 43
|
| 253 |
+
# define SSL3_AD_CERTIFICATE_REVOKED 44
|
| 254 |
+
# define SSL3_AD_CERTIFICATE_EXPIRED 45
|
| 255 |
+
# define SSL3_AD_CERTIFICATE_UNKNOWN 46
|
| 256 |
+
# define SSL3_AD_ILLEGAL_PARAMETER 47/* fatal */
|
| 257 |
+
|
| 258 |
+
# define TLS1_HB_REQUEST 1
|
| 259 |
+
# define TLS1_HB_RESPONSE 2
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
# define SSL3_CT_RSA_SIGN 1
|
| 263 |
+
# define SSL3_CT_DSS_SIGN 2
|
| 264 |
+
# define SSL3_CT_RSA_FIXED_DH 3
|
| 265 |
+
# define SSL3_CT_DSS_FIXED_DH 4
|
| 266 |
+
# define SSL3_CT_RSA_EPHEMERAL_DH 5
|
| 267 |
+
# define SSL3_CT_DSS_EPHEMERAL_DH 6
|
| 268 |
+
# define SSL3_CT_FORTEZZA_DMS 20
|
| 269 |
+
/*
|
| 270 |
+
* SSL3_CT_NUMBER is used to size arrays and it must be large enough to
|
| 271 |
+
* contain all of the cert types defined for *either* SSLv3 and TLSv1.
|
| 272 |
+
*/
|
| 273 |
+
# define SSL3_CT_NUMBER 12
|
| 274 |
+
|
| 275 |
+
# if defined(TLS_CT_NUMBER)
|
| 276 |
+
# if TLS_CT_NUMBER != SSL3_CT_NUMBER
|
| 277 |
+
# error "SSL/TLS CT_NUMBER values do not match"
|
| 278 |
+
# endif
|
| 279 |
+
# endif
|
| 280 |
+
|
| 281 |
+
/* No longer used as of OpenSSL 1.1.1 */
|
| 282 |
+
# define SSL3_FLAGS_NO_RENEGOTIATE_CIPHERS 0x0001
|
| 283 |
+
|
| 284 |
+
/* Removed from OpenSSL 1.1.0 */
|
| 285 |
+
# define TLS1_FLAGS_TLS_PADDING_BUG 0x0
|
| 286 |
+
|
| 287 |
+
# define TLS1_FLAGS_SKIP_CERT_VERIFY 0x0010
|
| 288 |
+
|
| 289 |
+
/* Set if we encrypt then mac instead of usual mac then encrypt */
|
| 290 |
+
# define TLS1_FLAGS_ENCRYPT_THEN_MAC_READ 0x0100
|
| 291 |
+
# define TLS1_FLAGS_ENCRYPT_THEN_MAC TLS1_FLAGS_ENCRYPT_THEN_MAC_READ
|
| 292 |
+
|
| 293 |
+
/* Set if extended master secret extension received from peer */
|
| 294 |
+
# define TLS1_FLAGS_RECEIVED_EXTMS 0x0200
|
| 295 |
+
|
| 296 |
+
# define TLS1_FLAGS_ENCRYPT_THEN_MAC_WRITE 0x0400
|
| 297 |
+
|
| 298 |
+
# define TLS1_FLAGS_STATELESS 0x0800
|
| 299 |
+
|
| 300 |
+
/* Set if extended master secret extension required on renegotiation */
|
| 301 |
+
# define TLS1_FLAGS_REQUIRED_EXTMS 0x1000
|
| 302 |
+
|
| 303 |
+
# define SSL3_MT_HELLO_REQUEST 0
|
| 304 |
+
# define SSL3_MT_CLIENT_HELLO 1
|
| 305 |
+
# define SSL3_MT_SERVER_HELLO 2
|
| 306 |
+
# define SSL3_MT_NEWSESSION_TICKET 4
|
| 307 |
+
# define SSL3_MT_END_OF_EARLY_DATA 5
|
| 308 |
+
# define SSL3_MT_ENCRYPTED_EXTENSIONS 8
|
| 309 |
+
# define SSL3_MT_CERTIFICATE 11
|
| 310 |
+
# define SSL3_MT_SERVER_KEY_EXCHANGE 12
|
| 311 |
+
# define SSL3_MT_CERTIFICATE_REQUEST 13
|
| 312 |
+
# define SSL3_MT_SERVER_DONE 14
|
| 313 |
+
# define SSL3_MT_CERTIFICATE_VERIFY 15
|
| 314 |
+
# define SSL3_MT_CLIENT_KEY_EXCHANGE 16
|
| 315 |
+
# define SSL3_MT_FINISHED 20
|
| 316 |
+
# define SSL3_MT_CERTIFICATE_URL 21
|
| 317 |
+
# define SSL3_MT_CERTIFICATE_STATUS 22
|
| 318 |
+
# define SSL3_MT_SUPPLEMENTAL_DATA 23
|
| 319 |
+
# define SSL3_MT_KEY_UPDATE 24
|
| 320 |
+
# ifndef OPENSSL_NO_NEXTPROTONEG
|
| 321 |
+
# define SSL3_MT_NEXT_PROTO 67
|
| 322 |
+
# endif
|
| 323 |
+
# define SSL3_MT_MESSAGE_HASH 254
|
| 324 |
+
# define DTLS1_MT_HELLO_VERIFY_REQUEST 3
|
| 325 |
+
|
| 326 |
+
/* Dummy message type for handling CCS like a normal handshake message */
|
| 327 |
+
# define SSL3_MT_CHANGE_CIPHER_SPEC 0x0101
|
| 328 |
+
|
| 329 |
+
# define SSL3_MT_CCS 1
|
| 330 |
+
|
| 331 |
+
/* These are used when changing over to a new cipher */
|
| 332 |
+
# define SSL3_CC_READ 0x001
|
| 333 |
+
# define SSL3_CC_WRITE 0x002
|
| 334 |
+
# define SSL3_CC_CLIENT 0x010
|
| 335 |
+
# define SSL3_CC_SERVER 0x020
|
| 336 |
+
# define SSL3_CC_EARLY 0x040
|
| 337 |
+
# define SSL3_CC_HANDSHAKE 0x080
|
| 338 |
+
# define SSL3_CC_APPLICATION 0x100
|
| 339 |
+
# define SSL3_CHANGE_CIPHER_CLIENT_WRITE (SSL3_CC_CLIENT|SSL3_CC_WRITE)
|
| 340 |
+
# define SSL3_CHANGE_CIPHER_SERVER_READ (SSL3_CC_SERVER|SSL3_CC_READ)
|
| 341 |
+
# define SSL3_CHANGE_CIPHER_CLIENT_READ (SSL3_CC_CLIENT|SSL3_CC_READ)
|
| 342 |
+
# define SSL3_CHANGE_CIPHER_SERVER_WRITE (SSL3_CC_SERVER|SSL3_CC_WRITE)
|
| 343 |
+
|
| 344 |
+
#ifdef __cplusplus
|
| 345 |
+
}
|
| 346 |
+
#endif
|
| 347 |
+
#endif
|
llava_next/include/openssl/store.h
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2016-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_STORE_H
|
| 11 |
+
# define OPENSSL_STORE_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/macros.h>
|
| 15 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
# define HEADER_OSSL_STORE_H
|
| 17 |
+
# endif
|
| 18 |
+
|
| 19 |
+
# include <stdarg.h>
|
| 20 |
+
# include <openssl/types.h>
|
| 21 |
+
# include <openssl/pem.h>
|
| 22 |
+
# include <openssl/storeerr.h>
|
| 23 |
+
|
| 24 |
+
# ifdef __cplusplus
|
| 25 |
+
extern "C" {
|
| 26 |
+
# endif
|
| 27 |
+
|
| 28 |
+
/*-
|
| 29 |
+
* The main OSSL_STORE functions.
|
| 30 |
+
* ------------------------------
|
| 31 |
+
*
|
| 32 |
+
* These allow applications to open a channel to a resource with supported
|
| 33 |
+
* data (keys, certs, crls, ...), read the data a piece at a time and decide
|
| 34 |
+
* what to do with it, and finally close.
|
| 35 |
+
*/
|
| 36 |
+
|
| 37 |
+
typedef struct ossl_store_ctx_st OSSL_STORE_CTX;
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* Typedef for the OSSL_STORE_INFO post processing callback. This can be used
|
| 41 |
+
* to massage the given OSSL_STORE_INFO, or to drop it entirely (by returning
|
| 42 |
+
* NULL).
|
| 43 |
+
*/
|
| 44 |
+
typedef OSSL_STORE_INFO *(*OSSL_STORE_post_process_info_fn)(OSSL_STORE_INFO *,
|
| 45 |
+
void *);
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* Open a channel given a URI. The given UI method will be used any time the
|
| 49 |
+
* loader needs extra input, for example when a password or pin is needed, and
|
| 50 |
+
* will be passed the same user data every time it's needed in this context.
|
| 51 |
+
*
|
| 52 |
+
* Returns a context reference which represents the channel to communicate
|
| 53 |
+
* through.
|
| 54 |
+
*/
|
| 55 |
+
OSSL_STORE_CTX *
|
| 56 |
+
OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, void *ui_data,
|
| 57 |
+
OSSL_STORE_post_process_info_fn post_process,
|
| 58 |
+
void *post_process_data);
|
| 59 |
+
OSSL_STORE_CTX *
|
| 60 |
+
OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq,
|
| 61 |
+
const UI_METHOD *ui_method, void *ui_data,
|
| 62 |
+
const OSSL_PARAM params[],
|
| 63 |
+
OSSL_STORE_post_process_info_fn post_process,
|
| 64 |
+
void *post_process_data);
|
| 65 |
+
|
| 66 |
+
/*
|
| 67 |
+
* Control / fine tune the OSSL_STORE channel. |cmd| determines what is to be
|
| 68 |
+
* done, and depends on the underlying loader (use OSSL_STORE_get0_scheme to
|
| 69 |
+
* determine which loader is used), except for common commands (see below).
|
| 70 |
+
* Each command takes different arguments.
|
| 71 |
+
*/
|
| 72 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 73 |
+
OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd,
|
| 74 |
+
... /* args */);
|
| 75 |
+
OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd,
|
| 76 |
+
va_list args);
|
| 77 |
+
# endif
|
| 78 |
+
|
| 79 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* Common ctrl commands that different loaders may choose to support.
|
| 83 |
+
*/
|
| 84 |
+
/* int on = 0 or 1; STORE_ctrl(ctx, STORE_C_USE_SECMEM, &on); */
|
| 85 |
+
# define OSSL_STORE_C_USE_SECMEM 1
|
| 86 |
+
/* Where custom commands start */
|
| 87 |
+
# define OSSL_STORE_C_CUSTOM_START 100
|
| 88 |
+
|
| 89 |
+
# endif
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* Read one data item (a key, a cert, a CRL) that is supported by the OSSL_STORE
|
| 93 |
+
* functionality, given a context.
|
| 94 |
+
* Returns a OSSL_STORE_INFO pointer, from which OpenSSL typed data can be
|
| 95 |
+
* extracted with OSSL_STORE_INFO_get0_PKEY(), OSSL_STORE_INFO_get0_CERT(), ...
|
| 96 |
+
* NULL is returned on error, which may include that the data found at the URI
|
| 97 |
+
* can't be figured out for certain or is ambiguous.
|
| 98 |
+
*/
|
| 99 |
+
OSSL_STORE_INFO *OSSL_STORE_load(OSSL_STORE_CTX *ctx);
|
| 100 |
+
|
| 101 |
+
/*
|
| 102 |
+
* Check if end of data (end of file) is reached
|
| 103 |
+
* Returns 1 on end, 0 otherwise.
|
| 104 |
+
*/
|
| 105 |
+
int OSSL_STORE_eof(OSSL_STORE_CTX *ctx);
|
| 106 |
+
|
| 107 |
+
/*
|
| 108 |
+
* Check if an error occurred
|
| 109 |
+
* Returns 1 if it did, 0 otherwise.
|
| 110 |
+
*/
|
| 111 |
+
int OSSL_STORE_error(OSSL_STORE_CTX *ctx);
|
| 112 |
+
|
| 113 |
+
/*
|
| 114 |
+
* Close the channel
|
| 115 |
+
* Returns 1 on success, 0 on error.
|
| 116 |
+
*/
|
| 117 |
+
int OSSL_STORE_close(OSSL_STORE_CTX *ctx);
|
| 118 |
+
|
| 119 |
+
/*
|
| 120 |
+
* Attach to a BIO. This works like OSSL_STORE_open() except it takes a
|
| 121 |
+
* BIO instead of a uri, along with a scheme to use when reading.
|
| 122 |
+
* The given UI method will be used any time the loader needs extra input,
|
| 123 |
+
* for example when a password or pin is needed, and will be passed the
|
| 124 |
+
* same user data every time it's needed in this context.
|
| 125 |
+
*
|
| 126 |
+
* Returns a context reference which represents the channel to communicate
|
| 127 |
+
* through.
|
| 128 |
+
*
|
| 129 |
+
* Note that this function is considered unsafe, all depending on what the
|
| 130 |
+
* BIO actually reads.
|
| 131 |
+
*/
|
| 132 |
+
OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bio, const char *scheme,
|
| 133 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 134 |
+
const UI_METHOD *ui_method, void *ui_data,
|
| 135 |
+
const OSSL_PARAM params[],
|
| 136 |
+
OSSL_STORE_post_process_info_fn post_process,
|
| 137 |
+
void *post_process_data);
|
| 138 |
+
|
| 139 |
+
/*-
|
| 140 |
+
* Extracting OpenSSL types from and creating new OSSL_STORE_INFOs
|
| 141 |
+
* ---------------------------------------------------------------
|
| 142 |
+
*/
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* Types of data that can be ossl_stored in a OSSL_STORE_INFO.
|
| 146 |
+
* OSSL_STORE_INFO_NAME is typically found when getting a listing of
|
| 147 |
+
* available "files" / "tokens" / what have you.
|
| 148 |
+
*/
|
| 149 |
+
# define OSSL_STORE_INFO_NAME 1 /* char * */
|
| 150 |
+
# define OSSL_STORE_INFO_PARAMS 2 /* EVP_PKEY * */
|
| 151 |
+
# define OSSL_STORE_INFO_PUBKEY 3 /* EVP_PKEY * */
|
| 152 |
+
# define OSSL_STORE_INFO_PKEY 4 /* EVP_PKEY * */
|
| 153 |
+
# define OSSL_STORE_INFO_CERT 5 /* X509 * */
|
| 154 |
+
# define OSSL_STORE_INFO_CRL 6 /* X509_CRL * */
|
| 155 |
+
|
| 156 |
+
/*
|
| 157 |
+
* Functions to generate OSSL_STORE_INFOs, one function for each type we
|
| 158 |
+
* support having in them, as well as a generic constructor.
|
| 159 |
+
*
|
| 160 |
+
* In all cases, ownership of the object is transferred to the OSSL_STORE_INFO
|
| 161 |
+
* and will therefore be freed when the OSSL_STORE_INFO is freed.
|
| 162 |
+
*/
|
| 163 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data);
|
| 164 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name);
|
| 165 |
+
int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc);
|
| 166 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params);
|
| 167 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_PUBKEY(EVP_PKEY *pubkey);
|
| 168 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey);
|
| 169 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509);
|
| 170 |
+
OSSL_STORE_INFO *OSSL_STORE_INFO_new_CRL(X509_CRL *crl);
|
| 171 |
+
|
| 172 |
+
/*
|
| 173 |
+
* Functions to try to extract data from a OSSL_STORE_INFO.
|
| 174 |
+
*/
|
| 175 |
+
int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info);
|
| 176 |
+
void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info);
|
| 177 |
+
const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info);
|
| 178 |
+
char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info);
|
| 179 |
+
const char *OSSL_STORE_INFO_get0_NAME_description(const OSSL_STORE_INFO *info);
|
| 180 |
+
char *OSSL_STORE_INFO_get1_NAME_description(const OSSL_STORE_INFO *info);
|
| 181 |
+
EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info);
|
| 182 |
+
EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info);
|
| 183 |
+
EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info);
|
| 184 |
+
EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info);
|
| 185 |
+
EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info);
|
| 186 |
+
EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info);
|
| 187 |
+
X509 *OSSL_STORE_INFO_get0_CERT(const OSSL_STORE_INFO *info);
|
| 188 |
+
X509 *OSSL_STORE_INFO_get1_CERT(const OSSL_STORE_INFO *info);
|
| 189 |
+
X509_CRL *OSSL_STORE_INFO_get0_CRL(const OSSL_STORE_INFO *info);
|
| 190 |
+
X509_CRL *OSSL_STORE_INFO_get1_CRL(const OSSL_STORE_INFO *info);
|
| 191 |
+
|
| 192 |
+
const char *OSSL_STORE_INFO_type_string(int type);
|
| 193 |
+
|
| 194 |
+
/*
|
| 195 |
+
* Free the OSSL_STORE_INFO
|
| 196 |
+
*/
|
| 197 |
+
void OSSL_STORE_INFO_free(OSSL_STORE_INFO *info);
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
/*-
|
| 201 |
+
* Functions to construct a search URI from a base URI and search criteria
|
| 202 |
+
* -----------------------------------------------------------------------
|
| 203 |
+
*/
|
| 204 |
+
|
| 205 |
+
/* OSSL_STORE search types */
|
| 206 |
+
# define OSSL_STORE_SEARCH_BY_NAME 1 /* subject in certs, issuer in CRLs */
|
| 207 |
+
# define OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 2
|
| 208 |
+
# define OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 3
|
| 209 |
+
# define OSSL_STORE_SEARCH_BY_ALIAS 4
|
| 210 |
+
|
| 211 |
+
/* To check what search types the scheme handler supports */
|
| 212 |
+
int OSSL_STORE_supports_search(OSSL_STORE_CTX *ctx, int search_type);
|
| 213 |
+
|
| 214 |
+
/* Search term constructors */
|
| 215 |
+
/*
|
| 216 |
+
* The input is considered to be owned by the caller, and must therefore
|
| 217 |
+
* remain present throughout the lifetime of the returned OSSL_STORE_SEARCH
|
| 218 |
+
*/
|
| 219 |
+
OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_name(X509_NAME *name);
|
| 220 |
+
OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_issuer_serial(X509_NAME *name,
|
| 221 |
+
const ASN1_INTEGER
|
| 222 |
+
*serial);
|
| 223 |
+
OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_key_fingerprint(const EVP_MD *digest,
|
| 224 |
+
const unsigned char
|
| 225 |
+
*bytes, size_t len);
|
| 226 |
+
OSSL_STORE_SEARCH *OSSL_STORE_SEARCH_by_alias(const char *alias);
|
| 227 |
+
|
| 228 |
+
/* Search term destructor */
|
| 229 |
+
void OSSL_STORE_SEARCH_free(OSSL_STORE_SEARCH *search);
|
| 230 |
+
|
| 231 |
+
/* Search term accessors */
|
| 232 |
+
int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion);
|
| 233 |
+
X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion);
|
| 234 |
+
const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH
|
| 235 |
+
*criterion);
|
| 236 |
+
const unsigned char *OSSL_STORE_SEARCH_get0_bytes(const OSSL_STORE_SEARCH
|
| 237 |
+
*criterion, size_t *length);
|
| 238 |
+
const char *OSSL_STORE_SEARCH_get0_string(const OSSL_STORE_SEARCH *criterion);
|
| 239 |
+
const EVP_MD *OSSL_STORE_SEARCH_get0_digest(const OSSL_STORE_SEARCH *criterion);
|
| 240 |
+
|
| 241 |
+
/*
|
| 242 |
+
* Add search criterion and expected return type (which can be unspecified)
|
| 243 |
+
* to the loading channel. This MUST happen before the first OSSL_STORE_load().
|
| 244 |
+
*/
|
| 245 |
+
int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
|
| 246 |
+
int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search);
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
/*-
|
| 250 |
+
* Function to fetch a loader and extract data from it
|
| 251 |
+
* ---------------------------------------------------
|
| 252 |
+
*/
|
| 253 |
+
|
| 254 |
+
typedef struct ossl_store_loader_st OSSL_STORE_LOADER;
|
| 255 |
+
|
| 256 |
+
OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
|
| 257 |
+
const char *scheme,
|
| 258 |
+
const char *properties);
|
| 259 |
+
int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader);
|
| 260 |
+
void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
|
| 261 |
+
const OSSL_PROVIDER *OSSL_STORE_LOADER_get0_provider(const OSSL_STORE_LOADER *
|
| 262 |
+
loader);
|
| 263 |
+
const char *OSSL_STORE_LOADER_get0_properties(const OSSL_STORE_LOADER *loader);
|
| 264 |
+
const char *OSSL_STORE_LOADER_get0_description(const OSSL_STORE_LOADER *loader);
|
| 265 |
+
int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader,
|
| 266 |
+
const char *scheme);
|
| 267 |
+
void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
|
| 268 |
+
void (*fn)(OSSL_STORE_LOADER *loader,
|
| 269 |
+
void *arg),
|
| 270 |
+
void *arg);
|
| 271 |
+
int OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader,
|
| 272 |
+
void (*fn)(const char *name, void *data),
|
| 273 |
+
void *data);
|
| 274 |
+
|
| 275 |
+
/*-
|
| 276 |
+
* Function to register a loader for the given URI scheme.
|
| 277 |
+
* -------------------------------------------------------
|
| 278 |
+
*
|
| 279 |
+
* The loader receives all the main components of an URI except for the
|
| 280 |
+
* scheme.
|
| 281 |
+
*/
|
| 282 |
+
|
| 283 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 284 |
+
|
| 285 |
+
/* struct ossl_store_loader_ctx_st is defined differently by each loader */
|
| 286 |
+
typedef struct ossl_store_loader_ctx_st OSSL_STORE_LOADER_CTX;
|
| 287 |
+
typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn)
|
| 288 |
+
(const OSSL_STORE_LOADER *loader, const char *uri,
|
| 289 |
+
const UI_METHOD *ui_method, void *ui_data);
|
| 290 |
+
typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_ex_fn)
|
| 291 |
+
(const OSSL_STORE_LOADER *loader,
|
| 292 |
+
const char *uri, OSSL_LIB_CTX *libctx, const char *propq,
|
| 293 |
+
const UI_METHOD *ui_method, void *ui_data);
|
| 294 |
+
|
| 295 |
+
typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_attach_fn)
|
| 296 |
+
(const OSSL_STORE_LOADER *loader, BIO *bio,
|
| 297 |
+
OSSL_LIB_CTX *libctx, const char *propq,
|
| 298 |
+
const UI_METHOD *ui_method, void *ui_data);
|
| 299 |
+
typedef int (*OSSL_STORE_ctrl_fn)
|
| 300 |
+
(OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args);
|
| 301 |
+
typedef int (*OSSL_STORE_expect_fn)
|
| 302 |
+
(OSSL_STORE_LOADER_CTX *ctx, int expected);
|
| 303 |
+
typedef int (*OSSL_STORE_find_fn)
|
| 304 |
+
(OSSL_STORE_LOADER_CTX *ctx, const OSSL_STORE_SEARCH *criteria);
|
| 305 |
+
typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)
|
| 306 |
+
(OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data);
|
| 307 |
+
typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx);
|
| 308 |
+
typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx);
|
| 309 |
+
typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx);
|
| 310 |
+
|
| 311 |
+
# endif
|
| 312 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 313 |
+
OSSL_DEPRECATEDIN_3_0
|
| 314 |
+
OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme);
|
| 315 |
+
OSSL_DEPRECATEDIN_3_0
|
| 316 |
+
int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader,
|
| 317 |
+
OSSL_STORE_open_fn open_function);
|
| 318 |
+
OSSL_DEPRECATEDIN_3_0
|
| 319 |
+
int OSSL_STORE_LOADER_set_open_ex(OSSL_STORE_LOADER *loader,
|
| 320 |
+
OSSL_STORE_open_ex_fn open_ex_function);
|
| 321 |
+
OSSL_DEPRECATEDIN_3_0
|
| 322 |
+
int OSSL_STORE_LOADER_set_attach(OSSL_STORE_LOADER *loader,
|
| 323 |
+
OSSL_STORE_attach_fn attach_function);
|
| 324 |
+
OSSL_DEPRECATEDIN_3_0
|
| 325 |
+
int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader,
|
| 326 |
+
OSSL_STORE_ctrl_fn ctrl_function);
|
| 327 |
+
OSSL_DEPRECATEDIN_3_0
|
| 328 |
+
int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader,
|
| 329 |
+
OSSL_STORE_expect_fn expect_function);
|
| 330 |
+
OSSL_DEPRECATEDIN_3_0
|
| 331 |
+
int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader,
|
| 332 |
+
OSSL_STORE_find_fn find_function);
|
| 333 |
+
OSSL_DEPRECATEDIN_3_0
|
| 334 |
+
int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader,
|
| 335 |
+
OSSL_STORE_load_fn load_function);
|
| 336 |
+
OSSL_DEPRECATEDIN_3_0
|
| 337 |
+
int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader,
|
| 338 |
+
OSSL_STORE_eof_fn eof_function);
|
| 339 |
+
OSSL_DEPRECATEDIN_3_0
|
| 340 |
+
int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader,
|
| 341 |
+
OSSL_STORE_error_fn error_function);
|
| 342 |
+
OSSL_DEPRECATEDIN_3_0
|
| 343 |
+
int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader,
|
| 344 |
+
OSSL_STORE_close_fn close_function);
|
| 345 |
+
OSSL_DEPRECATEDIN_3_0
|
| 346 |
+
const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader);
|
| 347 |
+
OSSL_DEPRECATEDIN_3_0
|
| 348 |
+
const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader);
|
| 349 |
+
OSSL_DEPRECATEDIN_3_0
|
| 350 |
+
int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader);
|
| 351 |
+
OSSL_DEPRECATEDIN_3_0
|
| 352 |
+
OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme);
|
| 353 |
+
# endif
|
| 354 |
+
|
| 355 |
+
/*-
|
| 356 |
+
* Functions to list STORE loaders
|
| 357 |
+
* -------------------------------
|
| 358 |
+
*/
|
| 359 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 360 |
+
OSSL_DEPRECATEDIN_3_0
|
| 361 |
+
int OSSL_STORE_do_all_loaders(void (*do_function)(const OSSL_STORE_LOADER *loader,
|
| 362 |
+
void *do_arg),
|
| 363 |
+
void *do_arg);
|
| 364 |
+
# endif
|
| 365 |
+
|
| 366 |
+
# ifdef __cplusplus
|
| 367 |
+
}
|
| 368 |
+
# endif
|
| 369 |
+
#endif
|
llava_next/include/openssl/storeerr.h
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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_STOREERR_H
|
| 12 |
+
# define OPENSSL_STOREERR_H
|
| 13 |
+
# pragma once
|
| 14 |
+
|
| 15 |
+
# include <openssl/opensslconf.h>
|
| 16 |
+
# include <openssl/symhacks.h>
|
| 17 |
+
# include <openssl/cryptoerr_legacy.h>
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
/*
|
| 22 |
+
* OSSL_STORE reason codes.
|
| 23 |
+
*/
|
| 24 |
+
# define OSSL_STORE_R_AMBIGUOUS_CONTENT_TYPE 107
|
| 25 |
+
# define OSSL_STORE_R_BAD_PASSWORD_READ 115
|
| 26 |
+
# define OSSL_STORE_R_ERROR_VERIFYING_PKCS12_MAC 113
|
| 27 |
+
# define OSSL_STORE_R_FINGERPRINT_SIZE_DOES_NOT_MATCH_DIGEST 121
|
| 28 |
+
# define OSSL_STORE_R_INVALID_SCHEME 106
|
| 29 |
+
# define OSSL_STORE_R_IS_NOT_A 112
|
| 30 |
+
# define OSSL_STORE_R_LOADER_INCOMPLETE 116
|
| 31 |
+
# define OSSL_STORE_R_LOADING_STARTED 117
|
| 32 |
+
# define OSSL_STORE_R_NOT_A_CERTIFICATE 100
|
| 33 |
+
# define OSSL_STORE_R_NOT_A_CRL 101
|
| 34 |
+
# define OSSL_STORE_R_NOT_A_NAME 103
|
| 35 |
+
# define OSSL_STORE_R_NOT_A_PRIVATE_KEY 102
|
| 36 |
+
# define OSSL_STORE_R_NOT_A_PUBLIC_KEY 122
|
| 37 |
+
# define OSSL_STORE_R_NOT_PARAMETERS 104
|
| 38 |
+
# define OSSL_STORE_R_NO_LOADERS_FOUND 123
|
| 39 |
+
# define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114
|
| 40 |
+
# define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108
|
| 41 |
+
# define OSSL_STORE_R_SEARCH_ONLY_SUPPORTED_FOR_DIRECTORIES 119
|
| 42 |
+
# define OSSL_STORE_R_UI_PROCESS_INTERRUPTED_OR_CANCELLED 109
|
| 43 |
+
# define OSSL_STORE_R_UNREGISTERED_SCHEME 105
|
| 44 |
+
# define OSSL_STORE_R_UNSUPPORTED_CONTENT_TYPE 110
|
| 45 |
+
# define OSSL_STORE_R_UNSUPPORTED_OPERATION 118
|
| 46 |
+
# define OSSL_STORE_R_UNSUPPORTED_SEARCH_TYPE 120
|
| 47 |
+
# define OSSL_STORE_R_URI_AUTHORITY_UNSUPPORTED 111
|
| 48 |
+
|
| 49 |
+
#endif
|
llava_next/include/openssl/tls1.h
ADDED
|
@@ -0,0 +1,1225 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
| 4 |
+
* Copyright 2005 Nokia. All rights reserved.
|
| 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_TLS1_H
|
| 13 |
+
# define OPENSSL_TLS1_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# include <openssl/macros.h>
|
| 17 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
# define HEADER_TLS1_H
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
# include <openssl/buffer.h>
|
| 22 |
+
# include <openssl/x509.h>
|
| 23 |
+
# include <openssl/prov_ssl.h>
|
| 24 |
+
|
| 25 |
+
#ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
#endif
|
| 28 |
+
|
| 29 |
+
/* Default security level if not overridden at config time */
|
| 30 |
+
# ifndef OPENSSL_TLS_SECURITY_LEVEL
|
| 31 |
+
# define OPENSSL_TLS_SECURITY_LEVEL 1
|
| 32 |
+
# endif
|
| 33 |
+
|
| 34 |
+
/* TLS*_VERSION constants are defined in prov_ssl.h */
|
| 35 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 36 |
+
# define TLS_MAX_VERSION TLS1_3_VERSION
|
| 37 |
+
# endif
|
| 38 |
+
|
| 39 |
+
/* Special value for method supporting multiple versions */
|
| 40 |
+
# define TLS_ANY_VERSION 0x10000
|
| 41 |
+
|
| 42 |
+
# define TLS1_VERSION_MAJOR 0x03
|
| 43 |
+
# define TLS1_VERSION_MINOR 0x01
|
| 44 |
+
|
| 45 |
+
# define TLS1_1_VERSION_MAJOR 0x03
|
| 46 |
+
# define TLS1_1_VERSION_MINOR 0x02
|
| 47 |
+
|
| 48 |
+
# define TLS1_2_VERSION_MAJOR 0x03
|
| 49 |
+
# define TLS1_2_VERSION_MINOR 0x03
|
| 50 |
+
|
| 51 |
+
# define TLS1_get_version(s) \
|
| 52 |
+
((SSL_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_version(s) : 0)
|
| 53 |
+
|
| 54 |
+
# define TLS1_get_client_version(s) \
|
| 55 |
+
((SSL_client_version(s) >> 8) == TLS1_VERSION_MAJOR ? SSL_client_version(s) : 0)
|
| 56 |
+
|
| 57 |
+
# define TLS1_AD_DECRYPTION_FAILED 21
|
| 58 |
+
# define TLS1_AD_RECORD_OVERFLOW 22
|
| 59 |
+
# define TLS1_AD_UNKNOWN_CA 48/* fatal */
|
| 60 |
+
# define TLS1_AD_ACCESS_DENIED 49/* fatal */
|
| 61 |
+
# define TLS1_AD_DECODE_ERROR 50/* fatal */
|
| 62 |
+
# define TLS1_AD_DECRYPT_ERROR 51
|
| 63 |
+
# define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */
|
| 64 |
+
# define TLS1_AD_PROTOCOL_VERSION 70/* fatal */
|
| 65 |
+
# define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */
|
| 66 |
+
# define TLS1_AD_INTERNAL_ERROR 80/* fatal */
|
| 67 |
+
# define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */
|
| 68 |
+
# define TLS1_AD_USER_CANCELLED 90
|
| 69 |
+
# define TLS1_AD_NO_RENEGOTIATION 100
|
| 70 |
+
/* TLSv1.3 alerts */
|
| 71 |
+
# define TLS13_AD_MISSING_EXTENSION 109 /* fatal */
|
| 72 |
+
# define TLS13_AD_CERTIFICATE_REQUIRED 116 /* fatal */
|
| 73 |
+
/* codes 110-114 are from RFC3546 */
|
| 74 |
+
# define TLS1_AD_UNSUPPORTED_EXTENSION 110
|
| 75 |
+
# define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
|
| 76 |
+
# define TLS1_AD_UNRECOGNIZED_NAME 112
|
| 77 |
+
# define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
|
| 78 |
+
# define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
|
| 79 |
+
# define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */
|
| 80 |
+
# define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
|
| 81 |
+
|
| 82 |
+
/* ExtensionType values from RFC3546 / RFC4366 / RFC6066 */
|
| 83 |
+
# define TLSEXT_TYPE_server_name 0
|
| 84 |
+
# define TLSEXT_TYPE_max_fragment_length 1
|
| 85 |
+
# define TLSEXT_TYPE_client_certificate_url 2
|
| 86 |
+
# define TLSEXT_TYPE_trusted_ca_keys 3
|
| 87 |
+
# define TLSEXT_TYPE_truncated_hmac 4
|
| 88 |
+
# define TLSEXT_TYPE_status_request 5
|
| 89 |
+
/* ExtensionType values from RFC4681 */
|
| 90 |
+
# define TLSEXT_TYPE_user_mapping 6
|
| 91 |
+
/* ExtensionType values from RFC5878 */
|
| 92 |
+
# define TLSEXT_TYPE_client_authz 7
|
| 93 |
+
# define TLSEXT_TYPE_server_authz 8
|
| 94 |
+
/* ExtensionType values from RFC6091 */
|
| 95 |
+
# define TLSEXT_TYPE_cert_type 9
|
| 96 |
+
|
| 97 |
+
/* ExtensionType values from RFC4492 */
|
| 98 |
+
/*
|
| 99 |
+
* Prior to TLSv1.3 the supported_groups extension was known as
|
| 100 |
+
* elliptic_curves
|
| 101 |
+
*/
|
| 102 |
+
# define TLSEXT_TYPE_supported_groups 10
|
| 103 |
+
# define TLSEXT_TYPE_elliptic_curves TLSEXT_TYPE_supported_groups
|
| 104 |
+
# define TLSEXT_TYPE_ec_point_formats 11
|
| 105 |
+
|
| 106 |
+
|
| 107 |
+
/* ExtensionType value from RFC5054 */
|
| 108 |
+
# define TLSEXT_TYPE_srp 12
|
| 109 |
+
|
| 110 |
+
/* ExtensionType values from RFC5246 */
|
| 111 |
+
# define TLSEXT_TYPE_signature_algorithms 13
|
| 112 |
+
|
| 113 |
+
/* ExtensionType value from RFC5764 */
|
| 114 |
+
# define TLSEXT_TYPE_use_srtp 14
|
| 115 |
+
|
| 116 |
+
/* ExtensionType value from RFC7301 */
|
| 117 |
+
# define TLSEXT_TYPE_application_layer_protocol_negotiation 16
|
| 118 |
+
|
| 119 |
+
/*
|
| 120 |
+
* Extension type for Certificate Transparency
|
| 121 |
+
* https://tools.ietf.org/html/rfc6962#section-3.3.1
|
| 122 |
+
*/
|
| 123 |
+
# define TLSEXT_TYPE_signed_certificate_timestamp 18
|
| 124 |
+
|
| 125 |
+
/*
|
| 126 |
+
* ExtensionType value for TLS padding extension.
|
| 127 |
+
* http://tools.ietf.org/html/draft-agl-tls-padding
|
| 128 |
+
*/
|
| 129 |
+
# define TLSEXT_TYPE_padding 21
|
| 130 |
+
|
| 131 |
+
/* ExtensionType value from RFC7366 */
|
| 132 |
+
# define TLSEXT_TYPE_encrypt_then_mac 22
|
| 133 |
+
|
| 134 |
+
/* ExtensionType value from RFC7627 */
|
| 135 |
+
# define TLSEXT_TYPE_extended_master_secret 23
|
| 136 |
+
|
| 137 |
+
/* ExtensionType value from RFC4507 */
|
| 138 |
+
# define TLSEXT_TYPE_session_ticket 35
|
| 139 |
+
|
| 140 |
+
/* As defined for TLS1.3 */
|
| 141 |
+
# define TLSEXT_TYPE_psk 41
|
| 142 |
+
# define TLSEXT_TYPE_early_data 42
|
| 143 |
+
# define TLSEXT_TYPE_supported_versions 43
|
| 144 |
+
# define TLSEXT_TYPE_cookie 44
|
| 145 |
+
# define TLSEXT_TYPE_psk_kex_modes 45
|
| 146 |
+
# define TLSEXT_TYPE_certificate_authorities 47
|
| 147 |
+
# define TLSEXT_TYPE_post_handshake_auth 49
|
| 148 |
+
# define TLSEXT_TYPE_signature_algorithms_cert 50
|
| 149 |
+
# define TLSEXT_TYPE_key_share 51
|
| 150 |
+
|
| 151 |
+
/* Temporary extension type */
|
| 152 |
+
# define TLSEXT_TYPE_renegotiate 0xff01
|
| 153 |
+
|
| 154 |
+
# ifndef OPENSSL_NO_NEXTPROTONEG
|
| 155 |
+
/* This is not an IANA defined extension number */
|
| 156 |
+
# define TLSEXT_TYPE_next_proto_neg 13172
|
| 157 |
+
# endif
|
| 158 |
+
|
| 159 |
+
/* NameType value from RFC3546 */
|
| 160 |
+
# define TLSEXT_NAMETYPE_host_name 0
|
| 161 |
+
/* status request value from RFC3546 */
|
| 162 |
+
# define TLSEXT_STATUSTYPE_ocsp 1
|
| 163 |
+
|
| 164 |
+
/* ECPointFormat values from RFC4492 */
|
| 165 |
+
# define TLSEXT_ECPOINTFORMAT_first 0
|
| 166 |
+
# define TLSEXT_ECPOINTFORMAT_uncompressed 0
|
| 167 |
+
# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_prime 1
|
| 168 |
+
# define TLSEXT_ECPOINTFORMAT_ansiX962_compressed_char2 2
|
| 169 |
+
# define TLSEXT_ECPOINTFORMAT_last 2
|
| 170 |
+
|
| 171 |
+
/* Signature and hash algorithms from RFC5246 */
|
| 172 |
+
# define TLSEXT_signature_anonymous 0
|
| 173 |
+
# define TLSEXT_signature_rsa 1
|
| 174 |
+
# define TLSEXT_signature_dsa 2
|
| 175 |
+
# define TLSEXT_signature_ecdsa 3
|
| 176 |
+
# define TLSEXT_signature_gostr34102001 237
|
| 177 |
+
# define TLSEXT_signature_gostr34102012_256 238
|
| 178 |
+
# define TLSEXT_signature_gostr34102012_512 239
|
| 179 |
+
|
| 180 |
+
/* Total number of different signature algorithms */
|
| 181 |
+
# define TLSEXT_signature_num 7
|
| 182 |
+
|
| 183 |
+
# define TLSEXT_hash_none 0
|
| 184 |
+
# define TLSEXT_hash_md5 1
|
| 185 |
+
# define TLSEXT_hash_sha1 2
|
| 186 |
+
# define TLSEXT_hash_sha224 3
|
| 187 |
+
# define TLSEXT_hash_sha256 4
|
| 188 |
+
# define TLSEXT_hash_sha384 5
|
| 189 |
+
# define TLSEXT_hash_sha512 6
|
| 190 |
+
# define TLSEXT_hash_gostr3411 237
|
| 191 |
+
# define TLSEXT_hash_gostr34112012_256 238
|
| 192 |
+
# define TLSEXT_hash_gostr34112012_512 239
|
| 193 |
+
|
| 194 |
+
/* Total number of different digest algorithms */
|
| 195 |
+
|
| 196 |
+
# define TLSEXT_hash_num 10
|
| 197 |
+
|
| 198 |
+
/* Flag set for unrecognised algorithms */
|
| 199 |
+
# define TLSEXT_nid_unknown 0x1000000
|
| 200 |
+
|
| 201 |
+
/* ECC curves */
|
| 202 |
+
|
| 203 |
+
# define TLSEXT_curve_P_256 23
|
| 204 |
+
# define TLSEXT_curve_P_384 24
|
| 205 |
+
|
| 206 |
+
/* OpenSSL value to disable maximum fragment length extension */
|
| 207 |
+
# define TLSEXT_max_fragment_length_DISABLED 0
|
| 208 |
+
/* Allowed values for max fragment length extension */
|
| 209 |
+
# define TLSEXT_max_fragment_length_512 1
|
| 210 |
+
# define TLSEXT_max_fragment_length_1024 2
|
| 211 |
+
# define TLSEXT_max_fragment_length_2048 3
|
| 212 |
+
# define TLSEXT_max_fragment_length_4096 4
|
| 213 |
+
/* OpenSSL value for unset maximum fragment length extension */
|
| 214 |
+
# define TLSEXT_max_fragment_length_UNSPECIFIED 255
|
| 215 |
+
|
| 216 |
+
int SSL_CTX_set_tlsext_max_fragment_length(SSL_CTX *ctx, uint8_t mode);
|
| 217 |
+
int SSL_set_tlsext_max_fragment_length(SSL *ssl, uint8_t mode);
|
| 218 |
+
|
| 219 |
+
# define TLSEXT_MAXLEN_host_name 255
|
| 220 |
+
|
| 221 |
+
__owur const char *SSL_get_servername(const SSL *s, const int type);
|
| 222 |
+
__owur int SSL_get_servername_type(const SSL *s);
|
| 223 |
+
/*
|
| 224 |
+
* SSL_export_keying_material exports a value derived from the master secret,
|
| 225 |
+
* as specified in RFC 5705. It writes |olen| bytes to |out| given a label and
|
| 226 |
+
* optional context. (Since a zero length context is allowed, the |use_context|
|
| 227 |
+
* flag controls whether a context is included.) It returns 1 on success and
|
| 228 |
+
* 0 or -1 otherwise.
|
| 229 |
+
*/
|
| 230 |
+
__owur int SSL_export_keying_material(SSL *s, unsigned char *out, size_t olen,
|
| 231 |
+
const char *label, size_t llen,
|
| 232 |
+
const unsigned char *context,
|
| 233 |
+
size_t contextlen, int use_context);
|
| 234 |
+
|
| 235 |
+
/*
|
| 236 |
+
* SSL_export_keying_material_early exports a value derived from the
|
| 237 |
+
* early exporter master secret, as specified in
|
| 238 |
+
* https://tools.ietf.org/html/draft-ietf-tls-tls13-23. It writes
|
| 239 |
+
* |olen| bytes to |out| given a label and optional context. It
|
| 240 |
+
* returns 1 on success and 0 otherwise.
|
| 241 |
+
*/
|
| 242 |
+
__owur int SSL_export_keying_material_early(SSL *s, unsigned char *out,
|
| 243 |
+
size_t olen, const char *label,
|
| 244 |
+
size_t llen,
|
| 245 |
+
const unsigned char *context,
|
| 246 |
+
size_t contextlen);
|
| 247 |
+
|
| 248 |
+
int SSL_get_peer_signature_type_nid(const SSL *s, int *pnid);
|
| 249 |
+
int SSL_get_signature_type_nid(const SSL *s, int *pnid);
|
| 250 |
+
|
| 251 |
+
int SSL_get_sigalgs(SSL *s, int idx,
|
| 252 |
+
int *psign, int *phash, int *psignandhash,
|
| 253 |
+
unsigned char *rsig, unsigned char *rhash);
|
| 254 |
+
|
| 255 |
+
int SSL_get_shared_sigalgs(SSL *s, int idx,
|
| 256 |
+
int *psign, int *phash, int *psignandhash,
|
| 257 |
+
unsigned char *rsig, unsigned char *rhash);
|
| 258 |
+
|
| 259 |
+
__owur int SSL_check_chain(SSL *s, X509 *x, EVP_PKEY *pk, STACK_OF(X509) *chain);
|
| 260 |
+
|
| 261 |
+
# define SSL_set_tlsext_host_name(s,name) \
|
| 262 |
+
SSL_ctrl(s,SSL_CTRL_SET_TLSEXT_HOSTNAME,TLSEXT_NAMETYPE_host_name,\
|
| 263 |
+
(void *)name)
|
| 264 |
+
|
| 265 |
+
# define SSL_set_tlsext_debug_callback(ssl, cb) \
|
| 266 |
+
SSL_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_CB,\
|
| 267 |
+
(void (*)(void))cb)
|
| 268 |
+
|
| 269 |
+
# define SSL_set_tlsext_debug_arg(ssl, arg) \
|
| 270 |
+
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_DEBUG_ARG,0,arg)
|
| 271 |
+
|
| 272 |
+
# define SSL_get_tlsext_status_type(ssl) \
|
| 273 |
+
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
|
| 274 |
+
|
| 275 |
+
# define SSL_set_tlsext_status_type(ssl, type) \
|
| 276 |
+
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
|
| 277 |
+
|
| 278 |
+
# define SSL_get_tlsext_status_exts(ssl, arg) \
|
| 279 |
+
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_EXTS,0,arg)
|
| 280 |
+
|
| 281 |
+
# define SSL_set_tlsext_status_exts(ssl, arg) \
|
| 282 |
+
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_EXTS,0,arg)
|
| 283 |
+
|
| 284 |
+
# define SSL_get_tlsext_status_ids(ssl, arg) \
|
| 285 |
+
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_IDS,0,arg)
|
| 286 |
+
|
| 287 |
+
# define SSL_set_tlsext_status_ids(ssl, arg) \
|
| 288 |
+
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_IDS,0,arg)
|
| 289 |
+
|
| 290 |
+
# define SSL_get_tlsext_status_ocsp_resp(ssl, arg) \
|
| 291 |
+
SSL_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_OCSP_RESP,0,arg)
|
| 292 |
+
|
| 293 |
+
# define SSL_set_tlsext_status_ocsp_resp(ssl, arg, arglen) \
|
| 294 |
+
SSL_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_OCSP_RESP,arglen,arg)
|
| 295 |
+
|
| 296 |
+
# define SSL_CTX_set_tlsext_servername_callback(ctx, cb) \
|
| 297 |
+
SSL_CTX_callback_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_CB,\
|
| 298 |
+
(void (*)(void))cb)
|
| 299 |
+
|
| 300 |
+
# define SSL_TLSEXT_ERR_OK 0
|
| 301 |
+
# define SSL_TLSEXT_ERR_ALERT_WARNING 1
|
| 302 |
+
# define SSL_TLSEXT_ERR_ALERT_FATAL 2
|
| 303 |
+
# define SSL_TLSEXT_ERR_NOACK 3
|
| 304 |
+
|
| 305 |
+
# define SSL_CTX_set_tlsext_servername_arg(ctx, arg) \
|
| 306 |
+
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_SERVERNAME_ARG,0,arg)
|
| 307 |
+
|
| 308 |
+
# define SSL_CTX_get_tlsext_ticket_keys(ctx, keys, keylen) \
|
| 309 |
+
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_TLSEXT_TICKET_KEYS,keylen,keys)
|
| 310 |
+
# define SSL_CTX_set_tlsext_ticket_keys(ctx, keys, keylen) \
|
| 311 |
+
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TLSEXT_TICKET_KEYS,keylen,keys)
|
| 312 |
+
|
| 313 |
+
# define SSL_CTX_get_tlsext_status_cb(ssl, cb) \
|
| 314 |
+
SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB,0,(void *)cb)
|
| 315 |
+
# define SSL_CTX_set_tlsext_status_cb(ssl, cb) \
|
| 316 |
+
SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB,\
|
| 317 |
+
(void (*)(void))cb)
|
| 318 |
+
|
| 319 |
+
# define SSL_CTX_get_tlsext_status_arg(ssl, arg) \
|
| 320 |
+
SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
|
| 321 |
+
# define SSL_CTX_set_tlsext_status_arg(ssl, arg) \
|
| 322 |
+
SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_CB_ARG,0,arg)
|
| 323 |
+
|
| 324 |
+
# define SSL_CTX_set_tlsext_status_type(ssl, type) \
|
| 325 |
+
SSL_CTX_ctrl(ssl,SSL_CTRL_SET_TLSEXT_STATUS_REQ_TYPE,type,NULL)
|
| 326 |
+
|
| 327 |
+
# define SSL_CTX_get_tlsext_status_type(ssl) \
|
| 328 |
+
SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
|
| 329 |
+
|
| 330 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 331 |
+
# define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \
|
| 332 |
+
SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\
|
| 333 |
+
(void (*)(void))cb)
|
| 334 |
+
# endif
|
| 335 |
+
int SSL_CTX_set_tlsext_ticket_key_evp_cb
|
| 336 |
+
(SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *,
|
| 337 |
+
EVP_CIPHER_CTX *, EVP_MAC_CTX *, int));
|
| 338 |
+
|
| 339 |
+
/* PSK ciphersuites from 4279 */
|
| 340 |
+
# define TLS1_CK_PSK_WITH_RC4_128_SHA 0x0300008A
|
| 341 |
+
# define TLS1_CK_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008B
|
| 342 |
+
# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA 0x0300008C
|
| 343 |
+
# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA 0x0300008D
|
| 344 |
+
# define TLS1_CK_DHE_PSK_WITH_RC4_128_SHA 0x0300008E
|
| 345 |
+
# define TLS1_CK_DHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300008F
|
| 346 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA 0x03000090
|
| 347 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA 0x03000091
|
| 348 |
+
# define TLS1_CK_RSA_PSK_WITH_RC4_128_SHA 0x03000092
|
| 349 |
+
# define TLS1_CK_RSA_PSK_WITH_3DES_EDE_CBC_SHA 0x03000093
|
| 350 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA 0x03000094
|
| 351 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA 0x03000095
|
| 352 |
+
|
| 353 |
+
/* PSK ciphersuites from 5487 */
|
| 354 |
+
# define TLS1_CK_PSK_WITH_AES_128_GCM_SHA256 0x030000A8
|
| 355 |
+
# define TLS1_CK_PSK_WITH_AES_256_GCM_SHA384 0x030000A9
|
| 356 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_128_GCM_SHA256 0x030000AA
|
| 357 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_256_GCM_SHA384 0x030000AB
|
| 358 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_128_GCM_SHA256 0x030000AC
|
| 359 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_256_GCM_SHA384 0x030000AD
|
| 360 |
+
# define TLS1_CK_PSK_WITH_AES_128_CBC_SHA256 0x030000AE
|
| 361 |
+
# define TLS1_CK_PSK_WITH_AES_256_CBC_SHA384 0x030000AF
|
| 362 |
+
# define TLS1_CK_PSK_WITH_NULL_SHA256 0x030000B0
|
| 363 |
+
# define TLS1_CK_PSK_WITH_NULL_SHA384 0x030000B1
|
| 364 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_128_CBC_SHA256 0x030000B2
|
| 365 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_256_CBC_SHA384 0x030000B3
|
| 366 |
+
# define TLS1_CK_DHE_PSK_WITH_NULL_SHA256 0x030000B4
|
| 367 |
+
# define TLS1_CK_DHE_PSK_WITH_NULL_SHA384 0x030000B5
|
| 368 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_128_CBC_SHA256 0x030000B6
|
| 369 |
+
# define TLS1_CK_RSA_PSK_WITH_AES_256_CBC_SHA384 0x030000B7
|
| 370 |
+
# define TLS1_CK_RSA_PSK_WITH_NULL_SHA256 0x030000B8
|
| 371 |
+
# define TLS1_CK_RSA_PSK_WITH_NULL_SHA384 0x030000B9
|
| 372 |
+
|
| 373 |
+
/* NULL PSK ciphersuites from RFC4785 */
|
| 374 |
+
# define TLS1_CK_PSK_WITH_NULL_SHA 0x0300002C
|
| 375 |
+
# define TLS1_CK_DHE_PSK_WITH_NULL_SHA 0x0300002D
|
| 376 |
+
# define TLS1_CK_RSA_PSK_WITH_NULL_SHA 0x0300002E
|
| 377 |
+
|
| 378 |
+
/* AES ciphersuites from RFC3268 */
|
| 379 |
+
# define TLS1_CK_RSA_WITH_AES_128_SHA 0x0300002F
|
| 380 |
+
# define TLS1_CK_DH_DSS_WITH_AES_128_SHA 0x03000030
|
| 381 |
+
# define TLS1_CK_DH_RSA_WITH_AES_128_SHA 0x03000031
|
| 382 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA 0x03000032
|
| 383 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA 0x03000033
|
| 384 |
+
# define TLS1_CK_ADH_WITH_AES_128_SHA 0x03000034
|
| 385 |
+
# define TLS1_CK_RSA_WITH_AES_256_SHA 0x03000035
|
| 386 |
+
# define TLS1_CK_DH_DSS_WITH_AES_256_SHA 0x03000036
|
| 387 |
+
# define TLS1_CK_DH_RSA_WITH_AES_256_SHA 0x03000037
|
| 388 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA 0x03000038
|
| 389 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA 0x03000039
|
| 390 |
+
# define TLS1_CK_ADH_WITH_AES_256_SHA 0x0300003A
|
| 391 |
+
|
| 392 |
+
/* TLS v1.2 ciphersuites */
|
| 393 |
+
# define TLS1_CK_RSA_WITH_NULL_SHA256 0x0300003B
|
| 394 |
+
# define TLS1_CK_RSA_WITH_AES_128_SHA256 0x0300003C
|
| 395 |
+
# define TLS1_CK_RSA_WITH_AES_256_SHA256 0x0300003D
|
| 396 |
+
# define TLS1_CK_DH_DSS_WITH_AES_128_SHA256 0x0300003E
|
| 397 |
+
# define TLS1_CK_DH_RSA_WITH_AES_128_SHA256 0x0300003F
|
| 398 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_128_SHA256 0x03000040
|
| 399 |
+
|
| 400 |
+
/* Camellia ciphersuites from RFC4132 */
|
| 401 |
+
# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000041
|
| 402 |
+
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000042
|
| 403 |
+
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000043
|
| 404 |
+
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA 0x03000044
|
| 405 |
+
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA 0x03000045
|
| 406 |
+
# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA 0x03000046
|
| 407 |
+
|
| 408 |
+
/* TLS v1.2 ciphersuites */
|
| 409 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_128_SHA256 0x03000067
|
| 410 |
+
# define TLS1_CK_DH_DSS_WITH_AES_256_SHA256 0x03000068
|
| 411 |
+
# define TLS1_CK_DH_RSA_WITH_AES_256_SHA256 0x03000069
|
| 412 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_256_SHA256 0x0300006A
|
| 413 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_256_SHA256 0x0300006B
|
| 414 |
+
# define TLS1_CK_ADH_WITH_AES_128_SHA256 0x0300006C
|
| 415 |
+
# define TLS1_CK_ADH_WITH_AES_256_SHA256 0x0300006D
|
| 416 |
+
|
| 417 |
+
/* Camellia ciphersuites from RFC4132 */
|
| 418 |
+
# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000084
|
| 419 |
+
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000085
|
| 420 |
+
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000086
|
| 421 |
+
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA 0x03000087
|
| 422 |
+
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA 0x03000088
|
| 423 |
+
# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA 0x03000089
|
| 424 |
+
|
| 425 |
+
/* SEED ciphersuites from RFC4162 */
|
| 426 |
+
# define TLS1_CK_RSA_WITH_SEED_SHA 0x03000096
|
| 427 |
+
# define TLS1_CK_DH_DSS_WITH_SEED_SHA 0x03000097
|
| 428 |
+
# define TLS1_CK_DH_RSA_WITH_SEED_SHA 0x03000098
|
| 429 |
+
# define TLS1_CK_DHE_DSS_WITH_SEED_SHA 0x03000099
|
| 430 |
+
# define TLS1_CK_DHE_RSA_WITH_SEED_SHA 0x0300009A
|
| 431 |
+
# define TLS1_CK_ADH_WITH_SEED_SHA 0x0300009B
|
| 432 |
+
|
| 433 |
+
/* TLS v1.2 GCM ciphersuites from RFC5288 */
|
| 434 |
+
# define TLS1_CK_RSA_WITH_AES_128_GCM_SHA256 0x0300009C
|
| 435 |
+
# define TLS1_CK_RSA_WITH_AES_256_GCM_SHA384 0x0300009D
|
| 436 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_128_GCM_SHA256 0x0300009E
|
| 437 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_256_GCM_SHA384 0x0300009F
|
| 438 |
+
# define TLS1_CK_DH_RSA_WITH_AES_128_GCM_SHA256 0x030000A0
|
| 439 |
+
# define TLS1_CK_DH_RSA_WITH_AES_256_GCM_SHA384 0x030000A1
|
| 440 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_128_GCM_SHA256 0x030000A2
|
| 441 |
+
# define TLS1_CK_DHE_DSS_WITH_AES_256_GCM_SHA384 0x030000A3
|
| 442 |
+
# define TLS1_CK_DH_DSS_WITH_AES_128_GCM_SHA256 0x030000A4
|
| 443 |
+
# define TLS1_CK_DH_DSS_WITH_AES_256_GCM_SHA384 0x030000A5
|
| 444 |
+
# define TLS1_CK_ADH_WITH_AES_128_GCM_SHA256 0x030000A6
|
| 445 |
+
# define TLS1_CK_ADH_WITH_AES_256_GCM_SHA384 0x030000A7
|
| 446 |
+
|
| 447 |
+
/* CCM ciphersuites from RFC6655 */
|
| 448 |
+
# define TLS1_CK_RSA_WITH_AES_128_CCM 0x0300C09C
|
| 449 |
+
# define TLS1_CK_RSA_WITH_AES_256_CCM 0x0300C09D
|
| 450 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_128_CCM 0x0300C09E
|
| 451 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_256_CCM 0x0300C09F
|
| 452 |
+
# define TLS1_CK_RSA_WITH_AES_128_CCM_8 0x0300C0A0
|
| 453 |
+
# define TLS1_CK_RSA_WITH_AES_256_CCM_8 0x0300C0A1
|
| 454 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_128_CCM_8 0x0300C0A2
|
| 455 |
+
# define TLS1_CK_DHE_RSA_WITH_AES_256_CCM_8 0x0300C0A3
|
| 456 |
+
# define TLS1_CK_PSK_WITH_AES_128_CCM 0x0300C0A4
|
| 457 |
+
# define TLS1_CK_PSK_WITH_AES_256_CCM 0x0300C0A5
|
| 458 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_128_CCM 0x0300C0A6
|
| 459 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_256_CCM 0x0300C0A7
|
| 460 |
+
# define TLS1_CK_PSK_WITH_AES_128_CCM_8 0x0300C0A8
|
| 461 |
+
# define TLS1_CK_PSK_WITH_AES_256_CCM_8 0x0300C0A9
|
| 462 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_128_CCM_8 0x0300C0AA
|
| 463 |
+
# define TLS1_CK_DHE_PSK_WITH_AES_256_CCM_8 0x0300C0AB
|
| 464 |
+
|
| 465 |
+
/* CCM ciphersuites from RFC7251 */
|
| 466 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM 0x0300C0AC
|
| 467 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM 0x0300C0AD
|
| 468 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CCM_8 0x0300C0AE
|
| 469 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CCM_8 0x0300C0AF
|
| 470 |
+
|
| 471 |
+
/* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
|
| 472 |
+
# define TLS1_CK_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BA
|
| 473 |
+
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BB
|
| 474 |
+
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BC
|
| 475 |
+
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 0x030000BD
|
| 476 |
+
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x030000BE
|
| 477 |
+
# define TLS1_CK_ADH_WITH_CAMELLIA_128_CBC_SHA256 0x030000BF
|
| 478 |
+
|
| 479 |
+
# define TLS1_CK_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C0
|
| 480 |
+
# define TLS1_CK_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C1
|
| 481 |
+
# define TLS1_CK_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C2
|
| 482 |
+
# define TLS1_CK_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 0x030000C3
|
| 483 |
+
# define TLS1_CK_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 0x030000C4
|
| 484 |
+
# define TLS1_CK_ADH_WITH_CAMELLIA_256_CBC_SHA256 0x030000C5
|
| 485 |
+
|
| 486 |
+
/* ECC ciphersuites from RFC4492 */
|
| 487 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_NULL_SHA 0x0300C001
|
| 488 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_RC4_128_SHA 0x0300C002
|
| 489 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C003
|
| 490 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_CBC_SHA 0x0300C004
|
| 491 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_CBC_SHA 0x0300C005
|
| 492 |
+
|
| 493 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_NULL_SHA 0x0300C006
|
| 494 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_RC4_128_SHA 0x0300C007
|
| 495 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA 0x0300C008
|
| 496 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_CBC_SHA 0x0300C009
|
| 497 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_CBC_SHA 0x0300C00A
|
| 498 |
+
|
| 499 |
+
# define TLS1_CK_ECDH_RSA_WITH_NULL_SHA 0x0300C00B
|
| 500 |
+
# define TLS1_CK_ECDH_RSA_WITH_RC4_128_SHA 0x0300C00C
|
| 501 |
+
# define TLS1_CK_ECDH_RSA_WITH_DES_192_CBC3_SHA 0x0300C00D
|
| 502 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_128_CBC_SHA 0x0300C00E
|
| 503 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_256_CBC_SHA 0x0300C00F
|
| 504 |
+
|
| 505 |
+
# define TLS1_CK_ECDHE_RSA_WITH_NULL_SHA 0x0300C010
|
| 506 |
+
# define TLS1_CK_ECDHE_RSA_WITH_RC4_128_SHA 0x0300C011
|
| 507 |
+
# define TLS1_CK_ECDHE_RSA_WITH_DES_192_CBC3_SHA 0x0300C012
|
| 508 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_CBC_SHA 0x0300C013
|
| 509 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_CBC_SHA 0x0300C014
|
| 510 |
+
|
| 511 |
+
# define TLS1_CK_ECDH_anon_WITH_NULL_SHA 0x0300C015
|
| 512 |
+
# define TLS1_CK_ECDH_anon_WITH_RC4_128_SHA 0x0300C016
|
| 513 |
+
# define TLS1_CK_ECDH_anon_WITH_DES_192_CBC3_SHA 0x0300C017
|
| 514 |
+
# define TLS1_CK_ECDH_anon_WITH_AES_128_CBC_SHA 0x0300C018
|
| 515 |
+
# define TLS1_CK_ECDH_anon_WITH_AES_256_CBC_SHA 0x0300C019
|
| 516 |
+
|
| 517 |
+
/* SRP ciphersuites from RFC 5054 */
|
| 518 |
+
# define TLS1_CK_SRP_SHA_WITH_3DES_EDE_CBC_SHA 0x0300C01A
|
| 519 |
+
# define TLS1_CK_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA 0x0300C01B
|
| 520 |
+
# define TLS1_CK_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA 0x0300C01C
|
| 521 |
+
# define TLS1_CK_SRP_SHA_WITH_AES_128_CBC_SHA 0x0300C01D
|
| 522 |
+
# define TLS1_CK_SRP_SHA_RSA_WITH_AES_128_CBC_SHA 0x0300C01E
|
| 523 |
+
# define TLS1_CK_SRP_SHA_DSS_WITH_AES_128_CBC_SHA 0x0300C01F
|
| 524 |
+
# define TLS1_CK_SRP_SHA_WITH_AES_256_CBC_SHA 0x0300C020
|
| 525 |
+
# define TLS1_CK_SRP_SHA_RSA_WITH_AES_256_CBC_SHA 0x0300C021
|
| 526 |
+
# define TLS1_CK_SRP_SHA_DSS_WITH_AES_256_CBC_SHA 0x0300C022
|
| 527 |
+
|
| 528 |
+
/* ECDH HMAC based ciphersuites from RFC5289 */
|
| 529 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_SHA256 0x0300C023
|
| 530 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_SHA384 0x0300C024
|
| 531 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_SHA256 0x0300C025
|
| 532 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_SHA384 0x0300C026
|
| 533 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_SHA256 0x0300C027
|
| 534 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_SHA384 0x0300C028
|
| 535 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_128_SHA256 0x0300C029
|
| 536 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_256_SHA384 0x0300C02A
|
| 537 |
+
|
| 538 |
+
/* ECDH GCM based ciphersuites from RFC5289 */
|
| 539 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02B
|
| 540 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02C
|
| 541 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 0x0300C02D
|
| 542 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 0x0300C02E
|
| 543 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_128_GCM_SHA256 0x0300C02F
|
| 544 |
+
# define TLS1_CK_ECDHE_RSA_WITH_AES_256_GCM_SHA384 0x0300C030
|
| 545 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_128_GCM_SHA256 0x0300C031
|
| 546 |
+
# define TLS1_CK_ECDH_RSA_WITH_AES_256_GCM_SHA384 0x0300C032
|
| 547 |
+
|
| 548 |
+
/* ECDHE PSK ciphersuites from RFC5489 */
|
| 549 |
+
# define TLS1_CK_ECDHE_PSK_WITH_RC4_128_SHA 0x0300C033
|
| 550 |
+
# define TLS1_CK_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA 0x0300C034
|
| 551 |
+
# define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA 0x0300C035
|
| 552 |
+
# define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA 0x0300C036
|
| 553 |
+
|
| 554 |
+
# define TLS1_CK_ECDHE_PSK_WITH_AES_128_CBC_SHA256 0x0300C037
|
| 555 |
+
# define TLS1_CK_ECDHE_PSK_WITH_AES_256_CBC_SHA384 0x0300C038
|
| 556 |
+
|
| 557 |
+
/* NULL PSK ciphersuites from RFC4785 */
|
| 558 |
+
# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA 0x0300C039
|
| 559 |
+
# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA256 0x0300C03A
|
| 560 |
+
# define TLS1_CK_ECDHE_PSK_WITH_NULL_SHA384 0x0300C03B
|
| 561 |
+
|
| 562 |
+
/* Camellia-CBC ciphersuites from RFC6367 */
|
| 563 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C072
|
| 564 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C073
|
| 565 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C074
|
| 566 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C075
|
| 567 |
+
# define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C076
|
| 568 |
+
# define TLS1_CK_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C077
|
| 569 |
+
# define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 0x0300C078
|
| 570 |
+
# define TLS1_CK_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 0x0300C079
|
| 571 |
+
|
| 572 |
+
# define TLS1_CK_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C094
|
| 573 |
+
# define TLS1_CK_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C095
|
| 574 |
+
# define TLS1_CK_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C096
|
| 575 |
+
# define TLS1_CK_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C097
|
| 576 |
+
# define TLS1_CK_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C098
|
| 577 |
+
# define TLS1_CK_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C099
|
| 578 |
+
# define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 0x0300C09A
|
| 579 |
+
# define TLS1_CK_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 0x0300C09B
|
| 580 |
+
|
| 581 |
+
/* draft-ietf-tls-chacha20-poly1305-03 */
|
| 582 |
+
# define TLS1_CK_ECDHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCA8
|
| 583 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 0x0300CCA9
|
| 584 |
+
# define TLS1_CK_DHE_RSA_WITH_CHACHA20_POLY1305 0x0300CCAA
|
| 585 |
+
# define TLS1_CK_PSK_WITH_CHACHA20_POLY1305 0x0300CCAB
|
| 586 |
+
# define TLS1_CK_ECDHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAC
|
| 587 |
+
# define TLS1_CK_DHE_PSK_WITH_CHACHA20_POLY1305 0x0300CCAD
|
| 588 |
+
# define TLS1_CK_RSA_PSK_WITH_CHACHA20_POLY1305 0x0300CCAE
|
| 589 |
+
|
| 590 |
+
/* TLS v1.3 ciphersuites */
|
| 591 |
+
# define TLS1_3_CK_AES_128_GCM_SHA256 0x03001301
|
| 592 |
+
# define TLS1_3_CK_AES_256_GCM_SHA384 0x03001302
|
| 593 |
+
# define TLS1_3_CK_CHACHA20_POLY1305_SHA256 0x03001303
|
| 594 |
+
# define TLS1_3_CK_AES_128_CCM_SHA256 0x03001304
|
| 595 |
+
# define TLS1_3_CK_AES_128_CCM_8_SHA256 0x03001305
|
| 596 |
+
|
| 597 |
+
/* Aria ciphersuites from RFC6209 */
|
| 598 |
+
# define TLS1_CK_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C050
|
| 599 |
+
# define TLS1_CK_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C051
|
| 600 |
+
# define TLS1_CK_DHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C052
|
| 601 |
+
# define TLS1_CK_DHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C053
|
| 602 |
+
# define TLS1_CK_DH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C054
|
| 603 |
+
# define TLS1_CK_DH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C055
|
| 604 |
+
# define TLS1_CK_DHE_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C056
|
| 605 |
+
# define TLS1_CK_DHE_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C057
|
| 606 |
+
# define TLS1_CK_DH_DSS_WITH_ARIA_128_GCM_SHA256 0x0300C058
|
| 607 |
+
# define TLS1_CK_DH_DSS_WITH_ARIA_256_GCM_SHA384 0x0300C059
|
| 608 |
+
# define TLS1_CK_DH_anon_WITH_ARIA_128_GCM_SHA256 0x0300C05A
|
| 609 |
+
# define TLS1_CK_DH_anon_WITH_ARIA_256_GCM_SHA384 0x0300C05B
|
| 610 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05C
|
| 611 |
+
# define TLS1_CK_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05D
|
| 612 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 0x0300C05E
|
| 613 |
+
# define TLS1_CK_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 0x0300C05F
|
| 614 |
+
# define TLS1_CK_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C060
|
| 615 |
+
# define TLS1_CK_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C061
|
| 616 |
+
# define TLS1_CK_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 0x0300C062
|
| 617 |
+
# define TLS1_CK_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 0x0300C063
|
| 618 |
+
# define TLS1_CK_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06A
|
| 619 |
+
# define TLS1_CK_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06B
|
| 620 |
+
# define TLS1_CK_DHE_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06C
|
| 621 |
+
# define TLS1_CK_DHE_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06D
|
| 622 |
+
# define TLS1_CK_RSA_PSK_WITH_ARIA_128_GCM_SHA256 0x0300C06E
|
| 623 |
+
# define TLS1_CK_RSA_PSK_WITH_ARIA_256_GCM_SHA384 0x0300C06F
|
| 624 |
+
|
| 625 |
+
/* a bundle of RFC standard cipher names, generated from ssl3_ciphers[] */
|
| 626 |
+
# define TLS1_RFC_RSA_WITH_AES_128_SHA "TLS_RSA_WITH_AES_128_CBC_SHA"
|
| 627 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA "TLS_DHE_DSS_WITH_AES_128_CBC_SHA"
|
| 628 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA "TLS_DHE_RSA_WITH_AES_128_CBC_SHA"
|
| 629 |
+
# define TLS1_RFC_ADH_WITH_AES_128_SHA "TLS_DH_anon_WITH_AES_128_CBC_SHA"
|
| 630 |
+
# define TLS1_RFC_RSA_WITH_AES_256_SHA "TLS_RSA_WITH_AES_256_CBC_SHA"
|
| 631 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA "TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
|
| 632 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA "TLS_DHE_RSA_WITH_AES_256_CBC_SHA"
|
| 633 |
+
# define TLS1_RFC_ADH_WITH_AES_256_SHA "TLS_DH_anon_WITH_AES_256_CBC_SHA"
|
| 634 |
+
# define TLS1_RFC_RSA_WITH_NULL_SHA256 "TLS_RSA_WITH_NULL_SHA256"
|
| 635 |
+
# define TLS1_RFC_RSA_WITH_AES_128_SHA256 "TLS_RSA_WITH_AES_128_CBC_SHA256"
|
| 636 |
+
# define TLS1_RFC_RSA_WITH_AES_256_SHA256 "TLS_RSA_WITH_AES_256_CBC_SHA256"
|
| 637 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_128_SHA256 "TLS_DHE_DSS_WITH_AES_128_CBC_SHA256"
|
| 638 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_128_SHA256 "TLS_DHE_RSA_WITH_AES_128_CBC_SHA256"
|
| 639 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_256_SHA256 "TLS_DHE_DSS_WITH_AES_256_CBC_SHA256"
|
| 640 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_256_SHA256 "TLS_DHE_RSA_WITH_AES_256_CBC_SHA256"
|
| 641 |
+
# define TLS1_RFC_ADH_WITH_AES_128_SHA256 "TLS_DH_anon_WITH_AES_128_CBC_SHA256"
|
| 642 |
+
# define TLS1_RFC_ADH_WITH_AES_256_SHA256 "TLS_DH_anon_WITH_AES_256_CBC_SHA256"
|
| 643 |
+
# define TLS1_RFC_RSA_WITH_AES_128_GCM_SHA256 "TLS_RSA_WITH_AES_128_GCM_SHA256"
|
| 644 |
+
# define TLS1_RFC_RSA_WITH_AES_256_GCM_SHA384 "TLS_RSA_WITH_AES_256_GCM_SHA384"
|
| 645 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_DHE_RSA_WITH_AES_128_GCM_SHA256"
|
| 646 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_DHE_RSA_WITH_AES_256_GCM_SHA384"
|
| 647 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_128_GCM_SHA256 "TLS_DHE_DSS_WITH_AES_128_GCM_SHA256"
|
| 648 |
+
# define TLS1_RFC_DHE_DSS_WITH_AES_256_GCM_SHA384 "TLS_DHE_DSS_WITH_AES_256_GCM_SHA384"
|
| 649 |
+
# define TLS1_RFC_ADH_WITH_AES_128_GCM_SHA256 "TLS_DH_anon_WITH_AES_128_GCM_SHA256"
|
| 650 |
+
# define TLS1_RFC_ADH_WITH_AES_256_GCM_SHA384 "TLS_DH_anon_WITH_AES_256_GCM_SHA384"
|
| 651 |
+
# define TLS1_RFC_RSA_WITH_AES_128_CCM "TLS_RSA_WITH_AES_128_CCM"
|
| 652 |
+
# define TLS1_RFC_RSA_WITH_AES_256_CCM "TLS_RSA_WITH_AES_256_CCM"
|
| 653 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM "TLS_DHE_RSA_WITH_AES_128_CCM"
|
| 654 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM "TLS_DHE_RSA_WITH_AES_256_CCM"
|
| 655 |
+
# define TLS1_RFC_RSA_WITH_AES_128_CCM_8 "TLS_RSA_WITH_AES_128_CCM_8"
|
| 656 |
+
# define TLS1_RFC_RSA_WITH_AES_256_CCM_8 "TLS_RSA_WITH_AES_256_CCM_8"
|
| 657 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_128_CCM_8 "TLS_DHE_RSA_WITH_AES_128_CCM_8"
|
| 658 |
+
# define TLS1_RFC_DHE_RSA_WITH_AES_256_CCM_8 "TLS_DHE_RSA_WITH_AES_256_CCM_8"
|
| 659 |
+
# define TLS1_RFC_PSK_WITH_AES_128_CCM "TLS_PSK_WITH_AES_128_CCM"
|
| 660 |
+
# define TLS1_RFC_PSK_WITH_AES_256_CCM "TLS_PSK_WITH_AES_256_CCM"
|
| 661 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM "TLS_DHE_PSK_WITH_AES_128_CCM"
|
| 662 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM "TLS_DHE_PSK_WITH_AES_256_CCM"
|
| 663 |
+
# define TLS1_RFC_PSK_WITH_AES_128_CCM_8 "TLS_PSK_WITH_AES_128_CCM_8"
|
| 664 |
+
# define TLS1_RFC_PSK_WITH_AES_256_CCM_8 "TLS_PSK_WITH_AES_256_CCM_8"
|
| 665 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_128_CCM_8 "TLS_PSK_DHE_WITH_AES_128_CCM_8"
|
| 666 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_256_CCM_8 "TLS_PSK_DHE_WITH_AES_256_CCM_8"
|
| 667 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM "TLS_ECDHE_ECDSA_WITH_AES_128_CCM"
|
| 668 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM "TLS_ECDHE_ECDSA_WITH_AES_256_CCM"
|
| 669 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8"
|
| 670 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CCM_8 "TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8"
|
| 671 |
+
# define TLS1_3_RFC_AES_128_GCM_SHA256 "TLS_AES_128_GCM_SHA256"
|
| 672 |
+
# define TLS1_3_RFC_AES_256_GCM_SHA384 "TLS_AES_256_GCM_SHA384"
|
| 673 |
+
# define TLS1_3_RFC_CHACHA20_POLY1305_SHA256 "TLS_CHACHA20_POLY1305_SHA256"
|
| 674 |
+
# define TLS1_3_RFC_AES_128_CCM_SHA256 "TLS_AES_128_CCM_SHA256"
|
| 675 |
+
# define TLS1_3_RFC_AES_128_CCM_8_SHA256 "TLS_AES_128_CCM_8_SHA256"
|
| 676 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_NULL_SHA "TLS_ECDHE_ECDSA_WITH_NULL_SHA"
|
| 677 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA"
|
| 678 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA"
|
| 679 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA"
|
| 680 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_NULL_SHA "TLS_ECDHE_RSA_WITH_NULL_SHA"
|
| 681 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_DES_192_CBC3_SHA "TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA"
|
| 682 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA"
|
| 683 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_CBC_SHA "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA"
|
| 684 |
+
# define TLS1_RFC_ECDH_anon_WITH_NULL_SHA "TLS_ECDH_anon_WITH_NULL_SHA"
|
| 685 |
+
# define TLS1_RFC_ECDH_anon_WITH_DES_192_CBC3_SHA "TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA"
|
| 686 |
+
# define TLS1_RFC_ECDH_anon_WITH_AES_128_CBC_SHA "TLS_ECDH_anon_WITH_AES_128_CBC_SHA"
|
| 687 |
+
# define TLS1_RFC_ECDH_anon_WITH_AES_256_CBC_SHA "TLS_ECDH_anon_WITH_AES_256_CBC_SHA"
|
| 688 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256"
|
| 689 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384"
|
| 690 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256"
|
| 691 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384"
|
| 692 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256"
|
| 693 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384"
|
| 694 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
|
| 695 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"
|
| 696 |
+
# define TLS1_RFC_PSK_WITH_NULL_SHA "TLS_PSK_WITH_NULL_SHA"
|
| 697 |
+
# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA "TLS_DHE_PSK_WITH_NULL_SHA"
|
| 698 |
+
# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA "TLS_RSA_PSK_WITH_NULL_SHA"
|
| 699 |
+
# define TLS1_RFC_PSK_WITH_3DES_EDE_CBC_SHA "TLS_PSK_WITH_3DES_EDE_CBC_SHA"
|
| 700 |
+
# define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA "TLS_PSK_WITH_AES_128_CBC_SHA"
|
| 701 |
+
# define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA "TLS_PSK_WITH_AES_256_CBC_SHA"
|
| 702 |
+
# define TLS1_RFC_DHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA"
|
| 703 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA "TLS_DHE_PSK_WITH_AES_128_CBC_SHA"
|
| 704 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA "TLS_DHE_PSK_WITH_AES_256_CBC_SHA"
|
| 705 |
+
# define TLS1_RFC_RSA_PSK_WITH_3DES_EDE_CBC_SHA "TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA"
|
| 706 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA "TLS_RSA_PSK_WITH_AES_128_CBC_SHA"
|
| 707 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA "TLS_RSA_PSK_WITH_AES_256_CBC_SHA"
|
| 708 |
+
# define TLS1_RFC_PSK_WITH_AES_128_GCM_SHA256 "TLS_PSK_WITH_AES_128_GCM_SHA256"
|
| 709 |
+
# define TLS1_RFC_PSK_WITH_AES_256_GCM_SHA384 "TLS_PSK_WITH_AES_256_GCM_SHA384"
|
| 710 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_128_GCM_SHA256 "TLS_DHE_PSK_WITH_AES_128_GCM_SHA256"
|
| 711 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_256_GCM_SHA384 "TLS_DHE_PSK_WITH_AES_256_GCM_SHA384"
|
| 712 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_128_GCM_SHA256 "TLS_RSA_PSK_WITH_AES_128_GCM_SHA256"
|
| 713 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_256_GCM_SHA384 "TLS_RSA_PSK_WITH_AES_256_GCM_SHA384"
|
| 714 |
+
# define TLS1_RFC_PSK_WITH_AES_128_CBC_SHA256 "TLS_PSK_WITH_AES_128_CBC_SHA256"
|
| 715 |
+
# define TLS1_RFC_PSK_WITH_AES_256_CBC_SHA384 "TLS_PSK_WITH_AES_256_CBC_SHA384"
|
| 716 |
+
# define TLS1_RFC_PSK_WITH_NULL_SHA256 "TLS_PSK_WITH_NULL_SHA256"
|
| 717 |
+
# define TLS1_RFC_PSK_WITH_NULL_SHA384 "TLS_PSK_WITH_NULL_SHA384"
|
| 718 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_DHE_PSK_WITH_AES_128_CBC_SHA256"
|
| 719 |
+
# define TLS1_RFC_DHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_DHE_PSK_WITH_AES_256_CBC_SHA384"
|
| 720 |
+
# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA256 "TLS_DHE_PSK_WITH_NULL_SHA256"
|
| 721 |
+
# define TLS1_RFC_DHE_PSK_WITH_NULL_SHA384 "TLS_DHE_PSK_WITH_NULL_SHA384"
|
| 722 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_128_CBC_SHA256 "TLS_RSA_PSK_WITH_AES_128_CBC_SHA256"
|
| 723 |
+
# define TLS1_RFC_RSA_PSK_WITH_AES_256_CBC_SHA384 "TLS_RSA_PSK_WITH_AES_256_CBC_SHA384"
|
| 724 |
+
# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA256 "TLS_RSA_PSK_WITH_NULL_SHA256"
|
| 725 |
+
# define TLS1_RFC_RSA_PSK_WITH_NULL_SHA384 "TLS_RSA_PSK_WITH_NULL_SHA384"
|
| 726 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA"
|
| 727 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA"
|
| 728 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA"
|
| 729 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256"
|
| 730 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384"
|
| 731 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA "TLS_ECDHE_PSK_WITH_NULL_SHA"
|
| 732 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA256 "TLS_ECDHE_PSK_WITH_NULL_SHA256"
|
| 733 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_NULL_SHA384 "TLS_ECDHE_PSK_WITH_NULL_SHA384"
|
| 734 |
+
# define TLS1_RFC_SRP_SHA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA"
|
| 735 |
+
# define TLS1_RFC_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA"
|
| 736 |
+
# define TLS1_RFC_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA"
|
| 737 |
+
# define TLS1_RFC_SRP_SHA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_WITH_AES_128_CBC_SHA"
|
| 738 |
+
# define TLS1_RFC_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA"
|
| 739 |
+
# define TLS1_RFC_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA"
|
| 740 |
+
# define TLS1_RFC_SRP_SHA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_WITH_AES_256_CBC_SHA"
|
| 741 |
+
# define TLS1_RFC_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA"
|
| 742 |
+
# define TLS1_RFC_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA"
|
| 743 |
+
# define TLS1_RFC_DHE_RSA_WITH_CHACHA20_POLY1305 "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
|
| 744 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256"
|
| 745 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256"
|
| 746 |
+
# define TLS1_RFC_PSK_WITH_CHACHA20_POLY1305 "TLS_PSK_WITH_CHACHA20_POLY1305_SHA256"
|
| 747 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_CHACHA20_POLY1305 "TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
|
| 748 |
+
# define TLS1_RFC_DHE_PSK_WITH_CHACHA20_POLY1305 "TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256"
|
| 749 |
+
# define TLS1_RFC_RSA_PSK_WITH_CHACHA20_POLY1305 "TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256"
|
| 750 |
+
# define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256"
|
| 751 |
+
# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256"
|
| 752 |
+
# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
|
| 753 |
+
# define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256"
|
| 754 |
+
# define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256"
|
| 755 |
+
# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256"
|
| 756 |
+
# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256"
|
| 757 |
+
# define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA256 "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256"
|
| 758 |
+
# define TLS1_RFC_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_RSA_WITH_CAMELLIA_256_CBC_SHA"
|
| 759 |
+
# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA"
|
| 760 |
+
# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA"
|
| 761 |
+
# define TLS1_RFC_ADH_WITH_CAMELLIA_256_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA"
|
| 762 |
+
# define TLS1_RFC_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_RSA_WITH_CAMELLIA_128_CBC_SHA"
|
| 763 |
+
# define TLS1_RFC_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA"
|
| 764 |
+
# define TLS1_RFC_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA"
|
| 765 |
+
# define TLS1_RFC_ADH_WITH_CAMELLIA_128_CBC_SHA "TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA"
|
| 766 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256"
|
| 767 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384"
|
| 768 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256"
|
| 769 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384"
|
| 770 |
+
# define TLS1_RFC_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256"
|
| 771 |
+
# define TLS1_RFC_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384"
|
| 772 |
+
# define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
|
| 773 |
+
# define TLS1_RFC_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
|
| 774 |
+
# define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256"
|
| 775 |
+
# define TLS1_RFC_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384"
|
| 776 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256"
|
| 777 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384"
|
| 778 |
+
# define TLS1_RFC_RSA_WITH_SEED_SHA "TLS_RSA_WITH_SEED_CBC_SHA"
|
| 779 |
+
# define TLS1_RFC_DHE_DSS_WITH_SEED_SHA "TLS_DHE_DSS_WITH_SEED_CBC_SHA"
|
| 780 |
+
# define TLS1_RFC_DHE_RSA_WITH_SEED_SHA "TLS_DHE_RSA_WITH_SEED_CBC_SHA"
|
| 781 |
+
# define TLS1_RFC_ADH_WITH_SEED_SHA "TLS_DH_anon_WITH_SEED_CBC_SHA"
|
| 782 |
+
# define TLS1_RFC_ECDHE_PSK_WITH_RC4_128_SHA "TLS_ECDHE_PSK_WITH_RC4_128_SHA"
|
| 783 |
+
# define TLS1_RFC_ECDH_anon_WITH_RC4_128_SHA "TLS_ECDH_anon_WITH_RC4_128_SHA"
|
| 784 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_RC4_128_SHA "TLS_ECDHE_ECDSA_WITH_RC4_128_SHA"
|
| 785 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_RC4_128_SHA "TLS_ECDHE_RSA_WITH_RC4_128_SHA"
|
| 786 |
+
# define TLS1_RFC_PSK_WITH_RC4_128_SHA "TLS_PSK_WITH_RC4_128_SHA"
|
| 787 |
+
# define TLS1_RFC_RSA_PSK_WITH_RC4_128_SHA "TLS_RSA_PSK_WITH_RC4_128_SHA"
|
| 788 |
+
# define TLS1_RFC_DHE_PSK_WITH_RC4_128_SHA "TLS_DHE_PSK_WITH_RC4_128_SHA"
|
| 789 |
+
# define TLS1_RFC_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_WITH_ARIA_128_GCM_SHA256"
|
| 790 |
+
# define TLS1_RFC_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_WITH_ARIA_256_GCM_SHA384"
|
| 791 |
+
# define TLS1_RFC_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256"
|
| 792 |
+
# define TLS1_RFC_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384"
|
| 793 |
+
# define TLS1_RFC_DH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256"
|
| 794 |
+
# define TLS1_RFC_DH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384"
|
| 795 |
+
# define TLS1_RFC_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256"
|
| 796 |
+
# define TLS1_RFC_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384"
|
| 797 |
+
# define TLS1_RFC_DH_DSS_WITH_ARIA_128_GCM_SHA256 "TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256"
|
| 798 |
+
# define TLS1_RFC_DH_DSS_WITH_ARIA_256_GCM_SHA384 "TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384"
|
| 799 |
+
# define TLS1_RFC_DH_anon_WITH_ARIA_128_GCM_SHA256 "TLS_DH_anon_WITH_ARIA_128_GCM_SHA256"
|
| 800 |
+
# define TLS1_RFC_DH_anon_WITH_ARIA_256_GCM_SHA384 "TLS_DH_anon_WITH_ARIA_256_GCM_SHA384"
|
| 801 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256"
|
| 802 |
+
# define TLS1_RFC_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384"
|
| 803 |
+
# define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256"
|
| 804 |
+
# define TLS1_RFC_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384"
|
| 805 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256"
|
| 806 |
+
# define TLS1_RFC_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384"
|
| 807 |
+
# define TLS1_RFC_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256"
|
| 808 |
+
# define TLS1_RFC_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384"
|
| 809 |
+
# define TLS1_RFC_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_PSK_WITH_ARIA_128_GCM_SHA256"
|
| 810 |
+
# define TLS1_RFC_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_PSK_WITH_ARIA_256_GCM_SHA384"
|
| 811 |
+
# define TLS1_RFC_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256"
|
| 812 |
+
# define TLS1_RFC_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384"
|
| 813 |
+
# define TLS1_RFC_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256"
|
| 814 |
+
# define TLS1_RFC_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384"
|
| 815 |
+
|
| 816 |
+
|
| 817 |
+
/*
|
| 818 |
+
* XXX Backward compatibility alert: Older versions of OpenSSL gave some DHE
|
| 819 |
+
* ciphers names with "EDH" instead of "DHE". Going forward, we should be
|
| 820 |
+
* using DHE everywhere, though we may indefinitely maintain aliases for
|
| 821 |
+
* users or configurations that used "EDH"
|
| 822 |
+
*/
|
| 823 |
+
# define TLS1_TXT_DHE_DSS_WITH_RC4_128_SHA "DHE-DSS-RC4-SHA"
|
| 824 |
+
|
| 825 |
+
# define TLS1_TXT_PSK_WITH_NULL_SHA "PSK-NULL-SHA"
|
| 826 |
+
# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA "DHE-PSK-NULL-SHA"
|
| 827 |
+
# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA "RSA-PSK-NULL-SHA"
|
| 828 |
+
|
| 829 |
+
/* AES ciphersuites from RFC3268 */
|
| 830 |
+
# define TLS1_TXT_RSA_WITH_AES_128_SHA "AES128-SHA"
|
| 831 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA "DH-DSS-AES128-SHA"
|
| 832 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA "DH-RSA-AES128-SHA"
|
| 833 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA "DHE-DSS-AES128-SHA"
|
| 834 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA "DHE-RSA-AES128-SHA"
|
| 835 |
+
# define TLS1_TXT_ADH_WITH_AES_128_SHA "ADH-AES128-SHA"
|
| 836 |
+
|
| 837 |
+
# define TLS1_TXT_RSA_WITH_AES_256_SHA "AES256-SHA"
|
| 838 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA "DH-DSS-AES256-SHA"
|
| 839 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA "DH-RSA-AES256-SHA"
|
| 840 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA "DHE-DSS-AES256-SHA"
|
| 841 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA "DHE-RSA-AES256-SHA"
|
| 842 |
+
# define TLS1_TXT_ADH_WITH_AES_256_SHA "ADH-AES256-SHA"
|
| 843 |
+
|
| 844 |
+
/* ECC ciphersuites from RFC4492 */
|
| 845 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_NULL_SHA "ECDH-ECDSA-NULL-SHA"
|
| 846 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_RC4_128_SHA "ECDH-ECDSA-RC4-SHA"
|
| 847 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_DES_192_CBC3_SHA "ECDH-ECDSA-DES-CBC3-SHA"
|
| 848 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_CBC_SHA "ECDH-ECDSA-AES128-SHA"
|
| 849 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_CBC_SHA "ECDH-ECDSA-AES256-SHA"
|
| 850 |
+
|
| 851 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_NULL_SHA "ECDHE-ECDSA-NULL-SHA"
|
| 852 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_RC4_128_SHA "ECDHE-ECDSA-RC4-SHA"
|
| 853 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_DES_192_CBC3_SHA "ECDHE-ECDSA-DES-CBC3-SHA"
|
| 854 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CBC_SHA "ECDHE-ECDSA-AES128-SHA"
|
| 855 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CBC_SHA "ECDHE-ECDSA-AES256-SHA"
|
| 856 |
+
|
| 857 |
+
# define TLS1_TXT_ECDH_RSA_WITH_NULL_SHA "ECDH-RSA-NULL-SHA"
|
| 858 |
+
# define TLS1_TXT_ECDH_RSA_WITH_RC4_128_SHA "ECDH-RSA-RC4-SHA"
|
| 859 |
+
# define TLS1_TXT_ECDH_RSA_WITH_DES_192_CBC3_SHA "ECDH-RSA-DES-CBC3-SHA"
|
| 860 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_CBC_SHA "ECDH-RSA-AES128-SHA"
|
| 861 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_CBC_SHA "ECDH-RSA-AES256-SHA"
|
| 862 |
+
|
| 863 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_NULL_SHA "ECDHE-RSA-NULL-SHA"
|
| 864 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_RC4_128_SHA "ECDHE-RSA-RC4-SHA"
|
| 865 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_DES_192_CBC3_SHA "ECDHE-RSA-DES-CBC3-SHA"
|
| 866 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_CBC_SHA "ECDHE-RSA-AES128-SHA"
|
| 867 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA "ECDHE-RSA-AES256-SHA"
|
| 868 |
+
|
| 869 |
+
# define TLS1_TXT_ECDH_anon_WITH_NULL_SHA "AECDH-NULL-SHA"
|
| 870 |
+
# define TLS1_TXT_ECDH_anon_WITH_RC4_128_SHA "AECDH-RC4-SHA"
|
| 871 |
+
# define TLS1_TXT_ECDH_anon_WITH_DES_192_CBC3_SHA "AECDH-DES-CBC3-SHA"
|
| 872 |
+
# define TLS1_TXT_ECDH_anon_WITH_AES_128_CBC_SHA "AECDH-AES128-SHA"
|
| 873 |
+
# define TLS1_TXT_ECDH_anon_WITH_AES_256_CBC_SHA "AECDH-AES256-SHA"
|
| 874 |
+
|
| 875 |
+
/* PSK ciphersuites from RFC 4279 */
|
| 876 |
+
# define TLS1_TXT_PSK_WITH_RC4_128_SHA "PSK-RC4-SHA"
|
| 877 |
+
# define TLS1_TXT_PSK_WITH_3DES_EDE_CBC_SHA "PSK-3DES-EDE-CBC-SHA"
|
| 878 |
+
# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA "PSK-AES128-CBC-SHA"
|
| 879 |
+
# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA "PSK-AES256-CBC-SHA"
|
| 880 |
+
|
| 881 |
+
# define TLS1_TXT_DHE_PSK_WITH_RC4_128_SHA "DHE-PSK-RC4-SHA"
|
| 882 |
+
# define TLS1_TXT_DHE_PSK_WITH_3DES_EDE_CBC_SHA "DHE-PSK-3DES-EDE-CBC-SHA"
|
| 883 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA "DHE-PSK-AES128-CBC-SHA"
|
| 884 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA "DHE-PSK-AES256-CBC-SHA"
|
| 885 |
+
# define TLS1_TXT_RSA_PSK_WITH_RC4_128_SHA "RSA-PSK-RC4-SHA"
|
| 886 |
+
# define TLS1_TXT_RSA_PSK_WITH_3DES_EDE_CBC_SHA "RSA-PSK-3DES-EDE-CBC-SHA"
|
| 887 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA "RSA-PSK-AES128-CBC-SHA"
|
| 888 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA "RSA-PSK-AES256-CBC-SHA"
|
| 889 |
+
|
| 890 |
+
/* PSK ciphersuites from RFC 5487 */
|
| 891 |
+
# define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
|
| 892 |
+
# define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
|
| 893 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_128_GCM_SHA256 "DHE-PSK-AES128-GCM-SHA256"
|
| 894 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_256_GCM_SHA384 "DHE-PSK-AES256-GCM-SHA384"
|
| 895 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_128_GCM_SHA256 "RSA-PSK-AES128-GCM-SHA256"
|
| 896 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_256_GCM_SHA384 "RSA-PSK-AES256-GCM-SHA384"
|
| 897 |
+
|
| 898 |
+
# define TLS1_TXT_PSK_WITH_AES_128_CBC_SHA256 "PSK-AES128-CBC-SHA256"
|
| 899 |
+
# define TLS1_TXT_PSK_WITH_AES_256_CBC_SHA384 "PSK-AES256-CBC-SHA384"
|
| 900 |
+
# define TLS1_TXT_PSK_WITH_NULL_SHA256 "PSK-NULL-SHA256"
|
| 901 |
+
# define TLS1_TXT_PSK_WITH_NULL_SHA384 "PSK-NULL-SHA384"
|
| 902 |
+
|
| 903 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_128_CBC_SHA256 "DHE-PSK-AES128-CBC-SHA256"
|
| 904 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_256_CBC_SHA384 "DHE-PSK-AES256-CBC-SHA384"
|
| 905 |
+
# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA256 "DHE-PSK-NULL-SHA256"
|
| 906 |
+
# define TLS1_TXT_DHE_PSK_WITH_NULL_SHA384 "DHE-PSK-NULL-SHA384"
|
| 907 |
+
|
| 908 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_128_CBC_SHA256 "RSA-PSK-AES128-CBC-SHA256"
|
| 909 |
+
# define TLS1_TXT_RSA_PSK_WITH_AES_256_CBC_SHA384 "RSA-PSK-AES256-CBC-SHA384"
|
| 910 |
+
# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA256 "RSA-PSK-NULL-SHA256"
|
| 911 |
+
# define TLS1_TXT_RSA_PSK_WITH_NULL_SHA384 "RSA-PSK-NULL-SHA384"
|
| 912 |
+
|
| 913 |
+
/* SRP ciphersuite from RFC 5054 */
|
| 914 |
+
# define TLS1_TXT_SRP_SHA_WITH_3DES_EDE_CBC_SHA "SRP-3DES-EDE-CBC-SHA"
|
| 915 |
+
# define TLS1_TXT_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA "SRP-RSA-3DES-EDE-CBC-SHA"
|
| 916 |
+
# define TLS1_TXT_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA "SRP-DSS-3DES-EDE-CBC-SHA"
|
| 917 |
+
# define TLS1_TXT_SRP_SHA_WITH_AES_128_CBC_SHA "SRP-AES-128-CBC-SHA"
|
| 918 |
+
# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_128_CBC_SHA "SRP-RSA-AES-128-CBC-SHA"
|
| 919 |
+
# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_128_CBC_SHA "SRP-DSS-AES-128-CBC-SHA"
|
| 920 |
+
# define TLS1_TXT_SRP_SHA_WITH_AES_256_CBC_SHA "SRP-AES-256-CBC-SHA"
|
| 921 |
+
# define TLS1_TXT_SRP_SHA_RSA_WITH_AES_256_CBC_SHA "SRP-RSA-AES-256-CBC-SHA"
|
| 922 |
+
# define TLS1_TXT_SRP_SHA_DSS_WITH_AES_256_CBC_SHA "SRP-DSS-AES-256-CBC-SHA"
|
| 923 |
+
|
| 924 |
+
/* Camellia ciphersuites from RFC4132 */
|
| 925 |
+
# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA "CAMELLIA128-SHA"
|
| 926 |
+
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA "DH-DSS-CAMELLIA128-SHA"
|
| 927 |
+
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA "DH-RSA-CAMELLIA128-SHA"
|
| 928 |
+
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA "DHE-DSS-CAMELLIA128-SHA"
|
| 929 |
+
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA "DHE-RSA-CAMELLIA128-SHA"
|
| 930 |
+
# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA "ADH-CAMELLIA128-SHA"
|
| 931 |
+
|
| 932 |
+
# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA "CAMELLIA256-SHA"
|
| 933 |
+
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA "DH-DSS-CAMELLIA256-SHA"
|
| 934 |
+
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA "DH-RSA-CAMELLIA256-SHA"
|
| 935 |
+
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA "DHE-DSS-CAMELLIA256-SHA"
|
| 936 |
+
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA "DHE-RSA-CAMELLIA256-SHA"
|
| 937 |
+
# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA "ADH-CAMELLIA256-SHA"
|
| 938 |
+
|
| 939 |
+
/* TLS 1.2 Camellia SHA-256 ciphersuites from RFC5932 */
|
| 940 |
+
# define TLS1_TXT_RSA_WITH_CAMELLIA_128_CBC_SHA256 "CAMELLIA128-SHA256"
|
| 941 |
+
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DH-DSS-CAMELLIA128-SHA256"
|
| 942 |
+
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DH-RSA-CAMELLIA128-SHA256"
|
| 943 |
+
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 "DHE-DSS-CAMELLIA128-SHA256"
|
| 944 |
+
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "DHE-RSA-CAMELLIA128-SHA256"
|
| 945 |
+
# define TLS1_TXT_ADH_WITH_CAMELLIA_128_CBC_SHA256 "ADH-CAMELLIA128-SHA256"
|
| 946 |
+
|
| 947 |
+
# define TLS1_TXT_RSA_WITH_CAMELLIA_256_CBC_SHA256 "CAMELLIA256-SHA256"
|
| 948 |
+
# define TLS1_TXT_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DH-DSS-CAMELLIA256-SHA256"
|
| 949 |
+
# define TLS1_TXT_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DH-RSA-CAMELLIA256-SHA256"
|
| 950 |
+
# define TLS1_TXT_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 "DHE-DSS-CAMELLIA256-SHA256"
|
| 951 |
+
# define TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 "DHE-RSA-CAMELLIA256-SHA256"
|
| 952 |
+
# define TLS1_TXT_ADH_WITH_CAMELLIA_256_CBC_SHA256 "ADH-CAMELLIA256-SHA256"
|
| 953 |
+
|
| 954 |
+
# define TLS1_TXT_PSK_WITH_CAMELLIA_128_CBC_SHA256 "PSK-CAMELLIA128-SHA256"
|
| 955 |
+
# define TLS1_TXT_PSK_WITH_CAMELLIA_256_CBC_SHA384 "PSK-CAMELLIA256-SHA384"
|
| 956 |
+
# define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "DHE-PSK-CAMELLIA128-SHA256"
|
| 957 |
+
# define TLS1_TXT_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "DHE-PSK-CAMELLIA256-SHA384"
|
| 958 |
+
# define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 "RSA-PSK-CAMELLIA128-SHA256"
|
| 959 |
+
# define TLS1_TXT_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 "RSA-PSK-CAMELLIA256-SHA384"
|
| 960 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-PSK-CAMELLIA128-SHA256"
|
| 961 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-PSK-CAMELLIA256-SHA384"
|
| 962 |
+
|
| 963 |
+
/* SEED ciphersuites from RFC4162 */
|
| 964 |
+
# define TLS1_TXT_RSA_WITH_SEED_SHA "SEED-SHA"
|
| 965 |
+
# define TLS1_TXT_DH_DSS_WITH_SEED_SHA "DH-DSS-SEED-SHA"
|
| 966 |
+
# define TLS1_TXT_DH_RSA_WITH_SEED_SHA "DH-RSA-SEED-SHA"
|
| 967 |
+
# define TLS1_TXT_DHE_DSS_WITH_SEED_SHA "DHE-DSS-SEED-SHA"
|
| 968 |
+
# define TLS1_TXT_DHE_RSA_WITH_SEED_SHA "DHE-RSA-SEED-SHA"
|
| 969 |
+
# define TLS1_TXT_ADH_WITH_SEED_SHA "ADH-SEED-SHA"
|
| 970 |
+
|
| 971 |
+
/* TLS v1.2 ciphersuites */
|
| 972 |
+
# define TLS1_TXT_RSA_WITH_NULL_SHA256 "NULL-SHA256"
|
| 973 |
+
# define TLS1_TXT_RSA_WITH_AES_128_SHA256 "AES128-SHA256"
|
| 974 |
+
# define TLS1_TXT_RSA_WITH_AES_256_SHA256 "AES256-SHA256"
|
| 975 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_128_SHA256 "DH-DSS-AES128-SHA256"
|
| 976 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_128_SHA256 "DH-RSA-AES128-SHA256"
|
| 977 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_128_SHA256 "DHE-DSS-AES128-SHA256"
|
| 978 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_128_SHA256 "DHE-RSA-AES128-SHA256"
|
| 979 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_256_SHA256 "DH-DSS-AES256-SHA256"
|
| 980 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_256_SHA256 "DH-RSA-AES256-SHA256"
|
| 981 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256 "DHE-DSS-AES256-SHA256"
|
| 982 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256 "DHE-RSA-AES256-SHA256"
|
| 983 |
+
# define TLS1_TXT_ADH_WITH_AES_128_SHA256 "ADH-AES128-SHA256"
|
| 984 |
+
# define TLS1_TXT_ADH_WITH_AES_256_SHA256 "ADH-AES256-SHA256"
|
| 985 |
+
|
| 986 |
+
/* TLS v1.2 GCM ciphersuites from RFC5288 */
|
| 987 |
+
# define TLS1_TXT_RSA_WITH_AES_128_GCM_SHA256 "AES128-GCM-SHA256"
|
| 988 |
+
# define TLS1_TXT_RSA_WITH_AES_256_GCM_SHA384 "AES256-GCM-SHA384"
|
| 989 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_128_GCM_SHA256 "DHE-RSA-AES128-GCM-SHA256"
|
| 990 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_256_GCM_SHA384 "DHE-RSA-AES256-GCM-SHA384"
|
| 991 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_128_GCM_SHA256 "DH-RSA-AES128-GCM-SHA256"
|
| 992 |
+
# define TLS1_TXT_DH_RSA_WITH_AES_256_GCM_SHA384 "DH-RSA-AES256-GCM-SHA384"
|
| 993 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_128_GCM_SHA256 "DHE-DSS-AES128-GCM-SHA256"
|
| 994 |
+
# define TLS1_TXT_DHE_DSS_WITH_AES_256_GCM_SHA384 "DHE-DSS-AES256-GCM-SHA384"
|
| 995 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_128_GCM_SHA256 "DH-DSS-AES128-GCM-SHA256"
|
| 996 |
+
# define TLS1_TXT_DH_DSS_WITH_AES_256_GCM_SHA384 "DH-DSS-AES256-GCM-SHA384"
|
| 997 |
+
# define TLS1_TXT_ADH_WITH_AES_128_GCM_SHA256 "ADH-AES128-GCM-SHA256"
|
| 998 |
+
# define TLS1_TXT_ADH_WITH_AES_256_GCM_SHA384 "ADH-AES256-GCM-SHA384"
|
| 999 |
+
|
| 1000 |
+
/* CCM ciphersuites from RFC6655 */
|
| 1001 |
+
# define TLS1_TXT_RSA_WITH_AES_128_CCM "AES128-CCM"
|
| 1002 |
+
# define TLS1_TXT_RSA_WITH_AES_256_CCM "AES256-CCM"
|
| 1003 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM "DHE-RSA-AES128-CCM"
|
| 1004 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM "DHE-RSA-AES256-CCM"
|
| 1005 |
+
|
| 1006 |
+
# define TLS1_TXT_RSA_WITH_AES_128_CCM_8 "AES128-CCM8"
|
| 1007 |
+
# define TLS1_TXT_RSA_WITH_AES_256_CCM_8 "AES256-CCM8"
|
| 1008 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_128_CCM_8 "DHE-RSA-AES128-CCM8"
|
| 1009 |
+
# define TLS1_TXT_DHE_RSA_WITH_AES_256_CCM_8 "DHE-RSA-AES256-CCM8"
|
| 1010 |
+
|
| 1011 |
+
# define TLS1_TXT_PSK_WITH_AES_128_CCM "PSK-AES128-CCM"
|
| 1012 |
+
# define TLS1_TXT_PSK_WITH_AES_256_CCM "PSK-AES256-CCM"
|
| 1013 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM "DHE-PSK-AES128-CCM"
|
| 1014 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM "DHE-PSK-AES256-CCM"
|
| 1015 |
+
|
| 1016 |
+
# define TLS1_TXT_PSK_WITH_AES_128_CCM_8 "PSK-AES128-CCM8"
|
| 1017 |
+
# define TLS1_TXT_PSK_WITH_AES_256_CCM_8 "PSK-AES256-CCM8"
|
| 1018 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_128_CCM_8 "DHE-PSK-AES128-CCM8"
|
| 1019 |
+
# define TLS1_TXT_DHE_PSK_WITH_AES_256_CCM_8 "DHE-PSK-AES256-CCM8"
|
| 1020 |
+
|
| 1021 |
+
/* CCM ciphersuites from RFC7251 */
|
| 1022 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM "ECDHE-ECDSA-AES128-CCM"
|
| 1023 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM "ECDHE-ECDSA-AES256-CCM"
|
| 1024 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_CCM_8 "ECDHE-ECDSA-AES128-CCM8"
|
| 1025 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_CCM_8 "ECDHE-ECDSA-AES256-CCM8"
|
| 1026 |
+
|
| 1027 |
+
/* ECDH HMAC based ciphersuites from RFC5289 */
|
| 1028 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_SHA256 "ECDHE-ECDSA-AES128-SHA256"
|
| 1029 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384 "ECDHE-ECDSA-AES256-SHA384"
|
| 1030 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_SHA256 "ECDH-ECDSA-AES128-SHA256"
|
| 1031 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_SHA384 "ECDH-ECDSA-AES256-SHA384"
|
| 1032 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_SHA256 "ECDHE-RSA-AES128-SHA256"
|
| 1033 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384 "ECDHE-RSA-AES256-SHA384"
|
| 1034 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_SHA256 "ECDH-RSA-AES128-SHA256"
|
| 1035 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_SHA384 "ECDH-RSA-AES256-SHA384"
|
| 1036 |
+
|
| 1037 |
+
/* ECDH GCM based ciphersuites from RFC5289 */
|
| 1038 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 "ECDHE-ECDSA-AES128-GCM-SHA256"
|
| 1039 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 "ECDHE-ECDSA-AES256-GCM-SHA384"
|
| 1040 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 "ECDH-ECDSA-AES128-GCM-SHA256"
|
| 1041 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 "ECDH-ECDSA-AES256-GCM-SHA384"
|
| 1042 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_128_GCM_SHA256 "ECDHE-RSA-AES128-GCM-SHA256"
|
| 1043 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_AES_256_GCM_SHA384 "ECDHE-RSA-AES256-GCM-SHA384"
|
| 1044 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_128_GCM_SHA256 "ECDH-RSA-AES128-GCM-SHA256"
|
| 1045 |
+
# define TLS1_TXT_ECDH_RSA_WITH_AES_256_GCM_SHA384 "ECDH-RSA-AES256-GCM-SHA384"
|
| 1046 |
+
|
| 1047 |
+
/* TLS v1.2 PSK GCM ciphersuites from RFC5487 */
|
| 1048 |
+
# define TLS1_TXT_PSK_WITH_AES_128_GCM_SHA256 "PSK-AES128-GCM-SHA256"
|
| 1049 |
+
# define TLS1_TXT_PSK_WITH_AES_256_GCM_SHA384 "PSK-AES256-GCM-SHA384"
|
| 1050 |
+
|
| 1051 |
+
/* ECDHE PSK ciphersuites from RFC 5489 */
|
| 1052 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_RC4_128_SHA "ECDHE-PSK-RC4-SHA"
|
| 1053 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA "ECDHE-PSK-3DES-EDE-CBC-SHA"
|
| 1054 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA "ECDHE-PSK-AES128-CBC-SHA"
|
| 1055 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA "ECDHE-PSK-AES256-CBC-SHA"
|
| 1056 |
+
|
| 1057 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_AES_128_CBC_SHA256 "ECDHE-PSK-AES128-CBC-SHA256"
|
| 1058 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_AES_256_CBC_SHA384 "ECDHE-PSK-AES256-CBC-SHA384"
|
| 1059 |
+
|
| 1060 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA "ECDHE-PSK-NULL-SHA"
|
| 1061 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA256 "ECDHE-PSK-NULL-SHA256"
|
| 1062 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_NULL_SHA384 "ECDHE-PSK-NULL-SHA384"
|
| 1063 |
+
|
| 1064 |
+
/* Camellia-CBC ciphersuites from RFC6367 */
|
| 1065 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-ECDSA-CAMELLIA128-SHA256"
|
| 1066 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-ECDSA-CAMELLIA256-SHA384"
|
| 1067 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-ECDSA-CAMELLIA128-SHA256"
|
| 1068 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-ECDSA-CAMELLIA256-SHA384"
|
| 1069 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDHE-RSA-CAMELLIA128-SHA256"
|
| 1070 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDHE-RSA-CAMELLIA256-SHA384"
|
| 1071 |
+
# define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 "ECDH-RSA-CAMELLIA128-SHA256"
|
| 1072 |
+
# define TLS1_TXT_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 "ECDH-RSA-CAMELLIA256-SHA384"
|
| 1073 |
+
|
| 1074 |
+
/* draft-ietf-tls-chacha20-poly1305-03 */
|
| 1075 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 "ECDHE-RSA-CHACHA20-POLY1305"
|
| 1076 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305 "ECDHE-ECDSA-CHACHA20-POLY1305"
|
| 1077 |
+
# define TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305 "DHE-RSA-CHACHA20-POLY1305"
|
| 1078 |
+
# define TLS1_TXT_PSK_WITH_CHACHA20_POLY1305 "PSK-CHACHA20-POLY1305"
|
| 1079 |
+
# define TLS1_TXT_ECDHE_PSK_WITH_CHACHA20_POLY1305 "ECDHE-PSK-CHACHA20-POLY1305"
|
| 1080 |
+
# define TLS1_TXT_DHE_PSK_WITH_CHACHA20_POLY1305 "DHE-PSK-CHACHA20-POLY1305"
|
| 1081 |
+
# define TLS1_TXT_RSA_PSK_WITH_CHACHA20_POLY1305 "RSA-PSK-CHACHA20-POLY1305"
|
| 1082 |
+
|
| 1083 |
+
/* Aria ciphersuites from RFC6209 */
|
| 1084 |
+
# define TLS1_TXT_RSA_WITH_ARIA_128_GCM_SHA256 "ARIA128-GCM-SHA256"
|
| 1085 |
+
# define TLS1_TXT_RSA_WITH_ARIA_256_GCM_SHA384 "ARIA256-GCM-SHA384"
|
| 1086 |
+
# define TLS1_TXT_DHE_RSA_WITH_ARIA_128_GCM_SHA256 "DHE-RSA-ARIA128-GCM-SHA256"
|
| 1087 |
+
# define TLS1_TXT_DHE_RSA_WITH_ARIA_256_GCM_SHA384 "DHE-RSA-ARIA256-GCM-SHA384"
|
| 1088 |
+
# define TLS1_TXT_DH_RSA_WITH_ARIA_128_GCM_SHA256 "DH-RSA-ARIA128-GCM-SHA256"
|
| 1089 |
+
# define TLS1_TXT_DH_RSA_WITH_ARIA_256_GCM_SHA384 "DH-RSA-ARIA256-GCM-SHA384"
|
| 1090 |
+
# define TLS1_TXT_DHE_DSS_WITH_ARIA_128_GCM_SHA256 "DHE-DSS-ARIA128-GCM-SHA256"
|
| 1091 |
+
# define TLS1_TXT_DHE_DSS_WITH_ARIA_256_GCM_SHA384 "DHE-DSS-ARIA256-GCM-SHA384"
|
| 1092 |
+
# define TLS1_TXT_DH_DSS_WITH_ARIA_128_GCM_SHA256 "DH-DSS-ARIA128-GCM-SHA256"
|
| 1093 |
+
# define TLS1_TXT_DH_DSS_WITH_ARIA_256_GCM_SHA384 "DH-DSS-ARIA256-GCM-SHA384"
|
| 1094 |
+
# define TLS1_TXT_DH_anon_WITH_ARIA_128_GCM_SHA256 "ADH-ARIA128-GCM-SHA256"
|
| 1095 |
+
# define TLS1_TXT_DH_anon_WITH_ARIA_256_GCM_SHA384 "ADH-ARIA256-GCM-SHA384"
|
| 1096 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ECDSA-ARIA128-GCM-SHA256"
|
| 1097 |
+
# define TLS1_TXT_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ECDSA-ARIA256-GCM-SHA384"
|
| 1098 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ECDSA-ARIA128-GCM-SHA256"
|
| 1099 |
+
# define TLS1_TXT_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ECDSA-ARIA256-GCM-SHA384"
|
| 1100 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 "ECDHE-ARIA128-GCM-SHA256"
|
| 1101 |
+
# define TLS1_TXT_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 "ECDHE-ARIA256-GCM-SHA384"
|
| 1102 |
+
# define TLS1_TXT_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 "ECDH-ARIA128-GCM-SHA256"
|
| 1103 |
+
# define TLS1_TXT_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 "ECDH-ARIA256-GCM-SHA384"
|
| 1104 |
+
# define TLS1_TXT_PSK_WITH_ARIA_128_GCM_SHA256 "PSK-ARIA128-GCM-SHA256"
|
| 1105 |
+
# define TLS1_TXT_PSK_WITH_ARIA_256_GCM_SHA384 "PSK-ARIA256-GCM-SHA384"
|
| 1106 |
+
# define TLS1_TXT_DHE_PSK_WITH_ARIA_128_GCM_SHA256 "DHE-PSK-ARIA128-GCM-SHA256"
|
| 1107 |
+
# define TLS1_TXT_DHE_PSK_WITH_ARIA_256_GCM_SHA384 "DHE-PSK-ARIA256-GCM-SHA384"
|
| 1108 |
+
# define TLS1_TXT_RSA_PSK_WITH_ARIA_128_GCM_SHA256 "RSA-PSK-ARIA128-GCM-SHA256"
|
| 1109 |
+
# define TLS1_TXT_RSA_PSK_WITH_ARIA_256_GCM_SHA384 "RSA-PSK-ARIA256-GCM-SHA384"
|
| 1110 |
+
|
| 1111 |
+
# define TLS_CT_RSA_SIGN 1
|
| 1112 |
+
# define TLS_CT_DSS_SIGN 2
|
| 1113 |
+
# define TLS_CT_RSA_FIXED_DH 3
|
| 1114 |
+
# define TLS_CT_DSS_FIXED_DH 4
|
| 1115 |
+
# define TLS_CT_ECDSA_SIGN 64
|
| 1116 |
+
# define TLS_CT_RSA_FIXED_ECDH 65
|
| 1117 |
+
# define TLS_CT_ECDSA_FIXED_ECDH 66
|
| 1118 |
+
# define TLS_CT_GOST01_SIGN 22
|
| 1119 |
+
# define TLS_CT_GOST12_IANA_SIGN 67
|
| 1120 |
+
# define TLS_CT_GOST12_IANA_512_SIGN 68
|
| 1121 |
+
# define TLS_CT_GOST12_LEGACY_SIGN 238
|
| 1122 |
+
# define TLS_CT_GOST12_LEGACY_512_SIGN 239
|
| 1123 |
+
|
| 1124 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 1125 |
+
# define TLS_CT_GOST12_SIGN TLS_CT_GOST12_LEGACY_SIGN
|
| 1126 |
+
# define TLS_CT_GOST12_512_SIGN TLS_CT_GOST12_LEGACY_512_SIGN
|
| 1127 |
+
# endif
|
| 1128 |
+
|
| 1129 |
+
/*
|
| 1130 |
+
* when correcting this number, correct also SSL3_CT_NUMBER in ssl3.h (see
|
| 1131 |
+
* comment there)
|
| 1132 |
+
*/
|
| 1133 |
+
# define TLS_CT_NUMBER 12
|
| 1134 |
+
|
| 1135 |
+
# if defined(SSL3_CT_NUMBER)
|
| 1136 |
+
# if TLS_CT_NUMBER != SSL3_CT_NUMBER
|
| 1137 |
+
# error "SSL/TLS CT_NUMBER values do not match"
|
| 1138 |
+
# endif
|
| 1139 |
+
# endif
|
| 1140 |
+
|
| 1141 |
+
# define TLS1_FINISH_MAC_LENGTH 12
|
| 1142 |
+
|
| 1143 |
+
# define TLS_MD_MAX_CONST_SIZE 22
|
| 1144 |
+
# define TLS_MD_CLIENT_FINISH_CONST "client finished"
|
| 1145 |
+
# define TLS_MD_CLIENT_FINISH_CONST_SIZE 15
|
| 1146 |
+
# define TLS_MD_SERVER_FINISH_CONST "server finished"
|
| 1147 |
+
# define TLS_MD_SERVER_FINISH_CONST_SIZE 15
|
| 1148 |
+
# define TLS_MD_KEY_EXPANSION_CONST "key expansion"
|
| 1149 |
+
# define TLS_MD_KEY_EXPANSION_CONST_SIZE 13
|
| 1150 |
+
# define TLS_MD_CLIENT_WRITE_KEY_CONST "client write key"
|
| 1151 |
+
# define TLS_MD_CLIENT_WRITE_KEY_CONST_SIZE 16
|
| 1152 |
+
# define TLS_MD_SERVER_WRITE_KEY_CONST "server write key"
|
| 1153 |
+
# define TLS_MD_SERVER_WRITE_KEY_CONST_SIZE 16
|
| 1154 |
+
# define TLS_MD_IV_BLOCK_CONST "IV block"
|
| 1155 |
+
# define TLS_MD_IV_BLOCK_CONST_SIZE 8
|
| 1156 |
+
# define TLS_MD_MASTER_SECRET_CONST "master secret"
|
| 1157 |
+
# define TLS_MD_MASTER_SECRET_CONST_SIZE 13
|
| 1158 |
+
# define TLS_MD_EXTENDED_MASTER_SECRET_CONST "extended master secret"
|
| 1159 |
+
# define TLS_MD_EXTENDED_MASTER_SECRET_CONST_SIZE 22
|
| 1160 |
+
|
| 1161 |
+
# ifdef CHARSET_EBCDIC
|
| 1162 |
+
# undef TLS_MD_CLIENT_FINISH_CONST
|
| 1163 |
+
/*
|
| 1164 |
+
* client finished
|
| 1165 |
+
*/
|
| 1166 |
+
# define TLS_MD_CLIENT_FINISH_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
|
| 1167 |
+
|
| 1168 |
+
# undef TLS_MD_SERVER_FINISH_CONST
|
| 1169 |
+
/*
|
| 1170 |
+
* server finished
|
| 1171 |
+
*/
|
| 1172 |
+
# define TLS_MD_SERVER_FINISH_CONST "\x73\x65\x72\x76\x65\x72\x20\x66\x69\x6e\x69\x73\x68\x65\x64"
|
| 1173 |
+
|
| 1174 |
+
# undef TLS_MD_SERVER_WRITE_KEY_CONST
|
| 1175 |
+
/*
|
| 1176 |
+
* server write key
|
| 1177 |
+
*/
|
| 1178 |
+
# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
| 1179 |
+
|
| 1180 |
+
# undef TLS_MD_KEY_EXPANSION_CONST
|
| 1181 |
+
/*
|
| 1182 |
+
* key expansion
|
| 1183 |
+
*/
|
| 1184 |
+
# define TLS_MD_KEY_EXPANSION_CONST "\x6b\x65\x79\x20\x65\x78\x70\x61\x6e\x73\x69\x6f\x6e"
|
| 1185 |
+
|
| 1186 |
+
# undef TLS_MD_CLIENT_WRITE_KEY_CONST
|
| 1187 |
+
/*
|
| 1188 |
+
* client write key
|
| 1189 |
+
*/
|
| 1190 |
+
# define TLS_MD_CLIENT_WRITE_KEY_CONST "\x63\x6c\x69\x65\x6e\x74\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
| 1191 |
+
|
| 1192 |
+
# undef TLS_MD_SERVER_WRITE_KEY_CONST
|
| 1193 |
+
/*
|
| 1194 |
+
* server write key
|
| 1195 |
+
*/
|
| 1196 |
+
# define TLS_MD_SERVER_WRITE_KEY_CONST "\x73\x65\x72\x76\x65\x72\x20\x77\x72\x69\x74\x65\x20\x6b\x65\x79"
|
| 1197 |
+
|
| 1198 |
+
# undef TLS_MD_IV_BLOCK_CONST
|
| 1199 |
+
/*
|
| 1200 |
+
* IV block
|
| 1201 |
+
*/
|
| 1202 |
+
# define TLS_MD_IV_BLOCK_CONST "\x49\x56\x20\x62\x6c\x6f\x63\x6b"
|
| 1203 |
+
|
| 1204 |
+
# undef TLS_MD_MASTER_SECRET_CONST
|
| 1205 |
+
/*
|
| 1206 |
+
* master secret
|
| 1207 |
+
*/
|
| 1208 |
+
# define TLS_MD_MASTER_SECRET_CONST "\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
|
| 1209 |
+
# undef TLS_MD_EXTENDED_MASTER_SECRET_CONST
|
| 1210 |
+
/*
|
| 1211 |
+
* extended master secret
|
| 1212 |
+
*/
|
| 1213 |
+
# define TLS_MD_EXTENDED_MASTER_SECRET_CONST "\x65\x78\x74\x65\x6e\x64\x65\x64\x20\x6d\x61\x73\x74\x65\x72\x20\x73\x65\x63\x72\x65\x74"
|
| 1214 |
+
# endif
|
| 1215 |
+
|
| 1216 |
+
/* TLS Session Ticket extension struct */
|
| 1217 |
+
struct tls_session_ticket_ext_st {
|
| 1218 |
+
unsigned short length;
|
| 1219 |
+
void *data;
|
| 1220 |
+
};
|
| 1221 |
+
|
| 1222 |
+
#ifdef __cplusplus
|
| 1223 |
+
}
|
| 1224 |
+
#endif
|
| 1225 |
+
#endif
|
llava_next/include/openssl/txt_db.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 1995-2017 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_TXT_DB_H
|
| 11 |
+
# define OPENSSL_TXT_DB_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <openssl/macros.h>
|
| 15 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 16 |
+
# define HEADER_TXT_DB_H
|
| 17 |
+
# endif
|
| 18 |
+
|
| 19 |
+
# include <openssl/opensslconf.h>
|
| 20 |
+
# include <openssl/bio.h>
|
| 21 |
+
# include <openssl/safestack.h>
|
| 22 |
+
# include <openssl/lhash.h>
|
| 23 |
+
|
| 24 |
+
# define DB_ERROR_OK 0
|
| 25 |
+
# define DB_ERROR_MALLOC 1
|
| 26 |
+
# define DB_ERROR_INDEX_CLASH 2
|
| 27 |
+
# define DB_ERROR_INDEX_OUT_OF_RANGE 3
|
| 28 |
+
# define DB_ERROR_NO_INDEX 4
|
| 29 |
+
# define DB_ERROR_INSERT_INDEX_CLASH 5
|
| 30 |
+
# define DB_ERROR_WRONG_NUM_FIELDS 6
|
| 31 |
+
|
| 32 |
+
#ifdef __cplusplus
|
| 33 |
+
extern "C" {
|
| 34 |
+
#endif
|
| 35 |
+
|
| 36 |
+
typedef OPENSSL_STRING *OPENSSL_PSTRING;
|
| 37 |
+
DEFINE_SPECIAL_STACK_OF(OPENSSL_PSTRING, OPENSSL_STRING)
|
| 38 |
+
|
| 39 |
+
typedef struct txt_db_st {
|
| 40 |
+
int num_fields;
|
| 41 |
+
STACK_OF(OPENSSL_PSTRING) *data;
|
| 42 |
+
LHASH_OF(OPENSSL_STRING) **index;
|
| 43 |
+
int (**qual) (OPENSSL_STRING *);
|
| 44 |
+
long error;
|
| 45 |
+
long arg1;
|
| 46 |
+
long arg2;
|
| 47 |
+
OPENSSL_STRING *arg_row;
|
| 48 |
+
} TXT_DB;
|
| 49 |
+
|
| 50 |
+
TXT_DB *TXT_DB_read(BIO *in, int num);
|
| 51 |
+
long TXT_DB_write(BIO *out, TXT_DB *db);
|
| 52 |
+
int TXT_DB_create_index(TXT_DB *db, int field, int (*qual) (OPENSSL_STRING *),
|
| 53 |
+
OPENSSL_LH_HASHFUNC hash, OPENSSL_LH_COMPFUNC cmp);
|
| 54 |
+
void TXT_DB_free(TXT_DB *db);
|
| 55 |
+
OPENSSL_STRING *TXT_DB_get_by_index(TXT_DB *db, int idx,
|
| 56 |
+
OPENSSL_STRING *value);
|
| 57 |
+
int TXT_DB_insert(TXT_DB *db, OPENSSL_STRING *value);
|
| 58 |
+
|
| 59 |
+
#ifdef __cplusplus
|
| 60 |
+
}
|
| 61 |
+
#endif
|
| 62 |
+
|
| 63 |
+
#endif
|
llava_next/include/openssl/types.h
ADDED
|
@@ -0,0 +1,236 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2001-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_TYPES_H
|
| 11 |
+
# define OPENSSL_TYPES_H
|
| 12 |
+
# pragma once
|
| 13 |
+
|
| 14 |
+
# include <limits.h>
|
| 15 |
+
|
| 16 |
+
# ifdef __cplusplus
|
| 17 |
+
extern "C" {
|
| 18 |
+
# endif
|
| 19 |
+
|
| 20 |
+
# include <openssl/e_os2.h>
|
| 21 |
+
# include <openssl/safestack.h>
|
| 22 |
+
# include <openssl/macros.h>
|
| 23 |
+
|
| 24 |
+
typedef struct ossl_provider_st OSSL_PROVIDER; /* Provider Object */
|
| 25 |
+
|
| 26 |
+
# ifdef NO_ASN1_TYPEDEFS
|
| 27 |
+
# define ASN1_INTEGER ASN1_STRING
|
| 28 |
+
# define ASN1_ENUMERATED ASN1_STRING
|
| 29 |
+
# define ASN1_BIT_STRING ASN1_STRING
|
| 30 |
+
# define ASN1_OCTET_STRING ASN1_STRING
|
| 31 |
+
# define ASN1_PRINTABLESTRING ASN1_STRING
|
| 32 |
+
# define ASN1_T61STRING ASN1_STRING
|
| 33 |
+
# define ASN1_IA5STRING ASN1_STRING
|
| 34 |
+
# define ASN1_UTCTIME ASN1_STRING
|
| 35 |
+
# define ASN1_GENERALIZEDTIME ASN1_STRING
|
| 36 |
+
# define ASN1_TIME ASN1_STRING
|
| 37 |
+
# define ASN1_GENERALSTRING ASN1_STRING
|
| 38 |
+
# define ASN1_UNIVERSALSTRING ASN1_STRING
|
| 39 |
+
# define ASN1_BMPSTRING ASN1_STRING
|
| 40 |
+
# define ASN1_VISIBLESTRING ASN1_STRING
|
| 41 |
+
# define ASN1_UTF8STRING ASN1_STRING
|
| 42 |
+
# define ASN1_BOOLEAN int
|
| 43 |
+
# define ASN1_NULL int
|
| 44 |
+
# else
|
| 45 |
+
typedef struct asn1_string_st ASN1_INTEGER;
|
| 46 |
+
typedef struct asn1_string_st ASN1_ENUMERATED;
|
| 47 |
+
typedef struct asn1_string_st ASN1_BIT_STRING;
|
| 48 |
+
typedef struct asn1_string_st ASN1_OCTET_STRING;
|
| 49 |
+
typedef struct asn1_string_st ASN1_PRINTABLESTRING;
|
| 50 |
+
typedef struct asn1_string_st ASN1_T61STRING;
|
| 51 |
+
typedef struct asn1_string_st ASN1_IA5STRING;
|
| 52 |
+
typedef struct asn1_string_st ASN1_GENERALSTRING;
|
| 53 |
+
typedef struct asn1_string_st ASN1_UNIVERSALSTRING;
|
| 54 |
+
typedef struct asn1_string_st ASN1_BMPSTRING;
|
| 55 |
+
typedef struct asn1_string_st ASN1_UTCTIME;
|
| 56 |
+
typedef struct asn1_string_st ASN1_TIME;
|
| 57 |
+
typedef struct asn1_string_st ASN1_GENERALIZEDTIME;
|
| 58 |
+
typedef struct asn1_string_st ASN1_VISIBLESTRING;
|
| 59 |
+
typedef struct asn1_string_st ASN1_UTF8STRING;
|
| 60 |
+
typedef struct asn1_string_st ASN1_STRING;
|
| 61 |
+
typedef int ASN1_BOOLEAN;
|
| 62 |
+
typedef int ASN1_NULL;
|
| 63 |
+
# endif
|
| 64 |
+
|
| 65 |
+
typedef struct asn1_type_st ASN1_TYPE;
|
| 66 |
+
typedef struct asn1_object_st ASN1_OBJECT;
|
| 67 |
+
typedef struct asn1_string_table_st ASN1_STRING_TABLE;
|
| 68 |
+
|
| 69 |
+
typedef struct ASN1_ITEM_st ASN1_ITEM;
|
| 70 |
+
typedef struct asn1_pctx_st ASN1_PCTX;
|
| 71 |
+
typedef struct asn1_sctx_st ASN1_SCTX;
|
| 72 |
+
|
| 73 |
+
# ifdef _WIN32
|
| 74 |
+
# undef X509_NAME
|
| 75 |
+
# undef X509_EXTENSIONS
|
| 76 |
+
# undef PKCS7_ISSUER_AND_SERIAL
|
| 77 |
+
# undef PKCS7_SIGNER_INFO
|
| 78 |
+
# undef OCSP_REQUEST
|
| 79 |
+
# undef OCSP_RESPONSE
|
| 80 |
+
# endif
|
| 81 |
+
|
| 82 |
+
# ifdef BIGNUM
|
| 83 |
+
# undef BIGNUM
|
| 84 |
+
# endif
|
| 85 |
+
|
| 86 |
+
typedef struct bio_st BIO;
|
| 87 |
+
typedef struct bignum_st BIGNUM;
|
| 88 |
+
typedef struct bignum_ctx BN_CTX;
|
| 89 |
+
typedef struct bn_blinding_st BN_BLINDING;
|
| 90 |
+
typedef struct bn_mont_ctx_st BN_MONT_CTX;
|
| 91 |
+
typedef struct bn_recp_ctx_st BN_RECP_CTX;
|
| 92 |
+
typedef struct bn_gencb_st BN_GENCB;
|
| 93 |
+
|
| 94 |
+
typedef struct buf_mem_st BUF_MEM;
|
| 95 |
+
|
| 96 |
+
STACK_OF(BIGNUM);
|
| 97 |
+
STACK_OF(BIGNUM_const);
|
| 98 |
+
|
| 99 |
+
typedef struct err_state_st ERR_STATE;
|
| 100 |
+
|
| 101 |
+
typedef struct evp_cipher_st EVP_CIPHER;
|
| 102 |
+
typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
|
| 103 |
+
typedef struct evp_md_st EVP_MD;
|
| 104 |
+
typedef struct evp_md_ctx_st EVP_MD_CTX;
|
| 105 |
+
typedef struct evp_mac_st EVP_MAC;
|
| 106 |
+
typedef struct evp_mac_ctx_st EVP_MAC_CTX;
|
| 107 |
+
typedef struct evp_pkey_st EVP_PKEY;
|
| 108 |
+
|
| 109 |
+
typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;
|
| 110 |
+
|
| 111 |
+
typedef struct evp_pkey_method_st EVP_PKEY_METHOD;
|
| 112 |
+
typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;
|
| 113 |
+
|
| 114 |
+
typedef struct evp_keymgmt_st EVP_KEYMGMT;
|
| 115 |
+
|
| 116 |
+
typedef struct evp_kdf_st EVP_KDF;
|
| 117 |
+
typedef struct evp_kdf_ctx_st EVP_KDF_CTX;
|
| 118 |
+
|
| 119 |
+
typedef struct evp_rand_st EVP_RAND;
|
| 120 |
+
typedef struct evp_rand_ctx_st EVP_RAND_CTX;
|
| 121 |
+
|
| 122 |
+
typedef struct evp_keyexch_st EVP_KEYEXCH;
|
| 123 |
+
|
| 124 |
+
typedef struct evp_signature_st EVP_SIGNATURE;
|
| 125 |
+
|
| 126 |
+
typedef struct evp_asym_cipher_st EVP_ASYM_CIPHER;
|
| 127 |
+
|
| 128 |
+
typedef struct evp_kem_st EVP_KEM;
|
| 129 |
+
|
| 130 |
+
typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;
|
| 131 |
+
|
| 132 |
+
typedef struct hmac_ctx_st HMAC_CTX;
|
| 133 |
+
|
| 134 |
+
typedef struct dh_st DH;
|
| 135 |
+
typedef struct dh_method DH_METHOD;
|
| 136 |
+
|
| 137 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 138 |
+
typedef struct dsa_st DSA;
|
| 139 |
+
typedef struct dsa_method DSA_METHOD;
|
| 140 |
+
# endif
|
| 141 |
+
|
| 142 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 143 |
+
typedef struct rsa_st RSA;
|
| 144 |
+
typedef struct rsa_meth_st RSA_METHOD;
|
| 145 |
+
# endif
|
| 146 |
+
typedef struct rsa_pss_params_st RSA_PSS_PARAMS;
|
| 147 |
+
|
| 148 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 149 |
+
typedef struct ec_key_st EC_KEY;
|
| 150 |
+
typedef struct ec_key_method_st EC_KEY_METHOD;
|
| 151 |
+
# endif
|
| 152 |
+
|
| 153 |
+
typedef struct rand_meth_st RAND_METHOD;
|
| 154 |
+
typedef struct rand_drbg_st RAND_DRBG;
|
| 155 |
+
|
| 156 |
+
typedef struct ssl_dane_st SSL_DANE;
|
| 157 |
+
typedef struct x509_st X509;
|
| 158 |
+
typedef struct X509_algor_st X509_ALGOR;
|
| 159 |
+
typedef struct X509_crl_st X509_CRL;
|
| 160 |
+
typedef struct x509_crl_method_st X509_CRL_METHOD;
|
| 161 |
+
typedef struct x509_revoked_st X509_REVOKED;
|
| 162 |
+
typedef struct X509_name_st X509_NAME;
|
| 163 |
+
typedef struct X509_pubkey_st X509_PUBKEY;
|
| 164 |
+
typedef struct x509_store_st X509_STORE;
|
| 165 |
+
typedef struct x509_store_ctx_st X509_STORE_CTX;
|
| 166 |
+
|
| 167 |
+
typedef struct x509_object_st X509_OBJECT;
|
| 168 |
+
typedef struct x509_lookup_st X509_LOOKUP;
|
| 169 |
+
typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;
|
| 170 |
+
typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;
|
| 171 |
+
|
| 172 |
+
typedef struct x509_sig_info_st X509_SIG_INFO;
|
| 173 |
+
|
| 174 |
+
typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;
|
| 175 |
+
|
| 176 |
+
typedef struct v3_ext_ctx X509V3_CTX;
|
| 177 |
+
typedef struct conf_st CONF;
|
| 178 |
+
typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;
|
| 179 |
+
|
| 180 |
+
typedef struct ui_st UI;
|
| 181 |
+
typedef struct ui_method_st UI_METHOD;
|
| 182 |
+
|
| 183 |
+
typedef struct engine_st ENGINE;
|
| 184 |
+
typedef struct ssl_st SSL;
|
| 185 |
+
typedef struct ssl_ctx_st SSL_CTX;
|
| 186 |
+
|
| 187 |
+
typedef struct comp_ctx_st COMP_CTX;
|
| 188 |
+
typedef struct comp_method_st COMP_METHOD;
|
| 189 |
+
|
| 190 |
+
typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;
|
| 191 |
+
typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;
|
| 192 |
+
typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;
|
| 193 |
+
typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;
|
| 194 |
+
|
| 195 |
+
typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;
|
| 196 |
+
typedef struct DIST_POINT_st DIST_POINT;
|
| 197 |
+
typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;
|
| 198 |
+
typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;
|
| 199 |
+
|
| 200 |
+
typedef struct crypto_ex_data_st CRYPTO_EX_DATA;
|
| 201 |
+
|
| 202 |
+
typedef struct ossl_http_req_ctx_st OSSL_HTTP_REQ_CTX;
|
| 203 |
+
typedef struct ocsp_response_st OCSP_RESPONSE;
|
| 204 |
+
typedef struct ocsp_responder_id_st OCSP_RESPID;
|
| 205 |
+
|
| 206 |
+
typedef struct sct_st SCT;
|
| 207 |
+
typedef struct sct_ctx_st SCT_CTX;
|
| 208 |
+
typedef struct ctlog_st CTLOG;
|
| 209 |
+
typedef struct ctlog_store_st CTLOG_STORE;
|
| 210 |
+
typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;
|
| 211 |
+
|
| 212 |
+
typedef struct ossl_store_info_st OSSL_STORE_INFO;
|
| 213 |
+
typedef struct ossl_store_search_st OSSL_STORE_SEARCH;
|
| 214 |
+
|
| 215 |
+
typedef struct ossl_lib_ctx_st OSSL_LIB_CTX;
|
| 216 |
+
|
| 217 |
+
typedef struct ossl_dispatch_st OSSL_DISPATCH;
|
| 218 |
+
typedef struct ossl_item_st OSSL_ITEM;
|
| 219 |
+
typedef struct ossl_algorithm_st OSSL_ALGORITHM;
|
| 220 |
+
typedef struct ossl_param_st OSSL_PARAM;
|
| 221 |
+
typedef struct ossl_param_bld_st OSSL_PARAM_BLD;
|
| 222 |
+
|
| 223 |
+
typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
|
| 224 |
+
|
| 225 |
+
typedef struct ossl_encoder_st OSSL_ENCODER;
|
| 226 |
+
typedef struct ossl_encoder_ctx_st OSSL_ENCODER_CTX;
|
| 227 |
+
typedef struct ossl_decoder_st OSSL_DECODER;
|
| 228 |
+
typedef struct ossl_decoder_ctx_st OSSL_DECODER_CTX;
|
| 229 |
+
|
| 230 |
+
typedef struct ossl_self_test_st OSSL_SELF_TEST;
|
| 231 |
+
|
| 232 |
+
#ifdef __cplusplus
|
| 233 |
+
}
|
| 234 |
+
#endif
|
| 235 |
+
|
| 236 |
+
#endif /* OPENSSL_TYPES_H */
|
llava_next/include/python3.10/cpython/abstract.h
ADDED
|
@@ -0,0 +1,373 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_ABSTRACTOBJECT_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
/* === Object Protocol ================================================== */
|
| 6 |
+
|
| 7 |
+
#ifdef PY_SSIZE_T_CLEAN
|
| 8 |
+
# define _PyObject_CallMethodId _PyObject_CallMethodId_SizeT
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* Convert keyword arguments from the FASTCALL (stack: C array, kwnames: tuple)
|
| 12 |
+
format to a Python dictionary ("kwargs" dict).
|
| 13 |
+
|
| 14 |
+
The type of kwnames keys is not checked. The final function getting
|
| 15 |
+
arguments is responsible to check if all keys are strings, for example using
|
| 16 |
+
PyArg_ParseTupleAndKeywords() or PyArg_ValidateKeywordArguments().
|
| 17 |
+
|
| 18 |
+
Duplicate keys are merged using the last value. If duplicate keys must raise
|
| 19 |
+
an exception, the caller is responsible to implement an explicit keys on
|
| 20 |
+
kwnames. */
|
| 21 |
+
PyAPI_FUNC(PyObject *) _PyStack_AsDict(
|
| 22 |
+
PyObject *const *values,
|
| 23 |
+
PyObject *kwnames);
|
| 24 |
+
|
| 25 |
+
/* Suggested size (number of positional arguments) for arrays of PyObject*
|
| 26 |
+
allocated on a C stack to avoid allocating memory on the heap memory. Such
|
| 27 |
+
array is used to pass positional arguments to call functions of the
|
| 28 |
+
PyObject_Vectorcall() family.
|
| 29 |
+
|
| 30 |
+
The size is chosen to not abuse the C stack and so limit the risk of stack
|
| 31 |
+
overflow. The size is also chosen to allow using the small stack for most
|
| 32 |
+
function calls of the Python standard library. On 64-bit CPU, it allocates
|
| 33 |
+
40 bytes on the stack. */
|
| 34 |
+
#define _PY_FASTCALL_SMALL_STACK 5
|
| 35 |
+
|
| 36 |
+
PyAPI_FUNC(PyObject *) _Py_CheckFunctionResult(
|
| 37 |
+
PyThreadState *tstate,
|
| 38 |
+
PyObject *callable,
|
| 39 |
+
PyObject *result,
|
| 40 |
+
const char *where);
|
| 41 |
+
|
| 42 |
+
/* === Vectorcall protocol (PEP 590) ============================= */
|
| 43 |
+
|
| 44 |
+
/* Call callable using tp_call. Arguments are like PyObject_Vectorcall()
|
| 45 |
+
or PyObject_FastCallDict() (both forms are supported),
|
| 46 |
+
except that nargs is plainly the number of arguments without flags. */
|
| 47 |
+
PyAPI_FUNC(PyObject *) _PyObject_MakeTpCall(
|
| 48 |
+
PyThreadState *tstate,
|
| 49 |
+
PyObject *callable,
|
| 50 |
+
PyObject *const *args, Py_ssize_t nargs,
|
| 51 |
+
PyObject *keywords);
|
| 52 |
+
|
| 53 |
+
#define PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
|
| 54 |
+
|
| 55 |
+
static inline Py_ssize_t
|
| 56 |
+
PyVectorcall_NARGS(size_t n)
|
| 57 |
+
{
|
| 58 |
+
return n & ~PY_VECTORCALL_ARGUMENTS_OFFSET;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
static inline vectorcallfunc
|
| 62 |
+
PyVectorcall_Function(PyObject *callable)
|
| 63 |
+
{
|
| 64 |
+
PyTypeObject *tp;
|
| 65 |
+
Py_ssize_t offset;
|
| 66 |
+
vectorcallfunc ptr;
|
| 67 |
+
|
| 68 |
+
assert(callable != NULL);
|
| 69 |
+
tp = Py_TYPE(callable);
|
| 70 |
+
if (!PyType_HasFeature(tp, Py_TPFLAGS_HAVE_VECTORCALL)) {
|
| 71 |
+
return NULL;
|
| 72 |
+
}
|
| 73 |
+
assert(PyCallable_Check(callable));
|
| 74 |
+
offset = tp->tp_vectorcall_offset;
|
| 75 |
+
assert(offset > 0);
|
| 76 |
+
memcpy(&ptr, (char *) callable + offset, sizeof(ptr));
|
| 77 |
+
return ptr;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
/* Call the callable object 'callable' with the "vectorcall" calling
|
| 81 |
+
convention.
|
| 82 |
+
|
| 83 |
+
args is a C array for positional arguments.
|
| 84 |
+
|
| 85 |
+
nargsf is the number of positional arguments plus optionally the flag
|
| 86 |
+
PY_VECTORCALL_ARGUMENTS_OFFSET which means that the caller is allowed to
|
| 87 |
+
modify args[-1].
|
| 88 |
+
|
| 89 |
+
kwnames is a tuple of keyword names. The values of the keyword arguments
|
| 90 |
+
are stored in "args" after the positional arguments (note that the number
|
| 91 |
+
of keyword arguments does not change nargsf). kwnames can also be NULL if
|
| 92 |
+
there are no keyword arguments.
|
| 93 |
+
|
| 94 |
+
keywords must only contain strings and all keys must be unique.
|
| 95 |
+
|
| 96 |
+
Return the result on success. Raise an exception and return NULL on
|
| 97 |
+
error. */
|
| 98 |
+
static inline PyObject *
|
| 99 |
+
_PyObject_VectorcallTstate(PyThreadState *tstate, PyObject *callable,
|
| 100 |
+
PyObject *const *args, size_t nargsf,
|
| 101 |
+
PyObject *kwnames)
|
| 102 |
+
{
|
| 103 |
+
vectorcallfunc func;
|
| 104 |
+
PyObject *res;
|
| 105 |
+
|
| 106 |
+
assert(kwnames == NULL || PyTuple_Check(kwnames));
|
| 107 |
+
assert(args != NULL || PyVectorcall_NARGS(nargsf) == 0);
|
| 108 |
+
|
| 109 |
+
func = PyVectorcall_Function(callable);
|
| 110 |
+
if (func == NULL) {
|
| 111 |
+
Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
|
| 112 |
+
return _PyObject_MakeTpCall(tstate, callable, args, nargs, kwnames);
|
| 113 |
+
}
|
| 114 |
+
res = func(callable, args, nargsf, kwnames);
|
| 115 |
+
return _Py_CheckFunctionResult(tstate, callable, res, NULL);
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
static inline PyObject *
|
| 119 |
+
PyObject_Vectorcall(PyObject *callable, PyObject *const *args,
|
| 120 |
+
size_t nargsf, PyObject *kwnames)
|
| 121 |
+
{
|
| 122 |
+
PyThreadState *tstate = PyThreadState_Get();
|
| 123 |
+
return _PyObject_VectorcallTstate(tstate, callable,
|
| 124 |
+
args, nargsf, kwnames);
|
| 125 |
+
}
|
| 126 |
+
|
| 127 |
+
// Backwards compatibility aliases for API that was provisional in Python 3.8
|
| 128 |
+
#define _PyObject_Vectorcall PyObject_Vectorcall
|
| 129 |
+
#define _PyObject_VectorcallMethod PyObject_VectorcallMethod
|
| 130 |
+
#define _PyObject_FastCallDict PyObject_VectorcallDict
|
| 131 |
+
#define _PyVectorcall_Function PyVectorcall_Function
|
| 132 |
+
#define _PyObject_CallOneArg PyObject_CallOneArg
|
| 133 |
+
#define _PyObject_CallMethodNoArgs PyObject_CallMethodNoArgs
|
| 134 |
+
#define _PyObject_CallMethodOneArg PyObject_CallMethodOneArg
|
| 135 |
+
|
| 136 |
+
/* Same as PyObject_Vectorcall except that keyword arguments are passed as
|
| 137 |
+
dict, which may be NULL if there are no keyword arguments. */
|
| 138 |
+
PyAPI_FUNC(PyObject *) PyObject_VectorcallDict(
|
| 139 |
+
PyObject *callable,
|
| 140 |
+
PyObject *const *args,
|
| 141 |
+
size_t nargsf,
|
| 142 |
+
PyObject *kwargs);
|
| 143 |
+
|
| 144 |
+
/* Call "callable" (which must support vectorcall) with positional arguments
|
| 145 |
+
"tuple" and keyword arguments "dict". "dict" may also be NULL */
|
| 146 |
+
PyAPI_FUNC(PyObject *) PyVectorcall_Call(PyObject *callable, PyObject *tuple, PyObject *dict);
|
| 147 |
+
|
| 148 |
+
static inline PyObject *
|
| 149 |
+
_PyObject_FastCallTstate(PyThreadState *tstate, PyObject *func, PyObject *const *args, Py_ssize_t nargs)
|
| 150 |
+
{
|
| 151 |
+
return _PyObject_VectorcallTstate(tstate, func, args, (size_t)nargs, NULL);
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
/* Same as PyObject_Vectorcall except without keyword arguments */
|
| 155 |
+
static inline PyObject *
|
| 156 |
+
_PyObject_FastCall(PyObject *func, PyObject *const *args, Py_ssize_t nargs)
|
| 157 |
+
{
|
| 158 |
+
PyThreadState *tstate = PyThreadState_Get();
|
| 159 |
+
return _PyObject_FastCallTstate(tstate, func, args, nargs);
|
| 160 |
+
}
|
| 161 |
+
|
| 162 |
+
/* Call a callable without any arguments
|
| 163 |
+
Private static inline function variant of public function
|
| 164 |
+
PyObject_CallNoArgs(). */
|
| 165 |
+
static inline PyObject *
|
| 166 |
+
_PyObject_CallNoArg(PyObject *func) {
|
| 167 |
+
PyThreadState *tstate = PyThreadState_Get();
|
| 168 |
+
return _PyObject_VectorcallTstate(tstate, func, NULL, 0, NULL);
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
static inline PyObject *
|
| 172 |
+
PyObject_CallOneArg(PyObject *func, PyObject *arg)
|
| 173 |
+
{
|
| 174 |
+
PyObject *_args[2];
|
| 175 |
+
PyObject **args;
|
| 176 |
+
PyThreadState *tstate;
|
| 177 |
+
size_t nargsf;
|
| 178 |
+
|
| 179 |
+
assert(arg != NULL);
|
| 180 |
+
args = _args + 1; // For PY_VECTORCALL_ARGUMENTS_OFFSET
|
| 181 |
+
args[0] = arg;
|
| 182 |
+
tstate = PyThreadState_Get();
|
| 183 |
+
nargsf = 1 | PY_VECTORCALL_ARGUMENTS_OFFSET;
|
| 184 |
+
return _PyObject_VectorcallTstate(tstate, func, args, nargsf, NULL);
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
PyAPI_FUNC(PyObject *) PyObject_VectorcallMethod(
|
| 188 |
+
PyObject *name, PyObject *const *args,
|
| 189 |
+
size_t nargsf, PyObject *kwnames);
|
| 190 |
+
|
| 191 |
+
static inline PyObject *
|
| 192 |
+
PyObject_CallMethodNoArgs(PyObject *self, PyObject *name)
|
| 193 |
+
{
|
| 194 |
+
return PyObject_VectorcallMethod(name, &self,
|
| 195 |
+
1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
| 196 |
+
}
|
| 197 |
+
|
| 198 |
+
static inline PyObject *
|
| 199 |
+
PyObject_CallMethodOneArg(PyObject *self, PyObject *name, PyObject *arg)
|
| 200 |
+
{
|
| 201 |
+
PyObject *args[2] = {self, arg};
|
| 202 |
+
|
| 203 |
+
assert(arg != NULL);
|
| 204 |
+
return PyObject_VectorcallMethod(name, args,
|
| 205 |
+
2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
| 206 |
+
}
|
| 207 |
+
|
| 208 |
+
/* Like PyObject_CallMethod(), but expect a _Py_Identifier*
|
| 209 |
+
as the method name. */
|
| 210 |
+
PyAPI_FUNC(PyObject *) _PyObject_CallMethodId(PyObject *obj,
|
| 211 |
+
_Py_Identifier *name,
|
| 212 |
+
const char *format, ...);
|
| 213 |
+
|
| 214 |
+
PyAPI_FUNC(PyObject *) _PyObject_CallMethodId_SizeT(PyObject *obj,
|
| 215 |
+
_Py_Identifier *name,
|
| 216 |
+
const char *format,
|
| 217 |
+
...);
|
| 218 |
+
|
| 219 |
+
PyAPI_FUNC(PyObject *) _PyObject_CallMethodIdObjArgs(
|
| 220 |
+
PyObject *obj,
|
| 221 |
+
struct _Py_Identifier *name,
|
| 222 |
+
...);
|
| 223 |
+
|
| 224 |
+
static inline PyObject *
|
| 225 |
+
_PyObject_VectorcallMethodId(
|
| 226 |
+
_Py_Identifier *name, PyObject *const *args,
|
| 227 |
+
size_t nargsf, PyObject *kwnames)
|
| 228 |
+
{
|
| 229 |
+
PyObject *oname = _PyUnicode_FromId(name); /* borrowed */
|
| 230 |
+
if (!oname) {
|
| 231 |
+
return NULL;
|
| 232 |
+
}
|
| 233 |
+
return PyObject_VectorcallMethod(oname, args, nargsf, kwnames);
|
| 234 |
+
}
|
| 235 |
+
|
| 236 |
+
static inline PyObject *
|
| 237 |
+
_PyObject_CallMethodIdNoArgs(PyObject *self, _Py_Identifier *name)
|
| 238 |
+
{
|
| 239 |
+
return _PyObject_VectorcallMethodId(name, &self,
|
| 240 |
+
1 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
static inline PyObject *
|
| 244 |
+
_PyObject_CallMethodIdOneArg(PyObject *self, _Py_Identifier *name, PyObject *arg)
|
| 245 |
+
{
|
| 246 |
+
PyObject *args[2] = {self, arg};
|
| 247 |
+
|
| 248 |
+
assert(arg != NULL);
|
| 249 |
+
return _PyObject_VectorcallMethodId(name, args,
|
| 250 |
+
2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
|
| 251 |
+
}
|
| 252 |
+
|
| 253 |
+
PyAPI_FUNC(int) _PyObject_HasLen(PyObject *o);
|
| 254 |
+
|
| 255 |
+
/* Guess the size of object 'o' using len(o) or o.__length_hint__().
|
| 256 |
+
If neither of those return a non-negative value, then return the default
|
| 257 |
+
value. If one of the calls fails, this function returns -1. */
|
| 258 |
+
PyAPI_FUNC(Py_ssize_t) PyObject_LengthHint(PyObject *o, Py_ssize_t);
|
| 259 |
+
|
| 260 |
+
/* === New Buffer API ============================================ */
|
| 261 |
+
|
| 262 |
+
/* Return 1 if the getbuffer function is available, otherwise return 0. */
|
| 263 |
+
PyAPI_FUNC(int) PyObject_CheckBuffer(PyObject *obj);
|
| 264 |
+
|
| 265 |
+
/* This is a C-API version of the getbuffer function call. It checks
|
| 266 |
+
to make sure object has the required function pointer and issues the
|
| 267 |
+
call.
|
| 268 |
+
|
| 269 |
+
Returns -1 and raises an error on failure and returns 0 on success. */
|
| 270 |
+
PyAPI_FUNC(int) PyObject_GetBuffer(PyObject *obj, Py_buffer *view,
|
| 271 |
+
int flags);
|
| 272 |
+
|
| 273 |
+
/* Get the memory area pointed to by the indices for the buffer given.
|
| 274 |
+
Note that view->ndim is the assumed size of indices. */
|
| 275 |
+
PyAPI_FUNC(void *) PyBuffer_GetPointer(Py_buffer *view, Py_ssize_t *indices);
|
| 276 |
+
|
| 277 |
+
/* Return the implied itemsize of the data-format area from a
|
| 278 |
+
struct-style description. */
|
| 279 |
+
PyAPI_FUNC(Py_ssize_t) PyBuffer_SizeFromFormat(const char *format);
|
| 280 |
+
|
| 281 |
+
/* Implementation in memoryobject.c */
|
| 282 |
+
PyAPI_FUNC(int) PyBuffer_ToContiguous(void *buf, Py_buffer *view,
|
| 283 |
+
Py_ssize_t len, char order);
|
| 284 |
+
|
| 285 |
+
PyAPI_FUNC(int) PyBuffer_FromContiguous(Py_buffer *view, void *buf,
|
| 286 |
+
Py_ssize_t len, char order);
|
| 287 |
+
|
| 288 |
+
/* Copy len bytes of data from the contiguous chunk of memory
|
| 289 |
+
pointed to by buf into the buffer exported by obj. Return
|
| 290 |
+
0 on success and return -1 and raise a PyBuffer_Error on
|
| 291 |
+
error (i.e. the object does not have a buffer interface or
|
| 292 |
+
it is not working).
|
| 293 |
+
|
| 294 |
+
If fort is 'F', then if the object is multi-dimensional,
|
| 295 |
+
then the data will be copied into the array in
|
| 296 |
+
Fortran-style (first dimension varies the fastest). If
|
| 297 |
+
fort is 'C', then the data will be copied into the array
|
| 298 |
+
in C-style (last dimension varies the fastest). If fort
|
| 299 |
+
is 'A', then it does not matter and the copy will be made
|
| 300 |
+
in whatever way is more efficient. */
|
| 301 |
+
PyAPI_FUNC(int) PyObject_CopyData(PyObject *dest, PyObject *src);
|
| 302 |
+
|
| 303 |
+
/* Copy the data from the src buffer to the buffer of destination. */
|
| 304 |
+
PyAPI_FUNC(int) PyBuffer_IsContiguous(const Py_buffer *view, char fort);
|
| 305 |
+
|
| 306 |
+
/*Fill the strides array with byte-strides of a contiguous
|
| 307 |
+
(Fortran-style if fort is 'F' or C-style otherwise)
|
| 308 |
+
array of the given shape with the given number of bytes
|
| 309 |
+
per element. */
|
| 310 |
+
PyAPI_FUNC(void) PyBuffer_FillContiguousStrides(int ndims,
|
| 311 |
+
Py_ssize_t *shape,
|
| 312 |
+
Py_ssize_t *strides,
|
| 313 |
+
int itemsize,
|
| 314 |
+
char fort);
|
| 315 |
+
|
| 316 |
+
/* Fills in a buffer-info structure correctly for an exporter
|
| 317 |
+
that can only share a contiguous chunk of memory of
|
| 318 |
+
"unsigned bytes" of the given length.
|
| 319 |
+
|
| 320 |
+
Returns 0 on success and -1 (with raising an error) on error. */
|
| 321 |
+
PyAPI_FUNC(int) PyBuffer_FillInfo(Py_buffer *view, PyObject *o, void *buf,
|
| 322 |
+
Py_ssize_t len, int readonly,
|
| 323 |
+
int flags);
|
| 324 |
+
|
| 325 |
+
/* Releases a Py_buffer obtained from getbuffer ParseTuple's "s*". */
|
| 326 |
+
PyAPI_FUNC(void) PyBuffer_Release(Py_buffer *view);
|
| 327 |
+
|
| 328 |
+
/* === Sequence protocol ================================================ */
|
| 329 |
+
|
| 330 |
+
/* Assume tp_as_sequence and sq_item exist and that 'i' does not
|
| 331 |
+
need to be corrected for a negative index. */
|
| 332 |
+
#define PySequence_ITEM(o, i)\
|
| 333 |
+
( Py_TYPE(o)->tp_as_sequence->sq_item(o, i) )
|
| 334 |
+
|
| 335 |
+
#define PY_ITERSEARCH_COUNT 1
|
| 336 |
+
#define PY_ITERSEARCH_INDEX 2
|
| 337 |
+
#define PY_ITERSEARCH_CONTAINS 3
|
| 338 |
+
|
| 339 |
+
/* Iterate over seq.
|
| 340 |
+
|
| 341 |
+
Result depends on the operation:
|
| 342 |
+
|
| 343 |
+
PY_ITERSEARCH_COUNT: return # of times obj appears in seq; -1 if
|
| 344 |
+
error.
|
| 345 |
+
PY_ITERSEARCH_INDEX: return 0-based index of first occurrence of
|
| 346 |
+
obj in seq; set ValueError and return -1 if none found;
|
| 347 |
+
also return -1 on error.
|
| 348 |
+
PY_ITERSEARCH_CONTAINS: return 1 if obj in seq, else 0; -1 on
|
| 349 |
+
error. */
|
| 350 |
+
PyAPI_FUNC(Py_ssize_t) _PySequence_IterSearch(PyObject *seq,
|
| 351 |
+
PyObject *obj, int operation);
|
| 352 |
+
|
| 353 |
+
/* === Mapping protocol ================================================= */
|
| 354 |
+
|
| 355 |
+
PyAPI_FUNC(int) _PyObject_RealIsInstance(PyObject *inst, PyObject *cls);
|
| 356 |
+
|
| 357 |
+
PyAPI_FUNC(int) _PyObject_RealIsSubclass(PyObject *derived, PyObject *cls);
|
| 358 |
+
|
| 359 |
+
PyAPI_FUNC(char *const *) _PySequence_BytesToCharpArray(PyObject* self);
|
| 360 |
+
|
| 361 |
+
PyAPI_FUNC(void) _Py_FreeCharPArray(char *const array[]);
|
| 362 |
+
|
| 363 |
+
/* For internal use by buffer API functions */
|
| 364 |
+
PyAPI_FUNC(void) _Py_add_one_to_index_F(int nd, Py_ssize_t *index,
|
| 365 |
+
const Py_ssize_t *shape);
|
| 366 |
+
PyAPI_FUNC(void) _Py_add_one_to_index_C(int nd, Py_ssize_t *index,
|
| 367 |
+
const Py_ssize_t *shape);
|
| 368 |
+
|
| 369 |
+
/* Convert Python int to Py_ssize_t. Do nothing if the argument is None. */
|
| 370 |
+
PyAPI_FUNC(int) _Py_convert_optional_to_ssize_t(PyObject *, void *);
|
| 371 |
+
|
| 372 |
+
/* Same as PyNumber_Index but can return an instance of a subclass of int. */
|
| 373 |
+
PyAPI_FUNC(PyObject *) _PyNumber_Index(PyObject *o);
|
llava_next/include/python3.10/cpython/bytearrayobject.h
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_BYTEARRAYOBJECT_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
/* Object layout */
|
| 6 |
+
typedef struct {
|
| 7 |
+
PyObject_VAR_HEAD
|
| 8 |
+
Py_ssize_t ob_alloc; /* How many bytes allocated in ob_bytes */
|
| 9 |
+
char *ob_bytes; /* Physical backing buffer */
|
| 10 |
+
char *ob_start; /* Logical start inside ob_bytes */
|
| 11 |
+
Py_ssize_t ob_exports; /* How many buffer exports */
|
| 12 |
+
} PyByteArrayObject;
|
| 13 |
+
|
| 14 |
+
/* Macros, trading safety for speed */
|
| 15 |
+
#define PyByteArray_AS_STRING(self) \
|
| 16 |
+
(assert(PyByteArray_Check(self)), \
|
| 17 |
+
Py_SIZE(self) ? ((PyByteArrayObject *)(self))->ob_start : _PyByteArray_empty_string)
|
| 18 |
+
#define PyByteArray_GET_SIZE(self) (assert(PyByteArray_Check(self)), Py_SIZE(self))
|
| 19 |
+
|
| 20 |
+
PyAPI_DATA(char) _PyByteArray_empty_string[];
|
llava_next/include/python3.10/cpython/frameobject.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Frame object interface */
|
| 2 |
+
|
| 3 |
+
#ifndef Py_CPYTHON_FRAMEOBJECT_H
|
| 4 |
+
# error "this header file must not be included directly"
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
/* These values are chosen so that the inline functions below all
|
| 8 |
+
* compare f_state to zero.
|
| 9 |
+
*/
|
| 10 |
+
enum _framestate {
|
| 11 |
+
FRAME_CREATED = -2,
|
| 12 |
+
FRAME_SUSPENDED = -1,
|
| 13 |
+
FRAME_EXECUTING = 0,
|
| 14 |
+
FRAME_RETURNED = 1,
|
| 15 |
+
FRAME_UNWINDING = 2,
|
| 16 |
+
FRAME_RAISED = 3,
|
| 17 |
+
FRAME_CLEARED = 4
|
| 18 |
+
};
|
| 19 |
+
|
| 20 |
+
typedef signed char PyFrameState;
|
| 21 |
+
|
| 22 |
+
typedef struct {
|
| 23 |
+
int b_type; /* what kind of block this is */
|
| 24 |
+
int b_handler; /* where to jump to find handler */
|
| 25 |
+
int b_level; /* value stack level to pop to */
|
| 26 |
+
} PyTryBlock;
|
| 27 |
+
|
| 28 |
+
struct _frame {
|
| 29 |
+
PyObject_VAR_HEAD
|
| 30 |
+
struct _frame *f_back; /* previous frame, or NULL */
|
| 31 |
+
PyCodeObject *f_code; /* code segment */
|
| 32 |
+
PyObject *f_builtins; /* builtin symbol table (PyDictObject) */
|
| 33 |
+
PyObject *f_globals; /* global symbol table (PyDictObject) */
|
| 34 |
+
PyObject *f_locals; /* local symbol table (any mapping) */
|
| 35 |
+
PyObject **f_valuestack; /* points after the last local */
|
| 36 |
+
PyObject *f_trace; /* Trace function */
|
| 37 |
+
int f_stackdepth; /* Depth of value stack */
|
| 38 |
+
char f_trace_lines; /* Emit per-line trace events? */
|
| 39 |
+
char f_trace_opcodes; /* Emit per-opcode trace events? */
|
| 40 |
+
|
| 41 |
+
/* Borrowed reference to a generator, or NULL */
|
| 42 |
+
PyObject *f_gen;
|
| 43 |
+
|
| 44 |
+
int f_lasti; /* Last instruction if called */
|
| 45 |
+
int f_lineno; /* Current line number. Only valid if non-zero */
|
| 46 |
+
int f_iblock; /* index in f_blockstack */
|
| 47 |
+
PyFrameState f_state; /* What state the frame is in */
|
| 48 |
+
PyTryBlock f_blockstack[CO_MAXBLOCKS]; /* for try and loop blocks */
|
| 49 |
+
PyObject *f_localsplus[1]; /* locals+stack, dynamically sized */
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
static inline int _PyFrame_IsRunnable(struct _frame *f) {
|
| 53 |
+
return f->f_state < FRAME_EXECUTING;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
static inline int _PyFrame_IsExecuting(struct _frame *f) {
|
| 57 |
+
return f->f_state == FRAME_EXECUTING;
|
| 58 |
+
}
|
| 59 |
+
|
| 60 |
+
static inline int _PyFrameHasCompleted(struct _frame *f) {
|
| 61 |
+
return f->f_state > FRAME_EXECUTING;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/* Standard object interface */
|
| 65 |
+
|
| 66 |
+
PyAPI_DATA(PyTypeObject) PyFrame_Type;
|
| 67 |
+
|
| 68 |
+
#define PyFrame_Check(op) Py_IS_TYPE(op, &PyFrame_Type)
|
| 69 |
+
|
| 70 |
+
PyAPI_FUNC(PyFrameObject *) PyFrame_New(PyThreadState *, PyCodeObject *,
|
| 71 |
+
PyObject *, PyObject *);
|
| 72 |
+
|
| 73 |
+
/* only internal use */
|
| 74 |
+
PyFrameObject*
|
| 75 |
+
_PyFrame_New_NoTrack(PyThreadState *, PyFrameConstructor *, PyObject *);
|
| 76 |
+
|
| 77 |
+
|
| 78 |
+
/* The rest of the interface is specific for frame objects */
|
| 79 |
+
|
| 80 |
+
/* Block management functions */
|
| 81 |
+
|
| 82 |
+
PyAPI_FUNC(void) PyFrame_BlockSetup(PyFrameObject *, int, int, int);
|
| 83 |
+
PyAPI_FUNC(PyTryBlock *) PyFrame_BlockPop(PyFrameObject *);
|
| 84 |
+
|
| 85 |
+
/* Conversions between "fast locals" and locals in dictionary */
|
| 86 |
+
|
| 87 |
+
PyAPI_FUNC(void) PyFrame_LocalsToFast(PyFrameObject *, int);
|
| 88 |
+
|
| 89 |
+
PyAPI_FUNC(int) PyFrame_FastToLocalsWithError(PyFrameObject *f);
|
| 90 |
+
PyAPI_FUNC(void) PyFrame_FastToLocals(PyFrameObject *);
|
| 91 |
+
|
| 92 |
+
PyAPI_FUNC(void) _PyFrame_DebugMallocStats(FILE *out);
|
| 93 |
+
|
| 94 |
+
PyAPI_FUNC(PyFrameObject *) PyFrame_GetBack(PyFrameObject *frame);
|
llava_next/include/python3.10/cpython/initconfig.h
ADDED
|
@@ -0,0 +1,249 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_PYCORECONFIG_H
|
| 2 |
+
#define Py_PYCORECONFIG_H
|
| 3 |
+
#ifndef Py_LIMITED_API
|
| 4 |
+
#ifdef __cplusplus
|
| 5 |
+
extern "C" {
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
/* --- PyStatus ----------------------------------------------- */
|
| 9 |
+
|
| 10 |
+
typedef struct {
|
| 11 |
+
enum {
|
| 12 |
+
_PyStatus_TYPE_OK=0,
|
| 13 |
+
_PyStatus_TYPE_ERROR=1,
|
| 14 |
+
_PyStatus_TYPE_EXIT=2
|
| 15 |
+
} _type;
|
| 16 |
+
const char *func;
|
| 17 |
+
const char *err_msg;
|
| 18 |
+
int exitcode;
|
| 19 |
+
} PyStatus;
|
| 20 |
+
|
| 21 |
+
PyAPI_FUNC(PyStatus) PyStatus_Ok(void);
|
| 22 |
+
PyAPI_FUNC(PyStatus) PyStatus_Error(const char *err_msg);
|
| 23 |
+
PyAPI_FUNC(PyStatus) PyStatus_NoMemory(void);
|
| 24 |
+
PyAPI_FUNC(PyStatus) PyStatus_Exit(int exitcode);
|
| 25 |
+
PyAPI_FUNC(int) PyStatus_IsError(PyStatus err);
|
| 26 |
+
PyAPI_FUNC(int) PyStatus_IsExit(PyStatus err);
|
| 27 |
+
PyAPI_FUNC(int) PyStatus_Exception(PyStatus err);
|
| 28 |
+
|
| 29 |
+
/* --- PyWideStringList ------------------------------------------------ */
|
| 30 |
+
|
| 31 |
+
typedef struct {
|
| 32 |
+
/* If length is greater than zero, items must be non-NULL
|
| 33 |
+
and all items strings must be non-NULL */
|
| 34 |
+
Py_ssize_t length;
|
| 35 |
+
wchar_t **items;
|
| 36 |
+
} PyWideStringList;
|
| 37 |
+
|
| 38 |
+
PyAPI_FUNC(PyStatus) PyWideStringList_Append(PyWideStringList *list,
|
| 39 |
+
const wchar_t *item);
|
| 40 |
+
PyAPI_FUNC(PyStatus) PyWideStringList_Insert(PyWideStringList *list,
|
| 41 |
+
Py_ssize_t index,
|
| 42 |
+
const wchar_t *item);
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
/* --- PyPreConfig ----------------------------------------------- */
|
| 46 |
+
|
| 47 |
+
typedef struct PyPreConfig {
|
| 48 |
+
int _config_init; /* _PyConfigInitEnum value */
|
| 49 |
+
|
| 50 |
+
/* Parse Py_PreInitializeFromBytesArgs() arguments?
|
| 51 |
+
See PyConfig.parse_argv */
|
| 52 |
+
int parse_argv;
|
| 53 |
+
|
| 54 |
+
/* If greater than 0, enable isolated mode: sys.path contains
|
| 55 |
+
neither the script's directory nor the user's site-packages directory.
|
| 56 |
+
|
| 57 |
+
Set to 1 by the -I command line option. If set to -1 (default), inherit
|
| 58 |
+
Py_IsolatedFlag value. */
|
| 59 |
+
int isolated;
|
| 60 |
+
|
| 61 |
+
/* If greater than 0: use environment variables.
|
| 62 |
+
Set to 0 by -E command line option. If set to -1 (default), it is
|
| 63 |
+
set to !Py_IgnoreEnvironmentFlag. */
|
| 64 |
+
int use_environment;
|
| 65 |
+
|
| 66 |
+
/* Set the LC_CTYPE locale to the user preferred locale? If equals to 0,
|
| 67 |
+
set coerce_c_locale and coerce_c_locale_warn to 0. */
|
| 68 |
+
int configure_locale;
|
| 69 |
+
|
| 70 |
+
/* Coerce the LC_CTYPE locale if it's equal to "C"? (PEP 538)
|
| 71 |
+
|
| 72 |
+
Set to 0 by PYTHONCOERCECLOCALE=0. Set to 1 by PYTHONCOERCECLOCALE=1.
|
| 73 |
+
Set to 2 if the user preferred LC_CTYPE locale is "C".
|
| 74 |
+
|
| 75 |
+
If it is equal to 1, LC_CTYPE locale is read to decide if it should be
|
| 76 |
+
coerced or not (ex: PYTHONCOERCECLOCALE=1). Internally, it is set to 2
|
| 77 |
+
if the LC_CTYPE locale must be coerced.
|
| 78 |
+
|
| 79 |
+
Disable by default (set to 0). Set it to -1 to let Python decide if it
|
| 80 |
+
should be enabled or not. */
|
| 81 |
+
int coerce_c_locale;
|
| 82 |
+
|
| 83 |
+
/* Emit a warning if the LC_CTYPE locale is coerced?
|
| 84 |
+
|
| 85 |
+
Set to 1 by PYTHONCOERCECLOCALE=warn.
|
| 86 |
+
|
| 87 |
+
Disable by default (set to 0). Set it to -1 to let Python decide if it
|
| 88 |
+
should be enabled or not. */
|
| 89 |
+
int coerce_c_locale_warn;
|
| 90 |
+
|
| 91 |
+
#ifdef MS_WINDOWS
|
| 92 |
+
/* If greater than 1, use the "mbcs" encoding instead of the UTF-8
|
| 93 |
+
encoding for the filesystem encoding.
|
| 94 |
+
|
| 95 |
+
Set to 1 if the PYTHONLEGACYWINDOWSFSENCODING environment variable is
|
| 96 |
+
set to a non-empty string. If set to -1 (default), inherit
|
| 97 |
+
Py_LegacyWindowsFSEncodingFlag value.
|
| 98 |
+
|
| 99 |
+
See PEP 529 for more details. */
|
| 100 |
+
int legacy_windows_fs_encoding;
|
| 101 |
+
#endif
|
| 102 |
+
|
| 103 |
+
/* Enable UTF-8 mode? (PEP 540)
|
| 104 |
+
|
| 105 |
+
Disabled by default (equals to 0).
|
| 106 |
+
|
| 107 |
+
Set to 1 by "-X utf8" and "-X utf8=1" command line options.
|
| 108 |
+
Set to 1 by PYTHONUTF8=1 environment variable.
|
| 109 |
+
|
| 110 |
+
Set to 0 by "-X utf8=0" and PYTHONUTF8=0.
|
| 111 |
+
|
| 112 |
+
If equals to -1, it is set to 1 if the LC_CTYPE locale is "C" or
|
| 113 |
+
"POSIX", otherwise it is set to 0. Inherit Py_UTF8Mode value value. */
|
| 114 |
+
int utf8_mode;
|
| 115 |
+
|
| 116 |
+
/* If non-zero, enable the Python Development Mode.
|
| 117 |
+
|
| 118 |
+
Set to 1 by the -X dev command line option. Set by the PYTHONDEVMODE
|
| 119 |
+
environment variable. */
|
| 120 |
+
int dev_mode;
|
| 121 |
+
|
| 122 |
+
/* Memory allocator: PYTHONMALLOC env var.
|
| 123 |
+
See PyMemAllocatorName for valid values. */
|
| 124 |
+
int allocator;
|
| 125 |
+
} PyPreConfig;
|
| 126 |
+
|
| 127 |
+
PyAPI_FUNC(void) PyPreConfig_InitPythonConfig(PyPreConfig *config);
|
| 128 |
+
PyAPI_FUNC(void) PyPreConfig_InitIsolatedConfig(PyPreConfig *config);
|
| 129 |
+
|
| 130 |
+
|
| 131 |
+
/* --- PyConfig ---------------------------------------------- */
|
| 132 |
+
|
| 133 |
+
/* This structure is best documented in the Doc/c-api/init_config.rst file. */
|
| 134 |
+
typedef struct PyConfig {
|
| 135 |
+
int _config_init; /* _PyConfigInitEnum value */
|
| 136 |
+
|
| 137 |
+
int isolated;
|
| 138 |
+
int use_environment;
|
| 139 |
+
int dev_mode;
|
| 140 |
+
int install_signal_handlers;
|
| 141 |
+
int use_hash_seed;
|
| 142 |
+
unsigned long hash_seed;
|
| 143 |
+
int faulthandler;
|
| 144 |
+
int tracemalloc;
|
| 145 |
+
int import_time;
|
| 146 |
+
int show_ref_count;
|
| 147 |
+
int dump_refs;
|
| 148 |
+
int malloc_stats;
|
| 149 |
+
wchar_t *filesystem_encoding;
|
| 150 |
+
wchar_t *filesystem_errors;
|
| 151 |
+
wchar_t *pycache_prefix;
|
| 152 |
+
int parse_argv;
|
| 153 |
+
PyWideStringList orig_argv;
|
| 154 |
+
PyWideStringList argv;
|
| 155 |
+
PyWideStringList xoptions;
|
| 156 |
+
PyWideStringList warnoptions;
|
| 157 |
+
int site_import;
|
| 158 |
+
int bytes_warning;
|
| 159 |
+
int warn_default_encoding;
|
| 160 |
+
int inspect;
|
| 161 |
+
int interactive;
|
| 162 |
+
int optimization_level;
|
| 163 |
+
int parser_debug;
|
| 164 |
+
int write_bytecode;
|
| 165 |
+
int verbose;
|
| 166 |
+
int quiet;
|
| 167 |
+
int user_site_directory;
|
| 168 |
+
int configure_c_stdio;
|
| 169 |
+
int buffered_stdio;
|
| 170 |
+
wchar_t *stdio_encoding;
|
| 171 |
+
wchar_t *stdio_errors;
|
| 172 |
+
#ifdef MS_WINDOWS
|
| 173 |
+
int legacy_windows_stdio;
|
| 174 |
+
#endif
|
| 175 |
+
wchar_t *check_hash_pycs_mode;
|
| 176 |
+
|
| 177 |
+
/* --- Path configuration inputs ------------ */
|
| 178 |
+
int pathconfig_warnings;
|
| 179 |
+
wchar_t *program_name;
|
| 180 |
+
wchar_t *pythonpath_env;
|
| 181 |
+
wchar_t *home;
|
| 182 |
+
wchar_t *platlibdir;
|
| 183 |
+
|
| 184 |
+
/* --- Path configuration outputs ----------- */
|
| 185 |
+
int module_search_paths_set;
|
| 186 |
+
PyWideStringList module_search_paths;
|
| 187 |
+
wchar_t *executable;
|
| 188 |
+
wchar_t *base_executable;
|
| 189 |
+
wchar_t *prefix;
|
| 190 |
+
wchar_t *base_prefix;
|
| 191 |
+
wchar_t *exec_prefix;
|
| 192 |
+
wchar_t *base_exec_prefix;
|
| 193 |
+
|
| 194 |
+
/* --- Parameter only used by Py_Main() ---------- */
|
| 195 |
+
int skip_source_first_line;
|
| 196 |
+
wchar_t *run_command;
|
| 197 |
+
wchar_t *run_module;
|
| 198 |
+
wchar_t *run_filename;
|
| 199 |
+
|
| 200 |
+
/* --- Private fields ---------------------------- */
|
| 201 |
+
|
| 202 |
+
// Install importlib? If equals to 0, importlib is not initialized at all.
|
| 203 |
+
// Needed by freeze_importlib.
|
| 204 |
+
int _install_importlib;
|
| 205 |
+
|
| 206 |
+
// If equal to 0, stop Python initialization before the "main" phase.
|
| 207 |
+
int _init_main;
|
| 208 |
+
|
| 209 |
+
// If non-zero, disallow threads, subprocesses, and fork.
|
| 210 |
+
// Default: 0.
|
| 211 |
+
int _isolated_interpreter;
|
| 212 |
+
} PyConfig;
|
| 213 |
+
|
| 214 |
+
PyAPI_FUNC(void) PyConfig_InitPythonConfig(PyConfig *config);
|
| 215 |
+
PyAPI_FUNC(void) PyConfig_InitIsolatedConfig(PyConfig *config);
|
| 216 |
+
PyAPI_FUNC(void) PyConfig_Clear(PyConfig *);
|
| 217 |
+
PyAPI_FUNC(PyStatus) PyConfig_SetString(
|
| 218 |
+
PyConfig *config,
|
| 219 |
+
wchar_t **config_str,
|
| 220 |
+
const wchar_t *str);
|
| 221 |
+
PyAPI_FUNC(PyStatus) PyConfig_SetBytesString(
|
| 222 |
+
PyConfig *config,
|
| 223 |
+
wchar_t **config_str,
|
| 224 |
+
const char *str);
|
| 225 |
+
PyAPI_FUNC(PyStatus) PyConfig_Read(PyConfig *config);
|
| 226 |
+
PyAPI_FUNC(PyStatus) PyConfig_SetBytesArgv(
|
| 227 |
+
PyConfig *config,
|
| 228 |
+
Py_ssize_t argc,
|
| 229 |
+
char * const *argv);
|
| 230 |
+
PyAPI_FUNC(PyStatus) PyConfig_SetArgv(PyConfig *config,
|
| 231 |
+
Py_ssize_t argc,
|
| 232 |
+
wchar_t * const *argv);
|
| 233 |
+
PyAPI_FUNC(PyStatus) PyConfig_SetWideStringList(PyConfig *config,
|
| 234 |
+
PyWideStringList *list,
|
| 235 |
+
Py_ssize_t length, wchar_t **items);
|
| 236 |
+
|
| 237 |
+
|
| 238 |
+
/* --- Helper functions --------------------------------------- */
|
| 239 |
+
|
| 240 |
+
/* Get the original command line arguments, before Python modified them.
|
| 241 |
+
|
| 242 |
+
See also PyConfig.orig_argv. */
|
| 243 |
+
PyAPI_FUNC(void) Py_GetArgcArgv(int *argc, wchar_t ***argv);
|
| 244 |
+
|
| 245 |
+
#ifdef __cplusplus
|
| 246 |
+
}
|
| 247 |
+
#endif
|
| 248 |
+
#endif /* !Py_LIMITED_API */
|
| 249 |
+
#endif /* !Py_PYCORECONFIG_H */
|
llava_next/include/python3.10/cpython/objimpl.h
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_OBJIMPL_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
#define _PyObject_SIZE(typeobj) ( (typeobj)->tp_basicsize )
|
| 6 |
+
|
| 7 |
+
/* _PyObject_VAR_SIZE returns the number of bytes (as size_t) allocated for a
|
| 8 |
+
vrbl-size object with nitems items, exclusive of gc overhead (if any). The
|
| 9 |
+
value is rounded up to the closest multiple of sizeof(void *), in order to
|
| 10 |
+
ensure that pointer fields at the end of the object are correctly aligned
|
| 11 |
+
for the platform (this is of special importance for subclasses of, e.g.,
|
| 12 |
+
str or int, so that pointers can be stored after the embedded data).
|
| 13 |
+
|
| 14 |
+
Note that there's no memory wastage in doing this, as malloc has to
|
| 15 |
+
return (at worst) pointer-aligned memory anyway.
|
| 16 |
+
*/
|
| 17 |
+
#if ((SIZEOF_VOID_P - 1) & SIZEOF_VOID_P) != 0
|
| 18 |
+
# error "_PyObject_VAR_SIZE requires SIZEOF_VOID_P be a power of 2"
|
| 19 |
+
#endif
|
| 20 |
+
|
| 21 |
+
#define _PyObject_VAR_SIZE(typeobj, nitems) \
|
| 22 |
+
_Py_SIZE_ROUND_UP((typeobj)->tp_basicsize + \
|
| 23 |
+
(nitems)*(typeobj)->tp_itemsize, \
|
| 24 |
+
SIZEOF_VOID_P)
|
| 25 |
+
|
| 26 |
+
|
| 27 |
+
/* This example code implements an object constructor with a custom
|
| 28 |
+
allocator, where PyObject_New is inlined, and shows the important
|
| 29 |
+
distinction between two steps (at least):
|
| 30 |
+
1) the actual allocation of the object storage;
|
| 31 |
+
2) the initialization of the Python specific fields
|
| 32 |
+
in this storage with PyObject_{Init, InitVar}.
|
| 33 |
+
|
| 34 |
+
PyObject *
|
| 35 |
+
YourObject_New(...)
|
| 36 |
+
{
|
| 37 |
+
PyObject *op;
|
| 38 |
+
|
| 39 |
+
op = (PyObject *) Your_Allocator(_PyObject_SIZE(YourTypeStruct));
|
| 40 |
+
if (op == NULL) {
|
| 41 |
+
return PyErr_NoMemory();
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
PyObject_Init(op, &YourTypeStruct);
|
| 45 |
+
|
| 46 |
+
op->ob_field = value;
|
| 47 |
+
...
|
| 48 |
+
return op;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
Note that in C++, the use of the new operator usually implies that
|
| 52 |
+
the 1st step is performed automatically for you, so in a C++ class
|
| 53 |
+
constructor you would start directly with PyObject_Init/InitVar. */
|
| 54 |
+
|
| 55 |
+
/* This function returns the number of allocated memory blocks, regardless of size */
|
| 56 |
+
PyAPI_FUNC(Py_ssize_t) _Py_GetAllocatedBlocks(void);
|
| 57 |
+
|
| 58 |
+
/* Macros */
|
| 59 |
+
#ifdef WITH_PYMALLOC
|
| 60 |
+
PyAPI_FUNC(int) _PyObject_DebugMallocStats(FILE *out);
|
| 61 |
+
#endif
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
typedef struct {
|
| 65 |
+
/* user context passed as the first argument to the 2 functions */
|
| 66 |
+
void *ctx;
|
| 67 |
+
|
| 68 |
+
/* allocate an arena of size bytes */
|
| 69 |
+
void* (*alloc) (void *ctx, size_t size);
|
| 70 |
+
|
| 71 |
+
/* free an arena */
|
| 72 |
+
void (*free) (void *ctx, void *ptr, size_t size);
|
| 73 |
+
} PyObjectArenaAllocator;
|
| 74 |
+
|
| 75 |
+
/* Get the arena allocator. */
|
| 76 |
+
PyAPI_FUNC(void) PyObject_GetArenaAllocator(PyObjectArenaAllocator *allocator);
|
| 77 |
+
|
| 78 |
+
/* Set the arena allocator. */
|
| 79 |
+
PyAPI_FUNC(void) PyObject_SetArenaAllocator(PyObjectArenaAllocator *allocator);
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
/* Test if an object implements the garbage collector protocol */
|
| 83 |
+
PyAPI_FUNC(int) PyObject_IS_GC(PyObject *obj);
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
/* Code built with Py_BUILD_CORE must include pycore_gc.h instead which
|
| 87 |
+
defines a different _PyGC_FINALIZED() macro. */
|
| 88 |
+
#ifndef Py_BUILD_CORE
|
| 89 |
+
// Kept for backward compatibility with Python 3.8
|
| 90 |
+
# define _PyGC_FINALIZED(o) PyObject_GC_IsFinalized(o)
|
| 91 |
+
#endif
|
| 92 |
+
|
| 93 |
+
PyAPI_FUNC(PyObject *) _PyObject_GC_Malloc(size_t size);
|
| 94 |
+
PyAPI_FUNC(PyObject *) _PyObject_GC_Calloc(size_t size);
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
/* Test if a type supports weak references */
|
| 98 |
+
#define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)
|
| 99 |
+
|
| 100 |
+
PyAPI_FUNC(PyObject **) PyObject_GET_WEAKREFS_LISTPTR(PyObject *op);
|
llava_next/include/python3.10/cpython/odictobject.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_ODICTOBJECT_H
|
| 2 |
+
#define Py_ODICTOBJECT_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
/* OrderedDict */
|
| 9 |
+
/* This API is optional and mostly redundant. */
|
| 10 |
+
|
| 11 |
+
#ifndef Py_LIMITED_API
|
| 12 |
+
|
| 13 |
+
typedef struct _odictobject PyODictObject;
|
| 14 |
+
|
| 15 |
+
PyAPI_DATA(PyTypeObject) PyODict_Type;
|
| 16 |
+
PyAPI_DATA(PyTypeObject) PyODictIter_Type;
|
| 17 |
+
PyAPI_DATA(PyTypeObject) PyODictKeys_Type;
|
| 18 |
+
PyAPI_DATA(PyTypeObject) PyODictItems_Type;
|
| 19 |
+
PyAPI_DATA(PyTypeObject) PyODictValues_Type;
|
| 20 |
+
|
| 21 |
+
#define PyODict_Check(op) PyObject_TypeCheck(op, &PyODict_Type)
|
| 22 |
+
#define PyODict_CheckExact(op) Py_IS_TYPE(op, &PyODict_Type)
|
| 23 |
+
#define PyODict_SIZE(op) PyDict_GET_SIZE((op))
|
| 24 |
+
|
| 25 |
+
PyAPI_FUNC(PyObject *) PyODict_New(void);
|
| 26 |
+
PyAPI_FUNC(int) PyODict_SetItem(PyObject *od, PyObject *key, PyObject *item);
|
| 27 |
+
PyAPI_FUNC(int) PyODict_DelItem(PyObject *od, PyObject *key);
|
| 28 |
+
|
| 29 |
+
/* wrappers around PyDict* functions */
|
| 30 |
+
#define PyODict_GetItem(od, key) PyDict_GetItem(_PyObject_CAST(od), key)
|
| 31 |
+
#define PyODict_GetItemWithError(od, key) \
|
| 32 |
+
PyDict_GetItemWithError(_PyObject_CAST(od), key)
|
| 33 |
+
#define PyODict_Contains(od, key) PyDict_Contains(_PyObject_CAST(od), key)
|
| 34 |
+
#define PyODict_Size(od) PyDict_Size(_PyObject_CAST(od))
|
| 35 |
+
#define PyODict_GetItemString(od, key) \
|
| 36 |
+
PyDict_GetItemString(_PyObject_CAST(od), key)
|
| 37 |
+
|
| 38 |
+
#endif
|
| 39 |
+
|
| 40 |
+
#ifdef __cplusplus
|
| 41 |
+
}
|
| 42 |
+
#endif
|
| 43 |
+
#endif /* !Py_ODICTOBJECT_H */
|
llava_next/include/python3.10/cpython/picklebufobject.h
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* PickleBuffer object. This is built-in for ease of use from third-party
|
| 2 |
+
* C extensions.
|
| 3 |
+
*/
|
| 4 |
+
|
| 5 |
+
#ifndef Py_PICKLEBUFOBJECT_H
|
| 6 |
+
#define Py_PICKLEBUFOBJECT_H
|
| 7 |
+
#ifdef __cplusplus
|
| 8 |
+
extern "C" {
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
#ifndef Py_LIMITED_API
|
| 12 |
+
|
| 13 |
+
PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type;
|
| 14 |
+
|
| 15 |
+
#define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type)
|
| 16 |
+
|
| 17 |
+
/* Create a PickleBuffer redirecting to the given buffer-enabled object */
|
| 18 |
+
PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *);
|
| 19 |
+
/* Get the PickleBuffer's underlying view to the original object
|
| 20 |
+
* (NULL if released)
|
| 21 |
+
*/
|
| 22 |
+
PyAPI_FUNC(const Py_buffer *) PyPickleBuffer_GetBuffer(PyObject *);
|
| 23 |
+
/* Release the PickleBuffer. Returns 0 on success, -1 on error. */
|
| 24 |
+
PyAPI_FUNC(int) PyPickleBuffer_Release(PyObject *);
|
| 25 |
+
|
| 26 |
+
#endif /* !Py_LIMITED_API */
|
| 27 |
+
|
| 28 |
+
#ifdef __cplusplus
|
| 29 |
+
}
|
| 30 |
+
#endif
|
| 31 |
+
#endif /* !Py_PICKLEBUFOBJECT_H */
|
llava_next/include/python3.10/cpython/pylifecycle.h
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_PYLIFECYCLE_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
/* Py_FrozenMain is kept out of the Limited API until documented and present
|
| 6 |
+
in all builds of Python */
|
| 7 |
+
PyAPI_FUNC(int) Py_FrozenMain(int argc, char **argv);
|
| 8 |
+
|
| 9 |
+
/* Only used by applications that embed the interpreter and need to
|
| 10 |
+
* override the standard encoding determination mechanism
|
| 11 |
+
*/
|
| 12 |
+
PyAPI_FUNC(int) Py_SetStandardStreamEncoding(const char *encoding,
|
| 13 |
+
const char *errors);
|
| 14 |
+
|
| 15 |
+
/* PEP 432 Multi-phase initialization API (Private while provisional!) */
|
| 16 |
+
|
| 17 |
+
PyAPI_FUNC(PyStatus) Py_PreInitialize(
|
| 18 |
+
const PyPreConfig *src_config);
|
| 19 |
+
PyAPI_FUNC(PyStatus) Py_PreInitializeFromBytesArgs(
|
| 20 |
+
const PyPreConfig *src_config,
|
| 21 |
+
Py_ssize_t argc,
|
| 22 |
+
char **argv);
|
| 23 |
+
PyAPI_FUNC(PyStatus) Py_PreInitializeFromArgs(
|
| 24 |
+
const PyPreConfig *src_config,
|
| 25 |
+
Py_ssize_t argc,
|
| 26 |
+
wchar_t **argv);
|
| 27 |
+
|
| 28 |
+
PyAPI_FUNC(int) _Py_IsCoreInitialized(void);
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
/* Initialization and finalization */
|
| 32 |
+
|
| 33 |
+
PyAPI_FUNC(PyStatus) Py_InitializeFromConfig(
|
| 34 |
+
const PyConfig *config);
|
| 35 |
+
PyAPI_FUNC(PyStatus) _Py_InitializeMain(void);
|
| 36 |
+
|
| 37 |
+
PyAPI_FUNC(int) Py_RunMain(void);
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
PyAPI_FUNC(void) _Py_NO_RETURN Py_ExitStatusException(PyStatus err);
|
| 41 |
+
|
| 42 |
+
/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
|
| 43 |
+
PyAPI_FUNC(void) _Py_RestoreSignals(void);
|
| 44 |
+
|
| 45 |
+
PyAPI_FUNC(int) Py_FdIsInteractive(FILE *, const char *);
|
| 46 |
+
PyAPI_FUNC(int) _Py_FdIsInteractive(FILE *fp, PyObject *filename);
|
| 47 |
+
|
| 48 |
+
PyAPI_FUNC(void) _Py_SetProgramFullPath(const wchar_t *);
|
| 49 |
+
|
| 50 |
+
PyAPI_FUNC(const char *) _Py_gitidentifier(void);
|
| 51 |
+
PyAPI_FUNC(const char *) _Py_gitversion(void);
|
| 52 |
+
|
| 53 |
+
PyAPI_FUNC(int) _Py_IsFinalizing(void);
|
| 54 |
+
|
| 55 |
+
/* Random */
|
| 56 |
+
PyAPI_FUNC(int) _PyOS_URandom(void *buffer, Py_ssize_t size);
|
| 57 |
+
PyAPI_FUNC(int) _PyOS_URandomNonblock(void *buffer, Py_ssize_t size);
|
| 58 |
+
|
| 59 |
+
/* Legacy locale support */
|
| 60 |
+
PyAPI_FUNC(int) _Py_CoerceLegacyLocale(int warn);
|
| 61 |
+
PyAPI_FUNC(int) _Py_LegacyLocaleDetected(int warn);
|
| 62 |
+
PyAPI_FUNC(char *) _Py_SetLocaleFromEnv(int category);
|
| 63 |
+
|
| 64 |
+
PyAPI_FUNC(PyThreadState *) _Py_NewInterpreter(int isolated_subinterpreter);
|
llava_next/include/python3.10/cpython/pythonrun.h
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_CPYTHON_PYTHONRUN_H
|
| 2 |
+
# error "this header file must not be included directly"
|
| 3 |
+
#endif
|
| 4 |
+
|
| 5 |
+
PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
|
| 6 |
+
PyAPI_FUNC(int) _PyRun_SimpleFileObject(
|
| 7 |
+
FILE *fp,
|
| 8 |
+
PyObject *filename,
|
| 9 |
+
int closeit,
|
| 10 |
+
PyCompilerFlags *flags);
|
| 11 |
+
PyAPI_FUNC(int) PyRun_AnyFileExFlags(
|
| 12 |
+
FILE *fp,
|
| 13 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 14 |
+
int closeit,
|
| 15 |
+
PyCompilerFlags *flags);
|
| 16 |
+
PyAPI_FUNC(int) _PyRun_AnyFileObject(
|
| 17 |
+
FILE *fp,
|
| 18 |
+
PyObject *filename,
|
| 19 |
+
int closeit,
|
| 20 |
+
PyCompilerFlags *flags);
|
| 21 |
+
PyAPI_FUNC(int) PyRun_SimpleFileExFlags(
|
| 22 |
+
FILE *fp,
|
| 23 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 24 |
+
int closeit,
|
| 25 |
+
PyCompilerFlags *flags);
|
| 26 |
+
PyAPI_FUNC(int) PyRun_InteractiveOneFlags(
|
| 27 |
+
FILE *fp,
|
| 28 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 29 |
+
PyCompilerFlags *flags);
|
| 30 |
+
PyAPI_FUNC(int) PyRun_InteractiveOneObject(
|
| 31 |
+
FILE *fp,
|
| 32 |
+
PyObject *filename,
|
| 33 |
+
PyCompilerFlags *flags);
|
| 34 |
+
PyAPI_FUNC(int) PyRun_InteractiveLoopFlags(
|
| 35 |
+
FILE *fp,
|
| 36 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 37 |
+
PyCompilerFlags *flags);
|
| 38 |
+
PyAPI_FUNC(int) _PyRun_InteractiveLoopObject(
|
| 39 |
+
FILE *fp,
|
| 40 |
+
PyObject *filename,
|
| 41 |
+
PyCompilerFlags *flags);
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
PyAPI_FUNC(PyObject *) PyRun_StringFlags(const char *, int, PyObject *,
|
| 45 |
+
PyObject *, PyCompilerFlags *);
|
| 46 |
+
|
| 47 |
+
PyAPI_FUNC(PyObject *) PyRun_FileExFlags(
|
| 48 |
+
FILE *fp,
|
| 49 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 50 |
+
int start,
|
| 51 |
+
PyObject *globals,
|
| 52 |
+
PyObject *locals,
|
| 53 |
+
int closeit,
|
| 54 |
+
PyCompilerFlags *flags);
|
| 55 |
+
|
| 56 |
+
|
| 57 |
+
PyAPI_FUNC(PyObject *) Py_CompileStringExFlags(
|
| 58 |
+
const char *str,
|
| 59 |
+
const char *filename, /* decoded from the filesystem encoding */
|
| 60 |
+
int start,
|
| 61 |
+
PyCompilerFlags *flags,
|
| 62 |
+
int optimize);
|
| 63 |
+
PyAPI_FUNC(PyObject *) Py_CompileStringObject(
|
| 64 |
+
const char *str,
|
| 65 |
+
PyObject *filename, int start,
|
| 66 |
+
PyCompilerFlags *flags,
|
| 67 |
+
int optimize);
|
| 68 |
+
|
| 69 |
+
#define Py_CompileString(str, p, s) Py_CompileStringExFlags(str, p, s, NULL, -1)
|
| 70 |
+
#define Py_CompileStringFlags(str, p, s, f) Py_CompileStringExFlags(str, p, s, f, -1)
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
PyAPI_FUNC(const char *) _Py_SourceAsString(
|
| 74 |
+
PyObject *cmd,
|
| 75 |
+
const char *funcname,
|
| 76 |
+
const char *what,
|
| 77 |
+
PyCompilerFlags *cf,
|
| 78 |
+
PyObject **cmd_copy);
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
/* A function flavor is also exported by libpython. It is required when
|
| 82 |
+
libpython is accessed directly rather than using header files which defines
|
| 83 |
+
macros below. On Windows, for example, PyAPI_FUNC() uses dllexport to
|
| 84 |
+
export functions in pythonXX.dll. */
|
| 85 |
+
PyAPI_FUNC(PyObject *) PyRun_String(const char *str, int s, PyObject *g, PyObject *l);
|
| 86 |
+
PyAPI_FUNC(int) PyRun_AnyFile(FILE *fp, const char *name);
|
| 87 |
+
PyAPI_FUNC(int) PyRun_AnyFileEx(FILE *fp, const char *name, int closeit);
|
| 88 |
+
PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
|
| 89 |
+
PyAPI_FUNC(int) PyRun_SimpleString(const char *s);
|
| 90 |
+
PyAPI_FUNC(int) PyRun_SimpleFile(FILE *f, const char *p);
|
| 91 |
+
PyAPI_FUNC(int) PyRun_SimpleFileEx(FILE *f, const char *p, int c);
|
| 92 |
+
PyAPI_FUNC(int) PyRun_InteractiveOne(FILE *f, const char *p);
|
| 93 |
+
PyAPI_FUNC(int) PyRun_InteractiveLoop(FILE *f, const char *p);
|
| 94 |
+
PyAPI_FUNC(PyObject *) PyRun_File(FILE *fp, const char *p, int s, PyObject *g, PyObject *l);
|
| 95 |
+
PyAPI_FUNC(PyObject *) PyRun_FileEx(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, int c);
|
| 96 |
+
PyAPI_FUNC(PyObject *) PyRun_FileFlags(FILE *fp, const char *p, int s, PyObject *g, PyObject *l, PyCompilerFlags *flags);
|
| 97 |
+
|
| 98 |
+
/* Use macros for a bunch of old variants */
|
| 99 |
+
#define PyRun_String(str, s, g, l) PyRun_StringFlags(str, s, g, l, NULL)
|
| 100 |
+
#define PyRun_AnyFile(fp, name) PyRun_AnyFileExFlags(fp, name, 0, NULL)
|
| 101 |
+
#define PyRun_AnyFileEx(fp, name, closeit) \
|
| 102 |
+
PyRun_AnyFileExFlags(fp, name, closeit, NULL)
|
| 103 |
+
#define PyRun_AnyFileFlags(fp, name, flags) \
|
| 104 |
+
PyRun_AnyFileExFlags(fp, name, 0, flags)
|
| 105 |
+
#define PyRun_SimpleString(s) PyRun_SimpleStringFlags(s, NULL)
|
| 106 |
+
#define PyRun_SimpleFile(f, p) PyRun_SimpleFileExFlags(f, p, 0, NULL)
|
| 107 |
+
#define PyRun_SimpleFileEx(f, p, c) PyRun_SimpleFileExFlags(f, p, c, NULL)
|
| 108 |
+
#define PyRun_InteractiveOne(f, p) PyRun_InteractiveOneFlags(f, p, NULL)
|
| 109 |
+
#define PyRun_InteractiveLoop(f, p) PyRun_InteractiveLoopFlags(f, p, NULL)
|
| 110 |
+
#define PyRun_File(fp, p, s, g, l) \
|
| 111 |
+
PyRun_FileExFlags(fp, p, s, g, l, 0, NULL)
|
| 112 |
+
#define PyRun_FileEx(fp, p, s, g, l, c) \
|
| 113 |
+
PyRun_FileExFlags(fp, p, s, g, l, c, NULL)
|
| 114 |
+
#define PyRun_FileFlags(fp, p, s, g, l, flags) \
|
| 115 |
+
PyRun_FileExFlags(fp, p, s, g, l, 0, flags)
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
/* Stuff with no proper home (yet) */
|
| 119 |
+
PyAPI_FUNC(char *) PyOS_Readline(FILE *, FILE *, const char *);
|
| 120 |
+
PyAPI_DATA(PyThreadState*) _PyOS_ReadlineTState;
|
| 121 |
+
PyAPI_DATA(char) *(*PyOS_ReadlineFunctionPointer)(FILE *, FILE *, const char *);
|
llava_next/include/python3.10/internal/pycore_asdl.h
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_ASDL_H
|
| 2 |
+
#define Py_INTERNAL_ASDL_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
#include "pycore_pyarena.h" // _PyArena_Malloc()
|
| 12 |
+
|
| 13 |
+
typedef PyObject * identifier;
|
| 14 |
+
typedef PyObject * string;
|
| 15 |
+
typedef PyObject * object;
|
| 16 |
+
typedef PyObject * constant;
|
| 17 |
+
|
| 18 |
+
/* It would be nice if the code generated by asdl_c.py was completely
|
| 19 |
+
independent of Python, but it is a goal the requires too much work
|
| 20 |
+
at this stage. So, for example, I'll represent identifiers as
|
| 21 |
+
interned Python strings.
|
| 22 |
+
*/
|
| 23 |
+
|
| 24 |
+
#define _ASDL_SEQ_HEAD \
|
| 25 |
+
Py_ssize_t size; \
|
| 26 |
+
void **elements;
|
| 27 |
+
|
| 28 |
+
typedef struct {
|
| 29 |
+
_ASDL_SEQ_HEAD
|
| 30 |
+
} asdl_seq;
|
| 31 |
+
|
| 32 |
+
typedef struct {
|
| 33 |
+
_ASDL_SEQ_HEAD
|
| 34 |
+
void *typed_elements[1];
|
| 35 |
+
} asdl_generic_seq;
|
| 36 |
+
|
| 37 |
+
typedef struct {
|
| 38 |
+
_ASDL_SEQ_HEAD
|
| 39 |
+
PyObject *typed_elements[1];
|
| 40 |
+
} asdl_identifier_seq;
|
| 41 |
+
|
| 42 |
+
typedef struct {
|
| 43 |
+
_ASDL_SEQ_HEAD
|
| 44 |
+
int typed_elements[1];
|
| 45 |
+
} asdl_int_seq;
|
| 46 |
+
|
| 47 |
+
asdl_generic_seq *_Py_asdl_generic_seq_new(Py_ssize_t size, PyArena *arena);
|
| 48 |
+
asdl_identifier_seq *_Py_asdl_identifier_seq_new(Py_ssize_t size, PyArena *arena);
|
| 49 |
+
asdl_int_seq *_Py_asdl_int_seq_new(Py_ssize_t size, PyArena *arena);
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
#define GENERATE_ASDL_SEQ_CONSTRUCTOR(NAME, TYPE) \
|
| 53 |
+
asdl_ ## NAME ## _seq *_Py_asdl_ ## NAME ## _seq_new(Py_ssize_t size, PyArena *arena) \
|
| 54 |
+
{ \
|
| 55 |
+
asdl_ ## NAME ## _seq *seq = NULL; \
|
| 56 |
+
size_t n; \
|
| 57 |
+
/* check size is sane */ \
|
| 58 |
+
if (size < 0 || \
|
| 59 |
+
(size && (((size_t)size - 1) > (SIZE_MAX / sizeof(void *))))) { \
|
| 60 |
+
PyErr_NoMemory(); \
|
| 61 |
+
return NULL; \
|
| 62 |
+
} \
|
| 63 |
+
n = (size ? (sizeof(TYPE *) * (size - 1)) : 0); \
|
| 64 |
+
/* check if size can be added safely */ \
|
| 65 |
+
if (n > SIZE_MAX - sizeof(asdl_ ## NAME ## _seq)) { \
|
| 66 |
+
PyErr_NoMemory(); \
|
| 67 |
+
return NULL; \
|
| 68 |
+
} \
|
| 69 |
+
n += sizeof(asdl_ ## NAME ## _seq); \
|
| 70 |
+
seq = (asdl_ ## NAME ## _seq *)_PyArena_Malloc(arena, n); \
|
| 71 |
+
if (!seq) { \
|
| 72 |
+
PyErr_NoMemory(); \
|
| 73 |
+
return NULL; \
|
| 74 |
+
} \
|
| 75 |
+
memset(seq, 0, n); \
|
| 76 |
+
seq->size = size; \
|
| 77 |
+
seq->elements = (void**)seq->typed_elements; \
|
| 78 |
+
return seq; \
|
| 79 |
+
}
|
| 80 |
+
|
| 81 |
+
#define asdl_seq_GET_UNTYPED(S, I) (S)->elements[(I)]
|
| 82 |
+
#define asdl_seq_GET(S, I) (S)->typed_elements[(I)]
|
| 83 |
+
#define asdl_seq_LEN(S) ((S) == NULL ? 0 : (S)->size)
|
| 84 |
+
|
| 85 |
+
#ifdef Py_DEBUG
|
| 86 |
+
# define asdl_seq_SET(S, I, V) \
|
| 87 |
+
do { \
|
| 88 |
+
Py_ssize_t _asdl_i = (I); \
|
| 89 |
+
assert((S) != NULL); \
|
| 90 |
+
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
| 91 |
+
(S)->typed_elements[_asdl_i] = (V); \
|
| 92 |
+
} while (0)
|
| 93 |
+
#else
|
| 94 |
+
# define asdl_seq_SET(S, I, V) (S)->typed_elements[I] = (V)
|
| 95 |
+
#endif
|
| 96 |
+
|
| 97 |
+
#ifdef Py_DEBUG
|
| 98 |
+
# define asdl_seq_SET_UNTYPED(S, I, V) \
|
| 99 |
+
do { \
|
| 100 |
+
Py_ssize_t _asdl_i = (I); \
|
| 101 |
+
assert((S) != NULL); \
|
| 102 |
+
assert(0 <= _asdl_i && _asdl_i < (S)->size); \
|
| 103 |
+
(S)->elements[_asdl_i] = (V); \
|
| 104 |
+
} while (0)
|
| 105 |
+
#else
|
| 106 |
+
# define asdl_seq_SET_UNTYPED(S, I, V) (S)->elements[I] = (V)
|
| 107 |
+
#endif
|
| 108 |
+
|
| 109 |
+
#ifdef __cplusplus
|
| 110 |
+
}
|
| 111 |
+
#endif
|
| 112 |
+
#endif /* !Py_INTERNAL_ASDL_H */
|
llava_next/include/python3.10/internal/pycore_ceval.h
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_CEVAL_H
|
| 2 |
+
#define Py_INTERNAL_CEVAL_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* Forward declarations */
|
| 12 |
+
struct pyruntimestate;
|
| 13 |
+
struct _ceval_runtime_state;
|
| 14 |
+
|
| 15 |
+
#include "pycore_interp.h" /* PyInterpreterState.eval_frame */
|
| 16 |
+
|
| 17 |
+
extern void _Py_FinishPendingCalls(PyThreadState *tstate);
|
| 18 |
+
extern void _PyEval_InitRuntimeState(struct _ceval_runtime_state *);
|
| 19 |
+
extern int _PyEval_InitState(struct _ceval_state *ceval);
|
| 20 |
+
extern void _PyEval_FiniState(struct _ceval_state *ceval);
|
| 21 |
+
PyAPI_FUNC(void) _PyEval_SignalReceived(PyInterpreterState *interp);
|
| 22 |
+
PyAPI_FUNC(int) _PyEval_AddPendingCall(
|
| 23 |
+
PyInterpreterState *interp,
|
| 24 |
+
int (*func)(void *),
|
| 25 |
+
void *arg);
|
| 26 |
+
PyAPI_FUNC(void) _PyEval_SignalAsyncExc(PyInterpreterState *interp);
|
| 27 |
+
#ifdef HAVE_FORK
|
| 28 |
+
extern PyStatus _PyEval_ReInitThreads(PyThreadState *tstate);
|
| 29 |
+
#endif
|
| 30 |
+
PyAPI_FUNC(void) _PyEval_SetCoroutineOriginTrackingDepth(
|
| 31 |
+
PyThreadState *tstate,
|
| 32 |
+
int new_depth);
|
| 33 |
+
|
| 34 |
+
void _PyEval_Fini(void);
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
extern PyObject* _PyEval_GetBuiltins(PyThreadState *tstate);
|
| 38 |
+
extern PyObject *_PyEval_BuiltinsFromGlobals(
|
| 39 |
+
PyThreadState *tstate,
|
| 40 |
+
PyObject *globals);
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
static inline PyObject*
|
| 44 |
+
_PyEval_EvalFrame(PyThreadState *tstate, PyFrameObject *f, int throwflag)
|
| 45 |
+
{
|
| 46 |
+
return tstate->interp->eval_frame(tstate, f, throwflag);
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
extern PyObject *
|
| 50 |
+
_PyEval_Vector(PyThreadState *tstate,
|
| 51 |
+
PyFrameConstructor *desc, PyObject *locals,
|
| 52 |
+
PyObject* const* args, size_t argcount,
|
| 53 |
+
PyObject *kwnames);
|
| 54 |
+
|
| 55 |
+
#ifdef EXPERIMENTAL_ISOLATED_SUBINTERPRETERS
|
| 56 |
+
extern int _PyEval_ThreadsInitialized(PyInterpreterState *interp);
|
| 57 |
+
#else
|
| 58 |
+
extern int _PyEval_ThreadsInitialized(struct pyruntimestate *runtime);
|
| 59 |
+
#endif
|
| 60 |
+
extern PyStatus _PyEval_InitGIL(PyThreadState *tstate);
|
| 61 |
+
extern void _PyEval_FiniGIL(PyInterpreterState *interp);
|
| 62 |
+
|
| 63 |
+
extern void _PyEval_ReleaseLock(PyThreadState *tstate);
|
| 64 |
+
|
| 65 |
+
extern void _PyEval_DeactivateOpCache(void);
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
/* --- _Py_EnterRecursiveCall() ----------------------------------------- */
|
| 69 |
+
|
| 70 |
+
#ifdef USE_STACKCHECK
|
| 71 |
+
/* With USE_STACKCHECK macro defined, trigger stack checks in
|
| 72 |
+
_Py_CheckRecursiveCall() on every 64th call to Py_EnterRecursiveCall. */
|
| 73 |
+
static inline int _Py_MakeRecCheck(PyThreadState *tstate) {
|
| 74 |
+
return (++tstate->recursion_depth > tstate->interp->ceval.recursion_limit
|
| 75 |
+
|| ++tstate->stackcheck_counter > 64);
|
| 76 |
+
}
|
| 77 |
+
#else
|
| 78 |
+
static inline int _Py_MakeRecCheck(PyThreadState *tstate) {
|
| 79 |
+
return (++tstate->recursion_depth > tstate->interp->ceval.recursion_limit);
|
| 80 |
+
}
|
| 81 |
+
#endif
|
| 82 |
+
|
| 83 |
+
PyAPI_FUNC(int) _Py_CheckRecursiveCall(
|
| 84 |
+
PyThreadState *tstate,
|
| 85 |
+
const char *where);
|
| 86 |
+
|
| 87 |
+
static inline int _Py_EnterRecursiveCall(PyThreadState *tstate,
|
| 88 |
+
const char *where) {
|
| 89 |
+
return (_Py_MakeRecCheck(tstate) && _Py_CheckRecursiveCall(tstate, where));
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
static inline int _Py_EnterRecursiveCall_inline(const char *where) {
|
| 93 |
+
PyThreadState *tstate = PyThreadState_GET();
|
| 94 |
+
return _Py_EnterRecursiveCall(tstate, where);
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
#define Py_EnterRecursiveCall(where) _Py_EnterRecursiveCall_inline(where)
|
| 98 |
+
|
| 99 |
+
static inline void _Py_LeaveRecursiveCall(PyThreadState *tstate) {
|
| 100 |
+
tstate->recursion_depth--;
|
| 101 |
+
}
|
| 102 |
+
|
| 103 |
+
static inline void _Py_LeaveRecursiveCall_inline(void) {
|
| 104 |
+
PyThreadState *tstate = PyThreadState_GET();
|
| 105 |
+
_Py_LeaveRecursiveCall(tstate);
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
#define Py_LeaveRecursiveCall() _Py_LeaveRecursiveCall_inline()
|
| 109 |
+
|
| 110 |
+
|
| 111 |
+
#ifdef __cplusplus
|
| 112 |
+
}
|
| 113 |
+
#endif
|
| 114 |
+
#endif /* !Py_INTERNAL_CEVAL_H */
|
llava_next/include/python3.10/internal/pycore_compile.h
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_COMPILE_H
|
| 2 |
+
#define Py_INTERNAL_COMPILE_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
struct _arena; // Type defined in pycore_pyarena.h
|
| 12 |
+
struct _mod; // Type defined in pycore_ast.h
|
| 13 |
+
|
| 14 |
+
// Export the symbol for test_peg_generator (built as a library)
|
| 15 |
+
PyAPI_FUNC(PyCodeObject*) _PyAST_Compile(
|
| 16 |
+
struct _mod *mod,
|
| 17 |
+
PyObject *filename,
|
| 18 |
+
PyCompilerFlags *flags,
|
| 19 |
+
int optimize,
|
| 20 |
+
struct _arena *arena);
|
| 21 |
+
extern PyFutureFeatures* _PyFuture_FromAST(
|
| 22 |
+
struct _mod * mod,
|
| 23 |
+
PyObject *filename
|
| 24 |
+
);
|
| 25 |
+
|
| 26 |
+
extern PyObject* _Py_Mangle(PyObject *p, PyObject *name);
|
| 27 |
+
|
| 28 |
+
typedef struct {
|
| 29 |
+
int optimize;
|
| 30 |
+
int ff_features;
|
| 31 |
+
|
| 32 |
+
int recursion_depth; /* current recursion depth */
|
| 33 |
+
int recursion_limit; /* recursion limit */
|
| 34 |
+
} _PyASTOptimizeState;
|
| 35 |
+
|
| 36 |
+
extern int _PyAST_Optimize(
|
| 37 |
+
struct _mod *,
|
| 38 |
+
struct _arena *arena,
|
| 39 |
+
_PyASTOptimizeState *state);
|
| 40 |
+
|
| 41 |
+
#ifdef __cplusplus
|
| 42 |
+
}
|
| 43 |
+
#endif
|
| 44 |
+
#endif /* !Py_INTERNAL_COMPILE_H */
|
llava_next/include/python3.10/internal/pycore_condvar.h
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_CONDVAR_H
|
| 2 |
+
#define Py_INTERNAL_CONDVAR_H
|
| 3 |
+
|
| 4 |
+
#ifndef Py_BUILD_CORE
|
| 5 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
#ifndef _POSIX_THREADS
|
| 9 |
+
/* This means pthreads are not implemented in libc headers, hence the macro
|
| 10 |
+
not present in unistd.h. But they still can be implemented as an external
|
| 11 |
+
library (e.g. gnu pth in pthread emulation) */
|
| 12 |
+
# ifdef HAVE_PTHREAD_H
|
| 13 |
+
# include <pthread.h> /* _POSIX_THREADS */
|
| 14 |
+
# endif
|
| 15 |
+
#endif
|
| 16 |
+
|
| 17 |
+
#ifdef _POSIX_THREADS
|
| 18 |
+
/*
|
| 19 |
+
* POSIX support
|
| 20 |
+
*/
|
| 21 |
+
#define Py_HAVE_CONDVAR
|
| 22 |
+
|
| 23 |
+
#include <pthread.h>
|
| 24 |
+
|
| 25 |
+
#define PyMUTEX_T pthread_mutex_t
|
| 26 |
+
#define PyCOND_T pthread_cond_t
|
| 27 |
+
|
| 28 |
+
#elif defined(NT_THREADS)
|
| 29 |
+
/*
|
| 30 |
+
* Windows (XP, 2003 server and later, as well as (hopefully) CE) support
|
| 31 |
+
*
|
| 32 |
+
* Emulated condition variables ones that work with XP and later, plus
|
| 33 |
+
* example native support on VISTA and onwards.
|
| 34 |
+
*/
|
| 35 |
+
#define Py_HAVE_CONDVAR
|
| 36 |
+
|
| 37 |
+
/* include windows if it hasn't been done before */
|
| 38 |
+
#define WIN32_LEAN_AND_MEAN
|
| 39 |
+
#include <windows.h>
|
| 40 |
+
|
| 41 |
+
/* options */
|
| 42 |
+
/* non-emulated condition variables are provided for those that want
|
| 43 |
+
* to target Windows Vista. Modify this macro to enable them.
|
| 44 |
+
*/
|
| 45 |
+
#ifndef _PY_EMULATED_WIN_CV
|
| 46 |
+
#define _PY_EMULATED_WIN_CV 1 /* use emulated condition variables */
|
| 47 |
+
#endif
|
| 48 |
+
|
| 49 |
+
/* fall back to emulation if not targeting Vista */
|
| 50 |
+
#if !defined NTDDI_VISTA || NTDDI_VERSION < NTDDI_VISTA
|
| 51 |
+
#undef _PY_EMULATED_WIN_CV
|
| 52 |
+
#define _PY_EMULATED_WIN_CV 1
|
| 53 |
+
#endif
|
| 54 |
+
|
| 55 |
+
#if _PY_EMULATED_WIN_CV
|
| 56 |
+
|
| 57 |
+
typedef CRITICAL_SECTION PyMUTEX_T;
|
| 58 |
+
|
| 59 |
+
/* The ConditionVariable object. From XP onwards it is easily emulated
|
| 60 |
+
with a Semaphore.
|
| 61 |
+
Semaphores are available on Windows XP (2003 server) and later.
|
| 62 |
+
We use a Semaphore rather than an auto-reset event, because although
|
| 63 |
+
an auto-resent event might appear to solve the lost-wakeup bug (race
|
| 64 |
+
condition between releasing the outer lock and waiting) because it
|
| 65 |
+
maintains state even though a wait hasn't happened, there is still
|
| 66 |
+
a lost wakeup problem if more than one thread are interrupted in the
|
| 67 |
+
critical place. A semaphore solves that, because its state is
|
| 68 |
+
counted, not Boolean.
|
| 69 |
+
Because it is ok to signal a condition variable with no one
|
| 70 |
+
waiting, we need to keep track of the number of
|
| 71 |
+
waiting threads. Otherwise, the semaphore's state could rise
|
| 72 |
+
without bound. This also helps reduce the number of "spurious wakeups"
|
| 73 |
+
that would otherwise happen.
|
| 74 |
+
*/
|
| 75 |
+
|
| 76 |
+
typedef struct _PyCOND_T
|
| 77 |
+
{
|
| 78 |
+
HANDLE sem;
|
| 79 |
+
int waiting; /* to allow PyCOND_SIGNAL to be a no-op */
|
| 80 |
+
} PyCOND_T;
|
| 81 |
+
|
| 82 |
+
#else /* !_PY_EMULATED_WIN_CV */
|
| 83 |
+
|
| 84 |
+
/* Use native Win7 primitives if build target is Win7 or higher */
|
| 85 |
+
|
| 86 |
+
/* SRWLOCK is faster and better than CriticalSection */
|
| 87 |
+
typedef SRWLOCK PyMUTEX_T;
|
| 88 |
+
|
| 89 |
+
typedef CONDITION_VARIABLE PyCOND_T;
|
| 90 |
+
|
| 91 |
+
#endif /* _PY_EMULATED_WIN_CV */
|
| 92 |
+
|
| 93 |
+
#endif /* _POSIX_THREADS, NT_THREADS */
|
| 94 |
+
|
| 95 |
+
#endif /* Py_INTERNAL_CONDVAR_H */
|
llava_next/include/python3.10/internal/pycore_format.h
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_FORMAT_H
|
| 2 |
+
#define Py_INTERNAL_FORMAT_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* Format codes
|
| 12 |
+
* F_LJUST '-'
|
| 13 |
+
* F_SIGN '+'
|
| 14 |
+
* F_BLANK ' '
|
| 15 |
+
* F_ALT '#'
|
| 16 |
+
* F_ZERO '0'
|
| 17 |
+
*/
|
| 18 |
+
#define F_LJUST (1<<0)
|
| 19 |
+
#define F_SIGN (1<<1)
|
| 20 |
+
#define F_BLANK (1<<2)
|
| 21 |
+
#define F_ALT (1<<3)
|
| 22 |
+
#define F_ZERO (1<<4)
|
| 23 |
+
|
| 24 |
+
#ifdef __cplusplus
|
| 25 |
+
}
|
| 26 |
+
#endif
|
| 27 |
+
#endif /* !Py_INTERNAL_FORMAT_H */
|
llava_next/include/python3.10/internal/pycore_gc.h
ADDED
|
@@ -0,0 +1,181 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_GC_H
|
| 2 |
+
#define Py_INTERNAL_GC_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* GC information is stored BEFORE the object structure. */
|
| 12 |
+
typedef struct {
|
| 13 |
+
// Pointer to next object in the list.
|
| 14 |
+
// 0 means the object is not tracked
|
| 15 |
+
uintptr_t _gc_next;
|
| 16 |
+
|
| 17 |
+
// Pointer to previous object in the list.
|
| 18 |
+
// Lowest two bits are used for flags documented later.
|
| 19 |
+
uintptr_t _gc_prev;
|
| 20 |
+
} PyGC_Head;
|
| 21 |
+
|
| 22 |
+
#define _Py_AS_GC(o) ((PyGC_Head *)(o)-1)
|
| 23 |
+
|
| 24 |
+
/* True if the object is currently tracked by the GC. */
|
| 25 |
+
#define _PyObject_GC_IS_TRACKED(o) (_Py_AS_GC(o)->_gc_next != 0)
|
| 26 |
+
|
| 27 |
+
/* True if the object may be tracked by the GC in the future, or already is.
|
| 28 |
+
This can be useful to implement some optimizations. */
|
| 29 |
+
#define _PyObject_GC_MAY_BE_TRACKED(obj) \
|
| 30 |
+
(PyObject_IS_GC(obj) && \
|
| 31 |
+
(!PyTuple_CheckExact(obj) || _PyObject_GC_IS_TRACKED(obj)))
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
/* Bit flags for _gc_prev */
|
| 35 |
+
/* Bit 0 is set when tp_finalize is called */
|
| 36 |
+
#define _PyGC_PREV_MASK_FINALIZED (1)
|
| 37 |
+
/* Bit 1 is set when the object is in generation which is GCed currently. */
|
| 38 |
+
#define _PyGC_PREV_MASK_COLLECTING (2)
|
| 39 |
+
/* The (N-2) most significant bits contain the real address. */
|
| 40 |
+
#define _PyGC_PREV_SHIFT (2)
|
| 41 |
+
#define _PyGC_PREV_MASK (((uintptr_t) -1) << _PyGC_PREV_SHIFT)
|
| 42 |
+
|
| 43 |
+
// Lowest bit of _gc_next is used for flags only in GC.
|
| 44 |
+
// But it is always 0 for normal code.
|
| 45 |
+
#define _PyGCHead_NEXT(g) ((PyGC_Head*)(g)->_gc_next)
|
| 46 |
+
#define _PyGCHead_SET_NEXT(g, p) ((g)->_gc_next = (uintptr_t)(p))
|
| 47 |
+
|
| 48 |
+
// Lowest two bits of _gc_prev is used for _PyGC_PREV_MASK_* flags.
|
| 49 |
+
#define _PyGCHead_PREV(g) ((PyGC_Head*)((g)->_gc_prev & _PyGC_PREV_MASK))
|
| 50 |
+
#define _PyGCHead_SET_PREV(g, p) do { \
|
| 51 |
+
assert(((uintptr_t)p & ~_PyGC_PREV_MASK) == 0); \
|
| 52 |
+
(g)->_gc_prev = ((g)->_gc_prev & ~_PyGC_PREV_MASK) \
|
| 53 |
+
| ((uintptr_t)(p)); \
|
| 54 |
+
} while (0)
|
| 55 |
+
|
| 56 |
+
#define _PyGCHead_FINALIZED(g) \
|
| 57 |
+
(((g)->_gc_prev & _PyGC_PREV_MASK_FINALIZED) != 0)
|
| 58 |
+
#define _PyGCHead_SET_FINALIZED(g) \
|
| 59 |
+
((g)->_gc_prev |= _PyGC_PREV_MASK_FINALIZED)
|
| 60 |
+
|
| 61 |
+
#define _PyGC_FINALIZED(o) \
|
| 62 |
+
_PyGCHead_FINALIZED(_Py_AS_GC(o))
|
| 63 |
+
#define _PyGC_SET_FINALIZED(o) \
|
| 64 |
+
_PyGCHead_SET_FINALIZED(_Py_AS_GC(o))
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
/* GC runtime state */
|
| 68 |
+
|
| 69 |
+
/* If we change this, we need to change the default value in the
|
| 70 |
+
signature of gc.collect. */
|
| 71 |
+
#define NUM_GENERATIONS 3
|
| 72 |
+
/*
|
| 73 |
+
NOTE: about untracking of mutable objects.
|
| 74 |
+
|
| 75 |
+
Certain types of container cannot participate in a reference cycle, and
|
| 76 |
+
so do not need to be tracked by the garbage collector. Untracking these
|
| 77 |
+
objects reduces the cost of garbage collections. However, determining
|
| 78 |
+
which objects may be untracked is not free, and the costs must be
|
| 79 |
+
weighed against the benefits for garbage collection.
|
| 80 |
+
|
| 81 |
+
There are two possible strategies for when to untrack a container:
|
| 82 |
+
|
| 83 |
+
i) When the container is created.
|
| 84 |
+
ii) When the container is examined by the garbage collector.
|
| 85 |
+
|
| 86 |
+
Tuples containing only immutable objects (integers, strings etc, and
|
| 87 |
+
recursively, tuples of immutable objects) do not need to be tracked.
|
| 88 |
+
The interpreter creates a large number of tuples, many of which will
|
| 89 |
+
not survive until garbage collection. It is therefore not worthwhile
|
| 90 |
+
to untrack eligible tuples at creation time.
|
| 91 |
+
|
| 92 |
+
Instead, all tuples except the empty tuple are tracked when created.
|
| 93 |
+
During garbage collection it is determined whether any surviving tuples
|
| 94 |
+
can be untracked. A tuple can be untracked if all of its contents are
|
| 95 |
+
already not tracked. Tuples are examined for untracking in all garbage
|
| 96 |
+
collection cycles. It may take more than one cycle to untrack a tuple.
|
| 97 |
+
|
| 98 |
+
Dictionaries containing only immutable objects also do not need to be
|
| 99 |
+
tracked. Dictionaries are untracked when created. If a tracked item is
|
| 100 |
+
inserted into a dictionary (either as a key or value), the dictionary
|
| 101 |
+
becomes tracked. During a full garbage collection (all generations),
|
| 102 |
+
the collector will untrack any dictionaries whose contents are not
|
| 103 |
+
tracked.
|
| 104 |
+
|
| 105 |
+
The module provides the python function is_tracked(obj), which returns
|
| 106 |
+
the CURRENT tracking status of the object. Subsequent garbage
|
| 107 |
+
collections may change the tracking status of the object.
|
| 108 |
+
|
| 109 |
+
Untracking of certain containers was introduced in issue #4688, and
|
| 110 |
+
the algorithm was refined in response to issue #14775.
|
| 111 |
+
*/
|
| 112 |
+
|
| 113 |
+
struct gc_generation {
|
| 114 |
+
PyGC_Head head;
|
| 115 |
+
int threshold; /* collection threshold */
|
| 116 |
+
int count; /* count of allocations or collections of younger
|
| 117 |
+
generations */
|
| 118 |
+
};
|
| 119 |
+
|
| 120 |
+
/* Running stats per generation */
|
| 121 |
+
struct gc_generation_stats {
|
| 122 |
+
/* total number of collections */
|
| 123 |
+
Py_ssize_t collections;
|
| 124 |
+
/* total number of collected objects */
|
| 125 |
+
Py_ssize_t collected;
|
| 126 |
+
/* total number of uncollectable objects (put into gc.garbage) */
|
| 127 |
+
Py_ssize_t uncollectable;
|
| 128 |
+
};
|
| 129 |
+
|
| 130 |
+
struct _gc_runtime_state {
|
| 131 |
+
/* List of objects that still need to be cleaned up, singly linked
|
| 132 |
+
* via their gc headers' gc_prev pointers. */
|
| 133 |
+
PyObject *trash_delete_later;
|
| 134 |
+
/* Current call-stack depth of tp_dealloc calls. */
|
| 135 |
+
int trash_delete_nesting;
|
| 136 |
+
|
| 137 |
+
int enabled;
|
| 138 |
+
int debug;
|
| 139 |
+
/* linked lists of container objects */
|
| 140 |
+
struct gc_generation generations[NUM_GENERATIONS];
|
| 141 |
+
PyGC_Head *generation0;
|
| 142 |
+
/* a permanent generation which won't be collected */
|
| 143 |
+
struct gc_generation permanent_generation;
|
| 144 |
+
struct gc_generation_stats generation_stats[NUM_GENERATIONS];
|
| 145 |
+
/* true if we are currently running the collector */
|
| 146 |
+
int collecting;
|
| 147 |
+
/* list of uncollectable objects */
|
| 148 |
+
PyObject *garbage;
|
| 149 |
+
/* a list of callbacks to be invoked when collection is performed */
|
| 150 |
+
PyObject *callbacks;
|
| 151 |
+
/* This is the number of objects that survived the last full
|
| 152 |
+
collection. It approximates the number of long lived objects
|
| 153 |
+
tracked by the GC.
|
| 154 |
+
|
| 155 |
+
(by "full collection", we mean a collection of the oldest
|
| 156 |
+
generation). */
|
| 157 |
+
Py_ssize_t long_lived_total;
|
| 158 |
+
/* This is the number of objects that survived all "non-full"
|
| 159 |
+
collections, and are awaiting to undergo a full collection for
|
| 160 |
+
the first time. */
|
| 161 |
+
Py_ssize_t long_lived_pending;
|
| 162 |
+
};
|
| 163 |
+
|
| 164 |
+
extern void _PyGC_InitState(struct _gc_runtime_state *);
|
| 165 |
+
|
| 166 |
+
extern Py_ssize_t _PyGC_CollectNoFail(PyThreadState *tstate);
|
| 167 |
+
|
| 168 |
+
|
| 169 |
+
// Functions to clear types free lists
|
| 170 |
+
extern void _PyFrame_ClearFreeList(PyInterpreterState *interp);
|
| 171 |
+
extern void _PyTuple_ClearFreeList(PyInterpreterState *interp);
|
| 172 |
+
extern void _PyFloat_ClearFreeList(PyInterpreterState *interp);
|
| 173 |
+
extern void _PyList_ClearFreeList(PyInterpreterState *interp);
|
| 174 |
+
extern void _PyDict_ClearFreeList(PyInterpreterState *interp);
|
| 175 |
+
extern void _PyAsyncGen_ClearFreeLists(PyInterpreterState *interp);
|
| 176 |
+
extern void _PyContext_ClearFreeList(PyInterpreterState *interp);
|
| 177 |
+
|
| 178 |
+
#ifdef __cplusplus
|
| 179 |
+
}
|
| 180 |
+
#endif
|
| 181 |
+
#endif /* !Py_INTERNAL_GC_H */
|
llava_next/include/python3.10/internal/pycore_getopt.h
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_PYGETOPT_H
|
| 2 |
+
#define Py_INTERNAL_PYGETOPT_H
|
| 3 |
+
|
| 4 |
+
#ifndef Py_BUILD_CORE
|
| 5 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
extern int _PyOS_opterr;
|
| 9 |
+
extern Py_ssize_t _PyOS_optind;
|
| 10 |
+
extern const wchar_t *_PyOS_optarg;
|
| 11 |
+
|
| 12 |
+
extern void _PyOS_ResetGetOpt(void);
|
| 13 |
+
|
| 14 |
+
typedef struct {
|
| 15 |
+
const wchar_t *name;
|
| 16 |
+
int has_arg;
|
| 17 |
+
int val;
|
| 18 |
+
} _PyOS_LongOption;
|
| 19 |
+
|
| 20 |
+
extern int _PyOS_GetOpt(Py_ssize_t argc, wchar_t * const *argv, int *longindex);
|
| 21 |
+
|
| 22 |
+
#endif /* !Py_INTERNAL_PYGETOPT_H */
|
llava_next/include/python3.10/internal/pycore_gil.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_GIL_H
|
| 2 |
+
#define Py_INTERNAL_GIL_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
#include "pycore_atomic.h" /* _Py_atomic_address */
|
| 12 |
+
#include "pycore_condvar.h" /* PyCOND_T */
|
| 13 |
+
|
| 14 |
+
#ifndef Py_HAVE_CONDVAR
|
| 15 |
+
# error You need either a POSIX-compatible or a Windows system!
|
| 16 |
+
#endif
|
| 17 |
+
|
| 18 |
+
/* Enable if you want to force the switching of threads at least
|
| 19 |
+
every `interval`. */
|
| 20 |
+
#undef FORCE_SWITCHING
|
| 21 |
+
#define FORCE_SWITCHING
|
| 22 |
+
|
| 23 |
+
struct _gil_runtime_state {
|
| 24 |
+
/* microseconds (the Python API uses seconds, though) */
|
| 25 |
+
unsigned long interval;
|
| 26 |
+
/* Last PyThreadState holding / having held the GIL. This helps us
|
| 27 |
+
know whether anyone else was scheduled after we dropped the GIL. */
|
| 28 |
+
_Py_atomic_address last_holder;
|
| 29 |
+
/* Whether the GIL is already taken (-1 if uninitialized). This is
|
| 30 |
+
atomic because it can be read without any lock taken in ceval.c. */
|
| 31 |
+
_Py_atomic_int locked;
|
| 32 |
+
/* Number of GIL switches since the beginning. */
|
| 33 |
+
unsigned long switch_number;
|
| 34 |
+
/* This condition variable allows one or several threads to wait
|
| 35 |
+
until the GIL is released. In addition, the mutex also protects
|
| 36 |
+
the above variables. */
|
| 37 |
+
PyCOND_T cond;
|
| 38 |
+
PyMUTEX_T mutex;
|
| 39 |
+
#ifdef FORCE_SWITCHING
|
| 40 |
+
/* This condition variable helps the GIL-releasing thread wait for
|
| 41 |
+
a GIL-awaiting thread to be scheduled and take the GIL. */
|
| 42 |
+
PyCOND_T switch_cond;
|
| 43 |
+
PyMUTEX_T switch_mutex;
|
| 44 |
+
#endif
|
| 45 |
+
};
|
| 46 |
+
|
| 47 |
+
#ifdef __cplusplus
|
| 48 |
+
}
|
| 49 |
+
#endif
|
| 50 |
+
#endif /* !Py_INTERNAL_GIL_H */
|
llava_next/include/python3.10/internal/pycore_hamt.h
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_HAMT_H
|
| 2 |
+
#define Py_INTERNAL_HAMT_H
|
| 3 |
+
|
| 4 |
+
#ifndef Py_BUILD_CORE
|
| 5 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
/*
|
| 10 |
+
HAMT tree is shaped by hashes of keys. Every group of 5 bits of a hash denotes
|
| 11 |
+
the exact position of the key in one level of the tree. Since we're using
|
| 12 |
+
32 bit hashes, we can have at most 7 such levels. Although if there are
|
| 13 |
+
two distinct keys with equal hashes, they will have to occupy the same
|
| 14 |
+
cell in the 7th level of the tree -- so we'd put them in a "collision" node.
|
| 15 |
+
Which brings the total possible tree depth to 8. Read more about the actual
|
| 16 |
+
layout of the HAMT tree in `hamt.c`.
|
| 17 |
+
|
| 18 |
+
This constant is used to define a datastucture for storing iteration state.
|
| 19 |
+
*/
|
| 20 |
+
#define _Py_HAMT_MAX_TREE_DEPTH 8
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
#define PyHamt_Check(o) Py_IS_TYPE(o, &_PyHamt_Type)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
/* Abstract tree node. */
|
| 27 |
+
typedef struct {
|
| 28 |
+
PyObject_HEAD
|
| 29 |
+
} PyHamtNode;
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
/* An HAMT immutable mapping collection. */
|
| 33 |
+
typedef struct {
|
| 34 |
+
PyObject_HEAD
|
| 35 |
+
PyHamtNode *h_root;
|
| 36 |
+
PyObject *h_weakreflist;
|
| 37 |
+
Py_ssize_t h_count;
|
| 38 |
+
} PyHamtObject;
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
/* A struct to hold the state of depth-first traverse of the tree.
|
| 42 |
+
|
| 43 |
+
HAMT is an immutable collection. Iterators will hold a strong reference
|
| 44 |
+
to it, and every node in the HAMT has strong references to its children.
|
| 45 |
+
|
| 46 |
+
So for iterators, we can implement zero allocations and zero reference
|
| 47 |
+
inc/dec depth-first iteration.
|
| 48 |
+
|
| 49 |
+
- i_nodes: an array of seven pointers to tree nodes
|
| 50 |
+
- i_level: the current node in i_nodes
|
| 51 |
+
- i_pos: an array of positions within nodes in i_nodes.
|
| 52 |
+
*/
|
| 53 |
+
typedef struct {
|
| 54 |
+
PyHamtNode *i_nodes[_Py_HAMT_MAX_TREE_DEPTH];
|
| 55 |
+
Py_ssize_t i_pos[_Py_HAMT_MAX_TREE_DEPTH];
|
| 56 |
+
int8_t i_level;
|
| 57 |
+
} PyHamtIteratorState;
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
/* Base iterator object.
|
| 61 |
+
|
| 62 |
+
Contains the iteration state, a pointer to the HAMT tree,
|
| 63 |
+
and a pointer to the 'yield function'. The latter is a simple
|
| 64 |
+
function that returns a key/value tuple for the 'Items' iterator,
|
| 65 |
+
just a key for the 'Keys' iterator, and a value for the 'Values'
|
| 66 |
+
iterator.
|
| 67 |
+
*/
|
| 68 |
+
typedef struct {
|
| 69 |
+
PyObject_HEAD
|
| 70 |
+
PyHamtObject *hi_obj;
|
| 71 |
+
PyHamtIteratorState hi_iter;
|
| 72 |
+
binaryfunc hi_yield;
|
| 73 |
+
} PyHamtIterator;
|
| 74 |
+
|
| 75 |
+
|
| 76 |
+
PyAPI_DATA(PyTypeObject) _PyHamt_Type;
|
| 77 |
+
PyAPI_DATA(PyTypeObject) _PyHamt_ArrayNode_Type;
|
| 78 |
+
PyAPI_DATA(PyTypeObject) _PyHamt_BitmapNode_Type;
|
| 79 |
+
PyAPI_DATA(PyTypeObject) _PyHamt_CollisionNode_Type;
|
| 80 |
+
PyAPI_DATA(PyTypeObject) _PyHamtKeys_Type;
|
| 81 |
+
PyAPI_DATA(PyTypeObject) _PyHamtValues_Type;
|
| 82 |
+
PyAPI_DATA(PyTypeObject) _PyHamtItems_Type;
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
/* Create a new HAMT immutable mapping. */
|
| 86 |
+
PyHamtObject * _PyHamt_New(void);
|
| 87 |
+
|
| 88 |
+
/* Return a new collection based on "o", but with an additional
|
| 89 |
+
key/val pair. */
|
| 90 |
+
PyHamtObject * _PyHamt_Assoc(PyHamtObject *o, PyObject *key, PyObject *val);
|
| 91 |
+
|
| 92 |
+
/* Return a new collection based on "o", but without "key". */
|
| 93 |
+
PyHamtObject * _PyHamt_Without(PyHamtObject *o, PyObject *key);
|
| 94 |
+
|
| 95 |
+
/* Find "key" in the "o" collection.
|
| 96 |
+
|
| 97 |
+
Return:
|
| 98 |
+
- -1: An error occurred.
|
| 99 |
+
- 0: "key" wasn't found in "o".
|
| 100 |
+
- 1: "key" is in "o"; "*val" is set to its value (a borrowed ref).
|
| 101 |
+
*/
|
| 102 |
+
int _PyHamt_Find(PyHamtObject *o, PyObject *key, PyObject **val);
|
| 103 |
+
|
| 104 |
+
/* Check if "v" is equal to "w".
|
| 105 |
+
|
| 106 |
+
Return:
|
| 107 |
+
- 0: v != w
|
| 108 |
+
- 1: v == w
|
| 109 |
+
- -1: An error occurred.
|
| 110 |
+
*/
|
| 111 |
+
int _PyHamt_Eq(PyHamtObject *v, PyHamtObject *w);
|
| 112 |
+
|
| 113 |
+
/* Return the size of "o"; equivalent of "len(o)". */
|
| 114 |
+
Py_ssize_t _PyHamt_Len(PyHamtObject *o);
|
| 115 |
+
|
| 116 |
+
/* Return a Keys iterator over "o". */
|
| 117 |
+
PyObject * _PyHamt_NewIterKeys(PyHamtObject *o);
|
| 118 |
+
|
| 119 |
+
/* Return a Values iterator over "o". */
|
| 120 |
+
PyObject * _PyHamt_NewIterValues(PyHamtObject *o);
|
| 121 |
+
|
| 122 |
+
/* Return a Items iterator over "o". */
|
| 123 |
+
PyObject * _PyHamt_NewIterItems(PyHamtObject *o);
|
| 124 |
+
|
| 125 |
+
int _PyHamt_Init(void);
|
| 126 |
+
void _PyHamt_Fini(void);
|
| 127 |
+
|
| 128 |
+
#endif /* !Py_INTERNAL_HAMT_H */
|
llava_next/include/python3.10/internal/pycore_hashtable.h
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_HASHTABLE_H
|
| 2 |
+
#define Py_INTERNAL_HASHTABLE_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* Single linked list */
|
| 12 |
+
|
| 13 |
+
typedef struct _Py_slist_item_s {
|
| 14 |
+
struct _Py_slist_item_s *next;
|
| 15 |
+
} _Py_slist_item_t;
|
| 16 |
+
|
| 17 |
+
typedef struct {
|
| 18 |
+
_Py_slist_item_t *head;
|
| 19 |
+
} _Py_slist_t;
|
| 20 |
+
|
| 21 |
+
#define _Py_SLIST_ITEM_NEXT(ITEM) (((_Py_slist_item_t *)ITEM)->next)
|
| 22 |
+
|
| 23 |
+
#define _Py_SLIST_HEAD(SLIST) (((_Py_slist_t *)SLIST)->head)
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
/* _Py_hashtable: table entry */
|
| 27 |
+
|
| 28 |
+
typedef struct {
|
| 29 |
+
/* used by _Py_hashtable_t.buckets to link entries */
|
| 30 |
+
_Py_slist_item_t _Py_slist_item;
|
| 31 |
+
|
| 32 |
+
Py_uhash_t key_hash;
|
| 33 |
+
void *key;
|
| 34 |
+
void *value;
|
| 35 |
+
} _Py_hashtable_entry_t;
|
| 36 |
+
|
| 37 |
+
|
| 38 |
+
/* _Py_hashtable: prototypes */
|
| 39 |
+
|
| 40 |
+
/* Forward declaration */
|
| 41 |
+
struct _Py_hashtable_t;
|
| 42 |
+
typedef struct _Py_hashtable_t _Py_hashtable_t;
|
| 43 |
+
|
| 44 |
+
typedef Py_uhash_t (*_Py_hashtable_hash_func) (const void *key);
|
| 45 |
+
typedef int (*_Py_hashtable_compare_func) (const void *key1, const void *key2);
|
| 46 |
+
typedef void (*_Py_hashtable_destroy_func) (void *key);
|
| 47 |
+
typedef _Py_hashtable_entry_t* (*_Py_hashtable_get_entry_func)(_Py_hashtable_t *ht,
|
| 48 |
+
const void *key);
|
| 49 |
+
|
| 50 |
+
typedef struct {
|
| 51 |
+
// Allocate a memory block
|
| 52 |
+
void* (*malloc) (size_t size);
|
| 53 |
+
|
| 54 |
+
// Release a memory block
|
| 55 |
+
void (*free) (void *ptr);
|
| 56 |
+
} _Py_hashtable_allocator_t;
|
| 57 |
+
|
| 58 |
+
|
| 59 |
+
/* _Py_hashtable: table */
|
| 60 |
+
struct _Py_hashtable_t {
|
| 61 |
+
size_t nentries; // Total number of entries in the table
|
| 62 |
+
size_t nbuckets;
|
| 63 |
+
_Py_slist_t *buckets;
|
| 64 |
+
|
| 65 |
+
_Py_hashtable_get_entry_func get_entry_func;
|
| 66 |
+
_Py_hashtable_hash_func hash_func;
|
| 67 |
+
_Py_hashtable_compare_func compare_func;
|
| 68 |
+
_Py_hashtable_destroy_func key_destroy_func;
|
| 69 |
+
_Py_hashtable_destroy_func value_destroy_func;
|
| 70 |
+
_Py_hashtable_allocator_t alloc;
|
| 71 |
+
};
|
| 72 |
+
|
| 73 |
+
/* Hash a pointer (void*) */
|
| 74 |
+
PyAPI_FUNC(Py_uhash_t) _Py_hashtable_hash_ptr(const void *key);
|
| 75 |
+
|
| 76 |
+
/* Comparison using memcmp() */
|
| 77 |
+
PyAPI_FUNC(int) _Py_hashtable_compare_direct(
|
| 78 |
+
const void *key1,
|
| 79 |
+
const void *key2);
|
| 80 |
+
|
| 81 |
+
PyAPI_FUNC(_Py_hashtable_t *) _Py_hashtable_new(
|
| 82 |
+
_Py_hashtable_hash_func hash_func,
|
| 83 |
+
_Py_hashtable_compare_func compare_func);
|
| 84 |
+
|
| 85 |
+
PyAPI_FUNC(_Py_hashtable_t *) _Py_hashtable_new_full(
|
| 86 |
+
_Py_hashtable_hash_func hash_func,
|
| 87 |
+
_Py_hashtable_compare_func compare_func,
|
| 88 |
+
_Py_hashtable_destroy_func key_destroy_func,
|
| 89 |
+
_Py_hashtable_destroy_func value_destroy_func,
|
| 90 |
+
_Py_hashtable_allocator_t *allocator);
|
| 91 |
+
|
| 92 |
+
PyAPI_FUNC(void) _Py_hashtable_destroy(_Py_hashtable_t *ht);
|
| 93 |
+
|
| 94 |
+
PyAPI_FUNC(void) _Py_hashtable_clear(_Py_hashtable_t *ht);
|
| 95 |
+
|
| 96 |
+
typedef int (*_Py_hashtable_foreach_func) (_Py_hashtable_t *ht,
|
| 97 |
+
const void *key, const void *value,
|
| 98 |
+
void *user_data);
|
| 99 |
+
|
| 100 |
+
/* Call func() on each entry of the hashtable.
|
| 101 |
+
Iteration stops if func() result is non-zero, in this case it's the result
|
| 102 |
+
of the call. Otherwise, the function returns 0. */
|
| 103 |
+
PyAPI_FUNC(int) _Py_hashtable_foreach(
|
| 104 |
+
_Py_hashtable_t *ht,
|
| 105 |
+
_Py_hashtable_foreach_func func,
|
| 106 |
+
void *user_data);
|
| 107 |
+
|
| 108 |
+
PyAPI_FUNC(size_t) _Py_hashtable_size(const _Py_hashtable_t *ht);
|
| 109 |
+
|
| 110 |
+
/* Add a new entry to the hash. The key must not be present in the hash table.
|
| 111 |
+
Return 0 on success, -1 on memory error. */
|
| 112 |
+
PyAPI_FUNC(int) _Py_hashtable_set(
|
| 113 |
+
_Py_hashtable_t *ht,
|
| 114 |
+
const void *key,
|
| 115 |
+
void *value);
|
| 116 |
+
|
| 117 |
+
|
| 118 |
+
/* Get an entry.
|
| 119 |
+
Return NULL if the key does not exist. */
|
| 120 |
+
static inline _Py_hashtable_entry_t *
|
| 121 |
+
_Py_hashtable_get_entry(_Py_hashtable_t *ht, const void *key)
|
| 122 |
+
{
|
| 123 |
+
return ht->get_entry_func(ht, key);
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
|
| 127 |
+
/* Get value from an entry.
|
| 128 |
+
Return NULL if the entry is not found.
|
| 129 |
+
|
| 130 |
+
Use _Py_hashtable_get_entry() to distinguish entry value equal to NULL
|
| 131 |
+
and entry not found. */
|
| 132 |
+
PyAPI_FUNC(void*) _Py_hashtable_get(_Py_hashtable_t *ht, const void *key);
|
| 133 |
+
|
| 134 |
+
|
| 135 |
+
/* Remove a key and its associated value without calling key and value destroy
|
| 136 |
+
functions.
|
| 137 |
+
|
| 138 |
+
Return the removed value if the key was found.
|
| 139 |
+
Return NULL if the key was not found. */
|
| 140 |
+
PyAPI_FUNC(void*) _Py_hashtable_steal(
|
| 141 |
+
_Py_hashtable_t *ht,
|
| 142 |
+
const void *key);
|
| 143 |
+
|
| 144 |
+
|
| 145 |
+
#ifdef __cplusplus
|
| 146 |
+
}
|
| 147 |
+
#endif
|
| 148 |
+
#endif /* !Py_INTERNAL_HASHTABLE_H */
|
llava_next/include/python3.10/internal/pycore_import.h
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_LIMITED_API
|
| 2 |
+
#ifndef Py_INTERNAL_IMPORT_H
|
| 3 |
+
#define Py_INTERNAL_IMPORT_H
|
| 4 |
+
#ifdef __cplusplus
|
| 5 |
+
extern "C" {
|
| 6 |
+
#endif
|
| 7 |
+
|
| 8 |
+
#ifdef HAVE_FORK
|
| 9 |
+
extern PyStatus _PyImport_ReInitLock(void);
|
| 10 |
+
#endif
|
| 11 |
+
extern PyObject* _PyImport_BootstrapImp(PyThreadState *tstate);
|
| 12 |
+
|
| 13 |
+
#ifdef __cplusplus
|
| 14 |
+
}
|
| 15 |
+
#endif
|
| 16 |
+
#endif /* !Py_INTERNAL_IMPORT_H */
|
| 17 |
+
#endif /* !Py_LIMITED_API */
|
llava_next/include/python3.10/internal/pycore_initconfig.h
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef Py_INTERNAL_CORECONFIG_H
|
| 2 |
+
#define Py_INTERNAL_CORECONFIG_H
|
| 3 |
+
#ifdef __cplusplus
|
| 4 |
+
extern "C" {
|
| 5 |
+
#endif
|
| 6 |
+
|
| 7 |
+
#ifndef Py_BUILD_CORE
|
| 8 |
+
# error "this header requires Py_BUILD_CORE define"
|
| 9 |
+
#endif
|
| 10 |
+
|
| 11 |
+
/* Forward declaration */
|
| 12 |
+
struct pyruntimestate;
|
| 13 |
+
|
| 14 |
+
/* --- PyStatus ----------------------------------------------- */
|
| 15 |
+
|
| 16 |
+
/* Almost all errors causing Python initialization to fail */
|
| 17 |
+
#ifdef _MSC_VER
|
| 18 |
+
/* Visual Studio 2015 doesn't implement C99 __func__ in C */
|
| 19 |
+
# define _PyStatus_GET_FUNC() __FUNCTION__
|
| 20 |
+
#else
|
| 21 |
+
# define _PyStatus_GET_FUNC() __func__
|
| 22 |
+
#endif
|
| 23 |
+
|
| 24 |
+
#define _PyStatus_OK() \
|
| 25 |
+
(PyStatus){._type = _PyStatus_TYPE_OK,}
|
| 26 |
+
/* other fields are set to 0 */
|
| 27 |
+
#define _PyStatus_ERR(ERR_MSG) \
|
| 28 |
+
(PyStatus){ \
|
| 29 |
+
._type = _PyStatus_TYPE_ERROR, \
|
| 30 |
+
.func = _PyStatus_GET_FUNC(), \
|
| 31 |
+
.err_msg = (ERR_MSG)}
|
| 32 |
+
/* other fields are set to 0 */
|
| 33 |
+
#define _PyStatus_NO_MEMORY() _PyStatus_ERR("memory allocation failed")
|
| 34 |
+
#define _PyStatus_EXIT(EXITCODE) \
|
| 35 |
+
(PyStatus){ \
|
| 36 |
+
._type = _PyStatus_TYPE_EXIT, \
|
| 37 |
+
.exitcode = (EXITCODE)}
|
| 38 |
+
#define _PyStatus_IS_ERROR(err) \
|
| 39 |
+
(err._type == _PyStatus_TYPE_ERROR)
|
| 40 |
+
#define _PyStatus_IS_EXIT(err) \
|
| 41 |
+
(err._type == _PyStatus_TYPE_EXIT)
|
| 42 |
+
#define _PyStatus_EXCEPTION(err) \
|
| 43 |
+
(err._type != _PyStatus_TYPE_OK)
|
| 44 |
+
#define _PyStatus_UPDATE_FUNC(err) \
|
| 45 |
+
do { err.func = _PyStatus_GET_FUNC(); } while (0)
|
| 46 |
+
|
| 47 |
+
PyObject* _PyErr_SetFromPyStatus(PyStatus status);
|
| 48 |
+
|
| 49 |
+
/* --- PyWideStringList ------------------------------------------------ */
|
| 50 |
+
|
| 51 |
+
#define _PyWideStringList_INIT (PyWideStringList){.length = 0, .items = NULL}
|
| 52 |
+
|
| 53 |
+
#ifndef NDEBUG
|
| 54 |
+
PyAPI_FUNC(int) _PyWideStringList_CheckConsistency(const PyWideStringList *list);
|
| 55 |
+
#endif
|
| 56 |
+
PyAPI_FUNC(void) _PyWideStringList_Clear(PyWideStringList *list);
|
| 57 |
+
PyAPI_FUNC(int) _PyWideStringList_Copy(PyWideStringList *list,
|
| 58 |
+
const PyWideStringList *list2);
|
| 59 |
+
PyAPI_FUNC(PyStatus) _PyWideStringList_Extend(PyWideStringList *list,
|
| 60 |
+
const PyWideStringList *list2);
|
| 61 |
+
PyAPI_FUNC(PyObject*) _PyWideStringList_AsList(const PyWideStringList *list);
|
| 62 |
+
|
| 63 |
+
|
| 64 |
+
/* --- _PyArgv ---------------------------------------------------- */
|
| 65 |
+
|
| 66 |
+
typedef struct _PyArgv {
|
| 67 |
+
Py_ssize_t argc;
|
| 68 |
+
int use_bytes_argv;
|
| 69 |
+
char * const *bytes_argv;
|
| 70 |
+
wchar_t * const *wchar_argv;
|
| 71 |
+
} _PyArgv;
|
| 72 |
+
|
| 73 |
+
PyAPI_FUNC(PyStatus) _PyArgv_AsWstrList(const _PyArgv *args,
|
| 74 |
+
PyWideStringList *list);
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
/* --- Helper functions ------------------------------------------- */
|
| 78 |
+
|
| 79 |
+
PyAPI_FUNC(int) _Py_str_to_int(
|
| 80 |
+
const char *str,
|
| 81 |
+
int *result);
|
| 82 |
+
PyAPI_FUNC(const wchar_t*) _Py_get_xoption(
|
| 83 |
+
const PyWideStringList *xoptions,
|
| 84 |
+
const wchar_t *name);
|
| 85 |
+
PyAPI_FUNC(const char*) _Py_GetEnv(
|
| 86 |
+
int use_environment,
|
| 87 |
+
const char *name);
|
| 88 |
+
PyAPI_FUNC(void) _Py_get_env_flag(
|
| 89 |
+
int use_environment,
|
| 90 |
+
int *flag,
|
| 91 |
+
const char *name);
|
| 92 |
+
|
| 93 |
+
/* Py_GetArgcArgv() helper */
|
| 94 |
+
PyAPI_FUNC(void) _Py_ClearArgcArgv(void);
|
| 95 |
+
|
| 96 |
+
|
| 97 |
+
/* --- _PyPreCmdline ------------------------------------------------- */
|
| 98 |
+
|
| 99 |
+
typedef struct {
|
| 100 |
+
PyWideStringList argv;
|
| 101 |
+
PyWideStringList xoptions; /* "-X value" option */
|
| 102 |
+
int isolated; /* -I option */
|
| 103 |
+
int use_environment; /* -E option */
|
| 104 |
+
int dev_mode; /* -X dev and PYTHONDEVMODE */
|
| 105 |
+
int warn_default_encoding; /* -X warn_default_encoding and PYTHONWARNDEFAULTENCODING */
|
| 106 |
+
} _PyPreCmdline;
|
| 107 |
+
|
| 108 |
+
#define _PyPreCmdline_INIT \
|
| 109 |
+
(_PyPreCmdline){ \
|
| 110 |
+
.use_environment = -1, \
|
| 111 |
+
.isolated = -1, \
|
| 112 |
+
.dev_mode = -1}
|
| 113 |
+
/* Note: _PyPreCmdline_INIT sets other fields to 0/NULL */
|
| 114 |
+
|
| 115 |
+
extern void _PyPreCmdline_Clear(_PyPreCmdline *cmdline);
|
| 116 |
+
extern PyStatus _PyPreCmdline_SetArgv(_PyPreCmdline *cmdline,
|
| 117 |
+
const _PyArgv *args);
|
| 118 |
+
extern PyStatus _PyPreCmdline_SetConfig(
|
| 119 |
+
const _PyPreCmdline *cmdline,
|
| 120 |
+
PyConfig *config);
|
| 121 |
+
extern PyStatus _PyPreCmdline_Read(_PyPreCmdline *cmdline,
|
| 122 |
+
const PyPreConfig *preconfig);
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
/* --- PyPreConfig ----------------------------------------------- */
|
| 126 |
+
|
| 127 |
+
PyAPI_FUNC(void) _PyPreConfig_InitCompatConfig(PyPreConfig *preconfig);
|
| 128 |
+
extern void _PyPreConfig_InitFromConfig(
|
| 129 |
+
PyPreConfig *preconfig,
|
| 130 |
+
const PyConfig *config);
|
| 131 |
+
extern PyStatus _PyPreConfig_InitFromPreConfig(
|
| 132 |
+
PyPreConfig *preconfig,
|
| 133 |
+
const PyPreConfig *config2);
|
| 134 |
+
extern PyObject* _PyPreConfig_AsDict(const PyPreConfig *preconfig);
|
| 135 |
+
extern void _PyPreConfig_GetConfig(PyPreConfig *preconfig,
|
| 136 |
+
const PyConfig *config);
|
| 137 |
+
extern PyStatus _PyPreConfig_Read(PyPreConfig *preconfig,
|
| 138 |
+
const _PyArgv *args);
|
| 139 |
+
extern PyStatus _PyPreConfig_Write(const PyPreConfig *preconfig);
|
| 140 |
+
|
| 141 |
+
|
| 142 |
+
/* --- PyConfig ---------------------------------------------- */
|
| 143 |
+
|
| 144 |
+
typedef enum {
|
| 145 |
+
/* Py_Initialize() API: backward compatibility with Python 3.6 and 3.7 */
|
| 146 |
+
_PyConfig_INIT_COMPAT = 1,
|
| 147 |
+
_PyConfig_INIT_PYTHON = 2,
|
| 148 |
+
_PyConfig_INIT_ISOLATED = 3
|
| 149 |
+
} _PyConfigInitEnum;
|
| 150 |
+
|
| 151 |
+
PyAPI_FUNC(void) _PyConfig_InitCompatConfig(PyConfig *config);
|
| 152 |
+
extern PyStatus _PyConfig_Copy(
|
| 153 |
+
PyConfig *config,
|
| 154 |
+
const PyConfig *config2);
|
| 155 |
+
extern PyStatus _PyConfig_InitPathConfig(
|
| 156 |
+
PyConfig *config,
|
| 157 |
+
int compute_path_config);
|
| 158 |
+
extern PyStatus _PyConfig_Read(PyConfig *config, int compute_path_config);
|
| 159 |
+
extern PyStatus _PyConfig_Write(const PyConfig *config,
|
| 160 |
+
struct pyruntimestate *runtime);
|
| 161 |
+
extern PyStatus _PyConfig_SetPyArgv(
|
| 162 |
+
PyConfig *config,
|
| 163 |
+
const _PyArgv *args);
|
| 164 |
+
|
| 165 |
+
PyAPI_FUNC(PyObject*) _PyConfig_AsDict(const PyConfig *config);
|
| 166 |
+
PyAPI_FUNC(int) _PyConfig_FromDict(PyConfig *config, PyObject *dict);
|
| 167 |
+
|
| 168 |
+
extern int _Py_global_config_int_max_str_digits;
|
| 169 |
+
|
| 170 |
+
|
| 171 |
+
/* --- Function used for testing ---------------------------------- */
|
| 172 |
+
|
| 173 |
+
PyAPI_FUNC(PyObject*) _Py_GetConfigsAsDict(void);
|
| 174 |
+
|
| 175 |
+
#ifdef __cplusplus
|
| 176 |
+
}
|
| 177 |
+
#endif
|
| 178 |
+
#endif /* !Py_INTERNAL_CORECONFIG_H */
|