| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,288 @@ | ||
| /* | ||
| * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
|
|
||
|
|
||
| /* | ||
| * Header for dynamic hash table routines Author - Eric Young | ||
| */ | ||
|
|
||
| #ifndef OPENSSL_LHASH_H | ||
| # define OPENSSL_LHASH_H | ||
| # pragma once | ||
|
|
||
| # include <openssl/macros.h> | ||
| # ifndef OPENSSL_NO_DEPRECATED_3_0 | ||
| # define HEADER_LHASH_H | ||
| # endif | ||
|
|
||
| # include <openssl/e_os2.h> | ||
| # include <openssl/bio.h> | ||
|
|
||
| #ifdef __cplusplus | ||
| extern "C" { | ||
| #endif | ||
|
|
||
| typedef struct lhash_node_st OPENSSL_LH_NODE; | ||
| typedef int (*OPENSSL_LH_COMPFUNC) (const void *, const void *); | ||
| typedef unsigned long (*OPENSSL_LH_HASHFUNC) (const void *); | ||
| typedef void (*OPENSSL_LH_DOALL_FUNC) (void *); | ||
| typedef void (*OPENSSL_LH_DOALL_FUNCARG) (void *, void *); | ||
| typedef struct lhash_st OPENSSL_LHASH; | ||
|
|
||
| /* | ||
| * Macros for declaring and implementing type-safe wrappers for LHASH | ||
| * callbacks. This way, callbacks can be provided to LHASH structures without | ||
| * function pointer casting and the macro-defined callbacks provide | ||
| * per-variable casting before deferring to the underlying type-specific | ||
| * callbacks. NB: It is possible to place a "static" in front of both the | ||
| * DECLARE and IMPLEMENT macros if the functions are strictly internal. | ||
| */ | ||
|
|
||
| /* First: "hash" functions */ | ||
| # define DECLARE_LHASH_HASH_FN(name, o_type) \ | ||
| unsigned long name##_LHASH_HASH(const void *); | ||
| # define IMPLEMENT_LHASH_HASH_FN(name, o_type) \ | ||
| unsigned long name##_LHASH_HASH(const void *arg) { \ | ||
| const o_type *a = arg; \ | ||
| return name##_hash(a); } | ||
| # define LHASH_HASH_FN(name) name##_LHASH_HASH | ||
|
|
||
| /* Second: "compare" functions */ | ||
| # define DECLARE_LHASH_COMP_FN(name, o_type) \ | ||
| int name##_LHASH_COMP(const void *, const void *); | ||
| # define IMPLEMENT_LHASH_COMP_FN(name, o_type) \ | ||
| int name##_LHASH_COMP(const void *arg1, const void *arg2) { \ | ||
| const o_type *a = arg1; \ | ||
| const o_type *b = arg2; \ | ||
| return name##_cmp(a,b); } | ||
| # define LHASH_COMP_FN(name) name##_LHASH_COMP | ||
|
|
||
| /* Fourth: "doall_arg" functions */ | ||
| # define DECLARE_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ | ||
| void name##_LHASH_DOALL_ARG(void *, void *); | ||
| # define IMPLEMENT_LHASH_DOALL_ARG_FN(name, o_type, a_type) \ | ||
| void name##_LHASH_DOALL_ARG(void *arg1, void *arg2) { \ | ||
| o_type *a = arg1; \ | ||
| a_type *b = arg2; \ | ||
| name##_doall_arg(a, b); } | ||
| # define LHASH_DOALL_ARG_FN(name) name##_LHASH_DOALL_ARG | ||
|
|
||
|
|
||
| # define LH_LOAD_MULT 256 | ||
|
|
||
| int OPENSSL_LH_error(OPENSSL_LHASH *lh); | ||
| OPENSSL_LHASH *OPENSSL_LH_new(OPENSSL_LH_HASHFUNC h, OPENSSL_LH_COMPFUNC c); | ||
| void OPENSSL_LH_free(OPENSSL_LHASH *lh); | ||
| void OPENSSL_LH_flush(OPENSSL_LHASH *lh); | ||
| void *OPENSSL_LH_insert(OPENSSL_LHASH *lh, void *data); | ||
| void *OPENSSL_LH_delete(OPENSSL_LHASH *lh, const void *data); | ||
| void *OPENSSL_LH_retrieve(OPENSSL_LHASH *lh, const void *data); | ||
| void OPENSSL_LH_doall(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNC func); | ||
| void OPENSSL_LH_doall_arg(OPENSSL_LHASH *lh, OPENSSL_LH_DOALL_FUNCARG func, void *arg); | ||
| unsigned long OPENSSL_LH_strhash(const char *c); | ||
| unsigned long OPENSSL_LH_num_items(const OPENSSL_LHASH *lh); | ||
| unsigned long OPENSSL_LH_get_down_load(const OPENSSL_LHASH *lh); | ||
| void OPENSSL_LH_set_down_load(OPENSSL_LHASH *lh, unsigned long down_load); | ||
|
|
||
| # ifndef OPENSSL_NO_STDIO | ||
| void OPENSSL_LH_stats(const OPENSSL_LHASH *lh, FILE *fp); | ||
| void OPENSSL_LH_node_stats(const OPENSSL_LHASH *lh, FILE *fp); | ||
| void OPENSSL_LH_node_usage_stats(const OPENSSL_LHASH *lh, FILE *fp); | ||
| # endif | ||
| void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out); | ||
| void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out); | ||
| void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out); | ||
|
|
||
| # ifndef OPENSSL_NO_DEPRECATED_1_1_0 | ||
| # define _LHASH OPENSSL_LHASH | ||
| # define LHASH_NODE OPENSSL_LH_NODE | ||
| # define lh_error OPENSSL_LH_error | ||
| # define lh_new OPENSSL_LH_new | ||
| # define lh_free OPENSSL_LH_free | ||
| # define lh_insert OPENSSL_LH_insert | ||
| # define lh_delete OPENSSL_LH_delete | ||
| # define lh_retrieve OPENSSL_LH_retrieve | ||
| # define lh_doall OPENSSL_LH_doall | ||
| # define lh_doall_arg OPENSSL_LH_doall_arg | ||
| # define lh_strhash OPENSSL_LH_strhash | ||
| # define lh_num_items OPENSSL_LH_num_items | ||
| # ifndef OPENSSL_NO_STDIO | ||
| # define lh_stats OPENSSL_LH_stats | ||
| # define lh_node_stats OPENSSL_LH_node_stats | ||
| # define lh_node_usage_stats OPENSSL_LH_node_usage_stats | ||
| # endif | ||
| # define lh_stats_bio OPENSSL_LH_stats_bio | ||
| # define lh_node_stats_bio OPENSSL_LH_node_stats_bio | ||
| # define lh_node_usage_stats_bio OPENSSL_LH_node_usage_stats_bio | ||
| # endif | ||
|
|
||
| /* Type checking... */ | ||
|
|
||
| # define LHASH_OF(type) struct lhash_st_##type | ||
|
|
||
| /* Helper macro for internal use */ | ||
| # define DEFINE_LHASH_OF_INTERNAL(type) \ | ||
| LHASH_OF(type) { union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; }; \ | ||
| typedef int (*lh_##type##_compfunc)(const type *a, const type *b); \ | ||
| typedef unsigned long (*lh_##type##_hashfunc)(const type *a); \ | ||
| typedef void (*lh_##type##_doallfunc)(type *a); \ | ||
| static ossl_unused ossl_inline type *ossl_check_##type##_lh_plain_type(type *ptr) \ | ||
| { \ | ||
| return ptr; \ | ||
| } \ | ||
| static ossl_unused ossl_inline const type *ossl_check_const_##type##_lh_plain_type(const type *ptr) \ | ||
| { \ | ||
| return ptr; \ | ||
| } \ | ||
| static ossl_unused ossl_inline const OPENSSL_LHASH *ossl_check_const_##type##_lh_type(const LHASH_OF(type) *lh) \ | ||
| { \ | ||
| return (const OPENSSL_LHASH *)lh; \ | ||
| } \ | ||
| static ossl_unused ossl_inline OPENSSL_LHASH *ossl_check_##type##_lh_type(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| return (OPENSSL_LHASH *)lh; \ | ||
| } \ | ||
| static ossl_unused ossl_inline OPENSSL_LH_COMPFUNC ossl_check_##type##_lh_compfunc_type(lh_##type##_compfunc cmp) \ | ||
| { \ | ||
| return (OPENSSL_LH_COMPFUNC)cmp; \ | ||
| } \ | ||
| static ossl_unused ossl_inline OPENSSL_LH_HASHFUNC ossl_check_##type##_lh_hashfunc_type(lh_##type##_hashfunc hfn) \ | ||
| { \ | ||
| return (OPENSSL_LH_HASHFUNC)hfn; \ | ||
| } \ | ||
| static ossl_unused ossl_inline OPENSSL_LH_DOALL_FUNC ossl_check_##type##_lh_doallfunc_type(lh_##type##_doallfunc dfn) \ | ||
| { \ | ||
| return (OPENSSL_LH_DOALL_FUNC)dfn; \ | ||
| } \ | ||
| LHASH_OF(type) | ||
|
|
||
| # define DEFINE_LHASH_OF(type) \ | ||
| LHASH_OF(type) { union lh_##type##_dummy { void* d1; unsigned long d2; int d3; } dummy; }; \ | ||
| static ossl_unused ossl_inline LHASH_OF(type) *lh_##type##_new(unsigned long (*hfn)(const type *), \ | ||
| int (*cfn)(const type *, const type *)) \ | ||
| { \ | ||
| return (LHASH_OF(type) *) \ | ||
| OPENSSL_LH_new((OPENSSL_LH_HASHFUNC)hfn, (OPENSSL_LH_COMPFUNC)cfn); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_free(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| OPENSSL_LH_free((OPENSSL_LHASH *)lh); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_flush(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| OPENSSL_LH_flush((OPENSSL_LHASH *)lh); \ | ||
| } \ | ||
| static ossl_unused ossl_inline type *lh_##type##_insert(LHASH_OF(type) *lh, type *d) \ | ||
| { \ | ||
| return (type *)OPENSSL_LH_insert((OPENSSL_LHASH *)lh, d); \ | ||
| } \ | ||
| static ossl_unused ossl_inline type *lh_##type##_delete(LHASH_OF(type) *lh, const type *d) \ | ||
| { \ | ||
| return (type *)OPENSSL_LH_delete((OPENSSL_LHASH *)lh, d); \ | ||
| } \ | ||
| static ossl_unused ossl_inline type *lh_##type##_retrieve(LHASH_OF(type) *lh, const type *d) \ | ||
| { \ | ||
| return (type *)OPENSSL_LH_retrieve((OPENSSL_LHASH *)lh, d); \ | ||
| } \ | ||
| static ossl_unused ossl_inline int lh_##type##_error(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| return OPENSSL_LH_error((OPENSSL_LHASH *)lh); \ | ||
| } \ | ||
| static ossl_unused ossl_inline unsigned long lh_##type##_num_items(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| return OPENSSL_LH_num_items((OPENSSL_LHASH *)lh); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_node_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ | ||
| { \ | ||
| OPENSSL_LH_node_stats_bio((const OPENSSL_LHASH *)lh, out); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_node_usage_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ | ||
| { \ | ||
| OPENSSL_LH_node_usage_stats_bio((const OPENSSL_LHASH *)lh, out); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_stats_bio(const LHASH_OF(type) *lh, BIO *out) \ | ||
| { \ | ||
| OPENSSL_LH_stats_bio((const OPENSSL_LHASH *)lh, out); \ | ||
| } \ | ||
| static ossl_unused ossl_inline unsigned long lh_##type##_get_down_load(LHASH_OF(type) *lh) \ | ||
| { \ | ||
| return OPENSSL_LH_get_down_load((OPENSSL_LHASH *)lh); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_set_down_load(LHASH_OF(type) *lh, unsigned long dl) \ | ||
| { \ | ||
| OPENSSL_LH_set_down_load((OPENSSL_LHASH *)lh, dl); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_doall(LHASH_OF(type) *lh, \ | ||
| void (*doall)(type *)) \ | ||
| { \ | ||
| OPENSSL_LH_doall((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNC)doall); \ | ||
| } \ | ||
| static ossl_unused ossl_inline void lh_##type##_doall_arg(LHASH_OF(type) *lh, \ | ||
| void (*doallarg)(type *, void *), \ | ||
| void *arg) \ | ||
| { \ | ||
| OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, \ | ||
| (OPENSSL_LH_DOALL_FUNCARG)doallarg, arg); \ | ||
| } \ | ||
| LHASH_OF(type) | ||
|
|
||
| #define IMPLEMENT_LHASH_DOALL_ARG_CONST(type, argtype) \ | ||
| int_implement_lhash_doall(type, argtype, const type) | ||
|
|
||
| #define IMPLEMENT_LHASH_DOALL_ARG(type, argtype) \ | ||
| int_implement_lhash_doall(type, argtype, type) | ||
|
|
||
| #define int_implement_lhash_doall(type, argtype, cbargtype) \ | ||
| static ossl_unused ossl_inline void \ | ||
| lh_##type##_doall_##argtype(LHASH_OF(type) *lh, \ | ||
| void (*fn)(cbargtype *, argtype *), \ | ||
| argtype *arg) \ | ||
| { \ | ||
| OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); \ | ||
| } \ | ||
| LHASH_OF(type) | ||
|
|
||
| DEFINE_LHASH_OF_INTERNAL(OPENSSL_STRING); | ||
| #define lh_OPENSSL_STRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_STRING) *)OPENSSL_LH_new(ossl_check_OPENSSL_STRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_STRING_lh_compfunc_type(cmp))) | ||
| #define lh_OPENSSL_STRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_STRING_lh_type(lh)) | ||
| #define lh_OPENSSL_STRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_STRING_lh_type(lh)) | ||
| #define lh_OPENSSL_STRING_insert(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_STRING_delete(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_STRING_retrieve(lh, ptr) ((OPENSSL_STRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_const_OPENSSL_STRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_STRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_STRING_lh_type(lh)) | ||
| #define lh_OPENSSL_STRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_STRING_lh_type(lh)) | ||
| #define lh_OPENSSL_STRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_STRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_STRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_STRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_STRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_STRING_lh_type(lh)) | ||
| #define lh_OPENSSL_STRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_STRING_lh_type(lh), dl) | ||
| #define lh_OPENSSL_STRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_STRING_lh_type(lh), ossl_check_OPENSSL_STRING_lh_doallfunc_type(dfn)) | ||
| DEFINE_LHASH_OF_INTERNAL(OPENSSL_CSTRING); | ||
| #define lh_OPENSSL_CSTRING_new(hfn, cmp) ((LHASH_OF(OPENSSL_CSTRING) *)OPENSSL_LH_new(ossl_check_OPENSSL_CSTRING_lh_hashfunc_type(hfn), ossl_check_OPENSSL_CSTRING_lh_compfunc_type(cmp))) | ||
| #define lh_OPENSSL_CSTRING_free(lh) OPENSSL_LH_free(ossl_check_OPENSSL_CSTRING_lh_type(lh)) | ||
| #define lh_OPENSSL_CSTRING_flush(lh) OPENSSL_LH_flush(ossl_check_OPENSSL_CSTRING_lh_type(lh)) | ||
| #define lh_OPENSSL_CSTRING_insert(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_insert(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_CSTRING_delete(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_delete(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_CSTRING_retrieve(lh, ptr) ((OPENSSL_CSTRING *)OPENSSL_LH_retrieve(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_const_OPENSSL_CSTRING_lh_plain_type(ptr))) | ||
| #define lh_OPENSSL_CSTRING_error(lh) OPENSSL_LH_error(ossl_check_OPENSSL_CSTRING_lh_type(lh)) | ||
| #define lh_OPENSSL_CSTRING_num_items(lh) OPENSSL_LH_num_items(ossl_check_OPENSSL_CSTRING_lh_type(lh)) | ||
| #define lh_OPENSSL_CSTRING_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_CSTRING_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_CSTRING_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_OPENSSL_CSTRING_lh_type(lh), out) | ||
| #define lh_OPENSSL_CSTRING_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh)) | ||
| #define lh_OPENSSL_CSTRING_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_OPENSSL_CSTRING_lh_type(lh), dl) | ||
| #define lh_OPENSSL_CSTRING_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_OPENSSL_CSTRING_lh_type(lh), ossl_check_OPENSSL_CSTRING_lh_doallfunc_type(dfn)) | ||
|
|
||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
| #endif | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from include/openssl/opensslv.h.in | ||
| * | ||
| * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #ifndef OPENSSL_OPENSSLV_H | ||
| # define OPENSSL_OPENSSLV_H | ||
| # pragma once | ||
|
|
||
| # ifdef __cplusplus | ||
| extern "C" { | ||
| # endif | ||
|
|
||
| /* | ||
| * SECTION 1: VERSION DATA. These will change for each release | ||
| */ | ||
|
|
||
| /* | ||
| * Base version macros | ||
| * | ||
| * These macros express version number MAJOR.MINOR.PATCH exactly | ||
| */ | ||
| # define OPENSSL_VERSION_MAJOR 3 | ||
| # define OPENSSL_VERSION_MINOR 0 | ||
| # define OPENSSL_VERSION_PATCH 0 | ||
|
|
||
| /* | ||
| * Additional version information | ||
| * | ||
| * These are also part of the new version scheme, but aren't part | ||
| * of the version number itself. | ||
| */ | ||
|
|
||
| /* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */ | ||
| # define OPENSSL_VERSION_PRE_RELEASE "" | ||
| /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */ | ||
| /* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */ | ||
| # define OPENSSL_VERSION_BUILD_METADATA "+quic" | ||
|
|
||
| /* | ||
| * Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA | ||
| * to be anything but the empty string. Its use is entirely reserved for | ||
| * others | ||
| */ | ||
|
|
||
| /* | ||
| * Shared library version | ||
| * | ||
| * This is strictly to express ABI version, which may or may not | ||
| * be related to the API version expressed with the macros above. | ||
| * This is defined in free form. | ||
| */ | ||
| # define OPENSSL_SHLIB_VERSION 81.3 | ||
|
|
||
| /* | ||
| * SECTION 2: USEFUL MACROS | ||
| */ | ||
|
|
||
| /* For checking general API compatibility when preprocessing */ | ||
| # define OPENSSL_VERSION_PREREQ(maj,min) \ | ||
| ((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min)) | ||
|
|
||
| /* | ||
| * Macros to get the version in easily digested string form, both the short | ||
| * "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced | ||
| * with the values from the corresponding OPENSSL_VERSION_ macros) and the | ||
| * longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and | ||
| * OPENSSL_VERSION_BUILD_METADATA_STR appended. | ||
| */ | ||
| # define OPENSSL_VERSION_STR "3.0.0" | ||
| # define OPENSSL_FULL_VERSION_STR "3.0.0+quic" | ||
|
|
||
| /* | ||
| * SECTION 3: ADDITIONAL METADATA | ||
| * | ||
| * These strings are defined separately to allow them to be parsable. | ||
| */ | ||
| # define OPENSSL_RELEASE_DATE "7 sep 2021" | ||
|
|
||
| /* | ||
| * SECTION 4: BACKWARD COMPATIBILITY | ||
| */ | ||
|
|
||
| # define OPENSSL_VERSION_TEXT "OpenSSL 3.0.0+quic 7 sep 2021" | ||
|
|
||
| /* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */ | ||
| # ifdef OPENSSL_VERSION_PRE_RELEASE | ||
| # define _OPENSSL_VERSION_PRE_RELEASE 0x0L | ||
| # else | ||
| # define _OPENSSL_VERSION_PRE_RELEASE 0xfL | ||
| # endif | ||
| # define OPENSSL_VERSION_NUMBER \ | ||
| ( (OPENSSL_VERSION_MAJOR<<28) \ | ||
| |(OPENSSL_VERSION_MINOR<<20) \ | ||
| |(OPENSSL_VERSION_PATCH<<4) \ | ||
| |_OPENSSL_VERSION_PRE_RELEASE ) | ||
|
|
||
| # ifdef __cplusplus | ||
| } | ||
| # endif | ||
|
|
||
| # include <openssl/macros.h> | ||
| # ifndef OPENSSL_NO_DEPRECATED_3_0 | ||
| # define HEADER_OPENSSLV_H | ||
| # endif | ||
|
|
||
| #endif /* OPENSSL_OPENSSLV_H */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,285 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from include/openssl/srp.h.in | ||
| * | ||
| * Copyright 2004-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * Copyright (c) 2004, EdelKey Project. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| * | ||
| * Originally written by Christophe Renou and Peter Sylvester, | ||
| * for the EdelKey project. | ||
| */ | ||
|
|
||
|
|
||
|
|
||
| #ifndef OPENSSL_SRP_H | ||
| # define OPENSSL_SRP_H | ||
| # pragma once | ||
|
|
||
| # include <openssl/macros.h> | ||
| # ifndef OPENSSL_NO_DEPRECATED_3_0 | ||
| # define HEADER_SRP_H | ||
| # endif | ||
|
|
||
| #include <openssl/opensslconf.h> | ||
|
|
||
| #ifndef OPENSSL_NO_SRP | ||
| # include <stdio.h> | ||
| # include <string.h> | ||
| # include <openssl/safestack.h> | ||
| # include <openssl/bn.h> | ||
| # include <openssl/crypto.h> | ||
|
|
||
| # ifdef __cplusplus | ||
| extern "C" { | ||
| # endif | ||
|
|
||
| # ifndef OPENSSL_NO_DEPRECATED_3_0 | ||
|
|
||
| typedef struct SRP_gN_cache_st { | ||
| char *b64_bn; | ||
| BIGNUM *bn; | ||
| } SRP_gN_cache; | ||
| SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN_cache, SRP_gN_cache, SRP_gN_cache) | ||
| #define sk_SRP_gN_cache_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_cache_sk_type(sk)) | ||
| #define sk_SRP_gN_cache_value(sk, idx) ((SRP_gN_cache *)OPENSSL_sk_value(ossl_check_const_SRP_gN_cache_sk_type(sk), (idx))) | ||
| #define sk_SRP_gN_cache_new(cmp) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new(ossl_check_SRP_gN_cache_compfunc_type(cmp))) | ||
| #define sk_SRP_gN_cache_new_null() ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_null()) | ||
| #define sk_SRP_gN_cache_new_reserve(cmp, n) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_cache_compfunc_type(cmp), (n))) | ||
| #define sk_SRP_gN_cache_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_cache_sk_type(sk), (n)) | ||
| #define sk_SRP_gN_cache_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_cache_sk_type(sk)) | ||
| #define sk_SRP_gN_cache_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_cache_sk_type(sk)) | ||
| #define sk_SRP_gN_cache_delete(sk, i) ((SRP_gN_cache *)OPENSSL_sk_delete(ossl_check_SRP_gN_cache_sk_type(sk), (i))) | ||
| #define sk_SRP_gN_cache_delete_ptr(sk, ptr) ((SRP_gN_cache *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr))) | ||
| #define sk_SRP_gN_cache_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) | ||
| #define sk_SRP_gN_cache_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) | ||
| #define sk_SRP_gN_cache_pop(sk) ((SRP_gN_cache *)OPENSSL_sk_pop(ossl_check_SRP_gN_cache_sk_type(sk))) | ||
| #define sk_SRP_gN_cache_shift(sk) ((SRP_gN_cache *)OPENSSL_sk_shift(ossl_check_SRP_gN_cache_sk_type(sk))) | ||
| #define sk_SRP_gN_cache_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_cache_sk_type(sk),ossl_check_SRP_gN_cache_freefunc_type(freefunc)) | ||
| #define sk_SRP_gN_cache_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), (idx)) | ||
| #define sk_SRP_gN_cache_set(sk, idx, ptr) ((SRP_gN_cache *)OPENSSL_sk_set(ossl_check_SRP_gN_cache_sk_type(sk), (idx), ossl_check_SRP_gN_cache_type(ptr))) | ||
| #define sk_SRP_gN_cache_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) | ||
| #define sk_SRP_gN_cache_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr)) | ||
| #define sk_SRP_gN_cache_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_type(ptr), pnum) | ||
| #define sk_SRP_gN_cache_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_cache_sk_type(sk)) | ||
| #define sk_SRP_gN_cache_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_cache_sk_type(sk)) | ||
| #define sk_SRP_gN_cache_dup(sk) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_cache_sk_type(sk))) | ||
| #define sk_SRP_gN_cache_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN_cache) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_copyfunc_type(copyfunc), ossl_check_SRP_gN_cache_freefunc_type(freefunc))) | ||
| #define sk_SRP_gN_cache_set_cmp_func(sk, cmp) ((sk_SRP_gN_cache_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_cache_sk_type(sk), ossl_check_SRP_gN_cache_compfunc_type(cmp))) | ||
|
|
||
|
|
||
|
|
||
| typedef struct SRP_user_pwd_st { | ||
| /* Owned by us. */ | ||
| char *id; | ||
| BIGNUM *s; | ||
| BIGNUM *v; | ||
| /* Not owned by us. */ | ||
| const BIGNUM *g; | ||
| const BIGNUM *N; | ||
| /* Owned by us. */ | ||
| char *info; | ||
| } SRP_user_pwd; | ||
| SKM_DEFINE_STACK_OF_INTERNAL(SRP_user_pwd, SRP_user_pwd, SRP_user_pwd) | ||
| #define sk_SRP_user_pwd_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_user_pwd_sk_type(sk)) | ||
| #define sk_SRP_user_pwd_value(sk, idx) ((SRP_user_pwd *)OPENSSL_sk_value(ossl_check_const_SRP_user_pwd_sk_type(sk), (idx))) | ||
| #define sk_SRP_user_pwd_new(cmp) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new(ossl_check_SRP_user_pwd_compfunc_type(cmp))) | ||
| #define sk_SRP_user_pwd_new_null() ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_null()) | ||
| #define sk_SRP_user_pwd_new_reserve(cmp, n) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_new_reserve(ossl_check_SRP_user_pwd_compfunc_type(cmp), (n))) | ||
| #define sk_SRP_user_pwd_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_user_pwd_sk_type(sk), (n)) | ||
| #define sk_SRP_user_pwd_free(sk) OPENSSL_sk_free(ossl_check_SRP_user_pwd_sk_type(sk)) | ||
| #define sk_SRP_user_pwd_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_user_pwd_sk_type(sk)) | ||
| #define sk_SRP_user_pwd_delete(sk, i) ((SRP_user_pwd *)OPENSSL_sk_delete(ossl_check_SRP_user_pwd_sk_type(sk), (i))) | ||
| #define sk_SRP_user_pwd_delete_ptr(sk, ptr) ((SRP_user_pwd *)OPENSSL_sk_delete_ptr(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr))) | ||
| #define sk_SRP_user_pwd_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) | ||
| #define sk_SRP_user_pwd_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) | ||
| #define sk_SRP_user_pwd_pop(sk) ((SRP_user_pwd *)OPENSSL_sk_pop(ossl_check_SRP_user_pwd_sk_type(sk))) | ||
| #define sk_SRP_user_pwd_shift(sk) ((SRP_user_pwd *)OPENSSL_sk_shift(ossl_check_SRP_user_pwd_sk_type(sk))) | ||
| #define sk_SRP_user_pwd_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_user_pwd_sk_type(sk),ossl_check_SRP_user_pwd_freefunc_type(freefunc)) | ||
| #define sk_SRP_user_pwd_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), (idx)) | ||
| #define sk_SRP_user_pwd_set(sk, idx, ptr) ((SRP_user_pwd *)OPENSSL_sk_set(ossl_check_SRP_user_pwd_sk_type(sk), (idx), ossl_check_SRP_user_pwd_type(ptr))) | ||
| #define sk_SRP_user_pwd_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) | ||
| #define sk_SRP_user_pwd_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr)) | ||
| #define sk_SRP_user_pwd_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_type(ptr), pnum) | ||
| #define sk_SRP_user_pwd_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_user_pwd_sk_type(sk)) | ||
| #define sk_SRP_user_pwd_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_user_pwd_sk_type(sk)) | ||
| #define sk_SRP_user_pwd_dup(sk) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_dup(ossl_check_const_SRP_user_pwd_sk_type(sk))) | ||
| #define sk_SRP_user_pwd_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_user_pwd) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_copyfunc_type(copyfunc), ossl_check_SRP_user_pwd_freefunc_type(freefunc))) | ||
| #define sk_SRP_user_pwd_set_cmp_func(sk, cmp) ((sk_SRP_user_pwd_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_user_pwd_sk_type(sk), ossl_check_SRP_user_pwd_compfunc_type(cmp))) | ||
|
|
||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| SRP_user_pwd *SRP_user_pwd_new(void); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| void SRP_user_pwd_free(SRP_user_pwd *user_pwd); | ||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| void SRP_user_pwd_set_gN(SRP_user_pwd *user_pwd, const BIGNUM *g, | ||
| const BIGNUM *N); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_user_pwd_set1_ids(SRP_user_pwd *user_pwd, const char *id, | ||
| const char *info); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_user_pwd_set0_sv(SRP_user_pwd *user_pwd, BIGNUM *s, BIGNUM *v); | ||
|
|
||
| typedef struct SRP_VBASE_st { | ||
| STACK_OF(SRP_user_pwd) *users_pwd; | ||
| STACK_OF(SRP_gN_cache) *gN_cache; | ||
| /* to simulate a user */ | ||
| char *seed_key; | ||
| const BIGNUM *default_g; | ||
| const BIGNUM *default_N; | ||
| } SRP_VBASE; | ||
|
|
||
| /* | ||
| * Internal structure storing N and g pair | ||
| */ | ||
| typedef struct SRP_gN_st { | ||
| char *id; | ||
| const BIGNUM *g; | ||
| const BIGNUM *N; | ||
| } SRP_gN; | ||
| SKM_DEFINE_STACK_OF_INTERNAL(SRP_gN, SRP_gN, SRP_gN) | ||
| #define sk_SRP_gN_num(sk) OPENSSL_sk_num(ossl_check_const_SRP_gN_sk_type(sk)) | ||
| #define sk_SRP_gN_value(sk, idx) ((SRP_gN *)OPENSSL_sk_value(ossl_check_const_SRP_gN_sk_type(sk), (idx))) | ||
| #define sk_SRP_gN_new(cmp) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new(ossl_check_SRP_gN_compfunc_type(cmp))) | ||
| #define sk_SRP_gN_new_null() ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_null()) | ||
| #define sk_SRP_gN_new_reserve(cmp, n) ((STACK_OF(SRP_gN) *)OPENSSL_sk_new_reserve(ossl_check_SRP_gN_compfunc_type(cmp), (n))) | ||
| #define sk_SRP_gN_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SRP_gN_sk_type(sk), (n)) | ||
| #define sk_SRP_gN_free(sk) OPENSSL_sk_free(ossl_check_SRP_gN_sk_type(sk)) | ||
| #define sk_SRP_gN_zero(sk) OPENSSL_sk_zero(ossl_check_SRP_gN_sk_type(sk)) | ||
| #define sk_SRP_gN_delete(sk, i) ((SRP_gN *)OPENSSL_sk_delete(ossl_check_SRP_gN_sk_type(sk), (i))) | ||
| #define sk_SRP_gN_delete_ptr(sk, ptr) ((SRP_gN *)OPENSSL_sk_delete_ptr(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr))) | ||
| #define sk_SRP_gN_push(sk, ptr) OPENSSL_sk_push(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) | ||
| #define sk_SRP_gN_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) | ||
| #define sk_SRP_gN_pop(sk) ((SRP_gN *)OPENSSL_sk_pop(ossl_check_SRP_gN_sk_type(sk))) | ||
| #define sk_SRP_gN_shift(sk) ((SRP_gN *)OPENSSL_sk_shift(ossl_check_SRP_gN_sk_type(sk))) | ||
| #define sk_SRP_gN_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SRP_gN_sk_type(sk),ossl_check_SRP_gN_freefunc_type(freefunc)) | ||
| #define sk_SRP_gN_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), (idx)) | ||
| #define sk_SRP_gN_set(sk, idx, ptr) ((SRP_gN *)OPENSSL_sk_set(ossl_check_SRP_gN_sk_type(sk), (idx), ossl_check_SRP_gN_type(ptr))) | ||
| #define sk_SRP_gN_find(sk, ptr) OPENSSL_sk_find(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) | ||
| #define sk_SRP_gN_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr)) | ||
| #define sk_SRP_gN_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_type(ptr), pnum) | ||
| #define sk_SRP_gN_sort(sk) OPENSSL_sk_sort(ossl_check_SRP_gN_sk_type(sk)) | ||
| #define sk_SRP_gN_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SRP_gN_sk_type(sk)) | ||
| #define sk_SRP_gN_dup(sk) ((STACK_OF(SRP_gN) *)OPENSSL_sk_dup(ossl_check_const_SRP_gN_sk_type(sk))) | ||
| #define sk_SRP_gN_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SRP_gN) *)OPENSSL_sk_deep_copy(ossl_check_const_SRP_gN_sk_type(sk), ossl_check_SRP_gN_copyfunc_type(copyfunc), ossl_check_SRP_gN_freefunc_type(freefunc))) | ||
| #define sk_SRP_gN_set_cmp_func(sk, cmp) ((sk_SRP_gN_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SRP_gN_sk_type(sk), ossl_check_SRP_gN_compfunc_type(cmp))) | ||
|
|
||
|
|
||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| SRP_VBASE *SRP_VBASE_new(char *seed_key); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| void SRP_VBASE_free(SRP_VBASE *vb); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_VBASE_init(SRP_VBASE *vb, char *verifier_file); | ||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_VBASE_add0_user(SRP_VBASE *vb, SRP_user_pwd *user_pwd); | ||
|
|
||
| /* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/ | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username); | ||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt, | ||
| char **verifier, const char *N, const char *g, | ||
| OSSL_LIB_CTX *libctx, const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| char *SRP_create_verifier(const char *user, const char *pass, char **salt, | ||
| char **verifier, const char *N, const char *g); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt, | ||
| BIGNUM **verifier, const BIGNUM *N, | ||
| const BIGNUM *g, OSSL_LIB_CTX *libctx, | ||
| const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt, | ||
| BIGNUM **verifier, const BIGNUM *N, | ||
| const BIGNUM *g); | ||
|
|
||
| # define SRP_NO_ERROR 0 | ||
| # define SRP_ERR_VBASE_INCOMPLETE_FILE 1 | ||
| # define SRP_ERR_VBASE_BN_LIB 2 | ||
| # define SRP_ERR_OPEN_FILE 3 | ||
| # define SRP_ERR_MEMORY 4 | ||
|
|
||
| # define DB_srptype 0 | ||
| # define DB_srpverifier 1 | ||
| # define DB_srpsalt 2 | ||
| # define DB_srpid 3 | ||
| # define DB_srpgN 4 | ||
| # define DB_srpinfo 5 | ||
| # undef DB_NUMBER | ||
| # define DB_NUMBER 6 | ||
|
|
||
| # define DB_SRP_INDEX 'I' | ||
| # define DB_SRP_VALID 'V' | ||
| # define DB_SRP_REVOKED 'R' | ||
| # define DB_SRP_MODIF 'v' | ||
|
|
||
| /* see srp.c */ | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| char *SRP_check_known_gN_param(const BIGNUM *g, const BIGNUM *N); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| SRP_gN *SRP_get_default_gN(const char *id); | ||
|
|
||
| /* server side .... */ | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u, | ||
| const BIGNUM *b, const BIGNUM *N); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, | ||
| const BIGNUM *v, OSSL_LIB_CTX *libctx, const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g, | ||
| const BIGNUM *v); | ||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N, | ||
| OSSL_LIB_CTX *libctx, const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N); | ||
|
|
||
| /* client side .... */ | ||
|
|
||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass, | ||
| OSSL_LIB_CTX *libctx, const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, | ||
| const BIGNUM *x, const BIGNUM *a, const BIGNUM *u, | ||
| OSSL_LIB_CTX *libctx, const char *propq); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g, | ||
| const BIGNUM *x, const BIGNUM *a, const BIGNUM *u); | ||
| OSSL_DEPRECATEDIN_3_0 | ||
| int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N); | ||
|
|
||
| # define SRP_MINIMAL_N 1024 | ||
|
|
||
| # endif /* OPENSSL_NO_DEPRECATED_3_0 */ | ||
|
|
||
| /* This method ignores the configured seed and fails for an unknown user. */ | ||
| # ifndef OPENSSL_NO_DEPRECATED_1_1_0 | ||
| OSSL_DEPRECATEDIN_1_1_0 | ||
| SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *username); | ||
| # endif | ||
|
|
||
| # ifdef __cplusplus | ||
| } | ||
| # endif | ||
| # endif | ||
|
|
||
| #endif |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_digests_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_digests.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs] = { | ||
| DER_OID_V_sigAlgs | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha1 OBJECT IDENTIFIER ::= { iso(1) | ||
| * identified-organization(3) oiw(14) | ||
| * secsig(3) algorithms(2) 26 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1] = { | ||
| DER_OID_V_id_sha1 | ||
| }; | ||
|
|
||
| /* | ||
| * id-md2 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2] = { | ||
| DER_OID_V_id_md2 | ||
| }; | ||
|
|
||
| /* | ||
| * id-md5 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5] = { | ||
| DER_OID_V_id_md5 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256] = { | ||
| DER_OID_V_id_sha256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384] = { | ||
| DER_OID_V_id_sha384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512] = { | ||
| DER_OID_V_id_sha512 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224] = { | ||
| DER_OID_V_id_sha224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224] = { | ||
| DER_OID_V_id_sha512_224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256] = { | ||
| DER_OID_V_id_sha512_256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224] = { | ||
| DER_OID_V_id_sha3_224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256] = { | ||
| DER_OID_V_id_sha3_256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384] = { | ||
| DER_OID_V_id_sha3_384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512] = { | ||
| DER_OID_V_id_sha3_512 | ||
| }; | ||
|
|
||
| /* | ||
| * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128] = { | ||
| DER_OID_V_id_shake128 | ||
| }; | ||
|
|
||
| /* | ||
| * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256] = { | ||
| DER_OID_V_id_shake256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len] = { | ||
| DER_OID_V_id_shake128_len | ||
| }; | ||
|
|
||
| /* | ||
| * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len] = { | ||
| DER_OID_V_id_shake256_len | ||
| }; | ||
|
|
||
| /* | ||
| * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} | ||
| */ | ||
| const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128] = { | ||
| DER_OID_V_id_KMACWithSHAKE128 | ||
| }; | ||
|
|
||
| /* | ||
| * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} | ||
| */ | ||
| const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256] = { | ||
| DER_OID_V_id_KMACWithSHAKE256 | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_dsa_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| /* | ||
| * DSA low level APIs are deprecated for public use, but still ok for | ||
| * internal use. | ||
| */ | ||
| #include "internal/deprecated.h" | ||
|
|
||
| #include "prov/der_dsa.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-dsa OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa] = { | ||
| DER_OID_V_id_dsa | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1] = { | ||
| DER_OID_V_id_dsa_with_sha1 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224] = { | ||
| DER_OID_V_id_dsa_with_sha224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256] = { | ||
| DER_OID_V_id_dsa_with_sha256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384] = { | ||
| DER_OID_V_id_dsa_with_sha384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512] = { | ||
| DER_OID_V_id_dsa_with_sha512 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224] = { | ||
| DER_OID_V_id_dsa_with_sha3_224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256] = { | ||
| DER_OID_V_id_dsa_with_sha3_256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384] = { | ||
| DER_OID_V_id_dsa_with_sha3_384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512] = { | ||
| DER_OID_V_id_dsa_with_sha3_512 | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,279 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_ec_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_ec.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1] = { | ||
| DER_OID_V_ecdsa_with_SHA1 | ||
| }; | ||
|
|
||
| /* | ||
| * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey] = { | ||
| DER_OID_V_id_ecPublicKey | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1] = { | ||
| DER_OID_V_c2pnb163v1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2] = { | ||
| DER_OID_V_c2pnb163v2 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3] = { | ||
| DER_OID_V_c2pnb163v3 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1] = { | ||
| DER_OID_V_c2pnb176w1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1] = { | ||
| DER_OID_V_c2tnb191v1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2] = { | ||
| DER_OID_V_c2tnb191v2 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3] = { | ||
| DER_OID_V_c2tnb191v3 | ||
| }; | ||
|
|
||
| /* | ||
| * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4] = { | ||
| DER_OID_V_c2onb191v4 | ||
| }; | ||
|
|
||
| /* | ||
| * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5] = { | ||
| DER_OID_V_c2onb191v5 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1] = { | ||
| DER_OID_V_c2pnb208w1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1] = { | ||
| DER_OID_V_c2tnb239v1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2] = { | ||
| DER_OID_V_c2tnb239v2 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3] = { | ||
| DER_OID_V_c2tnb239v3 | ||
| }; | ||
|
|
||
| /* | ||
| * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4] = { | ||
| DER_OID_V_c2onb239v4 | ||
| }; | ||
|
|
||
| /* | ||
| * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5] = { | ||
| DER_OID_V_c2onb239v5 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1] = { | ||
| DER_OID_V_c2pnb272w1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1] = { | ||
| DER_OID_V_c2pnb304w1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1] = { | ||
| DER_OID_V_c2tnb359v1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1] = { | ||
| DER_OID_V_c2pnb368w1 | ||
| }; | ||
|
|
||
| /* | ||
| * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } | ||
| */ | ||
| const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1] = { | ||
| DER_OID_V_c2tnb431r1 | ||
| }; | ||
|
|
||
| /* | ||
| * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1] = { | ||
| DER_OID_V_prime192v1 | ||
| }; | ||
|
|
||
| /* | ||
| * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2] = { | ||
| DER_OID_V_prime192v2 | ||
| }; | ||
|
|
||
| /* | ||
| * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3] = { | ||
| DER_OID_V_prime192v3 | ||
| }; | ||
|
|
||
| /* | ||
| * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1] = { | ||
| DER_OID_V_prime239v1 | ||
| }; | ||
|
|
||
| /* | ||
| * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2] = { | ||
| DER_OID_V_prime239v2 | ||
| }; | ||
|
|
||
| /* | ||
| * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3] = { | ||
| DER_OID_V_prime239v3 | ||
| }; | ||
|
|
||
| /* | ||
| * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } | ||
| */ | ||
| const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1] = { | ||
| DER_OID_V_prime256v1 | ||
| }; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224] = { | ||
| DER_OID_V_ecdsa_with_SHA224 | ||
| }; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256] = { | ||
| DER_OID_V_ecdsa_with_SHA256 | ||
| }; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384] = { | ||
| DER_OID_V_ecdsa_with_SHA384 | ||
| }; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512] = { | ||
| DER_OID_V_ecdsa_with_SHA512 | ||
| }; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224] = { | ||
| DER_OID_V_id_ecdsa_with_sha3_224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256] = { | ||
| DER_OID_V_id_ecdsa_with_sha3_256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384] = { | ||
| DER_OID_V_id_ecdsa_with_sha3_384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512] = { | ||
| DER_OID_V_id_ecdsa_with_sha3_512 | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_ecx_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_ecx.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519] = { | ||
| DER_OID_V_id_X25519 | ||
| }; | ||
|
|
||
| /* | ||
| * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448] = { | ||
| DER_OID_V_id_X448 | ||
| }; | ||
|
|
||
| /* | ||
| * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519] = { | ||
| DER_OID_V_id_Ed25519 | ||
| }; | ||
|
|
||
| /* | ||
| * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448] = { | ||
| DER_OID_V_id_Ed448 | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,174 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_rsa_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_rsa.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs] = { | ||
| DER_OID_V_hashAlgs | ||
| }; | ||
|
|
||
| /* | ||
| * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } | ||
| */ | ||
| const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption] = { | ||
| DER_OID_V_rsaEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP] = { | ||
| DER_OID_V_id_RSAES_OAEP | ||
| }; | ||
|
|
||
| /* | ||
| * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified] = { | ||
| DER_OID_V_id_pSpecified | ||
| }; | ||
|
|
||
| /* | ||
| * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS] = { | ||
| DER_OID_V_id_RSASSA_PSS | ||
| }; | ||
|
|
||
| /* | ||
| * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } | ||
| */ | ||
| const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption] = { | ||
| DER_OID_V_md2WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } | ||
| */ | ||
| const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption] = { | ||
| DER_OID_V_md5WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption] = { | ||
| DER_OID_V_sha1WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption] = { | ||
| DER_OID_V_sha224WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption] = { | ||
| DER_OID_V_sha256WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption] = { | ||
| DER_OID_V_sha384WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption] = { | ||
| DER_OID_V_sha512WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption] = { | ||
| DER_OID_V_sha512_224WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption] = { | ||
| DER_OID_V_sha512_256WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1] = { | ||
| DER_OID_V_id_mgf1 | ||
| }; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224] = { | ||
| DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 | ||
| }; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256] = { | ||
| DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 | ||
| }; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384] = { | ||
| DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 | ||
| }; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512] = { | ||
| DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 | ||
| }; | ||
|
|
||
| /* | ||
| * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } | ||
| */ | ||
| const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption] = { | ||
| DER_OID_V_md4WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { | ||
| * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 | ||
| * } | ||
| */ | ||
| const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption] = { | ||
| DER_OID_V_ripemd160WithRSAEncryption | ||
| }; | ||
|
|
||
| /* | ||
| * mdc2WithRSASignature OBJECT IDENTIFIER ::= { | ||
| * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) | ||
| * } | ||
| */ | ||
| const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature] = { | ||
| DER_OID_V_mdc2WithRSASignature | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_sm2_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_sm2.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } | ||
| */ | ||
| const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3] = { | ||
| DER_OID_V_sm2_with_SM3 | ||
| }; | ||
|
|
||
| /* | ||
| * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } | ||
| */ | ||
| const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2] = { | ||
| DER_OID_V_curveSM2 | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/der/der_wrap_gen.c.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "prov/der_wrap.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 | ||
| * } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap] = { | ||
| DER_OID_V_id_alg_CMS3DESwrap | ||
| }; | ||
|
|
||
| /* | ||
| * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap] = { | ||
| DER_OID_V_id_aes128_wrap | ||
| }; | ||
|
|
||
| /* | ||
| * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap] = { | ||
| DER_OID_V_id_aes192_wrap | ||
| }; | ||
|
|
||
| /* | ||
| * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } | ||
| */ | ||
| const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap] = { | ||
| DER_OID_V_id_aes256_wrap | ||
| }; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,160 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_digests.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 } | ||
| */ | ||
| #define DER_OID_V_sigAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03 | ||
| #define DER_OID_SZ_sigAlgs 10 | ||
| extern const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs]; | ||
|
|
||
| /* | ||
| * id-sha1 OBJECT IDENTIFIER ::= { iso(1) | ||
| * identified-organization(3) oiw(14) | ||
| * secsig(3) algorithms(2) 26 } | ||
| */ | ||
| #define DER_OID_V_id_sha1 DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x1A | ||
| #define DER_OID_SZ_id_sha1 7 | ||
| extern const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1]; | ||
|
|
||
| /* | ||
| * id-md2 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 } | ||
| */ | ||
| #define DER_OID_V_id_md2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02 | ||
| #define DER_OID_SZ_id_md2 10 | ||
| extern const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2]; | ||
|
|
||
| /* | ||
| * id-md5 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 } | ||
| */ | ||
| #define DER_OID_V_id_md5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05 | ||
| #define DER_OID_SZ_id_md5 10 | ||
| extern const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5]; | ||
|
|
||
| /* | ||
| * id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 } | ||
| */ | ||
| #define DER_OID_V_id_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01 | ||
| #define DER_OID_SZ_id_sha256 11 | ||
| extern const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256]; | ||
|
|
||
| /* | ||
| * id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 } | ||
| */ | ||
| #define DER_OID_V_id_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02 | ||
| #define DER_OID_SZ_id_sha384 11 | ||
| extern const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384]; | ||
|
|
||
| /* | ||
| * id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 } | ||
| */ | ||
| #define DER_OID_V_id_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03 | ||
| #define DER_OID_SZ_id_sha512 11 | ||
| extern const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512]; | ||
|
|
||
| /* | ||
| * id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 } | ||
| */ | ||
| #define DER_OID_V_id_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04 | ||
| #define DER_OID_SZ_id_sha224 11 | ||
| extern const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224]; | ||
|
|
||
| /* | ||
| * id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 } | ||
| */ | ||
| #define DER_OID_V_id_sha512_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x05 | ||
| #define DER_OID_SZ_id_sha512_224 11 | ||
| extern const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224]; | ||
|
|
||
| /* | ||
| * id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 } | ||
| */ | ||
| #define DER_OID_V_id_sha512_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x06 | ||
| #define DER_OID_SZ_id_sha512_256 11 | ||
| extern const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256]; | ||
|
|
||
| /* | ||
| * id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 } | ||
| */ | ||
| #define DER_OID_V_id_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x07 | ||
| #define DER_OID_SZ_id_sha3_224 11 | ||
| extern const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224]; | ||
|
|
||
| /* | ||
| * id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 } | ||
| */ | ||
| #define DER_OID_V_id_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08 | ||
| #define DER_OID_SZ_id_sha3_256 11 | ||
| extern const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256]; | ||
|
|
||
| /* | ||
| * id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 } | ||
| */ | ||
| #define DER_OID_V_id_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09 | ||
| #define DER_OID_SZ_id_sha3_384 11 | ||
| extern const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384]; | ||
|
|
||
| /* | ||
| * id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 } | ||
| */ | ||
| #define DER_OID_V_id_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A | ||
| #define DER_OID_SZ_id_sha3_512 11 | ||
| extern const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512]; | ||
|
|
||
| /* | ||
| * id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 } | ||
| */ | ||
| #define DER_OID_V_id_shake128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0B | ||
| #define DER_OID_SZ_id_shake128 11 | ||
| extern const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128]; | ||
|
|
||
| /* | ||
| * id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 } | ||
| */ | ||
| #define DER_OID_V_id_shake256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0C | ||
| #define DER_OID_SZ_id_shake256 11 | ||
| extern const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256]; | ||
|
|
||
| /* | ||
| * id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 } | ||
| */ | ||
| #define DER_OID_V_id_shake128_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x11 | ||
| #define DER_OID_SZ_id_shake128_len 11 | ||
| extern const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len]; | ||
|
|
||
| /* | ||
| * id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 } | ||
| */ | ||
| #define DER_OID_V_id_shake256_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x12 | ||
| #define DER_OID_SZ_id_shake256_len 11 | ||
| extern const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len]; | ||
|
|
||
| /* | ||
| * id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19} | ||
| */ | ||
| #define DER_OID_V_id_KMACWithSHAKE128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x13 | ||
| #define DER_OID_SZ_id_KMACWithSHAKE128 11 | ||
| extern const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128]; | ||
|
|
||
| /* | ||
| * id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20} | ||
| */ | ||
| #define DER_OID_V_id_KMACWithSHAKE256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x14 | ||
| #define DER_OID_SZ_id_KMACWithSHAKE256 11 | ||
| extern const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256]; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_dsa.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-dsa OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 } | ||
| */ | ||
| #define DER_OID_V_id_dsa DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x01 | ||
| #define DER_OID_SZ_id_dsa 9 | ||
| extern const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha1 OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x03 | ||
| #define DER_OID_SZ_id_dsa_with_sha1 9 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x01 | ||
| #define DER_OID_SZ_id_dsa_with_sha224 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x02 | ||
| #define DER_OID_SZ_id_dsa_with_sha256 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x03 | ||
| #define DER_OID_SZ_id_dsa_with_sha384 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x04 | ||
| #define DER_OID_SZ_id_dsa_with_sha512 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x05 | ||
| #define DER_OID_SZ_id_dsa_with_sha3_224 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x06 | ||
| #define DER_OID_SZ_id_dsa_with_sha3_256 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x07 | ||
| #define DER_OID_SZ_id_dsa_with_sha3_384 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384]; | ||
|
|
||
| /* | ||
| * id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 } | ||
| */ | ||
| #define DER_OID_V_id_dsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x08 | ||
| #define DER_OID_SZ_id_dsa_with_sha3_512 11 | ||
| extern const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512]; | ||
|
|
||
|
|
||
| /* Subject Public Key Info */ | ||
| int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa); | ||
| /* Signature */ | ||
| int ossl_DER_w_algorithmIdentifier_DSA_with_MD(WPACKET *pkt, int tag, | ||
| DSA *dsa, int mdnid); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,286 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_ec.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "crypto/ec.h" | ||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 } | ||
| */ | ||
| #define DER_OID_V_ecdsa_with_SHA1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x01 | ||
| #define DER_OID_SZ_ecdsa_with_SHA1 9 | ||
| extern const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1]; | ||
|
|
||
| /* | ||
| * id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 } | ||
| */ | ||
| #define DER_OID_V_id_ecPublicKey DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01 | ||
| #define DER_OID_SZ_id_ecPublicKey 9 | ||
| extern const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey]; | ||
|
|
||
| /* | ||
| * c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 } | ||
| */ | ||
| #define DER_OID_V_c2pnb163v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x01 | ||
| #define DER_OID_SZ_c2pnb163v1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1]; | ||
|
|
||
| /* | ||
| * c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 } | ||
| */ | ||
| #define DER_OID_V_c2pnb163v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x02 | ||
| #define DER_OID_SZ_c2pnb163v2 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2]; | ||
|
|
||
| /* | ||
| * c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 } | ||
| */ | ||
| #define DER_OID_V_c2pnb163v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x03 | ||
| #define DER_OID_SZ_c2pnb163v3 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3]; | ||
|
|
||
| /* | ||
| * c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 } | ||
| */ | ||
| #define DER_OID_V_c2pnb176w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x04 | ||
| #define DER_OID_SZ_c2pnb176w1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1]; | ||
|
|
||
| /* | ||
| * c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 } | ||
| */ | ||
| #define DER_OID_V_c2tnb191v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x05 | ||
| #define DER_OID_SZ_c2tnb191v1 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1]; | ||
|
|
||
| /* | ||
| * c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 } | ||
| */ | ||
| #define DER_OID_V_c2tnb191v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x06 | ||
| #define DER_OID_SZ_c2tnb191v2 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2]; | ||
|
|
||
| /* | ||
| * c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 } | ||
| */ | ||
| #define DER_OID_V_c2tnb191v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x07 | ||
| #define DER_OID_SZ_c2tnb191v3 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3]; | ||
|
|
||
| /* | ||
| * c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 } | ||
| */ | ||
| #define DER_OID_V_c2onb191v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x08 | ||
| #define DER_OID_SZ_c2onb191v4 10 | ||
| extern const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4]; | ||
|
|
||
| /* | ||
| * c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 } | ||
| */ | ||
| #define DER_OID_V_c2onb191v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x09 | ||
| #define DER_OID_SZ_c2onb191v5 10 | ||
| extern const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5]; | ||
|
|
||
| /* | ||
| * c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 } | ||
| */ | ||
| #define DER_OID_V_c2pnb208w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0A | ||
| #define DER_OID_SZ_c2pnb208w1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1]; | ||
|
|
||
| /* | ||
| * c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 } | ||
| */ | ||
| #define DER_OID_V_c2tnb239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0B | ||
| #define DER_OID_SZ_c2tnb239v1 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1]; | ||
|
|
||
| /* | ||
| * c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 } | ||
| */ | ||
| #define DER_OID_V_c2tnb239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0C | ||
| #define DER_OID_SZ_c2tnb239v2 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2]; | ||
|
|
||
| /* | ||
| * c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 } | ||
| */ | ||
| #define DER_OID_V_c2tnb239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0D | ||
| #define DER_OID_SZ_c2tnb239v3 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3]; | ||
|
|
||
| /* | ||
| * c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 } | ||
| */ | ||
| #define DER_OID_V_c2onb239v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0E | ||
| #define DER_OID_SZ_c2onb239v4 10 | ||
| extern const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4]; | ||
|
|
||
| /* | ||
| * c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 } | ||
| */ | ||
| #define DER_OID_V_c2onb239v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0F | ||
| #define DER_OID_SZ_c2onb239v5 10 | ||
| extern const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5]; | ||
|
|
||
| /* | ||
| * c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 } | ||
| */ | ||
| #define DER_OID_V_c2pnb272w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x10 | ||
| #define DER_OID_SZ_c2pnb272w1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1]; | ||
|
|
||
| /* | ||
| * c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 } | ||
| */ | ||
| #define DER_OID_V_c2pnb304w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x11 | ||
| #define DER_OID_SZ_c2pnb304w1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1]; | ||
|
|
||
| /* | ||
| * c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 } | ||
| */ | ||
| #define DER_OID_V_c2tnb359v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x12 | ||
| #define DER_OID_SZ_c2tnb359v1 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1]; | ||
|
|
||
| /* | ||
| * c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 } | ||
| */ | ||
| #define DER_OID_V_c2pnb368w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x13 | ||
| #define DER_OID_SZ_c2pnb368w1 10 | ||
| extern const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1]; | ||
|
|
||
| /* | ||
| * c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 } | ||
| */ | ||
| #define DER_OID_V_c2tnb431r1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x14 | ||
| #define DER_OID_SZ_c2tnb431r1 10 | ||
| extern const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1]; | ||
|
|
||
| /* | ||
| * prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 } | ||
| */ | ||
| #define DER_OID_V_prime192v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x01 | ||
| #define DER_OID_SZ_prime192v1 10 | ||
| extern const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1]; | ||
|
|
||
| /* | ||
| * prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 } | ||
| */ | ||
| #define DER_OID_V_prime192v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x02 | ||
| #define DER_OID_SZ_prime192v2 10 | ||
| extern const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2]; | ||
|
|
||
| /* | ||
| * prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 } | ||
| */ | ||
| #define DER_OID_V_prime192v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x03 | ||
| #define DER_OID_SZ_prime192v3 10 | ||
| extern const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3]; | ||
|
|
||
| /* | ||
| * prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 } | ||
| */ | ||
| #define DER_OID_V_prime239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x04 | ||
| #define DER_OID_SZ_prime239v1 10 | ||
| extern const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1]; | ||
|
|
||
| /* | ||
| * prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 } | ||
| */ | ||
| #define DER_OID_V_prime239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x05 | ||
| #define DER_OID_SZ_prime239v2 10 | ||
| extern const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2]; | ||
|
|
||
| /* | ||
| * prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 } | ||
| */ | ||
| #define DER_OID_V_prime239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x06 | ||
| #define DER_OID_SZ_prime239v3 10 | ||
| extern const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3]; | ||
|
|
||
| /* | ||
| * prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 } | ||
| */ | ||
| #define DER_OID_V_prime256v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07 | ||
| #define DER_OID_SZ_prime256v1 10 | ||
| extern const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1]; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 } | ||
| */ | ||
| #define DER_OID_V_ecdsa_with_SHA224 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x01 | ||
| #define DER_OID_SZ_ecdsa_with_SHA224 10 | ||
| extern const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224]; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 } | ||
| */ | ||
| #define DER_OID_V_ecdsa_with_SHA256 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02 | ||
| #define DER_OID_SZ_ecdsa_with_SHA256 10 | ||
| extern const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256]; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 } | ||
| */ | ||
| #define DER_OID_V_ecdsa_with_SHA384 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03 | ||
| #define DER_OID_SZ_ecdsa_with_SHA384 10 | ||
| extern const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384]; | ||
|
|
||
| /* | ||
| * ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2) | ||
| * us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 } | ||
| */ | ||
| #define DER_OID_V_ecdsa_with_SHA512 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x04 | ||
| #define DER_OID_SZ_ecdsa_with_SHA512 10 | ||
| extern const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512]; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 } | ||
| */ | ||
| #define DER_OID_V_id_ecdsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x09 | ||
| #define DER_OID_SZ_id_ecdsa_with_sha3_224 11 | ||
| extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224]; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 } | ||
| */ | ||
| #define DER_OID_V_id_ecdsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0A | ||
| #define DER_OID_SZ_id_ecdsa_with_sha3_256 11 | ||
| extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256]; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 } | ||
| */ | ||
| #define DER_OID_V_id_ecdsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0B | ||
| #define DER_OID_SZ_id_ecdsa_with_sha3_384 11 | ||
| extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384]; | ||
|
|
||
| /* | ||
| * id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 } | ||
| */ | ||
| #define DER_OID_V_id_ecdsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0C | ||
| #define DER_OID_SZ_id_ecdsa_with_sha3_512 11 | ||
| extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512]; | ||
|
|
||
|
|
||
| /* Subject Public Key Info */ | ||
| int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec); | ||
| /* Signature */ | ||
| int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont, | ||
| EC_KEY *ec, int mdnid); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_ecx.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "internal/der.h" | ||
| #include "crypto/ecx.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 } | ||
| */ | ||
| #define DER_OID_V_id_X25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6E | ||
| #define DER_OID_SZ_id_X25519 5 | ||
| extern const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519]; | ||
|
|
||
| /* | ||
| * id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 } | ||
| */ | ||
| #define DER_OID_V_id_X448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6F | ||
| #define DER_OID_SZ_id_X448 5 | ||
| extern const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448]; | ||
|
|
||
| /* | ||
| * id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 } | ||
| */ | ||
| #define DER_OID_V_id_Ed25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x70 | ||
| #define DER_OID_SZ_id_Ed25519 5 | ||
| extern const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519]; | ||
|
|
||
| /* | ||
| * id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 } | ||
| */ | ||
| #define DER_OID_V_id_Ed448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x71 | ||
| #define DER_OID_SZ_id_Ed448 5 | ||
| extern const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448]; | ||
|
|
||
|
|
||
| int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec); | ||
| int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec); | ||
| int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec); | ||
| int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,187 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_rsa.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "crypto/rsa.h" | ||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 } | ||
| */ | ||
| #define DER_OID_V_hashAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02 | ||
| #define DER_OID_SZ_hashAlgs 10 | ||
| extern const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs]; | ||
|
|
||
| /* | ||
| * rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 } | ||
| */ | ||
| #define DER_OID_V_rsaEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01 | ||
| #define DER_OID_SZ_rsaEncryption 11 | ||
| extern const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption]; | ||
|
|
||
| /* | ||
| * id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 } | ||
| */ | ||
| #define DER_OID_V_id_RSAES_OAEP DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x07 | ||
| #define DER_OID_SZ_id_RSAES_OAEP 11 | ||
| extern const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP]; | ||
|
|
||
| /* | ||
| * id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 } | ||
| */ | ||
| #define DER_OID_V_id_pSpecified DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x09 | ||
| #define DER_OID_SZ_id_pSpecified 11 | ||
| extern const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified]; | ||
|
|
||
| /* | ||
| * id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 } | ||
| */ | ||
| #define DER_OID_V_id_RSASSA_PSS DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0A | ||
| #define DER_OID_SZ_id_RSASSA_PSS 11 | ||
| extern const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS]; | ||
|
|
||
| /* | ||
| * md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 } | ||
| */ | ||
| #define DER_OID_V_md2WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x02 | ||
| #define DER_OID_SZ_md2WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 } | ||
| */ | ||
| #define DER_OID_V_md5WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04 | ||
| #define DER_OID_SZ_md5WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 } | ||
| */ | ||
| #define DER_OID_V_sha1WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05 | ||
| #define DER_OID_SZ_sha1WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 } | ||
| */ | ||
| #define DER_OID_V_sha224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0E | ||
| #define DER_OID_SZ_sha224WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 } | ||
| */ | ||
| #define DER_OID_V_sha256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B | ||
| #define DER_OID_SZ_sha256WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 } | ||
| */ | ||
| #define DER_OID_V_sha384WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0C | ||
| #define DER_OID_SZ_sha384WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 } | ||
| */ | ||
| #define DER_OID_V_sha512WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0D | ||
| #define DER_OID_SZ_sha512WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 } | ||
| */ | ||
| #define DER_OID_V_sha512_224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0F | ||
| #define DER_OID_SZ_sha512_224WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 } | ||
| */ | ||
| #define DER_OID_V_sha512_256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x10 | ||
| #define DER_OID_SZ_sha512_256WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 } | ||
| */ | ||
| #define DER_OID_V_id_mgf1 DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x08 | ||
| #define DER_OID_SZ_id_mgf1 11 | ||
| extern const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1]; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 } | ||
| */ | ||
| #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0D | ||
| #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224 11 | ||
| extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_224[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224]; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 } | ||
| */ | ||
| #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0E | ||
| #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256 11 | ||
| extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_256[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256]; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 } | ||
| */ | ||
| #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0F | ||
| #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384 11 | ||
| extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_384[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384]; | ||
|
|
||
| /* | ||
| * id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 } | ||
| */ | ||
| #define DER_OID_V_id_rsassa_pkcs1_v1_5_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x10 | ||
| #define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512 11 | ||
| extern const unsigned char ossl_der_oid_id_rsassa_pkcs1_v1_5_with_sha3_512[DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512]; | ||
|
|
||
| /* | ||
| * md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 } | ||
| */ | ||
| #define DER_OID_V_md4WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x03 | ||
| #define DER_OID_SZ_md4WithRSAEncryption 11 | ||
| extern const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= { | ||
| * iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2 | ||
| * } | ||
| */ | ||
| #define DER_OID_V_ripemd160WithRSAEncryption DER_P_OBJECT, 6, 0x2B, 0x24, 0x03, 0x03, 0x01, 0x02 | ||
| #define DER_OID_SZ_ripemd160WithRSAEncryption 8 | ||
| extern const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption]; | ||
|
|
||
| /* | ||
| * mdc2WithRSASignature OBJECT IDENTIFIER ::= { | ||
| * iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14) | ||
| * } | ||
| */ | ||
| #define DER_OID_V_mdc2WithRSASignature DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x0E | ||
| #define DER_OID_SZ_mdc2WithRSASignature 7 | ||
| extern const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature]; | ||
|
|
||
|
|
||
| /* PSS parameters */ | ||
| int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag, | ||
| const RSA_PSS_PARAMS_30 *pss); | ||
| /* Subject Public Key Info */ | ||
| int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa); | ||
| int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag, | ||
| int rsa_type, | ||
| const RSA_PSS_PARAMS_30 *pss); | ||
| /* Signature */ | ||
| int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag, | ||
| int mdnid); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_sm2.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "crypto/ec.h" | ||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 } | ||
| */ | ||
| #define DER_OID_V_sm2_with_SM3 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75 | ||
| #define DER_OID_SZ_sm2_with_SM3 10 | ||
| extern const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3]; | ||
|
|
||
| /* | ||
| * curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 } | ||
| */ | ||
| #define DER_OID_V_curveSM2 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D | ||
| #define DER_OID_SZ_curveSM2 10 | ||
| extern const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2]; | ||
|
|
||
|
|
||
| /* Subject Public Key Info */ | ||
| int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec); | ||
| /* Signature */ | ||
| int ossl_DER_w_algorithmIdentifier_SM2_with_MD(WPACKET *pkt, int cont, | ||
| EC_KEY *ec, int mdnid); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| /* | ||
| * WARNING: do not edit! | ||
| * Generated by Makefile from providers/common/include/prov/der_wrap.h.in | ||
| * | ||
| * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. | ||
| * | ||
| * Licensed under the Apache License 2.0 (the "License"). You may not use | ||
| * this file except in compliance with the License. You can obtain a copy | ||
| * in the file LICENSE in the source distribution or at | ||
| * https://www.openssl.org/source/license.html | ||
| */ | ||
|
|
||
| #include "internal/der.h" | ||
|
|
||
| /* Well known OIDs precompiled */ | ||
|
|
||
| /* | ||
| * id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= { | ||
| * iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6 | ||
| * } | ||
| */ | ||
| #define DER_OID_V_id_alg_CMS3DESwrap DER_P_OBJECT, 11, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x10, 0x03, 0x06 | ||
| #define DER_OID_SZ_id_alg_CMS3DESwrap 13 | ||
| extern const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap]; | ||
|
|
||
| /* | ||
| * id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 } | ||
| */ | ||
| #define DER_OID_V_id_aes128_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x05 | ||
| #define DER_OID_SZ_id_aes128_wrap 11 | ||
| extern const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap]; | ||
|
|
||
| /* | ||
| * id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 } | ||
| */ | ||
| #define DER_OID_V_id_aes192_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x19 | ||
| #define DER_OID_SZ_id_aes192_wrap 11 | ||
| extern const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap]; | ||
|
|
||
| /* | ||
| * id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 } | ||
| */ | ||
| #define DER_OID_V_id_aes256_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x2D | ||
| #define DER_OID_SZ_id_aes256_wrap 11 | ||
| extern const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap]; | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| global: | ||
| OSSL_provider_init; | ||
| local: *; | ||
| }; |