Add files using upload-large-folder tool
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .dockerignore +21 -0
- .editorconfig +18 -0
- .gitattributes +29 -59
- .gitignore +81 -0
- .vscode/launch.json +26 -0
- 11video_r1_training_model_keys.json +842 -0
- 11video_r1_vllm_model_keys.json +661 -0
- LICENSE +201 -0
- README.md +164 -0
- all_output_reflect.jsonl +0 -0
- check_params.py +24 -0
- check_params_v2.py +22 -0
- check_structure.py +29 -0
- configs/dataset.yaml +13 -0
- configs/dataset_sft.yaml +6 -0
- configs/ddp.yaml +16 -0
- configs/zero2.yaml +21 -0
- configs/zero3.yaml +22 -0
- data.py +17 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h +29 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/crypto/bn_conf.h +29 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/crypto/dso_conf.h +19 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/asn1.h +1134 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/asn1t.h +946 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/bio.h +1022 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/comp.h +98 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ocsp.h +483 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ssl.h +0 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ui.h +407 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/progs.h +125 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_digests.h +160 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_dsa.h +94 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ec.h +286 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ecx.h +50 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ml_dsa.h +40 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_rsa.h +187 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_slh_dsa.h +103 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_sm2.h +37 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_wrap.h +46 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h +28 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/crypto/bn_conf.h +29 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/crypto/dso_conf.h +19 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/internal/param_names.h +469 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/asn1.h +1134 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/asn1t.h +946 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/bio.h +1022 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/cmp.h +727 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/cms.h +511 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/comp.h +98 -0
- data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/conf.h +214 -0
.dockerignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# The .dockerignore file excludes files from the container build process.
|
| 2 |
+
#
|
| 3 |
+
# https://docs.docker.com/engine/reference/builder/#dockerignore-file
|
| 4 |
+
|
| 5 |
+
# Exclude Git files
|
| 6 |
+
.git
|
| 7 |
+
.github
|
| 8 |
+
.gitignore
|
| 9 |
+
|
| 10 |
+
# Exclude Python cache files
|
| 11 |
+
__pycache__
|
| 12 |
+
.mypy_cache
|
| 13 |
+
.pytest_cache
|
| 14 |
+
.ruff_cache
|
| 15 |
+
|
| 16 |
+
# Exclude Python virtual environment
|
| 17 |
+
/venv
|
| 18 |
+
|
| 19 |
+
# Exclude some weights
|
| 20 |
+
/openai
|
| 21 |
+
/liuhaotian
|
.editorconfig
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
root = true
|
| 2 |
+
|
| 3 |
+
# Unix-style newlines with a newline ending every file
|
| 4 |
+
[*]
|
| 5 |
+
end_of_line = lf
|
| 6 |
+
insert_final_newline = true
|
| 7 |
+
trim_trailing_whitespace = true
|
| 8 |
+
charset = utf-8
|
| 9 |
+
|
| 10 |
+
# 4 space indentation
|
| 11 |
+
[*.{py,json}]
|
| 12 |
+
indent_style = space
|
| 13 |
+
indent_size = 4
|
| 14 |
+
|
| 15 |
+
# 2 space indentation
|
| 16 |
+
[*.{md,sh,yaml,yml}]
|
| 17 |
+
indent_style = space
|
| 18 |
+
indent_size = 2
|
.gitattributes
CHANGED
|
@@ -1,59 +1,29 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
*.
|
| 11 |
-
*.
|
| 12 |
-
*.
|
| 13 |
-
*.
|
| 14 |
-
*.
|
| 15 |
-
*.
|
| 16 |
-
*.
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
*.
|
| 21 |
-
*.
|
| 22 |
-
*.
|
| 23 |
-
*.
|
| 24 |
-
*.
|
| 25 |
-
*.
|
| 26 |
-
*.
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
*.
|
| 30 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 36 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 37 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 38 |
-
# Audio files - uncompressed
|
| 39 |
-
*.pcm filter=lfs diff=lfs merge=lfs -text
|
| 40 |
-
*.sam filter=lfs diff=lfs merge=lfs -text
|
| 41 |
-
*.raw filter=lfs diff=lfs merge=lfs -text
|
| 42 |
-
# Audio files - compressed
|
| 43 |
-
*.aac filter=lfs diff=lfs merge=lfs -text
|
| 44 |
-
*.flac filter=lfs diff=lfs merge=lfs -text
|
| 45 |
-
*.mp3 filter=lfs diff=lfs merge=lfs -text
|
| 46 |
-
*.ogg filter=lfs diff=lfs merge=lfs -text
|
| 47 |
-
*.wav filter=lfs diff=lfs merge=lfs -text
|
| 48 |
-
# Image files - uncompressed
|
| 49 |
-
*.bmp filter=lfs diff=lfs merge=lfs -text
|
| 50 |
-
*.gif filter=lfs diff=lfs merge=lfs -text
|
| 51 |
-
*.png filter=lfs diff=lfs merge=lfs -text
|
| 52 |
-
*.tiff filter=lfs diff=lfs merge=lfs -text
|
| 53 |
-
# Image files - compressed
|
| 54 |
-
*.jpg filter=lfs diff=lfs merge=lfs -text
|
| 55 |
-
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
| 56 |
-
*.webp filter=lfs diff=lfs merge=lfs -text
|
| 57 |
-
# Video files - compressed
|
| 58 |
-
*.mp4 filter=lfs diff=lfs merge=lfs -text
|
| 59 |
-
*.webm filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
# https://git-scm.com/docs/gitattributes
|
| 2 |
+
|
| 3 |
+
# Set the default behavior, in case people don't have core.autocrlf set.
|
| 4 |
+
# https://git-scm.com/docs/gitattributes#_end_of_line_conversion
|
| 5 |
+
* text=auto
|
| 6 |
+
|
| 7 |
+
# common python attributes, taken from https://github.com/alexkaratarakis/gitattributes/blob/710900479a2bedeec7003d381719521ffbb18bf8/Python.gitattributes
|
| 8 |
+
# Source files
|
| 9 |
+
# ============
|
| 10 |
+
*.pxd text diff=python
|
| 11 |
+
*.py text diff=python
|
| 12 |
+
*.py3 text diff=python
|
| 13 |
+
*.pyw text diff=python
|
| 14 |
+
*.pyx text diff=python
|
| 15 |
+
*.pyz text diff=python
|
| 16 |
+
*.pyi text diff=python
|
| 17 |
+
|
| 18 |
+
# Binary files
|
| 19 |
+
# ============
|
| 20 |
+
*.db binary
|
| 21 |
+
*.p binary
|
| 22 |
+
*.pkl binary
|
| 23 |
+
*.pickle binary
|
| 24 |
+
*.pyc binary export-ignore
|
| 25 |
+
*.pyo binary export-ignore
|
| 26 |
+
*.pyd binary
|
| 27 |
+
|
| 28 |
+
# Jupyter notebook
|
| 29 |
+
*.ipynb text eol=lf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Python
|
| 2 |
+
__pycache__
|
| 3 |
+
*.pyc
|
| 4 |
+
*.egg-info
|
| 5 |
+
dist
|
| 6 |
+
|
| 7 |
+
# Log
|
| 8 |
+
*.log
|
| 9 |
+
*.log.*
|
| 10 |
+
# *.json
|
| 11 |
+
# *.jsonl
|
| 12 |
+
|
| 13 |
+
# Data
|
| 14 |
+
!**/alpaca-data-conversation.json
|
| 15 |
+
# Editor
|
| 16 |
+
.idea
|
| 17 |
+
*.swp
|
| 18 |
+
.vscode
|
| 19 |
+
|
| 20 |
+
# Other
|
| 21 |
+
.DS_Store
|
| 22 |
+
wandb
|
| 23 |
+
output
|
| 24 |
+
llavavid
|
| 25 |
+
|
| 26 |
+
checkpoints
|
| 27 |
+
project_checkpoints
|
| 28 |
+
debug_checkpoints
|
| 29 |
+
playground/data
|
| 30 |
+
playground/cc3m_llava34b_cap
|
| 31 |
+
ckpts*
|
| 32 |
+
|
| 33 |
+
.ipynb_checkpoints
|
| 34 |
+
chunyl_scripts
|
| 35 |
+
*.ipynb
|
| 36 |
+
|
| 37 |
+
# DevContainer
|
| 38 |
+
!.devcontainer/*
|
| 39 |
+
|
| 40 |
+
# Demo
|
| 41 |
+
serve_images/
|
| 42 |
+
notebooks/
|
| 43 |
+
logs
|
| 44 |
+
scripts/dist_*
|
| 45 |
+
logs/
|
| 46 |
+
submissions/
|
| 47 |
+
cn_scripts/
|
| 48 |
+
internal_project_checkpoints/
|
| 49 |
+
work_dirs
|
| 50 |
+
workdir
|
| 51 |
+
.venv
|
| 52 |
+
venv
|
| 53 |
+
scripts/i18n/*
|
| 54 |
+
playground/.nfs028b000000010add00000001
|
| 55 |
+
HIP
|
| 56 |
+
playground/.nfs028b0000017bff2c00000012
|
| 57 |
+
scripts/qwen
|
| 58 |
+
scripts/vicuna
|
| 59 |
+
scripts/mistral
|
| 60 |
+
scripts/baseline_rep
|
| 61 |
+
scripts/cn_boli01_hl
|
| 62 |
+
scripts/cn_boli01_lf
|
| 63 |
+
scripts/cn_lf
|
| 64 |
+
scripts/cn_lq
|
| 65 |
+
scripts/cn_yg
|
| 66 |
+
scripts/cn_yg_hao
|
| 67 |
+
scripts/eva_encoder
|
| 68 |
+
scripts/i18n
|
| 69 |
+
scripts/i18n_higher_res
|
| 70 |
+
scripts/multi-images
|
| 71 |
+
scratchpad
|
| 72 |
+
build/
|
| 73 |
+
playground/*.json
|
| 74 |
+
mlx_configs/
|
| 75 |
+
data_processing/
|
| 76 |
+
# demo/
|
| 77 |
+
.python-version
|
| 78 |
+
uv.lock
|
| 79 |
+
# nas
|
| 80 |
+
.nfs*
|
| 81 |
+
data/
|
.vscode/launch.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
// 使用 IntelliSense 了解相关属性。
|
| 3 |
+
// 悬停以查看现有属性的描述。
|
| 4 |
+
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
|
| 5 |
+
"version": "0.2.0",
|
| 6 |
+
"configurations": [
|
| 7 |
+
{
|
| 8 |
+
"name": "sh_file_debug",
|
| 9 |
+
"type": "debugpy",
|
| 10 |
+
"request": "attach",
|
| 11 |
+
"connect": {
|
| 12 |
+
"host": "localhost",
|
| 13 |
+
"port": 9518
|
| 14 |
+
},
|
| 15 |
+
"justMyCode": false
|
| 16 |
+
},
|
| 17 |
+
{
|
| 18 |
+
"name": "Python 调试程序: 包含参数的当前文件",
|
| 19 |
+
"type": "debugpy",
|
| 20 |
+
"request": "launch",
|
| 21 |
+
"program": "${file}",
|
| 22 |
+
"console": "integratedTerminal",
|
| 23 |
+
"args": "${command:pickArgs}"
|
| 24 |
+
}
|
| 25 |
+
]
|
| 26 |
+
}
|
11video_r1_training_model_keys.json
ADDED
|
@@ -0,0 +1,842 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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|
+
"visual.blocks.0.norm2.weight",
|
| 7 |
+
"visual.blocks.0.attn.qkv.weight",
|
| 8 |
+
"visual.blocks.0.attn.qkv.bias",
|
| 9 |
+
"visual.blocks.0.attn.proj.weight",
|
| 10 |
+
"visual.blocks.0.attn.proj.bias",
|
| 11 |
+
"visual.blocks.0.mlp.gate_proj.weight",
|
| 12 |
+
"visual.blocks.0.mlp.gate_proj.bias",
|
| 13 |
+
"visual.blocks.0.mlp.up_proj.weight"
|
| 14 |
+
],
|
| 15 |
+
"all_keys": [
|
| 16 |
+
"visual.patch_embed.proj.weight",
|
| 17 |
+
"visual.blocks.0.norm1.weight",
|
| 18 |
+
"visual.blocks.0.norm2.weight",
|
| 19 |
+
"visual.blocks.0.attn.qkv.weight",
|
| 20 |
+
"visual.blocks.0.attn.qkv.bias",
|
| 21 |
+
"visual.blocks.0.attn.proj.weight",
|
| 22 |
+
"visual.blocks.0.attn.proj.bias",
|
| 23 |
+
"visual.blocks.0.mlp.gate_proj.weight",
|
| 24 |
+
"visual.blocks.0.mlp.gate_proj.bias",
|
| 25 |
+
"visual.blocks.0.mlp.up_proj.weight",
|
| 26 |
+
"visual.blocks.0.mlp.up_proj.bias",
|
| 27 |
+
"visual.blocks.0.mlp.down_proj.weight",
|
| 28 |
+
"visual.blocks.0.mlp.down_proj.bias",
|
| 29 |
+
"visual.blocks.1.norm1.weight",
|
| 30 |
+
"visual.blocks.1.norm2.weight",
|
| 31 |
+
"visual.blocks.1.attn.qkv.weight",
|
| 32 |
+
"visual.blocks.1.attn.qkv.bias",
|
| 33 |
+
"visual.blocks.1.attn.proj.weight",
|
| 34 |
+
"visual.blocks.1.attn.proj.bias",
|
| 35 |
+
"visual.blocks.1.mlp.gate_proj.weight",
|
| 36 |
+
"visual.blocks.1.mlp.gate_proj.bias",
|
| 37 |
+
"visual.blocks.1.mlp.up_proj.weight",
|
| 38 |
+
"visual.blocks.1.mlp.up_proj.bias",
|
| 39 |
+
"visual.blocks.1.mlp.down_proj.weight",
|
| 40 |
+
"visual.blocks.1.mlp.down_proj.bias",
|
| 41 |
+
"visual.blocks.2.norm1.weight",
|
| 42 |
+
"visual.blocks.2.norm2.weight",
|
| 43 |
+
"visual.blocks.2.attn.qkv.weight",
|
| 44 |
+
"visual.blocks.2.attn.qkv.bias",
|
| 45 |
+
"visual.blocks.2.attn.proj.weight",
|
| 46 |
+
"visual.blocks.2.attn.proj.bias",
|
| 47 |
+
"visual.blocks.2.mlp.gate_proj.weight",
|
| 48 |
+
"visual.blocks.2.mlp.gate_proj.bias",
|
| 49 |
+
"visual.blocks.2.mlp.up_proj.weight",
|
| 50 |
+
"visual.blocks.2.mlp.up_proj.bias",
|
| 51 |
+
"visual.blocks.2.mlp.down_proj.weight",
|
| 52 |
+
"visual.blocks.2.mlp.down_proj.bias",
|
| 53 |
+
"visual.blocks.3.norm1.weight",
|
| 54 |
+
"visual.blocks.3.norm2.weight",
|
| 55 |
+
"visual.blocks.3.attn.qkv.weight",
|
| 56 |
+
"visual.blocks.3.attn.qkv.bias",
|
| 57 |
+
"visual.blocks.3.attn.proj.weight",
|
| 58 |
+
"visual.blocks.3.attn.proj.bias",
|
| 59 |
+
"visual.blocks.3.mlp.gate_proj.weight",
|
| 60 |
+
"visual.blocks.3.mlp.gate_proj.bias",
|
| 61 |
+
"visual.blocks.3.mlp.up_proj.weight",
|
| 62 |
+
"visual.blocks.3.mlp.up_proj.bias",
|
| 63 |
+
"visual.blocks.3.mlp.down_proj.weight",
|
| 64 |
+
"visual.blocks.3.mlp.down_proj.bias",
|
| 65 |
+
"visual.blocks.4.norm1.weight",
|
| 66 |
+
"visual.blocks.4.norm2.weight",
|
| 67 |
+
"visual.blocks.4.attn.qkv.weight",
|
| 68 |
+
"visual.blocks.4.attn.qkv.bias",
|
| 69 |
+
"visual.blocks.4.attn.proj.weight",
|
| 70 |
+
"visual.blocks.4.attn.proj.bias",
|
| 71 |
+
"visual.blocks.4.mlp.gate_proj.weight",
|
| 72 |
+
"visual.blocks.4.mlp.gate_proj.bias",
|
| 73 |
+
"visual.blocks.4.mlp.up_proj.weight",
|
| 74 |
+
"visual.blocks.4.mlp.up_proj.bias",
|
| 75 |
+
"visual.blocks.4.mlp.down_proj.weight",
|
| 76 |
+
"visual.blocks.4.mlp.down_proj.bias",
|
| 77 |
+
"visual.blocks.5.norm1.weight",
|
| 78 |
+
"visual.blocks.5.norm2.weight",
|
| 79 |
+
"visual.blocks.5.attn.qkv.weight",
|
| 80 |
+
"visual.blocks.5.attn.qkv.bias",
|
| 81 |
+
"visual.blocks.5.attn.proj.weight",
|
| 82 |
+
"visual.blocks.5.attn.proj.bias",
|
| 83 |
+
"visual.blocks.5.mlp.gate_proj.weight",
|
| 84 |
+
"visual.blocks.5.mlp.gate_proj.bias",
|
| 85 |
+
"visual.blocks.5.mlp.up_proj.weight",
|
| 86 |
+
"visual.blocks.5.mlp.up_proj.bias",
|
| 87 |
+
"visual.blocks.5.mlp.down_proj.weight",
|
| 88 |
+
"visual.blocks.5.mlp.down_proj.bias",
|
| 89 |
+
"visual.blocks.6.norm1.weight",
|
| 90 |
+
"visual.blocks.6.norm2.weight",
|
| 91 |
+
"visual.blocks.6.attn.qkv.weight",
|
| 92 |
+
"visual.blocks.6.attn.qkv.bias",
|
| 93 |
+
"visual.blocks.6.attn.proj.weight",
|
| 94 |
+
"visual.blocks.6.attn.proj.bias",
|
| 95 |
+
"visual.blocks.6.mlp.gate_proj.weight",
|
| 96 |
+
"visual.blocks.6.mlp.gate_proj.bias",
|
| 97 |
+
"visual.blocks.6.mlp.up_proj.weight",
|
| 98 |
+
"visual.blocks.6.mlp.up_proj.bias",
|
| 99 |
+
"visual.blocks.6.mlp.down_proj.weight",
|
| 100 |
+
"visual.blocks.6.mlp.down_proj.bias",
|
| 101 |
+
"visual.blocks.7.norm1.weight",
|
| 102 |
+
"visual.blocks.7.norm2.weight",
|
| 103 |
+
"visual.blocks.7.attn.qkv.weight",
|
| 104 |
+
"visual.blocks.7.attn.qkv.bias",
|
| 105 |
+
"visual.blocks.7.attn.proj.weight",
|
| 106 |
+
"visual.blocks.7.attn.proj.bias",
|
| 107 |
+
"visual.blocks.7.mlp.gate_proj.weight",
|
| 108 |
+
"visual.blocks.7.mlp.gate_proj.bias",
|
| 109 |
+
"visual.blocks.7.mlp.up_proj.weight",
|
| 110 |
+
"visual.blocks.7.mlp.up_proj.bias",
|
| 111 |
+
"visual.blocks.7.mlp.down_proj.weight",
|
| 112 |
+
"visual.blocks.7.mlp.down_proj.bias",
|
| 113 |
+
"visual.blocks.8.norm1.weight",
|
| 114 |
+
"visual.blocks.8.norm2.weight",
|
| 115 |
+
"visual.blocks.8.attn.qkv.weight",
|
| 116 |
+
"visual.blocks.8.attn.qkv.bias",
|
| 117 |
+
"visual.blocks.8.attn.proj.weight",
|
| 118 |
+
"visual.blocks.8.attn.proj.bias",
|
| 119 |
+
"visual.blocks.8.mlp.gate_proj.weight",
|
| 120 |
+
"visual.blocks.8.mlp.gate_proj.bias",
|
| 121 |
+
"visual.blocks.8.mlp.up_proj.weight",
|
| 122 |
+
"visual.blocks.8.mlp.up_proj.bias",
|
| 123 |
+
"visual.blocks.8.mlp.down_proj.weight",
|
| 124 |
+
"visual.blocks.8.mlp.down_proj.bias",
|
| 125 |
+
"visual.blocks.9.norm1.weight",
|
| 126 |
+
"visual.blocks.9.norm2.weight",
|
| 127 |
+
"visual.blocks.9.attn.qkv.weight",
|
| 128 |
+
"visual.blocks.9.attn.qkv.bias",
|
| 129 |
+
"visual.blocks.9.attn.proj.weight",
|
| 130 |
+
"visual.blocks.9.attn.proj.bias",
|
| 131 |
+
"visual.blocks.9.mlp.gate_proj.weight",
|
| 132 |
+
"visual.blocks.9.mlp.gate_proj.bias",
|
| 133 |
+
"visual.blocks.9.mlp.up_proj.weight",
|
| 134 |
+
"visual.blocks.9.mlp.up_proj.bias",
|
| 135 |
+
"visual.blocks.9.mlp.down_proj.weight",
|
| 136 |
+
"visual.blocks.9.mlp.down_proj.bias",
|
| 137 |
+
"visual.blocks.10.norm1.weight",
|
| 138 |
+
"visual.blocks.10.norm2.weight",
|
| 139 |
+
"visual.blocks.10.attn.qkv.weight",
|
| 140 |
+
"visual.blocks.10.attn.qkv.bias",
|
| 141 |
+
"visual.blocks.10.attn.proj.weight",
|
| 142 |
+
"visual.blocks.10.attn.proj.bias",
|
| 143 |
+
"visual.blocks.10.mlp.gate_proj.weight",
|
| 144 |
+
"visual.blocks.10.mlp.gate_proj.bias",
|
| 145 |
+
"visual.blocks.10.mlp.up_proj.weight",
|
| 146 |
+
"visual.blocks.10.mlp.up_proj.bias",
|
| 147 |
+
"visual.blocks.10.mlp.down_proj.weight",
|
| 148 |
+
"visual.blocks.10.mlp.down_proj.bias",
|
| 149 |
+
"visual.blocks.11.norm1.weight",
|
| 150 |
+
"visual.blocks.11.norm2.weight",
|
| 151 |
+
"visual.blocks.11.attn.qkv.weight",
|
| 152 |
+
"visual.blocks.11.attn.qkv.bias",
|
| 153 |
+
"visual.blocks.11.attn.proj.weight",
|
| 154 |
+
"visual.blocks.11.attn.proj.bias",
|
| 155 |
+
"visual.blocks.11.mlp.gate_proj.weight",
|
| 156 |
+
"visual.blocks.11.mlp.gate_proj.bias",
|
| 157 |
+
"visual.blocks.11.mlp.up_proj.weight",
|
| 158 |
+
"visual.blocks.11.mlp.up_proj.bias",
|
| 159 |
+
"visual.blocks.11.mlp.down_proj.weight",
|
| 160 |
+
"visual.blocks.11.mlp.down_proj.bias",
|
| 161 |
+
"visual.blocks.12.norm1.weight",
|
| 162 |
+
"visual.blocks.12.norm2.weight",
|
| 163 |
+
"visual.blocks.12.attn.qkv.weight",
|
| 164 |
+
"visual.blocks.12.attn.qkv.bias",
|
| 165 |
+
"visual.blocks.12.attn.proj.weight",
|
| 166 |
+
"visual.blocks.12.attn.proj.bias",
|
| 167 |
+
"visual.blocks.12.mlp.gate_proj.weight",
|
| 168 |
+
"visual.blocks.12.mlp.gate_proj.bias",
|
| 169 |
+
"visual.blocks.12.mlp.up_proj.weight",
|
| 170 |
+
"visual.blocks.12.mlp.up_proj.bias",
|
| 171 |
+
"visual.blocks.12.mlp.down_proj.weight",
|
| 172 |
+
"visual.blocks.12.mlp.down_proj.bias",
|
| 173 |
+
"visual.blocks.13.norm1.weight",
|
| 174 |
+
"visual.blocks.13.norm2.weight",
|
| 175 |
+
"visual.blocks.13.attn.qkv.weight",
|
| 176 |
+
"visual.blocks.13.attn.qkv.bias",
|
| 177 |
+
"visual.blocks.13.attn.proj.weight",
|
| 178 |
+
"visual.blocks.13.attn.proj.bias",
|
| 179 |
+
"visual.blocks.13.mlp.gate_proj.weight",
|
| 180 |
+
"visual.blocks.13.mlp.gate_proj.bias",
|
| 181 |
+
"visual.blocks.13.mlp.up_proj.weight",
|
| 182 |
+
"visual.blocks.13.mlp.up_proj.bias",
|
| 183 |
+
"visual.blocks.13.mlp.down_proj.weight",
|
| 184 |
+
"visual.blocks.13.mlp.down_proj.bias",
|
| 185 |
+
"visual.blocks.14.norm1.weight",
|
| 186 |
+
"visual.blocks.14.norm2.weight",
|
| 187 |
+
"visual.blocks.14.attn.qkv.weight",
|
| 188 |
+
"visual.blocks.14.attn.qkv.bias",
|
| 189 |
+
"visual.blocks.14.attn.proj.weight",
|
| 190 |
+
"visual.blocks.14.attn.proj.bias",
|
| 191 |
+
"visual.blocks.14.mlp.gate_proj.weight",
|
| 192 |
+
"visual.blocks.14.mlp.gate_proj.bias",
|
| 193 |
+
"visual.blocks.14.mlp.up_proj.weight",
|
| 194 |
+
"visual.blocks.14.mlp.up_proj.bias",
|
| 195 |
+
"visual.blocks.14.mlp.down_proj.weight",
|
| 196 |
+
"visual.blocks.14.mlp.down_proj.bias",
|
| 197 |
+
"visual.blocks.15.norm1.weight",
|
| 198 |
+
"visual.blocks.15.norm2.weight",
|
| 199 |
+
"visual.blocks.15.attn.qkv.weight",
|
| 200 |
+
"visual.blocks.15.attn.qkv.bias",
|
| 201 |
+
"visual.blocks.15.attn.proj.weight",
|
| 202 |
+
"visual.blocks.15.attn.proj.bias",
|
| 203 |
+
"visual.blocks.15.mlp.gate_proj.weight",
|
| 204 |
+
"visual.blocks.15.mlp.gate_proj.bias",
|
| 205 |
+
"visual.blocks.15.mlp.up_proj.weight",
|
| 206 |
+
"visual.blocks.15.mlp.up_proj.bias",
|
| 207 |
+
"visual.blocks.15.mlp.down_proj.weight",
|
| 208 |
+
"visual.blocks.15.mlp.down_proj.bias",
|
| 209 |
+
"visual.blocks.16.norm1.weight",
|
| 210 |
+
"visual.blocks.16.norm2.weight",
|
| 211 |
+
"visual.blocks.16.attn.qkv.weight",
|
| 212 |
+
"visual.blocks.16.attn.qkv.bias",
|
| 213 |
+
"visual.blocks.16.attn.proj.weight",
|
| 214 |
+
"visual.blocks.16.attn.proj.bias",
|
| 215 |
+
"visual.blocks.16.mlp.gate_proj.weight",
|
| 216 |
+
"visual.blocks.16.mlp.gate_proj.bias",
|
| 217 |
+
"visual.blocks.16.mlp.up_proj.weight",
|
| 218 |
+
"visual.blocks.16.mlp.up_proj.bias",
|
| 219 |
+
"visual.blocks.16.mlp.down_proj.weight",
|
| 220 |
+
"visual.blocks.16.mlp.down_proj.bias",
|
| 221 |
+
"visual.blocks.17.norm1.weight",
|
| 222 |
+
"visual.blocks.17.norm2.weight",
|
| 223 |
+
"visual.blocks.17.attn.qkv.weight",
|
| 224 |
+
"visual.blocks.17.attn.qkv.bias",
|
| 225 |
+
"visual.blocks.17.attn.proj.weight",
|
| 226 |
+
"visual.blocks.17.attn.proj.bias",
|
| 227 |
+
"visual.blocks.17.mlp.gate_proj.weight",
|
| 228 |
+
"visual.blocks.17.mlp.gate_proj.bias",
|
| 229 |
+
"visual.blocks.17.mlp.up_proj.weight",
|
| 230 |
+
"visual.blocks.17.mlp.up_proj.bias",
|
| 231 |
+
"visual.blocks.17.mlp.down_proj.weight",
|
| 232 |
+
"visual.blocks.17.mlp.down_proj.bias",
|
| 233 |
+
"visual.blocks.18.norm1.weight",
|
| 234 |
+
"visual.blocks.18.norm2.weight",
|
| 235 |
+
"visual.blocks.18.attn.qkv.weight",
|
| 236 |
+
"visual.blocks.18.attn.qkv.bias",
|
| 237 |
+
"visual.blocks.18.attn.proj.weight",
|
| 238 |
+
"visual.blocks.18.attn.proj.bias",
|
| 239 |
+
"visual.blocks.18.mlp.gate_proj.weight",
|
| 240 |
+
"visual.blocks.18.mlp.gate_proj.bias",
|
| 241 |
+
"visual.blocks.18.mlp.up_proj.weight",
|
| 242 |
+
"visual.blocks.18.mlp.up_proj.bias",
|
| 243 |
+
"visual.blocks.18.mlp.down_proj.weight",
|
| 244 |
+
"visual.blocks.18.mlp.down_proj.bias",
|
| 245 |
+
"visual.blocks.19.norm1.weight",
|
| 246 |
+
"visual.blocks.19.norm2.weight",
|
| 247 |
+
"visual.blocks.19.attn.qkv.weight",
|
| 248 |
+
"visual.blocks.19.attn.qkv.bias",
|
| 249 |
+
"visual.blocks.19.attn.proj.weight",
|
| 250 |
+
"visual.blocks.19.attn.proj.bias",
|
| 251 |
+
"visual.blocks.19.mlp.gate_proj.weight",
|
| 252 |
+
"visual.blocks.19.mlp.gate_proj.bias",
|
| 253 |
+
"visual.blocks.19.mlp.up_proj.weight",
|
| 254 |
+
"visual.blocks.19.mlp.up_proj.bias",
|
| 255 |
+
"visual.blocks.19.mlp.down_proj.weight",
|
| 256 |
+
"visual.blocks.19.mlp.down_proj.bias",
|
| 257 |
+
"visual.blocks.20.norm1.weight",
|
| 258 |
+
"visual.blocks.20.norm2.weight",
|
| 259 |
+
"visual.blocks.20.attn.qkv.weight",
|
| 260 |
+
"visual.blocks.20.attn.qkv.bias",
|
| 261 |
+
"visual.blocks.20.attn.proj.weight",
|
| 262 |
+
"visual.blocks.20.attn.proj.bias",
|
| 263 |
+
"visual.blocks.20.mlp.gate_proj.weight",
|
| 264 |
+
"visual.blocks.20.mlp.gate_proj.bias",
|
| 265 |
+
"visual.blocks.20.mlp.up_proj.weight",
|
| 266 |
+
"visual.blocks.20.mlp.up_proj.bias",
|
| 267 |
+
"visual.blocks.20.mlp.down_proj.weight",
|
| 268 |
+
"visual.blocks.20.mlp.down_proj.bias",
|
| 269 |
+
"visual.blocks.21.norm1.weight",
|
| 270 |
+
"visual.blocks.21.norm2.weight",
|
| 271 |
+
"visual.blocks.21.attn.qkv.weight",
|
| 272 |
+
"visual.blocks.21.attn.qkv.bias",
|
| 273 |
+
"visual.blocks.21.attn.proj.weight",
|
| 274 |
+
"visual.blocks.21.attn.proj.bias",
|
| 275 |
+
"visual.blocks.21.mlp.gate_proj.weight",
|
| 276 |
+
"visual.blocks.21.mlp.gate_proj.bias",
|
| 277 |
+
"visual.blocks.21.mlp.up_proj.weight",
|
| 278 |
+
"visual.blocks.21.mlp.up_proj.bias",
|
| 279 |
+
"visual.blocks.21.mlp.down_proj.weight",
|
| 280 |
+
"visual.blocks.21.mlp.down_proj.bias",
|
| 281 |
+
"visual.blocks.22.norm1.weight",
|
| 282 |
+
"visual.blocks.22.norm2.weight",
|
| 283 |
+
"visual.blocks.22.attn.qkv.weight",
|
| 284 |
+
"visual.blocks.22.attn.qkv.bias",
|
| 285 |
+
"visual.blocks.22.attn.proj.weight",
|
| 286 |
+
"visual.blocks.22.attn.proj.bias",
|
| 287 |
+
"visual.blocks.22.mlp.gate_proj.weight",
|
| 288 |
+
"visual.blocks.22.mlp.gate_proj.bias",
|
| 289 |
+
"visual.blocks.22.mlp.up_proj.weight",
|
| 290 |
+
"visual.blocks.22.mlp.up_proj.bias",
|
| 291 |
+
"visual.blocks.22.mlp.down_proj.weight",
|
| 292 |
+
"visual.blocks.22.mlp.down_proj.bias",
|
| 293 |
+
"visual.blocks.23.norm1.weight",
|
| 294 |
+
"visual.blocks.23.norm2.weight",
|
| 295 |
+
"visual.blocks.23.attn.qkv.weight",
|
| 296 |
+
"visual.blocks.23.attn.qkv.bias",
|
| 297 |
+
"visual.blocks.23.attn.proj.weight",
|
| 298 |
+
"visual.blocks.23.attn.proj.bias",
|
| 299 |
+
"visual.blocks.23.mlp.gate_proj.weight",
|
| 300 |
+
"visual.blocks.23.mlp.gate_proj.bias",
|
| 301 |
+
"visual.blocks.23.mlp.up_proj.weight",
|
| 302 |
+
"visual.blocks.23.mlp.up_proj.bias",
|
| 303 |
+
"visual.blocks.23.mlp.down_proj.weight",
|
| 304 |
+
"visual.blocks.23.mlp.down_proj.bias",
|
| 305 |
+
"visual.blocks.24.norm1.weight",
|
| 306 |
+
"visual.blocks.24.norm2.weight",
|
| 307 |
+
"visual.blocks.24.attn.qkv.weight",
|
| 308 |
+
"visual.blocks.24.attn.qkv.bias",
|
| 309 |
+
"visual.blocks.24.attn.proj.weight",
|
| 310 |
+
"visual.blocks.24.attn.proj.bias",
|
| 311 |
+
"visual.blocks.24.mlp.gate_proj.weight",
|
| 312 |
+
"visual.blocks.24.mlp.gate_proj.bias",
|
| 313 |
+
"visual.blocks.24.mlp.up_proj.weight",
|
| 314 |
+
"visual.blocks.24.mlp.up_proj.bias",
|
| 315 |
+
"visual.blocks.24.mlp.down_proj.weight",
|
| 316 |
+
"visual.blocks.24.mlp.down_proj.bias",
|
| 317 |
+
"visual.blocks.25.norm1.weight",
|
| 318 |
+
"visual.blocks.25.norm2.weight",
|
| 319 |
+
"visual.blocks.25.attn.qkv.weight",
|
| 320 |
+
"visual.blocks.25.attn.qkv.bias",
|
| 321 |
+
"visual.blocks.25.attn.proj.weight",
|
| 322 |
+
"visual.blocks.25.attn.proj.bias",
|
| 323 |
+
"visual.blocks.25.mlp.gate_proj.weight",
|
| 324 |
+
"visual.blocks.25.mlp.gate_proj.bias",
|
| 325 |
+
"visual.blocks.25.mlp.up_proj.weight",
|
| 326 |
+
"visual.blocks.25.mlp.up_proj.bias",
|
| 327 |
+
"visual.blocks.25.mlp.down_proj.weight",
|
| 328 |
+
"visual.blocks.25.mlp.down_proj.bias",
|
| 329 |
+
"visual.blocks.26.norm1.weight",
|
| 330 |
+
"visual.blocks.26.norm2.weight",
|
| 331 |
+
"visual.blocks.26.attn.qkv.weight",
|
| 332 |
+
"visual.blocks.26.attn.qkv.bias",
|
| 333 |
+
"visual.blocks.26.attn.proj.weight",
|
| 334 |
+
"visual.blocks.26.attn.proj.bias",
|
| 335 |
+
"visual.blocks.26.mlp.gate_proj.weight",
|
| 336 |
+
"visual.blocks.26.mlp.gate_proj.bias",
|
| 337 |
+
"visual.blocks.26.mlp.up_proj.weight",
|
| 338 |
+
"visual.blocks.26.mlp.up_proj.bias",
|
| 339 |
+
"visual.blocks.26.mlp.down_proj.weight",
|
| 340 |
+
"visual.blocks.26.mlp.down_proj.bias",
|
| 341 |
+
"visual.blocks.27.norm1.weight",
|
| 342 |
+
"visual.blocks.27.norm2.weight",
|
| 343 |
+
"visual.blocks.27.attn.qkv.weight",
|
| 344 |
+
"visual.blocks.27.attn.qkv.bias",
|
| 345 |
+
"visual.blocks.27.attn.proj.weight",
|
| 346 |
+
"visual.blocks.27.attn.proj.bias",
|
| 347 |
+
"visual.blocks.27.mlp.gate_proj.weight",
|
| 348 |
+
"visual.blocks.27.mlp.gate_proj.bias",
|
| 349 |
+
"visual.blocks.27.mlp.up_proj.weight",
|
| 350 |
+
"visual.blocks.27.mlp.up_proj.bias",
|
| 351 |
+
"visual.blocks.27.mlp.down_proj.weight",
|
| 352 |
+
"visual.blocks.27.mlp.down_proj.bias",
|
| 353 |
+
"visual.blocks.28.norm1.weight",
|
| 354 |
+
"visual.blocks.28.norm2.weight",
|
| 355 |
+
"visual.blocks.28.attn.qkv.weight",
|
| 356 |
+
"visual.blocks.28.attn.qkv.bias",
|
| 357 |
+
"visual.blocks.28.attn.proj.weight",
|
| 358 |
+
"visual.blocks.28.attn.proj.bias",
|
| 359 |
+
"visual.blocks.28.mlp.gate_proj.weight",
|
| 360 |
+
"visual.blocks.28.mlp.gate_proj.bias",
|
| 361 |
+
"visual.blocks.28.mlp.up_proj.weight",
|
| 362 |
+
"visual.blocks.28.mlp.up_proj.bias",
|
| 363 |
+
"visual.blocks.28.mlp.down_proj.weight",
|
| 364 |
+
"visual.blocks.28.mlp.down_proj.bias",
|
| 365 |
+
"visual.blocks.29.norm1.weight",
|
| 366 |
+
"visual.blocks.29.norm2.weight",
|
| 367 |
+
"visual.blocks.29.attn.qkv.weight",
|
| 368 |
+
"visual.blocks.29.attn.qkv.bias",
|
| 369 |
+
"visual.blocks.29.attn.proj.weight",
|
| 370 |
+
"visual.blocks.29.attn.proj.bias",
|
| 371 |
+
"visual.blocks.29.mlp.gate_proj.weight",
|
| 372 |
+
"visual.blocks.29.mlp.gate_proj.bias",
|
| 373 |
+
"visual.blocks.29.mlp.up_proj.weight",
|
| 374 |
+
"visual.blocks.29.mlp.up_proj.bias",
|
| 375 |
+
"visual.blocks.29.mlp.down_proj.weight",
|
| 376 |
+
"visual.blocks.29.mlp.down_proj.bias",
|
| 377 |
+
"visual.blocks.30.norm1.weight",
|
| 378 |
+
"visual.blocks.30.norm2.weight",
|
| 379 |
+
"visual.blocks.30.attn.qkv.weight",
|
| 380 |
+
"visual.blocks.30.attn.qkv.bias",
|
| 381 |
+
"visual.blocks.30.attn.proj.weight",
|
| 382 |
+
"visual.blocks.30.attn.proj.bias",
|
| 383 |
+
"visual.blocks.30.mlp.gate_proj.weight",
|
| 384 |
+
"visual.blocks.30.mlp.gate_proj.bias",
|
| 385 |
+
"visual.blocks.30.mlp.up_proj.weight",
|
| 386 |
+
"visual.blocks.30.mlp.up_proj.bias",
|
| 387 |
+
"visual.blocks.30.mlp.down_proj.weight",
|
| 388 |
+
"visual.blocks.30.mlp.down_proj.bias",
|
| 389 |
+
"visual.blocks.31.norm1.weight",
|
| 390 |
+
"visual.blocks.31.norm2.weight",
|
| 391 |
+
"visual.blocks.31.attn.qkv.weight",
|
| 392 |
+
"visual.blocks.31.attn.qkv.bias",
|
| 393 |
+
"visual.blocks.31.attn.proj.weight",
|
| 394 |
+
"visual.blocks.31.attn.proj.bias",
|
| 395 |
+
"visual.blocks.31.mlp.gate_proj.weight",
|
| 396 |
+
"visual.blocks.31.mlp.gate_proj.bias",
|
| 397 |
+
"visual.blocks.31.mlp.up_proj.weight",
|
| 398 |
+
"visual.blocks.31.mlp.up_proj.bias",
|
| 399 |
+
"visual.blocks.31.mlp.down_proj.weight",
|
| 400 |
+
"visual.blocks.31.mlp.down_proj.bias",
|
| 401 |
+
"visual.merger.ln_q.weight",
|
| 402 |
+
"visual.merger.mlp.0.weight",
|
| 403 |
+
"visual.merger.mlp.0.bias",
|
| 404 |
+
"visual.merger.mlp.2.weight",
|
| 405 |
+
"visual.merger.mlp.2.bias",
|
| 406 |
+
"model.embed_tokens.weight",
|
| 407 |
+
"model.layers.0.self_attn.q_proj.weight",
|
| 408 |
+
"model.layers.0.self_attn.q_proj.bias",
|
| 409 |
+
"model.layers.0.self_attn.k_proj.weight",
|
| 410 |
+
"model.layers.0.self_attn.k_proj.bias",
|
| 411 |
+
"model.layers.0.self_attn.v_proj.weight",
|
| 412 |
+
"model.layers.0.self_attn.v_proj.bias",
|
| 413 |
+
"model.layers.0.self_attn.o_proj.weight",
|
| 414 |
+
"model.layers.0.mlp.gate_proj.weight",
|
| 415 |
+
"model.layers.0.mlp.up_proj.weight",
|
| 416 |
+
"model.layers.0.mlp.down_proj.weight",
|
| 417 |
+
"model.layers.0.input_layernorm.weight",
|
| 418 |
+
"model.layers.0.post_attention_layernorm.weight",
|
| 419 |
+
"model.layers.1.self_attn.q_proj.weight",
|
| 420 |
+
"model.layers.1.self_attn.q_proj.bias",
|
| 421 |
+
"model.layers.1.self_attn.k_proj.weight",
|
| 422 |
+
"model.layers.1.self_attn.k_proj.bias",
|
| 423 |
+
"model.layers.1.self_attn.v_proj.weight",
|
| 424 |
+
"model.layers.1.self_attn.v_proj.bias",
|
| 425 |
+
"model.layers.1.self_attn.o_proj.weight",
|
| 426 |
+
"model.layers.1.mlp.gate_proj.weight",
|
| 427 |
+
"model.layers.1.mlp.up_proj.weight",
|
| 428 |
+
"model.layers.1.mlp.down_proj.weight",
|
| 429 |
+
"model.layers.1.input_layernorm.weight",
|
| 430 |
+
"model.layers.1.post_attention_layernorm.weight",
|
| 431 |
+
"model.layers.2.self_attn.q_proj.weight",
|
| 432 |
+
"model.layers.2.self_attn.q_proj.bias",
|
| 433 |
+
"model.layers.2.self_attn.k_proj.weight",
|
| 434 |
+
"model.layers.2.self_attn.k_proj.bias",
|
| 435 |
+
"model.layers.2.self_attn.v_proj.weight",
|
| 436 |
+
"model.layers.2.self_attn.v_proj.bias",
|
| 437 |
+
"model.layers.2.self_attn.o_proj.weight",
|
| 438 |
+
"model.layers.2.mlp.gate_proj.weight",
|
| 439 |
+
"model.layers.2.mlp.up_proj.weight",
|
| 440 |
+
"model.layers.2.mlp.down_proj.weight",
|
| 441 |
+
"model.layers.2.input_layernorm.weight",
|
| 442 |
+
"model.layers.2.post_attention_layernorm.weight",
|
| 443 |
+
"model.layers.3.self_attn.q_proj.weight",
|
| 444 |
+
"model.layers.3.self_attn.q_proj.bias",
|
| 445 |
+
"model.layers.3.self_attn.k_proj.weight",
|
| 446 |
+
"model.layers.3.self_attn.k_proj.bias",
|
| 447 |
+
"model.layers.3.self_attn.v_proj.weight",
|
| 448 |
+
"model.layers.3.self_attn.v_proj.bias",
|
| 449 |
+
"model.layers.3.self_attn.o_proj.weight",
|
| 450 |
+
"model.layers.3.mlp.gate_proj.weight",
|
| 451 |
+
"model.layers.3.mlp.up_proj.weight",
|
| 452 |
+
"model.layers.3.mlp.down_proj.weight",
|
| 453 |
+
"model.layers.3.input_layernorm.weight",
|
| 454 |
+
"model.layers.3.post_attention_layernorm.weight",
|
| 455 |
+
"model.layers.4.self_attn.q_proj.weight",
|
| 456 |
+
"model.layers.4.self_attn.q_proj.bias",
|
| 457 |
+
"model.layers.4.self_attn.k_proj.weight",
|
| 458 |
+
"model.layers.4.self_attn.k_proj.bias",
|
| 459 |
+
"model.layers.4.self_attn.v_proj.weight",
|
| 460 |
+
"model.layers.4.self_attn.v_proj.bias",
|
| 461 |
+
"model.layers.4.self_attn.o_proj.weight",
|
| 462 |
+
"model.layers.4.mlp.gate_proj.weight",
|
| 463 |
+
"model.layers.4.mlp.up_proj.weight",
|
| 464 |
+
"model.layers.4.mlp.down_proj.weight",
|
| 465 |
+
"model.layers.4.input_layernorm.weight",
|
| 466 |
+
"model.layers.4.post_attention_layernorm.weight",
|
| 467 |
+
"model.layers.5.self_attn.q_proj.weight",
|
| 468 |
+
"model.layers.5.self_attn.q_proj.bias",
|
| 469 |
+
"model.layers.5.self_attn.k_proj.weight",
|
| 470 |
+
"model.layers.5.self_attn.k_proj.bias",
|
| 471 |
+
"model.layers.5.self_attn.v_proj.weight",
|
| 472 |
+
"model.layers.5.self_attn.v_proj.bias",
|
| 473 |
+
"model.layers.5.self_attn.o_proj.weight",
|
| 474 |
+
"model.layers.5.mlp.gate_proj.weight",
|
| 475 |
+
"model.layers.5.mlp.up_proj.weight",
|
| 476 |
+
"model.layers.5.mlp.down_proj.weight",
|
| 477 |
+
"model.layers.5.input_layernorm.weight",
|
| 478 |
+
"model.layers.5.post_attention_layernorm.weight",
|
| 479 |
+
"model.layers.6.self_attn.q_proj.weight",
|
| 480 |
+
"model.layers.6.self_attn.q_proj.bias",
|
| 481 |
+
"model.layers.6.self_attn.k_proj.weight",
|
| 482 |
+
"model.layers.6.self_attn.k_proj.bias",
|
| 483 |
+
"model.layers.6.self_attn.v_proj.weight",
|
| 484 |
+
"model.layers.6.self_attn.v_proj.bias",
|
| 485 |
+
"model.layers.6.self_attn.o_proj.weight",
|
| 486 |
+
"model.layers.6.mlp.gate_proj.weight",
|
| 487 |
+
"model.layers.6.mlp.up_proj.weight",
|
| 488 |
+
"model.layers.6.mlp.down_proj.weight",
|
| 489 |
+
"model.layers.6.input_layernorm.weight",
|
| 490 |
+
"model.layers.6.post_attention_layernorm.weight",
|
| 491 |
+
"model.layers.7.self_attn.q_proj.weight",
|
| 492 |
+
"model.layers.7.self_attn.q_proj.bias",
|
| 493 |
+
"model.layers.7.self_attn.k_proj.weight",
|
| 494 |
+
"model.layers.7.self_attn.k_proj.bias",
|
| 495 |
+
"model.layers.7.self_attn.v_proj.weight",
|
| 496 |
+
"model.layers.7.self_attn.v_proj.bias",
|
| 497 |
+
"model.layers.7.self_attn.o_proj.weight",
|
| 498 |
+
"model.layers.7.mlp.gate_proj.weight",
|
| 499 |
+
"model.layers.7.mlp.up_proj.weight",
|
| 500 |
+
"model.layers.7.mlp.down_proj.weight",
|
| 501 |
+
"model.layers.7.input_layernorm.weight",
|
| 502 |
+
"model.layers.7.post_attention_layernorm.weight",
|
| 503 |
+
"model.layers.8.self_attn.q_proj.weight",
|
| 504 |
+
"model.layers.8.self_attn.q_proj.bias",
|
| 505 |
+
"model.layers.8.self_attn.k_proj.weight",
|
| 506 |
+
"model.layers.8.self_attn.k_proj.bias",
|
| 507 |
+
"model.layers.8.self_attn.v_proj.weight",
|
| 508 |
+
"model.layers.8.self_attn.v_proj.bias",
|
| 509 |
+
"model.layers.8.self_attn.o_proj.weight",
|
| 510 |
+
"model.layers.8.mlp.gate_proj.weight",
|
| 511 |
+
"model.layers.8.mlp.up_proj.weight",
|
| 512 |
+
"model.layers.8.mlp.down_proj.weight",
|
| 513 |
+
"model.layers.8.input_layernorm.weight",
|
| 514 |
+
"model.layers.8.post_attention_layernorm.weight",
|
| 515 |
+
"model.layers.9.self_attn.q_proj.weight",
|
| 516 |
+
"model.layers.9.self_attn.q_proj.bias",
|
| 517 |
+
"model.layers.9.self_attn.k_proj.weight",
|
| 518 |
+
"model.layers.9.self_attn.k_proj.bias",
|
| 519 |
+
"model.layers.9.self_attn.v_proj.weight",
|
| 520 |
+
"model.layers.9.self_attn.v_proj.bias",
|
| 521 |
+
"model.layers.9.self_attn.o_proj.weight",
|
| 522 |
+
"model.layers.9.mlp.gate_proj.weight",
|
| 523 |
+
"model.layers.9.mlp.up_proj.weight",
|
| 524 |
+
"model.layers.9.mlp.down_proj.weight",
|
| 525 |
+
"model.layers.9.input_layernorm.weight",
|
| 526 |
+
"model.layers.9.post_attention_layernorm.weight",
|
| 527 |
+
"model.layers.10.self_attn.q_proj.weight",
|
| 528 |
+
"model.layers.10.self_attn.q_proj.bias",
|
| 529 |
+
"model.layers.10.self_attn.k_proj.weight",
|
| 530 |
+
"model.layers.10.self_attn.k_proj.bias",
|
| 531 |
+
"model.layers.10.self_attn.v_proj.weight",
|
| 532 |
+
"model.layers.10.self_attn.v_proj.bias",
|
| 533 |
+
"model.layers.10.self_attn.o_proj.weight",
|
| 534 |
+
"model.layers.10.mlp.gate_proj.weight",
|
| 535 |
+
"model.layers.10.mlp.up_proj.weight",
|
| 536 |
+
"model.layers.10.mlp.down_proj.weight",
|
| 537 |
+
"model.layers.10.input_layernorm.weight",
|
| 538 |
+
"model.layers.10.post_attention_layernorm.weight",
|
| 539 |
+
"model.layers.11.self_attn.q_proj.weight",
|
| 540 |
+
"model.layers.11.self_attn.q_proj.bias",
|
| 541 |
+
"model.layers.11.self_attn.k_proj.weight",
|
| 542 |
+
"model.layers.11.self_attn.k_proj.bias",
|
| 543 |
+
"model.layers.11.self_attn.v_proj.weight",
|
| 544 |
+
"model.layers.11.self_attn.v_proj.bias",
|
| 545 |
+
"model.layers.11.self_attn.o_proj.weight",
|
| 546 |
+
"model.layers.11.mlp.gate_proj.weight",
|
| 547 |
+
"model.layers.11.mlp.up_proj.weight",
|
| 548 |
+
"model.layers.11.mlp.down_proj.weight",
|
| 549 |
+
"model.layers.11.input_layernorm.weight",
|
| 550 |
+
"model.layers.11.post_attention_layernorm.weight",
|
| 551 |
+
"model.layers.12.self_attn.q_proj.weight",
|
| 552 |
+
"model.layers.12.self_attn.q_proj.bias",
|
| 553 |
+
"model.layers.12.self_attn.k_proj.weight",
|
| 554 |
+
"model.layers.12.self_attn.k_proj.bias",
|
| 555 |
+
"model.layers.12.self_attn.v_proj.weight",
|
| 556 |
+
"model.layers.12.self_attn.v_proj.bias",
|
| 557 |
+
"model.layers.12.self_attn.o_proj.weight",
|
| 558 |
+
"model.layers.12.mlp.gate_proj.weight",
|
| 559 |
+
"model.layers.12.mlp.up_proj.weight",
|
| 560 |
+
"model.layers.12.mlp.down_proj.weight",
|
| 561 |
+
"model.layers.12.input_layernorm.weight",
|
| 562 |
+
"model.layers.12.post_attention_layernorm.weight",
|
| 563 |
+
"model.layers.13.self_attn.q_proj.weight",
|
| 564 |
+
"model.layers.13.self_attn.q_proj.bias",
|
| 565 |
+
"model.layers.13.self_attn.k_proj.weight",
|
| 566 |
+
"model.layers.13.self_attn.k_proj.bias",
|
| 567 |
+
"model.layers.13.self_attn.v_proj.weight",
|
| 568 |
+
"model.layers.13.self_attn.v_proj.bias",
|
| 569 |
+
"model.layers.13.self_attn.o_proj.weight",
|
| 570 |
+
"model.layers.13.mlp.gate_proj.weight",
|
| 571 |
+
"model.layers.13.mlp.up_proj.weight",
|
| 572 |
+
"model.layers.13.mlp.down_proj.weight",
|
| 573 |
+
"model.layers.13.input_layernorm.weight",
|
| 574 |
+
"model.layers.13.post_attention_layernorm.weight",
|
| 575 |
+
"model.layers.14.self_attn.q_proj.weight",
|
| 576 |
+
"model.layers.14.self_attn.q_proj.bias",
|
| 577 |
+
"model.layers.14.self_attn.k_proj.weight",
|
| 578 |
+
"model.layers.14.self_attn.k_proj.bias",
|
| 579 |
+
"model.layers.14.self_attn.v_proj.weight",
|
| 580 |
+
"model.layers.14.self_attn.v_proj.bias",
|
| 581 |
+
"model.layers.14.self_attn.o_proj.weight",
|
| 582 |
+
"model.layers.14.mlp.gate_proj.weight",
|
| 583 |
+
"model.layers.14.mlp.up_proj.weight",
|
| 584 |
+
"model.layers.14.mlp.down_proj.weight",
|
| 585 |
+
"model.layers.14.input_layernorm.weight",
|
| 586 |
+
"model.layers.14.post_attention_layernorm.weight",
|
| 587 |
+
"model.layers.15.self_attn.q_proj.weight",
|
| 588 |
+
"model.layers.15.self_attn.q_proj.bias",
|
| 589 |
+
"model.layers.15.self_attn.k_proj.weight",
|
| 590 |
+
"model.layers.15.self_attn.k_proj.bias",
|
| 591 |
+
"model.layers.15.self_attn.v_proj.weight",
|
| 592 |
+
"model.layers.15.self_attn.v_proj.bias",
|
| 593 |
+
"model.layers.15.self_attn.o_proj.weight",
|
| 594 |
+
"model.layers.15.mlp.gate_proj.weight",
|
| 595 |
+
"model.layers.15.mlp.up_proj.weight",
|
| 596 |
+
"model.layers.15.mlp.down_proj.weight",
|
| 597 |
+
"model.layers.15.input_layernorm.weight",
|
| 598 |
+
"model.layers.15.post_attention_layernorm.weight",
|
| 599 |
+
"model.layers.16.self_attn.q_proj.weight",
|
| 600 |
+
"model.layers.16.self_attn.q_proj.bias",
|
| 601 |
+
"model.layers.16.self_attn.k_proj.weight",
|
| 602 |
+
"model.layers.16.self_attn.k_proj.bias",
|
| 603 |
+
"model.layers.16.self_attn.v_proj.weight",
|
| 604 |
+
"model.layers.16.self_attn.v_proj.bias",
|
| 605 |
+
"model.layers.16.self_attn.o_proj.weight",
|
| 606 |
+
"model.layers.16.mlp.gate_proj.weight",
|
| 607 |
+
"model.layers.16.mlp.up_proj.weight",
|
| 608 |
+
"model.layers.16.mlp.down_proj.weight",
|
| 609 |
+
"model.layers.16.input_layernorm.weight",
|
| 610 |
+
"model.layers.16.post_attention_layernorm.weight",
|
| 611 |
+
"model.layers.17.self_attn.q_proj.weight",
|
| 612 |
+
"model.layers.17.self_attn.q_proj.bias",
|
| 613 |
+
"model.layers.17.self_attn.k_proj.weight",
|
| 614 |
+
"model.layers.17.self_attn.k_proj.bias",
|
| 615 |
+
"model.layers.17.self_attn.v_proj.weight",
|
| 616 |
+
"model.layers.17.self_attn.v_proj.bias",
|
| 617 |
+
"model.layers.17.self_attn.o_proj.weight",
|
| 618 |
+
"model.layers.17.mlp.gate_proj.weight",
|
| 619 |
+
"model.layers.17.mlp.up_proj.weight",
|
| 620 |
+
"model.layers.17.mlp.down_proj.weight",
|
| 621 |
+
"model.layers.17.input_layernorm.weight",
|
| 622 |
+
"model.layers.17.post_attention_layernorm.weight",
|
| 623 |
+
"model.layers.18.self_attn.q_proj.weight",
|
| 624 |
+
"model.layers.18.self_attn.q_proj.bias",
|
| 625 |
+
"model.layers.18.self_attn.k_proj.weight",
|
| 626 |
+
"model.layers.18.self_attn.k_proj.bias",
|
| 627 |
+
"model.layers.18.self_attn.v_proj.weight",
|
| 628 |
+
"model.layers.18.self_attn.v_proj.bias",
|
| 629 |
+
"model.layers.18.self_attn.o_proj.weight",
|
| 630 |
+
"model.layers.18.mlp.gate_proj.weight",
|
| 631 |
+
"model.layers.18.mlp.up_proj.weight",
|
| 632 |
+
"model.layers.18.mlp.down_proj.weight",
|
| 633 |
+
"model.layers.18.input_layernorm.weight",
|
| 634 |
+
"model.layers.18.post_attention_layernorm.weight",
|
| 635 |
+
"model.layers.19.self_attn.q_proj.weight",
|
| 636 |
+
"model.layers.19.self_attn.q_proj.bias",
|
| 637 |
+
"model.layers.19.self_attn.k_proj.weight",
|
| 638 |
+
"model.layers.19.self_attn.k_proj.bias",
|
| 639 |
+
"model.layers.19.self_attn.v_proj.weight",
|
| 640 |
+
"model.layers.19.self_attn.v_proj.bias",
|
| 641 |
+
"model.layers.19.self_attn.o_proj.weight",
|
| 642 |
+
"model.layers.19.mlp.gate_proj.weight",
|
| 643 |
+
"model.layers.19.mlp.up_proj.weight",
|
| 644 |
+
"model.layers.19.mlp.down_proj.weight",
|
| 645 |
+
"model.layers.19.input_layernorm.weight",
|
| 646 |
+
"model.layers.19.post_attention_layernorm.weight",
|
| 647 |
+
"model.layers.20.self_attn.q_proj.weight",
|
| 648 |
+
"model.layers.20.self_attn.q_proj.bias",
|
| 649 |
+
"model.layers.20.self_attn.k_proj.weight",
|
| 650 |
+
"model.layers.20.self_attn.k_proj.bias",
|
| 651 |
+
"model.layers.20.self_attn.v_proj.weight",
|
| 652 |
+
"model.layers.20.self_attn.v_proj.bias",
|
| 653 |
+
"model.layers.20.self_attn.o_proj.weight",
|
| 654 |
+
"model.layers.20.mlp.gate_proj.weight",
|
| 655 |
+
"model.layers.20.mlp.up_proj.weight",
|
| 656 |
+
"model.layers.20.mlp.down_proj.weight",
|
| 657 |
+
"model.layers.20.input_layernorm.weight",
|
| 658 |
+
"model.layers.20.post_attention_layernorm.weight",
|
| 659 |
+
"model.layers.21.self_attn.q_proj.weight",
|
| 660 |
+
"model.layers.21.self_attn.q_proj.bias",
|
| 661 |
+
"model.layers.21.self_attn.k_proj.weight",
|
| 662 |
+
"model.layers.21.self_attn.k_proj.bias",
|
| 663 |
+
"model.layers.21.self_attn.v_proj.weight",
|
| 664 |
+
"model.layers.21.self_attn.v_proj.bias",
|
| 665 |
+
"model.layers.21.self_attn.o_proj.weight",
|
| 666 |
+
"model.layers.21.mlp.gate_proj.weight",
|
| 667 |
+
"model.layers.21.mlp.up_proj.weight",
|
| 668 |
+
"model.layers.21.mlp.down_proj.weight",
|
| 669 |
+
"model.layers.21.input_layernorm.weight",
|
| 670 |
+
"model.layers.21.post_attention_layernorm.weight",
|
| 671 |
+
"model.layers.22.self_attn.q_proj.weight",
|
| 672 |
+
"model.layers.22.self_attn.q_proj.bias",
|
| 673 |
+
"model.layers.22.self_attn.k_proj.weight",
|
| 674 |
+
"model.layers.22.self_attn.k_proj.bias",
|
| 675 |
+
"model.layers.22.self_attn.v_proj.weight",
|
| 676 |
+
"model.layers.22.self_attn.v_proj.bias",
|
| 677 |
+
"model.layers.22.self_attn.o_proj.weight",
|
| 678 |
+
"model.layers.22.mlp.gate_proj.weight",
|
| 679 |
+
"model.layers.22.mlp.up_proj.weight",
|
| 680 |
+
"model.layers.22.mlp.down_proj.weight",
|
| 681 |
+
"model.layers.22.input_layernorm.weight",
|
| 682 |
+
"model.layers.22.post_attention_layernorm.weight",
|
| 683 |
+
"model.layers.23.self_attn.q_proj.weight",
|
| 684 |
+
"model.layers.23.self_attn.q_proj.bias",
|
| 685 |
+
"model.layers.23.self_attn.k_proj.weight",
|
| 686 |
+
"model.layers.23.self_attn.k_proj.bias",
|
| 687 |
+
"model.layers.23.self_attn.v_proj.weight",
|
| 688 |
+
"model.layers.23.self_attn.v_proj.bias",
|
| 689 |
+
"model.layers.23.self_attn.o_proj.weight",
|
| 690 |
+
"model.layers.23.mlp.gate_proj.weight",
|
| 691 |
+
"model.layers.23.mlp.up_proj.weight",
|
| 692 |
+
"model.layers.23.mlp.down_proj.weight",
|
| 693 |
+
"model.layers.23.input_layernorm.weight",
|
| 694 |
+
"model.layers.23.post_attention_layernorm.weight",
|
| 695 |
+
"model.layers.24.self_attn.q_proj.weight",
|
| 696 |
+
"model.layers.24.self_attn.q_proj.bias",
|
| 697 |
+
"model.layers.24.self_attn.k_proj.weight",
|
| 698 |
+
"model.layers.24.self_attn.k_proj.bias",
|
| 699 |
+
"model.layers.24.self_attn.v_proj.weight",
|
| 700 |
+
"model.layers.24.self_attn.v_proj.bias",
|
| 701 |
+
"model.layers.24.self_attn.o_proj.weight",
|
| 702 |
+
"model.layers.24.mlp.gate_proj.weight",
|
| 703 |
+
"model.layers.24.mlp.up_proj.weight",
|
| 704 |
+
"model.layers.24.mlp.down_proj.weight",
|
| 705 |
+
"model.layers.24.input_layernorm.weight",
|
| 706 |
+
"model.layers.24.post_attention_layernorm.weight",
|
| 707 |
+
"model.layers.25.self_attn.q_proj.weight",
|
| 708 |
+
"model.layers.25.self_attn.q_proj.bias",
|
| 709 |
+
"model.layers.25.self_attn.k_proj.weight",
|
| 710 |
+
"model.layers.25.self_attn.k_proj.bias",
|
| 711 |
+
"model.layers.25.self_attn.v_proj.weight",
|
| 712 |
+
"model.layers.25.self_attn.v_proj.bias",
|
| 713 |
+
"model.layers.25.self_attn.o_proj.weight",
|
| 714 |
+
"model.layers.25.mlp.gate_proj.weight",
|
| 715 |
+
"model.layers.25.mlp.up_proj.weight",
|
| 716 |
+
"model.layers.25.mlp.down_proj.weight",
|
| 717 |
+
"model.layers.25.input_layernorm.weight",
|
| 718 |
+
"model.layers.25.post_attention_layernorm.weight",
|
| 719 |
+
"model.layers.26.self_attn.q_proj.weight",
|
| 720 |
+
"model.layers.26.self_attn.q_proj.bias",
|
| 721 |
+
"model.layers.26.self_attn.k_proj.weight",
|
| 722 |
+
"model.layers.26.self_attn.k_proj.bias",
|
| 723 |
+
"model.layers.26.self_attn.v_proj.weight",
|
| 724 |
+
"model.layers.26.self_attn.v_proj.bias",
|
| 725 |
+
"model.layers.26.self_attn.o_proj.weight",
|
| 726 |
+
"model.layers.26.mlp.gate_proj.weight",
|
| 727 |
+
"model.layers.26.mlp.up_proj.weight",
|
| 728 |
+
"model.layers.26.mlp.down_proj.weight",
|
| 729 |
+
"model.layers.26.input_layernorm.weight",
|
| 730 |
+
"model.layers.26.post_attention_layernorm.weight",
|
| 731 |
+
"model.layers.27.self_attn.q_proj.weight",
|
| 732 |
+
"model.layers.27.self_attn.q_proj.bias",
|
| 733 |
+
"model.layers.27.self_attn.k_proj.weight",
|
| 734 |
+
"model.layers.27.self_attn.k_proj.bias",
|
| 735 |
+
"model.layers.27.self_attn.v_proj.weight",
|
| 736 |
+
"model.layers.27.self_attn.v_proj.bias",
|
| 737 |
+
"model.layers.27.self_attn.o_proj.weight",
|
| 738 |
+
"model.layers.27.mlp.gate_proj.weight",
|
| 739 |
+
"model.layers.27.mlp.up_proj.weight",
|
| 740 |
+
"model.layers.27.mlp.down_proj.weight",
|
| 741 |
+
"model.layers.27.input_layernorm.weight",
|
| 742 |
+
"model.layers.27.post_attention_layernorm.weight",
|
| 743 |
+
"model.layers.28.self_attn.q_proj.weight",
|
| 744 |
+
"model.layers.28.self_attn.q_proj.bias",
|
| 745 |
+
"model.layers.28.self_attn.k_proj.weight",
|
| 746 |
+
"model.layers.28.self_attn.k_proj.bias",
|
| 747 |
+
"model.layers.28.self_attn.v_proj.weight",
|
| 748 |
+
"model.layers.28.self_attn.v_proj.bias",
|
| 749 |
+
"model.layers.28.self_attn.o_proj.weight",
|
| 750 |
+
"model.layers.28.mlp.gate_proj.weight",
|
| 751 |
+
"model.layers.28.mlp.up_proj.weight",
|
| 752 |
+
"model.layers.28.mlp.down_proj.weight",
|
| 753 |
+
"model.layers.28.input_layernorm.weight",
|
| 754 |
+
"model.layers.28.post_attention_layernorm.weight",
|
| 755 |
+
"model.layers.29.self_attn.q_proj.weight",
|
| 756 |
+
"model.layers.29.self_attn.q_proj.bias",
|
| 757 |
+
"model.layers.29.self_attn.k_proj.weight",
|
| 758 |
+
"model.layers.29.self_attn.k_proj.bias",
|
| 759 |
+
"model.layers.29.self_attn.v_proj.weight",
|
| 760 |
+
"model.layers.29.self_attn.v_proj.bias",
|
| 761 |
+
"model.layers.29.self_attn.o_proj.weight",
|
| 762 |
+
"model.layers.29.mlp.gate_proj.weight",
|
| 763 |
+
"model.layers.29.mlp.up_proj.weight",
|
| 764 |
+
"model.layers.29.mlp.down_proj.weight",
|
| 765 |
+
"model.layers.29.input_layernorm.weight",
|
| 766 |
+
"model.layers.29.post_attention_layernorm.weight",
|
| 767 |
+
"model.layers.30.self_attn.q_proj.weight",
|
| 768 |
+
"model.layers.30.self_attn.q_proj.bias",
|
| 769 |
+
"model.layers.30.self_attn.k_proj.weight",
|
| 770 |
+
"model.layers.30.self_attn.k_proj.bias",
|
| 771 |
+
"model.layers.30.self_attn.v_proj.weight",
|
| 772 |
+
"model.layers.30.self_attn.v_proj.bias",
|
| 773 |
+
"model.layers.30.self_attn.o_proj.weight",
|
| 774 |
+
"model.layers.30.mlp.gate_proj.weight",
|
| 775 |
+
"model.layers.30.mlp.up_proj.weight",
|
| 776 |
+
"model.layers.30.mlp.down_proj.weight",
|
| 777 |
+
"model.layers.30.input_layernorm.weight",
|
| 778 |
+
"model.layers.30.post_attention_layernorm.weight",
|
| 779 |
+
"model.layers.31.self_attn.q_proj.weight",
|
| 780 |
+
"model.layers.31.self_attn.q_proj.bias",
|
| 781 |
+
"model.layers.31.self_attn.k_proj.weight",
|
| 782 |
+
"model.layers.31.self_attn.k_proj.bias",
|
| 783 |
+
"model.layers.31.self_attn.v_proj.weight",
|
| 784 |
+
"model.layers.31.self_attn.v_proj.bias",
|
| 785 |
+
"model.layers.31.self_attn.o_proj.weight",
|
| 786 |
+
"model.layers.31.mlp.gate_proj.weight",
|
| 787 |
+
"model.layers.31.mlp.up_proj.weight",
|
| 788 |
+
"model.layers.31.mlp.down_proj.weight",
|
| 789 |
+
"model.layers.31.input_layernorm.weight",
|
| 790 |
+
"model.layers.31.post_attention_layernorm.weight",
|
| 791 |
+
"model.layers.32.self_attn.q_proj.weight",
|
| 792 |
+
"model.layers.32.self_attn.q_proj.bias",
|
| 793 |
+
"model.layers.32.self_attn.k_proj.weight",
|
| 794 |
+
"model.layers.32.self_attn.k_proj.bias",
|
| 795 |
+
"model.layers.32.self_attn.v_proj.weight",
|
| 796 |
+
"model.layers.32.self_attn.v_proj.bias",
|
| 797 |
+
"model.layers.32.self_attn.o_proj.weight",
|
| 798 |
+
"model.layers.32.mlp.gate_proj.weight",
|
| 799 |
+
"model.layers.32.mlp.up_proj.weight",
|
| 800 |
+
"model.layers.32.mlp.down_proj.weight",
|
| 801 |
+
"model.layers.32.input_layernorm.weight",
|
| 802 |
+
"model.layers.32.post_attention_layernorm.weight",
|
| 803 |
+
"model.layers.33.self_attn.q_proj.weight",
|
| 804 |
+
"model.layers.33.self_attn.q_proj.bias",
|
| 805 |
+
"model.layers.33.self_attn.k_proj.weight",
|
| 806 |
+
"model.layers.33.self_attn.k_proj.bias",
|
| 807 |
+
"model.layers.33.self_attn.v_proj.weight",
|
| 808 |
+
"model.layers.33.self_attn.v_proj.bias",
|
| 809 |
+
"model.layers.33.self_attn.o_proj.weight",
|
| 810 |
+
"model.layers.33.mlp.gate_proj.weight",
|
| 811 |
+
"model.layers.33.mlp.up_proj.weight",
|
| 812 |
+
"model.layers.33.mlp.down_proj.weight",
|
| 813 |
+
"model.layers.33.input_layernorm.weight",
|
| 814 |
+
"model.layers.33.post_attention_layernorm.weight",
|
| 815 |
+
"model.layers.34.self_attn.q_proj.weight",
|
| 816 |
+
"model.layers.34.self_attn.q_proj.bias",
|
| 817 |
+
"model.layers.34.self_attn.k_proj.weight",
|
| 818 |
+
"model.layers.34.self_attn.k_proj.bias",
|
| 819 |
+
"model.layers.34.self_attn.v_proj.weight",
|
| 820 |
+
"model.layers.34.self_attn.v_proj.bias",
|
| 821 |
+
"model.layers.34.self_attn.o_proj.weight",
|
| 822 |
+
"model.layers.34.mlp.gate_proj.weight",
|
| 823 |
+
"model.layers.34.mlp.up_proj.weight",
|
| 824 |
+
"model.layers.34.mlp.down_proj.weight",
|
| 825 |
+
"model.layers.34.input_layernorm.weight",
|
| 826 |
+
"model.layers.34.post_attention_layernorm.weight",
|
| 827 |
+
"model.layers.35.self_attn.q_proj.weight",
|
| 828 |
+
"model.layers.35.self_attn.q_proj.bias",
|
| 829 |
+
"model.layers.35.self_attn.k_proj.weight",
|
| 830 |
+
"model.layers.35.self_attn.k_proj.bias",
|
| 831 |
+
"model.layers.35.self_attn.v_proj.weight",
|
| 832 |
+
"model.layers.35.self_attn.v_proj.bias",
|
| 833 |
+
"model.layers.35.self_attn.o_proj.weight",
|
| 834 |
+
"model.layers.35.mlp.gate_proj.weight",
|
| 835 |
+
"model.layers.35.mlp.up_proj.weight",
|
| 836 |
+
"model.layers.35.mlp.down_proj.weight",
|
| 837 |
+
"model.layers.35.input_layernorm.weight",
|
| 838 |
+
"model.layers.35.post_attention_layernorm.weight",
|
| 839 |
+
"model.norm.weight",
|
| 840 |
+
"lm_head.weight"
|
| 841 |
+
]
|
| 842 |
+
}
|
11video_r1_vllm_model_keys.json
ADDED
|
@@ -0,0 +1,661 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"total": 644,
|
| 3 |
+
"first_10": [
|
| 4 |
+
"visual.patch_embed.proj.weight",
|
| 5 |
+
"visual.blocks.0.norm1.weight",
|
| 6 |
+
"visual.blocks.0.norm2.weight",
|
| 7 |
+
"visual.blocks.0.attn.qkv.weight",
|
| 8 |
+
"visual.blocks.0.attn.qkv.bias",
|
| 9 |
+
"visual.blocks.0.attn.proj.weight",
|
| 10 |
+
"visual.blocks.0.attn.proj.bias",
|
| 11 |
+
"visual.blocks.0.mlp.gate_proj.weight",
|
| 12 |
+
"visual.blocks.0.mlp.gate_proj.bias",
|
| 13 |
+
"visual.blocks.0.mlp.up_proj.weight"
|
| 14 |
+
],
|
| 15 |
+
"all_keys": [
|
| 16 |
+
"visual.patch_embed.proj.weight",
|
| 17 |
+
"visual.blocks.0.norm1.weight",
|
| 18 |
+
"visual.blocks.0.norm2.weight",
|
| 19 |
+
"visual.blocks.0.attn.qkv.weight",
|
| 20 |
+
"visual.blocks.0.attn.qkv.bias",
|
| 21 |
+
"visual.blocks.0.attn.proj.weight",
|
| 22 |
+
"visual.blocks.0.attn.proj.bias",
|
| 23 |
+
"visual.blocks.0.mlp.gate_proj.weight",
|
| 24 |
+
"visual.blocks.0.mlp.gate_proj.bias",
|
| 25 |
+
"visual.blocks.0.mlp.up_proj.weight",
|
| 26 |
+
"visual.blocks.0.mlp.up_proj.bias",
|
| 27 |
+
"visual.blocks.0.mlp.down_proj.weight",
|
| 28 |
+
"visual.blocks.0.mlp.down_proj.bias",
|
| 29 |
+
"visual.blocks.1.norm1.weight",
|
| 30 |
+
"visual.blocks.1.norm2.weight",
|
| 31 |
+
"visual.blocks.1.attn.qkv.weight",
|
| 32 |
+
"visual.blocks.1.attn.qkv.bias",
|
| 33 |
+
"visual.blocks.1.attn.proj.weight",
|
| 34 |
+
"visual.blocks.1.attn.proj.bias",
|
| 35 |
+
"visual.blocks.1.mlp.gate_proj.weight",
|
| 36 |
+
"visual.blocks.1.mlp.gate_proj.bias",
|
| 37 |
+
"visual.blocks.1.mlp.up_proj.weight",
|
| 38 |
+
"visual.blocks.1.mlp.up_proj.bias",
|
| 39 |
+
"visual.blocks.1.mlp.down_proj.weight",
|
| 40 |
+
"visual.blocks.1.mlp.down_proj.bias",
|
| 41 |
+
"visual.blocks.2.norm1.weight",
|
| 42 |
+
"visual.blocks.2.norm2.weight",
|
| 43 |
+
"visual.blocks.2.attn.qkv.weight",
|
| 44 |
+
"visual.blocks.2.attn.qkv.bias",
|
| 45 |
+
"visual.blocks.2.attn.proj.weight",
|
| 46 |
+
"visual.blocks.2.attn.proj.bias",
|
| 47 |
+
"visual.blocks.2.mlp.gate_proj.weight",
|
| 48 |
+
"visual.blocks.2.mlp.gate_proj.bias",
|
| 49 |
+
"visual.blocks.2.mlp.up_proj.weight",
|
| 50 |
+
"visual.blocks.2.mlp.up_proj.bias",
|
| 51 |
+
"visual.blocks.2.mlp.down_proj.weight",
|
| 52 |
+
"visual.blocks.2.mlp.down_proj.bias",
|
| 53 |
+
"visual.blocks.3.norm1.weight",
|
| 54 |
+
"visual.blocks.3.norm2.weight",
|
| 55 |
+
"visual.blocks.3.attn.qkv.weight",
|
| 56 |
+
"visual.blocks.3.attn.qkv.bias",
|
| 57 |
+
"visual.blocks.3.attn.proj.weight",
|
| 58 |
+
"visual.blocks.3.attn.proj.bias",
|
| 59 |
+
"visual.blocks.3.mlp.gate_proj.weight",
|
| 60 |
+
"visual.blocks.3.mlp.gate_proj.bias",
|
| 61 |
+
"visual.blocks.3.mlp.up_proj.weight",
|
| 62 |
+
"visual.blocks.3.mlp.up_proj.bias",
|
| 63 |
+
"visual.blocks.3.mlp.down_proj.weight",
|
| 64 |
+
"visual.blocks.3.mlp.down_proj.bias",
|
| 65 |
+
"visual.blocks.4.norm1.weight",
|
| 66 |
+
"visual.blocks.4.norm2.weight",
|
| 67 |
+
"visual.blocks.4.attn.qkv.weight",
|
| 68 |
+
"visual.blocks.4.attn.qkv.bias",
|
| 69 |
+
"visual.blocks.4.attn.proj.weight",
|
| 70 |
+
"visual.blocks.4.attn.proj.bias",
|
| 71 |
+
"visual.blocks.4.mlp.gate_proj.weight",
|
| 72 |
+
"visual.blocks.4.mlp.gate_proj.bias",
|
| 73 |
+
"visual.blocks.4.mlp.up_proj.weight",
|
| 74 |
+
"visual.blocks.4.mlp.up_proj.bias",
|
| 75 |
+
"visual.blocks.4.mlp.down_proj.weight",
|
| 76 |
+
"visual.blocks.4.mlp.down_proj.bias",
|
| 77 |
+
"visual.blocks.5.norm1.weight",
|
| 78 |
+
"visual.blocks.5.norm2.weight",
|
| 79 |
+
"visual.blocks.5.attn.qkv.weight",
|
| 80 |
+
"visual.blocks.5.attn.qkv.bias",
|
| 81 |
+
"visual.blocks.5.attn.proj.weight",
|
| 82 |
+
"visual.blocks.5.attn.proj.bias",
|
| 83 |
+
"visual.blocks.5.mlp.gate_proj.weight",
|
| 84 |
+
"visual.blocks.5.mlp.gate_proj.bias",
|
| 85 |
+
"visual.blocks.5.mlp.up_proj.weight",
|
| 86 |
+
"visual.blocks.5.mlp.up_proj.bias",
|
| 87 |
+
"visual.blocks.5.mlp.down_proj.weight",
|
| 88 |
+
"visual.blocks.5.mlp.down_proj.bias",
|
| 89 |
+
"visual.blocks.6.norm1.weight",
|
| 90 |
+
"visual.blocks.6.norm2.weight",
|
| 91 |
+
"visual.blocks.6.attn.qkv.weight",
|
| 92 |
+
"visual.blocks.6.attn.qkv.bias",
|
| 93 |
+
"visual.blocks.6.attn.proj.weight",
|
| 94 |
+
"visual.blocks.6.attn.proj.bias",
|
| 95 |
+
"visual.blocks.6.mlp.gate_proj.weight",
|
| 96 |
+
"visual.blocks.6.mlp.gate_proj.bias",
|
| 97 |
+
"visual.blocks.6.mlp.up_proj.weight",
|
| 98 |
+
"visual.blocks.6.mlp.up_proj.bias",
|
| 99 |
+
"visual.blocks.6.mlp.down_proj.weight",
|
| 100 |
+
"visual.blocks.6.mlp.down_proj.bias",
|
| 101 |
+
"visual.blocks.7.norm1.weight",
|
| 102 |
+
"visual.blocks.7.norm2.weight",
|
| 103 |
+
"visual.blocks.7.attn.qkv.weight",
|
| 104 |
+
"visual.blocks.7.attn.qkv.bias",
|
| 105 |
+
"visual.blocks.7.attn.proj.weight",
|
| 106 |
+
"visual.blocks.7.attn.proj.bias",
|
| 107 |
+
"visual.blocks.7.mlp.gate_proj.weight",
|
| 108 |
+
"visual.blocks.7.mlp.gate_proj.bias",
|
| 109 |
+
"visual.blocks.7.mlp.up_proj.weight",
|
| 110 |
+
"visual.blocks.7.mlp.up_proj.bias",
|
| 111 |
+
"visual.blocks.7.mlp.down_proj.weight",
|
| 112 |
+
"visual.blocks.7.mlp.down_proj.bias",
|
| 113 |
+
"visual.blocks.8.norm1.weight",
|
| 114 |
+
"visual.blocks.8.norm2.weight",
|
| 115 |
+
"visual.blocks.8.attn.qkv.weight",
|
| 116 |
+
"visual.blocks.8.attn.qkv.bias",
|
| 117 |
+
"visual.blocks.8.attn.proj.weight",
|
| 118 |
+
"visual.blocks.8.attn.proj.bias",
|
| 119 |
+
"visual.blocks.8.mlp.gate_proj.weight",
|
| 120 |
+
"visual.blocks.8.mlp.gate_proj.bias",
|
| 121 |
+
"visual.blocks.8.mlp.up_proj.weight",
|
| 122 |
+
"visual.blocks.8.mlp.up_proj.bias",
|
| 123 |
+
"visual.blocks.8.mlp.down_proj.weight",
|
| 124 |
+
"visual.blocks.8.mlp.down_proj.bias",
|
| 125 |
+
"visual.blocks.9.norm1.weight",
|
| 126 |
+
"visual.blocks.9.norm2.weight",
|
| 127 |
+
"visual.blocks.9.attn.qkv.weight",
|
| 128 |
+
"visual.blocks.9.attn.qkv.bias",
|
| 129 |
+
"visual.blocks.9.attn.proj.weight",
|
| 130 |
+
"visual.blocks.9.attn.proj.bias",
|
| 131 |
+
"visual.blocks.9.mlp.gate_proj.weight",
|
| 132 |
+
"visual.blocks.9.mlp.gate_proj.bias",
|
| 133 |
+
"visual.blocks.9.mlp.up_proj.weight",
|
| 134 |
+
"visual.blocks.9.mlp.up_proj.bias",
|
| 135 |
+
"visual.blocks.9.mlp.down_proj.weight",
|
| 136 |
+
"visual.blocks.9.mlp.down_proj.bias",
|
| 137 |
+
"visual.blocks.10.norm1.weight",
|
| 138 |
+
"visual.blocks.10.norm2.weight",
|
| 139 |
+
"visual.blocks.10.attn.qkv.weight",
|
| 140 |
+
"visual.blocks.10.attn.qkv.bias",
|
| 141 |
+
"visual.blocks.10.attn.proj.weight",
|
| 142 |
+
"visual.blocks.10.attn.proj.bias",
|
| 143 |
+
"visual.blocks.10.mlp.gate_proj.weight",
|
| 144 |
+
"visual.blocks.10.mlp.gate_proj.bias",
|
| 145 |
+
"visual.blocks.10.mlp.up_proj.weight",
|
| 146 |
+
"visual.blocks.10.mlp.up_proj.bias",
|
| 147 |
+
"visual.blocks.10.mlp.down_proj.weight",
|
| 148 |
+
"visual.blocks.10.mlp.down_proj.bias",
|
| 149 |
+
"visual.blocks.11.norm1.weight",
|
| 150 |
+
"visual.blocks.11.norm2.weight",
|
| 151 |
+
"visual.blocks.11.attn.qkv.weight",
|
| 152 |
+
"visual.blocks.11.attn.qkv.bias",
|
| 153 |
+
"visual.blocks.11.attn.proj.weight",
|
| 154 |
+
"visual.blocks.11.attn.proj.bias",
|
| 155 |
+
"visual.blocks.11.mlp.gate_proj.weight",
|
| 156 |
+
"visual.blocks.11.mlp.gate_proj.bias",
|
| 157 |
+
"visual.blocks.11.mlp.up_proj.weight",
|
| 158 |
+
"visual.blocks.11.mlp.up_proj.bias",
|
| 159 |
+
"visual.blocks.11.mlp.down_proj.weight",
|
| 160 |
+
"visual.blocks.11.mlp.down_proj.bias",
|
| 161 |
+
"visual.blocks.12.norm1.weight",
|
| 162 |
+
"visual.blocks.12.norm2.weight",
|
| 163 |
+
"visual.blocks.12.attn.qkv.weight",
|
| 164 |
+
"visual.blocks.12.attn.qkv.bias",
|
| 165 |
+
"visual.blocks.12.attn.proj.weight",
|
| 166 |
+
"visual.blocks.12.attn.proj.bias",
|
| 167 |
+
"visual.blocks.12.mlp.gate_proj.weight",
|
| 168 |
+
"visual.blocks.12.mlp.gate_proj.bias",
|
| 169 |
+
"visual.blocks.12.mlp.up_proj.weight",
|
| 170 |
+
"visual.blocks.12.mlp.up_proj.bias",
|
| 171 |
+
"visual.blocks.12.mlp.down_proj.weight",
|
| 172 |
+
"visual.blocks.12.mlp.down_proj.bias",
|
| 173 |
+
"visual.blocks.13.norm1.weight",
|
| 174 |
+
"visual.blocks.13.norm2.weight",
|
| 175 |
+
"visual.blocks.13.attn.qkv.weight",
|
| 176 |
+
"visual.blocks.13.attn.qkv.bias",
|
| 177 |
+
"visual.blocks.13.attn.proj.weight",
|
| 178 |
+
"visual.blocks.13.attn.proj.bias",
|
| 179 |
+
"visual.blocks.13.mlp.gate_proj.weight",
|
| 180 |
+
"visual.blocks.13.mlp.gate_proj.bias",
|
| 181 |
+
"visual.blocks.13.mlp.up_proj.weight",
|
| 182 |
+
"visual.blocks.13.mlp.up_proj.bias",
|
| 183 |
+
"visual.blocks.13.mlp.down_proj.weight",
|
| 184 |
+
"visual.blocks.13.mlp.down_proj.bias",
|
| 185 |
+
"visual.blocks.14.norm1.weight",
|
| 186 |
+
"visual.blocks.14.norm2.weight",
|
| 187 |
+
"visual.blocks.14.attn.qkv.weight",
|
| 188 |
+
"visual.blocks.14.attn.qkv.bias",
|
| 189 |
+
"visual.blocks.14.attn.proj.weight",
|
| 190 |
+
"visual.blocks.14.attn.proj.bias",
|
| 191 |
+
"visual.blocks.14.mlp.gate_proj.weight",
|
| 192 |
+
"visual.blocks.14.mlp.gate_proj.bias",
|
| 193 |
+
"visual.blocks.14.mlp.up_proj.weight",
|
| 194 |
+
"visual.blocks.14.mlp.up_proj.bias",
|
| 195 |
+
"visual.blocks.14.mlp.down_proj.weight",
|
| 196 |
+
"visual.blocks.14.mlp.down_proj.bias",
|
| 197 |
+
"visual.blocks.15.norm1.weight",
|
| 198 |
+
"visual.blocks.15.norm2.weight",
|
| 199 |
+
"visual.blocks.15.attn.qkv.weight",
|
| 200 |
+
"visual.blocks.15.attn.qkv.bias",
|
| 201 |
+
"visual.blocks.15.attn.proj.weight",
|
| 202 |
+
"visual.blocks.15.attn.proj.bias",
|
| 203 |
+
"visual.blocks.15.mlp.gate_proj.weight",
|
| 204 |
+
"visual.blocks.15.mlp.gate_proj.bias",
|
| 205 |
+
"visual.blocks.15.mlp.up_proj.weight",
|
| 206 |
+
"visual.blocks.15.mlp.up_proj.bias",
|
| 207 |
+
"visual.blocks.15.mlp.down_proj.weight",
|
| 208 |
+
"visual.blocks.15.mlp.down_proj.bias",
|
| 209 |
+
"visual.blocks.16.norm1.weight",
|
| 210 |
+
"visual.blocks.16.norm2.weight",
|
| 211 |
+
"visual.blocks.16.attn.qkv.weight",
|
| 212 |
+
"visual.blocks.16.attn.qkv.bias",
|
| 213 |
+
"visual.blocks.16.attn.proj.weight",
|
| 214 |
+
"visual.blocks.16.attn.proj.bias",
|
| 215 |
+
"visual.blocks.16.mlp.gate_proj.weight",
|
| 216 |
+
"visual.blocks.16.mlp.gate_proj.bias",
|
| 217 |
+
"visual.blocks.16.mlp.up_proj.weight",
|
| 218 |
+
"visual.blocks.16.mlp.up_proj.bias",
|
| 219 |
+
"visual.blocks.16.mlp.down_proj.weight",
|
| 220 |
+
"visual.blocks.16.mlp.down_proj.bias",
|
| 221 |
+
"visual.blocks.17.norm1.weight",
|
| 222 |
+
"visual.blocks.17.norm2.weight",
|
| 223 |
+
"visual.blocks.17.attn.qkv.weight",
|
| 224 |
+
"visual.blocks.17.attn.qkv.bias",
|
| 225 |
+
"visual.blocks.17.attn.proj.weight",
|
| 226 |
+
"visual.blocks.17.attn.proj.bias",
|
| 227 |
+
"visual.blocks.17.mlp.gate_proj.weight",
|
| 228 |
+
"visual.blocks.17.mlp.gate_proj.bias",
|
| 229 |
+
"visual.blocks.17.mlp.up_proj.weight",
|
| 230 |
+
"visual.blocks.17.mlp.up_proj.bias",
|
| 231 |
+
"visual.blocks.17.mlp.down_proj.weight",
|
| 232 |
+
"visual.blocks.17.mlp.down_proj.bias",
|
| 233 |
+
"visual.blocks.18.norm1.weight",
|
| 234 |
+
"visual.blocks.18.norm2.weight",
|
| 235 |
+
"visual.blocks.18.attn.qkv.weight",
|
| 236 |
+
"visual.blocks.18.attn.qkv.bias",
|
| 237 |
+
"visual.blocks.18.attn.proj.weight",
|
| 238 |
+
"visual.blocks.18.attn.proj.bias",
|
| 239 |
+
"visual.blocks.18.mlp.gate_proj.weight",
|
| 240 |
+
"visual.blocks.18.mlp.gate_proj.bias",
|
| 241 |
+
"visual.blocks.18.mlp.up_proj.weight",
|
| 242 |
+
"visual.blocks.18.mlp.up_proj.bias",
|
| 243 |
+
"visual.blocks.18.mlp.down_proj.weight",
|
| 244 |
+
"visual.blocks.18.mlp.down_proj.bias",
|
| 245 |
+
"visual.blocks.19.norm1.weight",
|
| 246 |
+
"visual.blocks.19.norm2.weight",
|
| 247 |
+
"visual.blocks.19.attn.qkv.weight",
|
| 248 |
+
"visual.blocks.19.attn.qkv.bias",
|
| 249 |
+
"visual.blocks.19.attn.proj.weight",
|
| 250 |
+
"visual.blocks.19.attn.proj.bias",
|
| 251 |
+
"visual.blocks.19.mlp.gate_proj.weight",
|
| 252 |
+
"visual.blocks.19.mlp.gate_proj.bias",
|
| 253 |
+
"visual.blocks.19.mlp.up_proj.weight",
|
| 254 |
+
"visual.blocks.19.mlp.up_proj.bias",
|
| 255 |
+
"visual.blocks.19.mlp.down_proj.weight",
|
| 256 |
+
"visual.blocks.19.mlp.down_proj.bias",
|
| 257 |
+
"visual.blocks.20.norm1.weight",
|
| 258 |
+
"visual.blocks.20.norm2.weight",
|
| 259 |
+
"visual.blocks.20.attn.qkv.weight",
|
| 260 |
+
"visual.blocks.20.attn.qkv.bias",
|
| 261 |
+
"visual.blocks.20.attn.proj.weight",
|
| 262 |
+
"visual.blocks.20.attn.proj.bias",
|
| 263 |
+
"visual.blocks.20.mlp.gate_proj.weight",
|
| 264 |
+
"visual.blocks.20.mlp.gate_proj.bias",
|
| 265 |
+
"visual.blocks.20.mlp.up_proj.weight",
|
| 266 |
+
"visual.blocks.20.mlp.up_proj.bias",
|
| 267 |
+
"visual.blocks.20.mlp.down_proj.weight",
|
| 268 |
+
"visual.blocks.20.mlp.down_proj.bias",
|
| 269 |
+
"visual.blocks.21.norm1.weight",
|
| 270 |
+
"visual.blocks.21.norm2.weight",
|
| 271 |
+
"visual.blocks.21.attn.qkv.weight",
|
| 272 |
+
"visual.blocks.21.attn.qkv.bias",
|
| 273 |
+
"visual.blocks.21.attn.proj.weight",
|
| 274 |
+
"visual.blocks.21.attn.proj.bias",
|
| 275 |
+
"visual.blocks.21.mlp.gate_proj.weight",
|
| 276 |
+
"visual.blocks.21.mlp.gate_proj.bias",
|
| 277 |
+
"visual.blocks.21.mlp.up_proj.weight",
|
| 278 |
+
"visual.blocks.21.mlp.up_proj.bias",
|
| 279 |
+
"visual.blocks.21.mlp.down_proj.weight",
|
| 280 |
+
"visual.blocks.21.mlp.down_proj.bias",
|
| 281 |
+
"visual.blocks.22.norm1.weight",
|
| 282 |
+
"visual.blocks.22.norm2.weight",
|
| 283 |
+
"visual.blocks.22.attn.qkv.weight",
|
| 284 |
+
"visual.blocks.22.attn.qkv.bias",
|
| 285 |
+
"visual.blocks.22.attn.proj.weight",
|
| 286 |
+
"visual.blocks.22.attn.proj.bias",
|
| 287 |
+
"visual.blocks.22.mlp.gate_proj.weight",
|
| 288 |
+
"visual.blocks.22.mlp.gate_proj.bias",
|
| 289 |
+
"visual.blocks.22.mlp.up_proj.weight",
|
| 290 |
+
"visual.blocks.22.mlp.up_proj.bias",
|
| 291 |
+
"visual.blocks.22.mlp.down_proj.weight",
|
| 292 |
+
"visual.blocks.22.mlp.down_proj.bias",
|
| 293 |
+
"visual.blocks.23.norm1.weight",
|
| 294 |
+
"visual.blocks.23.norm2.weight",
|
| 295 |
+
"visual.blocks.23.attn.qkv.weight",
|
| 296 |
+
"visual.blocks.23.attn.qkv.bias",
|
| 297 |
+
"visual.blocks.23.attn.proj.weight",
|
| 298 |
+
"visual.blocks.23.attn.proj.bias",
|
| 299 |
+
"visual.blocks.23.mlp.gate_proj.weight",
|
| 300 |
+
"visual.blocks.23.mlp.gate_proj.bias",
|
| 301 |
+
"visual.blocks.23.mlp.up_proj.weight",
|
| 302 |
+
"visual.blocks.23.mlp.up_proj.bias",
|
| 303 |
+
"visual.blocks.23.mlp.down_proj.weight",
|
| 304 |
+
"visual.blocks.23.mlp.down_proj.bias",
|
| 305 |
+
"visual.blocks.24.norm1.weight",
|
| 306 |
+
"visual.blocks.24.norm2.weight",
|
| 307 |
+
"visual.blocks.24.attn.qkv.weight",
|
| 308 |
+
"visual.blocks.24.attn.qkv.bias",
|
| 309 |
+
"visual.blocks.24.attn.proj.weight",
|
| 310 |
+
"visual.blocks.24.attn.proj.bias",
|
| 311 |
+
"visual.blocks.24.mlp.gate_proj.weight",
|
| 312 |
+
"visual.blocks.24.mlp.gate_proj.bias",
|
| 313 |
+
"visual.blocks.24.mlp.up_proj.weight",
|
| 314 |
+
"visual.blocks.24.mlp.up_proj.bias",
|
| 315 |
+
"visual.blocks.24.mlp.down_proj.weight",
|
| 316 |
+
"visual.blocks.24.mlp.down_proj.bias",
|
| 317 |
+
"visual.blocks.25.norm1.weight",
|
| 318 |
+
"visual.blocks.25.norm2.weight",
|
| 319 |
+
"visual.blocks.25.attn.qkv.weight",
|
| 320 |
+
"visual.blocks.25.attn.qkv.bias",
|
| 321 |
+
"visual.blocks.25.attn.proj.weight",
|
| 322 |
+
"visual.blocks.25.attn.proj.bias",
|
| 323 |
+
"visual.blocks.25.mlp.gate_proj.weight",
|
| 324 |
+
"visual.blocks.25.mlp.gate_proj.bias",
|
| 325 |
+
"visual.blocks.25.mlp.up_proj.weight",
|
| 326 |
+
"visual.blocks.25.mlp.up_proj.bias",
|
| 327 |
+
"visual.blocks.25.mlp.down_proj.weight",
|
| 328 |
+
"visual.blocks.25.mlp.down_proj.bias",
|
| 329 |
+
"visual.blocks.26.norm1.weight",
|
| 330 |
+
"visual.blocks.26.norm2.weight",
|
| 331 |
+
"visual.blocks.26.attn.qkv.weight",
|
| 332 |
+
"visual.blocks.26.attn.qkv.bias",
|
| 333 |
+
"visual.blocks.26.attn.proj.weight",
|
| 334 |
+
"visual.blocks.26.attn.proj.bias",
|
| 335 |
+
"visual.blocks.26.mlp.gate_proj.weight",
|
| 336 |
+
"visual.blocks.26.mlp.gate_proj.bias",
|
| 337 |
+
"visual.blocks.26.mlp.up_proj.weight",
|
| 338 |
+
"visual.blocks.26.mlp.up_proj.bias",
|
| 339 |
+
"visual.blocks.26.mlp.down_proj.weight",
|
| 340 |
+
"visual.blocks.26.mlp.down_proj.bias",
|
| 341 |
+
"visual.blocks.27.norm1.weight",
|
| 342 |
+
"visual.blocks.27.norm2.weight",
|
| 343 |
+
"visual.blocks.27.attn.qkv.weight",
|
| 344 |
+
"visual.blocks.27.attn.qkv.bias",
|
| 345 |
+
"visual.blocks.27.attn.proj.weight",
|
| 346 |
+
"visual.blocks.27.attn.proj.bias",
|
| 347 |
+
"visual.blocks.27.mlp.gate_proj.weight",
|
| 348 |
+
"visual.blocks.27.mlp.gate_proj.bias",
|
| 349 |
+
"visual.blocks.27.mlp.up_proj.weight",
|
| 350 |
+
"visual.blocks.27.mlp.up_proj.bias",
|
| 351 |
+
"visual.blocks.27.mlp.down_proj.weight",
|
| 352 |
+
"visual.blocks.27.mlp.down_proj.bias",
|
| 353 |
+
"visual.blocks.28.norm1.weight",
|
| 354 |
+
"visual.blocks.28.norm2.weight",
|
| 355 |
+
"visual.blocks.28.attn.qkv.weight",
|
| 356 |
+
"visual.blocks.28.attn.qkv.bias",
|
| 357 |
+
"visual.blocks.28.attn.proj.weight",
|
| 358 |
+
"visual.blocks.28.attn.proj.bias",
|
| 359 |
+
"visual.blocks.28.mlp.gate_proj.weight",
|
| 360 |
+
"visual.blocks.28.mlp.gate_proj.bias",
|
| 361 |
+
"visual.blocks.28.mlp.up_proj.weight",
|
| 362 |
+
"visual.blocks.28.mlp.up_proj.bias",
|
| 363 |
+
"visual.blocks.28.mlp.down_proj.weight",
|
| 364 |
+
"visual.blocks.28.mlp.down_proj.bias",
|
| 365 |
+
"visual.blocks.29.norm1.weight",
|
| 366 |
+
"visual.blocks.29.norm2.weight",
|
| 367 |
+
"visual.blocks.29.attn.qkv.weight",
|
| 368 |
+
"visual.blocks.29.attn.qkv.bias",
|
| 369 |
+
"visual.blocks.29.attn.proj.weight",
|
| 370 |
+
"visual.blocks.29.attn.proj.bias",
|
| 371 |
+
"visual.blocks.29.mlp.gate_proj.weight",
|
| 372 |
+
"visual.blocks.29.mlp.gate_proj.bias",
|
| 373 |
+
"visual.blocks.29.mlp.up_proj.weight",
|
| 374 |
+
"visual.blocks.29.mlp.up_proj.bias",
|
| 375 |
+
"visual.blocks.29.mlp.down_proj.weight",
|
| 376 |
+
"visual.blocks.29.mlp.down_proj.bias",
|
| 377 |
+
"visual.blocks.30.norm1.weight",
|
| 378 |
+
"visual.blocks.30.norm2.weight",
|
| 379 |
+
"visual.blocks.30.attn.qkv.weight",
|
| 380 |
+
"visual.blocks.30.attn.qkv.bias",
|
| 381 |
+
"visual.blocks.30.attn.proj.weight",
|
| 382 |
+
"visual.blocks.30.attn.proj.bias",
|
| 383 |
+
"visual.blocks.30.mlp.gate_proj.weight",
|
| 384 |
+
"visual.blocks.30.mlp.gate_proj.bias",
|
| 385 |
+
"visual.blocks.30.mlp.up_proj.weight",
|
| 386 |
+
"visual.blocks.30.mlp.up_proj.bias",
|
| 387 |
+
"visual.blocks.30.mlp.down_proj.weight",
|
| 388 |
+
"visual.blocks.30.mlp.down_proj.bias",
|
| 389 |
+
"visual.blocks.31.norm1.weight",
|
| 390 |
+
"visual.blocks.31.norm2.weight",
|
| 391 |
+
"visual.blocks.31.attn.qkv.weight",
|
| 392 |
+
"visual.blocks.31.attn.qkv.bias",
|
| 393 |
+
"visual.blocks.31.attn.proj.weight",
|
| 394 |
+
"visual.blocks.31.attn.proj.bias",
|
| 395 |
+
"visual.blocks.31.mlp.gate_proj.weight",
|
| 396 |
+
"visual.blocks.31.mlp.gate_proj.bias",
|
| 397 |
+
"visual.blocks.31.mlp.up_proj.weight",
|
| 398 |
+
"visual.blocks.31.mlp.up_proj.bias",
|
| 399 |
+
"visual.blocks.31.mlp.down_proj.weight",
|
| 400 |
+
"visual.blocks.31.mlp.down_proj.bias",
|
| 401 |
+
"visual.merger.ln_q.weight",
|
| 402 |
+
"visual.merger.mlp.0.weight",
|
| 403 |
+
"visual.merger.mlp.0.bias",
|
| 404 |
+
"visual.merger.mlp.2.weight",
|
| 405 |
+
"visual.merger.mlp.2.bias",
|
| 406 |
+
"language_model.model.embed_tokens.weight",
|
| 407 |
+
"language_model.model.layers.0.self_attn.qkv_proj.weight",
|
| 408 |
+
"language_model.model.layers.0.self_attn.qkv_proj.bias",
|
| 409 |
+
"language_model.model.layers.0.self_attn.o_proj.weight",
|
| 410 |
+
"language_model.model.layers.0.mlp.gate_up_proj.weight",
|
| 411 |
+
"language_model.model.layers.0.mlp.down_proj.weight",
|
| 412 |
+
"language_model.model.layers.0.input_layernorm.weight",
|
| 413 |
+
"language_model.model.layers.0.post_attention_layernorm.weight",
|
| 414 |
+
"language_model.model.layers.1.self_attn.qkv_proj.weight",
|
| 415 |
+
"language_model.model.layers.1.self_attn.qkv_proj.bias",
|
| 416 |
+
"language_model.model.layers.1.self_attn.o_proj.weight",
|
| 417 |
+
"language_model.model.layers.1.mlp.gate_up_proj.weight",
|
| 418 |
+
"language_model.model.layers.1.mlp.down_proj.weight",
|
| 419 |
+
"language_model.model.layers.1.input_layernorm.weight",
|
| 420 |
+
"language_model.model.layers.1.post_attention_layernorm.weight",
|
| 421 |
+
"language_model.model.layers.2.self_attn.qkv_proj.weight",
|
| 422 |
+
"language_model.model.layers.2.self_attn.qkv_proj.bias",
|
| 423 |
+
"language_model.model.layers.2.self_attn.o_proj.weight",
|
| 424 |
+
"language_model.model.layers.2.mlp.gate_up_proj.weight",
|
| 425 |
+
"language_model.model.layers.2.mlp.down_proj.weight",
|
| 426 |
+
"language_model.model.layers.2.input_layernorm.weight",
|
| 427 |
+
"language_model.model.layers.2.post_attention_layernorm.weight",
|
| 428 |
+
"language_model.model.layers.3.self_attn.qkv_proj.weight",
|
| 429 |
+
"language_model.model.layers.3.self_attn.qkv_proj.bias",
|
| 430 |
+
"language_model.model.layers.3.self_attn.o_proj.weight",
|
| 431 |
+
"language_model.model.layers.3.mlp.gate_up_proj.weight",
|
| 432 |
+
"language_model.model.layers.3.mlp.down_proj.weight",
|
| 433 |
+
"language_model.model.layers.3.input_layernorm.weight",
|
| 434 |
+
"language_model.model.layers.3.post_attention_layernorm.weight",
|
| 435 |
+
"language_model.model.layers.4.self_attn.qkv_proj.weight",
|
| 436 |
+
"language_model.model.layers.4.self_attn.qkv_proj.bias",
|
| 437 |
+
"language_model.model.layers.4.self_attn.o_proj.weight",
|
| 438 |
+
"language_model.model.layers.4.mlp.gate_up_proj.weight",
|
| 439 |
+
"language_model.model.layers.4.mlp.down_proj.weight",
|
| 440 |
+
"language_model.model.layers.4.input_layernorm.weight",
|
| 441 |
+
"language_model.model.layers.4.post_attention_layernorm.weight",
|
| 442 |
+
"language_model.model.layers.5.self_attn.qkv_proj.weight",
|
| 443 |
+
"language_model.model.layers.5.self_attn.qkv_proj.bias",
|
| 444 |
+
"language_model.model.layers.5.self_attn.o_proj.weight",
|
| 445 |
+
"language_model.model.layers.5.mlp.gate_up_proj.weight",
|
| 446 |
+
"language_model.model.layers.5.mlp.down_proj.weight",
|
| 447 |
+
"language_model.model.layers.5.input_layernorm.weight",
|
| 448 |
+
"language_model.model.layers.5.post_attention_layernorm.weight",
|
| 449 |
+
"language_model.model.layers.6.self_attn.qkv_proj.weight",
|
| 450 |
+
"language_model.model.layers.6.self_attn.qkv_proj.bias",
|
| 451 |
+
"language_model.model.layers.6.self_attn.o_proj.weight",
|
| 452 |
+
"language_model.model.layers.6.mlp.gate_up_proj.weight",
|
| 453 |
+
"language_model.model.layers.6.mlp.down_proj.weight",
|
| 454 |
+
"language_model.model.layers.6.input_layernorm.weight",
|
| 455 |
+
"language_model.model.layers.6.post_attention_layernorm.weight",
|
| 456 |
+
"language_model.model.layers.7.self_attn.qkv_proj.weight",
|
| 457 |
+
"language_model.model.layers.7.self_attn.qkv_proj.bias",
|
| 458 |
+
"language_model.model.layers.7.self_attn.o_proj.weight",
|
| 459 |
+
"language_model.model.layers.7.mlp.gate_up_proj.weight",
|
| 460 |
+
"language_model.model.layers.7.mlp.down_proj.weight",
|
| 461 |
+
"language_model.model.layers.7.input_layernorm.weight",
|
| 462 |
+
"language_model.model.layers.7.post_attention_layernorm.weight",
|
| 463 |
+
"language_model.model.layers.8.self_attn.qkv_proj.weight",
|
| 464 |
+
"language_model.model.layers.8.self_attn.qkv_proj.bias",
|
| 465 |
+
"language_model.model.layers.8.self_attn.o_proj.weight",
|
| 466 |
+
"language_model.model.layers.8.mlp.gate_up_proj.weight",
|
| 467 |
+
"language_model.model.layers.8.mlp.down_proj.weight",
|
| 468 |
+
"language_model.model.layers.8.input_layernorm.weight",
|
| 469 |
+
"language_model.model.layers.8.post_attention_layernorm.weight",
|
| 470 |
+
"language_model.model.layers.9.self_attn.qkv_proj.weight",
|
| 471 |
+
"language_model.model.layers.9.self_attn.qkv_proj.bias",
|
| 472 |
+
"language_model.model.layers.9.self_attn.o_proj.weight",
|
| 473 |
+
"language_model.model.layers.9.mlp.gate_up_proj.weight",
|
| 474 |
+
"language_model.model.layers.9.mlp.down_proj.weight",
|
| 475 |
+
"language_model.model.layers.9.input_layernorm.weight",
|
| 476 |
+
"language_model.model.layers.9.post_attention_layernorm.weight",
|
| 477 |
+
"language_model.model.layers.10.self_attn.qkv_proj.weight",
|
| 478 |
+
"language_model.model.layers.10.self_attn.qkv_proj.bias",
|
| 479 |
+
"language_model.model.layers.10.self_attn.o_proj.weight",
|
| 480 |
+
"language_model.model.layers.10.mlp.gate_up_proj.weight",
|
| 481 |
+
"language_model.model.layers.10.mlp.down_proj.weight",
|
| 482 |
+
"language_model.model.layers.10.input_layernorm.weight",
|
| 483 |
+
"language_model.model.layers.10.post_attention_layernorm.weight",
|
| 484 |
+
"language_model.model.layers.11.self_attn.qkv_proj.weight",
|
| 485 |
+
"language_model.model.layers.11.self_attn.qkv_proj.bias",
|
| 486 |
+
"language_model.model.layers.11.self_attn.o_proj.weight",
|
| 487 |
+
"language_model.model.layers.11.mlp.gate_up_proj.weight",
|
| 488 |
+
"language_model.model.layers.11.mlp.down_proj.weight",
|
| 489 |
+
"language_model.model.layers.11.input_layernorm.weight",
|
| 490 |
+
"language_model.model.layers.11.post_attention_layernorm.weight",
|
| 491 |
+
"language_model.model.layers.12.self_attn.qkv_proj.weight",
|
| 492 |
+
"language_model.model.layers.12.self_attn.qkv_proj.bias",
|
| 493 |
+
"language_model.model.layers.12.self_attn.o_proj.weight",
|
| 494 |
+
"language_model.model.layers.12.mlp.gate_up_proj.weight",
|
| 495 |
+
"language_model.model.layers.12.mlp.down_proj.weight",
|
| 496 |
+
"language_model.model.layers.12.input_layernorm.weight",
|
| 497 |
+
"language_model.model.layers.12.post_attention_layernorm.weight",
|
| 498 |
+
"language_model.model.layers.13.self_attn.qkv_proj.weight",
|
| 499 |
+
"language_model.model.layers.13.self_attn.qkv_proj.bias",
|
| 500 |
+
"language_model.model.layers.13.self_attn.o_proj.weight",
|
| 501 |
+
"language_model.model.layers.13.mlp.gate_up_proj.weight",
|
| 502 |
+
"language_model.model.layers.13.mlp.down_proj.weight",
|
| 503 |
+
"language_model.model.layers.13.input_layernorm.weight",
|
| 504 |
+
"language_model.model.layers.13.post_attention_layernorm.weight",
|
| 505 |
+
"language_model.model.layers.14.self_attn.qkv_proj.weight",
|
| 506 |
+
"language_model.model.layers.14.self_attn.qkv_proj.bias",
|
| 507 |
+
"language_model.model.layers.14.self_attn.o_proj.weight",
|
| 508 |
+
"language_model.model.layers.14.mlp.gate_up_proj.weight",
|
| 509 |
+
"language_model.model.layers.14.mlp.down_proj.weight",
|
| 510 |
+
"language_model.model.layers.14.input_layernorm.weight",
|
| 511 |
+
"language_model.model.layers.14.post_attention_layernorm.weight",
|
| 512 |
+
"language_model.model.layers.15.self_attn.qkv_proj.weight",
|
| 513 |
+
"language_model.model.layers.15.self_attn.qkv_proj.bias",
|
| 514 |
+
"language_model.model.layers.15.self_attn.o_proj.weight",
|
| 515 |
+
"language_model.model.layers.15.mlp.gate_up_proj.weight",
|
| 516 |
+
"language_model.model.layers.15.mlp.down_proj.weight",
|
| 517 |
+
"language_model.model.layers.15.input_layernorm.weight",
|
| 518 |
+
"language_model.model.layers.15.post_attention_layernorm.weight",
|
| 519 |
+
"language_model.model.layers.16.self_attn.qkv_proj.weight",
|
| 520 |
+
"language_model.model.layers.16.self_attn.qkv_proj.bias",
|
| 521 |
+
"language_model.model.layers.16.self_attn.o_proj.weight",
|
| 522 |
+
"language_model.model.layers.16.mlp.gate_up_proj.weight",
|
| 523 |
+
"language_model.model.layers.16.mlp.down_proj.weight",
|
| 524 |
+
"language_model.model.layers.16.input_layernorm.weight",
|
| 525 |
+
"language_model.model.layers.16.post_attention_layernorm.weight",
|
| 526 |
+
"language_model.model.layers.17.self_attn.qkv_proj.weight",
|
| 527 |
+
"language_model.model.layers.17.self_attn.qkv_proj.bias",
|
| 528 |
+
"language_model.model.layers.17.self_attn.o_proj.weight",
|
| 529 |
+
"language_model.model.layers.17.mlp.gate_up_proj.weight",
|
| 530 |
+
"language_model.model.layers.17.mlp.down_proj.weight",
|
| 531 |
+
"language_model.model.layers.17.input_layernorm.weight",
|
| 532 |
+
"language_model.model.layers.17.post_attention_layernorm.weight",
|
| 533 |
+
"language_model.model.layers.18.self_attn.qkv_proj.weight",
|
| 534 |
+
"language_model.model.layers.18.self_attn.qkv_proj.bias",
|
| 535 |
+
"language_model.model.layers.18.self_attn.o_proj.weight",
|
| 536 |
+
"language_model.model.layers.18.mlp.gate_up_proj.weight",
|
| 537 |
+
"language_model.model.layers.18.mlp.down_proj.weight",
|
| 538 |
+
"language_model.model.layers.18.input_layernorm.weight",
|
| 539 |
+
"language_model.model.layers.18.post_attention_layernorm.weight",
|
| 540 |
+
"language_model.model.layers.19.self_attn.qkv_proj.weight",
|
| 541 |
+
"language_model.model.layers.19.self_attn.qkv_proj.bias",
|
| 542 |
+
"language_model.model.layers.19.self_attn.o_proj.weight",
|
| 543 |
+
"language_model.model.layers.19.mlp.gate_up_proj.weight",
|
| 544 |
+
"language_model.model.layers.19.mlp.down_proj.weight",
|
| 545 |
+
"language_model.model.layers.19.input_layernorm.weight",
|
| 546 |
+
"language_model.model.layers.19.post_attention_layernorm.weight",
|
| 547 |
+
"language_model.model.layers.20.self_attn.qkv_proj.weight",
|
| 548 |
+
"language_model.model.layers.20.self_attn.qkv_proj.bias",
|
| 549 |
+
"language_model.model.layers.20.self_attn.o_proj.weight",
|
| 550 |
+
"language_model.model.layers.20.mlp.gate_up_proj.weight",
|
| 551 |
+
"language_model.model.layers.20.mlp.down_proj.weight",
|
| 552 |
+
"language_model.model.layers.20.input_layernorm.weight",
|
| 553 |
+
"language_model.model.layers.20.post_attention_layernorm.weight",
|
| 554 |
+
"language_model.model.layers.21.self_attn.qkv_proj.weight",
|
| 555 |
+
"language_model.model.layers.21.self_attn.qkv_proj.bias",
|
| 556 |
+
"language_model.model.layers.21.self_attn.o_proj.weight",
|
| 557 |
+
"language_model.model.layers.21.mlp.gate_up_proj.weight",
|
| 558 |
+
"language_model.model.layers.21.mlp.down_proj.weight",
|
| 559 |
+
"language_model.model.layers.21.input_layernorm.weight",
|
| 560 |
+
"language_model.model.layers.21.post_attention_layernorm.weight",
|
| 561 |
+
"language_model.model.layers.22.self_attn.qkv_proj.weight",
|
| 562 |
+
"language_model.model.layers.22.self_attn.qkv_proj.bias",
|
| 563 |
+
"language_model.model.layers.22.self_attn.o_proj.weight",
|
| 564 |
+
"language_model.model.layers.22.mlp.gate_up_proj.weight",
|
| 565 |
+
"language_model.model.layers.22.mlp.down_proj.weight",
|
| 566 |
+
"language_model.model.layers.22.input_layernorm.weight",
|
| 567 |
+
"language_model.model.layers.22.post_attention_layernorm.weight",
|
| 568 |
+
"language_model.model.layers.23.self_attn.qkv_proj.weight",
|
| 569 |
+
"language_model.model.layers.23.self_attn.qkv_proj.bias",
|
| 570 |
+
"language_model.model.layers.23.self_attn.o_proj.weight",
|
| 571 |
+
"language_model.model.layers.23.mlp.gate_up_proj.weight",
|
| 572 |
+
"language_model.model.layers.23.mlp.down_proj.weight",
|
| 573 |
+
"language_model.model.layers.23.input_layernorm.weight",
|
| 574 |
+
"language_model.model.layers.23.post_attention_layernorm.weight",
|
| 575 |
+
"language_model.model.layers.24.self_attn.qkv_proj.weight",
|
| 576 |
+
"language_model.model.layers.24.self_attn.qkv_proj.bias",
|
| 577 |
+
"language_model.model.layers.24.self_attn.o_proj.weight",
|
| 578 |
+
"language_model.model.layers.24.mlp.gate_up_proj.weight",
|
| 579 |
+
"language_model.model.layers.24.mlp.down_proj.weight",
|
| 580 |
+
"language_model.model.layers.24.input_layernorm.weight",
|
| 581 |
+
"language_model.model.layers.24.post_attention_layernorm.weight",
|
| 582 |
+
"language_model.model.layers.25.self_attn.qkv_proj.weight",
|
| 583 |
+
"language_model.model.layers.25.self_attn.qkv_proj.bias",
|
| 584 |
+
"language_model.model.layers.25.self_attn.o_proj.weight",
|
| 585 |
+
"language_model.model.layers.25.mlp.gate_up_proj.weight",
|
| 586 |
+
"language_model.model.layers.25.mlp.down_proj.weight",
|
| 587 |
+
"language_model.model.layers.25.input_layernorm.weight",
|
| 588 |
+
"language_model.model.layers.25.post_attention_layernorm.weight",
|
| 589 |
+
"language_model.model.layers.26.self_attn.qkv_proj.weight",
|
| 590 |
+
"language_model.model.layers.26.self_attn.qkv_proj.bias",
|
| 591 |
+
"language_model.model.layers.26.self_attn.o_proj.weight",
|
| 592 |
+
"language_model.model.layers.26.mlp.gate_up_proj.weight",
|
| 593 |
+
"language_model.model.layers.26.mlp.down_proj.weight",
|
| 594 |
+
"language_model.model.layers.26.input_layernorm.weight",
|
| 595 |
+
"language_model.model.layers.26.post_attention_layernorm.weight",
|
| 596 |
+
"language_model.model.layers.27.self_attn.qkv_proj.weight",
|
| 597 |
+
"language_model.model.layers.27.self_attn.qkv_proj.bias",
|
| 598 |
+
"language_model.model.layers.27.self_attn.o_proj.weight",
|
| 599 |
+
"language_model.model.layers.27.mlp.gate_up_proj.weight",
|
| 600 |
+
"language_model.model.layers.27.mlp.down_proj.weight",
|
| 601 |
+
"language_model.model.layers.27.input_layernorm.weight",
|
| 602 |
+
"language_model.model.layers.27.post_attention_layernorm.weight",
|
| 603 |
+
"language_model.model.layers.28.self_attn.qkv_proj.weight",
|
| 604 |
+
"language_model.model.layers.28.self_attn.qkv_proj.bias",
|
| 605 |
+
"language_model.model.layers.28.self_attn.o_proj.weight",
|
| 606 |
+
"language_model.model.layers.28.mlp.gate_up_proj.weight",
|
| 607 |
+
"language_model.model.layers.28.mlp.down_proj.weight",
|
| 608 |
+
"language_model.model.layers.28.input_layernorm.weight",
|
| 609 |
+
"language_model.model.layers.28.post_attention_layernorm.weight",
|
| 610 |
+
"language_model.model.layers.29.self_attn.qkv_proj.weight",
|
| 611 |
+
"language_model.model.layers.29.self_attn.qkv_proj.bias",
|
| 612 |
+
"language_model.model.layers.29.self_attn.o_proj.weight",
|
| 613 |
+
"language_model.model.layers.29.mlp.gate_up_proj.weight",
|
| 614 |
+
"language_model.model.layers.29.mlp.down_proj.weight",
|
| 615 |
+
"language_model.model.layers.29.input_layernorm.weight",
|
| 616 |
+
"language_model.model.layers.29.post_attention_layernorm.weight",
|
| 617 |
+
"language_model.model.layers.30.self_attn.qkv_proj.weight",
|
| 618 |
+
"language_model.model.layers.30.self_attn.qkv_proj.bias",
|
| 619 |
+
"language_model.model.layers.30.self_attn.o_proj.weight",
|
| 620 |
+
"language_model.model.layers.30.mlp.gate_up_proj.weight",
|
| 621 |
+
"language_model.model.layers.30.mlp.down_proj.weight",
|
| 622 |
+
"language_model.model.layers.30.input_layernorm.weight",
|
| 623 |
+
"language_model.model.layers.30.post_attention_layernorm.weight",
|
| 624 |
+
"language_model.model.layers.31.self_attn.qkv_proj.weight",
|
| 625 |
+
"language_model.model.layers.31.self_attn.qkv_proj.bias",
|
| 626 |
+
"language_model.model.layers.31.self_attn.o_proj.weight",
|
| 627 |
+
"language_model.model.layers.31.mlp.gate_up_proj.weight",
|
| 628 |
+
"language_model.model.layers.31.mlp.down_proj.weight",
|
| 629 |
+
"language_model.model.layers.31.input_layernorm.weight",
|
| 630 |
+
"language_model.model.layers.31.post_attention_layernorm.weight",
|
| 631 |
+
"language_model.model.layers.32.self_attn.qkv_proj.weight",
|
| 632 |
+
"language_model.model.layers.32.self_attn.qkv_proj.bias",
|
| 633 |
+
"language_model.model.layers.32.self_attn.o_proj.weight",
|
| 634 |
+
"language_model.model.layers.32.mlp.gate_up_proj.weight",
|
| 635 |
+
"language_model.model.layers.32.mlp.down_proj.weight",
|
| 636 |
+
"language_model.model.layers.32.input_layernorm.weight",
|
| 637 |
+
"language_model.model.layers.32.post_attention_layernorm.weight",
|
| 638 |
+
"language_model.model.layers.33.self_attn.qkv_proj.weight",
|
| 639 |
+
"language_model.model.layers.33.self_attn.qkv_proj.bias",
|
| 640 |
+
"language_model.model.layers.33.self_attn.o_proj.weight",
|
| 641 |
+
"language_model.model.layers.33.mlp.gate_up_proj.weight",
|
| 642 |
+
"language_model.model.layers.33.mlp.down_proj.weight",
|
| 643 |
+
"language_model.model.layers.33.input_layernorm.weight",
|
| 644 |
+
"language_model.model.layers.33.post_attention_layernorm.weight",
|
| 645 |
+
"language_model.model.layers.34.self_attn.qkv_proj.weight",
|
| 646 |
+
"language_model.model.layers.34.self_attn.qkv_proj.bias",
|
| 647 |
+
"language_model.model.layers.34.self_attn.o_proj.weight",
|
| 648 |
+
"language_model.model.layers.34.mlp.gate_up_proj.weight",
|
| 649 |
+
"language_model.model.layers.34.mlp.down_proj.weight",
|
| 650 |
+
"language_model.model.layers.34.input_layernorm.weight",
|
| 651 |
+
"language_model.model.layers.34.post_attention_layernorm.weight",
|
| 652 |
+
"language_model.model.layers.35.self_attn.qkv_proj.weight",
|
| 653 |
+
"language_model.model.layers.35.self_attn.qkv_proj.bias",
|
| 654 |
+
"language_model.model.layers.35.self_attn.o_proj.weight",
|
| 655 |
+
"language_model.model.layers.35.mlp.gate_up_proj.weight",
|
| 656 |
+
"language_model.model.layers.35.mlp.down_proj.weight",
|
| 657 |
+
"language_model.model.layers.35.input_layernorm.weight",
|
| 658 |
+
"language_model.model.layers.35.post_attention_layernorm.weight",
|
| 659 |
+
"language_model.model.norm.weight"
|
| 660 |
+
]
|
| 661 |
+
}
|
LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ⏱️ TimeSearch-R: Adaptive Temporal Search for Long-Form Video Understanding via Self-Verification Reinforcement Learning
|
| 2 |
+
|
| 3 |
+
*A model that learns to actively search for relevant temporal clips through end-to-end reinforcement learning.*
|
| 4 |
+
|
| 5 |
+
[📄 [Paper](https://arxiv.org/abs/2511.05489)] [🤗 [Model](https://huggingface.co/Time-Search/TimeSearch-R)]
|
| 6 |
+
|
| 7 |
+
## 📰 News
|
| 8 |
+
|
| 9 |
+
🔥 **[2025/11/13]** Our [Model Checkpoint](https://huggingface.co/Time-Search/TimeSearch-R) is uploaded!
|
| 10 |
+
|
| 11 |
+
## 👁️ Overview
|
| 12 |
+
|
| 13 |
+
TimeSearch-R reformulates temporal search as interleaved text–video thinking, seamlessly integrating searching video clips into the reasoning process through reinforcement learning (RL).
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
|
| 17 |
+
We introduce GRPO with Completeness Self-Verification (GRPO-CSV), which gathers searched video frames from the interleaved reasoning process and utilizes the same policy model to verify the adequacy of searched frames, thereby improving the completeness of video reasoning.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
## 🚀 Quick Start
|
| 22 |
+
|
| 23 |
+
### 🏝️ Environmental Setup
|
| 24 |
+
|
| 25 |
+
**Step 1:** Prepare the running environment.
|
| 26 |
+
|
| 27 |
+
Prepare the environment with CUDA and PyTorch (CUDA 12.4 and PyTorch 2.6.0 in our experiments), and install the dependencies with `pip`.
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
pip install -r requirements.txt
|
| 31 |
+
```
|
| 32 |
+
|
| 33 |
+
**Step 2:** Run the clip server for video frame retrieval.
|
| 34 |
+
|
| 35 |
+
Download the pre-trained SigLIP model.
|
| 36 |
+
```bash
|
| 37 |
+
huggingface-cli download google/siglip-so400m-patch14-384 --local-dir /path/to/your/local/filedir
|
| 38 |
+
```
|
| 39 |
+
Modify the `clip_as_service/server/clip_server/torch-flow.yml` to use the downloaded local model path and run the SigLIP server.
|
| 40 |
+
|
| 41 |
+
```bash
|
| 42 |
+
cd clip_as_service/server && pip3 install .
|
| 43 |
+
|
| 44 |
+
export CUDA_VISIBLE_DEVICES=RR
|
| 45 |
+
export GRPC_VERBOSITY=debug
|
| 46 |
+
export HF_HUB_OFFLINE=1
|
| 47 |
+
export PYTHONPATH=$PYTHONPATH:.
|
| 48 |
+
|
| 49 |
+
python3 -m clip_server
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
### 📦️ Dataset & Model
|
| 53 |
+
|
| 54 |
+
We provide the preprocessed JSON files for [Haystack-LVBench](https://huggingface.co/datasets/MLL-Lab/LongVideoHaystack). The corresponding `.mp4` video files can be downloaded from the original [LongVideoBench](https://huggingface.co/datasets/longvideobench/LongVideoBench) dataset.
|
| 55 |
+
|
| 56 |
+
Download the pre-trained TimeSearch-R model.
|
| 57 |
+
|
| 58 |
+
```bash
|
| 59 |
+
huggingface-cli download --resume-download Time-Search/TimeSearch-R --local-dir /path/to/your/local/filedir
|
| 60 |
+
```
|
| 61 |
+
|
| 62 |
+
**(Recommended) Prepare the frame cache and feature cache.**
|
| 63 |
+
To accelerate the inference and training speed, we recommend extracting the frames and features for the videos in advance.
|
| 64 |
+
|
| 65 |
+
```bash
|
| 66 |
+
python3 scripts/converts/prepare_frame_cache.py /path/to/your/local/data_root /path/to/your/local/haystack_lvbench_input.jsonl --num_workers 16 --target_fps 2
|
| 67 |
+
python3 scripts/converts/prepare_feature_cache.py /path/to/your/local/data_root /path/to/your/local/haystack_lvbench_input.jsonl --num_workers 16
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### 📋️ Inference & Evaluation
|
| 71 |
+
|
| 72 |
+
**Step 1:** Run the TimeSearch-R inference.
|
| 73 |
+
|
| 74 |
+
```bash
|
| 75 |
+
# The IP address from the above step
|
| 76 |
+
export SIGLIP_URL=grpc://127.0.0.1:51000
|
| 77 |
+
|
| 78 |
+
torchrun \
|
| 79 |
+
--nproc_per_node=8 \
|
| 80 |
+
--master_port=24137 \
|
| 81 |
+
time_r1/inference.py \
|
| 82 |
+
--input_path /path/to/your/local/haystack_lvbench_input.jsonl \
|
| 83 |
+
--save_path /path/to/your/local/haystack_lvbench_output \
|
| 84 |
+
--data_root /path/to/your/local/data_root \
|
| 85 |
+
--model_base /path/to/your/local/checkpoint \
|
| 86 |
+
--prompt_template v4 \
|
| 87 |
+
--use_env True \
|
| 88 |
+
--use_vllm True \
|
| 89 |
+
--batch_size 1 \
|
| 90 |
+
--num_data_workers 2 \
|
| 91 |
+
--total_video_tokens 24000 \
|
| 92 |
+
--max_frames 768 \
|
| 93 |
+
--max_tokens 256
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
**Step 2:** Evaluate the temporal search and QA performance.
|
| 97 |
+
|
| 98 |
+
The temporal search evaluation script is modified from [T*](https://github.com/mll-lab-nu/TStar).
|
| 99 |
+
|
| 100 |
+
```bash
|
| 101 |
+
# Temporal search evaluation
|
| 102 |
+
python time_r1/eval/eval_temporal_search.py --search_result_path /path/to/your/local/haystack_lvbench_output.jsonl
|
| 103 |
+
|
| 104 |
+
# QA evaluation
|
| 105 |
+
python time_r1/eval/longvideobench_eval.py /path/to/your/local/haystack_lvbench_output.jsonl
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
### 🏗️ GRPO-CSV Training
|
| 109 |
+
|
| 110 |
+
**Step 1:** Prepare the reward model.
|
| 111 |
+
|
| 112 |
+
We use [Qwen-2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) as our reward model for LLM-as-a-judge verification.
|
| 113 |
+
|
| 114 |
+
```bash
|
| 115 |
+
# download Qwen-2.5-72B-Instruct model
|
| 116 |
+
huggingface-cli download --resume-download https://huggingface.co/Qwen/Qwen2.5-72B-Instruct --local-dir /path/to/your/local/filedir
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
Start a VLLM server of [Qwen-2.5-72B-Instruct](https://huggingface.co/Qwen/Qwen2.5-72B-Instruct) for LLM-as-a-judge verification.
|
| 120 |
+
|
| 121 |
+
```bash
|
| 122 |
+
vllm serve /path/to/your/local/filedir \
|
| 123 |
+
--port 18901 \
|
| 124 |
+
--gpu-memory-utilization 0.8 \
|
| 125 |
+
--max-model-len 32768 \
|
| 126 |
+
--tensor-parallel-size 8 \
|
| 127 |
+
--served-model-name "judge" \
|
| 128 |
+
--trust-remote-code \
|
| 129 |
+
--disable-log-requests
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
**Step 2:** Train TimeSearch-R with GRPO-CSV.
|
| 133 |
+
|
| 134 |
+
We recommend using no less than 16 GPUs (2 nodes x 8 GPUs) for 7B training. For each node, we recommend using no less than 1024GB CPU RAM, as the long-form videos in training datasets can consume a large amount of memory.
|
| 135 |
+
|
| 136 |
+
We provide the training script for TimeSearch-R with GRPO-CSV in `scripts/train.sh`.
|
| 137 |
+
|
| 138 |
+
```bash
|
| 139 |
+
bash scripts/train.sh
|
| 140 |
+
```
|
| 141 |
+
|
| 142 |
+
## 🔖 Citation
|
| 143 |
+
|
| 144 |
+
If you find TimeSearch-R useful for your research and applications, please cite using this BibTeX:
|
| 145 |
+
```bibtex
|
| 146 |
+
@article{timesearch-r,
|
| 147 |
+
title={TimeSearch-R: Adaptive Temporal Search for Long-Form Video Understanding via Self-Verification Reinforcement Learning},
|
| 148 |
+
author={Pan, Junwen and Zhang, Qizhe and Zhang, Rui and Lu, Ming and Wan, Xin and Zhang, Yuan and Liu, Chang and She, Qi},
|
| 149 |
+
journal={arXiv preprint arXiv:2511.05489},
|
| 150 |
+
year={2025}
|
| 151 |
+
}
|
| 152 |
+
```
|
| 153 |
+
|
| 154 |
+
## 🎟️ License
|
| 155 |
+
|
| 156 |
+
This project is released under the [Apache 2.0 license](LICENSE).
|
| 157 |
+
|
| 158 |
+
## 🏅 Acknowledgements
|
| 159 |
+
|
| 160 |
+
We thank the authors of the following projects for their contributions:
|
| 161 |
+
* [Qwen2.5-VL](https://github.com/QwenLM/Qwen2.5-VL)
|
| 162 |
+
* [R1-V](https://github.com/Deep-Agent/R1-V)
|
| 163 |
+
* [trl](https://github.com/huggingface/trl)
|
| 164 |
+
* [T*](https://github.com/mll-lab-nu/TStar)
|
all_output_reflect.jsonl
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
check_params.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import AutoModel
|
| 2 |
+
import torch
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
# Use the path from the workspace info
|
| 6 |
+
model_path = "/data/shuimu.chen/Qwen2.5-VL-Instruct"
|
| 7 |
+
|
| 8 |
+
print(f"Checking model at {model_path}")
|
| 9 |
+
if not os.path.exists(model_path):
|
| 10 |
+
print(f"Model path does not exist: {model_path}")
|
| 11 |
+
exit(1)
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
# Load on meta device to avoid OOM and be fast
|
| 15 |
+
# We use AutoModelForCausalLM or Qwen2_5_VLForConditionalGeneration if available
|
| 16 |
+
from transformers import AutoModelForCausalLM
|
| 17 |
+
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, device_map="cpu", torch_dtype="auto")
|
| 18 |
+
print("Model loaded successfully.")
|
| 19 |
+
print("Parameter names:")
|
| 20 |
+
for name, _ in model.named_parameters():
|
| 21 |
+
if "visual" in name or "patch" in name:
|
| 22 |
+
print(name)
|
| 23 |
+
except Exception as e:
|
| 24 |
+
print(f"Error loading model: {e}")
|
check_params_v2.py
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import Qwen2_5_VLForConditionalGeneration
|
| 2 |
+
import torch
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
# Use the path from the workspace info
|
| 6 |
+
model_path = "/data/shuimu.chen/Qwen2.5-VL-Instruct"
|
| 7 |
+
|
| 8 |
+
print(f"Checking model at {model_path}")
|
| 9 |
+
if not os.path.exists(model_path):
|
| 10 |
+
print(f"Model path does not exist: {model_path}")
|
| 11 |
+
exit(1)
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
# Load on meta device to avoid OOM and be fast
|
| 15 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_path, trust_remote_code=True, device_map="cpu", torch_dtype="auto")
|
| 16 |
+
print("Model loaded successfully.")
|
| 17 |
+
print("Parameter names:")
|
| 18 |
+
for name, _ in model.named_parameters():
|
| 19 |
+
if "visual" in name or "patch" in name:
|
| 20 |
+
print(name)
|
| 21 |
+
except Exception as e:
|
| 22 |
+
print(f"Error loading model: {e}")
|
check_structure.py
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from transformers import Qwen2_5_VLForConditionalGeneration
|
| 2 |
+
import torch
|
| 3 |
+
import os
|
| 4 |
+
|
| 5 |
+
# Use the path from the workspace info
|
| 6 |
+
model_path = "/data/shuimu.chen/Qwen2.5-VL-Instruct"
|
| 7 |
+
|
| 8 |
+
print(f"Checking model at {model_path}")
|
| 9 |
+
if not os.path.exists(model_path):
|
| 10 |
+
print(f"Model path does not exist: {model_path}")
|
| 11 |
+
exit(1)
|
| 12 |
+
|
| 13 |
+
try:
|
| 14 |
+
# Load on meta device to avoid OOM and be fast
|
| 15 |
+
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_path, trust_remote_code=True, device_map="cpu", torch_dtype="auto")
|
| 16 |
+
print("Model loaded successfully.")
|
| 17 |
+
print("First 20 Parameter names:")
|
| 18 |
+
for i, (name, _) in enumerate(model.named_parameters()):
|
| 19 |
+
print(name)
|
| 20 |
+
if i > 20:
|
| 21 |
+
break
|
| 22 |
+
|
| 23 |
+
print("\nSearching for embed_tokens:")
|
| 24 |
+
for name, _ in model.named_parameters():
|
| 25 |
+
if "embed_tokens" in name:
|
| 26 |
+
print(name)
|
| 27 |
+
|
| 28 |
+
except Exception as e:
|
| 29 |
+
print(f"Error loading model: {e}")
|
configs/dataset.yaml
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
datasets:
|
| 2 |
+
- json_path: /data/shuimu.chen/LongVideoBench/LongVideoHaystack_all_300p_60_cache.json
|
| 3 |
+
sampling_strategy: all
|
| 4 |
+
# - json_path: /data/shuimu.chen/LongVideoBench/LongVideoHaystack_all.json
|
| 5 |
+
# sampling_strategy: random:40000
|
| 6 |
+
# - json_path: workdir/datasets/LongVideoHaystack/train_pred_acc1_posthoc_acc1_thumbnail_acc0_mc.jsonl
|
| 7 |
+
# sampling_strategy: random:1500
|
| 8 |
+
# - json_path: workdir/datasets/falcon/mc_converted_rl.jsonl
|
| 9 |
+
# sampling_strategy: all
|
| 10 |
+
# - json_path: workdir/datasets/cinepile/0000_pred_posthoc_acc1.jsonl
|
| 11 |
+
# sampling_strategy: all
|
| 12 |
+
# - json_path: workdir/datasets/videomarathon/manual/train-panda-20250715_oe_sample100k_acc1_hard_check.jsonl
|
| 13 |
+
# sampling_strategy: all
|
configs/dataset_sft.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
datasets:
|
| 2 |
+
- json_path: /data/shuimu.chen/COT_Video-R1_60/prediction_tp_sft_final_2_43.json
|
| 3 |
+
sampling_strategy: all
|
| 4 |
+
# - json_path: /data/shuimu.chen/COT_Video-R1_60/prediction_tp_sft_final_43.json
|
| 5 |
+
# sampling_strategy: all
|
| 6 |
+
|
configs/ddp.yaml
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
compute_environment: LOCAL_MACHINE
|
| 2 |
+
debug: false
|
| 3 |
+
distributed_type: MULTI_GPU
|
| 4 |
+
downcast_bf16: 'no'
|
| 5 |
+
gpu_ids: all
|
| 6 |
+
machine_rank: 0
|
| 7 |
+
main_training_function: main
|
| 8 |
+
mixed_precision: bf16
|
| 9 |
+
num_machines: 1
|
| 10 |
+
num_processes: 8
|
| 11 |
+
rdzv_backend: static
|
| 12 |
+
same_network: true
|
| 13 |
+
tpu_env: []
|
| 14 |
+
tpu_use_cluster: false
|
| 15 |
+
tpu_use_sudo: false
|
| 16 |
+
use_cpu: false
|
configs/zero2.yaml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
compute_environment: LOCAL_MACHINE
|
| 2 |
+
debug: false
|
| 3 |
+
deepspeed_config:
|
| 4 |
+
deepspeed_multinode_launcher: standard
|
| 5 |
+
offload_optimizer_device: none
|
| 6 |
+
offload_param_device: none
|
| 7 |
+
zero3_init_flag: false
|
| 8 |
+
zero_stage: 2
|
| 9 |
+
distributed_type: DEEPSPEED
|
| 10 |
+
downcast_bf16: 'no'
|
| 11 |
+
machine_rank: 0
|
| 12 |
+
main_training_function: main
|
| 13 |
+
mixed_precision: bf16
|
| 14 |
+
num_machines: 1
|
| 15 |
+
num_processes: 8
|
| 16 |
+
rdzv_backend: static
|
| 17 |
+
same_network: true
|
| 18 |
+
tpu_env: []
|
| 19 |
+
tpu_use_cluster: false
|
| 20 |
+
tpu_use_sudo: false
|
| 21 |
+
use_cpu: false
|
configs/zero3.yaml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
compute_environment: LOCAL_MACHINE
|
| 2 |
+
debug: false
|
| 3 |
+
deepspeed_config:
|
| 4 |
+
deepspeed_multinode_launcher: standard
|
| 5 |
+
offload_optimizer_device: none
|
| 6 |
+
offload_param_device: none
|
| 7 |
+
zero3_init_flag: true
|
| 8 |
+
zero3_save_16bit_model: true
|
| 9 |
+
zero_stage: 3
|
| 10 |
+
distributed_type: DEEPSPEED
|
| 11 |
+
downcast_bf16: 'no'
|
| 12 |
+
machine_rank: 0
|
| 13 |
+
main_training_function: main
|
| 14 |
+
mixed_precision: bf16
|
| 15 |
+
num_machines: 1
|
| 16 |
+
num_processes: 8
|
| 17 |
+
rdzv_backend: static
|
| 18 |
+
same_network: true
|
| 19 |
+
tpu_env: []
|
| 20 |
+
tpu_use_cluster: false
|
| 21 |
+
tpu_use_sudo: false
|
| 22 |
+
use_cpu: false
|
data.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from longvideobench import LongVideoBenchDataset
|
| 2 |
+
YOUR_DATA_PATH = '/data/shuimu.chen/LongVideoBench'
|
| 3 |
+
import debugpy
|
| 4 |
+
try:
|
| 5 |
+
# 5678 is the default attach port in the VS Code debug configurations. Unless a host and port are specified, host defaults to 127.0.0.1
|
| 6 |
+
debugpy.listen(("localhost", 9518))
|
| 7 |
+
print("Waiting for debugger attach")
|
| 8 |
+
debugpy.wait_for_client()
|
| 9 |
+
except Exception as e:
|
| 10 |
+
pass
|
| 11 |
+
# validation
|
| 12 |
+
dataset = LongVideoBenchDataset(YOUR_DATA_PATH, "lvb_val.json", max_num_frames=64)
|
| 13 |
+
|
| 14 |
+
# test
|
| 15 |
+
# dataset = LongVideoBenchDataset(YOUR_DATA_PATH, "lvb_test_wo_gt.json", max_num_frames=64)
|
| 16 |
+
|
| 17 |
+
print(dataset[0]["inputs"]) # A list consisting of PIL.Image and strings.
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/crypto/buildinf.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by util/mkbuildinf.pl
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2014-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#define PLATFORM "platform: aix64-gcc-as"
|
| 14 |
+
#define DATE "built on: Wed Oct 1 18:51:21 2025 UTC"
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* Generate compiler_flags as an array of individual characters. This is a
|
| 18 |
+
* workaround for the situation where CFLAGS gets too long for a C90 string
|
| 19 |
+
* literal
|
| 20 |
+
*/
|
| 21 |
+
static const char compiler_flags[] = {
|
| 22 |
+
'c','o','m','p','i','l','e','r',':',' ','g','c','c',' ','-','m',
|
| 23 |
+
'a','i','x','6','4',' ','-','p','t','h','r','e','a','d',' ','-',
|
| 24 |
+
'W','a',',','-','-','n','o','e','x','e','c','s','t','a','c','k',
|
| 25 |
+
' ','-','O',' ','-','D','B','_','E','N','D','I','A','N',' ','-',
|
| 26 |
+
'D','O','P','E','N','S','S','L','_','P','I','C',' ','-','D','O',
|
| 27 |
+
'P','E','N','S','S','L','_','B','U','I','L','D','I','N','G','_',
|
| 28 |
+
'O','P','E','N','S','S','L',' ','-','D','N','D','E','B','U','G','\0'
|
| 29 |
+
};
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/crypto/bn_conf.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/bn_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_BN_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_BN_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* The contents of this file are not used in the UEFI build, as
|
| 18 |
+
* both 32-bit and 64-bit builds are supported from a single run
|
| 19 |
+
* of the Configure script.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
/* Should we define BN_DIV2W here? */
|
| 23 |
+
|
| 24 |
+
/* Only one for the following should be defined */
|
| 25 |
+
#define SIXTY_FOUR_BIT_LONG
|
| 26 |
+
#undef SIXTY_FOUR_BIT
|
| 27 |
+
#undef THIRTY_TWO_BIT
|
| 28 |
+
|
| 29 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/crypto/dso_conf.h
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/dso_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_DSO_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_DSO_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# define DSO_DLFCN
|
| 17 |
+
# define HAVE_DLFCN_H
|
| 18 |
+
# define DSO_EXTENSION ".so"
|
| 19 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/asn1.h
ADDED
|
@@ -0,0 +1,1134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1_H
|
| 16 |
+
# define OPENSSL_ASN1_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# ifndef OPENSSL_NO_STDIO
|
| 25 |
+
# include <stdio.h>
|
| 26 |
+
# endif
|
| 27 |
+
# include <time.h>
|
| 28 |
+
# include <openssl/e_os2.h>
|
| 29 |
+
# include <openssl/opensslconf.h>
|
| 30 |
+
# include <openssl/bio.h>
|
| 31 |
+
# include <openssl/safestack.h>
|
| 32 |
+
# include <openssl/asn1err.h>
|
| 33 |
+
# include <openssl/symhacks.h>
|
| 34 |
+
|
| 35 |
+
# include <openssl/types.h>
|
| 36 |
+
# include <openssl/bn.h>
|
| 37 |
+
|
| 38 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 39 |
+
# undef OPENSSL_EXTERN
|
| 40 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 41 |
+
# endif
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
extern "C" {
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
# define V_ASN1_UNIVERSAL 0x00
|
| 48 |
+
# define V_ASN1_APPLICATION 0x40
|
| 49 |
+
# define V_ASN1_CONTEXT_SPECIFIC 0x80
|
| 50 |
+
# define V_ASN1_PRIVATE 0xc0
|
| 51 |
+
|
| 52 |
+
# define V_ASN1_CONSTRUCTED 0x20
|
| 53 |
+
# define V_ASN1_PRIMITIVE_TAG 0x1f
|
| 54 |
+
# define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG
|
| 55 |
+
|
| 56 |
+
# define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
|
| 57 |
+
# define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
|
| 58 |
+
# define V_ASN1_ANY -4 /* used in ASN1 template code */
|
| 59 |
+
|
| 60 |
+
# define V_ASN1_UNDEF -1
|
| 61 |
+
/* ASN.1 tag values */
|
| 62 |
+
# define V_ASN1_EOC 0
|
| 63 |
+
# define V_ASN1_BOOLEAN 1
|
| 64 |
+
# define V_ASN1_INTEGER 2
|
| 65 |
+
# define V_ASN1_BIT_STRING 3
|
| 66 |
+
# define V_ASN1_OCTET_STRING 4
|
| 67 |
+
# define V_ASN1_NULL 5
|
| 68 |
+
# define V_ASN1_OBJECT 6
|
| 69 |
+
# define V_ASN1_OBJECT_DESCRIPTOR 7
|
| 70 |
+
# define V_ASN1_EXTERNAL 8
|
| 71 |
+
# define V_ASN1_REAL 9
|
| 72 |
+
# define V_ASN1_ENUMERATED 10
|
| 73 |
+
# define V_ASN1_UTF8STRING 12
|
| 74 |
+
# define V_ASN1_SEQUENCE 16
|
| 75 |
+
# define V_ASN1_SET 17
|
| 76 |
+
# define V_ASN1_NUMERICSTRING 18
|
| 77 |
+
# define V_ASN1_PRINTABLESTRING 19
|
| 78 |
+
# define V_ASN1_T61STRING 20
|
| 79 |
+
# define V_ASN1_TELETEXSTRING 20 /* alias */
|
| 80 |
+
# define V_ASN1_VIDEOTEXSTRING 21
|
| 81 |
+
# define V_ASN1_IA5STRING 22
|
| 82 |
+
# define V_ASN1_UTCTIME 23
|
| 83 |
+
# define V_ASN1_GENERALIZEDTIME 24
|
| 84 |
+
# define V_ASN1_GRAPHICSTRING 25
|
| 85 |
+
# define V_ASN1_ISO64STRING 26
|
| 86 |
+
# define V_ASN1_VISIBLESTRING 26 /* alias */
|
| 87 |
+
# define V_ASN1_GENERALSTRING 27
|
| 88 |
+
# define V_ASN1_UNIVERSALSTRING 28
|
| 89 |
+
# define V_ASN1_BMPSTRING 30
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* NB the constants below are used internally by ASN1_INTEGER
|
| 93 |
+
* and ASN1_ENUMERATED to indicate the sign. They are *not* on
|
| 94 |
+
* the wire tag values.
|
| 95 |
+
*/
|
| 96 |
+
|
| 97 |
+
# define V_ASN1_NEG 0x100
|
| 98 |
+
# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
|
| 99 |
+
# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
|
| 100 |
+
|
| 101 |
+
/* For use with d2i_ASN1_type_bytes() */
|
| 102 |
+
# define B_ASN1_NUMERICSTRING 0x0001
|
| 103 |
+
# define B_ASN1_PRINTABLESTRING 0x0002
|
| 104 |
+
# define B_ASN1_T61STRING 0x0004
|
| 105 |
+
# define B_ASN1_TELETEXSTRING 0x0004
|
| 106 |
+
# define B_ASN1_VIDEOTEXSTRING 0x0008
|
| 107 |
+
# define B_ASN1_IA5STRING 0x0010
|
| 108 |
+
# define B_ASN1_GRAPHICSTRING 0x0020
|
| 109 |
+
# define B_ASN1_ISO64STRING 0x0040
|
| 110 |
+
# define B_ASN1_VISIBLESTRING 0x0040
|
| 111 |
+
# define B_ASN1_GENERALSTRING 0x0080
|
| 112 |
+
# define B_ASN1_UNIVERSALSTRING 0x0100
|
| 113 |
+
# define B_ASN1_OCTET_STRING 0x0200
|
| 114 |
+
# define B_ASN1_BIT_STRING 0x0400
|
| 115 |
+
# define B_ASN1_BMPSTRING 0x0800
|
| 116 |
+
# define B_ASN1_UNKNOWN 0x1000
|
| 117 |
+
# define B_ASN1_UTF8STRING 0x2000
|
| 118 |
+
# define B_ASN1_UTCTIME 0x4000
|
| 119 |
+
# define B_ASN1_GENERALIZEDTIME 0x8000
|
| 120 |
+
# define B_ASN1_SEQUENCE 0x10000
|
| 121 |
+
/* For use with ASN1_mbstring_copy() */
|
| 122 |
+
# define MBSTRING_FLAG 0x1000
|
| 123 |
+
# define MBSTRING_UTF8 (MBSTRING_FLAG)
|
| 124 |
+
# define MBSTRING_ASC (MBSTRING_FLAG|1)
|
| 125 |
+
# define MBSTRING_BMP (MBSTRING_FLAG|2)
|
| 126 |
+
# define MBSTRING_UNIV (MBSTRING_FLAG|4)
|
| 127 |
+
# define SMIME_OLDMIME 0x400
|
| 128 |
+
# define SMIME_CRLFEOL 0x800
|
| 129 |
+
# define SMIME_STREAM 0x1000
|
| 130 |
+
|
| 131 |
+
/* Stacks for types not otherwise defined in this header */
|
| 132 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
|
| 133 |
+
#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 134 |
+
#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
|
| 135 |
+
#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 136 |
+
#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
|
| 137 |
+
#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
|
| 138 |
+
#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
|
| 139 |
+
#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
|
| 140 |
+
#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
|
| 141 |
+
#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
|
| 142 |
+
#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
|
| 143 |
+
#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 144 |
+
#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 145 |
+
#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 146 |
+
#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 147 |
+
#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk),ossl_check_X509_ALGOR_freefunc_type(freefunc))
|
| 148 |
+
#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
|
| 149 |
+
#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
|
| 150 |
+
#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 151 |
+
#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 152 |
+
#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
|
| 153 |
+
#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
|
| 154 |
+
#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 155 |
+
#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
|
| 156 |
+
#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
|
| 157 |
+
#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
# define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
|
| 162 |
+
/*
|
| 163 |
+
* This indicates that the ASN1_STRING is not a real value but just a place
|
| 164 |
+
* holder for the location where indefinite length constructed data should be
|
| 165 |
+
* inserted in the memory buffer
|
| 166 |
+
*/
|
| 167 |
+
# define ASN1_STRING_FLAG_NDEF 0x010
|
| 168 |
+
|
| 169 |
+
/*
|
| 170 |
+
* This flag is used by the CMS code to indicate that a string is not
|
| 171 |
+
* complete and is a place holder for content when it had all been accessed.
|
| 172 |
+
* The flag will be reset when content has been written to it.
|
| 173 |
+
*/
|
| 174 |
+
|
| 175 |
+
# define ASN1_STRING_FLAG_CONT 0x020
|
| 176 |
+
/*
|
| 177 |
+
* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
|
| 178 |
+
* type.
|
| 179 |
+
*/
|
| 180 |
+
# define ASN1_STRING_FLAG_MSTRING 0x040
|
| 181 |
+
/* String is embedded and only content should be freed */
|
| 182 |
+
# define ASN1_STRING_FLAG_EMBED 0x080
|
| 183 |
+
/* String should be parsed in RFC 5280's time format */
|
| 184 |
+
# define ASN1_STRING_FLAG_X509_TIME 0x100
|
| 185 |
+
/* This is the base type that holds just about everything :-) */
|
| 186 |
+
struct asn1_string_st {
|
| 187 |
+
int length;
|
| 188 |
+
int type;
|
| 189 |
+
unsigned char *data;
|
| 190 |
+
/*
|
| 191 |
+
* The value of the following field depends on the type being held. It
|
| 192 |
+
* is mostly being used for BIT_STRING so if the input data has a
|
| 193 |
+
* non-zero 'unused bits' value, it will be handled correctly
|
| 194 |
+
*/
|
| 195 |
+
long flags;
|
| 196 |
+
};
|
| 197 |
+
|
| 198 |
+
/*
|
| 199 |
+
* ASN1_ENCODING structure: this is used to save the received encoding of an
|
| 200 |
+
* ASN1 type. This is useful to get round problems with invalid encodings
|
| 201 |
+
* which can break signatures.
|
| 202 |
+
*/
|
| 203 |
+
|
| 204 |
+
typedef struct ASN1_ENCODING_st {
|
| 205 |
+
unsigned char *enc; /* DER encoding */
|
| 206 |
+
long len; /* Length of encoding */
|
| 207 |
+
int modified; /* set to 1 if 'enc' is invalid */
|
| 208 |
+
} ASN1_ENCODING;
|
| 209 |
+
|
| 210 |
+
/* Used with ASN1 LONG type: if a long is set to this it is omitted */
|
| 211 |
+
# define ASN1_LONG_UNDEF 0x7fffffffL
|
| 212 |
+
|
| 213 |
+
# define STABLE_FLAGS_MALLOC 0x01
|
| 214 |
+
/*
|
| 215 |
+
* A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted
|
| 216 |
+
* as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting
|
| 217 |
+
* STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias
|
| 218 |
+
* STABLE_FLAGS_CLEAR to reflect this.
|
| 219 |
+
*/
|
| 220 |
+
# define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
|
| 221 |
+
# define STABLE_NO_MASK 0x02
|
| 222 |
+
# define DIRSTRING_TYPE \
|
| 223 |
+
(B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
|
| 224 |
+
# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
|
| 225 |
+
|
| 226 |
+
struct asn1_string_table_st {
|
| 227 |
+
int nid;
|
| 228 |
+
long minsize;
|
| 229 |
+
long maxsize;
|
| 230 |
+
unsigned long mask;
|
| 231 |
+
unsigned long flags;
|
| 232 |
+
};
|
| 233 |
+
|
| 234 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
|
| 235 |
+
#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 236 |
+
#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
|
| 237 |
+
#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 238 |
+
#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
|
| 239 |
+
#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
|
| 240 |
+
#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
|
| 241 |
+
#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 242 |
+
#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 243 |
+
#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
|
| 244 |
+
#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 245 |
+
#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 246 |
+
#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 247 |
+
#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 248 |
+
#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 249 |
+
#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk),ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
|
| 250 |
+
#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
|
| 251 |
+
#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 252 |
+
#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 253 |
+
#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 254 |
+
#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
|
| 255 |
+
#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 256 |
+
#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 257 |
+
#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
|
| 258 |
+
#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
|
| 259 |
+
#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
/* size limits: this stuff is taken straight from RFC2459 */
|
| 263 |
+
|
| 264 |
+
# define ub_name 32768
|
| 265 |
+
# define ub_common_name 64
|
| 266 |
+
# define ub_locality_name 128
|
| 267 |
+
# define ub_state_name 128
|
| 268 |
+
# define ub_organization_name 64
|
| 269 |
+
# define ub_organization_unit_name 64
|
| 270 |
+
# define ub_title 64
|
| 271 |
+
# define ub_email_address 128
|
| 272 |
+
|
| 273 |
+
/*
|
| 274 |
+
* Declarations for template structures: for full definitions see asn1t.h
|
| 275 |
+
*/
|
| 276 |
+
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
| 277 |
+
typedef struct ASN1_TLC_st ASN1_TLC;
|
| 278 |
+
/* This is just an opaque pointer */
|
| 279 |
+
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
| 280 |
+
|
| 281 |
+
/* Declare ASN1 functions: the implement macro is in asn1t.h */
|
| 282 |
+
|
| 283 |
+
/*
|
| 284 |
+
* The mysterious 'extern' that's passed to some macros is innocuous,
|
| 285 |
+
* and is there to quiet pre-C99 compilers that may complain about empty
|
| 286 |
+
* arguments in macro calls.
|
| 287 |
+
*/
|
| 288 |
+
|
| 289 |
+
# define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
|
| 290 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
|
| 291 |
+
# define DECLARE_ASN1_FUNCTIONS(type) \
|
| 292 |
+
DECLARE_ASN1_FUNCTIONS_attr(extern, type)
|
| 293 |
+
|
| 294 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
|
| 295 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
|
| 296 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
|
| 297 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
|
| 298 |
+
|
| 299 |
+
# define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
|
| 300 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 301 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
|
| 302 |
+
# define DECLARE_ASN1_FUNCTIONS_name(type, name) \
|
| 303 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
|
| 304 |
+
|
| 305 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
|
| 306 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 307 |
+
DECLARE_ASN1_ITEM_attr(attr, itname)
|
| 308 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
|
| 309 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
|
| 310 |
+
|
| 311 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
|
| 312 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
|
| 313 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
|
| 314 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
|
| 315 |
+
|
| 316 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 317 |
+
attr type *d2i_##name(type **a, const unsigned char **in, long len); \
|
| 318 |
+
attr int i2d_##name(const type *a, unsigned char **out);
|
| 319 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
|
| 320 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
|
| 321 |
+
|
| 322 |
+
# define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
|
| 323 |
+
attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
|
| 324 |
+
# define DECLARE_ASN1_NDEF_FUNCTION(name) \
|
| 325 |
+
DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
|
| 326 |
+
|
| 327 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 328 |
+
attr type *name##_new(void); \
|
| 329 |
+
attr void name##_free(type *a);
|
| 330 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 331 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
|
| 332 |
+
|
| 333 |
+
# define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
|
| 334 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
|
| 335 |
+
# define DECLARE_ASN1_DUP_FUNCTION(type) \
|
| 336 |
+
DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
|
| 337 |
+
|
| 338 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
|
| 339 |
+
attr type *name##_dup(const type *a);
|
| 340 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
|
| 341 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
|
| 342 |
+
|
| 343 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
|
| 344 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
|
| 345 |
+
# define DECLARE_ASN1_PRINT_FUNCTION(stname) \
|
| 346 |
+
DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
|
| 347 |
+
|
| 348 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
|
| 349 |
+
attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 350 |
+
const ASN1_PCTX *pctx);
|
| 351 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
|
| 352 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
|
| 353 |
+
|
| 354 |
+
# define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
|
| 355 |
+
# define I2D_OF(type) int (*)(const type *,unsigned char **)
|
| 356 |
+
|
| 357 |
+
# define CHECKED_D2I_OF(type, d2i) \
|
| 358 |
+
((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
|
| 359 |
+
# define CHECKED_I2D_OF(type, i2d) \
|
| 360 |
+
((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
|
| 361 |
+
# define CHECKED_NEW_OF(type, xnew) \
|
| 362 |
+
((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
|
| 363 |
+
# define CHECKED_PTR_OF(type, p) \
|
| 364 |
+
((void*) (1 ? p : (type*)0))
|
| 365 |
+
# define CHECKED_PPTR_OF(type, p) \
|
| 366 |
+
((void**) (1 ? p : (type**)0))
|
| 367 |
+
|
| 368 |
+
# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
|
| 369 |
+
# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *,unsigned char **)
|
| 370 |
+
# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
|
| 371 |
+
|
| 372 |
+
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
| 373 |
+
typedef int i2d_of_void(const void *, unsigned char **);
|
| 374 |
+
typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
|
| 375 |
+
|
| 376 |
+
/*-
|
| 377 |
+
* The following macros and typedefs allow an ASN1_ITEM
|
| 378 |
+
* to be embedded in a structure and referenced. Since
|
| 379 |
+
* the ASN1_ITEM pointers need to be globally accessible
|
| 380 |
+
* (possibly from shared libraries) they may exist in
|
| 381 |
+
* different forms. On platforms that support it the
|
| 382 |
+
* ASN1_ITEM structure itself will be globally exported.
|
| 383 |
+
* Other platforms will export a function that returns
|
| 384 |
+
* an ASN1_ITEM pointer.
|
| 385 |
+
*
|
| 386 |
+
* To handle both cases transparently the macros below
|
| 387 |
+
* should be used instead of hard coding an ASN1_ITEM
|
| 388 |
+
* pointer in a structure.
|
| 389 |
+
*
|
| 390 |
+
* The structure will look like this:
|
| 391 |
+
*
|
| 392 |
+
* typedef struct SOMETHING_st {
|
| 393 |
+
* ...
|
| 394 |
+
* ASN1_ITEM_EXP *iptr;
|
| 395 |
+
* ...
|
| 396 |
+
* } SOMETHING;
|
| 397 |
+
*
|
| 398 |
+
* It would be initialised as e.g.:
|
| 399 |
+
*
|
| 400 |
+
* SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
|
| 401 |
+
*
|
| 402 |
+
* and the actual pointer extracted with:
|
| 403 |
+
*
|
| 404 |
+
* const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
|
| 405 |
+
*
|
| 406 |
+
* Finally an ASN1_ITEM pointer can be extracted from an
|
| 407 |
+
* appropriate reference with: ASN1_ITEM_rptr(X509). This
|
| 408 |
+
* would be used when a function takes an ASN1_ITEM * argument.
|
| 409 |
+
*
|
| 410 |
+
*/
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
/*
|
| 414 |
+
* Platforms that can't easily handle shared global variables are declared as
|
| 415 |
+
* functions returning ASN1_ITEM pointers.
|
| 416 |
+
*/
|
| 417 |
+
|
| 418 |
+
/* ASN1_ITEM pointer exported type */
|
| 419 |
+
typedef const ASN1_ITEM *ASN1_ITEM_EXP (void);
|
| 420 |
+
|
| 421 |
+
/* Macro to obtain ASN1_ITEM pointer from exported type */
|
| 422 |
+
# define ASN1_ITEM_ptr(iptr) (iptr())
|
| 423 |
+
|
| 424 |
+
/* Macro to include ASN1_ITEM pointer from base type */
|
| 425 |
+
# define ASN1_ITEM_ref(iptr) (iptr##_it)
|
| 426 |
+
|
| 427 |
+
# define ASN1_ITEM_rptr(ref) (ref##_it())
|
| 428 |
+
|
| 429 |
+
# define DECLARE_ASN1_ITEM_attr(attr, name) \
|
| 430 |
+
attr const ASN1_ITEM * name##_it(void);
|
| 431 |
+
# define DECLARE_ASN1_ITEM(name) \
|
| 432 |
+
DECLARE_ASN1_ITEM_attr(extern, name)
|
| 433 |
+
|
| 434 |
+
/* Parameters used by ASN1_STRING_print_ex() */
|
| 435 |
+
|
| 436 |
+
/*
|
| 437 |
+
* These determine which characters to escape: RFC2253 special characters,
|
| 438 |
+
* control characters and MSB set characters
|
| 439 |
+
*/
|
| 440 |
+
|
| 441 |
+
# define ASN1_STRFLGS_ESC_2253 1
|
| 442 |
+
# define ASN1_STRFLGS_ESC_CTRL 2
|
| 443 |
+
# define ASN1_STRFLGS_ESC_MSB 4
|
| 444 |
+
|
| 445 |
+
/* Lower 8 bits are reserved as an output type specifier */
|
| 446 |
+
# define ASN1_DTFLGS_TYPE_MASK 0x0FUL
|
| 447 |
+
# define ASN1_DTFLGS_RFC822 0x00UL
|
| 448 |
+
# define ASN1_DTFLGS_ISO8601 0x01UL
|
| 449 |
+
|
| 450 |
+
/*
|
| 451 |
+
* This flag determines how we do escaping: normally RC2253 backslash only,
|
| 452 |
+
* set this to use backslash and quote.
|
| 453 |
+
*/
|
| 454 |
+
|
| 455 |
+
# define ASN1_STRFLGS_ESC_QUOTE 8
|
| 456 |
+
|
| 457 |
+
/* These three flags are internal use only. */
|
| 458 |
+
|
| 459 |
+
/* Character is a valid PrintableString character */
|
| 460 |
+
# define CHARTYPE_PRINTABLESTRING 0x10
|
| 461 |
+
/* Character needs escaping if it is the first character */
|
| 462 |
+
# define CHARTYPE_FIRST_ESC_2253 0x20
|
| 463 |
+
/* Character needs escaping if it is the last character */
|
| 464 |
+
# define CHARTYPE_LAST_ESC_2253 0x40
|
| 465 |
+
|
| 466 |
+
/*
|
| 467 |
+
* NB the internal flags are safely reused below by flags handled at the top
|
| 468 |
+
* level.
|
| 469 |
+
*/
|
| 470 |
+
|
| 471 |
+
/*
|
| 472 |
+
* If this is set we convert all character strings to UTF8 first
|
| 473 |
+
*/
|
| 474 |
+
|
| 475 |
+
# define ASN1_STRFLGS_UTF8_CONVERT 0x10
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* If this is set we don't attempt to interpret content: just assume all
|
| 479 |
+
* strings are 1 byte per character. This will produce some pretty odd
|
| 480 |
+
* looking output!
|
| 481 |
+
*/
|
| 482 |
+
|
| 483 |
+
# define ASN1_STRFLGS_IGNORE_TYPE 0x20
|
| 484 |
+
|
| 485 |
+
/* If this is set we include the string type in the output */
|
| 486 |
+
# define ASN1_STRFLGS_SHOW_TYPE 0x40
|
| 487 |
+
|
| 488 |
+
/*
|
| 489 |
+
* This determines which strings to display and which to 'dump' (hex dump of
|
| 490 |
+
* content octets or DER encoding). We can only dump non character strings or
|
| 491 |
+
* everything. If we don't dump 'unknown' they are interpreted as character
|
| 492 |
+
* strings with 1 octet per character and are subject to the usual escaping
|
| 493 |
+
* options.
|
| 494 |
+
*/
|
| 495 |
+
|
| 496 |
+
# define ASN1_STRFLGS_DUMP_ALL 0x80
|
| 497 |
+
# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
|
| 498 |
+
|
| 499 |
+
/*
|
| 500 |
+
* These determine what 'dumping' does, we can dump the content octets or the
|
| 501 |
+
* DER encoding: both use the RFC2253 #XXXXX notation.
|
| 502 |
+
*/
|
| 503 |
+
|
| 504 |
+
# define ASN1_STRFLGS_DUMP_DER 0x200
|
| 505 |
+
|
| 506 |
+
/*
|
| 507 |
+
* This flag specifies that RC2254 escaping shall be performed.
|
| 508 |
+
*/
|
| 509 |
+
#define ASN1_STRFLGS_ESC_2254 0x400
|
| 510 |
+
|
| 511 |
+
/*
|
| 512 |
+
* All the string flags consistent with RFC2253, escaping control characters
|
| 513 |
+
* isn't essential in RFC2253 but it is advisable anyway.
|
| 514 |
+
*/
|
| 515 |
+
|
| 516 |
+
# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \
|
| 517 |
+
ASN1_STRFLGS_ESC_CTRL | \
|
| 518 |
+
ASN1_STRFLGS_ESC_MSB | \
|
| 519 |
+
ASN1_STRFLGS_UTF8_CONVERT | \
|
| 520 |
+
ASN1_STRFLGS_DUMP_UNKNOWN | \
|
| 521 |
+
ASN1_STRFLGS_DUMP_DER)
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
struct asn1_type_st {
|
| 525 |
+
int type;
|
| 526 |
+
union {
|
| 527 |
+
char *ptr;
|
| 528 |
+
ASN1_BOOLEAN boolean;
|
| 529 |
+
ASN1_STRING *asn1_string;
|
| 530 |
+
ASN1_OBJECT *object;
|
| 531 |
+
ASN1_INTEGER *integer;
|
| 532 |
+
ASN1_ENUMERATED *enumerated;
|
| 533 |
+
ASN1_BIT_STRING *bit_string;
|
| 534 |
+
ASN1_OCTET_STRING *octet_string;
|
| 535 |
+
ASN1_PRINTABLESTRING *printablestring;
|
| 536 |
+
ASN1_T61STRING *t61string;
|
| 537 |
+
ASN1_IA5STRING *ia5string;
|
| 538 |
+
ASN1_GENERALSTRING *generalstring;
|
| 539 |
+
ASN1_BMPSTRING *bmpstring;
|
| 540 |
+
ASN1_UNIVERSALSTRING *universalstring;
|
| 541 |
+
ASN1_UTCTIME *utctime;
|
| 542 |
+
ASN1_GENERALIZEDTIME *generalizedtime;
|
| 543 |
+
ASN1_VISIBLESTRING *visiblestring;
|
| 544 |
+
ASN1_UTF8STRING *utf8string;
|
| 545 |
+
/*
|
| 546 |
+
* set and sequence are left complete and still contain the set or
|
| 547 |
+
* sequence bytes
|
| 548 |
+
*/
|
| 549 |
+
ASN1_STRING *set;
|
| 550 |
+
ASN1_STRING *sequence;
|
| 551 |
+
ASN1_VALUE *asn1_value;
|
| 552 |
+
} value;
|
| 553 |
+
};
|
| 554 |
+
|
| 555 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
|
| 556 |
+
#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 557 |
+
#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
|
| 558 |
+
#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 559 |
+
#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
|
| 560 |
+
#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
|
| 561 |
+
#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
|
| 562 |
+
#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 563 |
+
#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 564 |
+
#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
|
| 565 |
+
#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
|
| 566 |
+
#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 567 |
+
#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 568 |
+
#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 569 |
+
#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 570 |
+
#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk),ossl_check_ASN1_TYPE_freefunc_type(freefunc))
|
| 571 |
+
#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
|
| 572 |
+
#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
|
| 573 |
+
#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 574 |
+
#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 575 |
+
#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
|
| 576 |
+
#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 577 |
+
#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 578 |
+
#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
|
| 579 |
+
#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
|
| 580 |
+
#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
|
| 584 |
+
|
| 585 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
|
| 586 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
|
| 587 |
+
|
| 588 |
+
/* This is used to contain a list of bit names */
|
| 589 |
+
typedef struct BIT_STRING_BITNAME_st {
|
| 590 |
+
int bitnum;
|
| 591 |
+
const char *lname;
|
| 592 |
+
const char *sname;
|
| 593 |
+
} BIT_STRING_BITNAME;
|
| 594 |
+
|
| 595 |
+
# define B_ASN1_TIME \
|
| 596 |
+
B_ASN1_UTCTIME | \
|
| 597 |
+
B_ASN1_GENERALIZEDTIME
|
| 598 |
+
|
| 599 |
+
# define B_ASN1_PRINTABLE \
|
| 600 |
+
B_ASN1_NUMERICSTRING| \
|
| 601 |
+
B_ASN1_PRINTABLESTRING| \
|
| 602 |
+
B_ASN1_T61STRING| \
|
| 603 |
+
B_ASN1_IA5STRING| \
|
| 604 |
+
B_ASN1_BIT_STRING| \
|
| 605 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 606 |
+
B_ASN1_BMPSTRING|\
|
| 607 |
+
B_ASN1_UTF8STRING|\
|
| 608 |
+
B_ASN1_SEQUENCE|\
|
| 609 |
+
B_ASN1_UNKNOWN
|
| 610 |
+
|
| 611 |
+
# define B_ASN1_DIRECTORYSTRING \
|
| 612 |
+
B_ASN1_PRINTABLESTRING| \
|
| 613 |
+
B_ASN1_TELETEXSTRING|\
|
| 614 |
+
B_ASN1_BMPSTRING|\
|
| 615 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 616 |
+
B_ASN1_UTF8STRING
|
| 617 |
+
|
| 618 |
+
# define B_ASN1_DISPLAYTEXT \
|
| 619 |
+
B_ASN1_IA5STRING| \
|
| 620 |
+
B_ASN1_VISIBLESTRING| \
|
| 621 |
+
B_ASN1_BMPSTRING|\
|
| 622 |
+
B_ASN1_UTF8STRING
|
| 623 |
+
|
| 624 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
|
| 625 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
| 626 |
+
|
| 627 |
+
int ASN1_TYPE_get(const ASN1_TYPE *a);
|
| 628 |
+
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
| 629 |
+
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
| 630 |
+
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
| 631 |
+
|
| 632 |
+
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
|
| 633 |
+
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
|
| 634 |
+
|
| 635 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
|
| 636 |
+
#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 637 |
+
#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
|
| 638 |
+
#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 639 |
+
#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
|
| 640 |
+
#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
|
| 641 |
+
#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
|
| 642 |
+
#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 643 |
+
#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 644 |
+
#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
|
| 645 |
+
#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 646 |
+
#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 647 |
+
#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 648 |
+
#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 649 |
+
#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 650 |
+
#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk),ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
|
| 651 |
+
#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
|
| 652 |
+
#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 653 |
+
#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 654 |
+
#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 655 |
+
#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
|
| 656 |
+
#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 657 |
+
#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 658 |
+
#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
|
| 659 |
+
#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
|
| 660 |
+
#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
|
| 664 |
+
|
| 665 |
+
ASN1_STRING *ASN1_STRING_new(void);
|
| 666 |
+
void ASN1_STRING_free(ASN1_STRING *a);
|
| 667 |
+
void ASN1_STRING_clear_free(ASN1_STRING *a);
|
| 668 |
+
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
|
| 669 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
|
| 670 |
+
ASN1_STRING *ASN1_STRING_type_new(int type);
|
| 671 |
+
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
|
| 672 |
+
/*
|
| 673 |
+
* Since this is used to store all sorts of things, via macros, for now,
|
| 674 |
+
* make its data void *
|
| 675 |
+
*/
|
| 676 |
+
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
|
| 677 |
+
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
|
| 678 |
+
int ASN1_STRING_length(const ASN1_STRING *x);
|
| 679 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 680 |
+
OSSL_DEPRECATEDIN_3_0 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
|
| 681 |
+
# endif
|
| 682 |
+
int ASN1_STRING_type(const ASN1_STRING *x);
|
| 683 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 684 |
+
OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
| 685 |
+
# endif
|
| 686 |
+
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
|
| 687 |
+
|
| 688 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
|
| 689 |
+
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
|
| 690 |
+
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
|
| 691 |
+
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
|
| 692 |
+
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
|
| 693 |
+
const unsigned char *flags, int flags_len);
|
| 694 |
+
|
| 695 |
+
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
|
| 696 |
+
BIT_STRING_BITNAME *tbl, int indent);
|
| 697 |
+
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
|
| 698 |
+
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
|
| 699 |
+
BIT_STRING_BITNAME *tbl);
|
| 700 |
+
|
| 701 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
|
| 702 |
+
#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 703 |
+
#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
|
| 704 |
+
#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 705 |
+
#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
|
| 706 |
+
#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
|
| 707 |
+
#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
|
| 708 |
+
#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 709 |
+
#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 710 |
+
#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
|
| 711 |
+
#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 712 |
+
#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 713 |
+
#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 714 |
+
#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 715 |
+
#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 716 |
+
#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk),ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
|
| 717 |
+
#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
|
| 718 |
+
#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 719 |
+
#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 720 |
+
#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 721 |
+
#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
|
| 722 |
+
#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 723 |
+
#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 724 |
+
#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
|
| 725 |
+
#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
|
| 726 |
+
#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 727 |
+
|
| 728 |
+
|
| 729 |
+
|
| 730 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
|
| 731 |
+
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
| 732 |
+
long length);
|
| 733 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
|
| 734 |
+
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
|
| 735 |
+
|
| 736 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
| 737 |
+
|
| 738 |
+
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
| 739 |
+
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
|
| 740 |
+
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
| 741 |
+
int offset_day, long offset_sec);
|
| 742 |
+
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
|
| 743 |
+
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
| 744 |
+
|
| 745 |
+
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
| 746 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
| 747 |
+
time_t t);
|
| 748 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
|
| 749 |
+
time_t t, int offset_day,
|
| 750 |
+
long offset_sec);
|
| 751 |
+
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
|
| 752 |
+
|
| 753 |
+
int ASN1_TIME_diff(int *pday, int *psec,
|
| 754 |
+
const ASN1_TIME *from, const ASN1_TIME *to);
|
| 755 |
+
|
| 756 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
|
| 757 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
|
| 758 |
+
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
|
| 759 |
+
const ASN1_OCTET_STRING *b);
|
| 760 |
+
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
|
| 761 |
+
int len);
|
| 762 |
+
|
| 763 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
|
| 764 |
+
#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 765 |
+
#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
|
| 766 |
+
#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 767 |
+
#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
|
| 768 |
+
#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
|
| 769 |
+
#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
|
| 770 |
+
#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 771 |
+
#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 772 |
+
#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
|
| 773 |
+
#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 774 |
+
#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 775 |
+
#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 776 |
+
#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 777 |
+
#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 778 |
+
#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk),ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
|
| 779 |
+
#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
|
| 780 |
+
#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 781 |
+
#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 782 |
+
#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 783 |
+
#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
|
| 784 |
+
#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 785 |
+
#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 786 |
+
#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
|
| 787 |
+
#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
|
| 788 |
+
#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
| 792 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
| 793 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
| 794 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
| 795 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
| 796 |
+
|
| 797 |
+
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
|
| 798 |
+
int UTF8_putc(unsigned char *str, int len, unsigned long value);
|
| 799 |
+
|
| 800 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
|
| 801 |
+
#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 802 |
+
#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
|
| 803 |
+
#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 804 |
+
#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
|
| 805 |
+
#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
|
| 806 |
+
#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
|
| 807 |
+
#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 808 |
+
#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 809 |
+
#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
|
| 810 |
+
#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 811 |
+
#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 812 |
+
#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 813 |
+
#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 814 |
+
#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 815 |
+
#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk),ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
|
| 816 |
+
#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
|
| 817 |
+
#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 818 |
+
#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 819 |
+
#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 820 |
+
#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
|
| 821 |
+
#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 822 |
+
#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 823 |
+
#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
|
| 824 |
+
#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
|
| 825 |
+
#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 826 |
+
|
| 827 |
+
|
| 828 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
|
| 829 |
+
|
| 830 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
|
| 831 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
|
| 832 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
|
| 833 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
|
| 834 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
|
| 835 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
|
| 836 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
| 837 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
| 838 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
| 839 |
+
|
| 840 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
| 841 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
| 842 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
| 843 |
+
|
| 844 |
+
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
| 845 |
+
|
| 846 |
+
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
| 847 |
+
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
|
| 848 |
+
int offset_day, long offset_sec);
|
| 849 |
+
int ASN1_TIME_check(const ASN1_TIME *t);
|
| 850 |
+
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
| 851 |
+
ASN1_GENERALIZEDTIME **out);
|
| 852 |
+
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
| 853 |
+
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
|
| 854 |
+
int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
|
| 855 |
+
int ASN1_TIME_normalize(ASN1_TIME *s);
|
| 856 |
+
int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
|
| 857 |
+
int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
|
| 858 |
+
|
| 859 |
+
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
|
| 860 |
+
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
|
| 861 |
+
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
|
| 862 |
+
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
|
| 863 |
+
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
|
| 864 |
+
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
|
| 865 |
+
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
|
| 866 |
+
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
|
| 867 |
+
|
| 868 |
+
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
|
| 869 |
+
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
|
| 870 |
+
const char *sn, const char *ln);
|
| 871 |
+
|
| 872 |
+
int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
|
| 873 |
+
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
|
| 874 |
+
int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
|
| 875 |
+
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
|
| 876 |
+
|
| 877 |
+
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
|
| 878 |
+
long ASN1_INTEGER_get(const ASN1_INTEGER *a);
|
| 879 |
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
|
| 880 |
+
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
|
| 881 |
+
|
| 882 |
+
int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
|
| 883 |
+
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
|
| 884 |
+
|
| 885 |
+
|
| 886 |
+
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
|
| 887 |
+
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
|
| 888 |
+
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
| 889 |
+
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
| 890 |
+
|
| 891 |
+
/* General */
|
| 892 |
+
/* given a string, return the correct type, max is the maximum length */
|
| 893 |
+
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
| 894 |
+
|
| 895 |
+
unsigned long ASN1_tag2bit(int tag);
|
| 896 |
+
|
| 897 |
+
/* SPECIALS */
|
| 898 |
+
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
| 899 |
+
int *pclass, long omax);
|
| 900 |
+
int ASN1_check_infinite_end(unsigned char **p, long len);
|
| 901 |
+
int ASN1_const_check_infinite_end(const unsigned char **p, long len);
|
| 902 |
+
void ASN1_put_object(unsigned char **pp, int constructed, int length,
|
| 903 |
+
int tag, int xclass);
|
| 904 |
+
int ASN1_put_eoc(unsigned char **pp);
|
| 905 |
+
int ASN1_object_size(int constructed, int length, int tag);
|
| 906 |
+
|
| 907 |
+
/* Used to implement other functions */
|
| 908 |
+
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
|
| 909 |
+
|
| 910 |
+
# define ASN1_dup_of(type,i2d,d2i,x) \
|
| 911 |
+
((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
| 912 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 913 |
+
CHECKED_PTR_OF(const type, x)))
|
| 914 |
+
|
| 915 |
+
void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
|
| 916 |
+
int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 917 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 918 |
+
const void *data, const ASN1_OCTET_STRING *id,
|
| 919 |
+
EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
|
| 920 |
+
const char *propq);
|
| 921 |
+
int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 922 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 923 |
+
const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
|
| 924 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 925 |
+
|
| 926 |
+
/* ASN1 alloc/free macros for when a type is only used internally */
|
| 927 |
+
|
| 928 |
+
# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
|
| 929 |
+
# define M_ASN1_free_of(x, type) \
|
| 930 |
+
ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
|
| 931 |
+
|
| 932 |
+
# ifndef OPENSSL_NO_STDIO
|
| 933 |
+
void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
|
| 934 |
+
|
| 935 |
+
# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
|
| 936 |
+
((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
| 937 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 938 |
+
in, \
|
| 939 |
+
CHECKED_PPTR_OF(type, x)))
|
| 940 |
+
|
| 941 |
+
void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
|
| 942 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 943 |
+
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
| 944 |
+
int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
|
| 945 |
+
|
| 946 |
+
# define ASN1_i2d_fp_of(type,i2d,out,x) \
|
| 947 |
+
(ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
| 948 |
+
out, \
|
| 949 |
+
CHECKED_PTR_OF(const type, x)))
|
| 950 |
+
|
| 951 |
+
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
|
| 952 |
+
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
|
| 953 |
+
# endif
|
| 954 |
+
|
| 955 |
+
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
| 956 |
+
|
| 957 |
+
void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
|
| 958 |
+
|
| 959 |
+
# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
|
| 960 |
+
((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
|
| 961 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 962 |
+
in, \
|
| 963 |
+
CHECKED_PPTR_OF(type, x)))
|
| 964 |
+
|
| 965 |
+
void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
|
| 966 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 967 |
+
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
|
| 968 |
+
int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
|
| 969 |
+
|
| 970 |
+
# define ASN1_i2d_bio_of(type,i2d,out,x) \
|
| 971 |
+
(ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
| 972 |
+
out, \
|
| 973 |
+
CHECKED_PTR_OF(const type, x)))
|
| 974 |
+
|
| 975 |
+
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
|
| 976 |
+
BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
| 977 |
+
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
|
| 978 |
+
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
|
| 979 |
+
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
|
| 980 |
+
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
|
| 981 |
+
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
|
| 982 |
+
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
|
| 983 |
+
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
|
| 984 |
+
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
|
| 985 |
+
unsigned char *buf, int off);
|
| 986 |
+
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
|
| 987 |
+
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
|
| 988 |
+
int dump);
|
| 989 |
+
const char *ASN1_tag2str(int tag);
|
| 990 |
+
|
| 991 |
+
/* Used to load and write Netscape format cert */
|
| 992 |
+
|
| 993 |
+
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
| 994 |
+
|
| 995 |
+
int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
|
| 996 |
+
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
|
| 997 |
+
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
| 998 |
+
unsigned char *data, int len);
|
| 999 |
+
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
|
| 1000 |
+
unsigned char *data, int max_len);
|
| 1001 |
+
|
| 1002 |
+
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
|
| 1003 |
+
void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
|
| 1004 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1005 |
+
|
| 1006 |
+
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
|
| 1007 |
+
ASN1_OCTET_STRING **oct);
|
| 1008 |
+
|
| 1009 |
+
void ASN1_STRING_set_default_mask(unsigned long mask);
|
| 1010 |
+
int ASN1_STRING_set_default_mask_asc(const char *p);
|
| 1011 |
+
unsigned long ASN1_STRING_get_default_mask(void);
|
| 1012 |
+
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1013 |
+
int inform, unsigned long mask);
|
| 1014 |
+
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1015 |
+
int inform, unsigned long mask,
|
| 1016 |
+
long minsize, long maxsize);
|
| 1017 |
+
|
| 1018 |
+
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
|
| 1019 |
+
const unsigned char *in, int inlen,
|
| 1020 |
+
int inform, int nid);
|
| 1021 |
+
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
| 1022 |
+
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
|
| 1023 |
+
void ASN1_STRING_TABLE_cleanup(void);
|
| 1024 |
+
|
| 1025 |
+
/* ASN1 template functions */
|
| 1026 |
+
|
| 1027 |
+
/* Old API compatible functions */
|
| 1028 |
+
ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
| 1029 |
+
ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
|
| 1030 |
+
const char *propq);
|
| 1031 |
+
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1032 |
+
ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
|
| 1033 |
+
long len, const ASN1_ITEM *it,
|
| 1034 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1035 |
+
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
|
| 1036 |
+
long len, const ASN1_ITEM *it);
|
| 1037 |
+
int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
|
| 1038 |
+
int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
|
| 1039 |
+
const ASN1_ITEM *it);
|
| 1040 |
+
|
| 1041 |
+
void ASN1_add_oid_module(void);
|
| 1042 |
+
void ASN1_add_stable_module(void);
|
| 1043 |
+
|
| 1044 |
+
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
| 1045 |
+
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
| 1046 |
+
int ASN1_str2mask(const char *str, unsigned long *pmask);
|
| 1047 |
+
|
| 1048 |
+
/* ASN1 Print flags */
|
| 1049 |
+
|
| 1050 |
+
/* Indicate missing OPTIONAL fields */
|
| 1051 |
+
# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
|
| 1052 |
+
/* Mark start and end of SEQUENCE */
|
| 1053 |
+
# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
|
| 1054 |
+
/* Mark start and end of SEQUENCE/SET OF */
|
| 1055 |
+
# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
|
| 1056 |
+
/* Show the ASN1 type of primitives */
|
| 1057 |
+
# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
|
| 1058 |
+
/* Don't show ASN1 type of ANY */
|
| 1059 |
+
# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
|
| 1060 |
+
/* Don't show ASN1 type of MSTRINGs */
|
| 1061 |
+
# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
|
| 1062 |
+
/* Don't show field names in SEQUENCE */
|
| 1063 |
+
# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
|
| 1064 |
+
/* Show structure names of each SEQUENCE field */
|
| 1065 |
+
# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
|
| 1066 |
+
/* Don't show structure name even at top level */
|
| 1067 |
+
# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
|
| 1068 |
+
|
| 1069 |
+
int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
|
| 1070 |
+
const ASN1_ITEM *it, const ASN1_PCTX *pctx);
|
| 1071 |
+
ASN1_PCTX *ASN1_PCTX_new(void);
|
| 1072 |
+
void ASN1_PCTX_free(ASN1_PCTX *p);
|
| 1073 |
+
unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
|
| 1074 |
+
void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1075 |
+
unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
|
| 1076 |
+
void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1077 |
+
unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
|
| 1078 |
+
void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1079 |
+
unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
|
| 1080 |
+
void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1081 |
+
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
|
| 1082 |
+
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1083 |
+
|
| 1084 |
+
ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx));
|
| 1085 |
+
void ASN1_SCTX_free(ASN1_SCTX *p);
|
| 1086 |
+
const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
|
| 1087 |
+
const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
|
| 1088 |
+
unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
|
| 1089 |
+
void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
|
| 1090 |
+
void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
|
| 1091 |
+
|
| 1092 |
+
const BIO_METHOD *BIO_f_asn1(void);
|
| 1093 |
+
|
| 1094 |
+
/* cannot constify val because of CMS_stream() */
|
| 1095 |
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1096 |
+
|
| 1097 |
+
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1098 |
+
const ASN1_ITEM *it);
|
| 1099 |
+
int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1100 |
+
const char *hdr, const ASN1_ITEM *it);
|
| 1101 |
+
/* cannot constify val because of CMS_dataFinal() */
|
| 1102 |
+
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1103 |
+
int ctype_nid, int econt_nid,
|
| 1104 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);
|
| 1105 |
+
int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1106 |
+
int ctype_nid, int econt_nid,
|
| 1107 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it,
|
| 1108 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1109 |
+
ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
|
| 1110 |
+
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
|
| 1111 |
+
const ASN1_ITEM *it, ASN1_VALUE **x,
|
| 1112 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1113 |
+
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
|
| 1114 |
+
int SMIME_text(BIO *in, BIO *out);
|
| 1115 |
+
|
| 1116 |
+
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
| 1117 |
+
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
| 1118 |
+
|
| 1119 |
+
/* Legacy compatibility */
|
| 1120 |
+
# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
|
| 1121 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 1122 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
|
| 1123 |
+
# define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
|
| 1124 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
|
| 1125 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
|
| 1126 |
+
# define I2D_OF_const(type) I2D_OF(type)
|
| 1127 |
+
# define ASN1_dup_of_const(type,i2d,d2i,x) ASN1_dup_of(type,i2d,d2i,x)
|
| 1128 |
+
# define ASN1_i2d_fp_of_const(type,i2d,out,x) ASN1_i2d_fp_of(type,i2d,out,x)
|
| 1129 |
+
# define ASN1_i2d_bio_of_const(type,i2d,out,x) ASN1_i2d_bio_of(type,i2d,out,x)
|
| 1130 |
+
|
| 1131 |
+
# ifdef __cplusplus
|
| 1132 |
+
}
|
| 1133 |
+
# endif
|
| 1134 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/asn1t.h
ADDED
|
@@ -0,0 +1,946 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1t.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1T_H
|
| 16 |
+
# define OPENSSL_ASN1T_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1T_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <stddef.h>
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 29 |
+
# undef OPENSSL_EXTERN
|
| 30 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 31 |
+
# endif
|
| 32 |
+
|
| 33 |
+
/* ASN1 template defines, structures and functions */
|
| 34 |
+
|
| 35 |
+
#ifdef __cplusplus
|
| 36 |
+
extern "C" {
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
/*-
|
| 40 |
+
* These are the possible values for the itype field of the
|
| 41 |
+
* ASN1_ITEM structure and determine how it is interpreted.
|
| 42 |
+
*
|
| 43 |
+
* For PRIMITIVE types the underlying type
|
| 44 |
+
* determines the behaviour if items is NULL.
|
| 45 |
+
*
|
| 46 |
+
* Otherwise templates must contain a single
|
| 47 |
+
* template and the type is treated in the
|
| 48 |
+
* same way as the type specified in the template.
|
| 49 |
+
*
|
| 50 |
+
* For SEQUENCE types the templates field points
|
| 51 |
+
* to the members, the size field is the
|
| 52 |
+
* structure size.
|
| 53 |
+
*
|
| 54 |
+
* For CHOICE types the templates field points
|
| 55 |
+
* to each possible member (typically a union)
|
| 56 |
+
* and the 'size' field is the offset of the
|
| 57 |
+
* selector.
|
| 58 |
+
*
|
| 59 |
+
* The 'funcs' field is used for application-specific
|
| 60 |
+
* data and functions.
|
| 61 |
+
*
|
| 62 |
+
* The EXTERN type uses a new style d2i/i2d.
|
| 63 |
+
* The new style should be used where possible
|
| 64 |
+
* because it avoids things like the d2i IMPLICIT
|
| 65 |
+
* hack.
|
| 66 |
+
*
|
| 67 |
+
* MSTRING is a multiple string type, it is used
|
| 68 |
+
* for a CHOICE of character strings where the
|
| 69 |
+
* actual strings all occupy an ASN1_STRING
|
| 70 |
+
* structure. In this case the 'utype' field
|
| 71 |
+
* has a special meaning, it is used as a mask
|
| 72 |
+
* of acceptable types using the B_ASN1 constants.
|
| 73 |
+
*
|
| 74 |
+
* NDEF_SEQUENCE is the same as SEQUENCE except
|
| 75 |
+
* that it will use indefinite length constructed
|
| 76 |
+
* encoding if requested.
|
| 77 |
+
*
|
| 78 |
+
*/
|
| 79 |
+
|
| 80 |
+
# define ASN1_ITYPE_PRIMITIVE 0x0
|
| 81 |
+
# define ASN1_ITYPE_SEQUENCE 0x1
|
| 82 |
+
# define ASN1_ITYPE_CHOICE 0x2
|
| 83 |
+
/* unused value 0x3 */
|
| 84 |
+
# define ASN1_ITYPE_EXTERN 0x4
|
| 85 |
+
# define ASN1_ITYPE_MSTRING 0x5
|
| 86 |
+
# define ASN1_ITYPE_NDEF_SEQUENCE 0x6
|
| 87 |
+
|
| 88 |
+
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
|
| 89 |
+
# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
|
| 90 |
+
|
| 91 |
+
/* Macros for start and end of ASN1_ITEM definition */
|
| 92 |
+
|
| 93 |
+
# define ASN1_ITEM_start(itname) \
|
| 94 |
+
const ASN1_ITEM * itname##_it(void) \
|
| 95 |
+
{ \
|
| 96 |
+
static const ASN1_ITEM local_it = {
|
| 97 |
+
|
| 98 |
+
# define static_ASN1_ITEM_start(itname) \
|
| 99 |
+
static ASN1_ITEM_start(itname)
|
| 100 |
+
|
| 101 |
+
# define ASN1_ITEM_end(itname) \
|
| 102 |
+
}; \
|
| 103 |
+
return &local_it; \
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* Macros to aid ASN1 template writing */
|
| 107 |
+
|
| 108 |
+
# define ASN1_ITEM_TEMPLATE(tname) \
|
| 109 |
+
static const ASN1_TEMPLATE tname##_item_tt
|
| 110 |
+
|
| 111 |
+
# define ASN1_ITEM_TEMPLATE_END(tname) \
|
| 112 |
+
;\
|
| 113 |
+
ASN1_ITEM_start(tname) \
|
| 114 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 115 |
+
-1,\
|
| 116 |
+
&tname##_item_tt,\
|
| 117 |
+
0,\
|
| 118 |
+
NULL,\
|
| 119 |
+
0,\
|
| 120 |
+
#tname \
|
| 121 |
+
ASN1_ITEM_end(tname)
|
| 122 |
+
# define static_ASN1_ITEM_TEMPLATE_END(tname) \
|
| 123 |
+
;\
|
| 124 |
+
static_ASN1_ITEM_start(tname) \
|
| 125 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 126 |
+
-1,\
|
| 127 |
+
&tname##_item_tt,\
|
| 128 |
+
0,\
|
| 129 |
+
NULL,\
|
| 130 |
+
0,\
|
| 131 |
+
#tname \
|
| 132 |
+
ASN1_ITEM_end(tname)
|
| 133 |
+
|
| 134 |
+
/* This is a ASN1 type which just embeds a template */
|
| 135 |
+
|
| 136 |
+
/*-
|
| 137 |
+
* This pair helps declare a SEQUENCE. We can do:
|
| 138 |
+
*
|
| 139 |
+
* ASN1_SEQUENCE(stname) = {
|
| 140 |
+
* ... SEQUENCE components ...
|
| 141 |
+
* } ASN1_SEQUENCE_END(stname)
|
| 142 |
+
*
|
| 143 |
+
* This will produce an ASN1_ITEM called stname_it
|
| 144 |
+
* for a structure called stname.
|
| 145 |
+
*
|
| 146 |
+
* If you want the same structure but a different
|
| 147 |
+
* name then use:
|
| 148 |
+
*
|
| 149 |
+
* ASN1_SEQUENCE(itname) = {
|
| 150 |
+
* ... SEQUENCE components ...
|
| 151 |
+
* } ASN1_SEQUENCE_END_name(stname, itname)
|
| 152 |
+
*
|
| 153 |
+
* This will create an item called itname_it using
|
| 154 |
+
* a structure called stname.
|
| 155 |
+
*/
|
| 156 |
+
|
| 157 |
+
# define ASN1_SEQUENCE(tname) \
|
| 158 |
+
static const ASN1_TEMPLATE tname##_seq_tt[]
|
| 159 |
+
|
| 160 |
+
# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
|
| 161 |
+
|
| 162 |
+
# define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)
|
| 163 |
+
|
| 164 |
+
# define ASN1_SEQUENCE_END_name(stname, tname) \
|
| 165 |
+
;\
|
| 166 |
+
ASN1_ITEM_start(tname) \
|
| 167 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 168 |
+
V_ASN1_SEQUENCE,\
|
| 169 |
+
tname##_seq_tt,\
|
| 170 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 171 |
+
NULL,\
|
| 172 |
+
sizeof(stname),\
|
| 173 |
+
#tname \
|
| 174 |
+
ASN1_ITEM_end(tname)
|
| 175 |
+
|
| 176 |
+
# define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
| 177 |
+
;\
|
| 178 |
+
static_ASN1_ITEM_start(tname) \
|
| 179 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 180 |
+
V_ASN1_SEQUENCE,\
|
| 181 |
+
tname##_seq_tt,\
|
| 182 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 183 |
+
NULL,\
|
| 184 |
+
sizeof(stname),\
|
| 185 |
+
#stname \
|
| 186 |
+
ASN1_ITEM_end(tname)
|
| 187 |
+
|
| 188 |
+
# define ASN1_NDEF_SEQUENCE(tname) \
|
| 189 |
+
ASN1_SEQUENCE(tname)
|
| 190 |
+
|
| 191 |
+
# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
|
| 192 |
+
ASN1_SEQUENCE_cb(tname, cb)
|
| 193 |
+
|
| 194 |
+
# define ASN1_SEQUENCE_cb(tname, cb) \
|
| 195 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 196 |
+
ASN1_SEQUENCE(tname)
|
| 197 |
+
|
| 198 |
+
# define ASN1_SEQUENCE_const_cb(tname, const_cb) \
|
| 199 |
+
static const ASN1_AUX tname##_aux = \
|
| 200 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, NULL, 0, const_cb}; \
|
| 201 |
+
ASN1_SEQUENCE(tname)
|
| 202 |
+
|
| 203 |
+
# define ASN1_SEQUENCE_cb_const_cb(tname, cb, const_cb) \
|
| 204 |
+
static const ASN1_AUX tname##_aux = \
|
| 205 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, cb, 0, const_cb}; \
|
| 206 |
+
ASN1_SEQUENCE(tname)
|
| 207 |
+
|
| 208 |
+
# define ASN1_SEQUENCE_ref(tname, cb) \
|
| 209 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0, NULL}; \
|
| 210 |
+
ASN1_SEQUENCE(tname)
|
| 211 |
+
|
| 212 |
+
# define ASN1_SEQUENCE_enc(tname, enc, cb) \
|
| 213 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc), NULL}; \
|
| 214 |
+
ASN1_SEQUENCE(tname)
|
| 215 |
+
|
| 216 |
+
# define ASN1_NDEF_SEQUENCE_END(tname) \
|
| 217 |
+
;\
|
| 218 |
+
ASN1_ITEM_start(tname) \
|
| 219 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 220 |
+
V_ASN1_SEQUENCE,\
|
| 221 |
+
tname##_seq_tt,\
|
| 222 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 223 |
+
NULL,\
|
| 224 |
+
sizeof(tname),\
|
| 225 |
+
#tname \
|
| 226 |
+
ASN1_ITEM_end(tname)
|
| 227 |
+
# define static_ASN1_NDEF_SEQUENCE_END(tname) \
|
| 228 |
+
;\
|
| 229 |
+
static_ASN1_ITEM_start(tname) \
|
| 230 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 231 |
+
V_ASN1_SEQUENCE,\
|
| 232 |
+
tname##_seq_tt,\
|
| 233 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 234 |
+
NULL,\
|
| 235 |
+
sizeof(tname),\
|
| 236 |
+
#tname \
|
| 237 |
+
ASN1_ITEM_end(tname)
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 241 |
+
|
| 242 |
+
# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 243 |
+
# define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)
|
| 244 |
+
|
| 245 |
+
# define ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 246 |
+
;\
|
| 247 |
+
ASN1_ITEM_start(tname) \
|
| 248 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 249 |
+
V_ASN1_SEQUENCE,\
|
| 250 |
+
tname##_seq_tt,\
|
| 251 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 252 |
+
&tname##_aux,\
|
| 253 |
+
sizeof(stname),\
|
| 254 |
+
#tname \
|
| 255 |
+
ASN1_ITEM_end(tname)
|
| 256 |
+
# define static_ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 257 |
+
;\
|
| 258 |
+
static_ASN1_ITEM_start(tname) \
|
| 259 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 260 |
+
V_ASN1_SEQUENCE,\
|
| 261 |
+
tname##_seq_tt,\
|
| 262 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 263 |
+
&tname##_aux,\
|
| 264 |
+
sizeof(stname),\
|
| 265 |
+
#stname \
|
| 266 |
+
ASN1_ITEM_end(tname)
|
| 267 |
+
|
| 268 |
+
# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
|
| 269 |
+
;\
|
| 270 |
+
ASN1_ITEM_start(tname) \
|
| 271 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 272 |
+
V_ASN1_SEQUENCE,\
|
| 273 |
+
tname##_seq_tt,\
|
| 274 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 275 |
+
&tname##_aux,\
|
| 276 |
+
sizeof(stname),\
|
| 277 |
+
#stname \
|
| 278 |
+
ASN1_ITEM_end(tname)
|
| 279 |
+
|
| 280 |
+
/*-
|
| 281 |
+
* This pair helps declare a CHOICE type. We can do:
|
| 282 |
+
*
|
| 283 |
+
* ASN1_CHOICE(chname) = {
|
| 284 |
+
* ... CHOICE options ...
|
| 285 |
+
* ASN1_CHOICE_END(chname)
|
| 286 |
+
*
|
| 287 |
+
* This will produce an ASN1_ITEM called chname_it
|
| 288 |
+
* for a structure called chname. The structure
|
| 289 |
+
* definition must look like this:
|
| 290 |
+
* typedef struct {
|
| 291 |
+
* int type;
|
| 292 |
+
* union {
|
| 293 |
+
* ASN1_SOMETHING *opt1;
|
| 294 |
+
* ASN1_SOMEOTHER *opt2;
|
| 295 |
+
* } value;
|
| 296 |
+
* } chname;
|
| 297 |
+
*
|
| 298 |
+
* the name of the selector must be 'type'.
|
| 299 |
+
* to use an alternative selector name use the
|
| 300 |
+
* ASN1_CHOICE_END_selector() version.
|
| 301 |
+
*/
|
| 302 |
+
|
| 303 |
+
# define ASN1_CHOICE(tname) \
|
| 304 |
+
static const ASN1_TEMPLATE tname##_ch_tt[]
|
| 305 |
+
|
| 306 |
+
# define ASN1_CHOICE_cb(tname, cb) \
|
| 307 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 308 |
+
ASN1_CHOICE(tname)
|
| 309 |
+
|
| 310 |
+
# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
|
| 311 |
+
|
| 312 |
+
# define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)
|
| 313 |
+
|
| 314 |
+
# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
|
| 315 |
+
|
| 316 |
+
# define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)
|
| 317 |
+
|
| 318 |
+
# define ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 319 |
+
;\
|
| 320 |
+
ASN1_ITEM_start(tname) \
|
| 321 |
+
ASN1_ITYPE_CHOICE,\
|
| 322 |
+
offsetof(stname,selname) ,\
|
| 323 |
+
tname##_ch_tt,\
|
| 324 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 325 |
+
NULL,\
|
| 326 |
+
sizeof(stname),\
|
| 327 |
+
#stname \
|
| 328 |
+
ASN1_ITEM_end(tname)
|
| 329 |
+
|
| 330 |
+
# define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 331 |
+
;\
|
| 332 |
+
static_ASN1_ITEM_start(tname) \
|
| 333 |
+
ASN1_ITYPE_CHOICE,\
|
| 334 |
+
offsetof(stname,selname) ,\
|
| 335 |
+
tname##_ch_tt,\
|
| 336 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 337 |
+
NULL,\
|
| 338 |
+
sizeof(stname),\
|
| 339 |
+
#stname \
|
| 340 |
+
ASN1_ITEM_end(tname)
|
| 341 |
+
|
| 342 |
+
# define ASN1_CHOICE_END_cb(stname, tname, selname) \
|
| 343 |
+
;\
|
| 344 |
+
ASN1_ITEM_start(tname) \
|
| 345 |
+
ASN1_ITYPE_CHOICE,\
|
| 346 |
+
offsetof(stname,selname) ,\
|
| 347 |
+
tname##_ch_tt,\
|
| 348 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 349 |
+
&tname##_aux,\
|
| 350 |
+
sizeof(stname),\
|
| 351 |
+
#stname \
|
| 352 |
+
ASN1_ITEM_end(tname)
|
| 353 |
+
|
| 354 |
+
/* This helps with the template wrapper form of ASN1_ITEM */
|
| 355 |
+
|
| 356 |
+
# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
|
| 357 |
+
(flags), (tag), 0,\
|
| 358 |
+
#name, ASN1_ITEM_ref(type) }
|
| 359 |
+
|
| 360 |
+
/* These help with SEQUENCE or CHOICE components */
|
| 361 |
+
|
| 362 |
+
/* used to declare other types */
|
| 363 |
+
|
| 364 |
+
# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
|
| 365 |
+
(flags), (tag), offsetof(stname, field),\
|
| 366 |
+
#field, ASN1_ITEM_ref(type) }
|
| 367 |
+
|
| 368 |
+
/* implicit and explicit helper macros */
|
| 369 |
+
|
| 370 |
+
# define ASN1_IMP_EX(stname, field, type, tag, ex) \
|
| 371 |
+
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type)
|
| 372 |
+
|
| 373 |
+
# define ASN1_EXP_EX(stname, field, type, tag, ex) \
|
| 374 |
+
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type)
|
| 375 |
+
|
| 376 |
+
/* Any defined by macros: the field used is in the table itself */
|
| 377 |
+
|
| 378 |
+
# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
|
| 379 |
+
# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
|
| 380 |
+
|
| 381 |
+
/* Plain simple type */
|
| 382 |
+
# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)
|
| 383 |
+
/* Embedded simple type */
|
| 384 |
+
# define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type)
|
| 385 |
+
|
| 386 |
+
/* OPTIONAL simple type */
|
| 387 |
+
# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 388 |
+
# define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 389 |
+
|
| 390 |
+
/* IMPLICIT tagged simple type */
|
| 391 |
+
# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
|
| 392 |
+
# define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 393 |
+
|
| 394 |
+
/* IMPLICIT tagged OPTIONAL simple type */
|
| 395 |
+
# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 396 |
+
# define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 397 |
+
|
| 398 |
+
/* Same as above but EXPLICIT */
|
| 399 |
+
|
| 400 |
+
# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
|
| 401 |
+
# define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 402 |
+
# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 403 |
+
# define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 404 |
+
|
| 405 |
+
/* SEQUENCE OF type */
|
| 406 |
+
# define ASN1_SEQUENCE_OF(stname, field, type) \
|
| 407 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
|
| 408 |
+
|
| 409 |
+
/* OPTIONAL SEQUENCE OF */
|
| 410 |
+
# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
|
| 411 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 412 |
+
|
| 413 |
+
/* Same as above but for SET OF */
|
| 414 |
+
|
| 415 |
+
# define ASN1_SET_OF(stname, field, type) \
|
| 416 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
|
| 417 |
+
|
| 418 |
+
# define ASN1_SET_OF_OPT(stname, field, type) \
|
| 419 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 420 |
+
|
| 421 |
+
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
|
| 422 |
+
|
| 423 |
+
# define ASN1_IMP_SET_OF(stname, field, type, tag) \
|
| 424 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 425 |
+
|
| 426 |
+
# define ASN1_EXP_SET_OF(stname, field, type, tag) \
|
| 427 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 428 |
+
|
| 429 |
+
# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
|
| 430 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 431 |
+
|
| 432 |
+
# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
|
| 433 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 434 |
+
|
| 435 |
+
# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
|
| 436 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 437 |
+
|
| 438 |
+
# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 439 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 440 |
+
|
| 441 |
+
# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
|
| 442 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 443 |
+
|
| 444 |
+
# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 445 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 446 |
+
|
| 447 |
+
/* EXPLICIT using indefinite length constructed form */
|
| 448 |
+
# define ASN1_NDEF_EXP(stname, field, type, tag) \
|
| 449 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
|
| 450 |
+
|
| 451 |
+
/* EXPLICIT OPTIONAL using indefinite length constructed form */
|
| 452 |
+
# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
|
| 453 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)
|
| 454 |
+
|
| 455 |
+
/* Macros for the ASN1_ADB structure */
|
| 456 |
+
|
| 457 |
+
# define ASN1_ADB(name) \
|
| 458 |
+
static const ASN1_ADB_TABLE name##_adbtbl[]
|
| 459 |
+
|
| 460 |
+
# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \
|
| 461 |
+
;\
|
| 462 |
+
static const ASN1_ITEM *name##_adb(void) \
|
| 463 |
+
{ \
|
| 464 |
+
static const ASN1_ADB internal_adb = \
|
| 465 |
+
{\
|
| 466 |
+
flags,\
|
| 467 |
+
offsetof(name, field),\
|
| 468 |
+
adb_cb,\
|
| 469 |
+
name##_adbtbl,\
|
| 470 |
+
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
|
| 471 |
+
def,\
|
| 472 |
+
none\
|
| 473 |
+
}; \
|
| 474 |
+
return (const ASN1_ITEM *) &internal_adb; \
|
| 475 |
+
} \
|
| 476 |
+
void dummy_function(void)
|
| 477 |
+
|
| 478 |
+
# define ADB_ENTRY(val, template) {val, template}
|
| 479 |
+
|
| 480 |
+
# define ASN1_ADB_TEMPLATE(name) \
|
| 481 |
+
static const ASN1_TEMPLATE name##_tt
|
| 482 |
+
|
| 483 |
+
/*
|
| 484 |
+
* This is the ASN1 template structure that defines a wrapper round the
|
| 485 |
+
* actual type. It determines the actual position of the field in the value
|
| 486 |
+
* structure, various flags such as OPTIONAL and the field name.
|
| 487 |
+
*/
|
| 488 |
+
|
| 489 |
+
struct ASN1_TEMPLATE_st {
|
| 490 |
+
unsigned long flags; /* Various flags */
|
| 491 |
+
long tag; /* tag, not used if no tagging */
|
| 492 |
+
unsigned long offset; /* Offset of this field in structure */
|
| 493 |
+
const char *field_name; /* Field name */
|
| 494 |
+
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
|
| 495 |
+
};
|
| 496 |
+
|
| 497 |
+
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
|
| 498 |
+
|
| 499 |
+
# define ASN1_TEMPLATE_item(t) (t->item_ptr)
|
| 500 |
+
# define ASN1_TEMPLATE_adb(t) (t->item_ptr)
|
| 501 |
+
|
| 502 |
+
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
|
| 503 |
+
typedef struct ASN1_ADB_st ASN1_ADB;
|
| 504 |
+
|
| 505 |
+
struct ASN1_ADB_st {
|
| 506 |
+
unsigned long flags; /* Various flags */
|
| 507 |
+
unsigned long offset; /* Offset of selector field */
|
| 508 |
+
int (*adb_cb)(long *psel); /* Application callback */
|
| 509 |
+
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
|
| 510 |
+
long tblcount; /* Number of entries in tbl */
|
| 511 |
+
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
|
| 512 |
+
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
struct ASN1_ADB_TABLE_st {
|
| 516 |
+
long value; /* NID for an object or value for an int */
|
| 517 |
+
const ASN1_TEMPLATE tt; /* item for this value */
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
/* template flags */
|
| 521 |
+
|
| 522 |
+
/* Field is optional */
|
| 523 |
+
# define ASN1_TFLG_OPTIONAL (0x1)
|
| 524 |
+
|
| 525 |
+
/* Field is a SET OF */
|
| 526 |
+
# define ASN1_TFLG_SET_OF (0x1 << 1)
|
| 527 |
+
|
| 528 |
+
/* Field is a SEQUENCE OF */
|
| 529 |
+
# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
|
| 530 |
+
|
| 531 |
+
/*
|
| 532 |
+
* Special case: this refers to a SET OF that will be sorted into DER order
|
| 533 |
+
* when encoded *and* the corresponding STACK will be modified to match the
|
| 534 |
+
* new order.
|
| 535 |
+
*/
|
| 536 |
+
# define ASN1_TFLG_SET_ORDER (0x3 << 1)
|
| 537 |
+
|
| 538 |
+
/* Mask for SET OF or SEQUENCE OF */
|
| 539 |
+
# define ASN1_TFLG_SK_MASK (0x3 << 1)
|
| 540 |
+
|
| 541 |
+
/*
|
| 542 |
+
* These flags mean the tag should be taken from the tag field. If EXPLICIT
|
| 543 |
+
* then the underlying type is used for the inner tag.
|
| 544 |
+
*/
|
| 545 |
+
|
| 546 |
+
/* IMPLICIT tagging */
|
| 547 |
+
# define ASN1_TFLG_IMPTAG (0x1 << 3)
|
| 548 |
+
|
| 549 |
+
/* EXPLICIT tagging, inner tag from underlying type */
|
| 550 |
+
# define ASN1_TFLG_EXPTAG (0x2 << 3)
|
| 551 |
+
|
| 552 |
+
# define ASN1_TFLG_TAG_MASK (0x3 << 3)
|
| 553 |
+
|
| 554 |
+
/* context specific IMPLICIT */
|
| 555 |
+
# define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT)
|
| 556 |
+
|
| 557 |
+
/* context specific EXPLICIT */
|
| 558 |
+
# define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT)
|
| 559 |
+
|
| 560 |
+
/*
|
| 561 |
+
* If tagging is in force these determine the type of tag to use. Otherwise
|
| 562 |
+
* the tag is determined by the underlying type. These values reflect the
|
| 563 |
+
* actual octet format.
|
| 564 |
+
*/
|
| 565 |
+
|
| 566 |
+
/* Universal tag */
|
| 567 |
+
# define ASN1_TFLG_UNIVERSAL (0x0<<6)
|
| 568 |
+
/* Application tag */
|
| 569 |
+
# define ASN1_TFLG_APPLICATION (0x1<<6)
|
| 570 |
+
/* Context specific tag */
|
| 571 |
+
# define ASN1_TFLG_CONTEXT (0x2<<6)
|
| 572 |
+
/* Private tag */
|
| 573 |
+
# define ASN1_TFLG_PRIVATE (0x3<<6)
|
| 574 |
+
|
| 575 |
+
# define ASN1_TFLG_TAG_CLASS (0x3<<6)
|
| 576 |
+
|
| 577 |
+
/*
|
| 578 |
+
* These are for ANY DEFINED BY type. In this case the 'item' field points to
|
| 579 |
+
* an ASN1_ADB structure which contains a table of values to decode the
|
| 580 |
+
* relevant type
|
| 581 |
+
*/
|
| 582 |
+
|
| 583 |
+
# define ASN1_TFLG_ADB_MASK (0x3<<8)
|
| 584 |
+
|
| 585 |
+
# define ASN1_TFLG_ADB_OID (0x1<<8)
|
| 586 |
+
|
| 587 |
+
# define ASN1_TFLG_ADB_INT (0x1<<9)
|
| 588 |
+
|
| 589 |
+
/*
|
| 590 |
+
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
|
| 591 |
+
* indefinite length constructed encoding to be used if required.
|
| 592 |
+
*/
|
| 593 |
+
|
| 594 |
+
# define ASN1_TFLG_NDEF (0x1<<11)
|
| 595 |
+
|
| 596 |
+
/* Field is embedded and not a pointer */
|
| 597 |
+
# define ASN1_TFLG_EMBED (0x1 << 12)
|
| 598 |
+
|
| 599 |
+
/* This is the actual ASN1 item itself */
|
| 600 |
+
|
| 601 |
+
struct ASN1_ITEM_st {
|
| 602 |
+
char itype; /* The item type, primitive, SEQUENCE, CHOICE
|
| 603 |
+
* or extern */
|
| 604 |
+
long utype; /* underlying type */
|
| 605 |
+
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
|
| 606 |
+
* the contents */
|
| 607 |
+
long tcount; /* Number of templates if SEQUENCE or CHOICE */
|
| 608 |
+
const void *funcs; /* further data and type-specific functions */
|
| 609 |
+
/* funcs can be ASN1_PRIMITIVE_FUNCS*, ASN1_EXTERN_FUNCS*, or ASN1_AUX* */
|
| 610 |
+
long size; /* Structure size (usually) */
|
| 611 |
+
const char *sname; /* Structure name */
|
| 612 |
+
};
|
| 613 |
+
|
| 614 |
+
/*
|
| 615 |
+
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
|
| 616 |
+
* like CHOICE
|
| 617 |
+
*/
|
| 618 |
+
|
| 619 |
+
struct ASN1_TLC_st {
|
| 620 |
+
char valid; /* Values below are valid */
|
| 621 |
+
int ret; /* return value */
|
| 622 |
+
long plen; /* length */
|
| 623 |
+
int ptag; /* class value */
|
| 624 |
+
int pclass; /* class value */
|
| 625 |
+
int hdrlen; /* header length */
|
| 626 |
+
};
|
| 627 |
+
|
| 628 |
+
/* Typedefs for ASN1 function pointers */
|
| 629 |
+
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 630 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 631 |
+
ASN1_TLC *ctx);
|
| 632 |
+
|
| 633 |
+
typedef int ASN1_ex_d2i_ex(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 634 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 635 |
+
ASN1_TLC *ctx, OSSL_LIB_CTX *libctx,
|
| 636 |
+
const char *propq);
|
| 637 |
+
typedef int ASN1_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 638 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 639 |
+
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 640 |
+
typedef int ASN1_ex_new_ex_func(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
| 641 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 642 |
+
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 643 |
+
|
| 644 |
+
typedef int ASN1_ex_print_func(BIO *out, const ASN1_VALUE **pval,
|
| 645 |
+
int indent, const char *fname,
|
| 646 |
+
const ASN1_PCTX *pctx);
|
| 647 |
+
|
| 648 |
+
typedef int ASN1_primitive_i2c(const ASN1_VALUE **pval, unsigned char *cont,
|
| 649 |
+
int *putype, const ASN1_ITEM *it);
|
| 650 |
+
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
|
| 651 |
+
int len, int utype, char *free_cont,
|
| 652 |
+
const ASN1_ITEM *it);
|
| 653 |
+
typedef int ASN1_primitive_print(BIO *out, const ASN1_VALUE **pval,
|
| 654 |
+
const ASN1_ITEM *it, int indent,
|
| 655 |
+
const ASN1_PCTX *pctx);
|
| 656 |
+
|
| 657 |
+
typedef struct ASN1_EXTERN_FUNCS_st {
|
| 658 |
+
void *app_data;
|
| 659 |
+
ASN1_ex_new_func *asn1_ex_new;
|
| 660 |
+
ASN1_ex_free_func *asn1_ex_free;
|
| 661 |
+
ASN1_ex_free_func *asn1_ex_clear;
|
| 662 |
+
ASN1_ex_d2i *asn1_ex_d2i;
|
| 663 |
+
ASN1_ex_i2d *asn1_ex_i2d;
|
| 664 |
+
ASN1_ex_print_func *asn1_ex_print;
|
| 665 |
+
ASN1_ex_new_ex_func *asn1_ex_new_ex;
|
| 666 |
+
ASN1_ex_d2i_ex *asn1_ex_d2i_ex;
|
| 667 |
+
} ASN1_EXTERN_FUNCS;
|
| 668 |
+
|
| 669 |
+
typedef struct ASN1_PRIMITIVE_FUNCS_st {
|
| 670 |
+
void *app_data;
|
| 671 |
+
unsigned long flags;
|
| 672 |
+
ASN1_ex_new_func *prim_new;
|
| 673 |
+
ASN1_ex_free_func *prim_free;
|
| 674 |
+
ASN1_ex_free_func *prim_clear;
|
| 675 |
+
ASN1_primitive_c2i *prim_c2i;
|
| 676 |
+
ASN1_primitive_i2c *prim_i2c;
|
| 677 |
+
ASN1_primitive_print *prim_print;
|
| 678 |
+
} ASN1_PRIMITIVE_FUNCS;
|
| 679 |
+
|
| 680 |
+
/*
|
| 681 |
+
* This is the ASN1_AUX structure: it handles various miscellaneous
|
| 682 |
+
* requirements. For example the use of reference counts and an informational
|
| 683 |
+
* callback. The "informational callback" is called at various points during
|
| 684 |
+
* the ASN1 encoding and decoding. It can be used to provide minor
|
| 685 |
+
* customisation of the structures used. This is most useful where the
|
| 686 |
+
* supplied routines *almost* do the right thing but need some extra help at
|
| 687 |
+
* a few points. If the callback returns zero then it is assumed a fatal
|
| 688 |
+
* error has occurred and the main operation should be abandoned. If major
|
| 689 |
+
* changes in the default behaviour are required then an external type is
|
| 690 |
+
* more appropriate.
|
| 691 |
+
* For the operations ASN1_OP_I2D_PRE, ASN1_OP_I2D_POST, ASN1_OP_PRINT_PRE, and
|
| 692 |
+
* ASN1_OP_PRINT_POST, meanwhile a variant of the callback with const parameter
|
| 693 |
+
* 'in' is provided to make clear statically that its input is not modified. If
|
| 694 |
+
* and only if this variant is in use the flag ASN1_AFLG_CONST_CB must be set.
|
| 695 |
+
*/
|
| 696 |
+
|
| 697 |
+
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
|
| 698 |
+
void *exarg);
|
| 699 |
+
typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
| 700 |
+
const ASN1_ITEM *it, void *exarg);
|
| 701 |
+
|
| 702 |
+
typedef struct ASN1_AUX_st {
|
| 703 |
+
void *app_data;
|
| 704 |
+
int flags;
|
| 705 |
+
int ref_offset; /* Offset of reference value */
|
| 706 |
+
int ref_lock; /* Offset of lock value */
|
| 707 |
+
ASN1_aux_cb *asn1_cb;
|
| 708 |
+
int enc_offset; /* Offset of ASN1_ENCODING structure */
|
| 709 |
+
ASN1_aux_const_cb *asn1_const_cb; /* for ASN1_OP_I2D_ and ASN1_OP_PRINT_ */
|
| 710 |
+
} ASN1_AUX;
|
| 711 |
+
|
| 712 |
+
/* For print related callbacks exarg points to this structure */
|
| 713 |
+
typedef struct ASN1_PRINT_ARG_st {
|
| 714 |
+
BIO *out;
|
| 715 |
+
int indent;
|
| 716 |
+
const ASN1_PCTX *pctx;
|
| 717 |
+
} ASN1_PRINT_ARG;
|
| 718 |
+
|
| 719 |
+
/* For streaming related callbacks exarg points to this structure */
|
| 720 |
+
typedef struct ASN1_STREAM_ARG_st {
|
| 721 |
+
/* BIO to stream through */
|
| 722 |
+
BIO *out;
|
| 723 |
+
/* BIO with filters appended */
|
| 724 |
+
BIO *ndef_bio;
|
| 725 |
+
/* Streaming I/O boundary */
|
| 726 |
+
unsigned char **boundary;
|
| 727 |
+
} ASN1_STREAM_ARG;
|
| 728 |
+
|
| 729 |
+
/* Flags in ASN1_AUX */
|
| 730 |
+
|
| 731 |
+
/* Use a reference count */
|
| 732 |
+
# define ASN1_AFLG_REFCOUNT 1
|
| 733 |
+
/* Save the encoding of structure (useful for signatures) */
|
| 734 |
+
# define ASN1_AFLG_ENCODING 2
|
| 735 |
+
/* The Sequence length is invalid */
|
| 736 |
+
# define ASN1_AFLG_BROKEN 4
|
| 737 |
+
/* Use the new asn1_const_cb */
|
| 738 |
+
# define ASN1_AFLG_CONST_CB 8
|
| 739 |
+
|
| 740 |
+
/* operation values for asn1_cb */
|
| 741 |
+
|
| 742 |
+
# define ASN1_OP_NEW_PRE 0
|
| 743 |
+
# define ASN1_OP_NEW_POST 1
|
| 744 |
+
# define ASN1_OP_FREE_PRE 2
|
| 745 |
+
# define ASN1_OP_FREE_POST 3
|
| 746 |
+
# define ASN1_OP_D2I_PRE 4
|
| 747 |
+
# define ASN1_OP_D2I_POST 5
|
| 748 |
+
# define ASN1_OP_I2D_PRE 6
|
| 749 |
+
# define ASN1_OP_I2D_POST 7
|
| 750 |
+
# define ASN1_OP_PRINT_PRE 8
|
| 751 |
+
# define ASN1_OP_PRINT_POST 9
|
| 752 |
+
# define ASN1_OP_STREAM_PRE 10
|
| 753 |
+
# define ASN1_OP_STREAM_POST 11
|
| 754 |
+
# define ASN1_OP_DETACHED_PRE 12
|
| 755 |
+
# define ASN1_OP_DETACHED_POST 13
|
| 756 |
+
# define ASN1_OP_DUP_PRE 14
|
| 757 |
+
# define ASN1_OP_DUP_POST 15
|
| 758 |
+
# define ASN1_OP_GET0_LIBCTX 16
|
| 759 |
+
# define ASN1_OP_GET0_PROPQ 17
|
| 760 |
+
|
| 761 |
+
/* Macro to implement a primitive type */
|
| 762 |
+
# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
|
| 763 |
+
# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
|
| 764 |
+
ASN1_ITEM_start(itname) \
|
| 765 |
+
ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \
|
| 766 |
+
ASN1_ITEM_end(itname)
|
| 767 |
+
|
| 768 |
+
/* Macro to implement a multi string type */
|
| 769 |
+
# define IMPLEMENT_ASN1_MSTRING(itname, mask) \
|
| 770 |
+
ASN1_ITEM_start(itname) \
|
| 771 |
+
ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \
|
| 772 |
+
ASN1_ITEM_end(itname)
|
| 773 |
+
|
| 774 |
+
# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
|
| 775 |
+
ASN1_ITEM_start(sname) \
|
| 776 |
+
ASN1_ITYPE_EXTERN, \
|
| 777 |
+
tag, \
|
| 778 |
+
NULL, \
|
| 779 |
+
0, \
|
| 780 |
+
&fptrs, \
|
| 781 |
+
0, \
|
| 782 |
+
#sname \
|
| 783 |
+
ASN1_ITEM_end(sname)
|
| 784 |
+
|
| 785 |
+
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
|
| 786 |
+
|
| 787 |
+
# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
|
| 788 |
+
|
| 789 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
|
| 790 |
+
|
| 791 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
|
| 792 |
+
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
|
| 793 |
+
|
| 794 |
+
# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 795 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
|
| 796 |
+
|
| 797 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 798 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
|
| 799 |
+
|
| 800 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
|
| 801 |
+
pre stname *fname##_new(void) \
|
| 802 |
+
{ \
|
| 803 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 804 |
+
} \
|
| 805 |
+
pre void fname##_free(stname *a) \
|
| 806 |
+
{ \
|
| 807 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
|
| 811 |
+
stname *fname##_new(void) \
|
| 812 |
+
{ \
|
| 813 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 814 |
+
} \
|
| 815 |
+
void fname##_free(stname *a) \
|
| 816 |
+
{ \
|
| 817 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
|
| 821 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 822 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
|
| 823 |
+
|
| 824 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 825 |
+
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
|
| 826 |
+
{ \
|
| 827 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
|
| 828 |
+
} \
|
| 829 |
+
int i2d_##fname(const stname *a, unsigned char **out) \
|
| 830 |
+
{ \
|
| 831 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
|
| 835 |
+
int i2d_##stname##_NDEF(const stname *a, unsigned char **out) \
|
| 836 |
+
{ \
|
| 837 |
+
return ASN1_item_ndef_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
# define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \
|
| 841 |
+
static stname *d2i_##stname(stname **a, \
|
| 842 |
+
const unsigned char **in, long len) \
|
| 843 |
+
{ \
|
| 844 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
|
| 845 |
+
ASN1_ITEM_rptr(stname)); \
|
| 846 |
+
} \
|
| 847 |
+
static int i2d_##stname(const stname *a, unsigned char **out) \
|
| 848 |
+
{ \
|
| 849 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, \
|
| 850 |
+
ASN1_ITEM_rptr(stname)); \
|
| 851 |
+
}
|
| 852 |
+
|
| 853 |
+
# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
|
| 854 |
+
stname * stname##_dup(const stname *x) \
|
| 855 |
+
{ \
|
| 856 |
+
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
|
| 860 |
+
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
|
| 861 |
+
|
| 862 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
|
| 863 |
+
int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 864 |
+
const ASN1_PCTX *pctx) \
|
| 865 |
+
{ \
|
| 866 |
+
return ASN1_item_print(out, (const ASN1_VALUE *)x, indent, \
|
| 867 |
+
ASN1_ITEM_rptr(itname), pctx); \
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
/* external definitions for primitive types */
|
| 871 |
+
|
| 872 |
+
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
|
| 873 |
+
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
|
| 874 |
+
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
|
| 875 |
+
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
|
| 876 |
+
DECLARE_ASN1_ITEM(CBIGNUM)
|
| 877 |
+
DECLARE_ASN1_ITEM(BIGNUM)
|
| 878 |
+
DECLARE_ASN1_ITEM(INT32)
|
| 879 |
+
DECLARE_ASN1_ITEM(ZINT32)
|
| 880 |
+
DECLARE_ASN1_ITEM(UINT32)
|
| 881 |
+
DECLARE_ASN1_ITEM(ZUINT32)
|
| 882 |
+
DECLARE_ASN1_ITEM(INT64)
|
| 883 |
+
DECLARE_ASN1_ITEM(ZINT64)
|
| 884 |
+
DECLARE_ASN1_ITEM(UINT64)
|
| 885 |
+
DECLARE_ASN1_ITEM(ZUINT64)
|
| 886 |
+
|
| 887 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 888 |
+
/*
|
| 889 |
+
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
| 890 |
+
* underlying C type (long) differs in size depending on the architecture.
|
| 891 |
+
* They are designed with 32-bit longs in mind.
|
| 892 |
+
*/
|
| 893 |
+
DECLARE_ASN1_ITEM(LONG)
|
| 894 |
+
DECLARE_ASN1_ITEM(ZLONG)
|
| 895 |
+
# endif
|
| 896 |
+
|
| 897 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_VALUE, ASN1_VALUE, ASN1_VALUE)
|
| 898 |
+
#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 899 |
+
#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
|
| 900 |
+
#define sk_ASN1_VALUE_new(cmp) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new(ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 901 |
+
#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
|
| 902 |
+
#define sk_ASN1_VALUE_new_reserve(cmp, n) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_VALUE_compfunc_type(cmp), (n)))
|
| 903 |
+
#define sk_ASN1_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_VALUE_sk_type(sk), (n))
|
| 904 |
+
#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 905 |
+
#define sk_ASN1_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 906 |
+
#define sk_ASN1_VALUE_delete(sk, i) ((ASN1_VALUE *)OPENSSL_sk_delete(ossl_check_ASN1_VALUE_sk_type(sk), (i)))
|
| 907 |
+
#define sk_ASN1_VALUE_delete_ptr(sk, ptr) ((ASN1_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr)))
|
| 908 |
+
#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 909 |
+
#define sk_ASN1_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 910 |
+
#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 911 |
+
#define sk_ASN1_VALUE_shift(sk) ((ASN1_VALUE *)OPENSSL_sk_shift(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 912 |
+
#define sk_ASN1_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_VALUE_sk_type(sk),ossl_check_ASN1_VALUE_freefunc_type(freefunc))
|
| 913 |
+
#define sk_ASN1_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), (idx))
|
| 914 |
+
#define sk_ASN1_VALUE_set(sk, idx, ptr) ((ASN1_VALUE *)OPENSSL_sk_set(ossl_check_ASN1_VALUE_sk_type(sk), (idx), ossl_check_ASN1_VALUE_type(ptr)))
|
| 915 |
+
#define sk_ASN1_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 916 |
+
#define sk_ASN1_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 917 |
+
#define sk_ASN1_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), pnum)
|
| 918 |
+
#define sk_ASN1_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 919 |
+
#define sk_ASN1_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 920 |
+
#define sk_ASN1_VALUE_dup(sk) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_VALUE_sk_type(sk)))
|
| 921 |
+
#define sk_ASN1_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_copyfunc_type(copyfunc), ossl_check_ASN1_VALUE_freefunc_type(freefunc)))
|
| 922 |
+
#define sk_ASN1_VALUE_set_cmp_func(sk, cmp) ((sk_ASN1_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 923 |
+
|
| 924 |
+
|
| 925 |
+
|
| 926 |
+
/* Functions used internally by the ASN1 code */
|
| 927 |
+
|
| 928 |
+
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 929 |
+
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 930 |
+
|
| 931 |
+
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 932 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 933 |
+
ASN1_TLC *ctx);
|
| 934 |
+
|
| 935 |
+
int ASN1_item_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 936 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 937 |
+
|
| 938 |
+
/* Legacy compatibility */
|
| 939 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_const(name) IMPLEMENT_ASN1_FUNCTIONS(name)
|
| 940 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
|
| 941 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
|
| 942 |
+
|
| 943 |
+
#ifdef __cplusplus
|
| 944 |
+
}
|
| 945 |
+
#endif
|
| 946 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/bio.h
ADDED
|
@@ -0,0 +1,1022 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_BIO_H
|
| 15 |
+
# define OPENSSL_BIO_H
|
| 16 |
+
# pragma once
|
| 17 |
+
|
| 18 |
+
# include <openssl/macros.h>
|
| 19 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
# define HEADER_BIO_H
|
| 21 |
+
# endif
|
| 22 |
+
|
| 23 |
+
# include <openssl/e_os2.h>
|
| 24 |
+
|
| 25 |
+
# ifndef OPENSSL_NO_STDIO
|
| 26 |
+
# include <stdio.h>
|
| 27 |
+
# endif
|
| 28 |
+
# include <stdarg.h>
|
| 29 |
+
|
| 30 |
+
# include <openssl/crypto.h>
|
| 31 |
+
# include <openssl/bioerr.h>
|
| 32 |
+
# include <openssl/core.h>
|
| 33 |
+
|
| 34 |
+
#ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
/* There are the classes of BIOs */
|
| 39 |
+
# define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 40 |
+
# define BIO_TYPE_FILTER 0x0200
|
| 41 |
+
# define BIO_TYPE_SOURCE_SINK 0x0400
|
| 42 |
+
|
| 43 |
+
/* These are the 'types' of BIOs */
|
| 44 |
+
# define BIO_TYPE_NONE 0
|
| 45 |
+
# define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
|
| 46 |
+
# define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
|
| 47 |
+
|
| 48 |
+
# define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 49 |
+
# define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 50 |
+
# define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK)
|
| 51 |
+
# define BIO_TYPE_SSL ( 7|BIO_TYPE_FILTER)
|
| 52 |
+
# define BIO_TYPE_MD ( 8|BIO_TYPE_FILTER)
|
| 53 |
+
# define BIO_TYPE_BUFFER ( 9|BIO_TYPE_FILTER)
|
| 54 |
+
# define BIO_TYPE_CIPHER (10|BIO_TYPE_FILTER)
|
| 55 |
+
# define BIO_TYPE_BASE64 (11|BIO_TYPE_FILTER)
|
| 56 |
+
# define BIO_TYPE_CONNECT (12|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 57 |
+
# define BIO_TYPE_ACCEPT (13|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 58 |
+
|
| 59 |
+
# define BIO_TYPE_NBIO_TEST (16|BIO_TYPE_FILTER)/* server proxy BIO */
|
| 60 |
+
# define BIO_TYPE_NULL_FILTER (17|BIO_TYPE_FILTER)
|
| 61 |
+
# define BIO_TYPE_BIO (19|BIO_TYPE_SOURCE_SINK)/* half a BIO pair */
|
| 62 |
+
# define BIO_TYPE_LINEBUFFER (20|BIO_TYPE_FILTER)
|
| 63 |
+
# define BIO_TYPE_DGRAM (21|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 64 |
+
# define BIO_TYPE_ASN1 (22|BIO_TYPE_FILTER)
|
| 65 |
+
# define BIO_TYPE_COMP (23|BIO_TYPE_FILTER)
|
| 66 |
+
# ifndef OPENSSL_NO_SCTP
|
| 67 |
+
# define BIO_TYPE_DGRAM_SCTP (24|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 68 |
+
# endif
|
| 69 |
+
# define BIO_TYPE_CORE_TO_PROV (25|BIO_TYPE_SOURCE_SINK)
|
| 70 |
+
# define BIO_TYPE_DGRAM_PAIR (26|BIO_TYPE_SOURCE_SINK)
|
| 71 |
+
# define BIO_TYPE_DGRAM_MEM (27|BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
|
| 73 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 74 |
+
#define BIO_TYPE_START 128
|
| 75 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_MASK 0xFF
|
| 77 |
+
|
| 78 |
+
/*
|
| 79 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 80 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 81 |
+
*/
|
| 82 |
+
# define BIO_NOCLOSE 0x00
|
| 83 |
+
# define BIO_CLOSE 0x01
|
| 84 |
+
|
| 85 |
+
/*
|
| 86 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 87 |
+
*/
|
| 88 |
+
# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */
|
| 89 |
+
# define BIO_CTRL_EOF 2/* opt - are we at the eof */
|
| 90 |
+
# define BIO_CTRL_INFO 3/* opt - extra tit-bits */
|
| 91 |
+
# define BIO_CTRL_SET 4/* man - set the 'IO' type */
|
| 92 |
+
# define BIO_CTRL_GET 5/* man - get the 'IO' type */
|
| 93 |
+
# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */
|
| 94 |
+
# define BIO_CTRL_POP 7/* opt - internal, used to signify change */
|
| 95 |
+
# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */
|
| 96 |
+
# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */
|
| 97 |
+
# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */
|
| 98 |
+
# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */
|
| 99 |
+
# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */
|
| 100 |
+
# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */
|
| 101 |
+
# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */
|
| 102 |
+
# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */
|
| 103 |
+
|
| 104 |
+
# define BIO_CTRL_PEEK 29/* BIO_f_buffer special */
|
| 105 |
+
# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */
|
| 106 |
+
|
| 107 |
+
/* dgram BIO stuff */
|
| 108 |
+
# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */
|
| 109 |
+
# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected
|
| 110 |
+
* socket to be passed in */
|
| 111 |
+
# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */
|
| 112 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */
|
| 113 |
+
# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */
|
| 114 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */
|
| 115 |
+
|
| 116 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */
|
| 117 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation timed out */
|
| 118 |
+
|
| 119 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 120 |
+
# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */
|
| 121 |
+
/* #endif */
|
| 122 |
+
|
| 123 |
+
# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */
|
| 124 |
+
# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 125 |
+
# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */
|
| 126 |
+
# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU.
|
| 127 |
+
* want to use this if asking
|
| 128 |
+
* the kernel fails */
|
| 129 |
+
|
| 130 |
+
# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was
|
| 131 |
+
* exceed in the previous write
|
| 132 |
+
* operation */
|
| 133 |
+
|
| 134 |
+
# define BIO_CTRL_DGRAM_GET_PEER 46
|
| 135 |
+
# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */
|
| 136 |
+
|
| 137 |
+
# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout
|
| 138 |
+
* to adjust socket timeouts */
|
| 139 |
+
# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 140 |
+
|
| 141 |
+
# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 142 |
+
|
| 143 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 144 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 145 |
+
# ifndef OPENSSL_NO_SCTP
|
| 146 |
+
/* SCTP stuff */
|
| 147 |
+
# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 148 |
+
# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 149 |
+
# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 150 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 151 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 152 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 153 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 154 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 155 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 156 |
+
# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 157 |
+
# endif
|
| 158 |
+
|
| 159 |
+
# define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* internal BIO:
|
| 163 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 164 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 165 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 166 |
+
*/
|
| 167 |
+
|
| 168 |
+
# define BIO_CTRL_GET_KTLS_SEND 73
|
| 169 |
+
# define BIO_CTRL_GET_KTLS_RECV 76
|
| 170 |
+
|
| 171 |
+
# define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 172 |
+
# define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 173 |
+
|
| 174 |
+
/* BIO_f_prefix controls */
|
| 175 |
+
# define BIO_CTRL_SET_PREFIX 79
|
| 176 |
+
# define BIO_CTRL_SET_INDENT 80
|
| 177 |
+
# define BIO_CTRL_GET_INDENT 81
|
| 178 |
+
|
| 179 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 180 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 181 |
+
# define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 182 |
+
# define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 183 |
+
# define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 184 |
+
# define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 185 |
+
# define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 186 |
+
# define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 187 |
+
|
| 188 |
+
/*
|
| 189 |
+
* internal BIO:
|
| 190 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 191 |
+
*/
|
| 192 |
+
|
| 193 |
+
# define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 194 |
+
# define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 195 |
+
# define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 196 |
+
# define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 197 |
+
|
| 198 |
+
# define BIO_DGRAM_CAP_NONE 0U
|
| 199 |
+
# define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 200 |
+
# define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 201 |
+
# define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 202 |
+
# define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 203 |
+
|
| 204 |
+
# ifndef OPENSSL_NO_KTLS
|
| 205 |
+
# define BIO_get_ktls_send(b) \
|
| 206 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 207 |
+
# define BIO_get_ktls_recv(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 209 |
+
# else
|
| 210 |
+
# define BIO_get_ktls_send(b) (0)
|
| 211 |
+
# define BIO_get_ktls_recv(b) (0)
|
| 212 |
+
# endif
|
| 213 |
+
|
| 214 |
+
/* modifiers */
|
| 215 |
+
# define BIO_FP_READ 0x02
|
| 216 |
+
# define BIO_FP_WRITE 0x04
|
| 217 |
+
# define BIO_FP_APPEND 0x08
|
| 218 |
+
# define BIO_FP_TEXT 0x10
|
| 219 |
+
|
| 220 |
+
# define BIO_FLAGS_READ 0x01
|
| 221 |
+
# define BIO_FLAGS_WRITE 0x02
|
| 222 |
+
# define BIO_FLAGS_IO_SPECIAL 0x04
|
| 223 |
+
# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
|
| 224 |
+
# define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 225 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 226 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 227 |
+
# define BIO_FLAGS_UPLINK 0
|
| 228 |
+
# endif
|
| 229 |
+
|
| 230 |
+
# define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 231 |
+
|
| 232 |
+
/*
|
| 233 |
+
* This is used with memory BIOs:
|
| 234 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 235 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 236 |
+
*/
|
| 237 |
+
# define BIO_FLAGS_MEM_RDONLY 0x200
|
| 238 |
+
# define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 239 |
+
# define BIO_FLAGS_IN_EOF 0x800
|
| 240 |
+
|
| 241 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 242 |
+
|
| 243 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 244 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 245 |
+
|
| 246 |
+
int BIO_get_new_index(void);
|
| 247 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 248 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 249 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 250 |
+
|
| 251 |
+
# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 252 |
+
# define BIO_set_retry_special(b) \
|
| 253 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
|
| 254 |
+
# define BIO_set_retry_read(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
# define BIO_set_retry_write(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
|
| 259 |
+
/* These are normally used internally in BIOs */
|
| 260 |
+
# define BIO_clear_retry_flags(b) \
|
| 261 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 262 |
+
# define BIO_get_retry_flags(b) \
|
| 263 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
|
| 265 |
+
/* These should be used by the application to tell why we should retry */
|
| 266 |
+
# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 267 |
+
# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 268 |
+
# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 269 |
+
# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 270 |
+
# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 274 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 275 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 276 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 277 |
+
* the code.
|
| 278 |
+
*/
|
| 279 |
+
/*
|
| 280 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 281 |
+
*/
|
| 282 |
+
# define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 283 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 284 |
+
# define BIO_RR_CONNECT 0x02
|
| 285 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 286 |
+
# define BIO_RR_ACCEPT 0x03
|
| 287 |
+
|
| 288 |
+
/* These are passed by the BIO callback */
|
| 289 |
+
# define BIO_CB_FREE 0x01
|
| 290 |
+
# define BIO_CB_READ 0x02
|
| 291 |
+
# define BIO_CB_WRITE 0x03
|
| 292 |
+
# define BIO_CB_PUTS 0x04
|
| 293 |
+
# define BIO_CB_GETS 0x05
|
| 294 |
+
# define BIO_CB_CTRL 0x06
|
| 295 |
+
# define BIO_CB_RECVMMSG 0x07
|
| 296 |
+
# define BIO_CB_SENDMMSG 0x08
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
* The callback is called before and after the underling operation, The
|
| 300 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 301 |
+
*/
|
| 302 |
+
# define BIO_CB_RETURN 0x80
|
| 303 |
+
# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)
|
| 304 |
+
# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
|
| 305 |
+
# define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
|
| 306 |
+
|
| 307 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 308 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 309 |
+
long argl, long ret);
|
| 310 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 311 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 313 |
+
const char *argp, int argi,
|
| 314 |
+
long argl, long ret);
|
| 315 |
+
# endif
|
| 316 |
+
|
| 317 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 318 |
+
size_t len, int argi,
|
| 319 |
+
long argl, int ret, size_t *processed);
|
| 320 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 321 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 322 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 323 |
+
int argi, long argl, int ret, size_t *processed);
|
| 324 |
+
|
| 325 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 326 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 327 |
+
|
| 328 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 329 |
+
|
| 330 |
+
const char *BIO_method_name(const BIO *b);
|
| 331 |
+
int BIO_method_type(const BIO *b);
|
| 332 |
+
|
| 333 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 334 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 335 |
+
|
| 336 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 337 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 338 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 339 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 340 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 341 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 342 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 343 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 344 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 345 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 346 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 347 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 348 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 349 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 350 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 351 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk),ossl_check_BIO_freefunc_type(freefunc))
|
| 352 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 353 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 354 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 355 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 356 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 357 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 358 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 359 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 360 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 361 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 366 |
+
typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
|
| 367 |
+
void *parg);
|
| 368 |
+
|
| 369 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn) (BIO *b,
|
| 370 |
+
void *context,
|
| 371 |
+
void *buf);
|
| 372 |
+
# ifndef OPENSSL_NO_SCTP
|
| 373 |
+
/* SCTP parameter structs */
|
| 374 |
+
struct bio_dgram_sctp_sndinfo {
|
| 375 |
+
uint16_t snd_sid;
|
| 376 |
+
uint16_t snd_flags;
|
| 377 |
+
uint32_t snd_ppid;
|
| 378 |
+
uint32_t snd_context;
|
| 379 |
+
};
|
| 380 |
+
|
| 381 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 382 |
+
uint16_t rcv_sid;
|
| 383 |
+
uint16_t rcv_ssn;
|
| 384 |
+
uint16_t rcv_flags;
|
| 385 |
+
uint32_t rcv_ppid;
|
| 386 |
+
uint32_t rcv_tsn;
|
| 387 |
+
uint32_t rcv_cumtsn;
|
| 388 |
+
uint32_t rcv_context;
|
| 389 |
+
};
|
| 390 |
+
|
| 391 |
+
struct bio_dgram_sctp_prinfo {
|
| 392 |
+
uint16_t pr_policy;
|
| 393 |
+
uint32_t pr_value;
|
| 394 |
+
};
|
| 395 |
+
# endif
|
| 396 |
+
|
| 397 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 398 |
+
typedef struct bio_msg_st {
|
| 399 |
+
void *data;
|
| 400 |
+
size_t data_len;
|
| 401 |
+
BIO_ADDR *peer, *local;
|
| 402 |
+
uint64_t flags;
|
| 403 |
+
} BIO_MSG;
|
| 404 |
+
|
| 405 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 406 |
+
BIO_MSG *msg;
|
| 407 |
+
size_t stride, num_msg;
|
| 408 |
+
uint64_t flags;
|
| 409 |
+
size_t *msgs_processed;
|
| 410 |
+
} BIO_MMSG_CB_ARGS;
|
| 411 |
+
|
| 412 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 413 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 414 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 416 |
+
|
| 417 |
+
typedef struct bio_poll_descriptor_st {
|
| 418 |
+
uint32_t type;
|
| 419 |
+
union {
|
| 420 |
+
int fd;
|
| 421 |
+
void *custom;
|
| 422 |
+
uintptr_t custom_ui;
|
| 423 |
+
SSL *ssl;
|
| 424 |
+
} value;
|
| 425 |
+
} BIO_POLL_DESCRIPTOR;
|
| 426 |
+
|
| 427 |
+
/*
|
| 428 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 429 |
+
*/
|
| 430 |
+
|
| 431 |
+
# define BIO_C_SET_CONNECT 100
|
| 432 |
+
# define BIO_C_DO_STATE_MACHINE 101
|
| 433 |
+
# define BIO_C_SET_NBIO 102
|
| 434 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 435 |
+
# define BIO_C_SET_FD 104
|
| 436 |
+
# define BIO_C_GET_FD 105
|
| 437 |
+
# define BIO_C_SET_FILE_PTR 106
|
| 438 |
+
# define BIO_C_GET_FILE_PTR 107
|
| 439 |
+
# define BIO_C_SET_FILENAME 108
|
| 440 |
+
# define BIO_C_SET_SSL 109
|
| 441 |
+
# define BIO_C_GET_SSL 110
|
| 442 |
+
# define BIO_C_SET_MD 111
|
| 443 |
+
# define BIO_C_GET_MD 112
|
| 444 |
+
# define BIO_C_GET_CIPHER_STATUS 113
|
| 445 |
+
# define BIO_C_SET_BUF_MEM 114
|
| 446 |
+
# define BIO_C_GET_BUF_MEM_PTR 115
|
| 447 |
+
# define BIO_C_GET_BUFF_NUM_LINES 116
|
| 448 |
+
# define BIO_C_SET_BUFF_SIZE 117
|
| 449 |
+
# define BIO_C_SET_ACCEPT 118
|
| 450 |
+
# define BIO_C_SSL_MODE 119
|
| 451 |
+
# define BIO_C_GET_MD_CTX 120
|
| 452 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 453 |
+
# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */
|
| 454 |
+
# define BIO_C_GET_CONNECT 123
|
| 455 |
+
# define BIO_C_GET_ACCEPT 124
|
| 456 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 457 |
+
# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 458 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 459 |
+
# define BIO_C_FILE_SEEK 128
|
| 460 |
+
# define BIO_C_GET_CIPHER_CTX 129
|
| 461 |
+
# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input
|
| 462 |
+
* value */
|
| 463 |
+
# define BIO_C_SET_BIND_MODE 131
|
| 464 |
+
# define BIO_C_GET_BIND_MODE 132
|
| 465 |
+
# define BIO_C_FILE_TELL 133
|
| 466 |
+
# define BIO_C_GET_SOCKS 134
|
| 467 |
+
# define BIO_C_SET_SOCKS 135
|
| 468 |
+
|
| 469 |
+
# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */
|
| 470 |
+
# define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 471 |
+
# define BIO_C_MAKE_BIO_PAIR 138
|
| 472 |
+
# define BIO_C_DESTROY_BIO_PAIR 139
|
| 473 |
+
# define BIO_C_GET_WRITE_GUARANTEE 140
|
| 474 |
+
# define BIO_C_GET_READ_REQUEST 141
|
| 475 |
+
# define BIO_C_SHUTDOWN_WR 142
|
| 476 |
+
# define BIO_C_NREAD0 143
|
| 477 |
+
# define BIO_C_NREAD 144
|
| 478 |
+
# define BIO_C_NWRITE0 145
|
| 479 |
+
# define BIO_C_NWRITE 146
|
| 480 |
+
# define BIO_C_RESET_READ_REQUEST 147
|
| 481 |
+
# define BIO_C_SET_MD_CTX 148
|
| 482 |
+
|
| 483 |
+
# define BIO_C_SET_PREFIX 149
|
| 484 |
+
# define BIO_C_GET_PREFIX 150
|
| 485 |
+
# define BIO_C_SET_SUFFIX 151
|
| 486 |
+
# define BIO_C_GET_SUFFIX 152
|
| 487 |
+
|
| 488 |
+
# define BIO_C_SET_EX_ARG 153
|
| 489 |
+
# define BIO_C_GET_EX_ARG 154
|
| 490 |
+
|
| 491 |
+
# define BIO_C_SET_CONNECT_MODE 155
|
| 492 |
+
|
| 493 |
+
# define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 494 |
+
|
| 495 |
+
# define BIO_C_SET_SOCK_TYPE 157
|
| 496 |
+
# define BIO_C_GET_SOCK_TYPE 158
|
| 497 |
+
# define BIO_C_GET_DGRAM_BIO 159
|
| 498 |
+
|
| 499 |
+
# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
|
| 500 |
+
# define BIO_get_app_data(s) BIO_get_ex_data(s,0)
|
| 501 |
+
|
| 502 |
+
# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
| 503 |
+
# define BIO_set_tfo(b,n) BIO_ctrl(b,BIO_C_SET_TFO,(n),NULL)
|
| 504 |
+
|
| 505 |
+
# ifndef OPENSSL_NO_SOCK
|
| 506 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 507 |
+
/* Note: the underlying operating system may not support some of them */
|
| 508 |
+
# define BIO_FAMILY_IPV4 4
|
| 509 |
+
# define BIO_FAMILY_IPV6 6
|
| 510 |
+
# define BIO_FAMILY_IPANY 256
|
| 511 |
+
|
| 512 |
+
/* BIO_s_connect() */
|
| 513 |
+
# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0, \
|
| 514 |
+
(char *)(name))
|
| 515 |
+
# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1, \
|
| 516 |
+
(char *)(port))
|
| 517 |
+
# define BIO_set_conn_address(b,addr) BIO_ctrl(b,BIO_C_SET_CONNECT,2, \
|
| 518 |
+
(char *)(addr))
|
| 519 |
+
# define BIO_set_conn_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,f)
|
| 520 |
+
# define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0))
|
| 521 |
+
# define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1))
|
| 522 |
+
# define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2))
|
| 523 |
+
# define BIO_get_conn_ip_family(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL)
|
| 524 |
+
# define BIO_get_conn_mode(b) BIO_ctrl(b,BIO_C_GET_CONNECT,4,NULL)
|
| 525 |
+
# define BIO_set_conn_mode(b,n) BIO_ctrl(b,BIO_C_SET_CONNECT_MODE,(n),NULL)
|
| 526 |
+
# define BIO_set_sock_type(b,t) BIO_ctrl(b,BIO_C_SET_SOCK_TYPE,(t),NULL)
|
| 527 |
+
# define BIO_get_sock_type(b) BIO_ctrl(b,BIO_C_GET_SOCK_TYPE,0,NULL)
|
| 528 |
+
# define BIO_get0_dgram_bio(b, p) BIO_ctrl(b,BIO_C_GET_DGRAM_BIO,0,(void *)(BIO **)(p))
|
| 529 |
+
|
| 530 |
+
/* BIO_s_accept() */
|
| 531 |
+
# define BIO_set_accept_name(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0, \
|
| 532 |
+
(char *)(name))
|
| 533 |
+
# define BIO_set_accept_port(b,port) BIO_ctrl(b,BIO_C_SET_ACCEPT,1, \
|
| 534 |
+
(char *)(port))
|
| 535 |
+
# define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0))
|
| 536 |
+
# define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,1))
|
| 537 |
+
# define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,2))
|
| 538 |
+
# define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,3))
|
| 539 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 540 |
+
# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(n)?(void *)"a":NULL)
|
| 541 |
+
# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,3, \
|
| 542 |
+
(char *)(bio))
|
| 543 |
+
# define BIO_set_accept_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_ACCEPT,4,f)
|
| 544 |
+
# define BIO_get_accept_ip_family(b) BIO_ctrl(b,BIO_C_GET_ACCEPT,4,NULL)
|
| 545 |
+
# define BIO_set_tfo_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,5,(n)?(void *)"a":NULL)
|
| 546 |
+
|
| 547 |
+
/* Aliases kept for backward compatibility */
|
| 548 |
+
# define BIO_BIND_NORMAL 0
|
| 549 |
+
# define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 550 |
+
# define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 551 |
+
# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
|
| 552 |
+
# define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
|
| 553 |
+
# endif /* OPENSSL_NO_SOCK */
|
| 554 |
+
|
| 555 |
+
# define BIO_do_connect(b) BIO_do_handshake(b)
|
| 556 |
+
# define BIO_do_accept(b) BIO_do_handshake(b)
|
| 557 |
+
|
| 558 |
+
# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
|
| 559 |
+
|
| 560 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 561 |
+
# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
|
| 562 |
+
# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)(c))
|
| 563 |
+
|
| 564 |
+
/* BIO_s_file() */
|
| 565 |
+
# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp))
|
| 566 |
+
# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)(fpp))
|
| 567 |
+
|
| 568 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 569 |
+
# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)
|
| 570 |
+
# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)
|
| 571 |
+
|
| 572 |
+
/*
|
| 573 |
+
* name is cast to lose const, but might be better to route through a
|
| 574 |
+
* function so we can do it safely
|
| 575 |
+
*/
|
| 576 |
+
# ifdef CONST_STRICT
|
| 577 |
+
/*
|
| 578 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 579 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 580 |
+
*/
|
| 581 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 582 |
+
# else
|
| 583 |
+
# define BIO_read_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 584 |
+
BIO_CLOSE|BIO_FP_READ,(char *)(name))
|
| 585 |
+
# endif
|
| 586 |
+
# define BIO_write_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE|BIO_FP_WRITE,name)
|
| 588 |
+
# define BIO_append_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 589 |
+
BIO_CLOSE|BIO_FP_APPEND,name)
|
| 590 |
+
# define BIO_rw_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 591 |
+
BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)
|
| 592 |
+
|
| 593 |
+
/*
|
| 594 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 595 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 596 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 597 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 598 |
+
*/
|
| 599 |
+
# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)(ssl))
|
| 600 |
+
# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)(sslp))
|
| 601 |
+
# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
|
| 602 |
+
# define BIO_set_ssl_renegotiate_bytes(b,num) \
|
| 603 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL)
|
| 604 |
+
# define BIO_get_num_renegotiates(b) \
|
| 605 |
+
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL)
|
| 606 |
+
# define BIO_set_ssl_renegotiate_timeout(b,seconds) \
|
| 607 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL)
|
| 608 |
+
|
| 609 |
+
/* defined in evp.h */
|
| 610 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 611 |
+
|
| 612 |
+
# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)(pp))
|
| 613 |
+
# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)(bm))
|
| 614 |
+
# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0, \
|
| 615 |
+
(char *)(pp))
|
| 616 |
+
# define BIO_set_mem_eof_return(b,v) \
|
| 617 |
+
BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)
|
| 618 |
+
|
| 619 |
+
/* For the BIO_f_buffer() type */
|
| 620 |
+
# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)
|
| 621 |
+
# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)
|
| 622 |
+
# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)
|
| 623 |
+
# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)
|
| 624 |
+
# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)
|
| 625 |
+
|
| 626 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 627 |
+
# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))
|
| 628 |
+
|
| 629 |
+
# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
|
| 630 |
+
# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)
|
| 631 |
+
# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
|
| 632 |
+
# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)
|
| 633 |
+
# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
|
| 634 |
+
# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)
|
| 635 |
+
/* ...pending macros have inappropriate return type */
|
| 636 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 637 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 638 |
+
# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
|
| 639 |
+
# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
|
| 640 |
+
cbp)
|
| 641 |
+
# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
|
| 642 |
+
|
| 643 |
+
/* For the BIO_f_buffer() type */
|
| 644 |
+
# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
|
| 645 |
+
# define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s))
|
| 646 |
+
|
| 647 |
+
/* For BIO_s_bio() */
|
| 648 |
+
# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
|
| 649 |
+
# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
|
| 650 |
+
# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
|
| 651 |
+
# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
|
| 652 |
+
# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 653 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 654 |
+
# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
|
| 655 |
+
# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
|
| 656 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 657 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 658 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 659 |
+
|
| 660 |
+
/* ctrl macros for dgram */
|
| 661 |
+
# define BIO_ctrl_dgram_connect(b,peer) \
|
| 662 |
+
(int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)(peer))
|
| 663 |
+
# define BIO_ctrl_set_connected(b,peer) \
|
| 664 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 665 |
+
# define BIO_dgram_recv_timedout(b) \
|
| 666 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 667 |
+
# define BIO_dgram_send_timedout(b) \
|
| 668 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 669 |
+
# define BIO_dgram_get_peer(b,peer) \
|
| 670 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 671 |
+
# define BIO_dgram_set_peer(b,peer) \
|
| 672 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 673 |
+
# define BIO_dgram_detect_peer_addr(b,peer) \
|
| 674 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 675 |
+
# define BIO_dgram_get_mtu_overhead(b) \
|
| 676 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 677 |
+
# define BIO_dgram_get_local_addr_cap(b) \
|
| 678 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 679 |
+
# define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 680 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 681 |
+
# define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 682 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 683 |
+
# define BIO_dgram_get_effective_caps(b) \
|
| 684 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 685 |
+
# define BIO_dgram_get_caps(b) \
|
| 686 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 687 |
+
# define BIO_dgram_set_caps(b, caps) \
|
| 688 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 689 |
+
# define BIO_dgram_get_no_trunc(b) \
|
| 690 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 691 |
+
# define BIO_dgram_set_no_trunc(b, enable) \
|
| 692 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 693 |
+
# define BIO_dgram_get_mtu(b) \
|
| 694 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 695 |
+
# define BIO_dgram_set_mtu(b, mtu) \
|
| 696 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 697 |
+
# define BIO_dgram_set0_local_addr(b, addr) \
|
| 698 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 699 |
+
|
| 700 |
+
/* ctrl macros for BIO_f_prefix */
|
| 701 |
+
# define BIO_set_prefix(b,p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 702 |
+
# define BIO_set_indent(b,i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 703 |
+
# define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 704 |
+
|
| 705 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 706 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 707 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 708 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 709 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 710 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 711 |
+
|
| 712 |
+
/* For BIO_f_asn1() */
|
| 713 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 714 |
+
asn1_ps_func *prefix_free);
|
| 715 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 716 |
+
asn1_ps_func **pprefix_free);
|
| 717 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 718 |
+
asn1_ps_func *suffix_free);
|
| 719 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 720 |
+
asn1_ps_func **psuffix_free);
|
| 721 |
+
|
| 722 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 723 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 724 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 725 |
+
# ifndef OPENSSL_NO_STDIO
|
| 726 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 727 |
+
# endif
|
| 728 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 729 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 730 |
+
int BIO_free(BIO *a);
|
| 731 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 732 |
+
void *BIO_get_data(BIO *a);
|
| 733 |
+
void BIO_set_init(BIO *a, int init);
|
| 734 |
+
int BIO_get_init(BIO *a);
|
| 735 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 736 |
+
int BIO_get_shutdown(BIO *a);
|
| 737 |
+
void BIO_vfree(BIO *a);
|
| 738 |
+
int BIO_up_ref(BIO *a);
|
| 739 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 740 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 741 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 742 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 743 |
+
size_t *msgs_processed);
|
| 744 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 745 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 746 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 747 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 748 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 749 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 750 |
+
size_t *msgs_processed);
|
| 751 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 752 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 753 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 754 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 755 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 756 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 757 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 758 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 759 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 760 |
+
BIO *BIO_pop(BIO *b);
|
| 761 |
+
void BIO_free_all(BIO *a);
|
| 762 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 763 |
+
BIO *BIO_next(BIO *b);
|
| 764 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 765 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 766 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 767 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 768 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 769 |
+
|
| 770 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 771 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 772 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 773 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 774 |
+
|
| 775 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 776 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 777 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 778 |
+
# endif
|
| 779 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 780 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 781 |
+
# ifndef OPENSSL_NO_SOCK
|
| 782 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 783 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 784 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 785 |
+
# endif
|
| 786 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 788 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 789 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 790 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 791 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 792 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 796 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 797 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 798 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 800 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 801 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 802 |
+
# ifndef OPENSSL_NO_SCTP
|
| 803 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 804 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 805 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 806 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 807 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 808 |
+
void *context);
|
| 809 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 810 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 811 |
+
# endif
|
| 812 |
+
# endif
|
| 813 |
+
|
| 814 |
+
# ifndef OPENSSL_NO_SOCK
|
| 815 |
+
int BIO_sock_should_retry(int i);
|
| 816 |
+
int BIO_sock_non_fatal_error(int error);
|
| 817 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 818 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 819 |
+
# endif
|
| 820 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 821 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 822 |
+
|
| 823 |
+
int BIO_fd_should_retry(int i);
|
| 824 |
+
int BIO_fd_non_fatal_error(int error);
|
| 825 |
+
int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 826 |
+
void *u, const void *s, int len);
|
| 827 |
+
int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 828 |
+
void *u, const void *s, int len, int indent);
|
| 829 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 830 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 831 |
+
# ifndef OPENSSL_NO_STDIO
|
| 832 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 833 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 834 |
+
# endif
|
| 835 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 836 |
+
int datalen);
|
| 837 |
+
|
| 838 |
+
# ifndef OPENSSL_NO_SOCK
|
| 839 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 840 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 841 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 842 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 843 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 844 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 845 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 846 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 847 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 848 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 849 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 850 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 851 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 852 |
+
|
| 853 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 854 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 855 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 856 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 857 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 858 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 859 |
+
|
| 860 |
+
enum BIO_hostserv_priorities {
|
| 861 |
+
BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
|
| 862 |
+
};
|
| 863 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 864 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 865 |
+
enum BIO_lookup_type {
|
| 866 |
+
BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER
|
| 867 |
+
};
|
| 868 |
+
int BIO_lookup(const char *host, const char *service,
|
| 869 |
+
enum BIO_lookup_type lookup_type,
|
| 870 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 871 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 872 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 873 |
+
BIO_ADDRINFO **res);
|
| 874 |
+
int BIO_sock_error(int sock);
|
| 875 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 876 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 877 |
+
int BIO_sock_init(void);
|
| 878 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 879 |
+
# define BIO_sock_cleanup() while(0) continue
|
| 880 |
+
# endif
|
| 881 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 882 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 883 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 884 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 885 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 886 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 887 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 888 |
+
# endif
|
| 889 |
+
|
| 890 |
+
union BIO_sock_info_u {
|
| 891 |
+
BIO_ADDR *addr;
|
| 892 |
+
};
|
| 893 |
+
enum BIO_sock_info_type {
|
| 894 |
+
BIO_SOCK_INFO_ADDRESS
|
| 895 |
+
};
|
| 896 |
+
int BIO_sock_info(int sock,
|
| 897 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 898 |
+
|
| 899 |
+
# define BIO_SOCK_REUSEADDR 0x01
|
| 900 |
+
# define BIO_SOCK_V6_ONLY 0x02
|
| 901 |
+
# define BIO_SOCK_KEEPALIVE 0x04
|
| 902 |
+
# define BIO_SOCK_NONBLOCK 0x08
|
| 903 |
+
# define BIO_SOCK_NODELAY 0x10
|
| 904 |
+
# define BIO_SOCK_TFO 0x20
|
| 905 |
+
|
| 906 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 907 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 908 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 909 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 910 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 911 |
+
int BIO_closesocket(int sock);
|
| 912 |
+
|
| 913 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 914 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 915 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 916 |
+
# endif /* OPENSSL_NO_SOCK*/
|
| 917 |
+
|
| 918 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 919 |
+
|
| 920 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 921 |
+
BIO **bio2, size_t writebuf2);
|
| 922 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 923 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 924 |
+
BIO **bio2, size_t writebuf2);
|
| 925 |
+
# endif
|
| 926 |
+
|
| 927 |
+
/*
|
| 928 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 929 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 930 |
+
* value.
|
| 931 |
+
*/
|
| 932 |
+
|
| 933 |
+
void BIO_copy_next_retry(BIO *b);
|
| 934 |
+
|
| 935 |
+
/*
|
| 936 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 937 |
+
*/
|
| 938 |
+
|
| 939 |
+
# define ossl_bio__attr__(x)
|
| 940 |
+
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 941 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 942 |
+
&& !defined(__APPLE__)
|
| 943 |
+
/*
|
| 944 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 945 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 946 |
+
*/
|
| 947 |
+
# if __STDC_VERSION__ >= 199901L
|
| 948 |
+
# undef ossl_bio__attr__
|
| 949 |
+
# define ossl_bio__attr__ __attribute__
|
| 950 |
+
# if __GNUC__*10 + __GNUC_MINOR__ >= 44
|
| 951 |
+
# define ossl_bio__printf__ __gnu_printf__
|
| 952 |
+
# else
|
| 953 |
+
# define ossl_bio__printf__ __printf__
|
| 954 |
+
# endif
|
| 955 |
+
# endif
|
| 956 |
+
# endif
|
| 957 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 958 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 959 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 960 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 961 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 962 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 963 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 964 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 965 |
+
# undef ossl_bio__attr__
|
| 966 |
+
# undef ossl_bio__printf__
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 970 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 971 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 972 |
+
int (*write) (BIO *, const char *, int));
|
| 973 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 974 |
+
int (*bwrite) (BIO *, const char *, size_t, size_t *));
|
| 975 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 976 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 977 |
+
uint64_t, size_t *));
|
| 978 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 979 |
+
int (*read) (BIO *, char *, int));
|
| 980 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 981 |
+
int (*bread) (BIO *, char *, size_t, size_t *));
|
| 982 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 983 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 984 |
+
uint64_t, size_t *));
|
| 985 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 986 |
+
int (*puts) (BIO *, const char *));
|
| 987 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 988 |
+
int (*ossl_gets) (BIO *, char *, int));
|
| 989 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 990 |
+
long (*ctrl) (BIO *, int, long, void *));
|
| 991 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
|
| 992 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
|
| 993 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 994 |
+
long (*callback_ctrl) (BIO *, int,
|
| 995 |
+
BIO_info_cb *));
|
| 996 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 997 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 998 |
+
int);
|
| 999 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 1000 |
+
size_t, size_t *);
|
| 1001 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1002 |
+
size_t, size_t,
|
| 1003 |
+
uint64_t, size_t *);
|
| 1004 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1012 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1013 |
+
long, void *);
|
| 1014 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
|
| 1015 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1017 |
+
BIO_info_cb *);
|
| 1018 |
+
# endif
|
| 1019 |
+
# ifdef __cplusplus
|
| 1020 |
+
}
|
| 1021 |
+
# endif
|
| 1022 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_COMP_H
|
| 13 |
+
# define OPENSSL_COMP_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# include <openssl/macros.h>
|
| 17 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
# define HEADER_COMP_H
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
# include <openssl/opensslconf.h>
|
| 22 |
+
|
| 23 |
+
# include <openssl/crypto.h>
|
| 24 |
+
# include <openssl/comperr.h>
|
| 25 |
+
# ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
# endif
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX* comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
# define COMP_zlib_cleanup() while(0) continue
|
| 54 |
+
# endif
|
| 55 |
+
|
| 56 |
+
# ifdef OPENSSL_BIO_H
|
| 57 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 58 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 59 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 60 |
+
# endif
|
| 61 |
+
|
| 62 |
+
# endif
|
| 63 |
+
|
| 64 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 65 |
+
|
| 66 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 67 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 68 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 69 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 70 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 71 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 72 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 73 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 74 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 75 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 76 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 77 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 78 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 79 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 80 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 81 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 82 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 83 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 84 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 85 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 86 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 87 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 88 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 89 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 90 |
+
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
| 91 |
+
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
# ifdef __cplusplus
|
| 96 |
+
}
|
| 97 |
+
# endif
|
| 98 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ocsp.h
ADDED
|
@@ -0,0 +1,483 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ocsp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_OCSP_H
|
| 16 |
+
# define OPENSSL_OCSP_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_OCSP_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
# include <openssl/http.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
/*
|
| 29 |
+
* These definitions are outside the OPENSSL_NO_OCSP guard because although for
|
| 30 |
+
* historical reasons they have OCSP_* names, they can actually be used
|
| 31 |
+
* independently of OCSP. E.g. see RFC5280
|
| 32 |
+
*/
|
| 33 |
+
/*-
|
| 34 |
+
* CRLReason ::= ENUMERATED {
|
| 35 |
+
* unspecified (0),
|
| 36 |
+
* keyCompromise (1),
|
| 37 |
+
* cACompromise (2),
|
| 38 |
+
* affiliationChanged (3),
|
| 39 |
+
* superseded (4),
|
| 40 |
+
* cessationOfOperation (5),
|
| 41 |
+
* certificateHold (6),
|
| 42 |
+
* -- value 7 is not used
|
| 43 |
+
* removeFromCRL (8),
|
| 44 |
+
* privilegeWithdrawn (9),
|
| 45 |
+
* aACompromise (10) }
|
| 46 |
+
*/
|
| 47 |
+
# define OCSP_REVOKED_STATUS_NOSTATUS -1
|
| 48 |
+
# define OCSP_REVOKED_STATUS_UNSPECIFIED 0
|
| 49 |
+
# define OCSP_REVOKED_STATUS_KEYCOMPROMISE 1
|
| 50 |
+
# define OCSP_REVOKED_STATUS_CACOMPROMISE 2
|
| 51 |
+
# define OCSP_REVOKED_STATUS_AFFILIATIONCHANGED 3
|
| 52 |
+
# define OCSP_REVOKED_STATUS_SUPERSEDED 4
|
| 53 |
+
# define OCSP_REVOKED_STATUS_CESSATIONOFOPERATION 5
|
| 54 |
+
# define OCSP_REVOKED_STATUS_CERTIFICATEHOLD 6
|
| 55 |
+
# define OCSP_REVOKED_STATUS_REMOVEFROMCRL 8
|
| 56 |
+
# define OCSP_REVOKED_STATUS_PRIVILEGEWITHDRAWN 9
|
| 57 |
+
# define OCSP_REVOKED_STATUS_AACOMPROMISE 10
|
| 58 |
+
|
| 59 |
+
|
| 60 |
+
# ifndef OPENSSL_NO_OCSP
|
| 61 |
+
|
| 62 |
+
# include <openssl/x509.h>
|
| 63 |
+
# include <openssl/x509v3.h>
|
| 64 |
+
# include <openssl/safestack.h>
|
| 65 |
+
# include <openssl/ocsperr.h>
|
| 66 |
+
|
| 67 |
+
# ifdef __cplusplus
|
| 68 |
+
extern "C" {
|
| 69 |
+
# endif
|
| 70 |
+
|
| 71 |
+
/* Various flags and values */
|
| 72 |
+
|
| 73 |
+
# define OCSP_DEFAULT_NONCE_LENGTH 16
|
| 74 |
+
|
| 75 |
+
# define OCSP_NOCERTS 0x1
|
| 76 |
+
# define OCSP_NOINTERN 0x2
|
| 77 |
+
# define OCSP_NOSIGS 0x4
|
| 78 |
+
# define OCSP_NOCHAIN 0x8
|
| 79 |
+
# define OCSP_NOVERIFY 0x10
|
| 80 |
+
# define OCSP_NOEXPLICIT 0x20
|
| 81 |
+
# define OCSP_NOCASIGN 0x40
|
| 82 |
+
# define OCSP_NODELEGATED 0x80
|
| 83 |
+
# define OCSP_NOCHECKS 0x100
|
| 84 |
+
# define OCSP_TRUSTOTHER 0x200
|
| 85 |
+
# define OCSP_RESPID_KEY 0x400
|
| 86 |
+
# define OCSP_NOTIME 0x800
|
| 87 |
+
# define OCSP_PARTIAL_CHAIN 0x1000
|
| 88 |
+
|
| 89 |
+
typedef struct ocsp_cert_id_st OCSP_CERTID;
|
| 90 |
+
typedef struct ocsp_one_request_st OCSP_ONEREQ;
|
| 91 |
+
typedef struct ocsp_req_info_st OCSP_REQINFO;
|
| 92 |
+
typedef struct ocsp_signature_st OCSP_SIGNATURE;
|
| 93 |
+
typedef struct ocsp_request_st OCSP_REQUEST;
|
| 94 |
+
|
| 95 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_CERTID, OCSP_CERTID, OCSP_CERTID)
|
| 96 |
+
#define sk_OCSP_CERTID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 97 |
+
#define sk_OCSP_CERTID_value(sk, idx) ((OCSP_CERTID *)OPENSSL_sk_value(ossl_check_const_OCSP_CERTID_sk_type(sk), (idx)))
|
| 98 |
+
#define sk_OCSP_CERTID_new(cmp) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new(ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 99 |
+
#define sk_OCSP_CERTID_new_null() ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_null())
|
| 100 |
+
#define sk_OCSP_CERTID_new_reserve(cmp, n) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_CERTID_compfunc_type(cmp), (n)))
|
| 101 |
+
#define sk_OCSP_CERTID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_CERTID_sk_type(sk), (n))
|
| 102 |
+
#define sk_OCSP_CERTID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 103 |
+
#define sk_OCSP_CERTID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 104 |
+
#define sk_OCSP_CERTID_delete(sk, i) ((OCSP_CERTID *)OPENSSL_sk_delete(ossl_check_OCSP_CERTID_sk_type(sk), (i)))
|
| 105 |
+
#define sk_OCSP_CERTID_delete_ptr(sk, ptr) ((OCSP_CERTID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr)))
|
| 106 |
+
#define sk_OCSP_CERTID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 107 |
+
#define sk_OCSP_CERTID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 108 |
+
#define sk_OCSP_CERTID_pop(sk) ((OCSP_CERTID *)OPENSSL_sk_pop(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 109 |
+
#define sk_OCSP_CERTID_shift(sk) ((OCSP_CERTID *)OPENSSL_sk_shift(ossl_check_OCSP_CERTID_sk_type(sk)))
|
| 110 |
+
#define sk_OCSP_CERTID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_CERTID_sk_type(sk),ossl_check_OCSP_CERTID_freefunc_type(freefunc))
|
| 111 |
+
#define sk_OCSP_CERTID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), (idx))
|
| 112 |
+
#define sk_OCSP_CERTID_set(sk, idx, ptr) ((OCSP_CERTID *)OPENSSL_sk_set(ossl_check_OCSP_CERTID_sk_type(sk), (idx), ossl_check_OCSP_CERTID_type(ptr)))
|
| 113 |
+
#define sk_OCSP_CERTID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 114 |
+
#define sk_OCSP_CERTID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr))
|
| 115 |
+
#define sk_OCSP_CERTID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_type(ptr), pnum)
|
| 116 |
+
#define sk_OCSP_CERTID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_CERTID_sk_type(sk))
|
| 117 |
+
#define sk_OCSP_CERTID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_CERTID_sk_type(sk))
|
| 118 |
+
#define sk_OCSP_CERTID_dup(sk) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_CERTID_sk_type(sk)))
|
| 119 |
+
#define sk_OCSP_CERTID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_CERTID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_copyfunc_type(copyfunc), ossl_check_OCSP_CERTID_freefunc_type(freefunc)))
|
| 120 |
+
#define sk_OCSP_CERTID_set_cmp_func(sk, cmp) ((sk_OCSP_CERTID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_CERTID_sk_type(sk), ossl_check_OCSP_CERTID_compfunc_type(cmp)))
|
| 121 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_ONEREQ, OCSP_ONEREQ, OCSP_ONEREQ)
|
| 122 |
+
#define sk_OCSP_ONEREQ_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 123 |
+
#define sk_OCSP_ONEREQ_value(sk, idx) ((OCSP_ONEREQ *)OPENSSL_sk_value(ossl_check_const_OCSP_ONEREQ_sk_type(sk), (idx)))
|
| 124 |
+
#define sk_OCSP_ONEREQ_new(cmp) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new(ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 125 |
+
#define sk_OCSP_ONEREQ_new_null() ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_null())
|
| 126 |
+
#define sk_OCSP_ONEREQ_new_reserve(cmp, n) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_ONEREQ_compfunc_type(cmp), (n)))
|
| 127 |
+
#define sk_OCSP_ONEREQ_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_ONEREQ_sk_type(sk), (n))
|
| 128 |
+
#define sk_OCSP_ONEREQ_free(sk) OPENSSL_sk_free(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 129 |
+
#define sk_OCSP_ONEREQ_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 130 |
+
#define sk_OCSP_ONEREQ_delete(sk, i) ((OCSP_ONEREQ *)OPENSSL_sk_delete(ossl_check_OCSP_ONEREQ_sk_type(sk), (i)))
|
| 131 |
+
#define sk_OCSP_ONEREQ_delete_ptr(sk, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 132 |
+
#define sk_OCSP_ONEREQ_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 133 |
+
#define sk_OCSP_ONEREQ_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 134 |
+
#define sk_OCSP_ONEREQ_pop(sk) ((OCSP_ONEREQ *)OPENSSL_sk_pop(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 135 |
+
#define sk_OCSP_ONEREQ_shift(sk) ((OCSP_ONEREQ *)OPENSSL_sk_shift(ossl_check_OCSP_ONEREQ_sk_type(sk)))
|
| 136 |
+
#define sk_OCSP_ONEREQ_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_ONEREQ_sk_type(sk),ossl_check_OCSP_ONEREQ_freefunc_type(freefunc))
|
| 137 |
+
#define sk_OCSP_ONEREQ_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), (idx))
|
| 138 |
+
#define sk_OCSP_ONEREQ_set(sk, idx, ptr) ((OCSP_ONEREQ *)OPENSSL_sk_set(ossl_check_OCSP_ONEREQ_sk_type(sk), (idx), ossl_check_OCSP_ONEREQ_type(ptr)))
|
| 139 |
+
#define sk_OCSP_ONEREQ_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 140 |
+
#define sk_OCSP_ONEREQ_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr))
|
| 141 |
+
#define sk_OCSP_ONEREQ_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_type(ptr), pnum)
|
| 142 |
+
#define sk_OCSP_ONEREQ_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_ONEREQ_sk_type(sk))
|
| 143 |
+
#define sk_OCSP_ONEREQ_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_ONEREQ_sk_type(sk))
|
| 144 |
+
#define sk_OCSP_ONEREQ_dup(sk) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_dup(ossl_check_const_OCSP_ONEREQ_sk_type(sk)))
|
| 145 |
+
#define sk_OCSP_ONEREQ_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_ONEREQ) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_copyfunc_type(copyfunc), ossl_check_OCSP_ONEREQ_freefunc_type(freefunc)))
|
| 146 |
+
#define sk_OCSP_ONEREQ_set_cmp_func(sk, cmp) ((sk_OCSP_ONEREQ_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_ONEREQ_sk_type(sk), ossl_check_OCSP_ONEREQ_compfunc_type(cmp)))
|
| 147 |
+
|
| 148 |
+
|
| 149 |
+
# define OCSP_RESPONSE_STATUS_SUCCESSFUL 0
|
| 150 |
+
# define OCSP_RESPONSE_STATUS_MALFORMEDREQUEST 1
|
| 151 |
+
# define OCSP_RESPONSE_STATUS_INTERNALERROR 2
|
| 152 |
+
# define OCSP_RESPONSE_STATUS_TRYLATER 3
|
| 153 |
+
# define OCSP_RESPONSE_STATUS_SIGREQUIRED 5
|
| 154 |
+
# define OCSP_RESPONSE_STATUS_UNAUTHORIZED 6
|
| 155 |
+
|
| 156 |
+
typedef struct ocsp_resp_bytes_st OCSP_RESPBYTES;
|
| 157 |
+
|
| 158 |
+
# define V_OCSP_RESPID_NAME 0
|
| 159 |
+
# define V_OCSP_RESPID_KEY 1
|
| 160 |
+
|
| 161 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_RESPID, OCSP_RESPID, OCSP_RESPID)
|
| 162 |
+
#define sk_OCSP_RESPID_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 163 |
+
#define sk_OCSP_RESPID_value(sk, idx) ((OCSP_RESPID *)OPENSSL_sk_value(ossl_check_const_OCSP_RESPID_sk_type(sk), (idx)))
|
| 164 |
+
#define sk_OCSP_RESPID_new(cmp) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new(ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 165 |
+
#define sk_OCSP_RESPID_new_null() ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_null())
|
| 166 |
+
#define sk_OCSP_RESPID_new_reserve(cmp, n) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_RESPID_compfunc_type(cmp), (n)))
|
| 167 |
+
#define sk_OCSP_RESPID_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_RESPID_sk_type(sk), (n))
|
| 168 |
+
#define sk_OCSP_RESPID_free(sk) OPENSSL_sk_free(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 169 |
+
#define sk_OCSP_RESPID_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 170 |
+
#define sk_OCSP_RESPID_delete(sk, i) ((OCSP_RESPID *)OPENSSL_sk_delete(ossl_check_OCSP_RESPID_sk_type(sk), (i)))
|
| 171 |
+
#define sk_OCSP_RESPID_delete_ptr(sk, ptr) ((OCSP_RESPID *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr)))
|
| 172 |
+
#define sk_OCSP_RESPID_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 173 |
+
#define sk_OCSP_RESPID_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 174 |
+
#define sk_OCSP_RESPID_pop(sk) ((OCSP_RESPID *)OPENSSL_sk_pop(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 175 |
+
#define sk_OCSP_RESPID_shift(sk) ((OCSP_RESPID *)OPENSSL_sk_shift(ossl_check_OCSP_RESPID_sk_type(sk)))
|
| 176 |
+
#define sk_OCSP_RESPID_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_RESPID_sk_type(sk),ossl_check_OCSP_RESPID_freefunc_type(freefunc))
|
| 177 |
+
#define sk_OCSP_RESPID_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), (idx))
|
| 178 |
+
#define sk_OCSP_RESPID_set(sk, idx, ptr) ((OCSP_RESPID *)OPENSSL_sk_set(ossl_check_OCSP_RESPID_sk_type(sk), (idx), ossl_check_OCSP_RESPID_type(ptr)))
|
| 179 |
+
#define sk_OCSP_RESPID_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 180 |
+
#define sk_OCSP_RESPID_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr))
|
| 181 |
+
#define sk_OCSP_RESPID_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_type(ptr), pnum)
|
| 182 |
+
#define sk_OCSP_RESPID_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_RESPID_sk_type(sk))
|
| 183 |
+
#define sk_OCSP_RESPID_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_RESPID_sk_type(sk))
|
| 184 |
+
#define sk_OCSP_RESPID_dup(sk) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_dup(ossl_check_const_OCSP_RESPID_sk_type(sk)))
|
| 185 |
+
#define sk_OCSP_RESPID_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_RESPID) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_copyfunc_type(copyfunc), ossl_check_OCSP_RESPID_freefunc_type(freefunc)))
|
| 186 |
+
#define sk_OCSP_RESPID_set_cmp_func(sk, cmp) ((sk_OCSP_RESPID_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_RESPID_sk_type(sk), ossl_check_OCSP_RESPID_compfunc_type(cmp)))
|
| 187 |
+
|
| 188 |
+
|
| 189 |
+
typedef struct ocsp_revoked_info_st OCSP_REVOKEDINFO;
|
| 190 |
+
|
| 191 |
+
# define V_OCSP_CERTSTATUS_GOOD 0
|
| 192 |
+
# define V_OCSP_CERTSTATUS_REVOKED 1
|
| 193 |
+
# define V_OCSP_CERTSTATUS_UNKNOWN 2
|
| 194 |
+
|
| 195 |
+
typedef struct ocsp_cert_status_st OCSP_CERTSTATUS;
|
| 196 |
+
typedef struct ocsp_single_response_st OCSP_SINGLERESP;
|
| 197 |
+
|
| 198 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OCSP_SINGLERESP, OCSP_SINGLERESP, OCSP_SINGLERESP)
|
| 199 |
+
#define sk_OCSP_SINGLERESP_num(sk) OPENSSL_sk_num(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 200 |
+
#define sk_OCSP_SINGLERESP_value(sk, idx) ((OCSP_SINGLERESP *)OPENSSL_sk_value(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), (idx)))
|
| 201 |
+
#define sk_OCSP_SINGLERESP_new(cmp) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 202 |
+
#define sk_OCSP_SINGLERESP_new_null() ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_null())
|
| 203 |
+
#define sk_OCSP_SINGLERESP_new_reserve(cmp, n) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_new_reserve(ossl_check_OCSP_SINGLERESP_compfunc_type(cmp), (n)))
|
| 204 |
+
#define sk_OCSP_SINGLERESP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OCSP_SINGLERESP_sk_type(sk), (n))
|
| 205 |
+
#define sk_OCSP_SINGLERESP_free(sk) OPENSSL_sk_free(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 206 |
+
#define sk_OCSP_SINGLERESP_zero(sk) OPENSSL_sk_zero(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 207 |
+
#define sk_OCSP_SINGLERESP_delete(sk, i) ((OCSP_SINGLERESP *)OPENSSL_sk_delete(ossl_check_OCSP_SINGLERESP_sk_type(sk), (i)))
|
| 208 |
+
#define sk_OCSP_SINGLERESP_delete_ptr(sk, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_delete_ptr(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 209 |
+
#define sk_OCSP_SINGLERESP_push(sk, ptr) OPENSSL_sk_push(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 210 |
+
#define sk_OCSP_SINGLERESP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 211 |
+
#define sk_OCSP_SINGLERESP_pop(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_pop(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 212 |
+
#define sk_OCSP_SINGLERESP_shift(sk) ((OCSP_SINGLERESP *)OPENSSL_sk_shift(ossl_check_OCSP_SINGLERESP_sk_type(sk)))
|
| 213 |
+
#define sk_OCSP_SINGLERESP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OCSP_SINGLERESP_sk_type(sk),ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc))
|
| 214 |
+
#define sk_OCSP_SINGLERESP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), (idx))
|
| 215 |
+
#define sk_OCSP_SINGLERESP_set(sk, idx, ptr) ((OCSP_SINGLERESP *)OPENSSL_sk_set(ossl_check_OCSP_SINGLERESP_sk_type(sk), (idx), ossl_check_OCSP_SINGLERESP_type(ptr)))
|
| 216 |
+
#define sk_OCSP_SINGLERESP_find(sk, ptr) OPENSSL_sk_find(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 217 |
+
#define sk_OCSP_SINGLERESP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr))
|
| 218 |
+
#define sk_OCSP_SINGLERESP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_type(ptr), pnum)
|
| 219 |
+
#define sk_OCSP_SINGLERESP_sort(sk) OPENSSL_sk_sort(ossl_check_OCSP_SINGLERESP_sk_type(sk))
|
| 220 |
+
#define sk_OCSP_SINGLERESP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OCSP_SINGLERESP_sk_type(sk))
|
| 221 |
+
#define sk_OCSP_SINGLERESP_dup(sk) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_dup(ossl_check_const_OCSP_SINGLERESP_sk_type(sk)))
|
| 222 |
+
#define sk_OCSP_SINGLERESP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OCSP_SINGLERESP) *)OPENSSL_sk_deep_copy(ossl_check_const_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_copyfunc_type(copyfunc), ossl_check_OCSP_SINGLERESP_freefunc_type(freefunc)))
|
| 223 |
+
#define sk_OCSP_SINGLERESP_set_cmp_func(sk, cmp) ((sk_OCSP_SINGLERESP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OCSP_SINGLERESP_sk_type(sk), ossl_check_OCSP_SINGLERESP_compfunc_type(cmp)))
|
| 224 |
+
|
| 225 |
+
|
| 226 |
+
typedef struct ocsp_response_data_st OCSP_RESPDATA;
|
| 227 |
+
|
| 228 |
+
typedef struct ocsp_basic_response_st OCSP_BASICRESP;
|
| 229 |
+
|
| 230 |
+
typedef struct ocsp_crl_id_st OCSP_CRLID;
|
| 231 |
+
typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
|
| 232 |
+
|
| 233 |
+
# define PEM_STRING_OCSP_REQUEST "OCSP REQUEST"
|
| 234 |
+
# define PEM_STRING_OCSP_RESPONSE "OCSP RESPONSE"
|
| 235 |
+
|
| 236 |
+
# define d2i_OCSP_REQUEST_bio(bp,p) ASN1_d2i_bio_of(OCSP_REQUEST,OCSP_REQUEST_new,d2i_OCSP_REQUEST,bp,p)
|
| 237 |
+
|
| 238 |
+
# define d2i_OCSP_RESPONSE_bio(bp,p) ASN1_d2i_bio_of(OCSP_RESPONSE,OCSP_RESPONSE_new,d2i_OCSP_RESPONSE,bp,p)
|
| 239 |
+
|
| 240 |
+
# define PEM_read_bio_OCSP_REQUEST(bp,x,cb) (OCSP_REQUEST *)PEM_ASN1_read_bio( \
|
| 241 |
+
(char *(*)())d2i_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST, \
|
| 242 |
+
bp,(char **)(x),cb,NULL)
|
| 243 |
+
|
| 244 |
+
# define PEM_read_bio_OCSP_RESPONSE(bp,x,cb) (OCSP_RESPONSE *)PEM_ASN1_read_bio(\
|
| 245 |
+
(char *(*)())d2i_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE, \
|
| 246 |
+
bp,(char **)(x),cb,NULL)
|
| 247 |
+
|
| 248 |
+
# define PEM_write_bio_OCSP_REQUEST(bp,o) \
|
| 249 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_REQUEST,PEM_STRING_OCSP_REQUEST,\
|
| 250 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 251 |
+
|
| 252 |
+
# define PEM_write_bio_OCSP_RESPONSE(bp,o) \
|
| 253 |
+
PEM_ASN1_write_bio((int (*)())i2d_OCSP_RESPONSE,PEM_STRING_OCSP_RESPONSE,\
|
| 254 |
+
bp,(char *)(o), NULL,NULL,0,NULL,NULL)
|
| 255 |
+
|
| 256 |
+
# define i2d_OCSP_RESPONSE_bio(bp,o) ASN1_i2d_bio_of(OCSP_RESPONSE,i2d_OCSP_RESPONSE,bp,o)
|
| 257 |
+
|
| 258 |
+
# define i2d_OCSP_REQUEST_bio(bp,o) ASN1_i2d_bio_of(OCSP_REQUEST,i2d_OCSP_REQUEST,bp,o)
|
| 259 |
+
|
| 260 |
+
# define ASN1_BIT_STRING_digest(data,type,md,len) \
|
| 261 |
+
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
| 262 |
+
|
| 263 |
+
# define OCSP_CERTSTATUS_dup(cs)\
|
| 264 |
+
(OCSP_CERTSTATUS*)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS,\
|
| 265 |
+
(d2i_of_void *)d2i_OCSP_CERTSTATUS,(char *)(cs))
|
| 266 |
+
|
| 267 |
+
DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID)
|
| 268 |
+
|
| 269 |
+
OSSL_HTTP_REQ_CTX *OCSP_sendreq_new(BIO *io, const char *path,
|
| 270 |
+
const OCSP_REQUEST *req, int buf_size);
|
| 271 |
+
OCSP_RESPONSE *OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req);
|
| 272 |
+
|
| 273 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 274 |
+
typedef OSSL_HTTP_REQ_CTX OCSP_REQ_CTX;
|
| 275 |
+
# define OCSP_REQ_CTX_new(io, buf_size) \
|
| 276 |
+
OSSL_HTTP_REQ_CTX_new(io, io, buf_size)
|
| 277 |
+
# define OCSP_REQ_CTX_free OSSL_HTTP_REQ_CTX_free
|
| 278 |
+
# define OCSP_REQ_CTX_http(rctx, op, path) \
|
| 279 |
+
(OSSL_HTTP_REQ_CTX_set_expected(rctx, NULL, 1 /* asn1 */, 0, 0) && \
|
| 280 |
+
OSSL_HTTP_REQ_CTX_set_request_line(rctx, strcmp(op, "POST") == 0, \
|
| 281 |
+
NULL, NULL, path))
|
| 282 |
+
# define OCSP_REQ_CTX_add1_header OSSL_HTTP_REQ_CTX_add1_header
|
| 283 |
+
# define OCSP_REQ_CTX_i2d(r, it, req) \
|
| 284 |
+
OSSL_HTTP_REQ_CTX_set1_req(r, "application/ocsp-request", it, req)
|
| 285 |
+
# define OCSP_REQ_CTX_set1_req(r, req) \
|
| 286 |
+
OCSP_REQ_CTX_i2d(r, ASN1_ITEM_rptr(OCSP_REQUEST), (ASN1_VALUE *)(req))
|
| 287 |
+
# define OCSP_REQ_CTX_nbio OSSL_HTTP_REQ_CTX_nbio
|
| 288 |
+
# define OCSP_REQ_CTX_nbio_d2i OSSL_HTTP_REQ_CTX_nbio_d2i
|
| 289 |
+
# define OCSP_sendreq_nbio(p, r) \
|
| 290 |
+
OSSL_HTTP_REQ_CTX_nbio_d2i(r, (ASN1_VALUE **)(p), \
|
| 291 |
+
ASN1_ITEM_rptr(OCSP_RESPONSE))
|
| 292 |
+
# define OCSP_REQ_CTX_get0_mem_bio OSSL_HTTP_REQ_CTX_get0_mem_bio
|
| 293 |
+
# define OCSP_set_max_response_length OSSL_HTTP_REQ_CTX_set_max_response_length
|
| 294 |
+
# endif
|
| 295 |
+
|
| 296 |
+
OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
|
| 297 |
+
const X509 *issuer);
|
| 298 |
+
|
| 299 |
+
OCSP_CERTID *OCSP_cert_id_new(const EVP_MD *dgst,
|
| 300 |
+
const X509_NAME *issuerName,
|
| 301 |
+
const ASN1_BIT_STRING *issuerKey,
|
| 302 |
+
const ASN1_INTEGER *serialNumber);
|
| 303 |
+
|
| 304 |
+
OCSP_ONEREQ *OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid);
|
| 305 |
+
|
| 306 |
+
int OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len);
|
| 307 |
+
int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
|
| 308 |
+
int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
|
| 309 |
+
int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
|
| 310 |
+
|
| 311 |
+
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
|
| 312 |
+
int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
| 313 |
+
|
| 314 |
+
int OCSP_request_sign(OCSP_REQUEST *req,
|
| 315 |
+
X509 *signer,
|
| 316 |
+
EVP_PKEY *key,
|
| 317 |
+
const EVP_MD *dgst,
|
| 318 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 319 |
+
|
| 320 |
+
int OCSP_response_status(OCSP_RESPONSE *resp);
|
| 321 |
+
OCSP_BASICRESP *OCSP_response_get1_basic(OCSP_RESPONSE *resp);
|
| 322 |
+
|
| 323 |
+
const ASN1_OCTET_STRING *OCSP_resp_get0_signature(const OCSP_BASICRESP *bs);
|
| 324 |
+
const X509_ALGOR *OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs);
|
| 325 |
+
const OCSP_RESPDATA *OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs);
|
| 326 |
+
int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer,
|
| 327 |
+
STACK_OF(X509) *extra_certs);
|
| 328 |
+
|
| 329 |
+
int OCSP_resp_count(OCSP_BASICRESP *bs);
|
| 330 |
+
OCSP_SINGLERESP *OCSP_resp_get0(OCSP_BASICRESP *bs, int idx);
|
| 331 |
+
const ASN1_GENERALIZEDTIME *OCSP_resp_get0_produced_at(const OCSP_BASICRESP* bs);
|
| 332 |
+
const STACK_OF(X509) *OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
|
| 333 |
+
int OCSP_resp_get0_id(const OCSP_BASICRESP *bs,
|
| 334 |
+
const ASN1_OCTET_STRING **pid,
|
| 335 |
+
const X509_NAME **pname);
|
| 336 |
+
int OCSP_resp_get1_id(const OCSP_BASICRESP *bs,
|
| 337 |
+
ASN1_OCTET_STRING **pid,
|
| 338 |
+
X509_NAME **pname);
|
| 339 |
+
|
| 340 |
+
int OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last);
|
| 341 |
+
int OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason,
|
| 342 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 343 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 344 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 345 |
+
int OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status,
|
| 346 |
+
int *reason,
|
| 347 |
+
ASN1_GENERALIZEDTIME **revtime,
|
| 348 |
+
ASN1_GENERALIZEDTIME **thisupd,
|
| 349 |
+
ASN1_GENERALIZEDTIME **nextupd);
|
| 350 |
+
int OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd,
|
| 351 |
+
ASN1_GENERALIZEDTIME *nextupd, long sec, long maxsec);
|
| 352 |
+
|
| 353 |
+
int OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs,
|
| 354 |
+
X509_STORE *store, unsigned long flags);
|
| 355 |
+
|
| 356 |
+
# define OCSP_parse_url(url, host, port, path, ssl) \
|
| 357 |
+
OSSL_HTTP_parse_url(url, ssl, NULL, host, port, NULL, path, NULL, NULL)
|
| 358 |
+
|
| 359 |
+
int OCSP_id_issuer_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 360 |
+
int OCSP_id_cmp(const OCSP_CERTID *a, const OCSP_CERTID *b);
|
| 361 |
+
|
| 362 |
+
int OCSP_request_onereq_count(OCSP_REQUEST *req);
|
| 363 |
+
OCSP_ONEREQ *OCSP_request_onereq_get0(OCSP_REQUEST *req, int i);
|
| 364 |
+
OCSP_CERTID *OCSP_onereq_get0_id(OCSP_ONEREQ *one);
|
| 365 |
+
int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd,
|
| 366 |
+
ASN1_OCTET_STRING **pikeyHash,
|
| 367 |
+
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
|
| 368 |
+
int OCSP_request_is_signed(OCSP_REQUEST *req);
|
| 369 |
+
OCSP_RESPONSE *OCSP_response_create(int status, OCSP_BASICRESP *bs);
|
| 370 |
+
OCSP_SINGLERESP *OCSP_basic_add1_status(OCSP_BASICRESP *rsp,
|
| 371 |
+
OCSP_CERTID *cid,
|
| 372 |
+
int status, int reason,
|
| 373 |
+
ASN1_TIME *revtime,
|
| 374 |
+
ASN1_TIME *thisupd,
|
| 375 |
+
ASN1_TIME *nextupd);
|
| 376 |
+
int OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert);
|
| 377 |
+
int OCSP_basic_sign(OCSP_BASICRESP *brsp,
|
| 378 |
+
X509 *signer, EVP_PKEY *key, const EVP_MD *dgst,
|
| 379 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 380 |
+
int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
|
| 381 |
+
X509 *signer, EVP_MD_CTX *ctx,
|
| 382 |
+
STACK_OF(X509) *certs, unsigned long flags);
|
| 383 |
+
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
| 384 |
+
int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
|
| 385 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 386 |
+
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
| 387 |
+
int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OSSL_LIB_CTX *libctx,
|
| 388 |
+
const char *propq);
|
| 389 |
+
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
| 390 |
+
|
| 391 |
+
X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
|
| 392 |
+
|
| 393 |
+
X509_EXTENSION *OCSP_accept_responses_new(char **oids);
|
| 394 |
+
|
| 395 |
+
X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
|
| 396 |
+
|
| 397 |
+
X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
|
| 398 |
+
|
| 399 |
+
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
| 400 |
+
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
| 401 |
+
int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj,
|
| 402 |
+
int lastpos);
|
| 403 |
+
int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos);
|
| 404 |
+
X509_EXTENSION *OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc);
|
| 405 |
+
X509_EXTENSION *OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc);
|
| 406 |
+
void *OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit,
|
| 407 |
+
int *idx);
|
| 408 |
+
int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit,
|
| 409 |
+
unsigned long flags);
|
| 410 |
+
int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc);
|
| 411 |
+
|
| 412 |
+
int OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x);
|
| 413 |
+
int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos);
|
| 414 |
+
int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos);
|
| 415 |
+
int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos);
|
| 416 |
+
X509_EXTENSION *OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc);
|
| 417 |
+
X509_EXTENSION *OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc);
|
| 418 |
+
void *OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx);
|
| 419 |
+
int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit,
|
| 420 |
+
unsigned long flags);
|
| 421 |
+
int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc);
|
| 422 |
+
|
| 423 |
+
int OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x);
|
| 424 |
+
int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos);
|
| 425 |
+
int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj,
|
| 426 |
+
int lastpos);
|
| 427 |
+
int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit,
|
| 428 |
+
int lastpos);
|
| 429 |
+
X509_EXTENSION *OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc);
|
| 430 |
+
X509_EXTENSION *OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc);
|
| 431 |
+
void *OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit,
|
| 432 |
+
int *idx);
|
| 433 |
+
int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value,
|
| 434 |
+
int crit, unsigned long flags);
|
| 435 |
+
int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc);
|
| 436 |
+
|
| 437 |
+
int OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x);
|
| 438 |
+
int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos);
|
| 439 |
+
int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj,
|
| 440 |
+
int lastpos);
|
| 441 |
+
int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit,
|
| 442 |
+
int lastpos);
|
| 443 |
+
X509_EXTENSION *OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc);
|
| 444 |
+
X509_EXTENSION *OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc);
|
| 445 |
+
void *OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit,
|
| 446 |
+
int *idx);
|
| 447 |
+
int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value,
|
| 448 |
+
int crit, unsigned long flags);
|
| 449 |
+
int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc);
|
| 450 |
+
const OCSP_CERTID *OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *x);
|
| 451 |
+
|
| 452 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SINGLERESP)
|
| 453 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTSTATUS)
|
| 454 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REVOKEDINFO)
|
| 455 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_BASICRESP)
|
| 456 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPDATA)
|
| 457 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPID)
|
| 458 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPONSE)
|
| 459 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_RESPBYTES)
|
| 460 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_ONEREQ)
|
| 461 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CERTID)
|
| 462 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQUEST)
|
| 463 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SIGNATURE)
|
| 464 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_REQINFO)
|
| 465 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_CRLID)
|
| 466 |
+
DECLARE_ASN1_FUNCTIONS(OCSP_SERVICELOC)
|
| 467 |
+
|
| 468 |
+
const char *OCSP_response_status_str(long s);
|
| 469 |
+
const char *OCSP_cert_status_str(long s);
|
| 470 |
+
const char *OCSP_crl_reason_str(long s);
|
| 471 |
+
|
| 472 |
+
int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST *a, unsigned long flags);
|
| 473 |
+
int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE *o, unsigned long flags);
|
| 474 |
+
|
| 475 |
+
int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
| 476 |
+
X509_STORE *st, unsigned long flags);
|
| 477 |
+
|
| 478 |
+
|
| 479 |
+
# ifdef __cplusplus
|
| 480 |
+
}
|
| 481 |
+
# endif
|
| 482 |
+
# endif /* !defined(OPENSSL_NO_OCSP) */
|
| 483 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ssl.h
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/openssl/ui.h
ADDED
|
@@ -0,0 +1,407 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/ui.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2001-2020 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_UI_H
|
| 16 |
+
# define OPENSSL_UI_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_UI_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 27 |
+
# include <openssl/crypto.h>
|
| 28 |
+
# endif
|
| 29 |
+
# include <openssl/safestack.h>
|
| 30 |
+
# include <openssl/pem.h>
|
| 31 |
+
# include <openssl/types.h>
|
| 32 |
+
# include <openssl/uierr.h>
|
| 33 |
+
|
| 34 |
+
/* For compatibility reasons, the macro OPENSSL_NO_UI is currently retained */
|
| 35 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 36 |
+
# ifdef OPENSSL_NO_UI_CONSOLE
|
| 37 |
+
# define OPENSSL_NO_UI
|
| 38 |
+
# endif
|
| 39 |
+
# endif
|
| 40 |
+
|
| 41 |
+
# ifdef __cplusplus
|
| 42 |
+
extern "C" {
|
| 43 |
+
# endif
|
| 44 |
+
|
| 45 |
+
/*
|
| 46 |
+
* All the following functions return -1 or NULL on error and in some cases
|
| 47 |
+
* (UI_process()) -2 if interrupted or in some other way cancelled. When
|
| 48 |
+
* everything is fine, they return 0, a positive value or a non-NULL pointer,
|
| 49 |
+
* all depending on their purpose.
|
| 50 |
+
*/
|
| 51 |
+
|
| 52 |
+
/* Creators and destructor. */
|
| 53 |
+
UI *UI_new(void);
|
| 54 |
+
UI *UI_new_method(const UI_METHOD *method);
|
| 55 |
+
void UI_free(UI *ui);
|
| 56 |
+
|
| 57 |
+
/*-
|
| 58 |
+
The following functions are used to add strings to be printed and prompt
|
| 59 |
+
strings to prompt for data. The names are UI_{add,dup}_<function>_string
|
| 60 |
+
and UI_{add,dup}_input_boolean.
|
| 61 |
+
|
| 62 |
+
UI_{add,dup}_<function>_string have the following meanings:
|
| 63 |
+
add add a text or prompt string. The pointers given to these
|
| 64 |
+
functions are used verbatim, no copying is done.
|
| 65 |
+
dup make a copy of the text or prompt string, then add the copy
|
| 66 |
+
to the collection of strings in the user interface.
|
| 67 |
+
<function>
|
| 68 |
+
The function is a name for the functionality that the given
|
| 69 |
+
string shall be used for. It can be one of:
|
| 70 |
+
input use the string as data prompt.
|
| 71 |
+
verify use the string as verification prompt. This
|
| 72 |
+
is used to verify a previous input.
|
| 73 |
+
info use the string for informational output.
|
| 74 |
+
error use the string for error output.
|
| 75 |
+
Honestly, there's currently no difference between info and error for the
|
| 76 |
+
moment.
|
| 77 |
+
|
| 78 |
+
UI_{add,dup}_input_boolean have the same semantics for "add" and "dup",
|
| 79 |
+
and are typically used when one wants to prompt for a yes/no response.
|
| 80 |
+
|
| 81 |
+
All of the functions in this group take a UI and a prompt string.
|
| 82 |
+
The string input and verify addition functions also take a flag argument,
|
| 83 |
+
a buffer for the result to end up with, a minimum input size and a maximum
|
| 84 |
+
input size (the result buffer MUST be large enough to be able to contain
|
| 85 |
+
the maximum number of characters). Additionally, the verify addition
|
| 86 |
+
functions takes another buffer to compare the result against.
|
| 87 |
+
The boolean input functions take an action description string (which should
|
| 88 |
+
be safe to ignore if the expected user action is obvious, for example with
|
| 89 |
+
a dialog box with an OK button and a Cancel button), a string of acceptable
|
| 90 |
+
characters to mean OK and to mean Cancel. The two last strings are checked
|
| 91 |
+
to make sure they don't have common characters. Additionally, the same
|
| 92 |
+
flag argument as for the string input is taken, as well as a result buffer.
|
| 93 |
+
The result buffer is required to be at least one byte long. Depending on
|
| 94 |
+
the answer, the first character from the OK or the Cancel character strings
|
| 95 |
+
will be stored in the first byte of the result buffer. No NUL will be
|
| 96 |
+
added, so the result is *not* a string.
|
| 97 |
+
|
| 98 |
+
On success, the all return an index of the added information. That index
|
| 99 |
+
is useful when retrieving results with UI_get0_result(). */
|
| 100 |
+
int UI_add_input_string(UI *ui, const char *prompt, int flags,
|
| 101 |
+
char *result_buf, int minsize, int maxsize);
|
| 102 |
+
int UI_dup_input_string(UI *ui, const char *prompt, int flags,
|
| 103 |
+
char *result_buf, int minsize, int maxsize);
|
| 104 |
+
int UI_add_verify_string(UI *ui, const char *prompt, int flags,
|
| 105 |
+
char *result_buf, int minsize, int maxsize,
|
| 106 |
+
const char *test_buf);
|
| 107 |
+
int UI_dup_verify_string(UI *ui, const char *prompt, int flags,
|
| 108 |
+
char *result_buf, int minsize, int maxsize,
|
| 109 |
+
const char *test_buf);
|
| 110 |
+
int UI_add_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
| 111 |
+
const char *ok_chars, const char *cancel_chars,
|
| 112 |
+
int flags, char *result_buf);
|
| 113 |
+
int UI_dup_input_boolean(UI *ui, const char *prompt, const char *action_desc,
|
| 114 |
+
const char *ok_chars, const char *cancel_chars,
|
| 115 |
+
int flags, char *result_buf);
|
| 116 |
+
int UI_add_info_string(UI *ui, const char *text);
|
| 117 |
+
int UI_dup_info_string(UI *ui, const char *text);
|
| 118 |
+
int UI_add_error_string(UI *ui, const char *text);
|
| 119 |
+
int UI_dup_error_string(UI *ui, const char *text);
|
| 120 |
+
|
| 121 |
+
/* These are the possible flags. They can be or'ed together. */
|
| 122 |
+
/* Use to have echoing of input */
|
| 123 |
+
# define UI_INPUT_FLAG_ECHO 0x01
|
| 124 |
+
/*
|
| 125 |
+
* Use a default password. Where that password is found is completely up to
|
| 126 |
+
* the application, it might for example be in the user data set with
|
| 127 |
+
* UI_add_user_data(). It is not recommended to have more than one input in
|
| 128 |
+
* each UI being marked with this flag, or the application might get
|
| 129 |
+
* confused.
|
| 130 |
+
*/
|
| 131 |
+
# define UI_INPUT_FLAG_DEFAULT_PWD 0x02
|
| 132 |
+
|
| 133 |
+
/*-
|
| 134 |
+
* The user of these routines may want to define flags of their own. The core
|
| 135 |
+
* UI won't look at those, but will pass them on to the method routines. They
|
| 136 |
+
* must use higher bits so they don't get confused with the UI bits above.
|
| 137 |
+
* UI_INPUT_FLAG_USER_BASE tells which is the lowest bit to use. A good
|
| 138 |
+
* example of use is this:
|
| 139 |
+
*
|
| 140 |
+
* #define MY_UI_FLAG1 (0x01 << UI_INPUT_FLAG_USER_BASE)
|
| 141 |
+
*
|
| 142 |
+
*/
|
| 143 |
+
# define UI_INPUT_FLAG_USER_BASE 16
|
| 144 |
+
|
| 145 |
+
/*-
|
| 146 |
+
* The following function helps construct a prompt.
|
| 147 |
+
* phrase_desc is a textual short description of the phrase to enter,
|
| 148 |
+
* for example "pass phrase", and
|
| 149 |
+
* object_name is the name of the object
|
| 150 |
+
* (which might be a card name or a file name) or NULL.
|
| 151 |
+
* The returned string shall always be allocated on the heap with
|
| 152 |
+
* OPENSSL_malloc(), and need to be free'd with OPENSSL_free().
|
| 153 |
+
*
|
| 154 |
+
* If the ui_method doesn't contain a pointer to a user-defined prompt
|
| 155 |
+
* constructor, a default string is built, looking like this:
|
| 156 |
+
*
|
| 157 |
+
* "Enter {phrase_desc} for {object_name}:"
|
| 158 |
+
*
|
| 159 |
+
* So, if phrase_desc has the value "pass phrase" and object_name has
|
| 160 |
+
* the value "foo.key", the resulting string is:
|
| 161 |
+
*
|
| 162 |
+
* "Enter pass phrase for foo.key:"
|
| 163 |
+
*/
|
| 164 |
+
char *UI_construct_prompt(UI *ui_method,
|
| 165 |
+
const char *phrase_desc, const char *object_name);
|
| 166 |
+
|
| 167 |
+
/*
|
| 168 |
+
* The following function is used to store a pointer to user-specific data.
|
| 169 |
+
* Any previous such pointer will be returned and replaced.
|
| 170 |
+
*
|
| 171 |
+
* For callback purposes, this function makes a lot more sense than using
|
| 172 |
+
* ex_data, since the latter requires that different parts of OpenSSL or
|
| 173 |
+
* applications share the same ex_data index.
|
| 174 |
+
*
|
| 175 |
+
* Note that the UI_OpenSSL() method completely ignores the user data. Other
|
| 176 |
+
* methods may not, however.
|
| 177 |
+
*/
|
| 178 |
+
void *UI_add_user_data(UI *ui, void *user_data);
|
| 179 |
+
/*
|
| 180 |
+
* Alternatively, this function is used to duplicate the user data.
|
| 181 |
+
* This uses the duplicator method function. The destroy function will
|
| 182 |
+
* be used to free the user data in this case.
|
| 183 |
+
*/
|
| 184 |
+
int UI_dup_user_data(UI *ui, void *user_data);
|
| 185 |
+
/* We need a user data retrieving function as well. */
|
| 186 |
+
void *UI_get0_user_data(UI *ui);
|
| 187 |
+
|
| 188 |
+
/* Return the result associated with a prompt given with the index i. */
|
| 189 |
+
const char *UI_get0_result(UI *ui, int i);
|
| 190 |
+
int UI_get_result_length(UI *ui, int i);
|
| 191 |
+
|
| 192 |
+
/* When all strings have been added, process the whole thing. */
|
| 193 |
+
int UI_process(UI *ui);
|
| 194 |
+
|
| 195 |
+
/*
|
| 196 |
+
* Give a user interface parameterised control commands. This can be used to
|
| 197 |
+
* send down an integer, a data pointer or a function pointer, as well as be
|
| 198 |
+
* used to get information from a UI.
|
| 199 |
+
*/
|
| 200 |
+
int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
|
| 201 |
+
|
| 202 |
+
/* The commands */
|
| 203 |
+
/*
|
| 204 |
+
* Use UI_CONTROL_PRINT_ERRORS with the value 1 to have UI_process print the
|
| 205 |
+
* OpenSSL error stack before printing any info or added error messages and
|
| 206 |
+
* before any prompting.
|
| 207 |
+
*/
|
| 208 |
+
# define UI_CTRL_PRINT_ERRORS 1
|
| 209 |
+
/*
|
| 210 |
+
* Check if a UI_process() is possible to do again with the same instance of
|
| 211 |
+
* a user interface. This makes UI_ctrl() return 1 if it is redoable, and 0
|
| 212 |
+
* if not.
|
| 213 |
+
*/
|
| 214 |
+
# define UI_CTRL_IS_REDOABLE 2
|
| 215 |
+
|
| 216 |
+
/* Some methods may use extra data */
|
| 217 |
+
# define UI_set_app_data(s,arg) UI_set_ex_data(s,0,arg)
|
| 218 |
+
# define UI_get_app_data(s) UI_get_ex_data(s,0)
|
| 219 |
+
|
| 220 |
+
# define UI_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 221 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef)
|
| 222 |
+
int UI_set_ex_data(UI *r, int idx, void *arg);
|
| 223 |
+
void *UI_get_ex_data(const UI *r, int idx);
|
| 224 |
+
|
| 225 |
+
/* Use specific methods instead of the built-in one */
|
| 226 |
+
void UI_set_default_method(const UI_METHOD *meth);
|
| 227 |
+
const UI_METHOD *UI_get_default_method(void);
|
| 228 |
+
const UI_METHOD *UI_get_method(UI *ui);
|
| 229 |
+
const UI_METHOD *UI_set_method(UI *ui, const UI_METHOD *meth);
|
| 230 |
+
|
| 231 |
+
# ifndef OPENSSL_NO_UI_CONSOLE
|
| 232 |
+
|
| 233 |
+
/* The method with all the built-in thingies */
|
| 234 |
+
UI_METHOD *UI_OpenSSL(void);
|
| 235 |
+
|
| 236 |
+
# endif
|
| 237 |
+
|
| 238 |
+
/*
|
| 239 |
+
* NULL method. Literally does nothing, but may serve as a placeholder
|
| 240 |
+
* to avoid internal default.
|
| 241 |
+
*/
|
| 242 |
+
const UI_METHOD *UI_null(void);
|
| 243 |
+
|
| 244 |
+
/* ---------- For method writers ---------- */
|
| 245 |
+
/*-
|
| 246 |
+
A method contains a number of functions that implement the low level
|
| 247 |
+
of the User Interface. The functions are:
|
| 248 |
+
|
| 249 |
+
an opener This function starts a session, maybe by opening
|
| 250 |
+
a channel to a tty, or by opening a window.
|
| 251 |
+
a writer This function is called to write a given string,
|
| 252 |
+
maybe to the tty, maybe as a field label in a
|
| 253 |
+
window.
|
| 254 |
+
a flusher This function is called to flush everything that
|
| 255 |
+
has been output so far. It can be used to actually
|
| 256 |
+
display a dialog box after it has been built.
|
| 257 |
+
a reader This function is called to read a given prompt,
|
| 258 |
+
maybe from the tty, maybe from a field in a
|
| 259 |
+
window. Note that it's called with all string
|
| 260 |
+
structures, not only the prompt ones, so it must
|
| 261 |
+
check such things itself.
|
| 262 |
+
a closer This function closes the session, maybe by closing
|
| 263 |
+
the channel to the tty, or closing the window.
|
| 264 |
+
|
| 265 |
+
All these functions are expected to return:
|
| 266 |
+
|
| 267 |
+
0 on error.
|
| 268 |
+
1 on success.
|
| 269 |
+
-1 on out-of-band events, for example if some prompting has
|
| 270 |
+
been canceled (by pressing Ctrl-C, for example). This is
|
| 271 |
+
only checked when returned by the flusher or the reader.
|
| 272 |
+
|
| 273 |
+
The way this is used, the opener is first called, then the writer for all
|
| 274 |
+
strings, then the flusher, then the reader for all strings and finally the
|
| 275 |
+
closer. Note that if you want to prompt from a terminal or other command
|
| 276 |
+
line interface, the best is to have the reader also write the prompts
|
| 277 |
+
instead of having the writer do it. If you want to prompt from a dialog
|
| 278 |
+
box, the writer can be used to build up the contents of the box, and the
|
| 279 |
+
flusher to actually display the box and run the event loop until all data
|
| 280 |
+
has been given, after which the reader only grabs the given data and puts
|
| 281 |
+
them back into the UI strings.
|
| 282 |
+
|
| 283 |
+
All method functions take a UI as argument. Additionally, the writer and
|
| 284 |
+
the reader take a UI_STRING.
|
| 285 |
+
*/
|
| 286 |
+
|
| 287 |
+
/*
|
| 288 |
+
* The UI_STRING type is the data structure that contains all the needed info
|
| 289 |
+
* about a string or a prompt, including test data for a verification prompt.
|
| 290 |
+
*/
|
| 291 |
+
typedef struct ui_string_st UI_STRING;
|
| 292 |
+
|
| 293 |
+
SKM_DEFINE_STACK_OF_INTERNAL(UI_STRING, UI_STRING, UI_STRING)
|
| 294 |
+
#define sk_UI_STRING_num(sk) OPENSSL_sk_num(ossl_check_const_UI_STRING_sk_type(sk))
|
| 295 |
+
#define sk_UI_STRING_value(sk, idx) ((UI_STRING *)OPENSSL_sk_value(ossl_check_const_UI_STRING_sk_type(sk), (idx)))
|
| 296 |
+
#define sk_UI_STRING_new(cmp) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new(ossl_check_UI_STRING_compfunc_type(cmp)))
|
| 297 |
+
#define sk_UI_STRING_new_null() ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_null())
|
| 298 |
+
#define sk_UI_STRING_new_reserve(cmp, n) ((STACK_OF(UI_STRING) *)OPENSSL_sk_new_reserve(ossl_check_UI_STRING_compfunc_type(cmp), (n)))
|
| 299 |
+
#define sk_UI_STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_UI_STRING_sk_type(sk), (n))
|
| 300 |
+
#define sk_UI_STRING_free(sk) OPENSSL_sk_free(ossl_check_UI_STRING_sk_type(sk))
|
| 301 |
+
#define sk_UI_STRING_zero(sk) OPENSSL_sk_zero(ossl_check_UI_STRING_sk_type(sk))
|
| 302 |
+
#define sk_UI_STRING_delete(sk, i) ((UI_STRING *)OPENSSL_sk_delete(ossl_check_UI_STRING_sk_type(sk), (i)))
|
| 303 |
+
#define sk_UI_STRING_delete_ptr(sk, ptr) ((UI_STRING *)OPENSSL_sk_delete_ptr(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr)))
|
| 304 |
+
#define sk_UI_STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 305 |
+
#define sk_UI_STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 306 |
+
#define sk_UI_STRING_pop(sk) ((UI_STRING *)OPENSSL_sk_pop(ossl_check_UI_STRING_sk_type(sk)))
|
| 307 |
+
#define sk_UI_STRING_shift(sk) ((UI_STRING *)OPENSSL_sk_shift(ossl_check_UI_STRING_sk_type(sk)))
|
| 308 |
+
#define sk_UI_STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_UI_STRING_sk_type(sk),ossl_check_UI_STRING_freefunc_type(freefunc))
|
| 309 |
+
#define sk_UI_STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), (idx))
|
| 310 |
+
#define sk_UI_STRING_set(sk, idx, ptr) ((UI_STRING *)OPENSSL_sk_set(ossl_check_UI_STRING_sk_type(sk), (idx), ossl_check_UI_STRING_type(ptr)))
|
| 311 |
+
#define sk_UI_STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 312 |
+
#define sk_UI_STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr))
|
| 313 |
+
#define sk_UI_STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_type(ptr), pnum)
|
| 314 |
+
#define sk_UI_STRING_sort(sk) OPENSSL_sk_sort(ossl_check_UI_STRING_sk_type(sk))
|
| 315 |
+
#define sk_UI_STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_UI_STRING_sk_type(sk))
|
| 316 |
+
#define sk_UI_STRING_dup(sk) ((STACK_OF(UI_STRING) *)OPENSSL_sk_dup(ossl_check_const_UI_STRING_sk_type(sk)))
|
| 317 |
+
#define sk_UI_STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(UI_STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_UI_STRING_sk_type(sk), ossl_check_UI_STRING_copyfunc_type(copyfunc), ossl_check_UI_STRING_freefunc_type(freefunc)))
|
| 318 |
+
#define sk_UI_STRING_set_cmp_func(sk, cmp) ((sk_UI_STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_UI_STRING_sk_type(sk), ossl_check_UI_STRING_compfunc_type(cmp)))
|
| 319 |
+
|
| 320 |
+
|
| 321 |
+
/*
|
| 322 |
+
* The different types of strings that are currently supported. This is only
|
| 323 |
+
* needed by method authors.
|
| 324 |
+
*/
|
| 325 |
+
enum UI_string_types {
|
| 326 |
+
UIT_NONE = 0,
|
| 327 |
+
UIT_PROMPT, /* Prompt for a string */
|
| 328 |
+
UIT_VERIFY, /* Prompt for a string and verify */
|
| 329 |
+
UIT_BOOLEAN, /* Prompt for a yes/no response */
|
| 330 |
+
UIT_INFO, /* Send info to the user */
|
| 331 |
+
UIT_ERROR /* Send an error message to the user */
|
| 332 |
+
};
|
| 333 |
+
|
| 334 |
+
/* Create and manipulate methods */
|
| 335 |
+
UI_METHOD *UI_create_method(const char *name);
|
| 336 |
+
void UI_destroy_method(UI_METHOD *ui_method);
|
| 337 |
+
int UI_method_set_opener(UI_METHOD *method, int (*opener) (UI *ui));
|
| 338 |
+
int UI_method_set_writer(UI_METHOD *method,
|
| 339 |
+
int (*writer) (UI *ui, UI_STRING *uis));
|
| 340 |
+
int UI_method_set_flusher(UI_METHOD *method, int (*flusher) (UI *ui));
|
| 341 |
+
int UI_method_set_reader(UI_METHOD *method,
|
| 342 |
+
int (*reader) (UI *ui, UI_STRING *uis));
|
| 343 |
+
int UI_method_set_closer(UI_METHOD *method, int (*closer) (UI *ui));
|
| 344 |
+
int UI_method_set_data_duplicator(UI_METHOD *method,
|
| 345 |
+
void *(*duplicator) (UI *ui, void *ui_data),
|
| 346 |
+
void (*destructor)(UI *ui, void *ui_data));
|
| 347 |
+
int UI_method_set_prompt_constructor(UI_METHOD *method,
|
| 348 |
+
char *(*prompt_constructor) (UI *ui,
|
| 349 |
+
const char
|
| 350 |
+
*phrase_desc,
|
| 351 |
+
const char
|
| 352 |
+
*object_name));
|
| 353 |
+
int UI_method_set_ex_data(UI_METHOD *method, int idx, void *data);
|
| 354 |
+
int (*UI_method_get_opener(const UI_METHOD *method)) (UI *);
|
| 355 |
+
int (*UI_method_get_writer(const UI_METHOD *method)) (UI *, UI_STRING *);
|
| 356 |
+
int (*UI_method_get_flusher(const UI_METHOD *method)) (UI *);
|
| 357 |
+
int (*UI_method_get_reader(const UI_METHOD *method)) (UI *, UI_STRING *);
|
| 358 |
+
int (*UI_method_get_closer(const UI_METHOD *method)) (UI *);
|
| 359 |
+
char *(*UI_method_get_prompt_constructor(const UI_METHOD *method))
|
| 360 |
+
(UI *, const char *, const char *);
|
| 361 |
+
void *(*UI_method_get_data_duplicator(const UI_METHOD *method)) (UI *, void *);
|
| 362 |
+
void (*UI_method_get_data_destructor(const UI_METHOD *method)) (UI *, void *);
|
| 363 |
+
const void *UI_method_get_ex_data(const UI_METHOD *method, int idx);
|
| 364 |
+
|
| 365 |
+
/*
|
| 366 |
+
* The following functions are helpers for method writers to access relevant
|
| 367 |
+
* data from a UI_STRING.
|
| 368 |
+
*/
|
| 369 |
+
|
| 370 |
+
/* Return type of the UI_STRING */
|
| 371 |
+
enum UI_string_types UI_get_string_type(UI_STRING *uis);
|
| 372 |
+
/* Return input flags of the UI_STRING */
|
| 373 |
+
int UI_get_input_flags(UI_STRING *uis);
|
| 374 |
+
/* Return the actual string to output (the prompt, info or error) */
|
| 375 |
+
const char *UI_get0_output_string(UI_STRING *uis);
|
| 376 |
+
/*
|
| 377 |
+
* Return the optional action string to output (the boolean prompt
|
| 378 |
+
* instruction)
|
| 379 |
+
*/
|
| 380 |
+
const char *UI_get0_action_string(UI_STRING *uis);
|
| 381 |
+
/* Return the result of a prompt */
|
| 382 |
+
const char *UI_get0_result_string(UI_STRING *uis);
|
| 383 |
+
int UI_get_result_string_length(UI_STRING *uis);
|
| 384 |
+
/*
|
| 385 |
+
* Return the string to test the result against. Only useful with verifies.
|
| 386 |
+
*/
|
| 387 |
+
const char *UI_get0_test_string(UI_STRING *uis);
|
| 388 |
+
/* Return the required minimum size of the result */
|
| 389 |
+
int UI_get_result_minsize(UI_STRING *uis);
|
| 390 |
+
/* Return the required maximum size of the result */
|
| 391 |
+
int UI_get_result_maxsize(UI_STRING *uis);
|
| 392 |
+
/* Set the result of a UI_STRING. */
|
| 393 |
+
int UI_set_result(UI *ui, UI_STRING *uis, const char *result);
|
| 394 |
+
int UI_set_result_ex(UI *ui, UI_STRING *uis, const char *result, int len);
|
| 395 |
+
|
| 396 |
+
/* A couple of popular utility functions */
|
| 397 |
+
int UI_UTIL_read_pw_string(char *buf, int length, const char *prompt,
|
| 398 |
+
int verify);
|
| 399 |
+
int UI_UTIL_read_pw(char *buf, char *buff, int size, const char *prompt,
|
| 400 |
+
int verify);
|
| 401 |
+
UI_METHOD *UI_UTIL_wrap_read_pem_callback(pem_password_cb *cb, int rwflag);
|
| 402 |
+
|
| 403 |
+
|
| 404 |
+
# ifdef __cplusplus
|
| 405 |
+
}
|
| 406 |
+
# endif
|
| 407 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/include/progs.h
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by apps/progs.pl
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "function.h"
|
| 14 |
+
|
| 15 |
+
extern int asn1parse_main(int argc, char *argv[]);
|
| 16 |
+
extern int ca_main(int argc, char *argv[]);
|
| 17 |
+
extern int ciphers_main(int argc, char *argv[]);
|
| 18 |
+
extern int cmp_main(int argc, char *argv[]);
|
| 19 |
+
extern int cms_main(int argc, char *argv[]);
|
| 20 |
+
extern int crl_main(int argc, char *argv[]);
|
| 21 |
+
extern int crl2pkcs7_main(int argc, char *argv[]);
|
| 22 |
+
extern int dgst_main(int argc, char *argv[]);
|
| 23 |
+
extern int dhparam_main(int argc, char *argv[]);
|
| 24 |
+
extern int dsa_main(int argc, char *argv[]);
|
| 25 |
+
extern int dsaparam_main(int argc, char *argv[]);
|
| 26 |
+
extern int ec_main(int argc, char *argv[]);
|
| 27 |
+
extern int ecparam_main(int argc, char *argv[]);
|
| 28 |
+
extern int enc_main(int argc, char *argv[]);
|
| 29 |
+
extern int engine_main(int argc, char *argv[]);
|
| 30 |
+
extern int errstr_main(int argc, char *argv[]);
|
| 31 |
+
extern int fipsinstall_main(int argc, char *argv[]);
|
| 32 |
+
extern int gendsa_main(int argc, char *argv[]);
|
| 33 |
+
extern int genpkey_main(int argc, char *argv[]);
|
| 34 |
+
extern int genrsa_main(int argc, char *argv[]);
|
| 35 |
+
extern int help_main(int argc, char *argv[]);
|
| 36 |
+
extern int info_main(int argc, char *argv[]);
|
| 37 |
+
extern int kdf_main(int argc, char *argv[]);
|
| 38 |
+
extern int list_main(int argc, char *argv[]);
|
| 39 |
+
extern int mac_main(int argc, char *argv[]);
|
| 40 |
+
extern int nseq_main(int argc, char *argv[]);
|
| 41 |
+
extern int ocsp_main(int argc, char *argv[]);
|
| 42 |
+
extern int passwd_main(int argc, char *argv[]);
|
| 43 |
+
extern int pkcs12_main(int argc, char *argv[]);
|
| 44 |
+
extern int pkcs7_main(int argc, char *argv[]);
|
| 45 |
+
extern int pkcs8_main(int argc, char *argv[]);
|
| 46 |
+
extern int pkey_main(int argc, char *argv[]);
|
| 47 |
+
extern int pkeyparam_main(int argc, char *argv[]);
|
| 48 |
+
extern int pkeyutl_main(int argc, char *argv[]);
|
| 49 |
+
extern int prime_main(int argc, char *argv[]);
|
| 50 |
+
extern int rand_main(int argc, char *argv[]);
|
| 51 |
+
extern int rehash_main(int argc, char *argv[]);
|
| 52 |
+
extern int req_main(int argc, char *argv[]);
|
| 53 |
+
extern int rsa_main(int argc, char *argv[]);
|
| 54 |
+
extern int rsautl_main(int argc, char *argv[]);
|
| 55 |
+
extern int s_client_main(int argc, char *argv[]);
|
| 56 |
+
extern int s_server_main(int argc, char *argv[]);
|
| 57 |
+
extern int s_time_main(int argc, char *argv[]);
|
| 58 |
+
extern int sess_id_main(int argc, char *argv[]);
|
| 59 |
+
extern int skeyutl_main(int argc, char *argv[]);
|
| 60 |
+
extern int smime_main(int argc, char *argv[]);
|
| 61 |
+
extern int speed_main(int argc, char *argv[]);
|
| 62 |
+
extern int spkac_main(int argc, char *argv[]);
|
| 63 |
+
extern int srp_main(int argc, char *argv[]);
|
| 64 |
+
extern int storeutl_main(int argc, char *argv[]);
|
| 65 |
+
extern int ts_main(int argc, char *argv[]);
|
| 66 |
+
extern int verify_main(int argc, char *argv[]);
|
| 67 |
+
extern int version_main(int argc, char *argv[]);
|
| 68 |
+
extern int x509_main(int argc, char *argv[]);
|
| 69 |
+
|
| 70 |
+
extern const OPTIONS asn1parse_options[];
|
| 71 |
+
extern const OPTIONS ca_options[];
|
| 72 |
+
extern const OPTIONS ciphers_options[];
|
| 73 |
+
extern const OPTIONS cmp_options[];
|
| 74 |
+
extern const OPTIONS cms_options[];
|
| 75 |
+
extern const OPTIONS crl_options[];
|
| 76 |
+
extern const OPTIONS crl2pkcs7_options[];
|
| 77 |
+
extern const OPTIONS dgst_options[];
|
| 78 |
+
extern const OPTIONS dhparam_options[];
|
| 79 |
+
extern const OPTIONS dsa_options[];
|
| 80 |
+
extern const OPTIONS dsaparam_options[];
|
| 81 |
+
extern const OPTIONS ec_options[];
|
| 82 |
+
extern const OPTIONS ecparam_options[];
|
| 83 |
+
extern const OPTIONS enc_options[];
|
| 84 |
+
extern const OPTIONS engine_options[];
|
| 85 |
+
extern const OPTIONS errstr_options[];
|
| 86 |
+
extern const OPTIONS fipsinstall_options[];
|
| 87 |
+
extern const OPTIONS gendsa_options[];
|
| 88 |
+
extern const OPTIONS genpkey_options[];
|
| 89 |
+
extern const OPTIONS genrsa_options[];
|
| 90 |
+
extern const OPTIONS help_options[];
|
| 91 |
+
extern const OPTIONS info_options[];
|
| 92 |
+
extern const OPTIONS kdf_options[];
|
| 93 |
+
extern const OPTIONS list_options[];
|
| 94 |
+
extern const OPTIONS mac_options[];
|
| 95 |
+
extern const OPTIONS nseq_options[];
|
| 96 |
+
extern const OPTIONS ocsp_options[];
|
| 97 |
+
extern const OPTIONS passwd_options[];
|
| 98 |
+
extern const OPTIONS pkcs12_options[];
|
| 99 |
+
extern const OPTIONS pkcs7_options[];
|
| 100 |
+
extern const OPTIONS pkcs8_options[];
|
| 101 |
+
extern const OPTIONS pkey_options[];
|
| 102 |
+
extern const OPTIONS pkeyparam_options[];
|
| 103 |
+
extern const OPTIONS pkeyutl_options[];
|
| 104 |
+
extern const OPTIONS prime_options[];
|
| 105 |
+
extern const OPTIONS rand_options[];
|
| 106 |
+
extern const OPTIONS rehash_options[];
|
| 107 |
+
extern const OPTIONS req_options[];
|
| 108 |
+
extern const OPTIONS rsa_options[];
|
| 109 |
+
extern const OPTIONS rsautl_options[];
|
| 110 |
+
extern const OPTIONS s_client_options[];
|
| 111 |
+
extern const OPTIONS s_server_options[];
|
| 112 |
+
extern const OPTIONS s_time_options[];
|
| 113 |
+
extern const OPTIONS sess_id_options[];
|
| 114 |
+
extern const OPTIONS skeyutl_options[];
|
| 115 |
+
extern const OPTIONS smime_options[];
|
| 116 |
+
extern const OPTIONS speed_options[];
|
| 117 |
+
extern const OPTIONS spkac_options[];
|
| 118 |
+
extern const OPTIONS srp_options[];
|
| 119 |
+
extern const OPTIONS storeutl_options[];
|
| 120 |
+
extern const OPTIONS ts_options[];
|
| 121 |
+
extern const OPTIONS verify_options[];
|
| 122 |
+
extern const OPTIONS version_options[];
|
| 123 |
+
extern const OPTIONS x509_options[];
|
| 124 |
+
|
| 125 |
+
extern FUNCTION functions[];
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_digests.h
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_digests.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
|
| 15 |
+
/* Well known OIDs precompiled */
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* sigAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 3 }
|
| 19 |
+
*/
|
| 20 |
+
#define DER_OID_V_sigAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03
|
| 21 |
+
#define DER_OID_SZ_sigAlgs 10
|
| 22 |
+
extern const unsigned char ossl_der_oid_sigAlgs[DER_OID_SZ_sigAlgs];
|
| 23 |
+
|
| 24 |
+
/*
|
| 25 |
+
* id-sha1 OBJECT IDENTIFIER ::= { iso(1)
|
| 26 |
+
* identified-organization(3) oiw(14)
|
| 27 |
+
* secsig(3) algorithms(2) 26 }
|
| 28 |
+
*/
|
| 29 |
+
#define DER_OID_V_id_sha1 DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x1A
|
| 30 |
+
#define DER_OID_SZ_id_sha1 7
|
| 31 |
+
extern const unsigned char ossl_der_oid_id_sha1[DER_OID_SZ_id_sha1];
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* id-md2 OBJECT IDENTIFIER ::= {
|
| 35 |
+
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 2 }
|
| 36 |
+
*/
|
| 37 |
+
#define DER_OID_V_id_md2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x02
|
| 38 |
+
#define DER_OID_SZ_id_md2 10
|
| 39 |
+
extern const unsigned char ossl_der_oid_id_md2[DER_OID_SZ_id_md2];
|
| 40 |
+
|
| 41 |
+
/*
|
| 42 |
+
* id-md5 OBJECT IDENTIFIER ::= {
|
| 43 |
+
* iso(1) member-body(2) us(840) rsadsi(113549) digestAlgorithm(2) 5 }
|
| 44 |
+
*/
|
| 45 |
+
#define DER_OID_V_id_md5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x02, 0x05
|
| 46 |
+
#define DER_OID_SZ_id_md5 10
|
| 47 |
+
extern const unsigned char ossl_der_oid_id_md5[DER_OID_SZ_id_md5];
|
| 48 |
+
|
| 49 |
+
/*
|
| 50 |
+
* id-sha256 OBJECT IDENTIFIER ::= { hashAlgs 1 }
|
| 51 |
+
*/
|
| 52 |
+
#define DER_OID_V_id_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01
|
| 53 |
+
#define DER_OID_SZ_id_sha256 11
|
| 54 |
+
extern const unsigned char ossl_der_oid_id_sha256[DER_OID_SZ_id_sha256];
|
| 55 |
+
|
| 56 |
+
/*
|
| 57 |
+
* id-sha384 OBJECT IDENTIFIER ::= { hashAlgs 2 }
|
| 58 |
+
*/
|
| 59 |
+
#define DER_OID_V_id_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x02
|
| 60 |
+
#define DER_OID_SZ_id_sha384 11
|
| 61 |
+
extern const unsigned char ossl_der_oid_id_sha384[DER_OID_SZ_id_sha384];
|
| 62 |
+
|
| 63 |
+
/*
|
| 64 |
+
* id-sha512 OBJECT IDENTIFIER ::= { hashAlgs 3 }
|
| 65 |
+
*/
|
| 66 |
+
#define DER_OID_V_id_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x03
|
| 67 |
+
#define DER_OID_SZ_id_sha512 11
|
| 68 |
+
extern const unsigned char ossl_der_oid_id_sha512[DER_OID_SZ_id_sha512];
|
| 69 |
+
|
| 70 |
+
/*
|
| 71 |
+
* id-sha224 OBJECT IDENTIFIER ::= { hashAlgs 4 }
|
| 72 |
+
*/
|
| 73 |
+
#define DER_OID_V_id_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x04
|
| 74 |
+
#define DER_OID_SZ_id_sha224 11
|
| 75 |
+
extern const unsigned char ossl_der_oid_id_sha224[DER_OID_SZ_id_sha224];
|
| 76 |
+
|
| 77 |
+
/*
|
| 78 |
+
* id-sha512-224 OBJECT IDENTIFIER ::= { hashAlgs 5 }
|
| 79 |
+
*/
|
| 80 |
+
#define DER_OID_V_id_sha512_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x05
|
| 81 |
+
#define DER_OID_SZ_id_sha512_224 11
|
| 82 |
+
extern const unsigned char ossl_der_oid_id_sha512_224[DER_OID_SZ_id_sha512_224];
|
| 83 |
+
|
| 84 |
+
/*
|
| 85 |
+
* id-sha512-256 OBJECT IDENTIFIER ::= { hashAlgs 6 }
|
| 86 |
+
*/
|
| 87 |
+
#define DER_OID_V_id_sha512_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x06
|
| 88 |
+
#define DER_OID_SZ_id_sha512_256 11
|
| 89 |
+
extern const unsigned char ossl_der_oid_id_sha512_256[DER_OID_SZ_id_sha512_256];
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* id-sha3-224 OBJECT IDENTIFIER ::= { hashAlgs 7 }
|
| 93 |
+
*/
|
| 94 |
+
#define DER_OID_V_id_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x07
|
| 95 |
+
#define DER_OID_SZ_id_sha3_224 11
|
| 96 |
+
extern const unsigned char ossl_der_oid_id_sha3_224[DER_OID_SZ_id_sha3_224];
|
| 97 |
+
|
| 98 |
+
/*
|
| 99 |
+
* id-sha3-256 OBJECT IDENTIFIER ::= { hashAlgs 8 }
|
| 100 |
+
*/
|
| 101 |
+
#define DER_OID_V_id_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x08
|
| 102 |
+
#define DER_OID_SZ_id_sha3_256 11
|
| 103 |
+
extern const unsigned char ossl_der_oid_id_sha3_256[DER_OID_SZ_id_sha3_256];
|
| 104 |
+
|
| 105 |
+
/*
|
| 106 |
+
* id-sha3-384 OBJECT IDENTIFIER ::= { hashAlgs 9 }
|
| 107 |
+
*/
|
| 108 |
+
#define DER_OID_V_id_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x09
|
| 109 |
+
#define DER_OID_SZ_id_sha3_384 11
|
| 110 |
+
extern const unsigned char ossl_der_oid_id_sha3_384[DER_OID_SZ_id_sha3_384];
|
| 111 |
+
|
| 112 |
+
/*
|
| 113 |
+
* id-sha3-512 OBJECT IDENTIFIER ::= { hashAlgs 10 }
|
| 114 |
+
*/
|
| 115 |
+
#define DER_OID_V_id_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0A
|
| 116 |
+
#define DER_OID_SZ_id_sha3_512 11
|
| 117 |
+
extern const unsigned char ossl_der_oid_id_sha3_512[DER_OID_SZ_id_sha3_512];
|
| 118 |
+
|
| 119 |
+
/*
|
| 120 |
+
* id-shake128 OBJECT IDENTIFIER ::= { hashAlgs 11 }
|
| 121 |
+
*/
|
| 122 |
+
#define DER_OID_V_id_shake128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0B
|
| 123 |
+
#define DER_OID_SZ_id_shake128 11
|
| 124 |
+
extern const unsigned char ossl_der_oid_id_shake128[DER_OID_SZ_id_shake128];
|
| 125 |
+
|
| 126 |
+
/*
|
| 127 |
+
* id-shake256 OBJECT IDENTIFIER ::= { hashAlgs 12 }
|
| 128 |
+
*/
|
| 129 |
+
#define DER_OID_V_id_shake256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x0C
|
| 130 |
+
#define DER_OID_SZ_id_shake256 11
|
| 131 |
+
extern const unsigned char ossl_der_oid_id_shake256[DER_OID_SZ_id_shake256];
|
| 132 |
+
|
| 133 |
+
/*
|
| 134 |
+
* id-shake128-len OBJECT IDENTIFIER ::= { hashAlgs 17 }
|
| 135 |
+
*/
|
| 136 |
+
#define DER_OID_V_id_shake128_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x11
|
| 137 |
+
#define DER_OID_SZ_id_shake128_len 11
|
| 138 |
+
extern const unsigned char ossl_der_oid_id_shake128_len[DER_OID_SZ_id_shake128_len];
|
| 139 |
+
|
| 140 |
+
/*
|
| 141 |
+
* id-shake256-len OBJECT IDENTIFIER ::= { hashAlgs 18 }
|
| 142 |
+
*/
|
| 143 |
+
#define DER_OID_V_id_shake256_len DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x12
|
| 144 |
+
#define DER_OID_SZ_id_shake256_len 11
|
| 145 |
+
extern const unsigned char ossl_der_oid_id_shake256_len[DER_OID_SZ_id_shake256_len];
|
| 146 |
+
|
| 147 |
+
/*
|
| 148 |
+
* id-KMACWithSHAKE128 OBJECT IDENTIFIER ::={hashAlgs 19}
|
| 149 |
+
*/
|
| 150 |
+
#define DER_OID_V_id_KMACWithSHAKE128 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x13
|
| 151 |
+
#define DER_OID_SZ_id_KMACWithSHAKE128 11
|
| 152 |
+
extern const unsigned char ossl_der_oid_id_KMACWithSHAKE128[DER_OID_SZ_id_KMACWithSHAKE128];
|
| 153 |
+
|
| 154 |
+
/*
|
| 155 |
+
* id-KMACWithSHAKE256 OBJECT IDENTIFIER ::={ hashAlgs 20}
|
| 156 |
+
*/
|
| 157 |
+
#define DER_OID_V_id_KMACWithSHAKE256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x14
|
| 158 |
+
#define DER_OID_SZ_id_KMACWithSHAKE256 11
|
| 159 |
+
extern const unsigned char ossl_der_oid_id_KMACWithSHAKE256[DER_OID_SZ_id_KMACWithSHAKE256];
|
| 160 |
+
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_dsa.h
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_dsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
|
| 15 |
+
/* Well known OIDs precompiled */
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* id-dsa OBJECT IDENTIFIER ::= {
|
| 19 |
+
* iso(1) member-body(2) us(840) x9-57(10040) x9algorithm(4) 1 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_dsa DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x01
|
| 22 |
+
#define DER_OID_SZ_id_dsa 9
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_dsa[DER_OID_SZ_id_dsa];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-dsa-with-sha1 OBJECT IDENTIFIER ::= {
|
| 27 |
+
* iso(1) member-body(2) us(840) x9-57 (10040) x9algorithm(4) 3 }
|
| 28 |
+
*/
|
| 29 |
+
#define DER_OID_V_id_dsa_with_sha1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x38, 0x04, 0x03
|
| 30 |
+
#define DER_OID_SZ_id_dsa_with_sha1 9
|
| 31 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha1[DER_OID_SZ_id_dsa_with_sha1];
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* id-dsa-with-sha224 OBJECT IDENTIFIER ::= { sigAlgs 1 }
|
| 35 |
+
*/
|
| 36 |
+
#define DER_OID_V_id_dsa_with_sha224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x01
|
| 37 |
+
#define DER_OID_SZ_id_dsa_with_sha224 11
|
| 38 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha224[DER_OID_SZ_id_dsa_with_sha224];
|
| 39 |
+
|
| 40 |
+
/*
|
| 41 |
+
* id-dsa-with-sha256 OBJECT IDENTIFIER ::= { sigAlgs 2 }
|
| 42 |
+
*/
|
| 43 |
+
#define DER_OID_V_id_dsa_with_sha256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x02
|
| 44 |
+
#define DER_OID_SZ_id_dsa_with_sha256 11
|
| 45 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha256[DER_OID_SZ_id_dsa_with_sha256];
|
| 46 |
+
|
| 47 |
+
/*
|
| 48 |
+
* id-dsa-with-sha384 OBJECT IDENTIFIER ::= { sigAlgs 3 }
|
| 49 |
+
*/
|
| 50 |
+
#define DER_OID_V_id_dsa_with_sha384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x03
|
| 51 |
+
#define DER_OID_SZ_id_dsa_with_sha384 11
|
| 52 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha384[DER_OID_SZ_id_dsa_with_sha384];
|
| 53 |
+
|
| 54 |
+
/*
|
| 55 |
+
* id-dsa-with-sha512 OBJECT IDENTIFIER ::= { sigAlgs 4 }
|
| 56 |
+
*/
|
| 57 |
+
#define DER_OID_V_id_dsa_with_sha512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x04
|
| 58 |
+
#define DER_OID_SZ_id_dsa_with_sha512 11
|
| 59 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha512[DER_OID_SZ_id_dsa_with_sha512];
|
| 60 |
+
|
| 61 |
+
/*
|
| 62 |
+
* id-dsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 5 }
|
| 63 |
+
*/
|
| 64 |
+
#define DER_OID_V_id_dsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x05
|
| 65 |
+
#define DER_OID_SZ_id_dsa_with_sha3_224 11
|
| 66 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_224[DER_OID_SZ_id_dsa_with_sha3_224];
|
| 67 |
+
|
| 68 |
+
/*
|
| 69 |
+
* id-dsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 6 }
|
| 70 |
+
*/
|
| 71 |
+
#define DER_OID_V_id_dsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x06
|
| 72 |
+
#define DER_OID_SZ_id_dsa_with_sha3_256 11
|
| 73 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_256[DER_OID_SZ_id_dsa_with_sha3_256];
|
| 74 |
+
|
| 75 |
+
/*
|
| 76 |
+
* id-dsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 7 }
|
| 77 |
+
*/
|
| 78 |
+
#define DER_OID_V_id_dsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x07
|
| 79 |
+
#define DER_OID_SZ_id_dsa_with_sha3_384 11
|
| 80 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_384[DER_OID_SZ_id_dsa_with_sha3_384];
|
| 81 |
+
|
| 82 |
+
/*
|
| 83 |
+
* id-dsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 8 }
|
| 84 |
+
*/
|
| 85 |
+
#define DER_OID_V_id_dsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x08
|
| 86 |
+
#define DER_OID_SZ_id_dsa_with_sha3_512 11
|
| 87 |
+
extern const unsigned char ossl_der_oid_id_dsa_with_sha3_512[DER_OID_SZ_id_dsa_with_sha3_512];
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
/* Subject Public Key Info */
|
| 91 |
+
int ossl_DER_w_algorithmIdentifier_DSA(WPACKET *pkt, int tag, DSA *dsa);
|
| 92 |
+
/* Signature */
|
| 93 |
+
int ossl_DER_w_algorithmIdentifier_DSA_with_MD(WPACKET *pkt, int tag,
|
| 94 |
+
DSA *dsa, int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ec.h
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "crypto/ec.h"
|
| 14 |
+
#include "internal/der.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* ecdsa-with-SHA1 OBJECT IDENTIFIER ::= { id-ecSigType 1 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_ecdsa_with_SHA1 DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x01
|
| 22 |
+
#define DER_OID_SZ_ecdsa_with_SHA1 9
|
| 23 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA1[DER_OID_SZ_ecdsa_with_SHA1];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-ecPublicKey OBJECT IDENTIFIER ::= { id-publicKeyType 1 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_ecPublicKey DER_P_OBJECT, 7, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x02, 0x01
|
| 29 |
+
#define DER_OID_SZ_id_ecPublicKey 9
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_ecPublicKey[DER_OID_SZ_id_ecPublicKey];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* c2pnb163v1 OBJECT IDENTIFIER ::= { c-TwoCurve 1 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_c2pnb163v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x01
|
| 36 |
+
#define DER_OID_SZ_c2pnb163v1 10
|
| 37 |
+
extern const unsigned char ossl_der_oid_c2pnb163v1[DER_OID_SZ_c2pnb163v1];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* c2pnb163v2 OBJECT IDENTIFIER ::= { c-TwoCurve 2 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_c2pnb163v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x02
|
| 43 |
+
#define DER_OID_SZ_c2pnb163v2 10
|
| 44 |
+
extern const unsigned char ossl_der_oid_c2pnb163v2[DER_OID_SZ_c2pnb163v2];
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* c2pnb163v3 OBJECT IDENTIFIER ::= { c-TwoCurve 3 }
|
| 48 |
+
*/
|
| 49 |
+
#define DER_OID_V_c2pnb163v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x03
|
| 50 |
+
#define DER_OID_SZ_c2pnb163v3 10
|
| 51 |
+
extern const unsigned char ossl_der_oid_c2pnb163v3[DER_OID_SZ_c2pnb163v3];
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* c2pnb176w1 OBJECT IDENTIFIER ::= { c-TwoCurve 4 }
|
| 55 |
+
*/
|
| 56 |
+
#define DER_OID_V_c2pnb176w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x04
|
| 57 |
+
#define DER_OID_SZ_c2pnb176w1 10
|
| 58 |
+
extern const unsigned char ossl_der_oid_c2pnb176w1[DER_OID_SZ_c2pnb176w1];
|
| 59 |
+
|
| 60 |
+
/*
|
| 61 |
+
* c2tnb191v1 OBJECT IDENTIFIER ::= { c-TwoCurve 5 }
|
| 62 |
+
*/
|
| 63 |
+
#define DER_OID_V_c2tnb191v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x05
|
| 64 |
+
#define DER_OID_SZ_c2tnb191v1 10
|
| 65 |
+
extern const unsigned char ossl_der_oid_c2tnb191v1[DER_OID_SZ_c2tnb191v1];
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* c2tnb191v2 OBJECT IDENTIFIER ::= { c-TwoCurve 6 }
|
| 69 |
+
*/
|
| 70 |
+
#define DER_OID_V_c2tnb191v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x06
|
| 71 |
+
#define DER_OID_SZ_c2tnb191v2 10
|
| 72 |
+
extern const unsigned char ossl_der_oid_c2tnb191v2[DER_OID_SZ_c2tnb191v2];
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* c2tnb191v3 OBJECT IDENTIFIER ::= { c-TwoCurve 7 }
|
| 76 |
+
*/
|
| 77 |
+
#define DER_OID_V_c2tnb191v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x07
|
| 78 |
+
#define DER_OID_SZ_c2tnb191v3 10
|
| 79 |
+
extern const unsigned char ossl_der_oid_c2tnb191v3[DER_OID_SZ_c2tnb191v3];
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* c2onb191v4 OBJECT IDENTIFIER ::= { c-TwoCurve 8 }
|
| 83 |
+
*/
|
| 84 |
+
#define DER_OID_V_c2onb191v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x08
|
| 85 |
+
#define DER_OID_SZ_c2onb191v4 10
|
| 86 |
+
extern const unsigned char ossl_der_oid_c2onb191v4[DER_OID_SZ_c2onb191v4];
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* c2onb191v5 OBJECT IDENTIFIER ::= { c-TwoCurve 9 }
|
| 90 |
+
*/
|
| 91 |
+
#define DER_OID_V_c2onb191v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x09
|
| 92 |
+
#define DER_OID_SZ_c2onb191v5 10
|
| 93 |
+
extern const unsigned char ossl_der_oid_c2onb191v5[DER_OID_SZ_c2onb191v5];
|
| 94 |
+
|
| 95 |
+
/*
|
| 96 |
+
* c2pnb208w1 OBJECT IDENTIFIER ::= { c-TwoCurve 10 }
|
| 97 |
+
*/
|
| 98 |
+
#define DER_OID_V_c2pnb208w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0A
|
| 99 |
+
#define DER_OID_SZ_c2pnb208w1 10
|
| 100 |
+
extern const unsigned char ossl_der_oid_c2pnb208w1[DER_OID_SZ_c2pnb208w1];
|
| 101 |
+
|
| 102 |
+
/*
|
| 103 |
+
* c2tnb239v1 OBJECT IDENTIFIER ::= { c-TwoCurve 11 }
|
| 104 |
+
*/
|
| 105 |
+
#define DER_OID_V_c2tnb239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0B
|
| 106 |
+
#define DER_OID_SZ_c2tnb239v1 10
|
| 107 |
+
extern const unsigned char ossl_der_oid_c2tnb239v1[DER_OID_SZ_c2tnb239v1];
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* c2tnb239v2 OBJECT IDENTIFIER ::= { c-TwoCurve 12 }
|
| 111 |
+
*/
|
| 112 |
+
#define DER_OID_V_c2tnb239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0C
|
| 113 |
+
#define DER_OID_SZ_c2tnb239v2 10
|
| 114 |
+
extern const unsigned char ossl_der_oid_c2tnb239v2[DER_OID_SZ_c2tnb239v2];
|
| 115 |
+
|
| 116 |
+
/*
|
| 117 |
+
* c2tnb239v3 OBJECT IDENTIFIER ::= { c-TwoCurve 13 }
|
| 118 |
+
*/
|
| 119 |
+
#define DER_OID_V_c2tnb239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0D
|
| 120 |
+
#define DER_OID_SZ_c2tnb239v3 10
|
| 121 |
+
extern const unsigned char ossl_der_oid_c2tnb239v3[DER_OID_SZ_c2tnb239v3];
|
| 122 |
+
|
| 123 |
+
/*
|
| 124 |
+
* c2onb239v4 OBJECT IDENTIFIER ::= { c-TwoCurve 14 }
|
| 125 |
+
*/
|
| 126 |
+
#define DER_OID_V_c2onb239v4 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0E
|
| 127 |
+
#define DER_OID_SZ_c2onb239v4 10
|
| 128 |
+
extern const unsigned char ossl_der_oid_c2onb239v4[DER_OID_SZ_c2onb239v4];
|
| 129 |
+
|
| 130 |
+
/*
|
| 131 |
+
* c2onb239v5 OBJECT IDENTIFIER ::= { c-TwoCurve 15 }
|
| 132 |
+
*/
|
| 133 |
+
#define DER_OID_V_c2onb239v5 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x0F
|
| 134 |
+
#define DER_OID_SZ_c2onb239v5 10
|
| 135 |
+
extern const unsigned char ossl_der_oid_c2onb239v5[DER_OID_SZ_c2onb239v5];
|
| 136 |
+
|
| 137 |
+
/*
|
| 138 |
+
* c2pnb272w1 OBJECT IDENTIFIER ::= { c-TwoCurve 16 }
|
| 139 |
+
*/
|
| 140 |
+
#define DER_OID_V_c2pnb272w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x10
|
| 141 |
+
#define DER_OID_SZ_c2pnb272w1 10
|
| 142 |
+
extern const unsigned char ossl_der_oid_c2pnb272w1[DER_OID_SZ_c2pnb272w1];
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* c2pnb304w1 OBJECT IDENTIFIER ::= { c-TwoCurve 17 }
|
| 146 |
+
*/
|
| 147 |
+
#define DER_OID_V_c2pnb304w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x11
|
| 148 |
+
#define DER_OID_SZ_c2pnb304w1 10
|
| 149 |
+
extern const unsigned char ossl_der_oid_c2pnb304w1[DER_OID_SZ_c2pnb304w1];
|
| 150 |
+
|
| 151 |
+
/*
|
| 152 |
+
* c2tnb359v1 OBJECT IDENTIFIER ::= { c-TwoCurve 18 }
|
| 153 |
+
*/
|
| 154 |
+
#define DER_OID_V_c2tnb359v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x12
|
| 155 |
+
#define DER_OID_SZ_c2tnb359v1 10
|
| 156 |
+
extern const unsigned char ossl_der_oid_c2tnb359v1[DER_OID_SZ_c2tnb359v1];
|
| 157 |
+
|
| 158 |
+
/*
|
| 159 |
+
* c2pnb368w1 OBJECT IDENTIFIER ::= { c-TwoCurve 19 }
|
| 160 |
+
*/
|
| 161 |
+
#define DER_OID_V_c2pnb368w1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x13
|
| 162 |
+
#define DER_OID_SZ_c2pnb368w1 10
|
| 163 |
+
extern const unsigned char ossl_der_oid_c2pnb368w1[DER_OID_SZ_c2pnb368w1];
|
| 164 |
+
|
| 165 |
+
/*
|
| 166 |
+
* c2tnb431r1 OBJECT IDENTIFIER ::= { c-TwoCurve 20 }
|
| 167 |
+
*/
|
| 168 |
+
#define DER_OID_V_c2tnb431r1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x00, 0x14
|
| 169 |
+
#define DER_OID_SZ_c2tnb431r1 10
|
| 170 |
+
extern const unsigned char ossl_der_oid_c2tnb431r1[DER_OID_SZ_c2tnb431r1];
|
| 171 |
+
|
| 172 |
+
/*
|
| 173 |
+
* prime192v1 OBJECT IDENTIFIER ::= { primeCurve 1 }
|
| 174 |
+
*/
|
| 175 |
+
#define DER_OID_V_prime192v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x01
|
| 176 |
+
#define DER_OID_SZ_prime192v1 10
|
| 177 |
+
extern const unsigned char ossl_der_oid_prime192v1[DER_OID_SZ_prime192v1];
|
| 178 |
+
|
| 179 |
+
/*
|
| 180 |
+
* prime192v2 OBJECT IDENTIFIER ::= { primeCurve 2 }
|
| 181 |
+
*/
|
| 182 |
+
#define DER_OID_V_prime192v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x02
|
| 183 |
+
#define DER_OID_SZ_prime192v2 10
|
| 184 |
+
extern const unsigned char ossl_der_oid_prime192v2[DER_OID_SZ_prime192v2];
|
| 185 |
+
|
| 186 |
+
/*
|
| 187 |
+
* prime192v3 OBJECT IDENTIFIER ::= { primeCurve 3 }
|
| 188 |
+
*/
|
| 189 |
+
#define DER_OID_V_prime192v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x03
|
| 190 |
+
#define DER_OID_SZ_prime192v3 10
|
| 191 |
+
extern const unsigned char ossl_der_oid_prime192v3[DER_OID_SZ_prime192v3];
|
| 192 |
+
|
| 193 |
+
/*
|
| 194 |
+
* prime239v1 OBJECT IDENTIFIER ::= { primeCurve 4 }
|
| 195 |
+
*/
|
| 196 |
+
#define DER_OID_V_prime239v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x04
|
| 197 |
+
#define DER_OID_SZ_prime239v1 10
|
| 198 |
+
extern const unsigned char ossl_der_oid_prime239v1[DER_OID_SZ_prime239v1];
|
| 199 |
+
|
| 200 |
+
/*
|
| 201 |
+
* prime239v2 OBJECT IDENTIFIER ::= { primeCurve 5 }
|
| 202 |
+
*/
|
| 203 |
+
#define DER_OID_V_prime239v2 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x05
|
| 204 |
+
#define DER_OID_SZ_prime239v2 10
|
| 205 |
+
extern const unsigned char ossl_der_oid_prime239v2[DER_OID_SZ_prime239v2];
|
| 206 |
+
|
| 207 |
+
/*
|
| 208 |
+
* prime239v3 OBJECT IDENTIFIER ::= { primeCurve 6 }
|
| 209 |
+
*/
|
| 210 |
+
#define DER_OID_V_prime239v3 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x06
|
| 211 |
+
#define DER_OID_SZ_prime239v3 10
|
| 212 |
+
extern const unsigned char ossl_der_oid_prime239v3[DER_OID_SZ_prime239v3];
|
| 213 |
+
|
| 214 |
+
/*
|
| 215 |
+
* prime256v1 OBJECT IDENTIFIER ::= { primeCurve 7 }
|
| 216 |
+
*/
|
| 217 |
+
#define DER_OID_V_prime256v1 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x03, 0x01, 0x07
|
| 218 |
+
#define DER_OID_SZ_prime256v1 10
|
| 219 |
+
extern const unsigned char ossl_der_oid_prime256v1[DER_OID_SZ_prime256v1];
|
| 220 |
+
|
| 221 |
+
/*
|
| 222 |
+
* ecdsa-with-SHA224 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 223 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 1 }
|
| 224 |
+
*/
|
| 225 |
+
#define DER_OID_V_ecdsa_with_SHA224 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x01
|
| 226 |
+
#define DER_OID_SZ_ecdsa_with_SHA224 10
|
| 227 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA224[DER_OID_SZ_ecdsa_with_SHA224];
|
| 228 |
+
|
| 229 |
+
/*
|
| 230 |
+
* ecdsa-with-SHA256 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 231 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 2 }
|
| 232 |
+
*/
|
| 233 |
+
#define DER_OID_V_ecdsa_with_SHA256 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x02
|
| 234 |
+
#define DER_OID_SZ_ecdsa_with_SHA256 10
|
| 235 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA256[DER_OID_SZ_ecdsa_with_SHA256];
|
| 236 |
+
|
| 237 |
+
/*
|
| 238 |
+
* ecdsa-with-SHA384 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 239 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 3 }
|
| 240 |
+
*/
|
| 241 |
+
#define DER_OID_V_ecdsa_with_SHA384 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x03
|
| 242 |
+
#define DER_OID_SZ_ecdsa_with_SHA384 10
|
| 243 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA384[DER_OID_SZ_ecdsa_with_SHA384];
|
| 244 |
+
|
| 245 |
+
/*
|
| 246 |
+
* ecdsa-with-SHA512 OBJECT IDENTIFIER ::= { iso(1) member-body(2)
|
| 247 |
+
* us(840) ansi-X9-62(10045) signatures(4) ecdsa-with-SHA2(3) 4 }
|
| 248 |
+
*/
|
| 249 |
+
#define DER_OID_V_ecdsa_with_SHA512 DER_P_OBJECT, 8, 0x2A, 0x86, 0x48, 0xCE, 0x3D, 0x04, 0x03, 0x04
|
| 250 |
+
#define DER_OID_SZ_ecdsa_with_SHA512 10
|
| 251 |
+
extern const unsigned char ossl_der_oid_ecdsa_with_SHA512[DER_OID_SZ_ecdsa_with_SHA512];
|
| 252 |
+
|
| 253 |
+
/*
|
| 254 |
+
* id-ecdsa-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 9 }
|
| 255 |
+
*/
|
| 256 |
+
#define DER_OID_V_id_ecdsa_with_sha3_224 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x09
|
| 257 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_224 11
|
| 258 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_224[DER_OID_SZ_id_ecdsa_with_sha3_224];
|
| 259 |
+
|
| 260 |
+
/*
|
| 261 |
+
* id-ecdsa-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 10 }
|
| 262 |
+
*/
|
| 263 |
+
#define DER_OID_V_id_ecdsa_with_sha3_256 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0A
|
| 264 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_256 11
|
| 265 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_256[DER_OID_SZ_id_ecdsa_with_sha3_256];
|
| 266 |
+
|
| 267 |
+
/*
|
| 268 |
+
* id-ecdsa-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 11 }
|
| 269 |
+
*/
|
| 270 |
+
#define DER_OID_V_id_ecdsa_with_sha3_384 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0B
|
| 271 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_384 11
|
| 272 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_384[DER_OID_SZ_id_ecdsa_with_sha3_384];
|
| 273 |
+
|
| 274 |
+
/*
|
| 275 |
+
* id-ecdsa-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 12 }
|
| 276 |
+
*/
|
| 277 |
+
#define DER_OID_V_id_ecdsa_with_sha3_512 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x0C
|
| 278 |
+
#define DER_OID_SZ_id_ecdsa_with_sha3_512 11
|
| 279 |
+
extern const unsigned char ossl_der_oid_id_ecdsa_with_sha3_512[DER_OID_SZ_id_ecdsa_with_sha3_512];
|
| 280 |
+
|
| 281 |
+
|
| 282 |
+
/* Subject Public Key Info */
|
| 283 |
+
int ossl_DER_w_algorithmIdentifier_EC(WPACKET *pkt, int cont, EC_KEY *ec);
|
| 284 |
+
/* Signature */
|
| 285 |
+
int ossl_DER_w_algorithmIdentifier_ECDSA_with_MD(WPACKET *pkt, int cont,
|
| 286 |
+
EC_KEY *ec, int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ecx.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_ecx.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
#include "crypto/ecx.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* id-X25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 110 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_X25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6E
|
| 22 |
+
#define DER_OID_SZ_id_X25519 5
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_X25519[DER_OID_SZ_id_X25519];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-X448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 111 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_X448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x6F
|
| 29 |
+
#define DER_OID_SZ_id_X448 5
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_X448[DER_OID_SZ_id_X448];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-Ed25519 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 112 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_Ed25519 DER_P_OBJECT, 3, 0x2B, 0x65, 0x70
|
| 36 |
+
#define DER_OID_SZ_id_Ed25519 5
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_Ed25519[DER_OID_SZ_id_Ed25519];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* id-Ed448 OBJECT IDENTIFIER ::= { id-edwards-curve-algs 113 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_id_Ed448 DER_P_OBJECT, 3, 0x2B, 0x65, 0x71
|
| 43 |
+
#define DER_OID_SZ_id_Ed448 5
|
| 44 |
+
extern const unsigned char ossl_der_oid_id_Ed448[DER_OID_SZ_id_Ed448];
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
int ossl_DER_w_algorithmIdentifier_ED25519(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 48 |
+
int ossl_DER_w_algorithmIdentifier_ED448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 49 |
+
int ossl_DER_w_algorithmIdentifier_X25519(WPACKET *pkt, int cont, ECX_KEY *ec);
|
| 50 |
+
int ossl_DER_w_algorithmIdentifier_X448(WPACKET *pkt, int cont, ECX_KEY *ec);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_ml_dsa.h
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_ml_dsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
#include "crypto/ml_dsa.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* id-ml-dsa-44 OBJECT IDENTIFIER ::= { sigAlgs 17 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_ml_dsa_44 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x11
|
| 22 |
+
#define DER_OID_SZ_id_ml_dsa_44 11
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_44[DER_OID_SZ_id_ml_dsa_44];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-ml-dsa-65 OBJECT IDENTIFIER ::= { sigAlgs 18 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_ml_dsa_65 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x12
|
| 29 |
+
#define DER_OID_SZ_id_ml_dsa_65 11
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_65[DER_OID_SZ_id_ml_dsa_65];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-ml-dsa-87 OBJECT IDENTIFIER ::= { sigAlgs 19 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_ml_dsa_87 DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x13
|
| 36 |
+
#define DER_OID_SZ_id_ml_dsa_87 11
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_ml_dsa_87[DER_OID_SZ_id_ml_dsa_87];
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
int ossl_DER_w_algorithmIdentifier_ML_DSA(WPACKET *pkt, int tag, ML_DSA_KEY *key);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_rsa.h
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_rsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "crypto/rsa.h"
|
| 14 |
+
#include "internal/der.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* hashAlgs OBJECT IDENTIFIER ::= { nistAlgorithms 2 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_hashAlgs DER_P_OBJECT, 8, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02
|
| 22 |
+
#define DER_OID_SZ_hashAlgs 10
|
| 23 |
+
extern const unsigned char ossl_der_oid_hashAlgs[DER_OID_SZ_hashAlgs];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* rsaEncryption OBJECT IDENTIFIER ::= { pkcs-1 1 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_rsaEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01
|
| 29 |
+
#define DER_OID_SZ_rsaEncryption 11
|
| 30 |
+
extern const unsigned char ossl_der_oid_rsaEncryption[DER_OID_SZ_rsaEncryption];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-RSAES-OAEP OBJECT IDENTIFIER ::= { pkcs-1 7 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_RSAES_OAEP DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x07
|
| 36 |
+
#define DER_OID_SZ_id_RSAES_OAEP 11
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_RSAES_OAEP[DER_OID_SZ_id_RSAES_OAEP];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* id-pSpecified OBJECT IDENTIFIER ::= { pkcs-1 9 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_id_pSpecified DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x09
|
| 43 |
+
#define DER_OID_SZ_id_pSpecified 11
|
| 44 |
+
extern const unsigned char ossl_der_oid_id_pSpecified[DER_OID_SZ_id_pSpecified];
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* id-RSASSA-PSS OBJECT IDENTIFIER ::= { pkcs-1 10 }
|
| 48 |
+
*/
|
| 49 |
+
#define DER_OID_V_id_RSASSA_PSS DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0A
|
| 50 |
+
#define DER_OID_SZ_id_RSASSA_PSS 11
|
| 51 |
+
extern const unsigned char ossl_der_oid_id_RSASSA_PSS[DER_OID_SZ_id_RSASSA_PSS];
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* md2WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 2 }
|
| 55 |
+
*/
|
| 56 |
+
#define DER_OID_V_md2WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x02
|
| 57 |
+
#define DER_OID_SZ_md2WithRSAEncryption 11
|
| 58 |
+
extern const unsigned char ossl_der_oid_md2WithRSAEncryption[DER_OID_SZ_md2WithRSAEncryption];
|
| 59 |
+
|
| 60 |
+
/*
|
| 61 |
+
* md5WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 4 }
|
| 62 |
+
*/
|
| 63 |
+
#define DER_OID_V_md5WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x04
|
| 64 |
+
#define DER_OID_SZ_md5WithRSAEncryption 11
|
| 65 |
+
extern const unsigned char ossl_der_oid_md5WithRSAEncryption[DER_OID_SZ_md5WithRSAEncryption];
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* sha1WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 5 }
|
| 69 |
+
*/
|
| 70 |
+
#define DER_OID_V_sha1WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05
|
| 71 |
+
#define DER_OID_SZ_sha1WithRSAEncryption 11
|
| 72 |
+
extern const unsigned char ossl_der_oid_sha1WithRSAEncryption[DER_OID_SZ_sha1WithRSAEncryption];
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* sha224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 14 }
|
| 76 |
+
*/
|
| 77 |
+
#define DER_OID_V_sha224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0E
|
| 78 |
+
#define DER_OID_SZ_sha224WithRSAEncryption 11
|
| 79 |
+
extern const unsigned char ossl_der_oid_sha224WithRSAEncryption[DER_OID_SZ_sha224WithRSAEncryption];
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* sha256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 11 }
|
| 83 |
+
*/
|
| 84 |
+
#define DER_OID_V_sha256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B
|
| 85 |
+
#define DER_OID_SZ_sha256WithRSAEncryption 11
|
| 86 |
+
extern const unsigned char ossl_der_oid_sha256WithRSAEncryption[DER_OID_SZ_sha256WithRSAEncryption];
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* sha384WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 12 }
|
| 90 |
+
*/
|
| 91 |
+
#define DER_OID_V_sha384WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0C
|
| 92 |
+
#define DER_OID_SZ_sha384WithRSAEncryption 11
|
| 93 |
+
extern const unsigned char ossl_der_oid_sha384WithRSAEncryption[DER_OID_SZ_sha384WithRSAEncryption];
|
| 94 |
+
|
| 95 |
+
/*
|
| 96 |
+
* sha512WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 13 }
|
| 97 |
+
*/
|
| 98 |
+
#define DER_OID_V_sha512WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0D
|
| 99 |
+
#define DER_OID_SZ_sha512WithRSAEncryption 11
|
| 100 |
+
extern const unsigned char ossl_der_oid_sha512WithRSAEncryption[DER_OID_SZ_sha512WithRSAEncryption];
|
| 101 |
+
|
| 102 |
+
/*
|
| 103 |
+
* sha512-224WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 15 }
|
| 104 |
+
*/
|
| 105 |
+
#define DER_OID_V_sha512_224WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0F
|
| 106 |
+
#define DER_OID_SZ_sha512_224WithRSAEncryption 11
|
| 107 |
+
extern const unsigned char ossl_der_oid_sha512_224WithRSAEncryption[DER_OID_SZ_sha512_224WithRSAEncryption];
|
| 108 |
+
|
| 109 |
+
/*
|
| 110 |
+
* sha512-256WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 16 }
|
| 111 |
+
*/
|
| 112 |
+
#define DER_OID_V_sha512_256WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x10
|
| 113 |
+
#define DER_OID_SZ_sha512_256WithRSAEncryption 11
|
| 114 |
+
extern const unsigned char ossl_der_oid_sha512_256WithRSAEncryption[DER_OID_SZ_sha512_256WithRSAEncryption];
|
| 115 |
+
|
| 116 |
+
/*
|
| 117 |
+
* id-mgf1 OBJECT IDENTIFIER ::= { pkcs-1 8 }
|
| 118 |
+
*/
|
| 119 |
+
#define DER_OID_V_id_mgf1 DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x08
|
| 120 |
+
#define DER_OID_SZ_id_mgf1 11
|
| 121 |
+
extern const unsigned char ossl_der_oid_id_mgf1[DER_OID_SZ_id_mgf1];
|
| 122 |
+
|
| 123 |
+
/*
|
| 124 |
+
* id-rsassa-pkcs1-v1_5-with-sha3-224 OBJECT IDENTIFIER ::= { sigAlgs 13 }
|
| 125 |
+
*/
|
| 126 |
+
#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
|
| 127 |
+
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_224 11
|
| 128 |
+
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];
|
| 129 |
+
|
| 130 |
+
/*
|
| 131 |
+
* id-rsassa-pkcs1-v1_5-with-sha3-256 OBJECT IDENTIFIER ::= { sigAlgs 14 }
|
| 132 |
+
*/
|
| 133 |
+
#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
|
| 134 |
+
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_256 11
|
| 135 |
+
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];
|
| 136 |
+
|
| 137 |
+
/*
|
| 138 |
+
* id-rsassa-pkcs1-v1_5-with-sha3-384 OBJECT IDENTIFIER ::= { sigAlgs 15 }
|
| 139 |
+
*/
|
| 140 |
+
#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
|
| 141 |
+
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_384 11
|
| 142 |
+
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];
|
| 143 |
+
|
| 144 |
+
/*
|
| 145 |
+
* id-rsassa-pkcs1-v1_5-with-sha3-512 OBJECT IDENTIFIER ::= { sigAlgs 16 }
|
| 146 |
+
*/
|
| 147 |
+
#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
|
| 148 |
+
#define DER_OID_SZ_id_rsassa_pkcs1_v1_5_with_sha3_512 11
|
| 149 |
+
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];
|
| 150 |
+
|
| 151 |
+
/*
|
| 152 |
+
* md4WithRSAEncryption OBJECT IDENTIFIER ::= { pkcs-1 3 }
|
| 153 |
+
*/
|
| 154 |
+
#define DER_OID_V_md4WithRSAEncryption DER_P_OBJECT, 9, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x03
|
| 155 |
+
#define DER_OID_SZ_md4WithRSAEncryption 11
|
| 156 |
+
extern const unsigned char ossl_der_oid_md4WithRSAEncryption[DER_OID_SZ_md4WithRSAEncryption];
|
| 157 |
+
|
| 158 |
+
/*
|
| 159 |
+
* ripemd160WithRSAEncryption OBJECT IDENTIFIER ::= {
|
| 160 |
+
* iso(1) identified-organization(3) teletrust(36) algorithm(3) signatureAlgorithm(3) rsaSignature(1) 2
|
| 161 |
+
* }
|
| 162 |
+
*/
|
| 163 |
+
#define DER_OID_V_ripemd160WithRSAEncryption DER_P_OBJECT, 6, 0x2B, 0x24, 0x03, 0x03, 0x01, 0x02
|
| 164 |
+
#define DER_OID_SZ_ripemd160WithRSAEncryption 8
|
| 165 |
+
extern const unsigned char ossl_der_oid_ripemd160WithRSAEncryption[DER_OID_SZ_ripemd160WithRSAEncryption];
|
| 166 |
+
|
| 167 |
+
/*
|
| 168 |
+
* mdc2WithRSASignature OBJECT IDENTIFIER ::= {
|
| 169 |
+
* iso(1) identified-organization(3) oiw(14) secsig(3) algorithms(2) mdc2WithRSASignature(14)
|
| 170 |
+
* }
|
| 171 |
+
*/
|
| 172 |
+
#define DER_OID_V_mdc2WithRSASignature DER_P_OBJECT, 5, 0x2B, 0x0E, 0x03, 0x02, 0x0E
|
| 173 |
+
#define DER_OID_SZ_mdc2WithRSASignature 7
|
| 174 |
+
extern const unsigned char ossl_der_oid_mdc2WithRSASignature[DER_OID_SZ_mdc2WithRSASignature];
|
| 175 |
+
|
| 176 |
+
|
| 177 |
+
/* PSS parameters */
|
| 178 |
+
int ossl_DER_w_RSASSA_PSS_params(WPACKET *pkt, int tag,
|
| 179 |
+
const RSA_PSS_PARAMS_30 *pss);
|
| 180 |
+
/* Subject Public Key Info */
|
| 181 |
+
int ossl_DER_w_algorithmIdentifier_RSA(WPACKET *pkt, int tag, RSA *rsa);
|
| 182 |
+
int ossl_DER_w_algorithmIdentifier_RSA_PSS(WPACKET *pkt, int tag,
|
| 183 |
+
int rsa_type,
|
| 184 |
+
const RSA_PSS_PARAMS_30 *pss);
|
| 185 |
+
/* Signature */
|
| 186 |
+
int ossl_DER_w_algorithmIdentifier_MDWithRSAEncryption(WPACKET *pkt, int tag,
|
| 187 |
+
int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_slh_dsa.h
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_slh_dsa.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
#include "crypto/slh_dsa.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* id-slh-dsa-sha2-128s OBJECT IDENTIFIER ::= { sigAlgs 20 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_id_slh_dsa_sha2_128s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x14
|
| 22 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_128s 11
|
| 23 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_128s[DER_OID_SZ_id_slh_dsa_sha2_128s];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* id-slh-dsa-sha2-128f OBJECT IDENTIFIER ::= { sigAlgs 21 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_id_slh_dsa_sha2_128f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x15
|
| 29 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_128f 11
|
| 30 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_128f[DER_OID_SZ_id_slh_dsa_sha2_128f];
|
| 31 |
+
|
| 32 |
+
/*
|
| 33 |
+
* id-slh-dsa-sha2-192s OBJECT IDENTIFIER ::= { sigAlgs 22 }
|
| 34 |
+
*/
|
| 35 |
+
#define DER_OID_V_id_slh_dsa_sha2_192s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x16
|
| 36 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_192s 11
|
| 37 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_192s[DER_OID_SZ_id_slh_dsa_sha2_192s];
|
| 38 |
+
|
| 39 |
+
/*
|
| 40 |
+
* id-slh-dsa-sha2-192f OBJECT IDENTIFIER ::= { sigAlgs 23 }
|
| 41 |
+
*/
|
| 42 |
+
#define DER_OID_V_id_slh_dsa_sha2_192f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x17
|
| 43 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_192f 11
|
| 44 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_192f[DER_OID_SZ_id_slh_dsa_sha2_192f];
|
| 45 |
+
|
| 46 |
+
/*
|
| 47 |
+
* id-slh-dsa-sha2-256s OBJECT IDENTIFIER ::= { sigAlgs 24 }
|
| 48 |
+
*/
|
| 49 |
+
#define DER_OID_V_id_slh_dsa_sha2_256s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x18
|
| 50 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_256s 11
|
| 51 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_256s[DER_OID_SZ_id_slh_dsa_sha2_256s];
|
| 52 |
+
|
| 53 |
+
/*
|
| 54 |
+
* id-slh-dsa-sha2-256f OBJECT IDENTIFIER ::= { sigAlgs 25 }
|
| 55 |
+
*/
|
| 56 |
+
#define DER_OID_V_id_slh_dsa_sha2_256f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x19
|
| 57 |
+
#define DER_OID_SZ_id_slh_dsa_sha2_256f 11
|
| 58 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_sha2_256f[DER_OID_SZ_id_slh_dsa_sha2_256f];
|
| 59 |
+
|
| 60 |
+
/*
|
| 61 |
+
* id-slh-dsa-shake-128s OBJECT IDENTIFIER ::= { sigAlgs 26 }
|
| 62 |
+
*/
|
| 63 |
+
#define DER_OID_V_id_slh_dsa_shake_128s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1A
|
| 64 |
+
#define DER_OID_SZ_id_slh_dsa_shake_128s 11
|
| 65 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_128s[DER_OID_SZ_id_slh_dsa_shake_128s];
|
| 66 |
+
|
| 67 |
+
/*
|
| 68 |
+
* id-slh-dsa-shake-128f OBJECT IDENTIFIER ::= { sigAlgs 27 }
|
| 69 |
+
*/
|
| 70 |
+
#define DER_OID_V_id_slh_dsa_shake_128f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1B
|
| 71 |
+
#define DER_OID_SZ_id_slh_dsa_shake_128f 11
|
| 72 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_128f[DER_OID_SZ_id_slh_dsa_shake_128f];
|
| 73 |
+
|
| 74 |
+
/*
|
| 75 |
+
* id-slh-dsa-shake-192s OBJECT IDENTIFIER ::= { sigAlgs 28 }
|
| 76 |
+
*/
|
| 77 |
+
#define DER_OID_V_id_slh_dsa_shake_192s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1C
|
| 78 |
+
#define DER_OID_SZ_id_slh_dsa_shake_192s 11
|
| 79 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_192s[DER_OID_SZ_id_slh_dsa_shake_192s];
|
| 80 |
+
|
| 81 |
+
/*
|
| 82 |
+
* id-slh-dsa-shake-192f OBJECT IDENTIFIER ::= { sigAlgs 29 }
|
| 83 |
+
*/
|
| 84 |
+
#define DER_OID_V_id_slh_dsa_shake_192f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1D
|
| 85 |
+
#define DER_OID_SZ_id_slh_dsa_shake_192f 11
|
| 86 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_192f[DER_OID_SZ_id_slh_dsa_shake_192f];
|
| 87 |
+
|
| 88 |
+
/*
|
| 89 |
+
* id-slh-dsa-shake-256s OBJECT IDENTIFIER ::= { sigAlgs 30 }
|
| 90 |
+
*/
|
| 91 |
+
#define DER_OID_V_id_slh_dsa_shake_256s DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1E
|
| 92 |
+
#define DER_OID_SZ_id_slh_dsa_shake_256s 11
|
| 93 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_256s[DER_OID_SZ_id_slh_dsa_shake_256s];
|
| 94 |
+
|
| 95 |
+
/*
|
| 96 |
+
* id-slh-dsa-shake-256f OBJECT IDENTIFIER ::= { sigAlgs 31 }
|
| 97 |
+
*/
|
| 98 |
+
#define DER_OID_V_id_slh_dsa_shake_256f DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x03, 0x1F
|
| 99 |
+
#define DER_OID_SZ_id_slh_dsa_shake_256f 11
|
| 100 |
+
extern const unsigned char ossl_der_oid_id_slh_dsa_shake_256f[DER_OID_SZ_id_slh_dsa_shake_256f];
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
int ossl_DER_w_algorithmIdentifier_SLH_DSA(WPACKET *pkt, int tag, SLH_DSA_KEY *key);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_sm2.h
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_sm2.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "crypto/ec.h"
|
| 14 |
+
#include "internal/der.h"
|
| 15 |
+
|
| 16 |
+
/* Well known OIDs precompiled */
|
| 17 |
+
|
| 18 |
+
/*
|
| 19 |
+
* sm2-with-SM3 OBJECT IDENTIFIER ::= { sm-scheme 501 }
|
| 20 |
+
*/
|
| 21 |
+
#define DER_OID_V_sm2_with_SM3 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x83, 0x75
|
| 22 |
+
#define DER_OID_SZ_sm2_with_SM3 10
|
| 23 |
+
extern const unsigned char ossl_der_oid_sm2_with_SM3[DER_OID_SZ_sm2_with_SM3];
|
| 24 |
+
|
| 25 |
+
/*
|
| 26 |
+
* curveSM2 OBJECT IDENTIFIER ::= { sm-scheme 301 }
|
| 27 |
+
*/
|
| 28 |
+
#define DER_OID_V_curveSM2 DER_P_OBJECT, 8, 0x2A, 0x81, 0x1C, 0xCF, 0x55, 0x01, 0x82, 0x2D
|
| 29 |
+
#define DER_OID_SZ_curveSM2 10
|
| 30 |
+
extern const unsigned char ossl_der_oid_curveSM2[DER_OID_SZ_curveSM2];
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
/* Subject Public Key Info */
|
| 34 |
+
int ossl_DER_w_algorithmIdentifier_SM2(WPACKET *pkt, int cont, EC_KEY *ec);
|
| 35 |
+
/* Signature */
|
| 36 |
+
int ossl_DER_w_algorithmIdentifier_SM2_with_MD(WPACKET *pkt, int cont,
|
| 37 |
+
EC_KEY *ec, int mdnid);
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/asm/providers/common/include/prov/der_wrap.h
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from providers/common/include/prov/der_wrap.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#include "internal/der.h"
|
| 14 |
+
|
| 15 |
+
/* Well known OIDs precompiled */
|
| 16 |
+
|
| 17 |
+
/*
|
| 18 |
+
* id-alg-CMS3DESwrap OBJECT IDENTIFIER ::= {
|
| 19 |
+
* iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1) pkcs-9(9) smime(16) alg(3) 6
|
| 20 |
+
* }
|
| 21 |
+
*/
|
| 22 |
+
#define DER_OID_V_id_alg_CMS3DESwrap DER_P_OBJECT, 11, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x10, 0x03, 0x06
|
| 23 |
+
#define DER_OID_SZ_id_alg_CMS3DESwrap 13
|
| 24 |
+
extern const unsigned char ossl_der_oid_id_alg_CMS3DESwrap[DER_OID_SZ_id_alg_CMS3DESwrap];
|
| 25 |
+
|
| 26 |
+
/*
|
| 27 |
+
* id-aes128-wrap OBJECT IDENTIFIER ::= { aes 5 }
|
| 28 |
+
*/
|
| 29 |
+
#define DER_OID_V_id_aes128_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x05
|
| 30 |
+
#define DER_OID_SZ_id_aes128_wrap 11
|
| 31 |
+
extern const unsigned char ossl_der_oid_id_aes128_wrap[DER_OID_SZ_id_aes128_wrap];
|
| 32 |
+
|
| 33 |
+
/*
|
| 34 |
+
* id-aes192-wrap OBJECT IDENTIFIER ::= { aes 25 }
|
| 35 |
+
*/
|
| 36 |
+
#define DER_OID_V_id_aes192_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x19
|
| 37 |
+
#define DER_OID_SZ_id_aes192_wrap 11
|
| 38 |
+
extern const unsigned char ossl_der_oid_id_aes192_wrap[DER_OID_SZ_id_aes192_wrap];
|
| 39 |
+
|
| 40 |
+
/*
|
| 41 |
+
* id-aes256-wrap OBJECT IDENTIFIER ::= { aes 45 }
|
| 42 |
+
*/
|
| 43 |
+
#define DER_OID_V_id_aes256_wrap DER_P_OBJECT, 9, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x01, 0x2D
|
| 44 |
+
#define DER_OID_SZ_id_aes256_wrap 11
|
| 45 |
+
extern const unsigned char ossl_der_oid_id_aes256_wrap[DER_OID_SZ_id_aes256_wrap];
|
| 46 |
+
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/crypto/buildinf.h
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by util/mkbuildinf.pl
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2014-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
#define PLATFORM "platform: aix64-gcc-as"
|
| 14 |
+
#define DATE "built on: Wed Oct 1 18:51:54 2025 UTC"
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* Generate compiler_flags as an array of individual characters. This is a
|
| 18 |
+
* workaround for the situation where CFLAGS gets too long for a C90 string
|
| 19 |
+
* literal
|
| 20 |
+
*/
|
| 21 |
+
static const char compiler_flags[] = {
|
| 22 |
+
'c','o','m','p','i','l','e','r',':',' ','g','c','c',' ','-','m',
|
| 23 |
+
'a','i','x','6','4',' ','-','p','t','h','r','e','a','d',' ','-',
|
| 24 |
+
'O',' ','-','D','B','_','E','N','D','I','A','N',' ','-','D','O',
|
| 25 |
+
'P','E','N','S','S','L','_','P','I','C',' ','-','D','O','P','E',
|
| 26 |
+
'N','S','S','L','_','B','U','I','L','D','I','N','G','_','O','P',
|
| 27 |
+
'E','N','S','S','L',' ','-','D','N','D','E','B','U','G','\0'
|
| 28 |
+
};
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/crypto/bn_conf.h
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/bn_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_BN_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_BN_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
/*
|
| 17 |
+
* The contents of this file are not used in the UEFI build, as
|
| 18 |
+
* both 32-bit and 64-bit builds are supported from a single run
|
| 19 |
+
* of the Configure script.
|
| 20 |
+
*/
|
| 21 |
+
|
| 22 |
+
/* Should we define BN_DIV2W here? */
|
| 23 |
+
|
| 24 |
+
/* Only one for the following should be defined */
|
| 25 |
+
#define SIXTY_FOUR_BIT_LONG
|
| 26 |
+
#undef SIXTY_FOUR_BIT
|
| 27 |
+
#undef THIRTY_TWO_BIT
|
| 28 |
+
|
| 29 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/crypto/dso_conf.h
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* WARNING: do not edit! */
|
| 2 |
+
/* Generated by Makefile from include/crypto/dso_conf.h.in */
|
| 3 |
+
/*
|
| 4 |
+
* Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 5 |
+
*
|
| 6 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 7 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 8 |
+
* in the file LICENSE in the source distribution or at
|
| 9 |
+
* https://www.openssl.org/source/license.html
|
| 10 |
+
*/
|
| 11 |
+
|
| 12 |
+
#ifndef OSSL_CRYPTO_DSO_CONF_H
|
| 13 |
+
# define OSSL_CRYPTO_DSO_CONF_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# define DSO_DLFCN
|
| 17 |
+
# define HAVE_DLFCN_H
|
| 18 |
+
# define DSO_EXTENSION ".so"
|
| 19 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/internal/param_names.h
ADDED
|
@@ -0,0 +1,469 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/internal/param_names.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2023 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
int ossl_param_find_pidx(const char *s);
|
| 15 |
+
|
| 16 |
+
/* Parameter name definitions - generated by util/perl/OpenSSL/paramnames.pm */
|
| 17 |
+
#define NUM_PIDX 346
|
| 18 |
+
|
| 19 |
+
#define PIDX_ALG_PARAM_ALGORITHM_ID 0
|
| 20 |
+
#define PIDX_ALG_PARAM_ALGORITHM_ID_PARAMS 1
|
| 21 |
+
#define PIDX_ALG_PARAM_CIPHER 2
|
| 22 |
+
#define PIDX_ALG_PARAM_DIGEST 3
|
| 23 |
+
#define PIDX_ALG_PARAM_ENGINE 4
|
| 24 |
+
#define PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR 5
|
| 25 |
+
#define PIDX_ALG_PARAM_MAC 6
|
| 26 |
+
#define PIDX_ALG_PARAM_PROPERTIES 7
|
| 27 |
+
#define PIDX_ASYM_CIPHER_PARAM_DIGEST PIDX_PKEY_PARAM_DIGEST
|
| 28 |
+
#define PIDX_ASYM_CIPHER_PARAM_ENGINE PIDX_PKEY_PARAM_ENGINE
|
| 29 |
+
#define PIDX_ASYM_CIPHER_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 30 |
+
#define PIDX_ASYM_CIPHER_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 31 |
+
#define PIDX_ASYM_CIPHER_PARAM_FIPS_RSA_PKCS15_PAD_DISABLED PIDX_PROV_PARAM_RSA_PKCS15_PAD_DISABLED
|
| 32 |
+
#define PIDX_ASYM_CIPHER_PARAM_IMPLICIT_REJECTION 8
|
| 33 |
+
#define PIDX_ASYM_CIPHER_PARAM_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST
|
| 34 |
+
#define PIDX_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS PIDX_PKEY_PARAM_MGF1_PROPERTIES
|
| 35 |
+
#define PIDX_ASYM_CIPHER_PARAM_OAEP_DIGEST PIDX_ALG_PARAM_DIGEST
|
| 36 |
+
#define PIDX_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS 9
|
| 37 |
+
#define PIDX_ASYM_CIPHER_PARAM_OAEP_LABEL 10
|
| 38 |
+
#define PIDX_ASYM_CIPHER_PARAM_PAD_MODE PIDX_PKEY_PARAM_PAD_MODE
|
| 39 |
+
#define PIDX_ASYM_CIPHER_PARAM_PROPERTIES PIDX_PKEY_PARAM_PROPERTIES
|
| 40 |
+
#define PIDX_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION 11
|
| 41 |
+
#define PIDX_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION 12
|
| 42 |
+
#define PIDX_CAPABILITY_TLS_GROUP_ALG 13
|
| 43 |
+
#define PIDX_CAPABILITY_TLS_GROUP_ID 14
|
| 44 |
+
#define PIDX_CAPABILITY_TLS_GROUP_IS_KEM 15
|
| 45 |
+
#define PIDX_CAPABILITY_TLS_GROUP_MAX_DTLS 16
|
| 46 |
+
#define PIDX_CAPABILITY_TLS_GROUP_MAX_TLS 17
|
| 47 |
+
#define PIDX_CAPABILITY_TLS_GROUP_MIN_DTLS 18
|
| 48 |
+
#define PIDX_CAPABILITY_TLS_GROUP_MIN_TLS 19
|
| 49 |
+
#define PIDX_CAPABILITY_TLS_GROUP_NAME 20
|
| 50 |
+
#define PIDX_CAPABILITY_TLS_GROUP_NAME_INTERNAL 21
|
| 51 |
+
#define PIDX_CAPABILITY_TLS_GROUP_SECURITY_BITS 22
|
| 52 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_CODE_POINT 23
|
| 53 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_HASH_NAME 24
|
| 54 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_HASH_OID 25
|
| 55 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_IANA_NAME 26
|
| 56 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_KEYTYPE 27
|
| 57 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_KEYTYPE_OID 28
|
| 58 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_MAX_DTLS 16
|
| 59 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_MAX_TLS 17
|
| 60 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_MIN_DTLS 18
|
| 61 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_MIN_TLS 19
|
| 62 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_NAME 29
|
| 63 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_OID 30
|
| 64 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_SECURITY_BITS 31
|
| 65 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_SIG_NAME 32
|
| 66 |
+
#define PIDX_CAPABILITY_TLS_SIGALG_SIG_OID 33
|
| 67 |
+
#define PIDX_CIPHER_PARAM_AEAD 34
|
| 68 |
+
#define PIDX_CIPHER_PARAM_AEAD_IVLEN PIDX_CIPHER_PARAM_IVLEN
|
| 69 |
+
#define PIDX_CIPHER_PARAM_AEAD_IV_GENERATED 35
|
| 70 |
+
#define PIDX_CIPHER_PARAM_AEAD_MAC_KEY 36
|
| 71 |
+
#define PIDX_CIPHER_PARAM_AEAD_TAG 37
|
| 72 |
+
#define PIDX_CIPHER_PARAM_AEAD_TAGLEN 38
|
| 73 |
+
#define PIDX_CIPHER_PARAM_AEAD_TLS1_AAD 39
|
| 74 |
+
#define PIDX_CIPHER_PARAM_AEAD_TLS1_AAD_PAD 40
|
| 75 |
+
#define PIDX_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN 41
|
| 76 |
+
#define PIDX_CIPHER_PARAM_AEAD_TLS1_IV_FIXED 42
|
| 77 |
+
#define PIDX_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV 43
|
| 78 |
+
#define PIDX_CIPHER_PARAM_ALGORITHM_ID PIDX_ALG_PARAM_ALGORITHM_ID
|
| 79 |
+
#define PIDX_CIPHER_PARAM_ALGORITHM_ID_PARAMS PIDX_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 80 |
+
#define PIDX_CIPHER_PARAM_ALGORITHM_ID_PARAMS_OLD 44
|
| 81 |
+
#define PIDX_CIPHER_PARAM_BLOCK_SIZE 45
|
| 82 |
+
#define PIDX_CIPHER_PARAM_CTS 46
|
| 83 |
+
#define PIDX_CIPHER_PARAM_CTS_MODE 47
|
| 84 |
+
#define PIDX_CIPHER_PARAM_CUSTOM_IV 48
|
| 85 |
+
#define PIDX_CIPHER_PARAM_DECRYPT_ONLY 49
|
| 86 |
+
#define PIDX_CIPHER_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 87 |
+
#define PIDX_CIPHER_PARAM_FIPS_ENCRYPT_CHECK 50
|
| 88 |
+
#define PIDX_CIPHER_PARAM_HAS_RAND_KEY 51
|
| 89 |
+
#define PIDX_CIPHER_PARAM_IV 52
|
| 90 |
+
#define PIDX_CIPHER_PARAM_IVLEN 53
|
| 91 |
+
#define PIDX_CIPHER_PARAM_KEYLEN 54
|
| 92 |
+
#define PIDX_CIPHER_PARAM_MODE 55
|
| 93 |
+
#define PIDX_CIPHER_PARAM_NUM 56
|
| 94 |
+
#define PIDX_CIPHER_PARAM_PADDING 57
|
| 95 |
+
#define PIDX_CIPHER_PARAM_PIPELINE_AEAD_TAG 58
|
| 96 |
+
#define PIDX_CIPHER_PARAM_RANDOM_KEY 59
|
| 97 |
+
#define PIDX_CIPHER_PARAM_RC2_KEYBITS 60
|
| 98 |
+
#define PIDX_CIPHER_PARAM_ROUNDS 61
|
| 99 |
+
#define PIDX_CIPHER_PARAM_SPEED 62
|
| 100 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK 63
|
| 101 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD 64
|
| 102 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN 65
|
| 103 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC 66
|
| 104 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN 67
|
| 105 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN 68
|
| 106 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE 69
|
| 107 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE 70
|
| 108 |
+
#define PIDX_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT 71
|
| 109 |
+
#define PIDX_CIPHER_PARAM_TLS_MAC 72
|
| 110 |
+
#define PIDX_CIPHER_PARAM_TLS_MAC_SIZE 73
|
| 111 |
+
#define PIDX_CIPHER_PARAM_TLS_VERSION 74
|
| 112 |
+
#define PIDX_CIPHER_PARAM_UPDATED_IV 75
|
| 113 |
+
#define PIDX_CIPHER_PARAM_USE_BITS 76
|
| 114 |
+
#define PIDX_CIPHER_PARAM_XTS_STANDARD 77
|
| 115 |
+
#define PIDX_DECODER_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 116 |
+
#define PIDX_DIGEST_PARAM_ALGID_ABSENT 78
|
| 117 |
+
#define PIDX_DIGEST_PARAM_BLOCK_SIZE 45
|
| 118 |
+
#define PIDX_DIGEST_PARAM_MICALG 79
|
| 119 |
+
#define PIDX_DIGEST_PARAM_PAD_TYPE 80
|
| 120 |
+
#define PIDX_DIGEST_PARAM_SIZE 81
|
| 121 |
+
#define PIDX_DIGEST_PARAM_SSL3_MS 82
|
| 122 |
+
#define PIDX_DIGEST_PARAM_XOF 83
|
| 123 |
+
#define PIDX_DIGEST_PARAM_XOFLEN 84
|
| 124 |
+
#define PIDX_DRBG_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER
|
| 125 |
+
#define PIDX_DRBG_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST
|
| 126 |
+
#define PIDX_DRBG_PARAM_ENTROPY_REQUIRED 85
|
| 127 |
+
#define PIDX_DRBG_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 128 |
+
#define PIDX_DRBG_PARAM_FIPS_DIGEST_CHECK PIDX_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 129 |
+
#define PIDX_DRBG_PARAM_MAC PIDX_ALG_PARAM_MAC
|
| 130 |
+
#define PIDX_DRBG_PARAM_MAX_ADINLEN 86
|
| 131 |
+
#define PIDX_DRBG_PARAM_MAX_ENTROPYLEN 87
|
| 132 |
+
#define PIDX_DRBG_PARAM_MAX_LENGTH 88
|
| 133 |
+
#define PIDX_DRBG_PARAM_MAX_NONCELEN 89
|
| 134 |
+
#define PIDX_DRBG_PARAM_MAX_PERSLEN 90
|
| 135 |
+
#define PIDX_DRBG_PARAM_MIN_ENTROPYLEN 91
|
| 136 |
+
#define PIDX_DRBG_PARAM_MIN_LENGTH 92
|
| 137 |
+
#define PIDX_DRBG_PARAM_MIN_NONCELEN 93
|
| 138 |
+
#define PIDX_DRBG_PARAM_PREDICTION_RESISTANCE 94
|
| 139 |
+
#define PIDX_DRBG_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 140 |
+
#define PIDX_DRBG_PARAM_RANDOM_DATA 95
|
| 141 |
+
#define PIDX_DRBG_PARAM_RESEED_COUNTER 96
|
| 142 |
+
#define PIDX_DRBG_PARAM_RESEED_REQUESTS 97
|
| 143 |
+
#define PIDX_DRBG_PARAM_RESEED_TIME 98
|
| 144 |
+
#define PIDX_DRBG_PARAM_RESEED_TIME_INTERVAL 99
|
| 145 |
+
#define PIDX_DRBG_PARAM_SIZE 81
|
| 146 |
+
#define PIDX_DRBG_PARAM_USE_DF 100
|
| 147 |
+
#define PIDX_ENCODER_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER
|
| 148 |
+
#define PIDX_ENCODER_PARAM_ENCRYPT_LEVEL 101
|
| 149 |
+
#define PIDX_ENCODER_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 150 |
+
#define PIDX_ENCODER_PARAM_SAVE_PARAMETERS 102
|
| 151 |
+
#define PIDX_EXCHANGE_PARAM_EC_ECDH_COFACTOR_MODE 103
|
| 152 |
+
#define PIDX_EXCHANGE_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 153 |
+
#define PIDX_EXCHANGE_PARAM_FIPS_DIGEST_CHECK PIDX_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 154 |
+
#define PIDX_EXCHANGE_PARAM_FIPS_ECDH_COFACTOR_CHECK PIDX_PROV_PARAM_ECDH_COFACTOR_CHECK
|
| 155 |
+
#define PIDX_EXCHANGE_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 156 |
+
#define PIDX_EXCHANGE_PARAM_KDF_DIGEST 104
|
| 157 |
+
#define PIDX_EXCHANGE_PARAM_KDF_DIGEST_PROPS 105
|
| 158 |
+
#define PIDX_EXCHANGE_PARAM_KDF_OUTLEN 106
|
| 159 |
+
#define PIDX_EXCHANGE_PARAM_KDF_TYPE 107
|
| 160 |
+
#define PIDX_EXCHANGE_PARAM_KDF_UKM 108
|
| 161 |
+
#define PIDX_EXCHANGE_PARAM_PAD 109
|
| 162 |
+
#define PIDX_GEN_PARAM_ITERATION 110
|
| 163 |
+
#define PIDX_GEN_PARAM_POTENTIAL 111
|
| 164 |
+
#define PIDX_KDF_PARAM_ARGON2_AD 112
|
| 165 |
+
#define PIDX_KDF_PARAM_ARGON2_LANES 113
|
| 166 |
+
#define PIDX_KDF_PARAM_ARGON2_MEMCOST 114
|
| 167 |
+
#define PIDX_KDF_PARAM_ARGON2_VERSION 115
|
| 168 |
+
#define PIDX_KDF_PARAM_CEK_ALG 116
|
| 169 |
+
#define PIDX_KDF_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER
|
| 170 |
+
#define PIDX_KDF_PARAM_CONSTANT 117
|
| 171 |
+
#define PIDX_KDF_PARAM_DATA 118
|
| 172 |
+
#define PIDX_KDF_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST
|
| 173 |
+
#define PIDX_KDF_PARAM_EARLY_CLEAN 119
|
| 174 |
+
#define PIDX_KDF_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 175 |
+
#define PIDX_KDF_PARAM_FIPS_DIGEST_CHECK PIDX_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 176 |
+
#define PIDX_KDF_PARAM_FIPS_EMS_CHECK 120
|
| 177 |
+
#define PIDX_KDF_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 178 |
+
#define PIDX_KDF_PARAM_HMACDRBG_ENTROPY 121
|
| 179 |
+
#define PIDX_KDF_PARAM_HMACDRBG_NONCE 122
|
| 180 |
+
#define PIDX_KDF_PARAM_INFO 123
|
| 181 |
+
#define PIDX_KDF_PARAM_ITER 124
|
| 182 |
+
#define PIDX_KDF_PARAM_KBKDF_R 125
|
| 183 |
+
#define PIDX_KDF_PARAM_KBKDF_USE_L 126
|
| 184 |
+
#define PIDX_KDF_PARAM_KBKDF_USE_SEPARATOR 127
|
| 185 |
+
#define PIDX_KDF_PARAM_KEY 128
|
| 186 |
+
#define PIDX_KDF_PARAM_LABEL 129
|
| 187 |
+
#define PIDX_KDF_PARAM_MAC PIDX_ALG_PARAM_MAC
|
| 188 |
+
#define PIDX_KDF_PARAM_MAC_SIZE 130
|
| 189 |
+
#define PIDX_KDF_PARAM_MODE 55
|
| 190 |
+
#define PIDX_KDF_PARAM_PASSWORD 131
|
| 191 |
+
#define PIDX_KDF_PARAM_PKCS12_ID 132
|
| 192 |
+
#define PIDX_KDF_PARAM_PKCS5 133
|
| 193 |
+
#define PIDX_KDF_PARAM_PREFIX 134
|
| 194 |
+
#define PIDX_KDF_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 195 |
+
#define PIDX_KDF_PARAM_SALT 135
|
| 196 |
+
#define PIDX_KDF_PARAM_SCRYPT_MAXMEM 136
|
| 197 |
+
#define PIDX_KDF_PARAM_SCRYPT_N 137
|
| 198 |
+
#define PIDX_KDF_PARAM_SCRYPT_P 138
|
| 199 |
+
#define PIDX_KDF_PARAM_SCRYPT_R 125
|
| 200 |
+
#define PIDX_KDF_PARAM_SECRET 139
|
| 201 |
+
#define PIDX_KDF_PARAM_SEED 140
|
| 202 |
+
#define PIDX_KDF_PARAM_SIZE 81
|
| 203 |
+
#define PIDX_KDF_PARAM_SSHKDF_SESSION_ID 141
|
| 204 |
+
#define PIDX_KDF_PARAM_SSHKDF_TYPE 142
|
| 205 |
+
#define PIDX_KDF_PARAM_SSHKDF_XCGHASH 143
|
| 206 |
+
#define PIDX_KDF_PARAM_THREADS 144
|
| 207 |
+
#define PIDX_KDF_PARAM_UKM 145
|
| 208 |
+
#define PIDX_KDF_PARAM_X942_ACVPINFO 146
|
| 209 |
+
#define PIDX_KDF_PARAM_X942_PARTYUINFO 147
|
| 210 |
+
#define PIDX_KDF_PARAM_X942_PARTYVINFO 148
|
| 211 |
+
#define PIDX_KDF_PARAM_X942_SUPP_PRIVINFO 149
|
| 212 |
+
#define PIDX_KDF_PARAM_X942_SUPP_PUBINFO 150
|
| 213 |
+
#define PIDX_KDF_PARAM_X942_USE_KEYBITS 151
|
| 214 |
+
#define PIDX_KEM_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 215 |
+
#define PIDX_KEM_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 216 |
+
#define PIDX_KEM_PARAM_IKME 152
|
| 217 |
+
#define PIDX_KEM_PARAM_OPERATION 153
|
| 218 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_BLOCK_PADDING 154
|
| 219 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_HS_PADDING 155
|
| 220 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_MAX_EARLY_DATA 156
|
| 221 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_MAX_FRAG_LEN 157
|
| 222 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_MODE 55
|
| 223 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_OPTIONS 158
|
| 224 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_READ_AHEAD 159
|
| 225 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_STREAM_MAC 160
|
| 226 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_TLSTREE 161
|
| 227 |
+
#define PIDX_LIBSSL_RECORD_LAYER_PARAM_USE_ETM 162
|
| 228 |
+
#define PIDX_LIBSSL_RECORD_LAYER_READ_BUFFER_LEN 163
|
| 229 |
+
#define PIDX_MAC_PARAM_BLOCK_SIZE 164
|
| 230 |
+
#define PIDX_MAC_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER
|
| 231 |
+
#define PIDX_MAC_PARAM_CUSTOM 165
|
| 232 |
+
#define PIDX_MAC_PARAM_C_ROUNDS 166
|
| 233 |
+
#define PIDX_MAC_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST
|
| 234 |
+
#define PIDX_MAC_PARAM_DIGEST_NOINIT 167
|
| 235 |
+
#define PIDX_MAC_PARAM_DIGEST_ONESHOT 168
|
| 236 |
+
#define PIDX_MAC_PARAM_D_ROUNDS 169
|
| 237 |
+
#define PIDX_MAC_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 238 |
+
#define PIDX_MAC_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 239 |
+
#define PIDX_MAC_PARAM_FIPS_NO_SHORT_MAC PIDX_PROV_PARAM_NO_SHORT_MAC
|
| 240 |
+
#define PIDX_MAC_PARAM_IV 52
|
| 241 |
+
#define PIDX_MAC_PARAM_KEY 128
|
| 242 |
+
#define PIDX_MAC_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 243 |
+
#define PIDX_MAC_PARAM_SALT 135
|
| 244 |
+
#define PIDX_MAC_PARAM_SIZE 81
|
| 245 |
+
#define PIDX_MAC_PARAM_TLS_DATA_SIZE 170
|
| 246 |
+
#define PIDX_MAC_PARAM_XOF 83
|
| 247 |
+
#define PIDX_OBJECT_PARAM_DATA 118
|
| 248 |
+
#define PIDX_OBJECT_PARAM_DATA_STRUCTURE 171
|
| 249 |
+
#define PIDX_OBJECT_PARAM_DATA_TYPE 172
|
| 250 |
+
#define PIDX_OBJECT_PARAM_DESC 173
|
| 251 |
+
#define PIDX_OBJECT_PARAM_INPUT_TYPE 174
|
| 252 |
+
#define PIDX_OBJECT_PARAM_REFERENCE 175
|
| 253 |
+
#define PIDX_OBJECT_PARAM_TYPE 142
|
| 254 |
+
#define PIDX_PASSPHRASE_PARAM_INFO 123
|
| 255 |
+
#define PIDX_PKEY_PARAM_ALGORITHM_ID PIDX_ALG_PARAM_ALGORITHM_ID
|
| 256 |
+
#define PIDX_PKEY_PARAM_ALGORITHM_ID_PARAMS PIDX_ALG_PARAM_ALGORITHM_ID_PARAMS
|
| 257 |
+
#define PIDX_PKEY_PARAM_BITS 176
|
| 258 |
+
#define PIDX_PKEY_PARAM_CIPHER PIDX_ALG_PARAM_CIPHER
|
| 259 |
+
#define PIDX_PKEY_PARAM_DEFAULT_DIGEST 177
|
| 260 |
+
#define PIDX_PKEY_PARAM_DHKEM_IKM 178
|
| 261 |
+
#define PIDX_PKEY_PARAM_DH_GENERATOR 179
|
| 262 |
+
#define PIDX_PKEY_PARAM_DH_PRIV_LEN 180
|
| 263 |
+
#define PIDX_PKEY_PARAM_DIGEST PIDX_ALG_PARAM_DIGEST
|
| 264 |
+
#define PIDX_PKEY_PARAM_DIGEST_SIZE 181
|
| 265 |
+
#define PIDX_PKEY_PARAM_DIST_ID 182
|
| 266 |
+
#define PIDX_PKEY_PARAM_EC_A 183
|
| 267 |
+
#define PIDX_PKEY_PARAM_EC_B 184
|
| 268 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_M 185
|
| 269 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_PP_K1 186
|
| 270 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_PP_K2 187
|
| 271 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_PP_K3 188
|
| 272 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_TP_BASIS 189
|
| 273 |
+
#define PIDX_PKEY_PARAM_EC_CHAR2_TYPE 190
|
| 274 |
+
#define PIDX_PKEY_PARAM_EC_COFACTOR 191
|
| 275 |
+
#define PIDX_PKEY_PARAM_EC_DECODED_FROM_EXPLICIT_PARAMS 192
|
| 276 |
+
#define PIDX_PKEY_PARAM_EC_ENCODING 193
|
| 277 |
+
#define PIDX_PKEY_PARAM_EC_FIELD_TYPE 194
|
| 278 |
+
#define PIDX_PKEY_PARAM_EC_GENERATOR 195
|
| 279 |
+
#define PIDX_PKEY_PARAM_EC_GROUP_CHECK_TYPE 196
|
| 280 |
+
#define PIDX_PKEY_PARAM_EC_INCLUDE_PUBLIC 197
|
| 281 |
+
#define PIDX_PKEY_PARAM_EC_ORDER 198
|
| 282 |
+
#define PIDX_PKEY_PARAM_EC_P 138
|
| 283 |
+
#define PIDX_PKEY_PARAM_EC_POINT_CONVERSION_FORMAT 199
|
| 284 |
+
#define PIDX_PKEY_PARAM_EC_PUB_X 200
|
| 285 |
+
#define PIDX_PKEY_PARAM_EC_PUB_Y 201
|
| 286 |
+
#define PIDX_PKEY_PARAM_EC_SEED 140
|
| 287 |
+
#define PIDX_PKEY_PARAM_ENCODED_PUBLIC_KEY 202
|
| 288 |
+
#define PIDX_PKEY_PARAM_ENGINE PIDX_ALG_PARAM_ENGINE
|
| 289 |
+
#define PIDX_PKEY_PARAM_FFC_COFACTOR 203
|
| 290 |
+
#define PIDX_PKEY_PARAM_FFC_DIGEST PIDX_PKEY_PARAM_DIGEST
|
| 291 |
+
#define PIDX_PKEY_PARAM_FFC_DIGEST_PROPS PIDX_PKEY_PARAM_PROPERTIES
|
| 292 |
+
#define PIDX_PKEY_PARAM_FFC_G 204
|
| 293 |
+
#define PIDX_PKEY_PARAM_FFC_GINDEX 205
|
| 294 |
+
#define PIDX_PKEY_PARAM_FFC_H 206
|
| 295 |
+
#define PIDX_PKEY_PARAM_FFC_P 138
|
| 296 |
+
#define PIDX_PKEY_PARAM_FFC_PBITS 207
|
| 297 |
+
#define PIDX_PKEY_PARAM_FFC_PCOUNTER 208
|
| 298 |
+
#define PIDX_PKEY_PARAM_FFC_Q 209
|
| 299 |
+
#define PIDX_PKEY_PARAM_FFC_QBITS 210
|
| 300 |
+
#define PIDX_PKEY_PARAM_FFC_SEED 140
|
| 301 |
+
#define PIDX_PKEY_PARAM_FFC_TYPE 142
|
| 302 |
+
#define PIDX_PKEY_PARAM_FFC_VALIDATE_G 211
|
| 303 |
+
#define PIDX_PKEY_PARAM_FFC_VALIDATE_LEGACY 212
|
| 304 |
+
#define PIDX_PKEY_PARAM_FFC_VALIDATE_PQ 213
|
| 305 |
+
#define PIDX_PKEY_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 306 |
+
#define PIDX_PKEY_PARAM_FIPS_DIGEST_CHECK 214
|
| 307 |
+
#define PIDX_PKEY_PARAM_FIPS_KEY_CHECK 215
|
| 308 |
+
#define PIDX_PKEY_PARAM_FIPS_SIGN_CHECK 216
|
| 309 |
+
#define PIDX_PKEY_PARAM_GROUP_NAME 217
|
| 310 |
+
#define PIDX_PKEY_PARAM_IMPLICIT_REJECTION 8
|
| 311 |
+
#define PIDX_PKEY_PARAM_MANDATORY_DIGEST 218
|
| 312 |
+
#define PIDX_PKEY_PARAM_MASKGENFUNC 219
|
| 313 |
+
#define PIDX_PKEY_PARAM_MAX_SIZE 220
|
| 314 |
+
#define PIDX_PKEY_PARAM_MGF1_DIGEST 221
|
| 315 |
+
#define PIDX_PKEY_PARAM_MGF1_PROPERTIES 222
|
| 316 |
+
#define PIDX_PKEY_PARAM_ML_DSA_INPUT_FORMATS 223
|
| 317 |
+
#define PIDX_PKEY_PARAM_ML_DSA_OUTPUT_FORMATS 224
|
| 318 |
+
#define PIDX_PKEY_PARAM_ML_DSA_PREFER_SEED 225
|
| 319 |
+
#define PIDX_PKEY_PARAM_ML_DSA_RETAIN_SEED 226
|
| 320 |
+
#define PIDX_PKEY_PARAM_ML_DSA_SEED 140
|
| 321 |
+
#define PIDX_PKEY_PARAM_ML_KEM_IMPORT_PCT_TYPE 227
|
| 322 |
+
#define PIDX_PKEY_PARAM_ML_KEM_INPUT_FORMATS 228
|
| 323 |
+
#define PIDX_PKEY_PARAM_ML_KEM_OUTPUT_FORMATS 229
|
| 324 |
+
#define PIDX_PKEY_PARAM_ML_KEM_PREFER_SEED 230
|
| 325 |
+
#define PIDX_PKEY_PARAM_ML_KEM_RETAIN_SEED 231
|
| 326 |
+
#define PIDX_PKEY_PARAM_ML_KEM_SEED 140
|
| 327 |
+
#define PIDX_PKEY_PARAM_PAD_MODE 232
|
| 328 |
+
#define PIDX_PKEY_PARAM_PRIV_KEY 233
|
| 329 |
+
#define PIDX_PKEY_PARAM_PROPERTIES PIDX_ALG_PARAM_PROPERTIES
|
| 330 |
+
#define PIDX_PKEY_PARAM_PUB_KEY 234
|
| 331 |
+
#define PIDX_PKEY_PARAM_RSA_BITS PIDX_PKEY_PARAM_BITS
|
| 332 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT 235
|
| 333 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT1 236
|
| 334 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT2 237
|
| 335 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT3 238
|
| 336 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT4 239
|
| 337 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT5 240
|
| 338 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT6 241
|
| 339 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT7 242
|
| 340 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT8 243
|
| 341 |
+
#define PIDX_PKEY_PARAM_RSA_COEFFICIENT9 244
|
| 342 |
+
#define PIDX_PKEY_PARAM_RSA_D 245
|
| 343 |
+
#define PIDX_PKEY_PARAM_RSA_DERIVE_FROM_PQ 246
|
| 344 |
+
#define PIDX_PKEY_PARAM_RSA_DIGEST PIDX_PKEY_PARAM_DIGEST
|
| 345 |
+
#define PIDX_PKEY_PARAM_RSA_DIGEST_PROPS PIDX_PKEY_PARAM_PROPERTIES
|
| 346 |
+
#define PIDX_PKEY_PARAM_RSA_E 247
|
| 347 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT 248
|
| 348 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT1 249
|
| 349 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT10 250
|
| 350 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT2 251
|
| 351 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT3 252
|
| 352 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT4 253
|
| 353 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT5 254
|
| 354 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT6 255
|
| 355 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT7 256
|
| 356 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT8 257
|
| 357 |
+
#define PIDX_PKEY_PARAM_RSA_EXPONENT9 258
|
| 358 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR 259
|
| 359 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR1 260
|
| 360 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR10 261
|
| 361 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR2 262
|
| 362 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR3 263
|
| 363 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR4 264
|
| 364 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR5 265
|
| 365 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR6 266
|
| 366 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR7 267
|
| 367 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR8 268
|
| 368 |
+
#define PIDX_PKEY_PARAM_RSA_FACTOR9 269
|
| 369 |
+
#define PIDX_PKEY_PARAM_RSA_MASKGENFUNC PIDX_PKEY_PARAM_MASKGENFUNC
|
| 370 |
+
#define PIDX_PKEY_PARAM_RSA_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST
|
| 371 |
+
#define PIDX_PKEY_PARAM_RSA_N 137
|
| 372 |
+
#define PIDX_PKEY_PARAM_RSA_PRIMES 270
|
| 373 |
+
#define PIDX_PKEY_PARAM_RSA_PSS_SALTLEN 271
|
| 374 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_P1 272
|
| 375 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_P2 273
|
| 376 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_Q1 274
|
| 377 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_Q2 275
|
| 378 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XP 276
|
| 379 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XP1 277
|
| 380 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XP2 278
|
| 381 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XQ 279
|
| 382 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XQ1 280
|
| 383 |
+
#define PIDX_PKEY_PARAM_RSA_TEST_XQ2 281
|
| 384 |
+
#define PIDX_PKEY_PARAM_SECURITY_BITS 282
|
| 385 |
+
#define PIDX_PKEY_PARAM_SLH_DSA_SEED 140
|
| 386 |
+
#define PIDX_PKEY_PARAM_USE_COFACTOR_ECDH PIDX_PKEY_PARAM_USE_COFACTOR_FLAG
|
| 387 |
+
#define PIDX_PKEY_PARAM_USE_COFACTOR_FLAG 283
|
| 388 |
+
#define PIDX_PROV_PARAM_BUILDINFO 284
|
| 389 |
+
#define PIDX_PROV_PARAM_CORE_MODULE_FILENAME 285
|
| 390 |
+
#define PIDX_PROV_PARAM_CORE_PROV_NAME 286
|
| 391 |
+
#define PIDX_PROV_PARAM_CORE_VERSION 287
|
| 392 |
+
#define PIDX_PROV_PARAM_DRBG_TRUNC_DIGEST 288
|
| 393 |
+
#define PIDX_PROV_PARAM_DSA_SIGN_DISABLED 289
|
| 394 |
+
#define PIDX_PROV_PARAM_ECDH_COFACTOR_CHECK 290
|
| 395 |
+
#define PIDX_PROV_PARAM_HKDF_DIGEST_CHECK 291
|
| 396 |
+
#define PIDX_PROV_PARAM_HKDF_KEY_CHECK 292
|
| 397 |
+
#define PIDX_PROV_PARAM_HMAC_KEY_CHECK 293
|
| 398 |
+
#define PIDX_PROV_PARAM_KBKDF_KEY_CHECK 294
|
| 399 |
+
#define PIDX_PROV_PARAM_KMAC_KEY_CHECK 295
|
| 400 |
+
#define PIDX_PROV_PARAM_NAME 296
|
| 401 |
+
#define PIDX_PROV_PARAM_NO_SHORT_MAC 297
|
| 402 |
+
#define PIDX_PROV_PARAM_PBKDF2_LOWER_BOUND_CHECK 298
|
| 403 |
+
#define PIDX_PROV_PARAM_RSA_PKCS15_PAD_DISABLED 299
|
| 404 |
+
#define PIDX_PROV_PARAM_RSA_PSS_SALTLEN_CHECK 300
|
| 405 |
+
#define PIDX_PROV_PARAM_RSA_SIGN_X931_PAD_DISABLED 301
|
| 406 |
+
#define PIDX_PROV_PARAM_SECURITY_CHECKS 302
|
| 407 |
+
#define PIDX_PROV_PARAM_SELF_TEST_DESC 303
|
| 408 |
+
#define PIDX_PROV_PARAM_SELF_TEST_PHASE 304
|
| 409 |
+
#define PIDX_PROV_PARAM_SELF_TEST_TYPE 305
|
| 410 |
+
#define PIDX_PROV_PARAM_SIGNATURE_DIGEST_CHECK 306
|
| 411 |
+
#define PIDX_PROV_PARAM_SSHKDF_DIGEST_CHECK 307
|
| 412 |
+
#define PIDX_PROV_PARAM_SSHKDF_KEY_CHECK 308
|
| 413 |
+
#define PIDX_PROV_PARAM_SSKDF_DIGEST_CHECK 309
|
| 414 |
+
#define PIDX_PROV_PARAM_SSKDF_KEY_CHECK 310
|
| 415 |
+
#define PIDX_PROV_PARAM_STATUS 311
|
| 416 |
+
#define PIDX_PROV_PARAM_TDES_ENCRYPT_DISABLED 312
|
| 417 |
+
#define PIDX_PROV_PARAM_TLS13_KDF_DIGEST_CHECK 313
|
| 418 |
+
#define PIDX_PROV_PARAM_TLS13_KDF_KEY_CHECK 314
|
| 419 |
+
#define PIDX_PROV_PARAM_TLS1_PRF_DIGEST_CHECK 315
|
| 420 |
+
#define PIDX_PROV_PARAM_TLS1_PRF_EMS_CHECK 316
|
| 421 |
+
#define PIDX_PROV_PARAM_TLS1_PRF_KEY_CHECK 317
|
| 422 |
+
#define PIDX_PROV_PARAM_VERSION 115
|
| 423 |
+
#define PIDX_PROV_PARAM_X942KDF_KEY_CHECK 318
|
| 424 |
+
#define PIDX_PROV_PARAM_X963KDF_DIGEST_CHECK 319
|
| 425 |
+
#define PIDX_PROV_PARAM_X963KDF_KEY_CHECK 320
|
| 426 |
+
#define PIDX_RAND_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 427 |
+
#define PIDX_RAND_PARAM_GENERATE 321
|
| 428 |
+
#define PIDX_RAND_PARAM_MAX_REQUEST 322
|
| 429 |
+
#define PIDX_RAND_PARAM_STATE 323
|
| 430 |
+
#define PIDX_RAND_PARAM_STRENGTH 324
|
| 431 |
+
#define PIDX_RAND_PARAM_TEST_ENTROPY 325
|
| 432 |
+
#define PIDX_RAND_PARAM_TEST_NONCE 326
|
| 433 |
+
#define PIDX_SIGNATURE_PARAM_ADD_RANDOM 327
|
| 434 |
+
#define PIDX_SIGNATURE_PARAM_ALGORITHM_ID PIDX_PKEY_PARAM_ALGORITHM_ID
|
| 435 |
+
#define PIDX_SIGNATURE_PARAM_ALGORITHM_ID_PARAMS PIDX_PKEY_PARAM_ALGORITHM_ID_PARAMS
|
| 436 |
+
#define PIDX_SIGNATURE_PARAM_CONTEXT_STRING 328
|
| 437 |
+
#define PIDX_SIGNATURE_PARAM_DETERMINISTIC 329
|
| 438 |
+
#define PIDX_SIGNATURE_PARAM_DIGEST PIDX_PKEY_PARAM_DIGEST
|
| 439 |
+
#define PIDX_SIGNATURE_PARAM_DIGEST_SIZE PIDX_PKEY_PARAM_DIGEST_SIZE
|
| 440 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_APPROVED_INDICATOR PIDX_ALG_PARAM_FIPS_APPROVED_INDICATOR
|
| 441 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_DIGEST_CHECK PIDX_PKEY_PARAM_FIPS_DIGEST_CHECK
|
| 442 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_KEY_CHECK PIDX_PKEY_PARAM_FIPS_KEY_CHECK
|
| 443 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_RSA_PSS_SALTLEN_CHECK 300
|
| 444 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_SIGN_CHECK PIDX_PKEY_PARAM_FIPS_SIGN_CHECK
|
| 445 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_SIGN_X931_PAD_CHECK 330
|
| 446 |
+
#define PIDX_SIGNATURE_PARAM_FIPS_VERIFY_MESSAGE 331
|
| 447 |
+
#define PIDX_SIGNATURE_PARAM_INSTANCE 332
|
| 448 |
+
#define PIDX_SIGNATURE_PARAM_KAT 333
|
| 449 |
+
#define PIDX_SIGNATURE_PARAM_MESSAGE_ENCODING 334
|
| 450 |
+
#define PIDX_SIGNATURE_PARAM_MGF1_DIGEST PIDX_PKEY_PARAM_MGF1_DIGEST
|
| 451 |
+
#define PIDX_SIGNATURE_PARAM_MGF1_PROPERTIES PIDX_PKEY_PARAM_MGF1_PROPERTIES
|
| 452 |
+
#define PIDX_SIGNATURE_PARAM_MU 335
|
| 453 |
+
#define PIDX_SIGNATURE_PARAM_NONCE_TYPE 336
|
| 454 |
+
#define PIDX_SIGNATURE_PARAM_PAD_MODE PIDX_PKEY_PARAM_PAD_MODE
|
| 455 |
+
#define PIDX_SIGNATURE_PARAM_PROPERTIES PIDX_PKEY_PARAM_PROPERTIES
|
| 456 |
+
#define PIDX_SIGNATURE_PARAM_PSS_SALTLEN 271
|
| 457 |
+
#define PIDX_SIGNATURE_PARAM_SIGNATURE 337
|
| 458 |
+
#define PIDX_SIGNATURE_PARAM_TEST_ENTROPY 338
|
| 459 |
+
#define PIDX_SKEY_PARAM_KEY_LENGTH 339
|
| 460 |
+
#define PIDX_SKEY_PARAM_RAW_BYTES 340
|
| 461 |
+
#define PIDX_STORE_PARAM_ALIAS 341
|
| 462 |
+
#define PIDX_STORE_PARAM_DIGEST 3
|
| 463 |
+
#define PIDX_STORE_PARAM_EXPECT 342
|
| 464 |
+
#define PIDX_STORE_PARAM_FINGERPRINT 343
|
| 465 |
+
#define PIDX_STORE_PARAM_INPUT_TYPE 174
|
| 466 |
+
#define PIDX_STORE_PARAM_ISSUER 296
|
| 467 |
+
#define PIDX_STORE_PARAM_PROPERTIES 7
|
| 468 |
+
#define PIDX_STORE_PARAM_SERIAL 344
|
| 469 |
+
#define PIDX_STORE_PARAM_SUBJECT 345
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/asn1.h
ADDED
|
@@ -0,0 +1,1134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1_H
|
| 16 |
+
# define OPENSSL_ASN1_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# ifndef OPENSSL_NO_STDIO
|
| 25 |
+
# include <stdio.h>
|
| 26 |
+
# endif
|
| 27 |
+
# include <time.h>
|
| 28 |
+
# include <openssl/e_os2.h>
|
| 29 |
+
# include <openssl/opensslconf.h>
|
| 30 |
+
# include <openssl/bio.h>
|
| 31 |
+
# include <openssl/safestack.h>
|
| 32 |
+
# include <openssl/asn1err.h>
|
| 33 |
+
# include <openssl/symhacks.h>
|
| 34 |
+
|
| 35 |
+
# include <openssl/types.h>
|
| 36 |
+
# include <openssl/bn.h>
|
| 37 |
+
|
| 38 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 39 |
+
# undef OPENSSL_EXTERN
|
| 40 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 41 |
+
# endif
|
| 42 |
+
|
| 43 |
+
#ifdef __cplusplus
|
| 44 |
+
extern "C" {
|
| 45 |
+
#endif
|
| 46 |
+
|
| 47 |
+
# define V_ASN1_UNIVERSAL 0x00
|
| 48 |
+
# define V_ASN1_APPLICATION 0x40
|
| 49 |
+
# define V_ASN1_CONTEXT_SPECIFIC 0x80
|
| 50 |
+
# define V_ASN1_PRIVATE 0xc0
|
| 51 |
+
|
| 52 |
+
# define V_ASN1_CONSTRUCTED 0x20
|
| 53 |
+
# define V_ASN1_PRIMITIVE_TAG 0x1f
|
| 54 |
+
# define V_ASN1_PRIMATIVE_TAG /*compat*/ V_ASN1_PRIMITIVE_TAG
|
| 55 |
+
|
| 56 |
+
# define V_ASN1_APP_CHOOSE -2 /* let the recipient choose */
|
| 57 |
+
# define V_ASN1_OTHER -3 /* used in ASN1_TYPE */
|
| 58 |
+
# define V_ASN1_ANY -4 /* used in ASN1 template code */
|
| 59 |
+
|
| 60 |
+
# define V_ASN1_UNDEF -1
|
| 61 |
+
/* ASN.1 tag values */
|
| 62 |
+
# define V_ASN1_EOC 0
|
| 63 |
+
# define V_ASN1_BOOLEAN 1
|
| 64 |
+
# define V_ASN1_INTEGER 2
|
| 65 |
+
# define V_ASN1_BIT_STRING 3
|
| 66 |
+
# define V_ASN1_OCTET_STRING 4
|
| 67 |
+
# define V_ASN1_NULL 5
|
| 68 |
+
# define V_ASN1_OBJECT 6
|
| 69 |
+
# define V_ASN1_OBJECT_DESCRIPTOR 7
|
| 70 |
+
# define V_ASN1_EXTERNAL 8
|
| 71 |
+
# define V_ASN1_REAL 9
|
| 72 |
+
# define V_ASN1_ENUMERATED 10
|
| 73 |
+
# define V_ASN1_UTF8STRING 12
|
| 74 |
+
# define V_ASN1_SEQUENCE 16
|
| 75 |
+
# define V_ASN1_SET 17
|
| 76 |
+
# define V_ASN1_NUMERICSTRING 18
|
| 77 |
+
# define V_ASN1_PRINTABLESTRING 19
|
| 78 |
+
# define V_ASN1_T61STRING 20
|
| 79 |
+
# define V_ASN1_TELETEXSTRING 20 /* alias */
|
| 80 |
+
# define V_ASN1_VIDEOTEXSTRING 21
|
| 81 |
+
# define V_ASN1_IA5STRING 22
|
| 82 |
+
# define V_ASN1_UTCTIME 23
|
| 83 |
+
# define V_ASN1_GENERALIZEDTIME 24
|
| 84 |
+
# define V_ASN1_GRAPHICSTRING 25
|
| 85 |
+
# define V_ASN1_ISO64STRING 26
|
| 86 |
+
# define V_ASN1_VISIBLESTRING 26 /* alias */
|
| 87 |
+
# define V_ASN1_GENERALSTRING 27
|
| 88 |
+
# define V_ASN1_UNIVERSALSTRING 28
|
| 89 |
+
# define V_ASN1_BMPSTRING 30
|
| 90 |
+
|
| 91 |
+
/*
|
| 92 |
+
* NB the constants below are used internally by ASN1_INTEGER
|
| 93 |
+
* and ASN1_ENUMERATED to indicate the sign. They are *not* on
|
| 94 |
+
* the wire tag values.
|
| 95 |
+
*/
|
| 96 |
+
|
| 97 |
+
# define V_ASN1_NEG 0x100
|
| 98 |
+
# define V_ASN1_NEG_INTEGER (2 | V_ASN1_NEG)
|
| 99 |
+
# define V_ASN1_NEG_ENUMERATED (10 | V_ASN1_NEG)
|
| 100 |
+
|
| 101 |
+
/* For use with d2i_ASN1_type_bytes() */
|
| 102 |
+
# define B_ASN1_NUMERICSTRING 0x0001
|
| 103 |
+
# define B_ASN1_PRINTABLESTRING 0x0002
|
| 104 |
+
# define B_ASN1_T61STRING 0x0004
|
| 105 |
+
# define B_ASN1_TELETEXSTRING 0x0004
|
| 106 |
+
# define B_ASN1_VIDEOTEXSTRING 0x0008
|
| 107 |
+
# define B_ASN1_IA5STRING 0x0010
|
| 108 |
+
# define B_ASN1_GRAPHICSTRING 0x0020
|
| 109 |
+
# define B_ASN1_ISO64STRING 0x0040
|
| 110 |
+
# define B_ASN1_VISIBLESTRING 0x0040
|
| 111 |
+
# define B_ASN1_GENERALSTRING 0x0080
|
| 112 |
+
# define B_ASN1_UNIVERSALSTRING 0x0100
|
| 113 |
+
# define B_ASN1_OCTET_STRING 0x0200
|
| 114 |
+
# define B_ASN1_BIT_STRING 0x0400
|
| 115 |
+
# define B_ASN1_BMPSTRING 0x0800
|
| 116 |
+
# define B_ASN1_UNKNOWN 0x1000
|
| 117 |
+
# define B_ASN1_UTF8STRING 0x2000
|
| 118 |
+
# define B_ASN1_UTCTIME 0x4000
|
| 119 |
+
# define B_ASN1_GENERALIZEDTIME 0x8000
|
| 120 |
+
# define B_ASN1_SEQUENCE 0x10000
|
| 121 |
+
/* For use with ASN1_mbstring_copy() */
|
| 122 |
+
# define MBSTRING_FLAG 0x1000
|
| 123 |
+
# define MBSTRING_UTF8 (MBSTRING_FLAG)
|
| 124 |
+
# define MBSTRING_ASC (MBSTRING_FLAG|1)
|
| 125 |
+
# define MBSTRING_BMP (MBSTRING_FLAG|2)
|
| 126 |
+
# define MBSTRING_UNIV (MBSTRING_FLAG|4)
|
| 127 |
+
# define SMIME_OLDMIME 0x400
|
| 128 |
+
# define SMIME_CRLFEOL 0x800
|
| 129 |
+
# define SMIME_STREAM 0x1000
|
| 130 |
+
|
| 131 |
+
/* Stacks for types not otherwise defined in this header */
|
| 132 |
+
SKM_DEFINE_STACK_OF_INTERNAL(X509_ALGOR, X509_ALGOR, X509_ALGOR)
|
| 133 |
+
#define sk_X509_ALGOR_num(sk) OPENSSL_sk_num(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 134 |
+
#define sk_X509_ALGOR_value(sk, idx) ((X509_ALGOR *)OPENSSL_sk_value(ossl_check_const_X509_ALGOR_sk_type(sk), (idx)))
|
| 135 |
+
#define sk_X509_ALGOR_new(cmp) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new(ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 136 |
+
#define sk_X509_ALGOR_new_null() ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_null())
|
| 137 |
+
#define sk_X509_ALGOR_new_reserve(cmp, n) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_new_reserve(ossl_check_X509_ALGOR_compfunc_type(cmp), (n)))
|
| 138 |
+
#define sk_X509_ALGOR_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_X509_ALGOR_sk_type(sk), (n))
|
| 139 |
+
#define sk_X509_ALGOR_free(sk) OPENSSL_sk_free(ossl_check_X509_ALGOR_sk_type(sk))
|
| 140 |
+
#define sk_X509_ALGOR_zero(sk) OPENSSL_sk_zero(ossl_check_X509_ALGOR_sk_type(sk))
|
| 141 |
+
#define sk_X509_ALGOR_delete(sk, i) ((X509_ALGOR *)OPENSSL_sk_delete(ossl_check_X509_ALGOR_sk_type(sk), (i)))
|
| 142 |
+
#define sk_X509_ALGOR_delete_ptr(sk, ptr) ((X509_ALGOR *)OPENSSL_sk_delete_ptr(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr)))
|
| 143 |
+
#define sk_X509_ALGOR_push(sk, ptr) OPENSSL_sk_push(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 144 |
+
#define sk_X509_ALGOR_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 145 |
+
#define sk_X509_ALGOR_pop(sk) ((X509_ALGOR *)OPENSSL_sk_pop(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 146 |
+
#define sk_X509_ALGOR_shift(sk) ((X509_ALGOR *)OPENSSL_sk_shift(ossl_check_X509_ALGOR_sk_type(sk)))
|
| 147 |
+
#define sk_X509_ALGOR_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_X509_ALGOR_sk_type(sk),ossl_check_X509_ALGOR_freefunc_type(freefunc))
|
| 148 |
+
#define sk_X509_ALGOR_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), (idx))
|
| 149 |
+
#define sk_X509_ALGOR_set(sk, idx, ptr) ((X509_ALGOR *)OPENSSL_sk_set(ossl_check_X509_ALGOR_sk_type(sk), (idx), ossl_check_X509_ALGOR_type(ptr)))
|
| 150 |
+
#define sk_X509_ALGOR_find(sk, ptr) OPENSSL_sk_find(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 151 |
+
#define sk_X509_ALGOR_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr))
|
| 152 |
+
#define sk_X509_ALGOR_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_type(ptr), pnum)
|
| 153 |
+
#define sk_X509_ALGOR_sort(sk) OPENSSL_sk_sort(ossl_check_X509_ALGOR_sk_type(sk))
|
| 154 |
+
#define sk_X509_ALGOR_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_X509_ALGOR_sk_type(sk))
|
| 155 |
+
#define sk_X509_ALGOR_dup(sk) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_dup(ossl_check_const_X509_ALGOR_sk_type(sk)))
|
| 156 |
+
#define sk_X509_ALGOR_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(X509_ALGOR) *)OPENSSL_sk_deep_copy(ossl_check_const_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_copyfunc_type(copyfunc), ossl_check_X509_ALGOR_freefunc_type(freefunc)))
|
| 157 |
+
#define sk_X509_ALGOR_set_cmp_func(sk, cmp) ((sk_X509_ALGOR_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_X509_ALGOR_sk_type(sk), ossl_check_X509_ALGOR_compfunc_type(cmp)))
|
| 158 |
+
|
| 159 |
+
|
| 160 |
+
|
| 161 |
+
# define ASN1_STRING_FLAG_BITS_LEFT 0x08 /* Set if 0x07 has bits left value */
|
| 162 |
+
/*
|
| 163 |
+
* This indicates that the ASN1_STRING is not a real value but just a place
|
| 164 |
+
* holder for the location where indefinite length constructed data should be
|
| 165 |
+
* inserted in the memory buffer
|
| 166 |
+
*/
|
| 167 |
+
# define ASN1_STRING_FLAG_NDEF 0x010
|
| 168 |
+
|
| 169 |
+
/*
|
| 170 |
+
* This flag is used by the CMS code to indicate that a string is not
|
| 171 |
+
* complete and is a place holder for content when it had all been accessed.
|
| 172 |
+
* The flag will be reset when content has been written to it.
|
| 173 |
+
*/
|
| 174 |
+
|
| 175 |
+
# define ASN1_STRING_FLAG_CONT 0x020
|
| 176 |
+
/*
|
| 177 |
+
* This flag is used by ASN1 code to indicate an ASN1_STRING is an MSTRING
|
| 178 |
+
* type.
|
| 179 |
+
*/
|
| 180 |
+
# define ASN1_STRING_FLAG_MSTRING 0x040
|
| 181 |
+
/* String is embedded and only content should be freed */
|
| 182 |
+
# define ASN1_STRING_FLAG_EMBED 0x080
|
| 183 |
+
/* String should be parsed in RFC 5280's time format */
|
| 184 |
+
# define ASN1_STRING_FLAG_X509_TIME 0x100
|
| 185 |
+
/* This is the base type that holds just about everything :-) */
|
| 186 |
+
struct asn1_string_st {
|
| 187 |
+
int length;
|
| 188 |
+
int type;
|
| 189 |
+
unsigned char *data;
|
| 190 |
+
/*
|
| 191 |
+
* The value of the following field depends on the type being held. It
|
| 192 |
+
* is mostly being used for BIT_STRING so if the input data has a
|
| 193 |
+
* non-zero 'unused bits' value, it will be handled correctly
|
| 194 |
+
*/
|
| 195 |
+
long flags;
|
| 196 |
+
};
|
| 197 |
+
|
| 198 |
+
/*
|
| 199 |
+
* ASN1_ENCODING structure: this is used to save the received encoding of an
|
| 200 |
+
* ASN1 type. This is useful to get round problems with invalid encodings
|
| 201 |
+
* which can break signatures.
|
| 202 |
+
*/
|
| 203 |
+
|
| 204 |
+
typedef struct ASN1_ENCODING_st {
|
| 205 |
+
unsigned char *enc; /* DER encoding */
|
| 206 |
+
long len; /* Length of encoding */
|
| 207 |
+
int modified; /* set to 1 if 'enc' is invalid */
|
| 208 |
+
} ASN1_ENCODING;
|
| 209 |
+
|
| 210 |
+
/* Used with ASN1 LONG type: if a long is set to this it is omitted */
|
| 211 |
+
# define ASN1_LONG_UNDEF 0x7fffffffL
|
| 212 |
+
|
| 213 |
+
# define STABLE_FLAGS_MALLOC 0x01
|
| 214 |
+
/*
|
| 215 |
+
* A zero passed to ASN1_STRING_TABLE_new_add for the flags is interpreted
|
| 216 |
+
* as "don't change" and STABLE_FLAGS_MALLOC is always set. By setting
|
| 217 |
+
* STABLE_FLAGS_MALLOC only we can clear the existing value. Use the alias
|
| 218 |
+
* STABLE_FLAGS_CLEAR to reflect this.
|
| 219 |
+
*/
|
| 220 |
+
# define STABLE_FLAGS_CLEAR STABLE_FLAGS_MALLOC
|
| 221 |
+
# define STABLE_NO_MASK 0x02
|
| 222 |
+
# define DIRSTRING_TYPE \
|
| 223 |
+
(B_ASN1_PRINTABLESTRING|B_ASN1_T61STRING|B_ASN1_BMPSTRING|B_ASN1_UTF8STRING)
|
| 224 |
+
# define PKCS9STRING_TYPE (DIRSTRING_TYPE|B_ASN1_IA5STRING)
|
| 225 |
+
|
| 226 |
+
struct asn1_string_table_st {
|
| 227 |
+
int nid;
|
| 228 |
+
long minsize;
|
| 229 |
+
long maxsize;
|
| 230 |
+
unsigned long mask;
|
| 231 |
+
unsigned long flags;
|
| 232 |
+
};
|
| 233 |
+
|
| 234 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_STRING_TABLE, ASN1_STRING_TABLE, ASN1_STRING_TABLE)
|
| 235 |
+
#define sk_ASN1_STRING_TABLE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 236 |
+
#define sk_ASN1_STRING_TABLE_value(sk, idx) ((ASN1_STRING_TABLE *)OPENSSL_sk_value(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), (idx)))
|
| 237 |
+
#define sk_ASN1_STRING_TABLE_new(cmp) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 238 |
+
#define sk_ASN1_STRING_TABLE_new_null() ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_null())
|
| 239 |
+
#define sk_ASN1_STRING_TABLE_new_reserve(cmp, n) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp), (n)))
|
| 240 |
+
#define sk_ASN1_STRING_TABLE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (n))
|
| 241 |
+
#define sk_ASN1_STRING_TABLE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 242 |
+
#define sk_ASN1_STRING_TABLE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 243 |
+
#define sk_ASN1_STRING_TABLE_delete(sk, i) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (i)))
|
| 244 |
+
#define sk_ASN1_STRING_TABLE_delete_ptr(sk, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 245 |
+
#define sk_ASN1_STRING_TABLE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 246 |
+
#define sk_ASN1_STRING_TABLE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 247 |
+
#define sk_ASN1_STRING_TABLE_pop(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_pop(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 248 |
+
#define sk_ASN1_STRING_TABLE_shift(sk) ((ASN1_STRING_TABLE *)OPENSSL_sk_shift(ossl_check_ASN1_STRING_TABLE_sk_type(sk)))
|
| 249 |
+
#define sk_ASN1_STRING_TABLE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_STRING_TABLE_sk_type(sk),ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc))
|
| 250 |
+
#define sk_ASN1_STRING_TABLE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), (idx))
|
| 251 |
+
#define sk_ASN1_STRING_TABLE_set(sk, idx, ptr) ((ASN1_STRING_TABLE *)OPENSSL_sk_set(ossl_check_ASN1_STRING_TABLE_sk_type(sk), (idx), ossl_check_ASN1_STRING_TABLE_type(ptr)))
|
| 252 |
+
#define sk_ASN1_STRING_TABLE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 253 |
+
#define sk_ASN1_STRING_TABLE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr))
|
| 254 |
+
#define sk_ASN1_STRING_TABLE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_type(ptr), pnum)
|
| 255 |
+
#define sk_ASN1_STRING_TABLE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_STRING_TABLE_sk_type(sk))
|
| 256 |
+
#define sk_ASN1_STRING_TABLE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk))
|
| 257 |
+
#define sk_ASN1_STRING_TABLE_dup(sk) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk)))
|
| 258 |
+
#define sk_ASN1_STRING_TABLE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_STRING_TABLE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_copyfunc_type(copyfunc), ossl_check_ASN1_STRING_TABLE_freefunc_type(freefunc)))
|
| 259 |
+
#define sk_ASN1_STRING_TABLE_set_cmp_func(sk, cmp) ((sk_ASN1_STRING_TABLE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_STRING_TABLE_sk_type(sk), ossl_check_ASN1_STRING_TABLE_compfunc_type(cmp)))
|
| 260 |
+
|
| 261 |
+
|
| 262 |
+
/* size limits: this stuff is taken straight from RFC2459 */
|
| 263 |
+
|
| 264 |
+
# define ub_name 32768
|
| 265 |
+
# define ub_common_name 64
|
| 266 |
+
# define ub_locality_name 128
|
| 267 |
+
# define ub_state_name 128
|
| 268 |
+
# define ub_organization_name 64
|
| 269 |
+
# define ub_organization_unit_name 64
|
| 270 |
+
# define ub_title 64
|
| 271 |
+
# define ub_email_address 128
|
| 272 |
+
|
| 273 |
+
/*
|
| 274 |
+
* Declarations for template structures: for full definitions see asn1t.h
|
| 275 |
+
*/
|
| 276 |
+
typedef struct ASN1_TEMPLATE_st ASN1_TEMPLATE;
|
| 277 |
+
typedef struct ASN1_TLC_st ASN1_TLC;
|
| 278 |
+
/* This is just an opaque pointer */
|
| 279 |
+
typedef struct ASN1_VALUE_st ASN1_VALUE;
|
| 280 |
+
|
| 281 |
+
/* Declare ASN1 functions: the implement macro is in asn1t.h */
|
| 282 |
+
|
| 283 |
+
/*
|
| 284 |
+
* The mysterious 'extern' that's passed to some macros is innocuous,
|
| 285 |
+
* and is there to quiet pre-C99 compilers that may complain about empty
|
| 286 |
+
* arguments in macro calls.
|
| 287 |
+
*/
|
| 288 |
+
|
| 289 |
+
# define DECLARE_ASN1_FUNCTIONS_attr(attr, type) \
|
| 290 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, type)
|
| 291 |
+
# define DECLARE_ASN1_FUNCTIONS(type) \
|
| 292 |
+
DECLARE_ASN1_FUNCTIONS_attr(extern, type)
|
| 293 |
+
|
| 294 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_attr(attr, type) \
|
| 295 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, type)
|
| 296 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS(type) \
|
| 297 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_attr(extern, type)
|
| 298 |
+
|
| 299 |
+
# define DECLARE_ASN1_FUNCTIONS_name_attr(attr, type, name) \
|
| 300 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 301 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name)
|
| 302 |
+
# define DECLARE_ASN1_FUNCTIONS_name(type, name) \
|
| 303 |
+
DECLARE_ASN1_FUNCTIONS_name_attr(extern, type, name)
|
| 304 |
+
|
| 305 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, itname, name) \
|
| 306 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 307 |
+
DECLARE_ASN1_ITEM_attr(attr, itname)
|
| 308 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name) \
|
| 309 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(extern, type, itname, name)
|
| 310 |
+
|
| 311 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(attr, type, name) \
|
| 312 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_attr(attr, type, name, name)
|
| 313 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_name(type, name) \
|
| 314 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(extern, type, name)
|
| 315 |
+
|
| 316 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(attr, type, name) \
|
| 317 |
+
attr type *d2i_##name(type **a, const unsigned char **in, long len); \
|
| 318 |
+
attr int i2d_##name(const type *a, unsigned char **out);
|
| 319 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_only(type, name) \
|
| 320 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(extern, type, name)
|
| 321 |
+
|
| 322 |
+
# define DECLARE_ASN1_NDEF_FUNCTION_attr(attr, name) \
|
| 323 |
+
attr int i2d_##name##_NDEF(const name *a, unsigned char **out);
|
| 324 |
+
# define DECLARE_ASN1_NDEF_FUNCTION(name) \
|
| 325 |
+
DECLARE_ASN1_NDEF_FUNCTION_attr(extern, name)
|
| 326 |
+
|
| 327 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(attr, type, name) \
|
| 328 |
+
attr type *name##_new(void); \
|
| 329 |
+
attr void name##_free(type *a);
|
| 330 |
+
# define DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 331 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name_attr(extern, type, name)
|
| 332 |
+
|
| 333 |
+
# define DECLARE_ASN1_DUP_FUNCTION_attr(attr, type) \
|
| 334 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, type)
|
| 335 |
+
# define DECLARE_ASN1_DUP_FUNCTION(type) \
|
| 336 |
+
DECLARE_ASN1_DUP_FUNCTION_attr(extern, type)
|
| 337 |
+
|
| 338 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name_attr(attr, type, name) \
|
| 339 |
+
attr type *name##_dup(const type *a);
|
| 340 |
+
# define DECLARE_ASN1_DUP_FUNCTION_name(type, name) \
|
| 341 |
+
DECLARE_ASN1_DUP_FUNCTION_name_attr(extern, type, name)
|
| 342 |
+
|
| 343 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_attr(attr, stname) \
|
| 344 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, stname)
|
| 345 |
+
# define DECLARE_ASN1_PRINT_FUNCTION(stname) \
|
| 346 |
+
DECLARE_ASN1_PRINT_FUNCTION_attr(extern, stname)
|
| 347 |
+
|
| 348 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname_attr(attr, stname, fname) \
|
| 349 |
+
attr int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 350 |
+
const ASN1_PCTX *pctx);
|
| 351 |
+
# define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
|
| 352 |
+
DECLARE_ASN1_PRINT_FUNCTION_fname_attr(extern, stname, fname)
|
| 353 |
+
|
| 354 |
+
# define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
|
| 355 |
+
# define I2D_OF(type) int (*)(const type *,unsigned char **)
|
| 356 |
+
|
| 357 |
+
# define CHECKED_D2I_OF(type, d2i) \
|
| 358 |
+
((d2i_of_void*) (1 ? d2i : ((D2I_OF(type))0)))
|
| 359 |
+
# define CHECKED_I2D_OF(type, i2d) \
|
| 360 |
+
((i2d_of_void*) (1 ? i2d : ((I2D_OF(type))0)))
|
| 361 |
+
# define CHECKED_NEW_OF(type, xnew) \
|
| 362 |
+
((void *(*)(void)) (1 ? xnew : ((type *(*)(void))0)))
|
| 363 |
+
# define CHECKED_PTR_OF(type, p) \
|
| 364 |
+
((void*) (1 ? p : (type*)0))
|
| 365 |
+
# define CHECKED_PPTR_OF(type, p) \
|
| 366 |
+
((void**) (1 ? p : (type**)0))
|
| 367 |
+
|
| 368 |
+
# define TYPEDEF_D2I_OF(type) typedef type *d2i_of_##type(type **,const unsigned char **,long)
|
| 369 |
+
# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *,unsigned char **)
|
| 370 |
+
# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
|
| 371 |
+
|
| 372 |
+
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
| 373 |
+
typedef int i2d_of_void(const void *, unsigned char **);
|
| 374 |
+
typedef int OSSL_i2d_of_void_ctx(const void *, unsigned char **, void *vctx);
|
| 375 |
+
|
| 376 |
+
/*-
|
| 377 |
+
* The following macros and typedefs allow an ASN1_ITEM
|
| 378 |
+
* to be embedded in a structure and referenced. Since
|
| 379 |
+
* the ASN1_ITEM pointers need to be globally accessible
|
| 380 |
+
* (possibly from shared libraries) they may exist in
|
| 381 |
+
* different forms. On platforms that support it the
|
| 382 |
+
* ASN1_ITEM structure itself will be globally exported.
|
| 383 |
+
* Other platforms will export a function that returns
|
| 384 |
+
* an ASN1_ITEM pointer.
|
| 385 |
+
*
|
| 386 |
+
* To handle both cases transparently the macros below
|
| 387 |
+
* should be used instead of hard coding an ASN1_ITEM
|
| 388 |
+
* pointer in a structure.
|
| 389 |
+
*
|
| 390 |
+
* The structure will look like this:
|
| 391 |
+
*
|
| 392 |
+
* typedef struct SOMETHING_st {
|
| 393 |
+
* ...
|
| 394 |
+
* ASN1_ITEM_EXP *iptr;
|
| 395 |
+
* ...
|
| 396 |
+
* } SOMETHING;
|
| 397 |
+
*
|
| 398 |
+
* It would be initialised as e.g.:
|
| 399 |
+
*
|
| 400 |
+
* SOMETHING somevar = {...,ASN1_ITEM_ref(X509),...};
|
| 401 |
+
*
|
| 402 |
+
* and the actual pointer extracted with:
|
| 403 |
+
*
|
| 404 |
+
* const ASN1_ITEM *it = ASN1_ITEM_ptr(somevar.iptr);
|
| 405 |
+
*
|
| 406 |
+
* Finally an ASN1_ITEM pointer can be extracted from an
|
| 407 |
+
* appropriate reference with: ASN1_ITEM_rptr(X509). This
|
| 408 |
+
* would be used when a function takes an ASN1_ITEM * argument.
|
| 409 |
+
*
|
| 410 |
+
*/
|
| 411 |
+
|
| 412 |
+
|
| 413 |
+
/*
|
| 414 |
+
* Platforms that can't easily handle shared global variables are declared as
|
| 415 |
+
* functions returning ASN1_ITEM pointers.
|
| 416 |
+
*/
|
| 417 |
+
|
| 418 |
+
/* ASN1_ITEM pointer exported type */
|
| 419 |
+
typedef const ASN1_ITEM *ASN1_ITEM_EXP (void);
|
| 420 |
+
|
| 421 |
+
/* Macro to obtain ASN1_ITEM pointer from exported type */
|
| 422 |
+
# define ASN1_ITEM_ptr(iptr) (iptr())
|
| 423 |
+
|
| 424 |
+
/* Macro to include ASN1_ITEM pointer from base type */
|
| 425 |
+
# define ASN1_ITEM_ref(iptr) (iptr##_it)
|
| 426 |
+
|
| 427 |
+
# define ASN1_ITEM_rptr(ref) (ref##_it())
|
| 428 |
+
|
| 429 |
+
# define DECLARE_ASN1_ITEM_attr(attr, name) \
|
| 430 |
+
attr const ASN1_ITEM * name##_it(void);
|
| 431 |
+
# define DECLARE_ASN1_ITEM(name) \
|
| 432 |
+
DECLARE_ASN1_ITEM_attr(extern, name)
|
| 433 |
+
|
| 434 |
+
/* Parameters used by ASN1_STRING_print_ex() */
|
| 435 |
+
|
| 436 |
+
/*
|
| 437 |
+
* These determine which characters to escape: RFC2253 special characters,
|
| 438 |
+
* control characters and MSB set characters
|
| 439 |
+
*/
|
| 440 |
+
|
| 441 |
+
# define ASN1_STRFLGS_ESC_2253 1
|
| 442 |
+
# define ASN1_STRFLGS_ESC_CTRL 2
|
| 443 |
+
# define ASN1_STRFLGS_ESC_MSB 4
|
| 444 |
+
|
| 445 |
+
/* Lower 8 bits are reserved as an output type specifier */
|
| 446 |
+
# define ASN1_DTFLGS_TYPE_MASK 0x0FUL
|
| 447 |
+
# define ASN1_DTFLGS_RFC822 0x00UL
|
| 448 |
+
# define ASN1_DTFLGS_ISO8601 0x01UL
|
| 449 |
+
|
| 450 |
+
/*
|
| 451 |
+
* This flag determines how we do escaping: normally RC2253 backslash only,
|
| 452 |
+
* set this to use backslash and quote.
|
| 453 |
+
*/
|
| 454 |
+
|
| 455 |
+
# define ASN1_STRFLGS_ESC_QUOTE 8
|
| 456 |
+
|
| 457 |
+
/* These three flags are internal use only. */
|
| 458 |
+
|
| 459 |
+
/* Character is a valid PrintableString character */
|
| 460 |
+
# define CHARTYPE_PRINTABLESTRING 0x10
|
| 461 |
+
/* Character needs escaping if it is the first character */
|
| 462 |
+
# define CHARTYPE_FIRST_ESC_2253 0x20
|
| 463 |
+
/* Character needs escaping if it is the last character */
|
| 464 |
+
# define CHARTYPE_LAST_ESC_2253 0x40
|
| 465 |
+
|
| 466 |
+
/*
|
| 467 |
+
* NB the internal flags are safely reused below by flags handled at the top
|
| 468 |
+
* level.
|
| 469 |
+
*/
|
| 470 |
+
|
| 471 |
+
/*
|
| 472 |
+
* If this is set we convert all character strings to UTF8 first
|
| 473 |
+
*/
|
| 474 |
+
|
| 475 |
+
# define ASN1_STRFLGS_UTF8_CONVERT 0x10
|
| 476 |
+
|
| 477 |
+
/*
|
| 478 |
+
* If this is set we don't attempt to interpret content: just assume all
|
| 479 |
+
* strings are 1 byte per character. This will produce some pretty odd
|
| 480 |
+
* looking output!
|
| 481 |
+
*/
|
| 482 |
+
|
| 483 |
+
# define ASN1_STRFLGS_IGNORE_TYPE 0x20
|
| 484 |
+
|
| 485 |
+
/* If this is set we include the string type in the output */
|
| 486 |
+
# define ASN1_STRFLGS_SHOW_TYPE 0x40
|
| 487 |
+
|
| 488 |
+
/*
|
| 489 |
+
* This determines which strings to display and which to 'dump' (hex dump of
|
| 490 |
+
* content octets or DER encoding). We can only dump non character strings or
|
| 491 |
+
* everything. If we don't dump 'unknown' they are interpreted as character
|
| 492 |
+
* strings with 1 octet per character and are subject to the usual escaping
|
| 493 |
+
* options.
|
| 494 |
+
*/
|
| 495 |
+
|
| 496 |
+
# define ASN1_STRFLGS_DUMP_ALL 0x80
|
| 497 |
+
# define ASN1_STRFLGS_DUMP_UNKNOWN 0x100
|
| 498 |
+
|
| 499 |
+
/*
|
| 500 |
+
* These determine what 'dumping' does, we can dump the content octets or the
|
| 501 |
+
* DER encoding: both use the RFC2253 #XXXXX notation.
|
| 502 |
+
*/
|
| 503 |
+
|
| 504 |
+
# define ASN1_STRFLGS_DUMP_DER 0x200
|
| 505 |
+
|
| 506 |
+
/*
|
| 507 |
+
* This flag specifies that RC2254 escaping shall be performed.
|
| 508 |
+
*/
|
| 509 |
+
#define ASN1_STRFLGS_ESC_2254 0x400
|
| 510 |
+
|
| 511 |
+
/*
|
| 512 |
+
* All the string flags consistent with RFC2253, escaping control characters
|
| 513 |
+
* isn't essential in RFC2253 but it is advisable anyway.
|
| 514 |
+
*/
|
| 515 |
+
|
| 516 |
+
# define ASN1_STRFLGS_RFC2253 (ASN1_STRFLGS_ESC_2253 | \
|
| 517 |
+
ASN1_STRFLGS_ESC_CTRL | \
|
| 518 |
+
ASN1_STRFLGS_ESC_MSB | \
|
| 519 |
+
ASN1_STRFLGS_UTF8_CONVERT | \
|
| 520 |
+
ASN1_STRFLGS_DUMP_UNKNOWN | \
|
| 521 |
+
ASN1_STRFLGS_DUMP_DER)
|
| 522 |
+
|
| 523 |
+
|
| 524 |
+
struct asn1_type_st {
|
| 525 |
+
int type;
|
| 526 |
+
union {
|
| 527 |
+
char *ptr;
|
| 528 |
+
ASN1_BOOLEAN boolean;
|
| 529 |
+
ASN1_STRING *asn1_string;
|
| 530 |
+
ASN1_OBJECT *object;
|
| 531 |
+
ASN1_INTEGER *integer;
|
| 532 |
+
ASN1_ENUMERATED *enumerated;
|
| 533 |
+
ASN1_BIT_STRING *bit_string;
|
| 534 |
+
ASN1_OCTET_STRING *octet_string;
|
| 535 |
+
ASN1_PRINTABLESTRING *printablestring;
|
| 536 |
+
ASN1_T61STRING *t61string;
|
| 537 |
+
ASN1_IA5STRING *ia5string;
|
| 538 |
+
ASN1_GENERALSTRING *generalstring;
|
| 539 |
+
ASN1_BMPSTRING *bmpstring;
|
| 540 |
+
ASN1_UNIVERSALSTRING *universalstring;
|
| 541 |
+
ASN1_UTCTIME *utctime;
|
| 542 |
+
ASN1_GENERALIZEDTIME *generalizedtime;
|
| 543 |
+
ASN1_VISIBLESTRING *visiblestring;
|
| 544 |
+
ASN1_UTF8STRING *utf8string;
|
| 545 |
+
/*
|
| 546 |
+
* set and sequence are left complete and still contain the set or
|
| 547 |
+
* sequence bytes
|
| 548 |
+
*/
|
| 549 |
+
ASN1_STRING *set;
|
| 550 |
+
ASN1_STRING *sequence;
|
| 551 |
+
ASN1_VALUE *asn1_value;
|
| 552 |
+
} value;
|
| 553 |
+
};
|
| 554 |
+
|
| 555 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_TYPE, ASN1_TYPE, ASN1_TYPE)
|
| 556 |
+
#define sk_ASN1_TYPE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 557 |
+
#define sk_ASN1_TYPE_value(sk, idx) ((ASN1_TYPE *)OPENSSL_sk_value(ossl_check_const_ASN1_TYPE_sk_type(sk), (idx)))
|
| 558 |
+
#define sk_ASN1_TYPE_new(cmp) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new(ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 559 |
+
#define sk_ASN1_TYPE_new_null() ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_null())
|
| 560 |
+
#define sk_ASN1_TYPE_new_reserve(cmp, n) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_TYPE_compfunc_type(cmp), (n)))
|
| 561 |
+
#define sk_ASN1_TYPE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_TYPE_sk_type(sk), (n))
|
| 562 |
+
#define sk_ASN1_TYPE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 563 |
+
#define sk_ASN1_TYPE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 564 |
+
#define sk_ASN1_TYPE_delete(sk, i) ((ASN1_TYPE *)OPENSSL_sk_delete(ossl_check_ASN1_TYPE_sk_type(sk), (i)))
|
| 565 |
+
#define sk_ASN1_TYPE_delete_ptr(sk, ptr) ((ASN1_TYPE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr)))
|
| 566 |
+
#define sk_ASN1_TYPE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 567 |
+
#define sk_ASN1_TYPE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 568 |
+
#define sk_ASN1_TYPE_pop(sk) ((ASN1_TYPE *)OPENSSL_sk_pop(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 569 |
+
#define sk_ASN1_TYPE_shift(sk) ((ASN1_TYPE *)OPENSSL_sk_shift(ossl_check_ASN1_TYPE_sk_type(sk)))
|
| 570 |
+
#define sk_ASN1_TYPE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_TYPE_sk_type(sk),ossl_check_ASN1_TYPE_freefunc_type(freefunc))
|
| 571 |
+
#define sk_ASN1_TYPE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), (idx))
|
| 572 |
+
#define sk_ASN1_TYPE_set(sk, idx, ptr) ((ASN1_TYPE *)OPENSSL_sk_set(ossl_check_ASN1_TYPE_sk_type(sk), (idx), ossl_check_ASN1_TYPE_type(ptr)))
|
| 573 |
+
#define sk_ASN1_TYPE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 574 |
+
#define sk_ASN1_TYPE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr))
|
| 575 |
+
#define sk_ASN1_TYPE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_type(ptr), pnum)
|
| 576 |
+
#define sk_ASN1_TYPE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_TYPE_sk_type(sk))
|
| 577 |
+
#define sk_ASN1_TYPE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_TYPE_sk_type(sk))
|
| 578 |
+
#define sk_ASN1_TYPE_dup(sk) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_TYPE_sk_type(sk)))
|
| 579 |
+
#define sk_ASN1_TYPE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_TYPE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_copyfunc_type(copyfunc), ossl_check_ASN1_TYPE_freefunc_type(freefunc)))
|
| 580 |
+
#define sk_ASN1_TYPE_set_cmp_func(sk, cmp) ((sk_ASN1_TYPE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_TYPE_sk_type(sk), ossl_check_ASN1_TYPE_compfunc_type(cmp)))
|
| 581 |
+
|
| 582 |
+
|
| 583 |
+
typedef STACK_OF(ASN1_TYPE) ASN1_SEQUENCE_ANY;
|
| 584 |
+
|
| 585 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SEQUENCE_ANY)
|
| 586 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS_name(ASN1_SEQUENCE_ANY, ASN1_SET_ANY)
|
| 587 |
+
|
| 588 |
+
/* This is used to contain a list of bit names */
|
| 589 |
+
typedef struct BIT_STRING_BITNAME_st {
|
| 590 |
+
int bitnum;
|
| 591 |
+
const char *lname;
|
| 592 |
+
const char *sname;
|
| 593 |
+
} BIT_STRING_BITNAME;
|
| 594 |
+
|
| 595 |
+
# define B_ASN1_TIME \
|
| 596 |
+
B_ASN1_UTCTIME | \
|
| 597 |
+
B_ASN1_GENERALIZEDTIME
|
| 598 |
+
|
| 599 |
+
# define B_ASN1_PRINTABLE \
|
| 600 |
+
B_ASN1_NUMERICSTRING| \
|
| 601 |
+
B_ASN1_PRINTABLESTRING| \
|
| 602 |
+
B_ASN1_T61STRING| \
|
| 603 |
+
B_ASN1_IA5STRING| \
|
| 604 |
+
B_ASN1_BIT_STRING| \
|
| 605 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 606 |
+
B_ASN1_BMPSTRING|\
|
| 607 |
+
B_ASN1_UTF8STRING|\
|
| 608 |
+
B_ASN1_SEQUENCE|\
|
| 609 |
+
B_ASN1_UNKNOWN
|
| 610 |
+
|
| 611 |
+
# define B_ASN1_DIRECTORYSTRING \
|
| 612 |
+
B_ASN1_PRINTABLESTRING| \
|
| 613 |
+
B_ASN1_TELETEXSTRING|\
|
| 614 |
+
B_ASN1_BMPSTRING|\
|
| 615 |
+
B_ASN1_UNIVERSALSTRING|\
|
| 616 |
+
B_ASN1_UTF8STRING
|
| 617 |
+
|
| 618 |
+
# define B_ASN1_DISPLAYTEXT \
|
| 619 |
+
B_ASN1_IA5STRING| \
|
| 620 |
+
B_ASN1_VISIBLESTRING| \
|
| 621 |
+
B_ASN1_BMPSTRING|\
|
| 622 |
+
B_ASN1_UTF8STRING
|
| 623 |
+
|
| 624 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(ASN1_TYPE, ASN1_TYPE)
|
| 625 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
|
| 626 |
+
|
| 627 |
+
int ASN1_TYPE_get(const ASN1_TYPE *a);
|
| 628 |
+
void ASN1_TYPE_set(ASN1_TYPE *a, int type, void *value);
|
| 629 |
+
int ASN1_TYPE_set1(ASN1_TYPE *a, int type, const void *value);
|
| 630 |
+
int ASN1_TYPE_cmp(const ASN1_TYPE *a, const ASN1_TYPE *b);
|
| 631 |
+
|
| 632 |
+
ASN1_TYPE *ASN1_TYPE_pack_sequence(const ASN1_ITEM *it, void *s, ASN1_TYPE **t);
|
| 633 |
+
void *ASN1_TYPE_unpack_sequence(const ASN1_ITEM *it, const ASN1_TYPE *t);
|
| 634 |
+
|
| 635 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_OBJECT, ASN1_OBJECT, ASN1_OBJECT)
|
| 636 |
+
#define sk_ASN1_OBJECT_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 637 |
+
#define sk_ASN1_OBJECT_value(sk, idx) ((ASN1_OBJECT *)OPENSSL_sk_value(ossl_check_const_ASN1_OBJECT_sk_type(sk), (idx)))
|
| 638 |
+
#define sk_ASN1_OBJECT_new(cmp) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new(ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 639 |
+
#define sk_ASN1_OBJECT_new_null() ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_null())
|
| 640 |
+
#define sk_ASN1_OBJECT_new_reserve(cmp, n) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_OBJECT_compfunc_type(cmp), (n)))
|
| 641 |
+
#define sk_ASN1_OBJECT_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_OBJECT_sk_type(sk), (n))
|
| 642 |
+
#define sk_ASN1_OBJECT_free(sk) OPENSSL_sk_free(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 643 |
+
#define sk_ASN1_OBJECT_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 644 |
+
#define sk_ASN1_OBJECT_delete(sk, i) ((ASN1_OBJECT *)OPENSSL_sk_delete(ossl_check_ASN1_OBJECT_sk_type(sk), (i)))
|
| 645 |
+
#define sk_ASN1_OBJECT_delete_ptr(sk, ptr) ((ASN1_OBJECT *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 646 |
+
#define sk_ASN1_OBJECT_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 647 |
+
#define sk_ASN1_OBJECT_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 648 |
+
#define sk_ASN1_OBJECT_pop(sk) ((ASN1_OBJECT *)OPENSSL_sk_pop(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 649 |
+
#define sk_ASN1_OBJECT_shift(sk) ((ASN1_OBJECT *)OPENSSL_sk_shift(ossl_check_ASN1_OBJECT_sk_type(sk)))
|
| 650 |
+
#define sk_ASN1_OBJECT_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_OBJECT_sk_type(sk),ossl_check_ASN1_OBJECT_freefunc_type(freefunc))
|
| 651 |
+
#define sk_ASN1_OBJECT_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), (idx))
|
| 652 |
+
#define sk_ASN1_OBJECT_set(sk, idx, ptr) ((ASN1_OBJECT *)OPENSSL_sk_set(ossl_check_ASN1_OBJECT_sk_type(sk), (idx), ossl_check_ASN1_OBJECT_type(ptr)))
|
| 653 |
+
#define sk_ASN1_OBJECT_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 654 |
+
#define sk_ASN1_OBJECT_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr))
|
| 655 |
+
#define sk_ASN1_OBJECT_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_type(ptr), pnum)
|
| 656 |
+
#define sk_ASN1_OBJECT_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_OBJECT_sk_type(sk))
|
| 657 |
+
#define sk_ASN1_OBJECT_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_OBJECT_sk_type(sk))
|
| 658 |
+
#define sk_ASN1_OBJECT_dup(sk) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_dup(ossl_check_const_ASN1_OBJECT_sk_type(sk)))
|
| 659 |
+
#define sk_ASN1_OBJECT_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_OBJECT) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_copyfunc_type(copyfunc), ossl_check_ASN1_OBJECT_freefunc_type(freefunc)))
|
| 660 |
+
#define sk_ASN1_OBJECT_set_cmp_func(sk, cmp) ((sk_ASN1_OBJECT_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_OBJECT_sk_type(sk), ossl_check_ASN1_OBJECT_compfunc_type(cmp)))
|
| 661 |
+
|
| 662 |
+
|
| 663 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OBJECT)
|
| 664 |
+
|
| 665 |
+
ASN1_STRING *ASN1_STRING_new(void);
|
| 666 |
+
void ASN1_STRING_free(ASN1_STRING *a);
|
| 667 |
+
void ASN1_STRING_clear_free(ASN1_STRING *a);
|
| 668 |
+
int ASN1_STRING_copy(ASN1_STRING *dst, const ASN1_STRING *str);
|
| 669 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_STRING)
|
| 670 |
+
ASN1_STRING *ASN1_STRING_type_new(int type);
|
| 671 |
+
int ASN1_STRING_cmp(const ASN1_STRING *a, const ASN1_STRING *b);
|
| 672 |
+
/*
|
| 673 |
+
* Since this is used to store all sorts of things, via macros, for now,
|
| 674 |
+
* make its data void *
|
| 675 |
+
*/
|
| 676 |
+
int ASN1_STRING_set(ASN1_STRING *str, const void *data, int len);
|
| 677 |
+
void ASN1_STRING_set0(ASN1_STRING *str, void *data, int len);
|
| 678 |
+
int ASN1_STRING_length(const ASN1_STRING *x);
|
| 679 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 680 |
+
OSSL_DEPRECATEDIN_3_0 void ASN1_STRING_length_set(ASN1_STRING *x, int n);
|
| 681 |
+
# endif
|
| 682 |
+
int ASN1_STRING_type(const ASN1_STRING *x);
|
| 683 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 684 |
+
OSSL_DEPRECATEDIN_1_1_0 unsigned char *ASN1_STRING_data(ASN1_STRING *x);
|
| 685 |
+
# endif
|
| 686 |
+
const unsigned char *ASN1_STRING_get0_data(const ASN1_STRING *x);
|
| 687 |
+
|
| 688 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BIT_STRING)
|
| 689 |
+
int ASN1_BIT_STRING_set(ASN1_BIT_STRING *a, unsigned char *d, int length);
|
| 690 |
+
int ASN1_BIT_STRING_set_bit(ASN1_BIT_STRING *a, int n, int value);
|
| 691 |
+
int ASN1_BIT_STRING_get_bit(const ASN1_BIT_STRING *a, int n);
|
| 692 |
+
int ASN1_BIT_STRING_check(const ASN1_BIT_STRING *a,
|
| 693 |
+
const unsigned char *flags, int flags_len);
|
| 694 |
+
|
| 695 |
+
int ASN1_BIT_STRING_name_print(BIO *out, ASN1_BIT_STRING *bs,
|
| 696 |
+
BIT_STRING_BITNAME *tbl, int indent);
|
| 697 |
+
int ASN1_BIT_STRING_num_asc(const char *name, BIT_STRING_BITNAME *tbl);
|
| 698 |
+
int ASN1_BIT_STRING_set_asc(ASN1_BIT_STRING *bs, const char *name, int value,
|
| 699 |
+
BIT_STRING_BITNAME *tbl);
|
| 700 |
+
|
| 701 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_INTEGER, ASN1_INTEGER, ASN1_INTEGER)
|
| 702 |
+
#define sk_ASN1_INTEGER_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 703 |
+
#define sk_ASN1_INTEGER_value(sk, idx) ((ASN1_INTEGER *)OPENSSL_sk_value(ossl_check_const_ASN1_INTEGER_sk_type(sk), (idx)))
|
| 704 |
+
#define sk_ASN1_INTEGER_new(cmp) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new(ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 705 |
+
#define sk_ASN1_INTEGER_new_null() ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_null())
|
| 706 |
+
#define sk_ASN1_INTEGER_new_reserve(cmp, n) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_INTEGER_compfunc_type(cmp), (n)))
|
| 707 |
+
#define sk_ASN1_INTEGER_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_INTEGER_sk_type(sk), (n))
|
| 708 |
+
#define sk_ASN1_INTEGER_free(sk) OPENSSL_sk_free(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 709 |
+
#define sk_ASN1_INTEGER_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 710 |
+
#define sk_ASN1_INTEGER_delete(sk, i) ((ASN1_INTEGER *)OPENSSL_sk_delete(ossl_check_ASN1_INTEGER_sk_type(sk), (i)))
|
| 711 |
+
#define sk_ASN1_INTEGER_delete_ptr(sk, ptr) ((ASN1_INTEGER *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 712 |
+
#define sk_ASN1_INTEGER_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 713 |
+
#define sk_ASN1_INTEGER_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 714 |
+
#define sk_ASN1_INTEGER_pop(sk) ((ASN1_INTEGER *)OPENSSL_sk_pop(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 715 |
+
#define sk_ASN1_INTEGER_shift(sk) ((ASN1_INTEGER *)OPENSSL_sk_shift(ossl_check_ASN1_INTEGER_sk_type(sk)))
|
| 716 |
+
#define sk_ASN1_INTEGER_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_INTEGER_sk_type(sk),ossl_check_ASN1_INTEGER_freefunc_type(freefunc))
|
| 717 |
+
#define sk_ASN1_INTEGER_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), (idx))
|
| 718 |
+
#define sk_ASN1_INTEGER_set(sk, idx, ptr) ((ASN1_INTEGER *)OPENSSL_sk_set(ossl_check_ASN1_INTEGER_sk_type(sk), (idx), ossl_check_ASN1_INTEGER_type(ptr)))
|
| 719 |
+
#define sk_ASN1_INTEGER_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 720 |
+
#define sk_ASN1_INTEGER_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr))
|
| 721 |
+
#define sk_ASN1_INTEGER_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_type(ptr), pnum)
|
| 722 |
+
#define sk_ASN1_INTEGER_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_INTEGER_sk_type(sk))
|
| 723 |
+
#define sk_ASN1_INTEGER_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_INTEGER_sk_type(sk))
|
| 724 |
+
#define sk_ASN1_INTEGER_dup(sk) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_dup(ossl_check_const_ASN1_INTEGER_sk_type(sk)))
|
| 725 |
+
#define sk_ASN1_INTEGER_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_INTEGER) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_copyfunc_type(copyfunc), ossl_check_ASN1_INTEGER_freefunc_type(freefunc)))
|
| 726 |
+
#define sk_ASN1_INTEGER_set_cmp_func(sk, cmp) ((sk_ASN1_INTEGER_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_INTEGER_sk_type(sk), ossl_check_ASN1_INTEGER_compfunc_type(cmp)))
|
| 727 |
+
|
| 728 |
+
|
| 729 |
+
|
| 730 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_INTEGER)
|
| 731 |
+
ASN1_INTEGER *d2i_ASN1_UINTEGER(ASN1_INTEGER **a, const unsigned char **pp,
|
| 732 |
+
long length);
|
| 733 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_INTEGER)
|
| 734 |
+
int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
|
| 735 |
+
|
| 736 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
|
| 737 |
+
|
| 738 |
+
int ASN1_UTCTIME_check(const ASN1_UTCTIME *a);
|
| 739 |
+
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
|
| 740 |
+
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
|
| 741 |
+
int offset_day, long offset_sec);
|
| 742 |
+
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
|
| 743 |
+
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
|
| 744 |
+
|
| 745 |
+
int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a);
|
| 746 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
|
| 747 |
+
time_t t);
|
| 748 |
+
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
|
| 749 |
+
time_t t, int offset_day,
|
| 750 |
+
long offset_sec);
|
| 751 |
+
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
|
| 752 |
+
|
| 753 |
+
int ASN1_TIME_diff(int *pday, int *psec,
|
| 754 |
+
const ASN1_TIME *from, const ASN1_TIME *to);
|
| 755 |
+
|
| 756 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
|
| 757 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_OCTET_STRING)
|
| 758 |
+
int ASN1_OCTET_STRING_cmp(const ASN1_OCTET_STRING *a,
|
| 759 |
+
const ASN1_OCTET_STRING *b);
|
| 760 |
+
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *str, const unsigned char *data,
|
| 761 |
+
int len);
|
| 762 |
+
|
| 763 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_UTF8STRING, ASN1_UTF8STRING, ASN1_UTF8STRING)
|
| 764 |
+
#define sk_ASN1_UTF8STRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 765 |
+
#define sk_ASN1_UTF8STRING_value(sk, idx) ((ASN1_UTF8STRING *)OPENSSL_sk_value(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), (idx)))
|
| 766 |
+
#define sk_ASN1_UTF8STRING_new(cmp) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 767 |
+
#define sk_ASN1_UTF8STRING_new_null() ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_null())
|
| 768 |
+
#define sk_ASN1_UTF8STRING_new_reserve(cmp, n) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_UTF8STRING_compfunc_type(cmp), (n)))
|
| 769 |
+
#define sk_ASN1_UTF8STRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_UTF8STRING_sk_type(sk), (n))
|
| 770 |
+
#define sk_ASN1_UTF8STRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 771 |
+
#define sk_ASN1_UTF8STRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 772 |
+
#define sk_ASN1_UTF8STRING_delete(sk, i) ((ASN1_UTF8STRING *)OPENSSL_sk_delete(ossl_check_ASN1_UTF8STRING_sk_type(sk), (i)))
|
| 773 |
+
#define sk_ASN1_UTF8STRING_delete_ptr(sk, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 774 |
+
#define sk_ASN1_UTF8STRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 775 |
+
#define sk_ASN1_UTF8STRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 776 |
+
#define sk_ASN1_UTF8STRING_pop(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_pop(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 777 |
+
#define sk_ASN1_UTF8STRING_shift(sk) ((ASN1_UTF8STRING *)OPENSSL_sk_shift(ossl_check_ASN1_UTF8STRING_sk_type(sk)))
|
| 778 |
+
#define sk_ASN1_UTF8STRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_UTF8STRING_sk_type(sk),ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc))
|
| 779 |
+
#define sk_ASN1_UTF8STRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), (idx))
|
| 780 |
+
#define sk_ASN1_UTF8STRING_set(sk, idx, ptr) ((ASN1_UTF8STRING *)OPENSSL_sk_set(ossl_check_ASN1_UTF8STRING_sk_type(sk), (idx), ossl_check_ASN1_UTF8STRING_type(ptr)))
|
| 781 |
+
#define sk_ASN1_UTF8STRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 782 |
+
#define sk_ASN1_UTF8STRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr))
|
| 783 |
+
#define sk_ASN1_UTF8STRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_type(ptr), pnum)
|
| 784 |
+
#define sk_ASN1_UTF8STRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_UTF8STRING_sk_type(sk))
|
| 785 |
+
#define sk_ASN1_UTF8STRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_UTF8STRING_sk_type(sk))
|
| 786 |
+
#define sk_ASN1_UTF8STRING_dup(sk) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_UTF8STRING_sk_type(sk)))
|
| 787 |
+
#define sk_ASN1_UTF8STRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_UTF8STRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_copyfunc_type(copyfunc), ossl_check_ASN1_UTF8STRING_freefunc_type(freefunc)))
|
| 788 |
+
#define sk_ASN1_UTF8STRING_set_cmp_func(sk, cmp) ((sk_ASN1_UTF8STRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_UTF8STRING_sk_type(sk), ossl_check_ASN1_UTF8STRING_compfunc_type(cmp)))
|
| 789 |
+
|
| 790 |
+
|
| 791 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_VISIBLESTRING)
|
| 792 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UNIVERSALSTRING)
|
| 793 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTF8STRING)
|
| 794 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_NULL)
|
| 795 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_BMPSTRING)
|
| 796 |
+
|
| 797 |
+
int UTF8_getc(const unsigned char *str, int len, unsigned long *val);
|
| 798 |
+
int UTF8_putc(unsigned char *str, int len, unsigned long value);
|
| 799 |
+
|
| 800 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_GENERALSTRING, ASN1_GENERALSTRING, ASN1_GENERALSTRING)
|
| 801 |
+
#define sk_ASN1_GENERALSTRING_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 802 |
+
#define sk_ASN1_GENERALSTRING_value(sk, idx) ((ASN1_GENERALSTRING *)OPENSSL_sk_value(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), (idx)))
|
| 803 |
+
#define sk_ASN1_GENERALSTRING_new(cmp) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 804 |
+
#define sk_ASN1_GENERALSTRING_new_null() ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_null())
|
| 805 |
+
#define sk_ASN1_GENERALSTRING_new_reserve(cmp, n) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp), (n)))
|
| 806 |
+
#define sk_ASN1_GENERALSTRING_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (n))
|
| 807 |
+
#define sk_ASN1_GENERALSTRING_free(sk) OPENSSL_sk_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 808 |
+
#define sk_ASN1_GENERALSTRING_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 809 |
+
#define sk_ASN1_GENERALSTRING_delete(sk, i) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (i)))
|
| 810 |
+
#define sk_ASN1_GENERALSTRING_delete_ptr(sk, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 811 |
+
#define sk_ASN1_GENERALSTRING_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 812 |
+
#define sk_ASN1_GENERALSTRING_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 813 |
+
#define sk_ASN1_GENERALSTRING_pop(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_pop(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 814 |
+
#define sk_ASN1_GENERALSTRING_shift(sk) ((ASN1_GENERALSTRING *)OPENSSL_sk_shift(ossl_check_ASN1_GENERALSTRING_sk_type(sk)))
|
| 815 |
+
#define sk_ASN1_GENERALSTRING_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_GENERALSTRING_sk_type(sk),ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc))
|
| 816 |
+
#define sk_ASN1_GENERALSTRING_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), (idx))
|
| 817 |
+
#define sk_ASN1_GENERALSTRING_set(sk, idx, ptr) ((ASN1_GENERALSTRING *)OPENSSL_sk_set(ossl_check_ASN1_GENERALSTRING_sk_type(sk), (idx), ossl_check_ASN1_GENERALSTRING_type(ptr)))
|
| 818 |
+
#define sk_ASN1_GENERALSTRING_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 819 |
+
#define sk_ASN1_GENERALSTRING_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr))
|
| 820 |
+
#define sk_ASN1_GENERALSTRING_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_type(ptr), pnum)
|
| 821 |
+
#define sk_ASN1_GENERALSTRING_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_GENERALSTRING_sk_type(sk))
|
| 822 |
+
#define sk_ASN1_GENERALSTRING_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk))
|
| 823 |
+
#define sk_ASN1_GENERALSTRING_dup(sk) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_dup(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk)))
|
| 824 |
+
#define sk_ASN1_GENERALSTRING_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_GENERALSTRING) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_copyfunc_type(copyfunc), ossl_check_ASN1_GENERALSTRING_freefunc_type(freefunc)))
|
| 825 |
+
#define sk_ASN1_GENERALSTRING_set_cmp_func(sk, cmp) ((sk_ASN1_GENERALSTRING_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_GENERALSTRING_sk_type(sk), ossl_check_ASN1_GENERALSTRING_compfunc_type(cmp)))
|
| 826 |
+
|
| 827 |
+
|
| 828 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
|
| 829 |
+
|
| 830 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
|
| 831 |
+
DECLARE_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
|
| 832 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_PRINTABLESTRING)
|
| 833 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_T61STRING)
|
| 834 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_IA5STRING)
|
| 835 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALSTRING)
|
| 836 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
| 837 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
| 838 |
+
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
| 839 |
+
|
| 840 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
| 841 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
| 842 |
+
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
| 843 |
+
|
| 844 |
+
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
| 845 |
+
|
| 846 |
+
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
| 847 |
+
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s, time_t t,
|
| 848 |
+
int offset_day, long offset_sec);
|
| 849 |
+
int ASN1_TIME_check(const ASN1_TIME *t);
|
| 850 |
+
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(const ASN1_TIME *t,
|
| 851 |
+
ASN1_GENERALIZEDTIME **out);
|
| 852 |
+
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
|
| 853 |
+
int ASN1_TIME_set_string_X509(ASN1_TIME *s, const char *str);
|
| 854 |
+
int ASN1_TIME_to_tm(const ASN1_TIME *s, struct tm *tm);
|
| 855 |
+
int ASN1_TIME_normalize(ASN1_TIME *s);
|
| 856 |
+
int ASN1_TIME_cmp_time_t(const ASN1_TIME *s, time_t t);
|
| 857 |
+
int ASN1_TIME_compare(const ASN1_TIME *a, const ASN1_TIME *b);
|
| 858 |
+
|
| 859 |
+
int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
|
| 860 |
+
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
|
| 861 |
+
int i2a_ASN1_ENUMERATED(BIO *bp, const ASN1_ENUMERATED *a);
|
| 862 |
+
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
|
| 863 |
+
int i2a_ASN1_OBJECT(BIO *bp, const ASN1_OBJECT *a);
|
| 864 |
+
int a2i_ASN1_STRING(BIO *bp, ASN1_STRING *bs, char *buf, int size);
|
| 865 |
+
int i2a_ASN1_STRING(BIO *bp, const ASN1_STRING *a, int type);
|
| 866 |
+
int i2t_ASN1_OBJECT(char *buf, int buf_len, const ASN1_OBJECT *a);
|
| 867 |
+
|
| 868 |
+
int a2d_ASN1_OBJECT(unsigned char *out, int olen, const char *buf, int num);
|
| 869 |
+
ASN1_OBJECT *ASN1_OBJECT_create(int nid, unsigned char *data, int len,
|
| 870 |
+
const char *sn, const char *ln);
|
| 871 |
+
|
| 872 |
+
int ASN1_INTEGER_get_int64(int64_t *pr, const ASN1_INTEGER *a);
|
| 873 |
+
int ASN1_INTEGER_set_int64(ASN1_INTEGER *a, int64_t r);
|
| 874 |
+
int ASN1_INTEGER_get_uint64(uint64_t *pr, const ASN1_INTEGER *a);
|
| 875 |
+
int ASN1_INTEGER_set_uint64(ASN1_INTEGER *a, uint64_t r);
|
| 876 |
+
|
| 877 |
+
int ASN1_INTEGER_set(ASN1_INTEGER *a, long v);
|
| 878 |
+
long ASN1_INTEGER_get(const ASN1_INTEGER *a);
|
| 879 |
+
ASN1_INTEGER *BN_to_ASN1_INTEGER(const BIGNUM *bn, ASN1_INTEGER *ai);
|
| 880 |
+
BIGNUM *ASN1_INTEGER_to_BN(const ASN1_INTEGER *ai, BIGNUM *bn);
|
| 881 |
+
|
| 882 |
+
int ASN1_ENUMERATED_get_int64(int64_t *pr, const ASN1_ENUMERATED *a);
|
| 883 |
+
int ASN1_ENUMERATED_set_int64(ASN1_ENUMERATED *a, int64_t r);
|
| 884 |
+
|
| 885 |
+
|
| 886 |
+
int ASN1_ENUMERATED_set(ASN1_ENUMERATED *a, long v);
|
| 887 |
+
long ASN1_ENUMERATED_get(const ASN1_ENUMERATED *a);
|
| 888 |
+
ASN1_ENUMERATED *BN_to_ASN1_ENUMERATED(const BIGNUM *bn, ASN1_ENUMERATED *ai);
|
| 889 |
+
BIGNUM *ASN1_ENUMERATED_to_BN(const ASN1_ENUMERATED *ai, BIGNUM *bn);
|
| 890 |
+
|
| 891 |
+
/* General */
|
| 892 |
+
/* given a string, return the correct type, max is the maximum length */
|
| 893 |
+
int ASN1_PRINTABLE_type(const unsigned char *s, int max);
|
| 894 |
+
|
| 895 |
+
unsigned long ASN1_tag2bit(int tag);
|
| 896 |
+
|
| 897 |
+
/* SPECIALS */
|
| 898 |
+
int ASN1_get_object(const unsigned char **pp, long *plength, int *ptag,
|
| 899 |
+
int *pclass, long omax);
|
| 900 |
+
int ASN1_check_infinite_end(unsigned char **p, long len);
|
| 901 |
+
int ASN1_const_check_infinite_end(const unsigned char **p, long len);
|
| 902 |
+
void ASN1_put_object(unsigned char **pp, int constructed, int length,
|
| 903 |
+
int tag, int xclass);
|
| 904 |
+
int ASN1_put_eoc(unsigned char **pp);
|
| 905 |
+
int ASN1_object_size(int constructed, int length, int tag);
|
| 906 |
+
|
| 907 |
+
/* Used to implement other functions */
|
| 908 |
+
void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, const void *x);
|
| 909 |
+
|
| 910 |
+
# define ASN1_dup_of(type,i2d,d2i,x) \
|
| 911 |
+
((type*)ASN1_dup(CHECKED_I2D_OF(type, i2d), \
|
| 912 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 913 |
+
CHECKED_PTR_OF(const type, x)))
|
| 914 |
+
|
| 915 |
+
void *ASN1_item_dup(const ASN1_ITEM *it, const void *x);
|
| 916 |
+
int ASN1_item_sign_ex(const ASN1_ITEM *it, X509_ALGOR *algor1,
|
| 917 |
+
X509_ALGOR *algor2, ASN1_BIT_STRING *signature,
|
| 918 |
+
const void *data, const ASN1_OCTET_STRING *id,
|
| 919 |
+
EVP_PKEY *pkey, const EVP_MD *md, OSSL_LIB_CTX *libctx,
|
| 920 |
+
const char *propq);
|
| 921 |
+
int ASN1_item_verify_ex(const ASN1_ITEM *it, const X509_ALGOR *alg,
|
| 922 |
+
const ASN1_BIT_STRING *signature, const void *data,
|
| 923 |
+
const ASN1_OCTET_STRING *id, EVP_PKEY *pkey,
|
| 924 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 925 |
+
|
| 926 |
+
/* ASN1 alloc/free macros for when a type is only used internally */
|
| 927 |
+
|
| 928 |
+
# define M_ASN1_new_of(type) (type *)ASN1_item_new(ASN1_ITEM_rptr(type))
|
| 929 |
+
# define M_ASN1_free_of(x, type) \
|
| 930 |
+
ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
|
| 931 |
+
|
| 932 |
+
# ifndef OPENSSL_NO_STDIO
|
| 933 |
+
void *ASN1_d2i_fp(void *(*xnew) (void), d2i_of_void *d2i, FILE *in, void **x);
|
| 934 |
+
|
| 935 |
+
# define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \
|
| 936 |
+
((type*)ASN1_d2i_fp(CHECKED_NEW_OF(type, xnew), \
|
| 937 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 938 |
+
in, \
|
| 939 |
+
CHECKED_PPTR_OF(type, x)))
|
| 940 |
+
|
| 941 |
+
void *ASN1_item_d2i_fp_ex(const ASN1_ITEM *it, FILE *in, void *x,
|
| 942 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 943 |
+
void *ASN1_item_d2i_fp(const ASN1_ITEM *it, FILE *in, void *x);
|
| 944 |
+
int ASN1_i2d_fp(i2d_of_void *i2d, FILE *out, const void *x);
|
| 945 |
+
|
| 946 |
+
# define ASN1_i2d_fp_of(type,i2d,out,x) \
|
| 947 |
+
(ASN1_i2d_fp(CHECKED_I2D_OF(type, i2d), \
|
| 948 |
+
out, \
|
| 949 |
+
CHECKED_PTR_OF(const type, x)))
|
| 950 |
+
|
| 951 |
+
int ASN1_item_i2d_fp(const ASN1_ITEM *it, FILE *out, const void *x);
|
| 952 |
+
int ASN1_STRING_print_ex_fp(FILE *fp, const ASN1_STRING *str, unsigned long flags);
|
| 953 |
+
# endif
|
| 954 |
+
|
| 955 |
+
int ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in);
|
| 956 |
+
|
| 957 |
+
void *ASN1_d2i_bio(void *(*xnew) (void), d2i_of_void *d2i, BIO *in, void **x);
|
| 958 |
+
|
| 959 |
+
# define ASN1_d2i_bio_of(type,xnew,d2i,in,x) \
|
| 960 |
+
((type*)ASN1_d2i_bio( CHECKED_NEW_OF(type, xnew), \
|
| 961 |
+
CHECKED_D2I_OF(type, d2i), \
|
| 962 |
+
in, \
|
| 963 |
+
CHECKED_PPTR_OF(type, x)))
|
| 964 |
+
|
| 965 |
+
void *ASN1_item_d2i_bio_ex(const ASN1_ITEM *it, BIO *in, void *pval,
|
| 966 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 967 |
+
void *ASN1_item_d2i_bio(const ASN1_ITEM *it, BIO *in, void *pval);
|
| 968 |
+
int ASN1_i2d_bio(i2d_of_void *i2d, BIO *out, const void *x);
|
| 969 |
+
|
| 970 |
+
# define ASN1_i2d_bio_of(type,i2d,out,x) \
|
| 971 |
+
(ASN1_i2d_bio(CHECKED_I2D_OF(type, i2d), \
|
| 972 |
+
out, \
|
| 973 |
+
CHECKED_PTR_OF(const type, x)))
|
| 974 |
+
|
| 975 |
+
int ASN1_item_i2d_bio(const ASN1_ITEM *it, BIO *out, const void *x);
|
| 976 |
+
BIO *ASN1_item_i2d_mem_bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
|
| 977 |
+
int ASN1_UTCTIME_print(BIO *fp, const ASN1_UTCTIME *a);
|
| 978 |
+
int ASN1_GENERALIZEDTIME_print(BIO *fp, const ASN1_GENERALIZEDTIME *a);
|
| 979 |
+
int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm);
|
| 980 |
+
int ASN1_TIME_print_ex(BIO *bp, const ASN1_TIME *tm, unsigned long flags);
|
| 981 |
+
int ASN1_STRING_print(BIO *bp, const ASN1_STRING *v);
|
| 982 |
+
int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags);
|
| 983 |
+
int ASN1_buf_print(BIO *bp, const unsigned char *buf, size_t buflen, int off);
|
| 984 |
+
int ASN1_bn_print(BIO *bp, const char *number, const BIGNUM *num,
|
| 985 |
+
unsigned char *buf, int off);
|
| 986 |
+
int ASN1_parse(BIO *bp, const unsigned char *pp, long len, int indent);
|
| 987 |
+
int ASN1_parse_dump(BIO *bp, const unsigned char *pp, long len, int indent,
|
| 988 |
+
int dump);
|
| 989 |
+
const char *ASN1_tag2str(int tag);
|
| 990 |
+
|
| 991 |
+
/* Used to load and write Netscape format cert */
|
| 992 |
+
|
| 993 |
+
int ASN1_UNIVERSALSTRING_to_string(ASN1_UNIVERSALSTRING *s);
|
| 994 |
+
|
| 995 |
+
int ASN1_TYPE_set_octetstring(ASN1_TYPE *a, unsigned char *data, int len);
|
| 996 |
+
int ASN1_TYPE_get_octetstring(const ASN1_TYPE *a, unsigned char *data, int max_len);
|
| 997 |
+
int ASN1_TYPE_set_int_octetstring(ASN1_TYPE *a, long num,
|
| 998 |
+
unsigned char *data, int len);
|
| 999 |
+
int ASN1_TYPE_get_int_octetstring(const ASN1_TYPE *a, long *num,
|
| 1000 |
+
unsigned char *data, int max_len);
|
| 1001 |
+
|
| 1002 |
+
void *ASN1_item_unpack(const ASN1_STRING *oct, const ASN1_ITEM *it);
|
| 1003 |
+
void *ASN1_item_unpack_ex(const ASN1_STRING *oct, const ASN1_ITEM *it,
|
| 1004 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1005 |
+
|
| 1006 |
+
ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it,
|
| 1007 |
+
ASN1_OCTET_STRING **oct);
|
| 1008 |
+
|
| 1009 |
+
void ASN1_STRING_set_default_mask(unsigned long mask);
|
| 1010 |
+
int ASN1_STRING_set_default_mask_asc(const char *p);
|
| 1011 |
+
unsigned long ASN1_STRING_get_default_mask(void);
|
| 1012 |
+
int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1013 |
+
int inform, unsigned long mask);
|
| 1014 |
+
int ASN1_mbstring_ncopy(ASN1_STRING **out, const unsigned char *in, int len,
|
| 1015 |
+
int inform, unsigned long mask,
|
| 1016 |
+
long minsize, long maxsize);
|
| 1017 |
+
|
| 1018 |
+
ASN1_STRING *ASN1_STRING_set_by_NID(ASN1_STRING **out,
|
| 1019 |
+
const unsigned char *in, int inlen,
|
| 1020 |
+
int inform, int nid);
|
| 1021 |
+
ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
|
| 1022 |
+
int ASN1_STRING_TABLE_add(int, long, long, unsigned long, unsigned long);
|
| 1023 |
+
void ASN1_STRING_TABLE_cleanup(void);
|
| 1024 |
+
|
| 1025 |
+
/* ASN1 template functions */
|
| 1026 |
+
|
| 1027 |
+
/* Old API compatible functions */
|
| 1028 |
+
ASN1_VALUE *ASN1_item_new(const ASN1_ITEM *it);
|
| 1029 |
+
ASN1_VALUE *ASN1_item_new_ex(const ASN1_ITEM *it, OSSL_LIB_CTX *libctx,
|
| 1030 |
+
const char *propq);
|
| 1031 |
+
void ASN1_item_free(ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1032 |
+
ASN1_VALUE *ASN1_item_d2i_ex(ASN1_VALUE **val, const unsigned char **in,
|
| 1033 |
+
long len, const ASN1_ITEM *it,
|
| 1034 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1035 |
+
ASN1_VALUE *ASN1_item_d2i(ASN1_VALUE **val, const unsigned char **in,
|
| 1036 |
+
long len, const ASN1_ITEM *it);
|
| 1037 |
+
int ASN1_item_i2d(const ASN1_VALUE *val, unsigned char **out, const ASN1_ITEM *it);
|
| 1038 |
+
int ASN1_item_ndef_i2d(const ASN1_VALUE *val, unsigned char **out,
|
| 1039 |
+
const ASN1_ITEM *it);
|
| 1040 |
+
|
| 1041 |
+
void ASN1_add_oid_module(void);
|
| 1042 |
+
void ASN1_add_stable_module(void);
|
| 1043 |
+
|
| 1044 |
+
ASN1_TYPE *ASN1_generate_nconf(const char *str, CONF *nconf);
|
| 1045 |
+
ASN1_TYPE *ASN1_generate_v3(const char *str, X509V3_CTX *cnf);
|
| 1046 |
+
int ASN1_str2mask(const char *str, unsigned long *pmask);
|
| 1047 |
+
|
| 1048 |
+
/* ASN1 Print flags */
|
| 1049 |
+
|
| 1050 |
+
/* Indicate missing OPTIONAL fields */
|
| 1051 |
+
# define ASN1_PCTX_FLAGS_SHOW_ABSENT 0x001
|
| 1052 |
+
/* Mark start and end of SEQUENCE */
|
| 1053 |
+
# define ASN1_PCTX_FLAGS_SHOW_SEQUENCE 0x002
|
| 1054 |
+
/* Mark start and end of SEQUENCE/SET OF */
|
| 1055 |
+
# define ASN1_PCTX_FLAGS_SHOW_SSOF 0x004
|
| 1056 |
+
/* Show the ASN1 type of primitives */
|
| 1057 |
+
# define ASN1_PCTX_FLAGS_SHOW_TYPE 0x008
|
| 1058 |
+
/* Don't show ASN1 type of ANY */
|
| 1059 |
+
# define ASN1_PCTX_FLAGS_NO_ANY_TYPE 0x010
|
| 1060 |
+
/* Don't show ASN1 type of MSTRINGs */
|
| 1061 |
+
# define ASN1_PCTX_FLAGS_NO_MSTRING_TYPE 0x020
|
| 1062 |
+
/* Don't show field names in SEQUENCE */
|
| 1063 |
+
# define ASN1_PCTX_FLAGS_NO_FIELD_NAME 0x040
|
| 1064 |
+
/* Show structure names of each SEQUENCE field */
|
| 1065 |
+
# define ASN1_PCTX_FLAGS_SHOW_FIELD_STRUCT_NAME 0x080
|
| 1066 |
+
/* Don't show structure name even at top level */
|
| 1067 |
+
# define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
|
| 1068 |
+
|
| 1069 |
+
int ASN1_item_print(BIO *out, const ASN1_VALUE *ifld, int indent,
|
| 1070 |
+
const ASN1_ITEM *it, const ASN1_PCTX *pctx);
|
| 1071 |
+
ASN1_PCTX *ASN1_PCTX_new(void);
|
| 1072 |
+
void ASN1_PCTX_free(ASN1_PCTX *p);
|
| 1073 |
+
unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p);
|
| 1074 |
+
void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1075 |
+
unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p);
|
| 1076 |
+
void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1077 |
+
unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p);
|
| 1078 |
+
void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1079 |
+
unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p);
|
| 1080 |
+
void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1081 |
+
unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p);
|
| 1082 |
+
void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags);
|
| 1083 |
+
|
| 1084 |
+
ASN1_SCTX *ASN1_SCTX_new(int (*scan_cb) (ASN1_SCTX *ctx));
|
| 1085 |
+
void ASN1_SCTX_free(ASN1_SCTX *p);
|
| 1086 |
+
const ASN1_ITEM *ASN1_SCTX_get_item(ASN1_SCTX *p);
|
| 1087 |
+
const ASN1_TEMPLATE *ASN1_SCTX_get_template(ASN1_SCTX *p);
|
| 1088 |
+
unsigned long ASN1_SCTX_get_flags(ASN1_SCTX *p);
|
| 1089 |
+
void ASN1_SCTX_set_app_data(ASN1_SCTX *p, void *data);
|
| 1090 |
+
void *ASN1_SCTX_get_app_data(ASN1_SCTX *p);
|
| 1091 |
+
|
| 1092 |
+
const BIO_METHOD *BIO_f_asn1(void);
|
| 1093 |
+
|
| 1094 |
+
/* cannot constify val because of CMS_stream() */
|
| 1095 |
+
BIO *BIO_new_NDEF(BIO *out, ASN1_VALUE *val, const ASN1_ITEM *it);
|
| 1096 |
+
|
| 1097 |
+
int i2d_ASN1_bio_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1098 |
+
const ASN1_ITEM *it);
|
| 1099 |
+
int PEM_write_bio_ASN1_stream(BIO *out, ASN1_VALUE *val, BIO *in, int flags,
|
| 1100 |
+
const char *hdr, const ASN1_ITEM *it);
|
| 1101 |
+
/* cannot constify val because of CMS_dataFinal() */
|
| 1102 |
+
int SMIME_write_ASN1(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1103 |
+
int ctype_nid, int econt_nid,
|
| 1104 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it);
|
| 1105 |
+
int SMIME_write_ASN1_ex(BIO *bio, ASN1_VALUE *val, BIO *data, int flags,
|
| 1106 |
+
int ctype_nid, int econt_nid,
|
| 1107 |
+
STACK_OF(X509_ALGOR) *mdalgs, const ASN1_ITEM *it,
|
| 1108 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1109 |
+
ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BIO **bcont, const ASN1_ITEM *it);
|
| 1110 |
+
ASN1_VALUE *SMIME_read_ASN1_ex(BIO *bio, int flags, BIO **bcont,
|
| 1111 |
+
const ASN1_ITEM *it, ASN1_VALUE **x,
|
| 1112 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 1113 |
+
int SMIME_crlf_copy(BIO *in, BIO *out, int flags);
|
| 1114 |
+
int SMIME_text(BIO *in, BIO *out);
|
| 1115 |
+
|
| 1116 |
+
const ASN1_ITEM *ASN1_ITEM_lookup(const char *name);
|
| 1117 |
+
const ASN1_ITEM *ASN1_ITEM_get(size_t i);
|
| 1118 |
+
|
| 1119 |
+
/* Legacy compatibility */
|
| 1120 |
+
# define DECLARE_ASN1_FUNCTIONS_fname(type, itname, name) \
|
| 1121 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS_name(type, name) \
|
| 1122 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, itname, name)
|
| 1123 |
+
# define DECLARE_ASN1_FUNCTIONS_const(type) DECLARE_ASN1_FUNCTIONS(type)
|
| 1124 |
+
# define DECLARE_ASN1_ENCODE_FUNCTIONS_const(type, name) \
|
| 1125 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(type, name)
|
| 1126 |
+
# define I2D_OF_const(type) I2D_OF(type)
|
| 1127 |
+
# define ASN1_dup_of_const(type,i2d,d2i,x) ASN1_dup_of(type,i2d,d2i,x)
|
| 1128 |
+
# define ASN1_i2d_fp_of_const(type,i2d,out,x) ASN1_i2d_fp_of(type,i2d,out,x)
|
| 1129 |
+
# define ASN1_i2d_bio_of_const(type,i2d,out,x) ASN1_i2d_bio_of(type,i2d,out,x)
|
| 1130 |
+
|
| 1131 |
+
# ifdef __cplusplus
|
| 1132 |
+
}
|
| 1133 |
+
# endif
|
| 1134 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/asn1t.h
ADDED
|
@@ -0,0 +1,946 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/asn1t.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_ASN1T_H
|
| 16 |
+
# define OPENSSL_ASN1T_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_ASN1T_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <stddef.h>
|
| 25 |
+
# include <openssl/e_os2.h>
|
| 26 |
+
# include <openssl/asn1.h>
|
| 27 |
+
|
| 28 |
+
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
| 29 |
+
# undef OPENSSL_EXTERN
|
| 30 |
+
# define OPENSSL_EXTERN OPENSSL_EXPORT
|
| 31 |
+
# endif
|
| 32 |
+
|
| 33 |
+
/* ASN1 template defines, structures and functions */
|
| 34 |
+
|
| 35 |
+
#ifdef __cplusplus
|
| 36 |
+
extern "C" {
|
| 37 |
+
#endif
|
| 38 |
+
|
| 39 |
+
/*-
|
| 40 |
+
* These are the possible values for the itype field of the
|
| 41 |
+
* ASN1_ITEM structure and determine how it is interpreted.
|
| 42 |
+
*
|
| 43 |
+
* For PRIMITIVE types the underlying type
|
| 44 |
+
* determines the behaviour if items is NULL.
|
| 45 |
+
*
|
| 46 |
+
* Otherwise templates must contain a single
|
| 47 |
+
* template and the type is treated in the
|
| 48 |
+
* same way as the type specified in the template.
|
| 49 |
+
*
|
| 50 |
+
* For SEQUENCE types the templates field points
|
| 51 |
+
* to the members, the size field is the
|
| 52 |
+
* structure size.
|
| 53 |
+
*
|
| 54 |
+
* For CHOICE types the templates field points
|
| 55 |
+
* to each possible member (typically a union)
|
| 56 |
+
* and the 'size' field is the offset of the
|
| 57 |
+
* selector.
|
| 58 |
+
*
|
| 59 |
+
* The 'funcs' field is used for application-specific
|
| 60 |
+
* data and functions.
|
| 61 |
+
*
|
| 62 |
+
* The EXTERN type uses a new style d2i/i2d.
|
| 63 |
+
* The new style should be used where possible
|
| 64 |
+
* because it avoids things like the d2i IMPLICIT
|
| 65 |
+
* hack.
|
| 66 |
+
*
|
| 67 |
+
* MSTRING is a multiple string type, it is used
|
| 68 |
+
* for a CHOICE of character strings where the
|
| 69 |
+
* actual strings all occupy an ASN1_STRING
|
| 70 |
+
* structure. In this case the 'utype' field
|
| 71 |
+
* has a special meaning, it is used as a mask
|
| 72 |
+
* of acceptable types using the B_ASN1 constants.
|
| 73 |
+
*
|
| 74 |
+
* NDEF_SEQUENCE is the same as SEQUENCE except
|
| 75 |
+
* that it will use indefinite length constructed
|
| 76 |
+
* encoding if requested.
|
| 77 |
+
*
|
| 78 |
+
*/
|
| 79 |
+
|
| 80 |
+
# define ASN1_ITYPE_PRIMITIVE 0x0
|
| 81 |
+
# define ASN1_ITYPE_SEQUENCE 0x1
|
| 82 |
+
# define ASN1_ITYPE_CHOICE 0x2
|
| 83 |
+
/* unused value 0x3 */
|
| 84 |
+
# define ASN1_ITYPE_EXTERN 0x4
|
| 85 |
+
# define ASN1_ITYPE_MSTRING 0x5
|
| 86 |
+
# define ASN1_ITYPE_NDEF_SEQUENCE 0x6
|
| 87 |
+
|
| 88 |
+
/* Macro to obtain ASN1_ADB pointer from a type (only used internally) */
|
| 89 |
+
# define ASN1_ADB_ptr(iptr) ((const ASN1_ADB *)((iptr)()))
|
| 90 |
+
|
| 91 |
+
/* Macros for start and end of ASN1_ITEM definition */
|
| 92 |
+
|
| 93 |
+
# define ASN1_ITEM_start(itname) \
|
| 94 |
+
const ASN1_ITEM * itname##_it(void) \
|
| 95 |
+
{ \
|
| 96 |
+
static const ASN1_ITEM local_it = {
|
| 97 |
+
|
| 98 |
+
# define static_ASN1_ITEM_start(itname) \
|
| 99 |
+
static ASN1_ITEM_start(itname)
|
| 100 |
+
|
| 101 |
+
# define ASN1_ITEM_end(itname) \
|
| 102 |
+
}; \
|
| 103 |
+
return &local_it; \
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
/* Macros to aid ASN1 template writing */
|
| 107 |
+
|
| 108 |
+
# define ASN1_ITEM_TEMPLATE(tname) \
|
| 109 |
+
static const ASN1_TEMPLATE tname##_item_tt
|
| 110 |
+
|
| 111 |
+
# define ASN1_ITEM_TEMPLATE_END(tname) \
|
| 112 |
+
;\
|
| 113 |
+
ASN1_ITEM_start(tname) \
|
| 114 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 115 |
+
-1,\
|
| 116 |
+
&tname##_item_tt,\
|
| 117 |
+
0,\
|
| 118 |
+
NULL,\
|
| 119 |
+
0,\
|
| 120 |
+
#tname \
|
| 121 |
+
ASN1_ITEM_end(tname)
|
| 122 |
+
# define static_ASN1_ITEM_TEMPLATE_END(tname) \
|
| 123 |
+
;\
|
| 124 |
+
static_ASN1_ITEM_start(tname) \
|
| 125 |
+
ASN1_ITYPE_PRIMITIVE,\
|
| 126 |
+
-1,\
|
| 127 |
+
&tname##_item_tt,\
|
| 128 |
+
0,\
|
| 129 |
+
NULL,\
|
| 130 |
+
0,\
|
| 131 |
+
#tname \
|
| 132 |
+
ASN1_ITEM_end(tname)
|
| 133 |
+
|
| 134 |
+
/* This is a ASN1 type which just embeds a template */
|
| 135 |
+
|
| 136 |
+
/*-
|
| 137 |
+
* This pair helps declare a SEQUENCE. We can do:
|
| 138 |
+
*
|
| 139 |
+
* ASN1_SEQUENCE(stname) = {
|
| 140 |
+
* ... SEQUENCE components ...
|
| 141 |
+
* } ASN1_SEQUENCE_END(stname)
|
| 142 |
+
*
|
| 143 |
+
* This will produce an ASN1_ITEM called stname_it
|
| 144 |
+
* for a structure called stname.
|
| 145 |
+
*
|
| 146 |
+
* If you want the same structure but a different
|
| 147 |
+
* name then use:
|
| 148 |
+
*
|
| 149 |
+
* ASN1_SEQUENCE(itname) = {
|
| 150 |
+
* ... SEQUENCE components ...
|
| 151 |
+
* } ASN1_SEQUENCE_END_name(stname, itname)
|
| 152 |
+
*
|
| 153 |
+
* This will create an item called itname_it using
|
| 154 |
+
* a structure called stname.
|
| 155 |
+
*/
|
| 156 |
+
|
| 157 |
+
# define ASN1_SEQUENCE(tname) \
|
| 158 |
+
static const ASN1_TEMPLATE tname##_seq_tt[]
|
| 159 |
+
|
| 160 |
+
# define ASN1_SEQUENCE_END(stname) ASN1_SEQUENCE_END_name(stname, stname)
|
| 161 |
+
|
| 162 |
+
# define static_ASN1_SEQUENCE_END(stname) static_ASN1_SEQUENCE_END_name(stname, stname)
|
| 163 |
+
|
| 164 |
+
# define ASN1_SEQUENCE_END_name(stname, tname) \
|
| 165 |
+
;\
|
| 166 |
+
ASN1_ITEM_start(tname) \
|
| 167 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 168 |
+
V_ASN1_SEQUENCE,\
|
| 169 |
+
tname##_seq_tt,\
|
| 170 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 171 |
+
NULL,\
|
| 172 |
+
sizeof(stname),\
|
| 173 |
+
#tname \
|
| 174 |
+
ASN1_ITEM_end(tname)
|
| 175 |
+
|
| 176 |
+
# define static_ASN1_SEQUENCE_END_name(stname, tname) \
|
| 177 |
+
;\
|
| 178 |
+
static_ASN1_ITEM_start(tname) \
|
| 179 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 180 |
+
V_ASN1_SEQUENCE,\
|
| 181 |
+
tname##_seq_tt,\
|
| 182 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 183 |
+
NULL,\
|
| 184 |
+
sizeof(stname),\
|
| 185 |
+
#stname \
|
| 186 |
+
ASN1_ITEM_end(tname)
|
| 187 |
+
|
| 188 |
+
# define ASN1_NDEF_SEQUENCE(tname) \
|
| 189 |
+
ASN1_SEQUENCE(tname)
|
| 190 |
+
|
| 191 |
+
# define ASN1_NDEF_SEQUENCE_cb(tname, cb) \
|
| 192 |
+
ASN1_SEQUENCE_cb(tname, cb)
|
| 193 |
+
|
| 194 |
+
# define ASN1_SEQUENCE_cb(tname, cb) \
|
| 195 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 196 |
+
ASN1_SEQUENCE(tname)
|
| 197 |
+
|
| 198 |
+
# define ASN1_SEQUENCE_const_cb(tname, const_cb) \
|
| 199 |
+
static const ASN1_AUX tname##_aux = \
|
| 200 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, NULL, 0, const_cb}; \
|
| 201 |
+
ASN1_SEQUENCE(tname)
|
| 202 |
+
|
| 203 |
+
# define ASN1_SEQUENCE_cb_const_cb(tname, cb, const_cb) \
|
| 204 |
+
static const ASN1_AUX tname##_aux = \
|
| 205 |
+
{NULL, ASN1_AFLG_CONST_CB, 0, 0, cb, 0, const_cb}; \
|
| 206 |
+
ASN1_SEQUENCE(tname)
|
| 207 |
+
|
| 208 |
+
# define ASN1_SEQUENCE_ref(tname, cb) \
|
| 209 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(tname, references), offsetof(tname, lock), cb, 0, NULL}; \
|
| 210 |
+
ASN1_SEQUENCE(tname)
|
| 211 |
+
|
| 212 |
+
# define ASN1_SEQUENCE_enc(tname, enc, cb) \
|
| 213 |
+
static const ASN1_AUX tname##_aux = {NULL, ASN1_AFLG_ENCODING, 0, 0, cb, offsetof(tname, enc), NULL}; \
|
| 214 |
+
ASN1_SEQUENCE(tname)
|
| 215 |
+
|
| 216 |
+
# define ASN1_NDEF_SEQUENCE_END(tname) \
|
| 217 |
+
;\
|
| 218 |
+
ASN1_ITEM_start(tname) \
|
| 219 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 220 |
+
V_ASN1_SEQUENCE,\
|
| 221 |
+
tname##_seq_tt,\
|
| 222 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 223 |
+
NULL,\
|
| 224 |
+
sizeof(tname),\
|
| 225 |
+
#tname \
|
| 226 |
+
ASN1_ITEM_end(tname)
|
| 227 |
+
# define static_ASN1_NDEF_SEQUENCE_END(tname) \
|
| 228 |
+
;\
|
| 229 |
+
static_ASN1_ITEM_start(tname) \
|
| 230 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 231 |
+
V_ASN1_SEQUENCE,\
|
| 232 |
+
tname##_seq_tt,\
|
| 233 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 234 |
+
NULL,\
|
| 235 |
+
sizeof(tname),\
|
| 236 |
+
#tname \
|
| 237 |
+
ASN1_ITEM_end(tname)
|
| 238 |
+
|
| 239 |
+
|
| 240 |
+
# define ASN1_SEQUENCE_END_enc(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 241 |
+
|
| 242 |
+
# define ASN1_SEQUENCE_END_cb(stname, tname) ASN1_SEQUENCE_END_ref(stname, tname)
|
| 243 |
+
# define static_ASN1_SEQUENCE_END_cb(stname, tname) static_ASN1_SEQUENCE_END_ref(stname, tname)
|
| 244 |
+
|
| 245 |
+
# define ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 246 |
+
;\
|
| 247 |
+
ASN1_ITEM_start(tname) \
|
| 248 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 249 |
+
V_ASN1_SEQUENCE,\
|
| 250 |
+
tname##_seq_tt,\
|
| 251 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 252 |
+
&tname##_aux,\
|
| 253 |
+
sizeof(stname),\
|
| 254 |
+
#tname \
|
| 255 |
+
ASN1_ITEM_end(tname)
|
| 256 |
+
# define static_ASN1_SEQUENCE_END_ref(stname, tname) \
|
| 257 |
+
;\
|
| 258 |
+
static_ASN1_ITEM_start(tname) \
|
| 259 |
+
ASN1_ITYPE_SEQUENCE,\
|
| 260 |
+
V_ASN1_SEQUENCE,\
|
| 261 |
+
tname##_seq_tt,\
|
| 262 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 263 |
+
&tname##_aux,\
|
| 264 |
+
sizeof(stname),\
|
| 265 |
+
#stname \
|
| 266 |
+
ASN1_ITEM_end(tname)
|
| 267 |
+
|
| 268 |
+
# define ASN1_NDEF_SEQUENCE_END_cb(stname, tname) \
|
| 269 |
+
;\
|
| 270 |
+
ASN1_ITEM_start(tname) \
|
| 271 |
+
ASN1_ITYPE_NDEF_SEQUENCE,\
|
| 272 |
+
V_ASN1_SEQUENCE,\
|
| 273 |
+
tname##_seq_tt,\
|
| 274 |
+
sizeof(tname##_seq_tt) / sizeof(ASN1_TEMPLATE),\
|
| 275 |
+
&tname##_aux,\
|
| 276 |
+
sizeof(stname),\
|
| 277 |
+
#stname \
|
| 278 |
+
ASN1_ITEM_end(tname)
|
| 279 |
+
|
| 280 |
+
/*-
|
| 281 |
+
* This pair helps declare a CHOICE type. We can do:
|
| 282 |
+
*
|
| 283 |
+
* ASN1_CHOICE(chname) = {
|
| 284 |
+
* ... CHOICE options ...
|
| 285 |
+
* ASN1_CHOICE_END(chname)
|
| 286 |
+
*
|
| 287 |
+
* This will produce an ASN1_ITEM called chname_it
|
| 288 |
+
* for a structure called chname. The structure
|
| 289 |
+
* definition must look like this:
|
| 290 |
+
* typedef struct {
|
| 291 |
+
* int type;
|
| 292 |
+
* union {
|
| 293 |
+
* ASN1_SOMETHING *opt1;
|
| 294 |
+
* ASN1_SOMEOTHER *opt2;
|
| 295 |
+
* } value;
|
| 296 |
+
* } chname;
|
| 297 |
+
*
|
| 298 |
+
* the name of the selector must be 'type'.
|
| 299 |
+
* to use an alternative selector name use the
|
| 300 |
+
* ASN1_CHOICE_END_selector() version.
|
| 301 |
+
*/
|
| 302 |
+
|
| 303 |
+
# define ASN1_CHOICE(tname) \
|
| 304 |
+
static const ASN1_TEMPLATE tname##_ch_tt[]
|
| 305 |
+
|
| 306 |
+
# define ASN1_CHOICE_cb(tname, cb) \
|
| 307 |
+
static const ASN1_AUX tname##_aux = {NULL, 0, 0, 0, cb, 0, NULL}; \
|
| 308 |
+
ASN1_CHOICE(tname)
|
| 309 |
+
|
| 310 |
+
# define ASN1_CHOICE_END(stname) ASN1_CHOICE_END_name(stname, stname)
|
| 311 |
+
|
| 312 |
+
# define static_ASN1_CHOICE_END(stname) static_ASN1_CHOICE_END_name(stname, stname)
|
| 313 |
+
|
| 314 |
+
# define ASN1_CHOICE_END_name(stname, tname) ASN1_CHOICE_END_selector(stname, tname, type)
|
| 315 |
+
|
| 316 |
+
# define static_ASN1_CHOICE_END_name(stname, tname) static_ASN1_CHOICE_END_selector(stname, tname, type)
|
| 317 |
+
|
| 318 |
+
# define ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 319 |
+
;\
|
| 320 |
+
ASN1_ITEM_start(tname) \
|
| 321 |
+
ASN1_ITYPE_CHOICE,\
|
| 322 |
+
offsetof(stname,selname) ,\
|
| 323 |
+
tname##_ch_tt,\
|
| 324 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 325 |
+
NULL,\
|
| 326 |
+
sizeof(stname),\
|
| 327 |
+
#stname \
|
| 328 |
+
ASN1_ITEM_end(tname)
|
| 329 |
+
|
| 330 |
+
# define static_ASN1_CHOICE_END_selector(stname, tname, selname) \
|
| 331 |
+
;\
|
| 332 |
+
static_ASN1_ITEM_start(tname) \
|
| 333 |
+
ASN1_ITYPE_CHOICE,\
|
| 334 |
+
offsetof(stname,selname) ,\
|
| 335 |
+
tname##_ch_tt,\
|
| 336 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 337 |
+
NULL,\
|
| 338 |
+
sizeof(stname),\
|
| 339 |
+
#stname \
|
| 340 |
+
ASN1_ITEM_end(tname)
|
| 341 |
+
|
| 342 |
+
# define ASN1_CHOICE_END_cb(stname, tname, selname) \
|
| 343 |
+
;\
|
| 344 |
+
ASN1_ITEM_start(tname) \
|
| 345 |
+
ASN1_ITYPE_CHOICE,\
|
| 346 |
+
offsetof(stname,selname) ,\
|
| 347 |
+
tname##_ch_tt,\
|
| 348 |
+
sizeof(tname##_ch_tt) / sizeof(ASN1_TEMPLATE),\
|
| 349 |
+
&tname##_aux,\
|
| 350 |
+
sizeof(stname),\
|
| 351 |
+
#stname \
|
| 352 |
+
ASN1_ITEM_end(tname)
|
| 353 |
+
|
| 354 |
+
/* This helps with the template wrapper form of ASN1_ITEM */
|
| 355 |
+
|
| 356 |
+
# define ASN1_EX_TEMPLATE_TYPE(flags, tag, name, type) { \
|
| 357 |
+
(flags), (tag), 0,\
|
| 358 |
+
#name, ASN1_ITEM_ref(type) }
|
| 359 |
+
|
| 360 |
+
/* These help with SEQUENCE or CHOICE components */
|
| 361 |
+
|
| 362 |
+
/* used to declare other types */
|
| 363 |
+
|
| 364 |
+
# define ASN1_EX_TYPE(flags, tag, stname, field, type) { \
|
| 365 |
+
(flags), (tag), offsetof(stname, field),\
|
| 366 |
+
#field, ASN1_ITEM_ref(type) }
|
| 367 |
+
|
| 368 |
+
/* implicit and explicit helper macros */
|
| 369 |
+
|
| 370 |
+
# define ASN1_IMP_EX(stname, field, type, tag, ex) \
|
| 371 |
+
ASN1_EX_TYPE(ASN1_TFLG_IMPLICIT | (ex), tag, stname, field, type)
|
| 372 |
+
|
| 373 |
+
# define ASN1_EXP_EX(stname, field, type, tag, ex) \
|
| 374 |
+
ASN1_EX_TYPE(ASN1_TFLG_EXPLICIT | (ex), tag, stname, field, type)
|
| 375 |
+
|
| 376 |
+
/* Any defined by macros: the field used is in the table itself */
|
| 377 |
+
|
| 378 |
+
# define ASN1_ADB_OBJECT(tblname) { ASN1_TFLG_ADB_OID, -1, 0, #tblname, tblname##_adb }
|
| 379 |
+
# define ASN1_ADB_INTEGER(tblname) { ASN1_TFLG_ADB_INT, -1, 0, #tblname, tblname##_adb }
|
| 380 |
+
|
| 381 |
+
/* Plain simple type */
|
| 382 |
+
# define ASN1_SIMPLE(stname, field, type) ASN1_EX_TYPE(0,0, stname, field, type)
|
| 383 |
+
/* Embedded simple type */
|
| 384 |
+
# define ASN1_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_EMBED,0, stname, field, type)
|
| 385 |
+
|
| 386 |
+
/* OPTIONAL simple type */
|
| 387 |
+
# define ASN1_OPT(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 388 |
+
# define ASN1_OPT_EMBED(stname, field, type) ASN1_EX_TYPE(ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED, 0, stname, field, type)
|
| 389 |
+
|
| 390 |
+
/* IMPLICIT tagged simple type */
|
| 391 |
+
# define ASN1_IMP(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, 0)
|
| 392 |
+
# define ASN1_IMP_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 393 |
+
|
| 394 |
+
/* IMPLICIT tagged OPTIONAL simple type */
|
| 395 |
+
# define ASN1_IMP_OPT(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 396 |
+
# define ASN1_IMP_OPT_EMBED(stname, field, type, tag) ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 397 |
+
|
| 398 |
+
/* Same as above but EXPLICIT */
|
| 399 |
+
|
| 400 |
+
# define ASN1_EXP(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, 0)
|
| 401 |
+
# define ASN1_EXP_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_EMBED)
|
| 402 |
+
# define ASN1_EXP_OPT(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL)
|
| 403 |
+
# define ASN1_EXP_OPT_EMBED(stname, field, type, tag) ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_EMBED)
|
| 404 |
+
|
| 405 |
+
/* SEQUENCE OF type */
|
| 406 |
+
# define ASN1_SEQUENCE_OF(stname, field, type) \
|
| 407 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF, 0, stname, field, type)
|
| 408 |
+
|
| 409 |
+
/* OPTIONAL SEQUENCE OF */
|
| 410 |
+
# define ASN1_SEQUENCE_OF_OPT(stname, field, type) \
|
| 411 |
+
ASN1_EX_TYPE(ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 412 |
+
|
| 413 |
+
/* Same as above but for SET OF */
|
| 414 |
+
|
| 415 |
+
# define ASN1_SET_OF(stname, field, type) \
|
| 416 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF, 0, stname, field, type)
|
| 417 |
+
|
| 418 |
+
# define ASN1_SET_OF_OPT(stname, field, type) \
|
| 419 |
+
ASN1_EX_TYPE(ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL, 0, stname, field, type)
|
| 420 |
+
|
| 421 |
+
/* Finally compound types of SEQUENCE, SET, IMPLICIT, EXPLICIT and OPTIONAL */
|
| 422 |
+
|
| 423 |
+
# define ASN1_IMP_SET_OF(stname, field, type, tag) \
|
| 424 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 425 |
+
|
| 426 |
+
# define ASN1_EXP_SET_OF(stname, field, type, tag) \
|
| 427 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF)
|
| 428 |
+
|
| 429 |
+
# define ASN1_IMP_SET_OF_OPT(stname, field, type, tag) \
|
| 430 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 431 |
+
|
| 432 |
+
# define ASN1_EXP_SET_OF_OPT(stname, field, type, tag) \
|
| 433 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SET_OF|ASN1_TFLG_OPTIONAL)
|
| 434 |
+
|
| 435 |
+
# define ASN1_IMP_SEQUENCE_OF(stname, field, type, tag) \
|
| 436 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 437 |
+
|
| 438 |
+
# define ASN1_IMP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 439 |
+
ASN1_IMP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 440 |
+
|
| 441 |
+
# define ASN1_EXP_SEQUENCE_OF(stname, field, type, tag) \
|
| 442 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF)
|
| 443 |
+
|
| 444 |
+
# define ASN1_EXP_SEQUENCE_OF_OPT(stname, field, type, tag) \
|
| 445 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_SEQUENCE_OF|ASN1_TFLG_OPTIONAL)
|
| 446 |
+
|
| 447 |
+
/* EXPLICIT using indefinite length constructed form */
|
| 448 |
+
# define ASN1_NDEF_EXP(stname, field, type, tag) \
|
| 449 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_NDEF)
|
| 450 |
+
|
| 451 |
+
/* EXPLICIT OPTIONAL using indefinite length constructed form */
|
| 452 |
+
# define ASN1_NDEF_EXP_OPT(stname, field, type, tag) \
|
| 453 |
+
ASN1_EXP_EX(stname, field, type, tag, ASN1_TFLG_OPTIONAL|ASN1_TFLG_NDEF)
|
| 454 |
+
|
| 455 |
+
/* Macros for the ASN1_ADB structure */
|
| 456 |
+
|
| 457 |
+
# define ASN1_ADB(name) \
|
| 458 |
+
static const ASN1_ADB_TABLE name##_adbtbl[]
|
| 459 |
+
|
| 460 |
+
# define ASN1_ADB_END(name, flags, field, adb_cb, def, none) \
|
| 461 |
+
;\
|
| 462 |
+
static const ASN1_ITEM *name##_adb(void) \
|
| 463 |
+
{ \
|
| 464 |
+
static const ASN1_ADB internal_adb = \
|
| 465 |
+
{\
|
| 466 |
+
flags,\
|
| 467 |
+
offsetof(name, field),\
|
| 468 |
+
adb_cb,\
|
| 469 |
+
name##_adbtbl,\
|
| 470 |
+
sizeof(name##_adbtbl) / sizeof(ASN1_ADB_TABLE),\
|
| 471 |
+
def,\
|
| 472 |
+
none\
|
| 473 |
+
}; \
|
| 474 |
+
return (const ASN1_ITEM *) &internal_adb; \
|
| 475 |
+
} \
|
| 476 |
+
void dummy_function(void)
|
| 477 |
+
|
| 478 |
+
# define ADB_ENTRY(val, template) {val, template}
|
| 479 |
+
|
| 480 |
+
# define ASN1_ADB_TEMPLATE(name) \
|
| 481 |
+
static const ASN1_TEMPLATE name##_tt
|
| 482 |
+
|
| 483 |
+
/*
|
| 484 |
+
* This is the ASN1 template structure that defines a wrapper round the
|
| 485 |
+
* actual type. It determines the actual position of the field in the value
|
| 486 |
+
* structure, various flags such as OPTIONAL and the field name.
|
| 487 |
+
*/
|
| 488 |
+
|
| 489 |
+
struct ASN1_TEMPLATE_st {
|
| 490 |
+
unsigned long flags; /* Various flags */
|
| 491 |
+
long tag; /* tag, not used if no tagging */
|
| 492 |
+
unsigned long offset; /* Offset of this field in structure */
|
| 493 |
+
const char *field_name; /* Field name */
|
| 494 |
+
ASN1_ITEM_EXP *item; /* Relevant ASN1_ITEM or ASN1_ADB */
|
| 495 |
+
};
|
| 496 |
+
|
| 497 |
+
/* Macro to extract ASN1_ITEM and ASN1_ADB pointer from ASN1_TEMPLATE */
|
| 498 |
+
|
| 499 |
+
# define ASN1_TEMPLATE_item(t) (t->item_ptr)
|
| 500 |
+
# define ASN1_TEMPLATE_adb(t) (t->item_ptr)
|
| 501 |
+
|
| 502 |
+
typedef struct ASN1_ADB_TABLE_st ASN1_ADB_TABLE;
|
| 503 |
+
typedef struct ASN1_ADB_st ASN1_ADB;
|
| 504 |
+
|
| 505 |
+
struct ASN1_ADB_st {
|
| 506 |
+
unsigned long flags; /* Various flags */
|
| 507 |
+
unsigned long offset; /* Offset of selector field */
|
| 508 |
+
int (*adb_cb)(long *psel); /* Application callback */
|
| 509 |
+
const ASN1_ADB_TABLE *tbl; /* Table of possible types */
|
| 510 |
+
long tblcount; /* Number of entries in tbl */
|
| 511 |
+
const ASN1_TEMPLATE *default_tt; /* Type to use if no match */
|
| 512 |
+
const ASN1_TEMPLATE *null_tt; /* Type to use if selector is NULL */
|
| 513 |
+
};
|
| 514 |
+
|
| 515 |
+
struct ASN1_ADB_TABLE_st {
|
| 516 |
+
long value; /* NID for an object or value for an int */
|
| 517 |
+
const ASN1_TEMPLATE tt; /* item for this value */
|
| 518 |
+
};
|
| 519 |
+
|
| 520 |
+
/* template flags */
|
| 521 |
+
|
| 522 |
+
/* Field is optional */
|
| 523 |
+
# define ASN1_TFLG_OPTIONAL (0x1)
|
| 524 |
+
|
| 525 |
+
/* Field is a SET OF */
|
| 526 |
+
# define ASN1_TFLG_SET_OF (0x1 << 1)
|
| 527 |
+
|
| 528 |
+
/* Field is a SEQUENCE OF */
|
| 529 |
+
# define ASN1_TFLG_SEQUENCE_OF (0x2 << 1)
|
| 530 |
+
|
| 531 |
+
/*
|
| 532 |
+
* Special case: this refers to a SET OF that will be sorted into DER order
|
| 533 |
+
* when encoded *and* the corresponding STACK will be modified to match the
|
| 534 |
+
* new order.
|
| 535 |
+
*/
|
| 536 |
+
# define ASN1_TFLG_SET_ORDER (0x3 << 1)
|
| 537 |
+
|
| 538 |
+
/* Mask for SET OF or SEQUENCE OF */
|
| 539 |
+
# define ASN1_TFLG_SK_MASK (0x3 << 1)
|
| 540 |
+
|
| 541 |
+
/*
|
| 542 |
+
* These flags mean the tag should be taken from the tag field. If EXPLICIT
|
| 543 |
+
* then the underlying type is used for the inner tag.
|
| 544 |
+
*/
|
| 545 |
+
|
| 546 |
+
/* IMPLICIT tagging */
|
| 547 |
+
# define ASN1_TFLG_IMPTAG (0x1 << 3)
|
| 548 |
+
|
| 549 |
+
/* EXPLICIT tagging, inner tag from underlying type */
|
| 550 |
+
# define ASN1_TFLG_EXPTAG (0x2 << 3)
|
| 551 |
+
|
| 552 |
+
# define ASN1_TFLG_TAG_MASK (0x3 << 3)
|
| 553 |
+
|
| 554 |
+
/* context specific IMPLICIT */
|
| 555 |
+
# define ASN1_TFLG_IMPLICIT (ASN1_TFLG_IMPTAG|ASN1_TFLG_CONTEXT)
|
| 556 |
+
|
| 557 |
+
/* context specific EXPLICIT */
|
| 558 |
+
# define ASN1_TFLG_EXPLICIT (ASN1_TFLG_EXPTAG|ASN1_TFLG_CONTEXT)
|
| 559 |
+
|
| 560 |
+
/*
|
| 561 |
+
* If tagging is in force these determine the type of tag to use. Otherwise
|
| 562 |
+
* the tag is determined by the underlying type. These values reflect the
|
| 563 |
+
* actual octet format.
|
| 564 |
+
*/
|
| 565 |
+
|
| 566 |
+
/* Universal tag */
|
| 567 |
+
# define ASN1_TFLG_UNIVERSAL (0x0<<6)
|
| 568 |
+
/* Application tag */
|
| 569 |
+
# define ASN1_TFLG_APPLICATION (0x1<<6)
|
| 570 |
+
/* Context specific tag */
|
| 571 |
+
# define ASN1_TFLG_CONTEXT (0x2<<6)
|
| 572 |
+
/* Private tag */
|
| 573 |
+
# define ASN1_TFLG_PRIVATE (0x3<<6)
|
| 574 |
+
|
| 575 |
+
# define ASN1_TFLG_TAG_CLASS (0x3<<6)
|
| 576 |
+
|
| 577 |
+
/*
|
| 578 |
+
* These are for ANY DEFINED BY type. In this case the 'item' field points to
|
| 579 |
+
* an ASN1_ADB structure which contains a table of values to decode the
|
| 580 |
+
* relevant type
|
| 581 |
+
*/
|
| 582 |
+
|
| 583 |
+
# define ASN1_TFLG_ADB_MASK (0x3<<8)
|
| 584 |
+
|
| 585 |
+
# define ASN1_TFLG_ADB_OID (0x1<<8)
|
| 586 |
+
|
| 587 |
+
# define ASN1_TFLG_ADB_INT (0x1<<9)
|
| 588 |
+
|
| 589 |
+
/*
|
| 590 |
+
* This flag when present in a SEQUENCE OF, SET OF or EXPLICIT causes
|
| 591 |
+
* indefinite length constructed encoding to be used if required.
|
| 592 |
+
*/
|
| 593 |
+
|
| 594 |
+
# define ASN1_TFLG_NDEF (0x1<<11)
|
| 595 |
+
|
| 596 |
+
/* Field is embedded and not a pointer */
|
| 597 |
+
# define ASN1_TFLG_EMBED (0x1 << 12)
|
| 598 |
+
|
| 599 |
+
/* This is the actual ASN1 item itself */
|
| 600 |
+
|
| 601 |
+
struct ASN1_ITEM_st {
|
| 602 |
+
char itype; /* The item type, primitive, SEQUENCE, CHOICE
|
| 603 |
+
* or extern */
|
| 604 |
+
long utype; /* underlying type */
|
| 605 |
+
const ASN1_TEMPLATE *templates; /* If SEQUENCE or CHOICE this contains
|
| 606 |
+
* the contents */
|
| 607 |
+
long tcount; /* Number of templates if SEQUENCE or CHOICE */
|
| 608 |
+
const void *funcs; /* further data and type-specific functions */
|
| 609 |
+
/* funcs can be ASN1_PRIMITIVE_FUNCS*, ASN1_EXTERN_FUNCS*, or ASN1_AUX* */
|
| 610 |
+
long size; /* Structure size (usually) */
|
| 611 |
+
const char *sname; /* Structure name */
|
| 612 |
+
};
|
| 613 |
+
|
| 614 |
+
/*
|
| 615 |
+
* Cache for ASN1 tag and length, so we don't keep re-reading it for things
|
| 616 |
+
* like CHOICE
|
| 617 |
+
*/
|
| 618 |
+
|
| 619 |
+
struct ASN1_TLC_st {
|
| 620 |
+
char valid; /* Values below are valid */
|
| 621 |
+
int ret; /* return value */
|
| 622 |
+
long plen; /* length */
|
| 623 |
+
int ptag; /* class value */
|
| 624 |
+
int pclass; /* class value */
|
| 625 |
+
int hdrlen; /* header length */
|
| 626 |
+
};
|
| 627 |
+
|
| 628 |
+
/* Typedefs for ASN1 function pointers */
|
| 629 |
+
typedef int ASN1_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 630 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 631 |
+
ASN1_TLC *ctx);
|
| 632 |
+
|
| 633 |
+
typedef int ASN1_ex_d2i_ex(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 634 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 635 |
+
ASN1_TLC *ctx, OSSL_LIB_CTX *libctx,
|
| 636 |
+
const char *propq);
|
| 637 |
+
typedef int ASN1_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 638 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 639 |
+
typedef int ASN1_ex_new_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 640 |
+
typedef int ASN1_ex_new_ex_func(ASN1_VALUE **pval, const ASN1_ITEM *it,
|
| 641 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 642 |
+
typedef void ASN1_ex_free_func(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 643 |
+
|
| 644 |
+
typedef int ASN1_ex_print_func(BIO *out, const ASN1_VALUE **pval,
|
| 645 |
+
int indent, const char *fname,
|
| 646 |
+
const ASN1_PCTX *pctx);
|
| 647 |
+
|
| 648 |
+
typedef int ASN1_primitive_i2c(const ASN1_VALUE **pval, unsigned char *cont,
|
| 649 |
+
int *putype, const ASN1_ITEM *it);
|
| 650 |
+
typedef int ASN1_primitive_c2i(ASN1_VALUE **pval, const unsigned char *cont,
|
| 651 |
+
int len, int utype, char *free_cont,
|
| 652 |
+
const ASN1_ITEM *it);
|
| 653 |
+
typedef int ASN1_primitive_print(BIO *out, const ASN1_VALUE **pval,
|
| 654 |
+
const ASN1_ITEM *it, int indent,
|
| 655 |
+
const ASN1_PCTX *pctx);
|
| 656 |
+
|
| 657 |
+
typedef struct ASN1_EXTERN_FUNCS_st {
|
| 658 |
+
void *app_data;
|
| 659 |
+
ASN1_ex_new_func *asn1_ex_new;
|
| 660 |
+
ASN1_ex_free_func *asn1_ex_free;
|
| 661 |
+
ASN1_ex_free_func *asn1_ex_clear;
|
| 662 |
+
ASN1_ex_d2i *asn1_ex_d2i;
|
| 663 |
+
ASN1_ex_i2d *asn1_ex_i2d;
|
| 664 |
+
ASN1_ex_print_func *asn1_ex_print;
|
| 665 |
+
ASN1_ex_new_ex_func *asn1_ex_new_ex;
|
| 666 |
+
ASN1_ex_d2i_ex *asn1_ex_d2i_ex;
|
| 667 |
+
} ASN1_EXTERN_FUNCS;
|
| 668 |
+
|
| 669 |
+
typedef struct ASN1_PRIMITIVE_FUNCS_st {
|
| 670 |
+
void *app_data;
|
| 671 |
+
unsigned long flags;
|
| 672 |
+
ASN1_ex_new_func *prim_new;
|
| 673 |
+
ASN1_ex_free_func *prim_free;
|
| 674 |
+
ASN1_ex_free_func *prim_clear;
|
| 675 |
+
ASN1_primitive_c2i *prim_c2i;
|
| 676 |
+
ASN1_primitive_i2c *prim_i2c;
|
| 677 |
+
ASN1_primitive_print *prim_print;
|
| 678 |
+
} ASN1_PRIMITIVE_FUNCS;
|
| 679 |
+
|
| 680 |
+
/*
|
| 681 |
+
* This is the ASN1_AUX structure: it handles various miscellaneous
|
| 682 |
+
* requirements. For example the use of reference counts and an informational
|
| 683 |
+
* callback. The "informational callback" is called at various points during
|
| 684 |
+
* the ASN1 encoding and decoding. It can be used to provide minor
|
| 685 |
+
* customisation of the structures used. This is most useful where the
|
| 686 |
+
* supplied routines *almost* do the right thing but need some extra help at
|
| 687 |
+
* a few points. If the callback returns zero then it is assumed a fatal
|
| 688 |
+
* error has occurred and the main operation should be abandoned. If major
|
| 689 |
+
* changes in the default behaviour are required then an external type is
|
| 690 |
+
* more appropriate.
|
| 691 |
+
* For the operations ASN1_OP_I2D_PRE, ASN1_OP_I2D_POST, ASN1_OP_PRINT_PRE, and
|
| 692 |
+
* ASN1_OP_PRINT_POST, meanwhile a variant of the callback with const parameter
|
| 693 |
+
* 'in' is provided to make clear statically that its input is not modified. If
|
| 694 |
+
* and only if this variant is in use the flag ASN1_AFLG_CONST_CB must be set.
|
| 695 |
+
*/
|
| 696 |
+
|
| 697 |
+
typedef int ASN1_aux_cb(int operation, ASN1_VALUE **in, const ASN1_ITEM *it,
|
| 698 |
+
void *exarg);
|
| 699 |
+
typedef int ASN1_aux_const_cb(int operation, const ASN1_VALUE **in,
|
| 700 |
+
const ASN1_ITEM *it, void *exarg);
|
| 701 |
+
|
| 702 |
+
typedef struct ASN1_AUX_st {
|
| 703 |
+
void *app_data;
|
| 704 |
+
int flags;
|
| 705 |
+
int ref_offset; /* Offset of reference value */
|
| 706 |
+
int ref_lock; /* Offset of lock value */
|
| 707 |
+
ASN1_aux_cb *asn1_cb;
|
| 708 |
+
int enc_offset; /* Offset of ASN1_ENCODING structure */
|
| 709 |
+
ASN1_aux_const_cb *asn1_const_cb; /* for ASN1_OP_I2D_ and ASN1_OP_PRINT_ */
|
| 710 |
+
} ASN1_AUX;
|
| 711 |
+
|
| 712 |
+
/* For print related callbacks exarg points to this structure */
|
| 713 |
+
typedef struct ASN1_PRINT_ARG_st {
|
| 714 |
+
BIO *out;
|
| 715 |
+
int indent;
|
| 716 |
+
const ASN1_PCTX *pctx;
|
| 717 |
+
} ASN1_PRINT_ARG;
|
| 718 |
+
|
| 719 |
+
/* For streaming related callbacks exarg points to this structure */
|
| 720 |
+
typedef struct ASN1_STREAM_ARG_st {
|
| 721 |
+
/* BIO to stream through */
|
| 722 |
+
BIO *out;
|
| 723 |
+
/* BIO with filters appended */
|
| 724 |
+
BIO *ndef_bio;
|
| 725 |
+
/* Streaming I/O boundary */
|
| 726 |
+
unsigned char **boundary;
|
| 727 |
+
} ASN1_STREAM_ARG;
|
| 728 |
+
|
| 729 |
+
/* Flags in ASN1_AUX */
|
| 730 |
+
|
| 731 |
+
/* Use a reference count */
|
| 732 |
+
# define ASN1_AFLG_REFCOUNT 1
|
| 733 |
+
/* Save the encoding of structure (useful for signatures) */
|
| 734 |
+
# define ASN1_AFLG_ENCODING 2
|
| 735 |
+
/* The Sequence length is invalid */
|
| 736 |
+
# define ASN1_AFLG_BROKEN 4
|
| 737 |
+
/* Use the new asn1_const_cb */
|
| 738 |
+
# define ASN1_AFLG_CONST_CB 8
|
| 739 |
+
|
| 740 |
+
/* operation values for asn1_cb */
|
| 741 |
+
|
| 742 |
+
# define ASN1_OP_NEW_PRE 0
|
| 743 |
+
# define ASN1_OP_NEW_POST 1
|
| 744 |
+
# define ASN1_OP_FREE_PRE 2
|
| 745 |
+
# define ASN1_OP_FREE_POST 3
|
| 746 |
+
# define ASN1_OP_D2I_PRE 4
|
| 747 |
+
# define ASN1_OP_D2I_POST 5
|
| 748 |
+
# define ASN1_OP_I2D_PRE 6
|
| 749 |
+
# define ASN1_OP_I2D_POST 7
|
| 750 |
+
# define ASN1_OP_PRINT_PRE 8
|
| 751 |
+
# define ASN1_OP_PRINT_POST 9
|
| 752 |
+
# define ASN1_OP_STREAM_PRE 10
|
| 753 |
+
# define ASN1_OP_STREAM_POST 11
|
| 754 |
+
# define ASN1_OP_DETACHED_PRE 12
|
| 755 |
+
# define ASN1_OP_DETACHED_POST 13
|
| 756 |
+
# define ASN1_OP_DUP_PRE 14
|
| 757 |
+
# define ASN1_OP_DUP_POST 15
|
| 758 |
+
# define ASN1_OP_GET0_LIBCTX 16
|
| 759 |
+
# define ASN1_OP_GET0_PROPQ 17
|
| 760 |
+
|
| 761 |
+
/* Macro to implement a primitive type */
|
| 762 |
+
# define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0)
|
| 763 |
+
# define IMPLEMENT_ASN1_TYPE_ex(itname, vname, ex) \
|
| 764 |
+
ASN1_ITEM_start(itname) \
|
| 765 |
+
ASN1_ITYPE_PRIMITIVE, V_##vname, NULL, 0, NULL, ex, #itname \
|
| 766 |
+
ASN1_ITEM_end(itname)
|
| 767 |
+
|
| 768 |
+
/* Macro to implement a multi string type */
|
| 769 |
+
# define IMPLEMENT_ASN1_MSTRING(itname, mask) \
|
| 770 |
+
ASN1_ITEM_start(itname) \
|
| 771 |
+
ASN1_ITYPE_MSTRING, mask, NULL, 0, NULL, sizeof(ASN1_STRING), #itname \
|
| 772 |
+
ASN1_ITEM_end(itname)
|
| 773 |
+
|
| 774 |
+
# define IMPLEMENT_EXTERN_ASN1(sname, tag, fptrs) \
|
| 775 |
+
ASN1_ITEM_start(sname) \
|
| 776 |
+
ASN1_ITYPE_EXTERN, \
|
| 777 |
+
tag, \
|
| 778 |
+
NULL, \
|
| 779 |
+
0, \
|
| 780 |
+
&fptrs, \
|
| 781 |
+
0, \
|
| 782 |
+
#sname \
|
| 783 |
+
ASN1_ITEM_end(sname)
|
| 784 |
+
|
| 785 |
+
/* Macro to implement standard functions in terms of ASN1_ITEM structures */
|
| 786 |
+
|
| 787 |
+
# define IMPLEMENT_ASN1_FUNCTIONS(stname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, stname, stname)
|
| 788 |
+
|
| 789 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_name(stname, itname) IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, itname)
|
| 790 |
+
|
| 791 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_ENCODE_name(stname, itname) \
|
| 792 |
+
IMPLEMENT_ASN1_FUNCTIONS_ENCODE_fname(stname, itname, itname)
|
| 793 |
+
|
| 794 |
+
# define IMPLEMENT_STATIC_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 795 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(static, stname, stname, stname)
|
| 796 |
+
|
| 797 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS(stname) \
|
| 798 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, stname, stname)
|
| 799 |
+
|
| 800 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_pfname(pre, stname, itname, fname) \
|
| 801 |
+
pre stname *fname##_new(void) \
|
| 802 |
+
{ \
|
| 803 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 804 |
+
} \
|
| 805 |
+
pre void fname##_free(stname *a) \
|
| 806 |
+
{ \
|
| 807 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 808 |
+
}
|
| 809 |
+
|
| 810 |
+
# define IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname) \
|
| 811 |
+
stname *fname##_new(void) \
|
| 812 |
+
{ \
|
| 813 |
+
return (stname *)ASN1_item_new(ASN1_ITEM_rptr(itname)); \
|
| 814 |
+
} \
|
| 815 |
+
void fname##_free(stname *a) \
|
| 816 |
+
{ \
|
| 817 |
+
ASN1_item_free((ASN1_VALUE *)a, ASN1_ITEM_rptr(itname)); \
|
| 818 |
+
}
|
| 819 |
+
|
| 820 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_fname(stname, itname, fname) \
|
| 821 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 822 |
+
IMPLEMENT_ASN1_ALLOC_FUNCTIONS_fname(stname, itname, fname)
|
| 823 |
+
|
| 824 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname) \
|
| 825 |
+
stname *d2i_##fname(stname **a, const unsigned char **in, long len) \
|
| 826 |
+
{ \
|
| 827 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, ASN1_ITEM_rptr(itname));\
|
| 828 |
+
} \
|
| 829 |
+
int i2d_##fname(const stname *a, unsigned char **out) \
|
| 830 |
+
{ \
|
| 831 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(itname));\
|
| 832 |
+
}
|
| 833 |
+
|
| 834 |
+
# define IMPLEMENT_ASN1_NDEF_FUNCTION(stname) \
|
| 835 |
+
int i2d_##stname##_NDEF(const stname *a, unsigned char **out) \
|
| 836 |
+
{ \
|
| 837 |
+
return ASN1_item_ndef_i2d((const ASN1_VALUE *)a, out, ASN1_ITEM_rptr(stname));\
|
| 838 |
+
}
|
| 839 |
+
|
| 840 |
+
# define IMPLEMENT_STATIC_ASN1_ENCODE_FUNCTIONS(stname) \
|
| 841 |
+
static stname *d2i_##stname(stname **a, \
|
| 842 |
+
const unsigned char **in, long len) \
|
| 843 |
+
{ \
|
| 844 |
+
return (stname *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, \
|
| 845 |
+
ASN1_ITEM_rptr(stname)); \
|
| 846 |
+
} \
|
| 847 |
+
static int i2d_##stname(const stname *a, unsigned char **out) \
|
| 848 |
+
{ \
|
| 849 |
+
return ASN1_item_i2d((const ASN1_VALUE *)a, out, \
|
| 850 |
+
ASN1_ITEM_rptr(stname)); \
|
| 851 |
+
}
|
| 852 |
+
|
| 853 |
+
# define IMPLEMENT_ASN1_DUP_FUNCTION(stname) \
|
| 854 |
+
stname * stname##_dup(const stname *x) \
|
| 855 |
+
{ \
|
| 856 |
+
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
|
| 857 |
+
}
|
| 858 |
+
|
| 859 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
|
| 860 |
+
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
|
| 861 |
+
|
| 862 |
+
# define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
|
| 863 |
+
int fname##_print_ctx(BIO *out, const stname *x, int indent, \
|
| 864 |
+
const ASN1_PCTX *pctx) \
|
| 865 |
+
{ \
|
| 866 |
+
return ASN1_item_print(out, (const ASN1_VALUE *)x, indent, \
|
| 867 |
+
ASN1_ITEM_rptr(itname), pctx); \
|
| 868 |
+
}
|
| 869 |
+
|
| 870 |
+
/* external definitions for primitive types */
|
| 871 |
+
|
| 872 |
+
DECLARE_ASN1_ITEM(ASN1_BOOLEAN)
|
| 873 |
+
DECLARE_ASN1_ITEM(ASN1_TBOOLEAN)
|
| 874 |
+
DECLARE_ASN1_ITEM(ASN1_FBOOLEAN)
|
| 875 |
+
DECLARE_ASN1_ITEM(ASN1_SEQUENCE)
|
| 876 |
+
DECLARE_ASN1_ITEM(CBIGNUM)
|
| 877 |
+
DECLARE_ASN1_ITEM(BIGNUM)
|
| 878 |
+
DECLARE_ASN1_ITEM(INT32)
|
| 879 |
+
DECLARE_ASN1_ITEM(ZINT32)
|
| 880 |
+
DECLARE_ASN1_ITEM(UINT32)
|
| 881 |
+
DECLARE_ASN1_ITEM(ZUINT32)
|
| 882 |
+
DECLARE_ASN1_ITEM(INT64)
|
| 883 |
+
DECLARE_ASN1_ITEM(ZINT64)
|
| 884 |
+
DECLARE_ASN1_ITEM(UINT64)
|
| 885 |
+
DECLARE_ASN1_ITEM(ZUINT64)
|
| 886 |
+
|
| 887 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 888 |
+
/*
|
| 889 |
+
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
| 890 |
+
* underlying C type (long) differs in size depending on the architecture.
|
| 891 |
+
* They are designed with 32-bit longs in mind.
|
| 892 |
+
*/
|
| 893 |
+
DECLARE_ASN1_ITEM(LONG)
|
| 894 |
+
DECLARE_ASN1_ITEM(ZLONG)
|
| 895 |
+
# endif
|
| 896 |
+
|
| 897 |
+
SKM_DEFINE_STACK_OF_INTERNAL(ASN1_VALUE, ASN1_VALUE, ASN1_VALUE)
|
| 898 |
+
#define sk_ASN1_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 899 |
+
#define sk_ASN1_VALUE_value(sk, idx) ((ASN1_VALUE *)OPENSSL_sk_value(ossl_check_const_ASN1_VALUE_sk_type(sk), (idx)))
|
| 900 |
+
#define sk_ASN1_VALUE_new(cmp) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new(ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 901 |
+
#define sk_ASN1_VALUE_new_null() ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_null())
|
| 902 |
+
#define sk_ASN1_VALUE_new_reserve(cmp, n) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_ASN1_VALUE_compfunc_type(cmp), (n)))
|
| 903 |
+
#define sk_ASN1_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_ASN1_VALUE_sk_type(sk), (n))
|
| 904 |
+
#define sk_ASN1_VALUE_free(sk) OPENSSL_sk_free(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 905 |
+
#define sk_ASN1_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 906 |
+
#define sk_ASN1_VALUE_delete(sk, i) ((ASN1_VALUE *)OPENSSL_sk_delete(ossl_check_ASN1_VALUE_sk_type(sk), (i)))
|
| 907 |
+
#define sk_ASN1_VALUE_delete_ptr(sk, ptr) ((ASN1_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr)))
|
| 908 |
+
#define sk_ASN1_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 909 |
+
#define sk_ASN1_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 910 |
+
#define sk_ASN1_VALUE_pop(sk) ((ASN1_VALUE *)OPENSSL_sk_pop(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 911 |
+
#define sk_ASN1_VALUE_shift(sk) ((ASN1_VALUE *)OPENSSL_sk_shift(ossl_check_ASN1_VALUE_sk_type(sk)))
|
| 912 |
+
#define sk_ASN1_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_ASN1_VALUE_sk_type(sk),ossl_check_ASN1_VALUE_freefunc_type(freefunc))
|
| 913 |
+
#define sk_ASN1_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), (idx))
|
| 914 |
+
#define sk_ASN1_VALUE_set(sk, idx, ptr) ((ASN1_VALUE *)OPENSSL_sk_set(ossl_check_ASN1_VALUE_sk_type(sk), (idx), ossl_check_ASN1_VALUE_type(ptr)))
|
| 915 |
+
#define sk_ASN1_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 916 |
+
#define sk_ASN1_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr))
|
| 917 |
+
#define sk_ASN1_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_type(ptr), pnum)
|
| 918 |
+
#define sk_ASN1_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_ASN1_VALUE_sk_type(sk))
|
| 919 |
+
#define sk_ASN1_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_ASN1_VALUE_sk_type(sk))
|
| 920 |
+
#define sk_ASN1_VALUE_dup(sk) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_dup(ossl_check_const_ASN1_VALUE_sk_type(sk)))
|
| 921 |
+
#define sk_ASN1_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(ASN1_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_copyfunc_type(copyfunc), ossl_check_ASN1_VALUE_freefunc_type(freefunc)))
|
| 922 |
+
#define sk_ASN1_VALUE_set_cmp_func(sk, cmp) ((sk_ASN1_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_ASN1_VALUE_sk_type(sk), ossl_check_ASN1_VALUE_compfunc_type(cmp)))
|
| 923 |
+
|
| 924 |
+
|
| 925 |
+
|
| 926 |
+
/* Functions used internally by the ASN1 code */
|
| 927 |
+
|
| 928 |
+
int ASN1_item_ex_new(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 929 |
+
void ASN1_item_ex_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
|
| 930 |
+
|
| 931 |
+
int ASN1_item_ex_d2i(ASN1_VALUE **pval, const unsigned char **in, long len,
|
| 932 |
+
const ASN1_ITEM *it, int tag, int aclass, char opt,
|
| 933 |
+
ASN1_TLC *ctx);
|
| 934 |
+
|
| 935 |
+
int ASN1_item_ex_i2d(const ASN1_VALUE **pval, unsigned char **out,
|
| 936 |
+
const ASN1_ITEM *it, int tag, int aclass);
|
| 937 |
+
|
| 938 |
+
/* Legacy compatibility */
|
| 939 |
+
# define IMPLEMENT_ASN1_FUNCTIONS_const(name) IMPLEMENT_ASN1_FUNCTIONS(name)
|
| 940 |
+
# define IMPLEMENT_ASN1_ENCODE_FUNCTIONS_const_fname(stname, itname, fname) \
|
| 941 |
+
IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname(stname, itname, fname)
|
| 942 |
+
|
| 943 |
+
#ifdef __cplusplus
|
| 944 |
+
}
|
| 945 |
+
#endif
|
| 946 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/bio.h
ADDED
|
@@ -0,0 +1,1022 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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generated by Makefile from include/openssl/bio.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
#ifndef OPENSSL_BIO_H
|
| 15 |
+
# define OPENSSL_BIO_H
|
| 16 |
+
# pragma once
|
| 17 |
+
|
| 18 |
+
# include <openssl/macros.h>
|
| 19 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 20 |
+
# define HEADER_BIO_H
|
| 21 |
+
# endif
|
| 22 |
+
|
| 23 |
+
# include <openssl/e_os2.h>
|
| 24 |
+
|
| 25 |
+
# ifndef OPENSSL_NO_STDIO
|
| 26 |
+
# include <stdio.h>
|
| 27 |
+
# endif
|
| 28 |
+
# include <stdarg.h>
|
| 29 |
+
|
| 30 |
+
# include <openssl/crypto.h>
|
| 31 |
+
# include <openssl/bioerr.h>
|
| 32 |
+
# include <openssl/core.h>
|
| 33 |
+
|
| 34 |
+
#ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
/* There are the classes of BIOs */
|
| 39 |
+
# define BIO_TYPE_DESCRIPTOR 0x0100 /* socket, fd, connect or accept */
|
| 40 |
+
# define BIO_TYPE_FILTER 0x0200
|
| 41 |
+
# define BIO_TYPE_SOURCE_SINK 0x0400
|
| 42 |
+
|
| 43 |
+
/* These are the 'types' of BIOs */
|
| 44 |
+
# define BIO_TYPE_NONE 0
|
| 45 |
+
# define BIO_TYPE_MEM ( 1|BIO_TYPE_SOURCE_SINK)
|
| 46 |
+
# define BIO_TYPE_FILE ( 2|BIO_TYPE_SOURCE_SINK)
|
| 47 |
+
|
| 48 |
+
# define BIO_TYPE_FD ( 4|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 49 |
+
# define BIO_TYPE_SOCKET ( 5|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 50 |
+
# define BIO_TYPE_NULL ( 6|BIO_TYPE_SOURCE_SINK)
|
| 51 |
+
# define BIO_TYPE_SSL ( 7|BIO_TYPE_FILTER)
|
| 52 |
+
# define BIO_TYPE_MD ( 8|BIO_TYPE_FILTER)
|
| 53 |
+
# define BIO_TYPE_BUFFER ( 9|BIO_TYPE_FILTER)
|
| 54 |
+
# define BIO_TYPE_CIPHER (10|BIO_TYPE_FILTER)
|
| 55 |
+
# define BIO_TYPE_BASE64 (11|BIO_TYPE_FILTER)
|
| 56 |
+
# define BIO_TYPE_CONNECT (12|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 57 |
+
# define BIO_TYPE_ACCEPT (13|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 58 |
+
|
| 59 |
+
# define BIO_TYPE_NBIO_TEST (16|BIO_TYPE_FILTER)/* server proxy BIO */
|
| 60 |
+
# define BIO_TYPE_NULL_FILTER (17|BIO_TYPE_FILTER)
|
| 61 |
+
# define BIO_TYPE_BIO (19|BIO_TYPE_SOURCE_SINK)/* half a BIO pair */
|
| 62 |
+
# define BIO_TYPE_LINEBUFFER (20|BIO_TYPE_FILTER)
|
| 63 |
+
# define BIO_TYPE_DGRAM (21|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 64 |
+
# define BIO_TYPE_ASN1 (22|BIO_TYPE_FILTER)
|
| 65 |
+
# define BIO_TYPE_COMP (23|BIO_TYPE_FILTER)
|
| 66 |
+
# ifndef OPENSSL_NO_SCTP
|
| 67 |
+
# define BIO_TYPE_DGRAM_SCTP (24|BIO_TYPE_SOURCE_SINK|BIO_TYPE_DESCRIPTOR)
|
| 68 |
+
# endif
|
| 69 |
+
# define BIO_TYPE_CORE_TO_PROV (25|BIO_TYPE_SOURCE_SINK)
|
| 70 |
+
# define BIO_TYPE_DGRAM_PAIR (26|BIO_TYPE_SOURCE_SINK)
|
| 71 |
+
# define BIO_TYPE_DGRAM_MEM (27|BIO_TYPE_SOURCE_SINK)
|
| 72 |
+
|
| 73 |
+
/* Custom type starting index returned by BIO_get_new_index() */
|
| 74 |
+
#define BIO_TYPE_START 128
|
| 75 |
+
/* Custom type maximum index that can be returned by BIO_get_new_index() */
|
| 76 |
+
#define BIO_TYPE_MASK 0xFF
|
| 77 |
+
|
| 78 |
+
/*
|
| 79 |
+
* BIO_FILENAME_READ|BIO_CLOSE to open or close on free.
|
| 80 |
+
* BIO_set_fp(in,stdin,BIO_NOCLOSE);
|
| 81 |
+
*/
|
| 82 |
+
# define BIO_NOCLOSE 0x00
|
| 83 |
+
# define BIO_CLOSE 0x01
|
| 84 |
+
|
| 85 |
+
/*
|
| 86 |
+
* These are used in the following macros and are passed to BIO_ctrl()
|
| 87 |
+
*/
|
| 88 |
+
# define BIO_CTRL_RESET 1/* opt - rewind/zero etc */
|
| 89 |
+
# define BIO_CTRL_EOF 2/* opt - are we at the eof */
|
| 90 |
+
# define BIO_CTRL_INFO 3/* opt - extra tit-bits */
|
| 91 |
+
# define BIO_CTRL_SET 4/* man - set the 'IO' type */
|
| 92 |
+
# define BIO_CTRL_GET 5/* man - get the 'IO' type */
|
| 93 |
+
# define BIO_CTRL_PUSH 6/* opt - internal, used to signify change */
|
| 94 |
+
# define BIO_CTRL_POP 7/* opt - internal, used to signify change */
|
| 95 |
+
# define BIO_CTRL_GET_CLOSE 8/* man - set the 'close' on free */
|
| 96 |
+
# define BIO_CTRL_SET_CLOSE 9/* man - set the 'close' on free */
|
| 97 |
+
# define BIO_CTRL_PENDING 10/* opt - is their more data buffered */
|
| 98 |
+
# define BIO_CTRL_FLUSH 11/* opt - 'flush' buffered output */
|
| 99 |
+
# define BIO_CTRL_DUP 12/* man - extra stuff for 'duped' BIO */
|
| 100 |
+
# define BIO_CTRL_WPENDING 13/* opt - number of bytes still to write */
|
| 101 |
+
# define BIO_CTRL_SET_CALLBACK 14/* opt - set callback function */
|
| 102 |
+
# define BIO_CTRL_GET_CALLBACK 15/* opt - set callback function */
|
| 103 |
+
|
| 104 |
+
# define BIO_CTRL_PEEK 29/* BIO_f_buffer special */
|
| 105 |
+
# define BIO_CTRL_SET_FILENAME 30/* BIO_s_file special */
|
| 106 |
+
|
| 107 |
+
/* dgram BIO stuff */
|
| 108 |
+
# define BIO_CTRL_DGRAM_CONNECT 31/* BIO dgram special */
|
| 109 |
+
# define BIO_CTRL_DGRAM_SET_CONNECTED 32/* allow for an externally connected
|
| 110 |
+
* socket to be passed in */
|
| 111 |
+
# define BIO_CTRL_DGRAM_SET_RECV_TIMEOUT 33/* setsockopt, essentially */
|
| 112 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMEOUT 34/* getsockopt, essentially */
|
| 113 |
+
# define BIO_CTRL_DGRAM_SET_SEND_TIMEOUT 35/* setsockopt, essentially */
|
| 114 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMEOUT 36/* getsockopt, essentially */
|
| 115 |
+
|
| 116 |
+
# define BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP 37/* flag whether the last */
|
| 117 |
+
# define BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP 38/* I/O operation timed out */
|
| 118 |
+
|
| 119 |
+
/* #ifdef IP_MTU_DISCOVER */
|
| 120 |
+
# define BIO_CTRL_DGRAM_MTU_DISCOVER 39/* set DF bit on egress packets */
|
| 121 |
+
/* #endif */
|
| 122 |
+
|
| 123 |
+
# define BIO_CTRL_DGRAM_QUERY_MTU 40/* as kernel for current MTU */
|
| 124 |
+
# define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47
|
| 125 |
+
# define BIO_CTRL_DGRAM_GET_MTU 41/* get cached value for MTU */
|
| 126 |
+
# define BIO_CTRL_DGRAM_SET_MTU 42/* set cached value for MTU.
|
| 127 |
+
* want to use this if asking
|
| 128 |
+
* the kernel fails */
|
| 129 |
+
|
| 130 |
+
# define BIO_CTRL_DGRAM_MTU_EXCEEDED 43/* check whether the MTU was
|
| 131 |
+
* exceed in the previous write
|
| 132 |
+
* operation */
|
| 133 |
+
|
| 134 |
+
# define BIO_CTRL_DGRAM_GET_PEER 46
|
| 135 |
+
# define BIO_CTRL_DGRAM_SET_PEER 44/* Destination for the data */
|
| 136 |
+
|
| 137 |
+
# define BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT 45/* Next DTLS handshake timeout
|
| 138 |
+
* to adjust socket timeouts */
|
| 139 |
+
# define BIO_CTRL_DGRAM_SET_DONT_FRAG 48
|
| 140 |
+
|
| 141 |
+
# define BIO_CTRL_DGRAM_GET_MTU_OVERHEAD 49
|
| 142 |
+
|
| 143 |
+
/* Deliberately outside of OPENSSL_NO_SCTP - used in bss_dgram.c */
|
| 144 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_IN_HANDSHAKE 50
|
| 145 |
+
# ifndef OPENSSL_NO_SCTP
|
| 146 |
+
/* SCTP stuff */
|
| 147 |
+
# define BIO_CTRL_DGRAM_SCTP_ADD_AUTH_KEY 51
|
| 148 |
+
# define BIO_CTRL_DGRAM_SCTP_NEXT_AUTH_KEY 52
|
| 149 |
+
# define BIO_CTRL_DGRAM_SCTP_AUTH_CCS_RCVD 53
|
| 150 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_SNDINFO 60
|
| 151 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_SNDINFO 61
|
| 152 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_RCVINFO 62
|
| 153 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_RCVINFO 63
|
| 154 |
+
# define BIO_CTRL_DGRAM_SCTP_GET_PRINFO 64
|
| 155 |
+
# define BIO_CTRL_DGRAM_SCTP_SET_PRINFO 65
|
| 156 |
+
# define BIO_CTRL_DGRAM_SCTP_SAVE_SHUTDOWN 70
|
| 157 |
+
# endif
|
| 158 |
+
|
| 159 |
+
# define BIO_CTRL_DGRAM_SET_PEEK_MODE 71
|
| 160 |
+
|
| 161 |
+
/*
|
| 162 |
+
* internal BIO:
|
| 163 |
+
* # define BIO_CTRL_SET_KTLS_SEND 72
|
| 164 |
+
* # define BIO_CTRL_SET_KTLS_SEND_CTRL_MSG 74
|
| 165 |
+
* # define BIO_CTRL_CLEAR_KTLS_CTRL_MSG 75
|
| 166 |
+
*/
|
| 167 |
+
|
| 168 |
+
# define BIO_CTRL_GET_KTLS_SEND 73
|
| 169 |
+
# define BIO_CTRL_GET_KTLS_RECV 76
|
| 170 |
+
|
| 171 |
+
# define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
| 172 |
+
# define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
| 173 |
+
|
| 174 |
+
/* BIO_f_prefix controls */
|
| 175 |
+
# define BIO_CTRL_SET_PREFIX 79
|
| 176 |
+
# define BIO_CTRL_SET_INDENT 80
|
| 177 |
+
# define BIO_CTRL_GET_INDENT 81
|
| 178 |
+
|
| 179 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP 82
|
| 180 |
+
# define BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE 83
|
| 181 |
+
# define BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE 84
|
| 182 |
+
# define BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS 85
|
| 183 |
+
# define BIO_CTRL_DGRAM_GET_CAPS 86
|
| 184 |
+
# define BIO_CTRL_DGRAM_SET_CAPS 87
|
| 185 |
+
# define BIO_CTRL_DGRAM_GET_NO_TRUNC 88
|
| 186 |
+
# define BIO_CTRL_DGRAM_SET_NO_TRUNC 89
|
| 187 |
+
|
| 188 |
+
/*
|
| 189 |
+
* internal BIO:
|
| 190 |
+
* # define BIO_CTRL_SET_KTLS_TX_ZEROCOPY_SENDFILE 90
|
| 191 |
+
*/
|
| 192 |
+
|
| 193 |
+
# define BIO_CTRL_GET_RPOLL_DESCRIPTOR 91
|
| 194 |
+
# define BIO_CTRL_GET_WPOLL_DESCRIPTOR 92
|
| 195 |
+
# define BIO_CTRL_DGRAM_DETECT_PEER_ADDR 93
|
| 196 |
+
# define BIO_CTRL_DGRAM_SET0_LOCAL_ADDR 94
|
| 197 |
+
|
| 198 |
+
# define BIO_DGRAM_CAP_NONE 0U
|
| 199 |
+
# define BIO_DGRAM_CAP_HANDLES_SRC_ADDR (1U << 0)
|
| 200 |
+
# define BIO_DGRAM_CAP_HANDLES_DST_ADDR (1U << 1)
|
| 201 |
+
# define BIO_DGRAM_CAP_PROVIDES_SRC_ADDR (1U << 2)
|
| 202 |
+
# define BIO_DGRAM_CAP_PROVIDES_DST_ADDR (1U << 3)
|
| 203 |
+
|
| 204 |
+
# ifndef OPENSSL_NO_KTLS
|
| 205 |
+
# define BIO_get_ktls_send(b) \
|
| 206 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL) > 0)
|
| 207 |
+
# define BIO_get_ktls_recv(b) \
|
| 208 |
+
(BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL) > 0)
|
| 209 |
+
# else
|
| 210 |
+
# define BIO_get_ktls_send(b) (0)
|
| 211 |
+
# define BIO_get_ktls_recv(b) (0)
|
| 212 |
+
# endif
|
| 213 |
+
|
| 214 |
+
/* modifiers */
|
| 215 |
+
# define BIO_FP_READ 0x02
|
| 216 |
+
# define BIO_FP_WRITE 0x04
|
| 217 |
+
# define BIO_FP_APPEND 0x08
|
| 218 |
+
# define BIO_FP_TEXT 0x10
|
| 219 |
+
|
| 220 |
+
# define BIO_FLAGS_READ 0x01
|
| 221 |
+
# define BIO_FLAGS_WRITE 0x02
|
| 222 |
+
# define BIO_FLAGS_IO_SPECIAL 0x04
|
| 223 |
+
# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
|
| 224 |
+
# define BIO_FLAGS_SHOULD_RETRY 0x08
|
| 225 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 226 |
+
/* This #define was replaced by an internal constant and should not be used. */
|
| 227 |
+
# define BIO_FLAGS_UPLINK 0
|
| 228 |
+
# endif
|
| 229 |
+
|
| 230 |
+
# define BIO_FLAGS_BASE64_NO_NL 0x100
|
| 231 |
+
|
| 232 |
+
/*
|
| 233 |
+
* This is used with memory BIOs:
|
| 234 |
+
* BIO_FLAGS_MEM_RDONLY means we shouldn't free up or change the data in any way;
|
| 235 |
+
* BIO_FLAGS_NONCLEAR_RST means we shouldn't clear data on reset.
|
| 236 |
+
*/
|
| 237 |
+
# define BIO_FLAGS_MEM_RDONLY 0x200
|
| 238 |
+
# define BIO_FLAGS_NONCLEAR_RST 0x400
|
| 239 |
+
# define BIO_FLAGS_IN_EOF 0x800
|
| 240 |
+
|
| 241 |
+
/* the BIO FLAGS values 0x1000 to 0x8000 are reserved for internal KTLS flags */
|
| 242 |
+
|
| 243 |
+
typedef union bio_addr_st BIO_ADDR;
|
| 244 |
+
typedef struct bio_addrinfo_st BIO_ADDRINFO;
|
| 245 |
+
|
| 246 |
+
int BIO_get_new_index(void);
|
| 247 |
+
void BIO_set_flags(BIO *b, int flags);
|
| 248 |
+
int BIO_test_flags(const BIO *b, int flags);
|
| 249 |
+
void BIO_clear_flags(BIO *b, int flags);
|
| 250 |
+
|
| 251 |
+
# define BIO_get_flags(b) BIO_test_flags(b, ~(0x0))
|
| 252 |
+
# define BIO_set_retry_special(b) \
|
| 253 |
+
BIO_set_flags(b, (BIO_FLAGS_IO_SPECIAL|BIO_FLAGS_SHOULD_RETRY))
|
| 254 |
+
# define BIO_set_retry_read(b) \
|
| 255 |
+
BIO_set_flags(b, (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY))
|
| 256 |
+
# define BIO_set_retry_write(b) \
|
| 257 |
+
BIO_set_flags(b, (BIO_FLAGS_WRITE|BIO_FLAGS_SHOULD_RETRY))
|
| 258 |
+
|
| 259 |
+
/* These are normally used internally in BIOs */
|
| 260 |
+
# define BIO_clear_retry_flags(b) \
|
| 261 |
+
BIO_clear_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 262 |
+
# define BIO_get_retry_flags(b) \
|
| 263 |
+
BIO_test_flags(b, (BIO_FLAGS_RWS|BIO_FLAGS_SHOULD_RETRY))
|
| 264 |
+
|
| 265 |
+
/* These should be used by the application to tell why we should retry */
|
| 266 |
+
# define BIO_should_read(a) BIO_test_flags(a, BIO_FLAGS_READ)
|
| 267 |
+
# define BIO_should_write(a) BIO_test_flags(a, BIO_FLAGS_WRITE)
|
| 268 |
+
# define BIO_should_io_special(a) BIO_test_flags(a, BIO_FLAGS_IO_SPECIAL)
|
| 269 |
+
# define BIO_retry_type(a) BIO_test_flags(a, BIO_FLAGS_RWS)
|
| 270 |
+
# define BIO_should_retry(a) BIO_test_flags(a, BIO_FLAGS_SHOULD_RETRY)
|
| 271 |
+
|
| 272 |
+
/*
|
| 273 |
+
* The next three are used in conjunction with the BIO_should_io_special()
|
| 274 |
+
* condition. After this returns true, BIO *BIO_get_retry_BIO(BIO *bio, int
|
| 275 |
+
* *reason); will walk the BIO stack and return the 'reason' for the special
|
| 276 |
+
* and the offending BIO. Given a BIO, BIO_get_retry_reason(bio) will return
|
| 277 |
+
* the code.
|
| 278 |
+
*/
|
| 279 |
+
/*
|
| 280 |
+
* Returned from the SSL bio when the certificate retrieval code had an error
|
| 281 |
+
*/
|
| 282 |
+
# define BIO_RR_SSL_X509_LOOKUP 0x01
|
| 283 |
+
/* Returned from the connect BIO when a connect would have blocked */
|
| 284 |
+
# define BIO_RR_CONNECT 0x02
|
| 285 |
+
/* Returned from the accept BIO when an accept would have blocked */
|
| 286 |
+
# define BIO_RR_ACCEPT 0x03
|
| 287 |
+
|
| 288 |
+
/* These are passed by the BIO callback */
|
| 289 |
+
# define BIO_CB_FREE 0x01
|
| 290 |
+
# define BIO_CB_READ 0x02
|
| 291 |
+
# define BIO_CB_WRITE 0x03
|
| 292 |
+
# define BIO_CB_PUTS 0x04
|
| 293 |
+
# define BIO_CB_GETS 0x05
|
| 294 |
+
# define BIO_CB_CTRL 0x06
|
| 295 |
+
# define BIO_CB_RECVMMSG 0x07
|
| 296 |
+
# define BIO_CB_SENDMMSG 0x08
|
| 297 |
+
|
| 298 |
+
/*
|
| 299 |
+
* The callback is called before and after the underling operation, The
|
| 300 |
+
* BIO_CB_RETURN flag indicates if it is after the call
|
| 301 |
+
*/
|
| 302 |
+
# define BIO_CB_RETURN 0x80
|
| 303 |
+
# define BIO_CB_return(a) ((a)|BIO_CB_RETURN)
|
| 304 |
+
# define BIO_cb_pre(a) (!((a)&BIO_CB_RETURN))
|
| 305 |
+
# define BIO_cb_post(a) ((a)&BIO_CB_RETURN)
|
| 306 |
+
|
| 307 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 308 |
+
typedef long (*BIO_callback_fn)(BIO *b, int oper, const char *argp, int argi,
|
| 309 |
+
long argl, long ret);
|
| 310 |
+
OSSL_DEPRECATEDIN_3_0 BIO_callback_fn BIO_get_callback(const BIO *b);
|
| 311 |
+
OSSL_DEPRECATEDIN_3_0 void BIO_set_callback(BIO *b, BIO_callback_fn callback);
|
| 312 |
+
OSSL_DEPRECATEDIN_3_0 long BIO_debug_callback(BIO *bio, int cmd,
|
| 313 |
+
const char *argp, int argi,
|
| 314 |
+
long argl, long ret);
|
| 315 |
+
# endif
|
| 316 |
+
|
| 317 |
+
typedef long (*BIO_callback_fn_ex)(BIO *b, int oper, const char *argp,
|
| 318 |
+
size_t len, int argi,
|
| 319 |
+
long argl, int ret, size_t *processed);
|
| 320 |
+
BIO_callback_fn_ex BIO_get_callback_ex(const BIO *b);
|
| 321 |
+
void BIO_set_callback_ex(BIO *b, BIO_callback_fn_ex callback);
|
| 322 |
+
long BIO_debug_callback_ex(BIO *bio, int oper, const char *argp, size_t len,
|
| 323 |
+
int argi, long argl, int ret, size_t *processed);
|
| 324 |
+
|
| 325 |
+
char *BIO_get_callback_arg(const BIO *b);
|
| 326 |
+
void BIO_set_callback_arg(BIO *b, char *arg);
|
| 327 |
+
|
| 328 |
+
typedef struct bio_method_st BIO_METHOD;
|
| 329 |
+
|
| 330 |
+
const char *BIO_method_name(const BIO *b);
|
| 331 |
+
int BIO_method_type(const BIO *b);
|
| 332 |
+
|
| 333 |
+
typedef int BIO_info_cb(BIO *, int, int);
|
| 334 |
+
typedef BIO_info_cb bio_info_cb; /* backward compatibility */
|
| 335 |
+
|
| 336 |
+
SKM_DEFINE_STACK_OF_INTERNAL(BIO, BIO, BIO)
|
| 337 |
+
#define sk_BIO_num(sk) OPENSSL_sk_num(ossl_check_const_BIO_sk_type(sk))
|
| 338 |
+
#define sk_BIO_value(sk, idx) ((BIO *)OPENSSL_sk_value(ossl_check_const_BIO_sk_type(sk), (idx)))
|
| 339 |
+
#define sk_BIO_new(cmp) ((STACK_OF(BIO) *)OPENSSL_sk_new(ossl_check_BIO_compfunc_type(cmp)))
|
| 340 |
+
#define sk_BIO_new_null() ((STACK_OF(BIO) *)OPENSSL_sk_new_null())
|
| 341 |
+
#define sk_BIO_new_reserve(cmp, n) ((STACK_OF(BIO) *)OPENSSL_sk_new_reserve(ossl_check_BIO_compfunc_type(cmp), (n)))
|
| 342 |
+
#define sk_BIO_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_BIO_sk_type(sk), (n))
|
| 343 |
+
#define sk_BIO_free(sk) OPENSSL_sk_free(ossl_check_BIO_sk_type(sk))
|
| 344 |
+
#define sk_BIO_zero(sk) OPENSSL_sk_zero(ossl_check_BIO_sk_type(sk))
|
| 345 |
+
#define sk_BIO_delete(sk, i) ((BIO *)OPENSSL_sk_delete(ossl_check_BIO_sk_type(sk), (i)))
|
| 346 |
+
#define sk_BIO_delete_ptr(sk, ptr) ((BIO *)OPENSSL_sk_delete_ptr(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr)))
|
| 347 |
+
#define sk_BIO_push(sk, ptr) OPENSSL_sk_push(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 348 |
+
#define sk_BIO_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 349 |
+
#define sk_BIO_pop(sk) ((BIO *)OPENSSL_sk_pop(ossl_check_BIO_sk_type(sk)))
|
| 350 |
+
#define sk_BIO_shift(sk) ((BIO *)OPENSSL_sk_shift(ossl_check_BIO_sk_type(sk)))
|
| 351 |
+
#define sk_BIO_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_BIO_sk_type(sk),ossl_check_BIO_freefunc_type(freefunc))
|
| 352 |
+
#define sk_BIO_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), (idx))
|
| 353 |
+
#define sk_BIO_set(sk, idx, ptr) ((BIO *)OPENSSL_sk_set(ossl_check_BIO_sk_type(sk), (idx), ossl_check_BIO_type(ptr)))
|
| 354 |
+
#define sk_BIO_find(sk, ptr) OPENSSL_sk_find(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 355 |
+
#define sk_BIO_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr))
|
| 356 |
+
#define sk_BIO_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_BIO_sk_type(sk), ossl_check_BIO_type(ptr), pnum)
|
| 357 |
+
#define sk_BIO_sort(sk) OPENSSL_sk_sort(ossl_check_BIO_sk_type(sk))
|
| 358 |
+
#define sk_BIO_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_BIO_sk_type(sk))
|
| 359 |
+
#define sk_BIO_dup(sk) ((STACK_OF(BIO) *)OPENSSL_sk_dup(ossl_check_const_BIO_sk_type(sk)))
|
| 360 |
+
#define sk_BIO_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(BIO) *)OPENSSL_sk_deep_copy(ossl_check_const_BIO_sk_type(sk), ossl_check_BIO_copyfunc_type(copyfunc), ossl_check_BIO_freefunc_type(freefunc)))
|
| 361 |
+
#define sk_BIO_set_cmp_func(sk, cmp) ((sk_BIO_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_BIO_sk_type(sk), ossl_check_BIO_compfunc_type(cmp)))
|
| 362 |
+
|
| 363 |
+
|
| 364 |
+
|
| 365 |
+
/* Prefix and suffix callback in ASN1 BIO */
|
| 366 |
+
typedef int asn1_ps_func (BIO *b, unsigned char **pbuf, int *plen,
|
| 367 |
+
void *parg);
|
| 368 |
+
|
| 369 |
+
typedef void (*BIO_dgram_sctp_notification_handler_fn) (BIO *b,
|
| 370 |
+
void *context,
|
| 371 |
+
void *buf);
|
| 372 |
+
# ifndef OPENSSL_NO_SCTP
|
| 373 |
+
/* SCTP parameter structs */
|
| 374 |
+
struct bio_dgram_sctp_sndinfo {
|
| 375 |
+
uint16_t snd_sid;
|
| 376 |
+
uint16_t snd_flags;
|
| 377 |
+
uint32_t snd_ppid;
|
| 378 |
+
uint32_t snd_context;
|
| 379 |
+
};
|
| 380 |
+
|
| 381 |
+
struct bio_dgram_sctp_rcvinfo {
|
| 382 |
+
uint16_t rcv_sid;
|
| 383 |
+
uint16_t rcv_ssn;
|
| 384 |
+
uint16_t rcv_flags;
|
| 385 |
+
uint32_t rcv_ppid;
|
| 386 |
+
uint32_t rcv_tsn;
|
| 387 |
+
uint32_t rcv_cumtsn;
|
| 388 |
+
uint32_t rcv_context;
|
| 389 |
+
};
|
| 390 |
+
|
| 391 |
+
struct bio_dgram_sctp_prinfo {
|
| 392 |
+
uint16_t pr_policy;
|
| 393 |
+
uint32_t pr_value;
|
| 394 |
+
};
|
| 395 |
+
# endif
|
| 396 |
+
|
| 397 |
+
/* BIO_sendmmsg/BIO_recvmmsg-related definitions */
|
| 398 |
+
typedef struct bio_msg_st {
|
| 399 |
+
void *data;
|
| 400 |
+
size_t data_len;
|
| 401 |
+
BIO_ADDR *peer, *local;
|
| 402 |
+
uint64_t flags;
|
| 403 |
+
} BIO_MSG;
|
| 404 |
+
|
| 405 |
+
typedef struct bio_mmsg_cb_args_st {
|
| 406 |
+
BIO_MSG *msg;
|
| 407 |
+
size_t stride, num_msg;
|
| 408 |
+
uint64_t flags;
|
| 409 |
+
size_t *msgs_processed;
|
| 410 |
+
} BIO_MMSG_CB_ARGS;
|
| 411 |
+
|
| 412 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_NONE 0
|
| 413 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SOCK_FD 1
|
| 414 |
+
#define BIO_POLL_DESCRIPTOR_TYPE_SSL 2
|
| 415 |
+
#define BIO_POLL_DESCRIPTOR_CUSTOM_START 8192
|
| 416 |
+
|
| 417 |
+
typedef struct bio_poll_descriptor_st {
|
| 418 |
+
uint32_t type;
|
| 419 |
+
union {
|
| 420 |
+
int fd;
|
| 421 |
+
void *custom;
|
| 422 |
+
uintptr_t custom_ui;
|
| 423 |
+
SSL *ssl;
|
| 424 |
+
} value;
|
| 425 |
+
} BIO_POLL_DESCRIPTOR;
|
| 426 |
+
|
| 427 |
+
/*
|
| 428 |
+
* #define BIO_CONN_get_param_hostname BIO_ctrl
|
| 429 |
+
*/
|
| 430 |
+
|
| 431 |
+
# define BIO_C_SET_CONNECT 100
|
| 432 |
+
# define BIO_C_DO_STATE_MACHINE 101
|
| 433 |
+
# define BIO_C_SET_NBIO 102
|
| 434 |
+
/* # define BIO_C_SET_PROXY_PARAM 103 */
|
| 435 |
+
# define BIO_C_SET_FD 104
|
| 436 |
+
# define BIO_C_GET_FD 105
|
| 437 |
+
# define BIO_C_SET_FILE_PTR 106
|
| 438 |
+
# define BIO_C_GET_FILE_PTR 107
|
| 439 |
+
# define BIO_C_SET_FILENAME 108
|
| 440 |
+
# define BIO_C_SET_SSL 109
|
| 441 |
+
# define BIO_C_GET_SSL 110
|
| 442 |
+
# define BIO_C_SET_MD 111
|
| 443 |
+
# define BIO_C_GET_MD 112
|
| 444 |
+
# define BIO_C_GET_CIPHER_STATUS 113
|
| 445 |
+
# define BIO_C_SET_BUF_MEM 114
|
| 446 |
+
# define BIO_C_GET_BUF_MEM_PTR 115
|
| 447 |
+
# define BIO_C_GET_BUFF_NUM_LINES 116
|
| 448 |
+
# define BIO_C_SET_BUFF_SIZE 117
|
| 449 |
+
# define BIO_C_SET_ACCEPT 118
|
| 450 |
+
# define BIO_C_SSL_MODE 119
|
| 451 |
+
# define BIO_C_GET_MD_CTX 120
|
| 452 |
+
/* # define BIO_C_GET_PROXY_PARAM 121 */
|
| 453 |
+
# define BIO_C_SET_BUFF_READ_DATA 122/* data to read first */
|
| 454 |
+
# define BIO_C_GET_CONNECT 123
|
| 455 |
+
# define BIO_C_GET_ACCEPT 124
|
| 456 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_BYTES 125
|
| 457 |
+
# define BIO_C_GET_SSL_NUM_RENEGOTIATES 126
|
| 458 |
+
# define BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT 127
|
| 459 |
+
# define BIO_C_FILE_SEEK 128
|
| 460 |
+
# define BIO_C_GET_CIPHER_CTX 129
|
| 461 |
+
# define BIO_C_SET_BUF_MEM_EOF_RETURN 130/* return end of input
|
| 462 |
+
* value */
|
| 463 |
+
# define BIO_C_SET_BIND_MODE 131
|
| 464 |
+
# define BIO_C_GET_BIND_MODE 132
|
| 465 |
+
# define BIO_C_FILE_TELL 133
|
| 466 |
+
# define BIO_C_GET_SOCKS 134
|
| 467 |
+
# define BIO_C_SET_SOCKS 135
|
| 468 |
+
|
| 469 |
+
# define BIO_C_SET_WRITE_BUF_SIZE 136/* for BIO_s_bio */
|
| 470 |
+
# define BIO_C_GET_WRITE_BUF_SIZE 137
|
| 471 |
+
# define BIO_C_MAKE_BIO_PAIR 138
|
| 472 |
+
# define BIO_C_DESTROY_BIO_PAIR 139
|
| 473 |
+
# define BIO_C_GET_WRITE_GUARANTEE 140
|
| 474 |
+
# define BIO_C_GET_READ_REQUEST 141
|
| 475 |
+
# define BIO_C_SHUTDOWN_WR 142
|
| 476 |
+
# define BIO_C_NREAD0 143
|
| 477 |
+
# define BIO_C_NREAD 144
|
| 478 |
+
# define BIO_C_NWRITE0 145
|
| 479 |
+
# define BIO_C_NWRITE 146
|
| 480 |
+
# define BIO_C_RESET_READ_REQUEST 147
|
| 481 |
+
# define BIO_C_SET_MD_CTX 148
|
| 482 |
+
|
| 483 |
+
# define BIO_C_SET_PREFIX 149
|
| 484 |
+
# define BIO_C_GET_PREFIX 150
|
| 485 |
+
# define BIO_C_SET_SUFFIX 151
|
| 486 |
+
# define BIO_C_GET_SUFFIX 152
|
| 487 |
+
|
| 488 |
+
# define BIO_C_SET_EX_ARG 153
|
| 489 |
+
# define BIO_C_GET_EX_ARG 154
|
| 490 |
+
|
| 491 |
+
# define BIO_C_SET_CONNECT_MODE 155
|
| 492 |
+
|
| 493 |
+
# define BIO_C_SET_TFO 156 /* like BIO_C_SET_NBIO */
|
| 494 |
+
|
| 495 |
+
# define BIO_C_SET_SOCK_TYPE 157
|
| 496 |
+
# define BIO_C_GET_SOCK_TYPE 158
|
| 497 |
+
# define BIO_C_GET_DGRAM_BIO 159
|
| 498 |
+
|
| 499 |
+
# define BIO_set_app_data(s,arg) BIO_set_ex_data(s,0,arg)
|
| 500 |
+
# define BIO_get_app_data(s) BIO_get_ex_data(s,0)
|
| 501 |
+
|
| 502 |
+
# define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL)
|
| 503 |
+
# define BIO_set_tfo(b,n) BIO_ctrl(b,BIO_C_SET_TFO,(n),NULL)
|
| 504 |
+
|
| 505 |
+
# ifndef OPENSSL_NO_SOCK
|
| 506 |
+
/* IP families we support, for BIO_s_connect() and BIO_s_accept() */
|
| 507 |
+
/* Note: the underlying operating system may not support some of them */
|
| 508 |
+
# define BIO_FAMILY_IPV4 4
|
| 509 |
+
# define BIO_FAMILY_IPV6 6
|
| 510 |
+
# define BIO_FAMILY_IPANY 256
|
| 511 |
+
|
| 512 |
+
/* BIO_s_connect() */
|
| 513 |
+
# define BIO_set_conn_hostname(b,name) BIO_ctrl(b,BIO_C_SET_CONNECT,0, \
|
| 514 |
+
(char *)(name))
|
| 515 |
+
# define BIO_set_conn_port(b,port) BIO_ctrl(b,BIO_C_SET_CONNECT,1, \
|
| 516 |
+
(char *)(port))
|
| 517 |
+
# define BIO_set_conn_address(b,addr) BIO_ctrl(b,BIO_C_SET_CONNECT,2, \
|
| 518 |
+
(char *)(addr))
|
| 519 |
+
# define BIO_set_conn_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_CONNECT,3,f)
|
| 520 |
+
# define BIO_get_conn_hostname(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,0))
|
| 521 |
+
# define BIO_get_conn_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,1))
|
| 522 |
+
# define BIO_get_conn_address(b) ((const BIO_ADDR *)BIO_ptr_ctrl(b,BIO_C_GET_CONNECT,2))
|
| 523 |
+
# define BIO_get_conn_ip_family(b) BIO_ctrl(b,BIO_C_GET_CONNECT,3,NULL)
|
| 524 |
+
# define BIO_get_conn_mode(b) BIO_ctrl(b,BIO_C_GET_CONNECT,4,NULL)
|
| 525 |
+
# define BIO_set_conn_mode(b,n) BIO_ctrl(b,BIO_C_SET_CONNECT_MODE,(n),NULL)
|
| 526 |
+
# define BIO_set_sock_type(b,t) BIO_ctrl(b,BIO_C_SET_SOCK_TYPE,(t),NULL)
|
| 527 |
+
# define BIO_get_sock_type(b) BIO_ctrl(b,BIO_C_GET_SOCK_TYPE,0,NULL)
|
| 528 |
+
# define BIO_get0_dgram_bio(b, p) BIO_ctrl(b,BIO_C_GET_DGRAM_BIO,0,(void *)(BIO **)(p))
|
| 529 |
+
|
| 530 |
+
/* BIO_s_accept() */
|
| 531 |
+
# define BIO_set_accept_name(b,name) BIO_ctrl(b,BIO_C_SET_ACCEPT,0, \
|
| 532 |
+
(char *)(name))
|
| 533 |
+
# define BIO_set_accept_port(b,port) BIO_ctrl(b,BIO_C_SET_ACCEPT,1, \
|
| 534 |
+
(char *)(port))
|
| 535 |
+
# define BIO_get_accept_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,0))
|
| 536 |
+
# define BIO_get_accept_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,1))
|
| 537 |
+
# define BIO_get_peer_name(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,2))
|
| 538 |
+
# define BIO_get_peer_port(b) ((const char *)BIO_ptr_ctrl(b,BIO_C_GET_ACCEPT,3))
|
| 539 |
+
/* #define BIO_set_nbio(b,n) BIO_ctrl(b,BIO_C_SET_NBIO,(n),NULL) */
|
| 540 |
+
# define BIO_set_nbio_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,2,(n)?(void *)"a":NULL)
|
| 541 |
+
# define BIO_set_accept_bios(b,bio) BIO_ctrl(b,BIO_C_SET_ACCEPT,3, \
|
| 542 |
+
(char *)(bio))
|
| 543 |
+
# define BIO_set_accept_ip_family(b,f) BIO_int_ctrl(b,BIO_C_SET_ACCEPT,4,f)
|
| 544 |
+
# define BIO_get_accept_ip_family(b) BIO_ctrl(b,BIO_C_GET_ACCEPT,4,NULL)
|
| 545 |
+
# define BIO_set_tfo_accept(b,n) BIO_ctrl(b,BIO_C_SET_ACCEPT,5,(n)?(void *)"a":NULL)
|
| 546 |
+
|
| 547 |
+
/* Aliases kept for backward compatibility */
|
| 548 |
+
# define BIO_BIND_NORMAL 0
|
| 549 |
+
# define BIO_BIND_REUSEADDR BIO_SOCK_REUSEADDR
|
| 550 |
+
# define BIO_BIND_REUSEADDR_IF_UNUSED BIO_SOCK_REUSEADDR
|
| 551 |
+
# define BIO_set_bind_mode(b,mode) BIO_ctrl(b,BIO_C_SET_BIND_MODE,mode,NULL)
|
| 552 |
+
# define BIO_get_bind_mode(b) BIO_ctrl(b,BIO_C_GET_BIND_MODE,0,NULL)
|
| 553 |
+
# endif /* OPENSSL_NO_SOCK */
|
| 554 |
+
|
| 555 |
+
# define BIO_do_connect(b) BIO_do_handshake(b)
|
| 556 |
+
# define BIO_do_accept(b) BIO_do_handshake(b)
|
| 557 |
+
|
| 558 |
+
# define BIO_do_handshake(b) BIO_ctrl(b,BIO_C_DO_STATE_MACHINE,0,NULL)
|
| 559 |
+
|
| 560 |
+
/* BIO_s_datagram(), BIO_s_fd(), BIO_s_socket(), BIO_s_accept() and BIO_s_connect() */
|
| 561 |
+
# define BIO_set_fd(b,fd,c) BIO_int_ctrl(b,BIO_C_SET_FD,c,fd)
|
| 562 |
+
# define BIO_get_fd(b,c) BIO_ctrl(b,BIO_C_GET_FD,0,(char *)(c))
|
| 563 |
+
|
| 564 |
+
/* BIO_s_file() */
|
| 565 |
+
# define BIO_set_fp(b,fp,c) BIO_ctrl(b,BIO_C_SET_FILE_PTR,c,(char *)(fp))
|
| 566 |
+
# define BIO_get_fp(b,fpp) BIO_ctrl(b,BIO_C_GET_FILE_PTR,0,(char *)(fpp))
|
| 567 |
+
|
| 568 |
+
/* BIO_s_fd() and BIO_s_file() */
|
| 569 |
+
# define BIO_seek(b,ofs) (int)BIO_ctrl(b,BIO_C_FILE_SEEK,ofs,NULL)
|
| 570 |
+
# define BIO_tell(b) (int)BIO_ctrl(b,BIO_C_FILE_TELL,0,NULL)
|
| 571 |
+
|
| 572 |
+
/*
|
| 573 |
+
* name is cast to lose const, but might be better to route through a
|
| 574 |
+
* function so we can do it safely
|
| 575 |
+
*/
|
| 576 |
+
# ifdef CONST_STRICT
|
| 577 |
+
/*
|
| 578 |
+
* If you are wondering why this isn't defined, its because CONST_STRICT is
|
| 579 |
+
* purely a compile-time kludge to allow const to be checked.
|
| 580 |
+
*/
|
| 581 |
+
int BIO_read_filename(BIO *b, const char *name);
|
| 582 |
+
# else
|
| 583 |
+
# define BIO_read_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 584 |
+
BIO_CLOSE|BIO_FP_READ,(char *)(name))
|
| 585 |
+
# endif
|
| 586 |
+
# define BIO_write_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 587 |
+
BIO_CLOSE|BIO_FP_WRITE,name)
|
| 588 |
+
# define BIO_append_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 589 |
+
BIO_CLOSE|BIO_FP_APPEND,name)
|
| 590 |
+
# define BIO_rw_filename(b,name) (int)BIO_ctrl(b,BIO_C_SET_FILENAME, \
|
| 591 |
+
BIO_CLOSE|BIO_FP_READ|BIO_FP_WRITE,name)
|
| 592 |
+
|
| 593 |
+
/*
|
| 594 |
+
* WARNING WARNING, this ups the reference count on the read bio of the SSL
|
| 595 |
+
* structure. This is because the ssl read BIO is now pointed to by the
|
| 596 |
+
* next_bio field in the bio. So when you free the BIO, make sure you are
|
| 597 |
+
* doing a BIO_free_all() to catch the underlying BIO.
|
| 598 |
+
*/
|
| 599 |
+
# define BIO_set_ssl(b,ssl,c) BIO_ctrl(b,BIO_C_SET_SSL,c,(char *)(ssl))
|
| 600 |
+
# define BIO_get_ssl(b,sslp) BIO_ctrl(b,BIO_C_GET_SSL,0,(char *)(sslp))
|
| 601 |
+
# define BIO_set_ssl_mode(b,client) BIO_ctrl(b,BIO_C_SSL_MODE,client,NULL)
|
| 602 |
+
# define BIO_set_ssl_renegotiate_bytes(b,num) \
|
| 603 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_BYTES,num,NULL)
|
| 604 |
+
# define BIO_get_num_renegotiates(b) \
|
| 605 |
+
BIO_ctrl(b,BIO_C_GET_SSL_NUM_RENEGOTIATES,0,NULL)
|
| 606 |
+
# define BIO_set_ssl_renegotiate_timeout(b,seconds) \
|
| 607 |
+
BIO_ctrl(b,BIO_C_SET_SSL_RENEGOTIATE_TIMEOUT,seconds,NULL)
|
| 608 |
+
|
| 609 |
+
/* defined in evp.h */
|
| 610 |
+
/* #define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,1,(char *)(md)) */
|
| 611 |
+
|
| 612 |
+
# define BIO_get_mem_data(b,pp) BIO_ctrl(b,BIO_CTRL_INFO,0,(char *)(pp))
|
| 613 |
+
# define BIO_set_mem_buf(b,bm,c) BIO_ctrl(b,BIO_C_SET_BUF_MEM,c,(char *)(bm))
|
| 614 |
+
# define BIO_get_mem_ptr(b,pp) BIO_ctrl(b,BIO_C_GET_BUF_MEM_PTR,0, \
|
| 615 |
+
(char *)(pp))
|
| 616 |
+
# define BIO_set_mem_eof_return(b,v) \
|
| 617 |
+
BIO_ctrl(b,BIO_C_SET_BUF_MEM_EOF_RETURN,v,NULL)
|
| 618 |
+
|
| 619 |
+
/* For the BIO_f_buffer() type */
|
| 620 |
+
# define BIO_get_buffer_num_lines(b) BIO_ctrl(b,BIO_C_GET_BUFF_NUM_LINES,0,NULL)
|
| 621 |
+
# define BIO_set_buffer_size(b,size) BIO_ctrl(b,BIO_C_SET_BUFF_SIZE,size,NULL)
|
| 622 |
+
# define BIO_set_read_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,0)
|
| 623 |
+
# define BIO_set_write_buffer_size(b,size) BIO_int_ctrl(b,BIO_C_SET_BUFF_SIZE,size,1)
|
| 624 |
+
# define BIO_set_buffer_read_data(b,buf,num) BIO_ctrl(b,BIO_C_SET_BUFF_READ_DATA,num,buf)
|
| 625 |
+
|
| 626 |
+
/* Don't use the next one unless you know what you are doing :-) */
|
| 627 |
+
# define BIO_dup_state(b,ret) BIO_ctrl(b,BIO_CTRL_DUP,0,(char *)(ret))
|
| 628 |
+
|
| 629 |
+
# define BIO_reset(b) (int)BIO_ctrl(b,BIO_CTRL_RESET,0,NULL)
|
| 630 |
+
# define BIO_eof(b) (int)BIO_ctrl(b,BIO_CTRL_EOF,0,NULL)
|
| 631 |
+
# define BIO_set_close(b,c) (int)BIO_ctrl(b,BIO_CTRL_SET_CLOSE,(c),NULL)
|
| 632 |
+
# define BIO_get_close(b) (int)BIO_ctrl(b,BIO_CTRL_GET_CLOSE,0,NULL)
|
| 633 |
+
# define BIO_pending(b) (int)BIO_ctrl(b,BIO_CTRL_PENDING,0,NULL)
|
| 634 |
+
# define BIO_wpending(b) (int)BIO_ctrl(b,BIO_CTRL_WPENDING,0,NULL)
|
| 635 |
+
/* ...pending macros have inappropriate return type */
|
| 636 |
+
size_t BIO_ctrl_pending(BIO *b);
|
| 637 |
+
size_t BIO_ctrl_wpending(BIO *b);
|
| 638 |
+
# define BIO_flush(b) (int)BIO_ctrl(b,BIO_CTRL_FLUSH,0,NULL)
|
| 639 |
+
# define BIO_get_info_callback(b,cbp) (int)BIO_ctrl(b,BIO_CTRL_GET_CALLBACK,0, \
|
| 640 |
+
cbp)
|
| 641 |
+
# define BIO_set_info_callback(b,cb) (int)BIO_callback_ctrl(b,BIO_CTRL_SET_CALLBACK,cb)
|
| 642 |
+
|
| 643 |
+
/* For the BIO_f_buffer() type */
|
| 644 |
+
# define BIO_buffer_get_num_lines(b) BIO_ctrl(b,BIO_CTRL_GET,0,NULL)
|
| 645 |
+
# define BIO_buffer_peek(b,s,l) BIO_ctrl(b,BIO_CTRL_PEEK,(l),(s))
|
| 646 |
+
|
| 647 |
+
/* For BIO_s_bio() */
|
| 648 |
+
# define BIO_set_write_buf_size(b,size) (int)BIO_ctrl(b,BIO_C_SET_WRITE_BUF_SIZE,size,NULL)
|
| 649 |
+
# define BIO_get_write_buf_size(b,size) (size_t)BIO_ctrl(b,BIO_C_GET_WRITE_BUF_SIZE,size,NULL)
|
| 650 |
+
# define BIO_make_bio_pair(b1,b2) (int)BIO_ctrl(b1,BIO_C_MAKE_BIO_PAIR,0,b2)
|
| 651 |
+
# define BIO_destroy_bio_pair(b) (int)BIO_ctrl(b,BIO_C_DESTROY_BIO_PAIR,0,NULL)
|
| 652 |
+
# define BIO_shutdown_wr(b) (int)BIO_ctrl(b, BIO_C_SHUTDOWN_WR, 0, NULL)
|
| 653 |
+
/* macros with inappropriate type -- but ...pending macros use int too: */
|
| 654 |
+
# define BIO_get_write_guarantee(b) (int)BIO_ctrl(b,BIO_C_GET_WRITE_GUARANTEE,0,NULL)
|
| 655 |
+
# define BIO_get_read_request(b) (int)BIO_ctrl(b,BIO_C_GET_READ_REQUEST,0,NULL)
|
| 656 |
+
size_t BIO_ctrl_get_write_guarantee(BIO *b);
|
| 657 |
+
size_t BIO_ctrl_get_read_request(BIO *b);
|
| 658 |
+
int BIO_ctrl_reset_read_request(BIO *b);
|
| 659 |
+
|
| 660 |
+
/* ctrl macros for dgram */
|
| 661 |
+
# define BIO_ctrl_dgram_connect(b,peer) \
|
| 662 |
+
(int)BIO_ctrl(b,BIO_CTRL_DGRAM_CONNECT,0, (char *)(peer))
|
| 663 |
+
# define BIO_ctrl_set_connected(b,peer) \
|
| 664 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_CONNECTED, 0, (char *)(peer))
|
| 665 |
+
# define BIO_dgram_recv_timedout(b) \
|
| 666 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_RECV_TIMER_EXP, 0, NULL)
|
| 667 |
+
# define BIO_dgram_send_timedout(b) \
|
| 668 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_SEND_TIMER_EXP, 0, NULL)
|
| 669 |
+
# define BIO_dgram_get_peer(b,peer) \
|
| 670 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_GET_PEER, 0, (char *)(peer))
|
| 671 |
+
# define BIO_dgram_set_peer(b,peer) \
|
| 672 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, (char *)(peer))
|
| 673 |
+
# define BIO_dgram_detect_peer_addr(b,peer) \
|
| 674 |
+
(int)BIO_ctrl(b, BIO_CTRL_DGRAM_DETECT_PEER_ADDR, 0, (char *)(peer))
|
| 675 |
+
# define BIO_dgram_get_mtu_overhead(b) \
|
| 676 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
| 677 |
+
# define BIO_dgram_get_local_addr_cap(b) \
|
| 678 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_CAP, 0, NULL)
|
| 679 |
+
# define BIO_dgram_get_local_addr_enable(b, penable) \
|
| 680 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_LOCAL_ADDR_ENABLE, 0, (char *)(penable))
|
| 681 |
+
# define BIO_dgram_set_local_addr_enable(b, enable) \
|
| 682 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_LOCAL_ADDR_ENABLE, (enable), NULL)
|
| 683 |
+
# define BIO_dgram_get_effective_caps(b) \
|
| 684 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_EFFECTIVE_CAPS, 0, NULL)
|
| 685 |
+
# define BIO_dgram_get_caps(b) \
|
| 686 |
+
(uint32_t)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_CAPS, 0, NULL)
|
| 687 |
+
# define BIO_dgram_set_caps(b, caps) \
|
| 688 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_CAPS, (long)(caps), NULL)
|
| 689 |
+
# define BIO_dgram_get_no_trunc(b) \
|
| 690 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_NO_TRUNC, 0, NULL)
|
| 691 |
+
# define BIO_dgram_set_no_trunc(b, enable) \
|
| 692 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_NO_TRUNC, (enable), NULL)
|
| 693 |
+
# define BIO_dgram_get_mtu(b) \
|
| 694 |
+
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU, 0, NULL)
|
| 695 |
+
# define BIO_dgram_set_mtu(b, mtu) \
|
| 696 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET_MTU, (mtu), NULL)
|
| 697 |
+
# define BIO_dgram_set0_local_addr(b, addr) \
|
| 698 |
+
(int)BIO_ctrl((b), BIO_CTRL_DGRAM_SET0_LOCAL_ADDR, 0, (addr))
|
| 699 |
+
|
| 700 |
+
/* ctrl macros for BIO_f_prefix */
|
| 701 |
+
# define BIO_set_prefix(b,p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
| 702 |
+
# define BIO_set_indent(b,i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
| 703 |
+
# define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
| 704 |
+
|
| 705 |
+
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
| 706 |
+
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
| 707 |
+
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
| 708 |
+
void *BIO_get_ex_data(const BIO *bio, int idx);
|
| 709 |
+
uint64_t BIO_number_read(BIO *bio);
|
| 710 |
+
uint64_t BIO_number_written(BIO *bio);
|
| 711 |
+
|
| 712 |
+
/* For BIO_f_asn1() */
|
| 713 |
+
int BIO_asn1_set_prefix(BIO *b, asn1_ps_func *prefix,
|
| 714 |
+
asn1_ps_func *prefix_free);
|
| 715 |
+
int BIO_asn1_get_prefix(BIO *b, asn1_ps_func **pprefix,
|
| 716 |
+
asn1_ps_func **pprefix_free);
|
| 717 |
+
int BIO_asn1_set_suffix(BIO *b, asn1_ps_func *suffix,
|
| 718 |
+
asn1_ps_func *suffix_free);
|
| 719 |
+
int BIO_asn1_get_suffix(BIO *b, asn1_ps_func **psuffix,
|
| 720 |
+
asn1_ps_func **psuffix_free);
|
| 721 |
+
|
| 722 |
+
const BIO_METHOD *BIO_s_file(void);
|
| 723 |
+
BIO *BIO_new_file(const char *filename, const char *mode);
|
| 724 |
+
BIO *BIO_new_from_core_bio(OSSL_LIB_CTX *libctx, OSSL_CORE_BIO *corebio);
|
| 725 |
+
# ifndef OPENSSL_NO_STDIO
|
| 726 |
+
BIO *BIO_new_fp(FILE *stream, int close_flag);
|
| 727 |
+
# endif
|
| 728 |
+
BIO *BIO_new_ex(OSSL_LIB_CTX *libctx, const BIO_METHOD *method);
|
| 729 |
+
BIO *BIO_new(const BIO_METHOD *type);
|
| 730 |
+
int BIO_free(BIO *a);
|
| 731 |
+
void BIO_set_data(BIO *a, void *ptr);
|
| 732 |
+
void *BIO_get_data(BIO *a);
|
| 733 |
+
void BIO_set_init(BIO *a, int init);
|
| 734 |
+
int BIO_get_init(BIO *a);
|
| 735 |
+
void BIO_set_shutdown(BIO *a, int shut);
|
| 736 |
+
int BIO_get_shutdown(BIO *a);
|
| 737 |
+
void BIO_vfree(BIO *a);
|
| 738 |
+
int BIO_up_ref(BIO *a);
|
| 739 |
+
int BIO_read(BIO *b, void *data, int dlen);
|
| 740 |
+
int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);
|
| 741 |
+
__owur int BIO_recvmmsg(BIO *b, BIO_MSG *msg,
|
| 742 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 743 |
+
size_t *msgs_processed);
|
| 744 |
+
int BIO_gets(BIO *bp, char *buf, int size);
|
| 745 |
+
int BIO_get_line(BIO *bio, char *buf, int size);
|
| 746 |
+
int BIO_write(BIO *b, const void *data, int dlen);
|
| 747 |
+
int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);
|
| 748 |
+
__owur int BIO_sendmmsg(BIO *b, BIO_MSG *msg,
|
| 749 |
+
size_t stride, size_t num_msg, uint64_t flags,
|
| 750 |
+
size_t *msgs_processed);
|
| 751 |
+
__owur int BIO_get_rpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 752 |
+
__owur int BIO_get_wpoll_descriptor(BIO *b, BIO_POLL_DESCRIPTOR *desc);
|
| 753 |
+
int BIO_puts(BIO *bp, const char *buf);
|
| 754 |
+
int BIO_indent(BIO *b, int indent, int max);
|
| 755 |
+
long BIO_ctrl(BIO *bp, int cmd, long larg, void *parg);
|
| 756 |
+
long BIO_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp);
|
| 757 |
+
void *BIO_ptr_ctrl(BIO *bp, int cmd, long larg);
|
| 758 |
+
long BIO_int_ctrl(BIO *bp, int cmd, long larg, int iarg);
|
| 759 |
+
BIO *BIO_push(BIO *b, BIO *append);
|
| 760 |
+
BIO *BIO_pop(BIO *b);
|
| 761 |
+
void BIO_free_all(BIO *a);
|
| 762 |
+
BIO *BIO_find_type(BIO *b, int bio_type);
|
| 763 |
+
BIO *BIO_next(BIO *b);
|
| 764 |
+
void BIO_set_next(BIO *b, BIO *next);
|
| 765 |
+
BIO *BIO_get_retry_BIO(BIO *bio, int *reason);
|
| 766 |
+
int BIO_get_retry_reason(BIO *bio);
|
| 767 |
+
void BIO_set_retry_reason(BIO *bio, int reason);
|
| 768 |
+
BIO *BIO_dup_chain(BIO *in);
|
| 769 |
+
|
| 770 |
+
int BIO_nread0(BIO *bio, char **buf);
|
| 771 |
+
int BIO_nread(BIO *bio, char **buf, int num);
|
| 772 |
+
int BIO_nwrite0(BIO *bio, char **buf);
|
| 773 |
+
int BIO_nwrite(BIO *bio, char **buf, int num);
|
| 774 |
+
|
| 775 |
+
const BIO_METHOD *BIO_s_mem(void);
|
| 776 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 777 |
+
const BIO_METHOD *BIO_s_dgram_mem(void);
|
| 778 |
+
# endif
|
| 779 |
+
const BIO_METHOD *BIO_s_secmem(void);
|
| 780 |
+
BIO *BIO_new_mem_buf(const void *buf, int len);
|
| 781 |
+
# ifndef OPENSSL_NO_SOCK
|
| 782 |
+
const BIO_METHOD *BIO_s_socket(void);
|
| 783 |
+
const BIO_METHOD *BIO_s_connect(void);
|
| 784 |
+
const BIO_METHOD *BIO_s_accept(void);
|
| 785 |
+
# endif
|
| 786 |
+
const BIO_METHOD *BIO_s_fd(void);
|
| 787 |
+
const BIO_METHOD *BIO_s_log(void);
|
| 788 |
+
const BIO_METHOD *BIO_s_bio(void);
|
| 789 |
+
const BIO_METHOD *BIO_s_null(void);
|
| 790 |
+
const BIO_METHOD *BIO_f_null(void);
|
| 791 |
+
const BIO_METHOD *BIO_f_buffer(void);
|
| 792 |
+
const BIO_METHOD *BIO_f_readbuffer(void);
|
| 793 |
+
const BIO_METHOD *BIO_f_linebuffer(void);
|
| 794 |
+
const BIO_METHOD *BIO_f_nbio_test(void);
|
| 795 |
+
const BIO_METHOD *BIO_f_prefix(void);
|
| 796 |
+
const BIO_METHOD *BIO_s_core(void);
|
| 797 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 798 |
+
const BIO_METHOD *BIO_s_dgram_pair(void);
|
| 799 |
+
const BIO_METHOD *BIO_s_datagram(void);
|
| 800 |
+
int BIO_dgram_non_fatal_error(int error);
|
| 801 |
+
BIO *BIO_new_dgram(int fd, int close_flag);
|
| 802 |
+
# ifndef OPENSSL_NO_SCTP
|
| 803 |
+
const BIO_METHOD *BIO_s_datagram_sctp(void);
|
| 804 |
+
BIO *BIO_new_dgram_sctp(int fd, int close_flag);
|
| 805 |
+
int BIO_dgram_is_sctp(BIO *bio);
|
| 806 |
+
int BIO_dgram_sctp_notification_cb(BIO *b,
|
| 807 |
+
BIO_dgram_sctp_notification_handler_fn handle_notifications,
|
| 808 |
+
void *context);
|
| 809 |
+
int BIO_dgram_sctp_wait_for_dry(BIO *b);
|
| 810 |
+
int BIO_dgram_sctp_msg_waiting(BIO *b);
|
| 811 |
+
# endif
|
| 812 |
+
# endif
|
| 813 |
+
|
| 814 |
+
# ifndef OPENSSL_NO_SOCK
|
| 815 |
+
int BIO_sock_should_retry(int i);
|
| 816 |
+
int BIO_sock_non_fatal_error(int error);
|
| 817 |
+
int BIO_err_is_non_fatal(unsigned int errcode);
|
| 818 |
+
int BIO_socket_wait(int fd, int for_read, time_t max_time);
|
| 819 |
+
# endif
|
| 820 |
+
int BIO_wait(BIO *bio, time_t max_time, unsigned int nap_milliseconds);
|
| 821 |
+
int BIO_do_connect_retry(BIO *bio, int timeout, int nap_milliseconds);
|
| 822 |
+
|
| 823 |
+
int BIO_fd_should_retry(int i);
|
| 824 |
+
int BIO_fd_non_fatal_error(int error);
|
| 825 |
+
int BIO_dump_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 826 |
+
void *u, const void *s, int len);
|
| 827 |
+
int BIO_dump_indent_cb(int (*cb) (const void *data, size_t len, void *u),
|
| 828 |
+
void *u, const void *s, int len, int indent);
|
| 829 |
+
int BIO_dump(BIO *b, const void *bytes, int len);
|
| 830 |
+
int BIO_dump_indent(BIO *b, const void *bytes, int len, int indent);
|
| 831 |
+
# ifndef OPENSSL_NO_STDIO
|
| 832 |
+
int BIO_dump_fp(FILE *fp, const void *s, int len);
|
| 833 |
+
int BIO_dump_indent_fp(FILE *fp, const void *s, int len, int indent);
|
| 834 |
+
# endif
|
| 835 |
+
int BIO_hex_string(BIO *out, int indent, int width, const void *data,
|
| 836 |
+
int datalen);
|
| 837 |
+
|
| 838 |
+
# ifndef OPENSSL_NO_SOCK
|
| 839 |
+
BIO_ADDR *BIO_ADDR_new(void);
|
| 840 |
+
int BIO_ADDR_copy(BIO_ADDR *dst, const BIO_ADDR *src);
|
| 841 |
+
BIO_ADDR *BIO_ADDR_dup(const BIO_ADDR *ap);
|
| 842 |
+
int BIO_ADDR_rawmake(BIO_ADDR *ap, int family,
|
| 843 |
+
const void *where, size_t wherelen, unsigned short port);
|
| 844 |
+
void BIO_ADDR_free(BIO_ADDR *);
|
| 845 |
+
void BIO_ADDR_clear(BIO_ADDR *ap);
|
| 846 |
+
int BIO_ADDR_family(const BIO_ADDR *ap);
|
| 847 |
+
int BIO_ADDR_rawaddress(const BIO_ADDR *ap, void *p, size_t *l);
|
| 848 |
+
unsigned short BIO_ADDR_rawport(const BIO_ADDR *ap);
|
| 849 |
+
char *BIO_ADDR_hostname_string(const BIO_ADDR *ap, int numeric);
|
| 850 |
+
char *BIO_ADDR_service_string(const BIO_ADDR *ap, int numeric);
|
| 851 |
+
char *BIO_ADDR_path_string(const BIO_ADDR *ap);
|
| 852 |
+
|
| 853 |
+
const BIO_ADDRINFO *BIO_ADDRINFO_next(const BIO_ADDRINFO *bai);
|
| 854 |
+
int BIO_ADDRINFO_family(const BIO_ADDRINFO *bai);
|
| 855 |
+
int BIO_ADDRINFO_socktype(const BIO_ADDRINFO *bai);
|
| 856 |
+
int BIO_ADDRINFO_protocol(const BIO_ADDRINFO *bai);
|
| 857 |
+
const BIO_ADDR *BIO_ADDRINFO_address(const BIO_ADDRINFO *bai);
|
| 858 |
+
void BIO_ADDRINFO_free(BIO_ADDRINFO *bai);
|
| 859 |
+
|
| 860 |
+
enum BIO_hostserv_priorities {
|
| 861 |
+
BIO_PARSE_PRIO_HOST, BIO_PARSE_PRIO_SERV
|
| 862 |
+
};
|
| 863 |
+
int BIO_parse_hostserv(const char *hostserv, char **host, char **service,
|
| 864 |
+
enum BIO_hostserv_priorities hostserv_prio);
|
| 865 |
+
enum BIO_lookup_type {
|
| 866 |
+
BIO_LOOKUP_CLIENT, BIO_LOOKUP_SERVER
|
| 867 |
+
};
|
| 868 |
+
int BIO_lookup(const char *host, const char *service,
|
| 869 |
+
enum BIO_lookup_type lookup_type,
|
| 870 |
+
int family, int socktype, BIO_ADDRINFO **res);
|
| 871 |
+
int BIO_lookup_ex(const char *host, const char *service,
|
| 872 |
+
int lookup_type, int family, int socktype, int protocol,
|
| 873 |
+
BIO_ADDRINFO **res);
|
| 874 |
+
int BIO_sock_error(int sock);
|
| 875 |
+
int BIO_socket_ioctl(int fd, long type, void *arg);
|
| 876 |
+
int BIO_socket_nbio(int fd, int mode);
|
| 877 |
+
int BIO_sock_init(void);
|
| 878 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 879 |
+
# define BIO_sock_cleanup() while(0) continue
|
| 880 |
+
# endif
|
| 881 |
+
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
| 882 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 883 |
+
OSSL_DEPRECATEDIN_1_1_0 struct hostent *BIO_gethostbyname(const char *name);
|
| 884 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_port(const char *str, unsigned short *port_ptr);
|
| 885 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_host_ip(const char *str, unsigned char *ip);
|
| 886 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_get_accept_socket(char *host_port, int mode);
|
| 887 |
+
OSSL_DEPRECATEDIN_1_1_0 int BIO_accept(int sock, char **ip_port);
|
| 888 |
+
# endif
|
| 889 |
+
|
| 890 |
+
union BIO_sock_info_u {
|
| 891 |
+
BIO_ADDR *addr;
|
| 892 |
+
};
|
| 893 |
+
enum BIO_sock_info_type {
|
| 894 |
+
BIO_SOCK_INFO_ADDRESS
|
| 895 |
+
};
|
| 896 |
+
int BIO_sock_info(int sock,
|
| 897 |
+
enum BIO_sock_info_type type, union BIO_sock_info_u *info);
|
| 898 |
+
|
| 899 |
+
# define BIO_SOCK_REUSEADDR 0x01
|
| 900 |
+
# define BIO_SOCK_V6_ONLY 0x02
|
| 901 |
+
# define BIO_SOCK_KEEPALIVE 0x04
|
| 902 |
+
# define BIO_SOCK_NONBLOCK 0x08
|
| 903 |
+
# define BIO_SOCK_NODELAY 0x10
|
| 904 |
+
# define BIO_SOCK_TFO 0x20
|
| 905 |
+
|
| 906 |
+
int BIO_socket(int domain, int socktype, int protocol, int options);
|
| 907 |
+
int BIO_connect(int sock, const BIO_ADDR *addr, int options);
|
| 908 |
+
int BIO_bind(int sock, const BIO_ADDR *addr, int options);
|
| 909 |
+
int BIO_listen(int sock, const BIO_ADDR *addr, int options);
|
| 910 |
+
int BIO_accept_ex(int accept_sock, BIO_ADDR *addr, int options);
|
| 911 |
+
int BIO_closesocket(int sock);
|
| 912 |
+
|
| 913 |
+
BIO *BIO_new_socket(int sock, int close_flag);
|
| 914 |
+
BIO *BIO_new_connect(const char *host_port);
|
| 915 |
+
BIO *BIO_new_accept(const char *host_port);
|
| 916 |
+
# endif /* OPENSSL_NO_SOCK*/
|
| 917 |
+
|
| 918 |
+
BIO *BIO_new_fd(int fd, int close_flag);
|
| 919 |
+
|
| 920 |
+
int BIO_new_bio_pair(BIO **bio1, size_t writebuf1,
|
| 921 |
+
BIO **bio2, size_t writebuf2);
|
| 922 |
+
# ifndef OPENSSL_NO_DGRAM
|
| 923 |
+
int BIO_new_bio_dgram_pair(BIO **bio1, size_t writebuf1,
|
| 924 |
+
BIO **bio2, size_t writebuf2);
|
| 925 |
+
# endif
|
| 926 |
+
|
| 927 |
+
/*
|
| 928 |
+
* If successful, returns 1 and in *bio1, *bio2 two BIO pair endpoints.
|
| 929 |
+
* Otherwise returns 0 and sets *bio1 and *bio2 to NULL. Size 0 uses default
|
| 930 |
+
* value.
|
| 931 |
+
*/
|
| 932 |
+
|
| 933 |
+
void BIO_copy_next_retry(BIO *b);
|
| 934 |
+
|
| 935 |
+
/*
|
| 936 |
+
* long BIO_ghbn_ctrl(int cmd,int iarg,char *parg);
|
| 937 |
+
*/
|
| 938 |
+
|
| 939 |
+
# define ossl_bio__attr__(x)
|
| 940 |
+
# if defined(__GNUC__) && defined(__STDC_VERSION__) \
|
| 941 |
+
&& !defined(__MINGW32__) && !defined(__MINGW64__) \
|
| 942 |
+
&& !defined(__APPLE__)
|
| 943 |
+
/*
|
| 944 |
+
* Because we support the 'z' modifier, which made its appearance in C99,
|
| 945 |
+
* we can't use __attribute__ with pre C99 dialects.
|
| 946 |
+
*/
|
| 947 |
+
# if __STDC_VERSION__ >= 199901L
|
| 948 |
+
# undef ossl_bio__attr__
|
| 949 |
+
# define ossl_bio__attr__ __attribute__
|
| 950 |
+
# if __GNUC__*10 + __GNUC_MINOR__ >= 44
|
| 951 |
+
# define ossl_bio__printf__ __gnu_printf__
|
| 952 |
+
# else
|
| 953 |
+
# define ossl_bio__printf__ __printf__
|
| 954 |
+
# endif
|
| 955 |
+
# endif
|
| 956 |
+
# endif
|
| 957 |
+
int BIO_printf(BIO *bio, const char *format, ...)
|
| 958 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 3)));
|
| 959 |
+
int BIO_vprintf(BIO *bio, const char *format, va_list args)
|
| 960 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 2, 0)));
|
| 961 |
+
int BIO_snprintf(char *buf, size_t n, const char *format, ...)
|
| 962 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 4)));
|
| 963 |
+
int BIO_vsnprintf(char *buf, size_t n, const char *format, va_list args)
|
| 964 |
+
ossl_bio__attr__((__format__(ossl_bio__printf__, 3, 0)));
|
| 965 |
+
# undef ossl_bio__attr__
|
| 966 |
+
# undef ossl_bio__printf__
|
| 967 |
+
|
| 968 |
+
|
| 969 |
+
BIO_METHOD *BIO_meth_new(int type, const char *name);
|
| 970 |
+
void BIO_meth_free(BIO_METHOD *biom);
|
| 971 |
+
int BIO_meth_set_write(BIO_METHOD *biom,
|
| 972 |
+
int (*write) (BIO *, const char *, int));
|
| 973 |
+
int BIO_meth_set_write_ex(BIO_METHOD *biom,
|
| 974 |
+
int (*bwrite) (BIO *, const char *, size_t, size_t *));
|
| 975 |
+
int BIO_meth_set_sendmmsg(BIO_METHOD *biom,
|
| 976 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 977 |
+
uint64_t, size_t *));
|
| 978 |
+
int BIO_meth_set_read(BIO_METHOD *biom,
|
| 979 |
+
int (*read) (BIO *, char *, int));
|
| 980 |
+
int BIO_meth_set_read_ex(BIO_METHOD *biom,
|
| 981 |
+
int (*bread) (BIO *, char *, size_t, size_t *));
|
| 982 |
+
int BIO_meth_set_recvmmsg(BIO_METHOD *biom,
|
| 983 |
+
int (*f) (BIO *, BIO_MSG *, size_t, size_t,
|
| 984 |
+
uint64_t, size_t *));
|
| 985 |
+
int BIO_meth_set_puts(BIO_METHOD *biom,
|
| 986 |
+
int (*puts) (BIO *, const char *));
|
| 987 |
+
int BIO_meth_set_gets(BIO_METHOD *biom,
|
| 988 |
+
int (*ossl_gets) (BIO *, char *, int));
|
| 989 |
+
int BIO_meth_set_ctrl(BIO_METHOD *biom,
|
| 990 |
+
long (*ctrl) (BIO *, int, long, void *));
|
| 991 |
+
int BIO_meth_set_create(BIO_METHOD *biom, int (*create) (BIO *));
|
| 992 |
+
int BIO_meth_set_destroy(BIO_METHOD *biom, int (*destroy) (BIO *));
|
| 993 |
+
int BIO_meth_set_callback_ctrl(BIO_METHOD *biom,
|
| 994 |
+
long (*callback_ctrl) (BIO *, int,
|
| 995 |
+
BIO_info_cb *));
|
| 996 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_5
|
| 997 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 998 |
+
int);
|
| 999 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_write_ex(const BIO_METHOD *biom)) (BIO *, const char *,
|
| 1000 |
+
size_t, size_t *);
|
| 1001 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_sendmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1002 |
+
size_t, size_t,
|
| 1003 |
+
uint64_t, size_t *);
|
| 1004 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1005 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_read_ex(const BIO_METHOD *biom)) (BIO *, char *,
|
| 1006 |
+
size_t, size_t *);
|
| 1007 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_recvmmsg(const BIO_METHOD *biom))(BIO *, BIO_MSG *,
|
| 1008 |
+
size_t, size_t,
|
| 1009 |
+
uint64_t, size_t *);
|
| 1010 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_puts(const BIO_METHOD *biom)) (BIO *, const char *);
|
| 1011 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_gets(const BIO_METHOD *biom)) (BIO *, char *, int);
|
| 1012 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1013 |
+
long, void *);
|
| 1014 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_create(const BIO_METHOD *bion)) (BIO *);
|
| 1015 |
+
OSSL_DEPRECATEDIN_3_5 int (*BIO_meth_get_destroy(const BIO_METHOD *biom)) (BIO *);
|
| 1016 |
+
OSSL_DEPRECATEDIN_3_5 long (*BIO_meth_get_callback_ctrl(const BIO_METHOD *biom)) (BIO *, int,
|
| 1017 |
+
BIO_info_cb *);
|
| 1018 |
+
# endif
|
| 1019 |
+
# ifdef __cplusplus
|
| 1020 |
+
}
|
| 1021 |
+
# endif
|
| 1022 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/cmp.h
ADDED
|
@@ -0,0 +1,727 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cmp.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2007-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
* Copyright Nokia 2007-2019
|
| 7 |
+
* Copyright Siemens AG 2015-2019
|
| 8 |
+
*
|
| 9 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 10 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 11 |
+
* in the file LICENSE in the source distribution or at
|
| 12 |
+
* https://www.openssl.org/source/license.html
|
| 13 |
+
*/
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
#ifndef OPENSSL_CMP_H
|
| 18 |
+
# define OPENSSL_CMP_H
|
| 19 |
+
|
| 20 |
+
# include <openssl/opensslconf.h>
|
| 21 |
+
# ifndef OPENSSL_NO_CMP
|
| 22 |
+
|
| 23 |
+
# include <openssl/crmf.h>
|
| 24 |
+
# include <openssl/cmperr.h>
|
| 25 |
+
# include <openssl/cmp_util.h>
|
| 26 |
+
# include <openssl/http.h>
|
| 27 |
+
|
| 28 |
+
/* explicit #includes not strictly needed since implied by the above: */
|
| 29 |
+
# include <openssl/types.h>
|
| 30 |
+
# include <openssl/safestack.h>
|
| 31 |
+
# include <openssl/x509.h>
|
| 32 |
+
# include <openssl/x509v3.h>
|
| 33 |
+
|
| 34 |
+
# ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
# endif
|
| 37 |
+
|
| 38 |
+
# define OSSL_CMP_PVNO_2 2
|
| 39 |
+
# define OSSL_CMP_PVNO_3 3
|
| 40 |
+
# define OSSL_CMP_PVNO OSSL_CMP_PVNO_2 /* v2 is the default */
|
| 41 |
+
|
| 42 |
+
/*-
|
| 43 |
+
* PKIFailureInfo ::= BIT STRING {
|
| 44 |
+
* -- since we can fail in more than one way!
|
| 45 |
+
* -- More codes may be added in the future if/when required.
|
| 46 |
+
* badAlg (0),
|
| 47 |
+
* -- unrecognized or unsupported Algorithm Identifier
|
| 48 |
+
* badMessageCheck (1),
|
| 49 |
+
* -- integrity check failed (e.g., signature did not verify)
|
| 50 |
+
* badRequest (2),
|
| 51 |
+
* -- transaction not permitted or supported
|
| 52 |
+
* badTime (3),
|
| 53 |
+
* -- messageTime was not sufficiently close to the system time,
|
| 54 |
+
* -- as defined by local policy
|
| 55 |
+
* badCertId (4),
|
| 56 |
+
* -- no certificate could be found matching the provided criteria
|
| 57 |
+
* badDataFormat (5),
|
| 58 |
+
* -- the data submitted has the wrong format
|
| 59 |
+
* wrongAuthority (6),
|
| 60 |
+
* -- the authority indicated in the request is different from the
|
| 61 |
+
* -- one creating the response token
|
| 62 |
+
* incorrectData (7),
|
| 63 |
+
* -- the requester's data is incorrect (for notary services)
|
| 64 |
+
* missingTimeStamp (8),
|
| 65 |
+
* -- when the timestamp is missing but should be there
|
| 66 |
+
* -- (by policy)
|
| 67 |
+
* badPOP (9),
|
| 68 |
+
* -- the proof-of-possession failed
|
| 69 |
+
* certRevoked (10),
|
| 70 |
+
* -- the certificate has already been revoked
|
| 71 |
+
* certConfirmed (11),
|
| 72 |
+
* -- the certificate has already been confirmed
|
| 73 |
+
* wrongIntegrity (12),
|
| 74 |
+
* -- invalid integrity, password based instead of signature or
|
| 75 |
+
* -- vice versa
|
| 76 |
+
* badRecipientNonce (13),
|
| 77 |
+
* -- invalid recipient nonce, either missing or wrong value
|
| 78 |
+
* timeNotAvailable (14),
|
| 79 |
+
* -- the TSA's time source is not available
|
| 80 |
+
* unacceptedPolicy (15),
|
| 81 |
+
* -- the requested TSA policy is not supported by the TSA.
|
| 82 |
+
* unacceptedExtension (16),
|
| 83 |
+
* -- the requested extension is not supported by the TSA.
|
| 84 |
+
* addInfoNotAvailable (17),
|
| 85 |
+
* -- the additional information requested could not be
|
| 86 |
+
* -- understood or is not available
|
| 87 |
+
* badSenderNonce (18),
|
| 88 |
+
* -- invalid sender nonce, either missing or wrong size
|
| 89 |
+
* badCertTemplate (19),
|
| 90 |
+
* -- invalid cert. template or missing mandatory information
|
| 91 |
+
* signerNotTrusted (20),
|
| 92 |
+
* -- signer of the message unknown or not trusted
|
| 93 |
+
* transactionIdInUse (21),
|
| 94 |
+
* -- the transaction identifier is already in use
|
| 95 |
+
* unsupportedVersion (22),
|
| 96 |
+
* -- the version of the message is not supported
|
| 97 |
+
* notAuthorized (23),
|
| 98 |
+
* -- the sender was not authorized to make the preceding
|
| 99 |
+
* -- request or perform the preceding action
|
| 100 |
+
* systemUnavail (24),
|
| 101 |
+
* -- the request cannot be handled due to system unavailability
|
| 102 |
+
* systemFailure (25),
|
| 103 |
+
* -- the request cannot be handled due to system failure
|
| 104 |
+
* duplicateCertReq (26)
|
| 105 |
+
* -- certificate cannot be issued because a duplicate
|
| 106 |
+
* -- certificate already exists
|
| 107 |
+
* }
|
| 108 |
+
*/
|
| 109 |
+
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
| 110 |
+
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
| 111 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
| 112 |
+
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
| 113 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
| 114 |
+
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
| 115 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
| 116 |
+
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
| 117 |
+
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
| 118 |
+
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
| 119 |
+
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
| 120 |
+
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
| 121 |
+
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
| 122 |
+
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
| 123 |
+
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
| 124 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
| 125 |
+
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
| 126 |
+
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
| 127 |
+
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
| 128 |
+
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
| 129 |
+
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
| 130 |
+
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
| 131 |
+
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
| 132 |
+
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
| 133 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
| 134 |
+
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
| 135 |
+
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
| 136 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
| 137 |
+
# define OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN \
|
| 138 |
+
((1 << (OSSL_CMP_PKIFAILUREINFO_MAX + 1)) - 1)
|
| 139 |
+
# if OSSL_CMP_PKIFAILUREINFO_MAX_BIT_PATTERN > INT_MAX
|
| 140 |
+
# error CMP_PKIFAILUREINFO_MAX bit pattern does not fit in type int
|
| 141 |
+
# endif
|
| 142 |
+
typedef ASN1_BIT_STRING OSSL_CMP_PKIFAILUREINFO;
|
| 143 |
+
|
| 144 |
+
# define OSSL_CMP_CTX_FAILINFO_badAlg (1 << 0)
|
| 145 |
+
# define OSSL_CMP_CTX_FAILINFO_badMessageCheck (1 << 1)
|
| 146 |
+
# define OSSL_CMP_CTX_FAILINFO_badRequest (1 << 2)
|
| 147 |
+
# define OSSL_CMP_CTX_FAILINFO_badTime (1 << 3)
|
| 148 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertId (1 << 4)
|
| 149 |
+
# define OSSL_CMP_CTX_FAILINFO_badDataFormat (1 << 5)
|
| 150 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongAuthority (1 << 6)
|
| 151 |
+
# define OSSL_CMP_CTX_FAILINFO_incorrectData (1 << 7)
|
| 152 |
+
# define OSSL_CMP_CTX_FAILINFO_missingTimeStamp (1 << 8)
|
| 153 |
+
# define OSSL_CMP_CTX_FAILINFO_badPOP (1 << 9)
|
| 154 |
+
# define OSSL_CMP_CTX_FAILINFO_certRevoked (1 << 10)
|
| 155 |
+
# define OSSL_CMP_CTX_FAILINFO_certConfirmed (1 << 11)
|
| 156 |
+
# define OSSL_CMP_CTX_FAILINFO_wrongIntegrity (1 << 12)
|
| 157 |
+
# define OSSL_CMP_CTX_FAILINFO_badRecipientNonce (1 << 13)
|
| 158 |
+
# define OSSL_CMP_CTX_FAILINFO_timeNotAvailable (1 << 14)
|
| 159 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedPolicy (1 << 15)
|
| 160 |
+
# define OSSL_CMP_CTX_FAILINFO_unacceptedExtension (1 << 16)
|
| 161 |
+
# define OSSL_CMP_CTX_FAILINFO_addInfoNotAvailable (1 << 17)
|
| 162 |
+
# define OSSL_CMP_CTX_FAILINFO_badSenderNonce (1 << 18)
|
| 163 |
+
# define OSSL_CMP_CTX_FAILINFO_badCertTemplate (1 << 19)
|
| 164 |
+
# define OSSL_CMP_CTX_FAILINFO_signerNotTrusted (1 << 20)
|
| 165 |
+
# define OSSL_CMP_CTX_FAILINFO_transactionIdInUse (1 << 21)
|
| 166 |
+
# define OSSL_CMP_CTX_FAILINFO_unsupportedVersion (1 << 22)
|
| 167 |
+
# define OSSL_CMP_CTX_FAILINFO_notAuthorized (1 << 23)
|
| 168 |
+
# define OSSL_CMP_CTX_FAILINFO_systemUnavail (1 << 24)
|
| 169 |
+
# define OSSL_CMP_CTX_FAILINFO_systemFailure (1 << 25)
|
| 170 |
+
# define OSSL_CMP_CTX_FAILINFO_duplicateCertReq (1 << 26)
|
| 171 |
+
|
| 172 |
+
/*-
|
| 173 |
+
* PKIStatus ::= INTEGER {
|
| 174 |
+
* accepted (0),
|
| 175 |
+
* -- you got exactly what you asked for
|
| 176 |
+
* grantedWithMods (1),
|
| 177 |
+
* -- you got something like what you asked for; the
|
| 178 |
+
* -- requester is responsible for ascertaining the differences
|
| 179 |
+
* rejection (2),
|
| 180 |
+
* -- you don't get it, more information elsewhere in the message
|
| 181 |
+
* waiting (3),
|
| 182 |
+
* -- the request body part has not yet been processed; expect to
|
| 183 |
+
* -- hear more later (note: proper handling of this status
|
| 184 |
+
* -- response MAY use the polling req/rep PKIMessages specified
|
| 185 |
+
* -- in Section 5.3.22; alternatively, polling in the underlying
|
| 186 |
+
* -- transport layer MAY have some utility in this regard)
|
| 187 |
+
* revocationWarning (4),
|
| 188 |
+
* -- this message contains a warning that a revocation is
|
| 189 |
+
* -- imminent
|
| 190 |
+
* revocationNotification (5),
|
| 191 |
+
* -- notification that a revocation has occurred
|
| 192 |
+
* keyUpdateWarning (6)
|
| 193 |
+
* -- update already done for the oldCertId specified in
|
| 194 |
+
* -- CertReqMsg
|
| 195 |
+
* }
|
| 196 |
+
*/
|
| 197 |
+
# define OSSL_CMP_PKISTATUS_request -3
|
| 198 |
+
# define OSSL_CMP_PKISTATUS_trans -2
|
| 199 |
+
# define OSSL_CMP_PKISTATUS_unspecified -1
|
| 200 |
+
# define OSSL_CMP_PKISTATUS_accepted 0
|
| 201 |
+
# define OSSL_CMP_PKISTATUS_grantedWithMods 1
|
| 202 |
+
# define OSSL_CMP_PKISTATUS_rejection 2
|
| 203 |
+
# define OSSL_CMP_PKISTATUS_waiting 3
|
| 204 |
+
# define OSSL_CMP_PKISTATUS_revocationWarning 4
|
| 205 |
+
# define OSSL_CMP_PKISTATUS_revocationNotification 5
|
| 206 |
+
# define OSSL_CMP_PKISTATUS_keyUpdateWarning 6
|
| 207 |
+
typedef ASN1_INTEGER OSSL_CMP_PKISTATUS;
|
| 208 |
+
|
| 209 |
+
DECLARE_ASN1_ITEM(OSSL_CMP_PKISTATUS)
|
| 210 |
+
|
| 211 |
+
# define OSSL_CMP_CERTORENCCERT_CERTIFICATE 0
|
| 212 |
+
# define OSSL_CMP_CERTORENCCERT_ENCRYPTEDCERT 1
|
| 213 |
+
|
| 214 |
+
/* data type declarations */
|
| 215 |
+
typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
| 216 |
+
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
| 217 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
| 218 |
+
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
| 219 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
| 220 |
+
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
| 221 |
+
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
| 222 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS, OSSL_CMP_CERTSTATUS)
|
| 223 |
+
#define sk_OSSL_CMP_CERTSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 224 |
+
#define sk_OSSL_CMP_CERTSTATUS_value(sk, idx) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx)))
|
| 225 |
+
#define sk_OSSL_CMP_CERTSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 226 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_null() ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_null())
|
| 227 |
+
#define sk_OSSL_CMP_CERTSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp), (n)))
|
| 228 |
+
#define sk_OSSL_CMP_CERTSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (n))
|
| 229 |
+
#define sk_OSSL_CMP_CERTSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 230 |
+
#define sk_OSSL_CMP_CERTSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 231 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete(sk, i) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (i)))
|
| 232 |
+
#define sk_OSSL_CMP_CERTSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 233 |
+
#define sk_OSSL_CMP_CERTSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 234 |
+
#define sk_OSSL_CMP_CERTSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 235 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 236 |
+
#define sk_OSSL_CMP_CERTSTATUS_shift(sk) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 237 |
+
#define sk_OSSL_CMP_CERTSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc))
|
| 238 |
+
#define sk_OSSL_CMP_CERTSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), (idx))
|
| 239 |
+
#define sk_OSSL_CMP_CERTSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CERTSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr)))
|
| 240 |
+
#define sk_OSSL_CMP_CERTSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 241 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr))
|
| 242 |
+
#define sk_OSSL_CMP_CERTSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_type(ptr), pnum)
|
| 243 |
+
#define sk_OSSL_CMP_CERTSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 244 |
+
#define sk_OSSL_CMP_CERTSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk))
|
| 245 |
+
#define sk_OSSL_CMP_CERTSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk)))
|
| 246 |
+
#define sk_OSSL_CMP_CERTSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTSTATUS_freefunc_type(freefunc)))
|
| 247 |
+
#define sk_OSSL_CMP_CERTSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CERTSTATUS_compfunc_type(cmp)))
|
| 248 |
+
|
| 249 |
+
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
| 250 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
| 251 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_ITAV, OSSL_CMP_ITAV, OSSL_CMP_ITAV)
|
| 252 |
+
#define sk_OSSL_CMP_ITAV_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 253 |
+
#define sk_OSSL_CMP_ITAV_value(sk, idx) ((OSSL_CMP_ITAV *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), (idx)))
|
| 254 |
+
#define sk_OSSL_CMP_ITAV_new(cmp) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 255 |
+
#define sk_OSSL_CMP_ITAV_new_null() ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_null())
|
| 256 |
+
#define sk_OSSL_CMP_ITAV_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp), (n)))
|
| 257 |
+
#define sk_OSSL_CMP_ITAV_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (n))
|
| 258 |
+
#define sk_OSSL_CMP_ITAV_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 259 |
+
#define sk_OSSL_CMP_ITAV_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 260 |
+
#define sk_OSSL_CMP_ITAV_delete(sk, i) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (i)))
|
| 261 |
+
#define sk_OSSL_CMP_ITAV_delete_ptr(sk, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 262 |
+
#define sk_OSSL_CMP_ITAV_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 263 |
+
#define sk_OSSL_CMP_ITAV_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 264 |
+
#define sk_OSSL_CMP_ITAV_pop(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 265 |
+
#define sk_OSSL_CMP_ITAV_shift(sk) ((OSSL_CMP_ITAV *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_ITAV_sk_type(sk)))
|
| 266 |
+
#define sk_OSSL_CMP_ITAV_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_ITAV_sk_type(sk),ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc))
|
| 267 |
+
#define sk_OSSL_CMP_ITAV_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), (idx))
|
| 268 |
+
#define sk_OSSL_CMP_ITAV_set(sk, idx, ptr) ((OSSL_CMP_ITAV *)OPENSSL_sk_set(ossl_check_OSSL_CMP_ITAV_sk_type(sk), (idx), ossl_check_OSSL_CMP_ITAV_type(ptr)))
|
| 269 |
+
#define sk_OSSL_CMP_ITAV_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 270 |
+
#define sk_OSSL_CMP_ITAV_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr))
|
| 271 |
+
#define sk_OSSL_CMP_ITAV_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_type(ptr), pnum)
|
| 272 |
+
#define sk_OSSL_CMP_ITAV_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_ITAV_sk_type(sk))
|
| 273 |
+
#define sk_OSSL_CMP_ITAV_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk))
|
| 274 |
+
#define sk_OSSL_CMP_ITAV_dup(sk) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk)))
|
| 275 |
+
#define sk_OSSL_CMP_ITAV_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_ITAV) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_ITAV_freefunc_type(freefunc)))
|
| 276 |
+
#define sk_OSSL_CMP_ITAV_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_ITAV_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_ITAV_sk_type(sk), ossl_check_OSSL_CMP_ITAV_compfunc_type(cmp)))
|
| 277 |
+
|
| 278 |
+
|
| 279 |
+
typedef struct ossl_cmp_crlstatus_st OSSL_CMP_CRLSTATUS;
|
| 280 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS, OSSL_CMP_CRLSTATUS)
|
| 281 |
+
#define sk_OSSL_CMP_CRLSTATUS_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 282 |
+
#define sk_OSSL_CMP_CRLSTATUS_value(sk, idx) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx)))
|
| 283 |
+
#define sk_OSSL_CMP_CRLSTATUS_new(cmp) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 284 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_null() ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_null())
|
| 285 |
+
#define sk_OSSL_CMP_CRLSTATUS_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp), (n)))
|
| 286 |
+
#define sk_OSSL_CMP_CRLSTATUS_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (n))
|
| 287 |
+
#define sk_OSSL_CMP_CRLSTATUS_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 288 |
+
#define sk_OSSL_CMP_CRLSTATUS_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 289 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete(sk, i) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (i)))
|
| 290 |
+
#define sk_OSSL_CMP_CRLSTATUS_delete_ptr(sk, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 291 |
+
#define sk_OSSL_CMP_CRLSTATUS_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 292 |
+
#define sk_OSSL_CMP_CRLSTATUS_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 293 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 294 |
+
#define sk_OSSL_CMP_CRLSTATUS_shift(sk) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 295 |
+
#define sk_OSSL_CMP_CRLSTATUS_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk),ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc))
|
| 296 |
+
#define sk_OSSL_CMP_CRLSTATUS_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), (idx))
|
| 297 |
+
#define sk_OSSL_CMP_CRLSTATUS_set(sk, idx, ptr) ((OSSL_CMP_CRLSTATUS *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), (idx), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr)))
|
| 298 |
+
#define sk_OSSL_CMP_CRLSTATUS_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 299 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr))
|
| 300 |
+
#define sk_OSSL_CMP_CRLSTATUS_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_type(ptr), pnum)
|
| 301 |
+
#define sk_OSSL_CMP_CRLSTATUS_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 302 |
+
#define sk_OSSL_CMP_CRLSTATUS_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk))
|
| 303 |
+
#define sk_OSSL_CMP_CRLSTATUS_dup(sk) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk)))
|
| 304 |
+
#define sk_OSSL_CMP_CRLSTATUS_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CRLSTATUS) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CRLSTATUS_freefunc_type(freefunc)))
|
| 305 |
+
#define sk_OSSL_CMP_CRLSTATUS_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CRLSTATUS_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CRLSTATUS_sk_type(sk), ossl_check_OSSL_CMP_CRLSTATUS_compfunc_type(cmp)))
|
| 306 |
+
|
| 307 |
+
|
| 308 |
+
typedef OSSL_CRMF_ATTRIBUTETYPEANDVALUE OSSL_CMP_ATAV;
|
| 309 |
+
# define OSSL_CMP_ATAV_free OSSL_CRMF_ATTRIBUTETYPEANDVALUE_free
|
| 310 |
+
typedef STACK_OF(OSSL_CRMF_ATTRIBUTETYPEANDVALUE) OSSL_CMP_ATAVS;
|
| 311 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_ATAVS)
|
| 312 |
+
# define stack_st_OSSL_CMP_ATAV stack_st_OSSL_CRMF_ATTRIBUTETYPEANDVALUE
|
| 313 |
+
# define sk_OSSL_CMP_ATAV_num sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_num
|
| 314 |
+
# define sk_OSSL_CMP_ATAV_value sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_value
|
| 315 |
+
# define sk_OSSL_CMP_ATAV_push sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_push
|
| 316 |
+
# define sk_OSSL_CMP_ATAV_pop_free sk_OSSL_CRMF_ATTRIBUTETYPEANDVALUE_pop_free
|
| 317 |
+
|
| 318 |
+
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
| 319 |
+
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
| 320 |
+
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
| 321 |
+
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
| 322 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_PKISI, OSSL_CMP_PKISI, OSSL_CMP_PKISI)
|
| 323 |
+
#define sk_OSSL_CMP_PKISI_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 324 |
+
#define sk_OSSL_CMP_PKISI_value(sk, idx) ((OSSL_CMP_PKISI *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), (idx)))
|
| 325 |
+
#define sk_OSSL_CMP_PKISI_new(cmp) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 326 |
+
#define sk_OSSL_CMP_PKISI_new_null() ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_null())
|
| 327 |
+
#define sk_OSSL_CMP_PKISI_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp), (n)))
|
| 328 |
+
#define sk_OSSL_CMP_PKISI_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (n))
|
| 329 |
+
#define sk_OSSL_CMP_PKISI_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 330 |
+
#define sk_OSSL_CMP_PKISI_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 331 |
+
#define sk_OSSL_CMP_PKISI_delete(sk, i) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (i)))
|
| 332 |
+
#define sk_OSSL_CMP_PKISI_delete_ptr(sk, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 333 |
+
#define sk_OSSL_CMP_PKISI_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 334 |
+
#define sk_OSSL_CMP_PKISI_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 335 |
+
#define sk_OSSL_CMP_PKISI_pop(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 336 |
+
#define sk_OSSL_CMP_PKISI_shift(sk) ((OSSL_CMP_PKISI *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_PKISI_sk_type(sk)))
|
| 337 |
+
#define sk_OSSL_CMP_PKISI_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_PKISI_sk_type(sk),ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc))
|
| 338 |
+
#define sk_OSSL_CMP_PKISI_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), (idx))
|
| 339 |
+
#define sk_OSSL_CMP_PKISI_set(sk, idx, ptr) ((OSSL_CMP_PKISI *)OPENSSL_sk_set(ossl_check_OSSL_CMP_PKISI_sk_type(sk), (idx), ossl_check_OSSL_CMP_PKISI_type(ptr)))
|
| 340 |
+
#define sk_OSSL_CMP_PKISI_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 341 |
+
#define sk_OSSL_CMP_PKISI_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr))
|
| 342 |
+
#define sk_OSSL_CMP_PKISI_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_type(ptr), pnum)
|
| 343 |
+
#define sk_OSSL_CMP_PKISI_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_PKISI_sk_type(sk))
|
| 344 |
+
#define sk_OSSL_CMP_PKISI_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk))
|
| 345 |
+
#define sk_OSSL_CMP_PKISI_dup(sk) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk)))
|
| 346 |
+
#define sk_OSSL_CMP_PKISI_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_PKISI) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_PKISI_freefunc_type(freefunc)))
|
| 347 |
+
#define sk_OSSL_CMP_PKISI_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_PKISI_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_PKISI_sk_type(sk), ossl_check_OSSL_CMP_PKISI_compfunc_type(cmp)))
|
| 348 |
+
|
| 349 |
+
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
| 350 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE, OSSL_CMP_CERTREPMESSAGE)
|
| 351 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 352 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_value(sk, idx) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx)))
|
| 353 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new(cmp) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 354 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_null() ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_null())
|
| 355 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp), (n)))
|
| 356 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (n))
|
| 357 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 358 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 359 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete(sk, i) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (i)))
|
| 360 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 361 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 362 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 363 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 364 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_shift(sk) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 365 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk),ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc))
|
| 366 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), (idx))
|
| 367 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set(sk, idx, ptr) ((OSSL_CMP_CERTREPMESSAGE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr)))
|
| 368 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 369 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr))
|
| 370 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_type(ptr), pnum)
|
| 371 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 372 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk))
|
| 373 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_dup(sk) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk)))
|
| 374 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTREPMESSAGE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTREPMESSAGE_freefunc_type(freefunc)))
|
| 375 |
+
#define sk_OSSL_CMP_CERTREPMESSAGE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTREPMESSAGE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTREPMESSAGE_sk_type(sk), ossl_check_OSSL_CMP_CERTREPMESSAGE_compfunc_type(cmp)))
|
| 376 |
+
|
| 377 |
+
typedef struct ossl_cmp_pollrep_st OSSL_CMP_POLLREP;
|
| 378 |
+
typedef STACK_OF(OSSL_CMP_POLLREP) OSSL_CMP_POLLREPCONTENT;
|
| 379 |
+
typedef struct ossl_cmp_certresponse_st OSSL_CMP_CERTRESPONSE;
|
| 380 |
+
SKM_DEFINE_STACK_OF_INTERNAL(OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE, OSSL_CMP_CERTRESPONSE)
|
| 381 |
+
#define sk_OSSL_CMP_CERTRESPONSE_num(sk) OPENSSL_sk_num(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 382 |
+
#define sk_OSSL_CMP_CERTRESPONSE_value(sk, idx) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_value(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx)))
|
| 383 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new(cmp) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 384 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_null() ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_null())
|
| 385 |
+
#define sk_OSSL_CMP_CERTRESPONSE_new_reserve(cmp, n) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_new_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp), (n)))
|
| 386 |
+
#define sk_OSSL_CMP_CERTRESPONSE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (n))
|
| 387 |
+
#define sk_OSSL_CMP_CERTRESPONSE_free(sk) OPENSSL_sk_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 388 |
+
#define sk_OSSL_CMP_CERTRESPONSE_zero(sk) OPENSSL_sk_zero(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 389 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete(sk, i) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (i)))
|
| 390 |
+
#define sk_OSSL_CMP_CERTRESPONSE_delete_ptr(sk, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_delete_ptr(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 391 |
+
#define sk_OSSL_CMP_CERTRESPONSE_push(sk, ptr) OPENSSL_sk_push(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 392 |
+
#define sk_OSSL_CMP_CERTRESPONSE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 393 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_pop(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 394 |
+
#define sk_OSSL_CMP_CERTRESPONSE_shift(sk) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_shift(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 395 |
+
#define sk_OSSL_CMP_CERTRESPONSE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk),ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc))
|
| 396 |
+
#define sk_OSSL_CMP_CERTRESPONSE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), (idx))
|
| 397 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set(sk, idx, ptr) ((OSSL_CMP_CERTRESPONSE *)OPENSSL_sk_set(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), (idx), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr)))
|
| 398 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find(sk, ptr) OPENSSL_sk_find(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 399 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr))
|
| 400 |
+
#define sk_OSSL_CMP_CERTRESPONSE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_type(ptr), pnum)
|
| 401 |
+
#define sk_OSSL_CMP_CERTRESPONSE_sort(sk) OPENSSL_sk_sort(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 402 |
+
#define sk_OSSL_CMP_CERTRESPONSE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk))
|
| 403 |
+
#define sk_OSSL_CMP_CERTRESPONSE_dup(sk) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_dup(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk)))
|
| 404 |
+
#define sk_OSSL_CMP_CERTRESPONSE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(OSSL_CMP_CERTRESPONSE) *)OPENSSL_sk_deep_copy(ossl_check_const_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_copyfunc_type(copyfunc), ossl_check_OSSL_CMP_CERTRESPONSE_freefunc_type(freefunc)))
|
| 405 |
+
#define sk_OSSL_CMP_CERTRESPONSE_set_cmp_func(sk, cmp) ((sk_OSSL_CMP_CERTRESPONSE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_OSSL_CMP_CERTRESPONSE_sk_type(sk), ossl_check_OSSL_CMP_CERTRESPONSE_compfunc_type(cmp)))
|
| 406 |
+
|
| 407 |
+
typedef STACK_OF(ASN1_UTF8STRING) OSSL_CMP_PKIFREETEXT;
|
| 408 |
+
|
| 409 |
+
/*
|
| 410 |
+
* function DECLARATIONS
|
| 411 |
+
*/
|
| 412 |
+
|
| 413 |
+
/* from cmp_asn.c */
|
| 414 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 415 |
+
void OSSL_CMP_ITAV_set0(OSSL_CMP_ITAV *itav, ASN1_OBJECT *type,
|
| 416 |
+
ASN1_TYPE *value);
|
| 417 |
+
ASN1_OBJECT *OSSL_CMP_ITAV_get0_type(const OSSL_CMP_ITAV *itav);
|
| 418 |
+
ASN1_TYPE *OSSL_CMP_ITAV_get0_value(const OSSL_CMP_ITAV *itav);
|
| 419 |
+
int OSSL_CMP_ITAV_push0_stack_item(STACK_OF(OSSL_CMP_ITAV) **sk_p,
|
| 420 |
+
OSSL_CMP_ITAV *itav);
|
| 421 |
+
void OSSL_CMP_ITAV_free(OSSL_CMP_ITAV *itav);
|
| 422 |
+
|
| 423 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new0_certProfile(STACK_OF(ASN1_UTF8STRING)
|
| 424 |
+
*certProfile);
|
| 425 |
+
int OSSL_CMP_ITAV_get0_certProfile(const OSSL_CMP_ITAV *itav,
|
| 426 |
+
STACK_OF(ASN1_UTF8STRING) **out);
|
| 427 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_caCerts(const STACK_OF(X509) *caCerts);
|
| 428 |
+
int OSSL_CMP_ITAV_get0_caCerts(const OSSL_CMP_ITAV *itav, STACK_OF(X509) **out);
|
| 429 |
+
|
| 430 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaCert(const X509 *rootCaCert);
|
| 431 |
+
int OSSL_CMP_ITAV_get0_rootCaCert(const OSSL_CMP_ITAV *itav, X509 **out);
|
| 432 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_rootCaKeyUpdate(const X509 *newWithNew,
|
| 433 |
+
const X509 *newWithOld,
|
| 434 |
+
const X509 *oldWithNew);
|
| 435 |
+
int OSSL_CMP_ITAV_get0_rootCaKeyUpdate(const OSSL_CMP_ITAV *itav,
|
| 436 |
+
X509 **newWithNew,
|
| 437 |
+
X509 **newWithOld,
|
| 438 |
+
X509 **oldWithNew);
|
| 439 |
+
|
| 440 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_create(const X509_CRL *crl,
|
| 441 |
+
const X509 *cert, int only_DN);
|
| 442 |
+
OSSL_CMP_CRLSTATUS *OSSL_CMP_CRLSTATUS_new1(const DIST_POINT_NAME *dpn,
|
| 443 |
+
const GENERAL_NAMES *issuer,
|
| 444 |
+
const ASN1_TIME *thisUpdate);
|
| 445 |
+
int OSSL_CMP_CRLSTATUS_get0(const OSSL_CMP_CRLSTATUS *crlstatus,
|
| 446 |
+
DIST_POINT_NAME **dpn, GENERAL_NAMES **issuer,
|
| 447 |
+
ASN1_TIME **thisUpdate);
|
| 448 |
+
void OSSL_CMP_CRLSTATUS_free(OSSL_CMP_CRLSTATUS *crlstatus);
|
| 449 |
+
OSSL_CMP_ITAV
|
| 450 |
+
*OSSL_CMP_ITAV_new0_crlStatusList(STACK_OF(OSSL_CMP_CRLSTATUS) *crlStatusList);
|
| 451 |
+
int OSSL_CMP_ITAV_get0_crlStatusList(const OSSL_CMP_ITAV *itav,
|
| 452 |
+
STACK_OF(OSSL_CMP_CRLSTATUS) **out);
|
| 453 |
+
OSSL_CMP_ITAV *OSSL_CMP_ITAV_new_crls(const X509_CRL *crls);
|
| 454 |
+
int OSSL_CMP_ITAV_get0_crls(const OSSL_CMP_ITAV *it, STACK_OF(X509_CRL) **out);
|
| 455 |
+
OSSL_CMP_ITAV
|
| 456 |
+
*OSSL_CMP_ITAV_new0_certReqTemplate(OSSL_CRMF_CERTTEMPLATE *certTemplate,
|
| 457 |
+
OSSL_CMP_ATAVS *keySpec);
|
| 458 |
+
int OSSL_CMP_ITAV_get1_certReqTemplate(const OSSL_CMP_ITAV *itav,
|
| 459 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 460 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 461 |
+
|
| 462 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_create(ASN1_OBJECT *type, ASN1_TYPE *value);
|
| 463 |
+
void OSSL_CMP_ATAV_set0(OSSL_CMP_ATAV *itav, ASN1_OBJECT *type,
|
| 464 |
+
ASN1_TYPE *value);
|
| 465 |
+
ASN1_OBJECT *OSSL_CMP_ATAV_get0_type(const OSSL_CMP_ATAV *itav);
|
| 466 |
+
ASN1_TYPE *OSSL_CMP_ATAV_get0_value(const OSSL_CMP_ATAV *itav);
|
| 467 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_algId(const X509_ALGOR *alg);
|
| 468 |
+
X509_ALGOR *OSSL_CMP_ATAV_get0_algId(const OSSL_CMP_ATAV *atav);
|
| 469 |
+
OSSL_CMP_ATAV *OSSL_CMP_ATAV_new_rsaKeyLen(int len);
|
| 470 |
+
int OSSL_CMP_ATAV_get_rsaKeyLen(const OSSL_CMP_ATAV *atav);
|
| 471 |
+
int OSSL_CMP_ATAV_push1(OSSL_CMP_ATAVS **sk_p, const OSSL_CMP_ATAV *atav);
|
| 472 |
+
|
| 473 |
+
void OSSL_CMP_MSG_free(OSSL_CMP_MSG *msg);
|
| 474 |
+
|
| 475 |
+
/* from cmp_ctx.c */
|
| 476 |
+
OSSL_CMP_CTX *OSSL_CMP_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 477 |
+
void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
| 478 |
+
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
| 479 |
+
OSSL_LIB_CTX *OSSL_CMP_CTX_get0_libctx(const OSSL_CMP_CTX *ctx);
|
| 480 |
+
const char *OSSL_CMP_CTX_get0_propq(const OSSL_CMP_CTX *ctx);
|
| 481 |
+
/* CMP general options: */
|
| 482 |
+
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
| 483 |
+
/* CMP transfer options: */
|
| 484 |
+
# define OSSL_CMP_OPT_KEEP_ALIVE 10
|
| 485 |
+
# define OSSL_CMP_OPT_MSG_TIMEOUT 11
|
| 486 |
+
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 12
|
| 487 |
+
# define OSSL_CMP_OPT_USE_TLS 13
|
| 488 |
+
/* CMP request options: */
|
| 489 |
+
# define OSSL_CMP_OPT_VALIDITY_DAYS 20
|
| 490 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 21
|
| 491 |
+
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 22
|
| 492 |
+
# define OSSL_CMP_OPT_POLICIES_CRITICAL 23
|
| 493 |
+
# define OSSL_CMP_OPT_POPO_METHOD 24
|
| 494 |
+
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 25
|
| 495 |
+
# define OSSL_CMP_OPT_DISABLE_CONFIRM 26
|
| 496 |
+
# define OSSL_CMP_OPT_REVOCATION_REASON 27
|
| 497 |
+
/* CMP protection options: */
|
| 498 |
+
# define OSSL_CMP_OPT_UNPROTECTED_SEND 30
|
| 499 |
+
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 31
|
| 500 |
+
# define OSSL_CMP_OPT_OWF_ALGNID 32
|
| 501 |
+
# define OSSL_CMP_OPT_MAC_ALGNID 33
|
| 502 |
+
# define OSSL_CMP_OPT_DIGEST_ALGNID 34
|
| 503 |
+
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 35
|
| 504 |
+
# define OSSL_CMP_OPT_PERMIT_TA_IN_EXTRACERTS_FOR_IR 36
|
| 505 |
+
# define OSSL_CMP_OPT_NO_CACHE_EXTRACERTS 37
|
| 506 |
+
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
| 507 |
+
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
| 508 |
+
/* CMP-specific callback for logging and outputting the error queue: */
|
| 509 |
+
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
| 510 |
+
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
| 511 |
+
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
| 512 |
+
void OSSL_CMP_CTX_print_errors(const OSSL_CMP_CTX *ctx);
|
| 513 |
+
/* message transfer: */
|
| 514 |
+
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
| 515 |
+
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
| 516 |
+
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
| 517 |
+
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
| 518 |
+
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
| 519 |
+
# ifndef OPENSSL_NO_HTTP
|
| 520 |
+
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
| 521 |
+
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 522 |
+
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 523 |
+
# endif
|
| 524 |
+
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
| 525 |
+
const OSSL_CMP_MSG *req);
|
| 526 |
+
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
| 527 |
+
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 528 |
+
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 529 |
+
/* server authentication: */
|
| 530 |
+
int OSSL_CMP_CTX_set1_srvCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 531 |
+
int OSSL_CMP_CTX_set1_expected_sender(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 532 |
+
int OSSL_CMP_CTX_set0_trustedStore(OSSL_CMP_CTX *ctx, X509_STORE *store);
|
| 533 |
+
# define OSSL_CMP_CTX_set0_trusted OSSL_CMP_CTX_set0_trustedStore
|
| 534 |
+
X509_STORE *OSSL_CMP_CTX_get0_trustedStore(const OSSL_CMP_CTX *ctx);
|
| 535 |
+
# define OSSL_CMP_CTX_get0_trusted OSSL_CMP_CTX_get0_trustedStore
|
| 536 |
+
int OSSL_CMP_CTX_set1_untrusted(OSSL_CMP_CTX *ctx, STACK_OF(X509) *certs);
|
| 537 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get0_untrusted(const OSSL_CMP_CTX *ctx);
|
| 538 |
+
/* client authentication: */
|
| 539 |
+
int OSSL_CMP_CTX_set1_cert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 540 |
+
int OSSL_CMP_CTX_build_cert_chain(OSSL_CMP_CTX *ctx, X509_STORE *own_trusted,
|
| 541 |
+
STACK_OF(X509) *candidates);
|
| 542 |
+
int OSSL_CMP_CTX_set1_pkey(OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
|
| 543 |
+
int OSSL_CMP_CTX_set1_referenceValue(OSSL_CMP_CTX *ctx,
|
| 544 |
+
const unsigned char *ref, int len);
|
| 545 |
+
int OSSL_CMP_CTX_set1_secretValue(OSSL_CMP_CTX *ctx,
|
| 546 |
+
const unsigned char *sec, int len);
|
| 547 |
+
/* CMP message header and extra certificates: */
|
| 548 |
+
int OSSL_CMP_CTX_set1_recipient(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 549 |
+
int OSSL_CMP_CTX_push0_geninfo_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 550 |
+
int OSSL_CMP_CTX_reset_geninfo_ITAVs(OSSL_CMP_CTX *ctx);
|
| 551 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 552 |
+
*OSSL_CMP_CTX_get0_geninfo_ITAVs(const OSSL_CMP_CTX *ctx);
|
| 553 |
+
int OSSL_CMP_CTX_set1_extraCertsOut(OSSL_CMP_CTX *ctx,
|
| 554 |
+
STACK_OF(X509) *extraCertsOut);
|
| 555 |
+
/* certificate template: */
|
| 556 |
+
int OSSL_CMP_CTX_set0_newPkey(OSSL_CMP_CTX *ctx, int priv, EVP_PKEY *pkey);
|
| 557 |
+
EVP_PKEY *OSSL_CMP_CTX_get0_newPkey(const OSSL_CMP_CTX *ctx, int priv);
|
| 558 |
+
int OSSL_CMP_CTX_set1_issuer(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 559 |
+
int OSSL_CMP_CTX_set1_serialNumber(OSSL_CMP_CTX *ctx, const ASN1_INTEGER *sn);
|
| 560 |
+
int OSSL_CMP_CTX_set1_subjectName(OSSL_CMP_CTX *ctx, const X509_NAME *name);
|
| 561 |
+
int OSSL_CMP_CTX_push1_subjectAltName(OSSL_CMP_CTX *ctx,
|
| 562 |
+
const GENERAL_NAME *name);
|
| 563 |
+
int OSSL_CMP_CTX_set0_reqExtensions(OSSL_CMP_CTX *ctx, X509_EXTENSIONS *exts);
|
| 564 |
+
int OSSL_CMP_CTX_reqExtensions_have_SAN(OSSL_CMP_CTX *ctx);
|
| 565 |
+
int OSSL_CMP_CTX_push0_policy(OSSL_CMP_CTX *ctx, POLICYINFO *pinfo);
|
| 566 |
+
int OSSL_CMP_CTX_set1_oldCert(OSSL_CMP_CTX *ctx, X509 *cert);
|
| 567 |
+
int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
| 568 |
+
/* misc body contents: */
|
| 569 |
+
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
| 570 |
+
/* certificate confirmation: */
|
| 571 |
+
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
| 572 |
+
int fail_info, const char **txt);
|
| 573 |
+
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
| 574 |
+
const char **text);
|
| 575 |
+
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
| 576 |
+
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
| 577 |
+
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
| 578 |
+
/* result fetching: */
|
| 579 |
+
int OSSL_CMP_CTX_get_status(const OSSL_CMP_CTX *ctx);
|
| 580 |
+
OSSL_CMP_PKIFREETEXT *OSSL_CMP_CTX_get0_statusString(const OSSL_CMP_CTX *ctx);
|
| 581 |
+
int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
| 582 |
+
# define OSSL_CMP_PKISI_BUFLEN 1024
|
| 583 |
+
X509 *OSSL_CMP_CTX_get0_validatedSrvCert(const OSSL_CMP_CTX *ctx);
|
| 584 |
+
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
| 585 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_newChain(const OSSL_CMP_CTX *ctx);
|
| 586 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
| 587 |
+
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
| 588 |
+
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
| 589 |
+
const ASN1_OCTET_STRING *id);
|
| 590 |
+
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
| 591 |
+
const ASN1_OCTET_STRING *nonce);
|
| 592 |
+
|
| 593 |
+
/* from cmp_status.c */
|
| 594 |
+
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
| 595 |
+
size_t bufsize);
|
| 596 |
+
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
| 597 |
+
char *buf, size_t bufsize);
|
| 598 |
+
OSSL_CMP_PKISI *
|
| 599 |
+
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
| 600 |
+
|
| 601 |
+
/* from cmp_hdr.c */
|
| 602 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const
|
| 603 |
+
OSSL_CMP_PKIHEADER *hdr);
|
| 604 |
+
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
| 605 |
+
STACK_OF(OSSL_CMP_ITAV)
|
| 606 |
+
*OSSL_CMP_HDR_get0_geninfo_ITAVs(const OSSL_CMP_PKIHEADER *hdr);
|
| 607 |
+
|
| 608 |
+
/* from cmp_msg.c */
|
| 609 |
+
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
| 610 |
+
int OSSL_CMP_MSG_get_bodytype(const OSSL_CMP_MSG *msg);
|
| 611 |
+
X509_PUBKEY *OSSL_CMP_MSG_get0_certreq_publickey(const OSSL_CMP_MSG *msg);
|
| 612 |
+
int OSSL_CMP_MSG_update_transactionID(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 613 |
+
int OSSL_CMP_MSG_update_recipNonce(OSSL_CMP_CTX *ctx, OSSL_CMP_MSG *msg);
|
| 614 |
+
OSSL_CRMF_MSG *OSSL_CMP_CTX_setup_CRM(OSSL_CMP_CTX *ctx, int for_KUR, int rid);
|
| 615 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_read(const char *file, OSSL_LIB_CTX *libctx,
|
| 616 |
+
const char *propq);
|
| 617 |
+
int OSSL_CMP_MSG_write(const char *file, const OSSL_CMP_MSG *msg);
|
| 618 |
+
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
| 619 |
+
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
| 620 |
+
|
| 621 |
+
/* from cmp_vfy.c */
|
| 622 |
+
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
| 623 |
+
int OSSL_CMP_validate_cert_path(const OSSL_CMP_CTX *ctx,
|
| 624 |
+
X509_STORE *trusted_store, X509 *cert);
|
| 625 |
+
|
| 626 |
+
/* from cmp_http.c */
|
| 627 |
+
# ifndef OPENSSL_NO_HTTP
|
| 628 |
+
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
| 629 |
+
const OSSL_CMP_MSG *req);
|
| 630 |
+
# endif
|
| 631 |
+
|
| 632 |
+
/* from cmp_server.c */
|
| 633 |
+
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
| 634 |
+
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 635 |
+
const OSSL_CMP_MSG *req);
|
| 636 |
+
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
| 637 |
+
const OSSL_CMP_MSG *req);
|
| 638 |
+
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(OSSL_LIB_CTX *libctx, const char *propq);
|
| 639 |
+
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
| 640 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
| 641 |
+
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
| 642 |
+
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
| 643 |
+
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
| 644 |
+
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 645 |
+
const OSSL_CMP_MSG *req,
|
| 646 |
+
const X509_NAME *issuer,
|
| 647 |
+
const ASN1_INTEGER *serial);
|
| 648 |
+
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 649 |
+
const OSSL_CMP_MSG *req,
|
| 650 |
+
const STACK_OF(OSSL_CMP_ITAV) *in,
|
| 651 |
+
STACK_OF(OSSL_CMP_ITAV) **out);
|
| 652 |
+
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 653 |
+
const OSSL_CMP_MSG *req,
|
| 654 |
+
const OSSL_CMP_PKISI *statusInfo,
|
| 655 |
+
const ASN1_INTEGER *errorCode,
|
| 656 |
+
const OSSL_CMP_PKIFREETEXT *errDetails);
|
| 657 |
+
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 658 |
+
const OSSL_CMP_MSG *req,
|
| 659 |
+
int certReqId,
|
| 660 |
+
const ASN1_OCTET_STRING *certHash,
|
| 661 |
+
const OSSL_CMP_PKISI *si);
|
| 662 |
+
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 663 |
+
const OSSL_CMP_MSG *req, int certReqId,
|
| 664 |
+
OSSL_CMP_MSG **certReq,
|
| 665 |
+
int64_t *check_after);
|
| 666 |
+
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
| 667 |
+
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
| 668 |
+
OSSL_CMP_SRV_rr_cb_t process_rr,
|
| 669 |
+
OSSL_CMP_SRV_genm_cb_t process_genm,
|
| 670 |
+
OSSL_CMP_SRV_error_cb_t process_error,
|
| 671 |
+
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
| 672 |
+
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
| 673 |
+
typedef int (*OSSL_CMP_SRV_delayed_delivery_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 674 |
+
const OSSL_CMP_MSG *req);
|
| 675 |
+
typedef int (*OSSL_CMP_SRV_clean_transaction_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 676 |
+
const ASN1_OCTET_STRING *id);
|
| 677 |
+
int OSSL_CMP_SRV_CTX_init_trans(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 678 |
+
OSSL_CMP_SRV_delayed_delivery_cb_t delay,
|
| 679 |
+
OSSL_CMP_SRV_clean_transaction_cb_t clean);
|
| 680 |
+
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 681 |
+
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
| 682 |
+
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 683 |
+
int val);
|
| 684 |
+
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 685 |
+
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
| 686 |
+
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
| 687 |
+
int val);
|
| 688 |
+
|
| 689 |
+
/* from cmp_client.c */
|
| 690 |
+
X509 *OSSL_CMP_exec_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 691 |
+
const OSSL_CRMF_MSG *crm);
|
| 692 |
+
# define OSSL_CMP_IR 0
|
| 693 |
+
# define OSSL_CMP_CR 2
|
| 694 |
+
# define OSSL_CMP_P10CR 4
|
| 695 |
+
# define OSSL_CMP_KUR 7
|
| 696 |
+
# define OSSL_CMP_GENM 21
|
| 697 |
+
# define OSSL_CMP_ERROR 23
|
| 698 |
+
# define OSSL_CMP_exec_IR_ses(ctx) \
|
| 699 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_IR, NULL)
|
| 700 |
+
# define OSSL_CMP_exec_CR_ses(ctx) \
|
| 701 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_CR, NULL)
|
| 702 |
+
# define OSSL_CMP_exec_P10CR_ses(ctx) \
|
| 703 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_P10CR, NULL)
|
| 704 |
+
# define OSSL_CMP_exec_KUR_ses(ctx) \
|
| 705 |
+
OSSL_CMP_exec_certreq(ctx, OSSL_CMP_KUR, NULL)
|
| 706 |
+
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type,
|
| 707 |
+
const OSSL_CRMF_MSG *crm, int *checkAfter);
|
| 708 |
+
int OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
| 709 |
+
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
| 710 |
+
|
| 711 |
+
/* from cmp_genm.c */
|
| 712 |
+
int OSSL_CMP_get1_caCerts(OSSL_CMP_CTX *ctx, STACK_OF(X509) **out);
|
| 713 |
+
int OSSL_CMP_get1_rootCaKeyUpdate(OSSL_CMP_CTX *ctx,
|
| 714 |
+
const X509 *oldWithOld, X509 **newWithNew,
|
| 715 |
+
X509 **newWithOld, X509 **oldWithNew);
|
| 716 |
+
int OSSL_CMP_get1_crlUpdate(OSSL_CMP_CTX *ctx, const X509 *crlcert,
|
| 717 |
+
const X509_CRL *last_crl,
|
| 718 |
+
X509_CRL **crl);
|
| 719 |
+
int OSSL_CMP_get1_certReqTemplate(OSSL_CMP_CTX *ctx,
|
| 720 |
+
OSSL_CRMF_CERTTEMPLATE **certTemplate,
|
| 721 |
+
OSSL_CMP_ATAVS **keySpec);
|
| 722 |
+
|
| 723 |
+
# ifdef __cplusplus
|
| 724 |
+
}
|
| 725 |
+
# endif
|
| 726 |
+
# endif /* !defined(OPENSSL_NO_CMP) */
|
| 727 |
+
#endif /* !defined(OPENSSL_CMP_H) */
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/cms.h
ADDED
|
@@ -0,0 +1,511 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/cms.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 2008-2025 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_CMS_H
|
| 16 |
+
# define OPENSSL_CMS_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_CMS_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/opensslconf.h>
|
| 25 |
+
|
| 26 |
+
# ifndef OPENSSL_NO_CMS
|
| 27 |
+
# include <openssl/x509.h>
|
| 28 |
+
# include <openssl/x509v3.h>
|
| 29 |
+
# include <openssl/cmserr.h>
|
| 30 |
+
# ifdef __cplusplus
|
| 31 |
+
extern "C" {
|
| 32 |
+
# endif
|
| 33 |
+
|
| 34 |
+
typedef struct CMS_EnvelopedData_st CMS_EnvelopedData;
|
| 35 |
+
typedef struct CMS_ContentInfo_st CMS_ContentInfo;
|
| 36 |
+
typedef struct CMS_SignerInfo_st CMS_SignerInfo;
|
| 37 |
+
typedef struct CMS_SignedData_st CMS_SignedData;
|
| 38 |
+
typedef struct CMS_CertificateChoices CMS_CertificateChoices;
|
| 39 |
+
typedef struct CMS_RevocationInfoChoice_st CMS_RevocationInfoChoice;
|
| 40 |
+
typedef struct CMS_RecipientInfo_st CMS_RecipientInfo;
|
| 41 |
+
typedef struct CMS_ReceiptRequest_st CMS_ReceiptRequest;
|
| 42 |
+
typedef struct CMS_Receipt_st CMS_Receipt;
|
| 43 |
+
typedef struct CMS_RecipientEncryptedKey_st CMS_RecipientEncryptedKey;
|
| 44 |
+
typedef struct CMS_OtherKeyAttribute_st CMS_OtherKeyAttribute;
|
| 45 |
+
|
| 46 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_SignerInfo, CMS_SignerInfo, CMS_SignerInfo)
|
| 47 |
+
#define sk_CMS_SignerInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 48 |
+
#define sk_CMS_SignerInfo_value(sk, idx) ((CMS_SignerInfo *)OPENSSL_sk_value(ossl_check_const_CMS_SignerInfo_sk_type(sk), (idx)))
|
| 49 |
+
#define sk_CMS_SignerInfo_new(cmp) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new(ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 50 |
+
#define sk_CMS_SignerInfo_new_null() ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_null())
|
| 51 |
+
#define sk_CMS_SignerInfo_new_reserve(cmp, n) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_SignerInfo_compfunc_type(cmp), (n)))
|
| 52 |
+
#define sk_CMS_SignerInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_SignerInfo_sk_type(sk), (n))
|
| 53 |
+
#define sk_CMS_SignerInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 54 |
+
#define sk_CMS_SignerInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 55 |
+
#define sk_CMS_SignerInfo_delete(sk, i) ((CMS_SignerInfo *)OPENSSL_sk_delete(ossl_check_CMS_SignerInfo_sk_type(sk), (i)))
|
| 56 |
+
#define sk_CMS_SignerInfo_delete_ptr(sk, ptr) ((CMS_SignerInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 57 |
+
#define sk_CMS_SignerInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 58 |
+
#define sk_CMS_SignerInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 59 |
+
#define sk_CMS_SignerInfo_pop(sk) ((CMS_SignerInfo *)OPENSSL_sk_pop(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 60 |
+
#define sk_CMS_SignerInfo_shift(sk) ((CMS_SignerInfo *)OPENSSL_sk_shift(ossl_check_CMS_SignerInfo_sk_type(sk)))
|
| 61 |
+
#define sk_CMS_SignerInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_SignerInfo_sk_type(sk),ossl_check_CMS_SignerInfo_freefunc_type(freefunc))
|
| 62 |
+
#define sk_CMS_SignerInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), (idx))
|
| 63 |
+
#define sk_CMS_SignerInfo_set(sk, idx, ptr) ((CMS_SignerInfo *)OPENSSL_sk_set(ossl_check_CMS_SignerInfo_sk_type(sk), (idx), ossl_check_CMS_SignerInfo_type(ptr)))
|
| 64 |
+
#define sk_CMS_SignerInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 65 |
+
#define sk_CMS_SignerInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr))
|
| 66 |
+
#define sk_CMS_SignerInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_type(ptr), pnum)
|
| 67 |
+
#define sk_CMS_SignerInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_SignerInfo_sk_type(sk))
|
| 68 |
+
#define sk_CMS_SignerInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_SignerInfo_sk_type(sk))
|
| 69 |
+
#define sk_CMS_SignerInfo_dup(sk) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_SignerInfo_sk_type(sk)))
|
| 70 |
+
#define sk_CMS_SignerInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_SignerInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_copyfunc_type(copyfunc), ossl_check_CMS_SignerInfo_freefunc_type(freefunc)))
|
| 71 |
+
#define sk_CMS_SignerInfo_set_cmp_func(sk, cmp) ((sk_CMS_SignerInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_SignerInfo_sk_type(sk), ossl_check_CMS_SignerInfo_compfunc_type(cmp)))
|
| 72 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey, CMS_RecipientEncryptedKey)
|
| 73 |
+
#define sk_CMS_RecipientEncryptedKey_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 74 |
+
#define sk_CMS_RecipientEncryptedKey_value(sk, idx) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), (idx)))
|
| 75 |
+
#define sk_CMS_RecipientEncryptedKey_new(cmp) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 76 |
+
#define sk_CMS_RecipientEncryptedKey_new_null() ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_null())
|
| 77 |
+
#define sk_CMS_RecipientEncryptedKey_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp), (n)))
|
| 78 |
+
#define sk_CMS_RecipientEncryptedKey_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (n))
|
| 79 |
+
#define sk_CMS_RecipientEncryptedKey_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 80 |
+
#define sk_CMS_RecipientEncryptedKey_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 81 |
+
#define sk_CMS_RecipientEncryptedKey_delete(sk, i) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (i)))
|
| 82 |
+
#define sk_CMS_RecipientEncryptedKey_delete_ptr(sk, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 83 |
+
#define sk_CMS_RecipientEncryptedKey_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 84 |
+
#define sk_CMS_RecipientEncryptedKey_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 85 |
+
#define sk_CMS_RecipientEncryptedKey_pop(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_pop(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 86 |
+
#define sk_CMS_RecipientEncryptedKey_shift(sk) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_shift(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 87 |
+
#define sk_CMS_RecipientEncryptedKey_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk),ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc))
|
| 88 |
+
#define sk_CMS_RecipientEncryptedKey_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), (idx))
|
| 89 |
+
#define sk_CMS_RecipientEncryptedKey_set(sk, idx, ptr) ((CMS_RecipientEncryptedKey *)OPENSSL_sk_set(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), (idx), ossl_check_CMS_RecipientEncryptedKey_type(ptr)))
|
| 90 |
+
#define sk_CMS_RecipientEncryptedKey_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 91 |
+
#define sk_CMS_RecipientEncryptedKey_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr))
|
| 92 |
+
#define sk_CMS_RecipientEncryptedKey_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_type(ptr), pnum)
|
| 93 |
+
#define sk_CMS_RecipientEncryptedKey_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 94 |
+
#define sk_CMS_RecipientEncryptedKey_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk))
|
| 95 |
+
#define sk_CMS_RecipientEncryptedKey_dup(sk) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk)))
|
| 96 |
+
#define sk_CMS_RecipientEncryptedKey_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientEncryptedKey) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_copyfunc_type(copyfunc), ossl_check_CMS_RecipientEncryptedKey_freefunc_type(freefunc)))
|
| 97 |
+
#define sk_CMS_RecipientEncryptedKey_set_cmp_func(sk, cmp) ((sk_CMS_RecipientEncryptedKey_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientEncryptedKey_sk_type(sk), ossl_check_CMS_RecipientEncryptedKey_compfunc_type(cmp)))
|
| 98 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RecipientInfo, CMS_RecipientInfo, CMS_RecipientInfo)
|
| 99 |
+
#define sk_CMS_RecipientInfo_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 100 |
+
#define sk_CMS_RecipientInfo_value(sk, idx) ((CMS_RecipientInfo *)OPENSSL_sk_value(ossl_check_const_CMS_RecipientInfo_sk_type(sk), (idx)))
|
| 101 |
+
#define sk_CMS_RecipientInfo_new(cmp) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new(ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 102 |
+
#define sk_CMS_RecipientInfo_new_null() ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_null())
|
| 103 |
+
#define sk_CMS_RecipientInfo_new_reserve(cmp, n) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RecipientInfo_compfunc_type(cmp), (n)))
|
| 104 |
+
#define sk_CMS_RecipientInfo_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RecipientInfo_sk_type(sk), (n))
|
| 105 |
+
#define sk_CMS_RecipientInfo_free(sk) OPENSSL_sk_free(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 106 |
+
#define sk_CMS_RecipientInfo_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 107 |
+
#define sk_CMS_RecipientInfo_delete(sk, i) ((CMS_RecipientInfo *)OPENSSL_sk_delete(ossl_check_CMS_RecipientInfo_sk_type(sk), (i)))
|
| 108 |
+
#define sk_CMS_RecipientInfo_delete_ptr(sk, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 109 |
+
#define sk_CMS_RecipientInfo_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 110 |
+
#define sk_CMS_RecipientInfo_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 111 |
+
#define sk_CMS_RecipientInfo_pop(sk) ((CMS_RecipientInfo *)OPENSSL_sk_pop(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 112 |
+
#define sk_CMS_RecipientInfo_shift(sk) ((CMS_RecipientInfo *)OPENSSL_sk_shift(ossl_check_CMS_RecipientInfo_sk_type(sk)))
|
| 113 |
+
#define sk_CMS_RecipientInfo_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RecipientInfo_sk_type(sk),ossl_check_CMS_RecipientInfo_freefunc_type(freefunc))
|
| 114 |
+
#define sk_CMS_RecipientInfo_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), (idx))
|
| 115 |
+
#define sk_CMS_RecipientInfo_set(sk, idx, ptr) ((CMS_RecipientInfo *)OPENSSL_sk_set(ossl_check_CMS_RecipientInfo_sk_type(sk), (idx), ossl_check_CMS_RecipientInfo_type(ptr)))
|
| 116 |
+
#define sk_CMS_RecipientInfo_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 117 |
+
#define sk_CMS_RecipientInfo_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr))
|
| 118 |
+
#define sk_CMS_RecipientInfo_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_type(ptr), pnum)
|
| 119 |
+
#define sk_CMS_RecipientInfo_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RecipientInfo_sk_type(sk))
|
| 120 |
+
#define sk_CMS_RecipientInfo_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RecipientInfo_sk_type(sk))
|
| 121 |
+
#define sk_CMS_RecipientInfo_dup(sk) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_dup(ossl_check_const_CMS_RecipientInfo_sk_type(sk)))
|
| 122 |
+
#define sk_CMS_RecipientInfo_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RecipientInfo) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_copyfunc_type(copyfunc), ossl_check_CMS_RecipientInfo_freefunc_type(freefunc)))
|
| 123 |
+
#define sk_CMS_RecipientInfo_set_cmp_func(sk, cmp) ((sk_CMS_RecipientInfo_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RecipientInfo_sk_type(sk), ossl_check_CMS_RecipientInfo_compfunc_type(cmp)))
|
| 124 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CMS_RevocationInfoChoice, CMS_RevocationInfoChoice, CMS_RevocationInfoChoice)
|
| 125 |
+
#define sk_CMS_RevocationInfoChoice_num(sk) OPENSSL_sk_num(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 126 |
+
#define sk_CMS_RevocationInfoChoice_value(sk, idx) ((CMS_RevocationInfoChoice *)OPENSSL_sk_value(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), (idx)))
|
| 127 |
+
#define sk_CMS_RevocationInfoChoice_new(cmp) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 128 |
+
#define sk_CMS_RevocationInfoChoice_new_null() ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_null())
|
| 129 |
+
#define sk_CMS_RevocationInfoChoice_new_reserve(cmp, n) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_new_reserve(ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp), (n)))
|
| 130 |
+
#define sk_CMS_RevocationInfoChoice_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (n))
|
| 131 |
+
#define sk_CMS_RevocationInfoChoice_free(sk) OPENSSL_sk_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 132 |
+
#define sk_CMS_RevocationInfoChoice_zero(sk) OPENSSL_sk_zero(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 133 |
+
#define sk_CMS_RevocationInfoChoice_delete(sk, i) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (i)))
|
| 134 |
+
#define sk_CMS_RevocationInfoChoice_delete_ptr(sk, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_delete_ptr(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 135 |
+
#define sk_CMS_RevocationInfoChoice_push(sk, ptr) OPENSSL_sk_push(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 136 |
+
#define sk_CMS_RevocationInfoChoice_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 137 |
+
#define sk_CMS_RevocationInfoChoice_pop(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_pop(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 138 |
+
#define sk_CMS_RevocationInfoChoice_shift(sk) ((CMS_RevocationInfoChoice *)OPENSSL_sk_shift(ossl_check_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 139 |
+
#define sk_CMS_RevocationInfoChoice_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CMS_RevocationInfoChoice_sk_type(sk),ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc))
|
| 140 |
+
#define sk_CMS_RevocationInfoChoice_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), (idx))
|
| 141 |
+
#define sk_CMS_RevocationInfoChoice_set(sk, idx, ptr) ((CMS_RevocationInfoChoice *)OPENSSL_sk_set(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), (idx), ossl_check_CMS_RevocationInfoChoice_type(ptr)))
|
| 142 |
+
#define sk_CMS_RevocationInfoChoice_find(sk, ptr) OPENSSL_sk_find(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 143 |
+
#define sk_CMS_RevocationInfoChoice_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr))
|
| 144 |
+
#define sk_CMS_RevocationInfoChoice_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_type(ptr), pnum)
|
| 145 |
+
#define sk_CMS_RevocationInfoChoice_sort(sk) OPENSSL_sk_sort(ossl_check_CMS_RevocationInfoChoice_sk_type(sk))
|
| 146 |
+
#define sk_CMS_RevocationInfoChoice_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk))
|
| 147 |
+
#define sk_CMS_RevocationInfoChoice_dup(sk) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_dup(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk)))
|
| 148 |
+
#define sk_CMS_RevocationInfoChoice_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CMS_RevocationInfoChoice) *)OPENSSL_sk_deep_copy(ossl_check_const_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_copyfunc_type(copyfunc), ossl_check_CMS_RevocationInfoChoice_freefunc_type(freefunc)))
|
| 149 |
+
#define sk_CMS_RevocationInfoChoice_set_cmp_func(sk, cmp) ((sk_CMS_RevocationInfoChoice_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CMS_RevocationInfoChoice_sk_type(sk), ossl_check_CMS_RevocationInfoChoice_compfunc_type(cmp)))
|
| 150 |
+
|
| 151 |
+
|
| 152 |
+
DECLARE_ASN1_ITEM(CMS_EnvelopedData)
|
| 153 |
+
DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_SignedData)
|
| 154 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
|
| 155 |
+
DECLARE_ASN1_FUNCTIONS(CMS_ReceiptRequest)
|
| 156 |
+
DECLARE_ASN1_PRINT_FUNCTION(CMS_ContentInfo)
|
| 157 |
+
|
| 158 |
+
DECLARE_ASN1_DUP_FUNCTION(CMS_EnvelopedData)
|
| 159 |
+
|
| 160 |
+
CMS_ContentInfo *CMS_ContentInfo_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
|
| 161 |
+
|
| 162 |
+
# define CMS_SIGNERINFO_ISSUER_SERIAL 0
|
| 163 |
+
# define CMS_SIGNERINFO_KEYIDENTIFIER 1
|
| 164 |
+
|
| 165 |
+
# define CMS_RECIPINFO_NONE -1
|
| 166 |
+
# define CMS_RECIPINFO_TRANS 0
|
| 167 |
+
# define CMS_RECIPINFO_AGREE 1
|
| 168 |
+
# define CMS_RECIPINFO_KEK 2
|
| 169 |
+
# define CMS_RECIPINFO_PASS 3
|
| 170 |
+
# define CMS_RECIPINFO_OTHER 4
|
| 171 |
+
|
| 172 |
+
/* S/MIME related flags */
|
| 173 |
+
|
| 174 |
+
# define CMS_TEXT 0x1
|
| 175 |
+
# define CMS_NOCERTS 0x2
|
| 176 |
+
# define CMS_NO_CONTENT_VERIFY 0x4
|
| 177 |
+
# define CMS_NO_ATTR_VERIFY 0x8
|
| 178 |
+
# define CMS_NOSIGS \
|
| 179 |
+
(CMS_NO_CONTENT_VERIFY|CMS_NO_ATTR_VERIFY)
|
| 180 |
+
# define CMS_NOINTERN 0x10
|
| 181 |
+
# define CMS_NO_SIGNER_CERT_VERIFY 0x20
|
| 182 |
+
# define CMS_NOVERIFY 0x20
|
| 183 |
+
# define CMS_DETACHED 0x40
|
| 184 |
+
# define CMS_BINARY 0x80
|
| 185 |
+
# define CMS_NOATTR 0x100
|
| 186 |
+
# define CMS_NOSMIMECAP 0x200
|
| 187 |
+
# define CMS_NOOLDMIMETYPE 0x400
|
| 188 |
+
# define CMS_CRLFEOL 0x800
|
| 189 |
+
# define CMS_STREAM 0x1000
|
| 190 |
+
# define CMS_NOCRL 0x2000
|
| 191 |
+
# define CMS_PARTIAL 0x4000
|
| 192 |
+
# define CMS_REUSE_DIGEST 0x8000
|
| 193 |
+
# define CMS_USE_KEYID 0x10000
|
| 194 |
+
# define CMS_DEBUG_DECRYPT 0x20000
|
| 195 |
+
# define CMS_KEY_PARAM 0x40000
|
| 196 |
+
# define CMS_ASCIICRLF 0x80000
|
| 197 |
+
# define CMS_CADES 0x100000
|
| 198 |
+
# define CMS_USE_ORIGINATOR_KEYID 0x200000
|
| 199 |
+
# define CMS_NO_SIGNING_TIME 0x400000
|
| 200 |
+
|
| 201 |
+
const ASN1_OBJECT *CMS_get0_type(const CMS_ContentInfo *cms);
|
| 202 |
+
|
| 203 |
+
BIO *CMS_dataInit(CMS_ContentInfo *cms, BIO *icont);
|
| 204 |
+
int CMS_dataFinal(CMS_ContentInfo *cms, BIO *bio);
|
| 205 |
+
|
| 206 |
+
ASN1_OCTET_STRING **CMS_get0_content(CMS_ContentInfo *cms);
|
| 207 |
+
int CMS_is_detached(CMS_ContentInfo *cms);
|
| 208 |
+
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
| 209 |
+
|
| 210 |
+
# ifdef OPENSSL_PEM_H
|
| 211 |
+
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
| 212 |
+
# endif
|
| 213 |
+
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
| 214 |
+
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
| 215 |
+
int i2d_CMS_bio(BIO *bp, CMS_ContentInfo *cms);
|
| 216 |
+
|
| 217 |
+
BIO *BIO_new_CMS(BIO *out, CMS_ContentInfo *cms);
|
| 218 |
+
int i2d_CMS_bio_stream(BIO *out, CMS_ContentInfo *cms, BIO *in, int flags);
|
| 219 |
+
int PEM_write_bio_CMS_stream(BIO *out, CMS_ContentInfo *cms, BIO *in,
|
| 220 |
+
int flags);
|
| 221 |
+
CMS_ContentInfo *SMIME_read_CMS(BIO *bio, BIO **bcont);
|
| 222 |
+
CMS_ContentInfo *SMIME_read_CMS_ex(BIO *bio, int flags, BIO **bcont, CMS_ContentInfo **ci);
|
| 223 |
+
int SMIME_write_CMS(BIO *bio, CMS_ContentInfo *cms, BIO *data, int flags);
|
| 224 |
+
|
| 225 |
+
int CMS_final(CMS_ContentInfo *cms, BIO *data, BIO *dcont,
|
| 226 |
+
unsigned int flags);
|
| 227 |
+
int CMS_final_digest(CMS_ContentInfo *cms,
|
| 228 |
+
const unsigned char *md, unsigned int mdlen, BIO *dcont,
|
| 229 |
+
unsigned int flags);
|
| 230 |
+
|
| 231 |
+
CMS_ContentInfo *CMS_sign(X509 *signcert, EVP_PKEY *pkey,
|
| 232 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 233 |
+
unsigned int flags);
|
| 234 |
+
CMS_ContentInfo *CMS_sign_ex(X509 *signcert, EVP_PKEY *pkey,
|
| 235 |
+
STACK_OF(X509) *certs, BIO *data,
|
| 236 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 237 |
+
const char *propq);
|
| 238 |
+
|
| 239 |
+
CMS_ContentInfo *CMS_sign_receipt(CMS_SignerInfo *si,
|
| 240 |
+
X509 *signcert, EVP_PKEY *pkey,
|
| 241 |
+
STACK_OF(X509) *certs, unsigned int flags);
|
| 242 |
+
|
| 243 |
+
int CMS_data(CMS_ContentInfo *cms, BIO *out, unsigned int flags);
|
| 244 |
+
CMS_ContentInfo *CMS_data_create(BIO *in, unsigned int flags);
|
| 245 |
+
CMS_ContentInfo *CMS_data_create_ex(BIO *in, unsigned int flags,
|
| 246 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 247 |
+
|
| 248 |
+
int CMS_digest_verify(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 249 |
+
unsigned int flags);
|
| 250 |
+
CMS_ContentInfo *CMS_digest_create(BIO *in, const EVP_MD *md,
|
| 251 |
+
unsigned int flags);
|
| 252 |
+
CMS_ContentInfo *CMS_digest_create_ex(BIO *in, const EVP_MD *md,
|
| 253 |
+
unsigned int flags, OSSL_LIB_CTX *libctx,
|
| 254 |
+
const char *propq);
|
| 255 |
+
|
| 256 |
+
int CMS_EncryptedData_decrypt(CMS_ContentInfo *cms,
|
| 257 |
+
const unsigned char *key, size_t keylen,
|
| 258 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 259 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt(BIO *in, const EVP_CIPHER *cipher,
|
| 260 |
+
const unsigned char *key,
|
| 261 |
+
size_t keylen, unsigned int flags);
|
| 262 |
+
CMS_ContentInfo *CMS_EncryptedData_encrypt_ex(BIO *in, const EVP_CIPHER *cipher,
|
| 263 |
+
const unsigned char *key,
|
| 264 |
+
size_t keylen, unsigned int flags,
|
| 265 |
+
OSSL_LIB_CTX *libctx,
|
| 266 |
+
const char *propq);
|
| 267 |
+
|
| 268 |
+
int CMS_EncryptedData_set1_key(CMS_ContentInfo *cms, const EVP_CIPHER *ciph,
|
| 269 |
+
const unsigned char *key, size_t keylen);
|
| 270 |
+
|
| 271 |
+
int CMS_verify(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 272 |
+
X509_STORE *store, BIO *dcont, BIO *out, unsigned int flags);
|
| 273 |
+
|
| 274 |
+
int CMS_verify_receipt(CMS_ContentInfo *rcms, CMS_ContentInfo *ocms,
|
| 275 |
+
STACK_OF(X509) *certs,
|
| 276 |
+
X509_STORE *store, unsigned int flags);
|
| 277 |
+
|
| 278 |
+
STACK_OF(X509) *CMS_get0_signers(CMS_ContentInfo *cms);
|
| 279 |
+
|
| 280 |
+
CMS_ContentInfo *CMS_encrypt(STACK_OF(X509) *certs, BIO *in,
|
| 281 |
+
const EVP_CIPHER *cipher, unsigned int flags);
|
| 282 |
+
CMS_ContentInfo *CMS_encrypt_ex(STACK_OF(X509) *certs, BIO *in,
|
| 283 |
+
const EVP_CIPHER *cipher, unsigned int flags,
|
| 284 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 285 |
+
|
| 286 |
+
int CMS_decrypt(CMS_ContentInfo *cms, EVP_PKEY *pkey, X509 *cert,
|
| 287 |
+
BIO *dcont, BIO *out, unsigned int flags);
|
| 288 |
+
|
| 289 |
+
int CMS_decrypt_set1_pkey(CMS_ContentInfo *cms, EVP_PKEY *pk, X509 *cert);
|
| 290 |
+
int CMS_decrypt_set1_pkey_and_peer(CMS_ContentInfo *cms, EVP_PKEY *pk,
|
| 291 |
+
X509 *cert, X509 *peer);
|
| 292 |
+
int CMS_decrypt_set1_key(CMS_ContentInfo *cms,
|
| 293 |
+
unsigned char *key, size_t keylen,
|
| 294 |
+
const unsigned char *id, size_t idlen);
|
| 295 |
+
int CMS_decrypt_set1_password(CMS_ContentInfo *cms,
|
| 296 |
+
unsigned char *pass, ossl_ssize_t passlen);
|
| 297 |
+
|
| 298 |
+
STACK_OF(CMS_RecipientInfo) *CMS_get0_RecipientInfos(CMS_ContentInfo *cms);
|
| 299 |
+
int CMS_RecipientInfo_type(CMS_RecipientInfo *ri);
|
| 300 |
+
EVP_PKEY_CTX *CMS_RecipientInfo_get0_pkey_ctx(CMS_RecipientInfo *ri);
|
| 301 |
+
CMS_ContentInfo *CMS_AuthEnvelopedData_create(const EVP_CIPHER *cipher);
|
| 302 |
+
CMS_ContentInfo *
|
| 303 |
+
CMS_AuthEnvelopedData_create_ex(const EVP_CIPHER *cipher, OSSL_LIB_CTX *libctx,
|
| 304 |
+
const char *propq);
|
| 305 |
+
CMS_ContentInfo *CMS_EnvelopedData_create(const EVP_CIPHER *cipher);
|
| 306 |
+
CMS_ContentInfo *CMS_EnvelopedData_create_ex(const EVP_CIPHER *cipher,
|
| 307 |
+
OSSL_LIB_CTX *libctx,
|
| 308 |
+
const char *propq);
|
| 309 |
+
BIO *CMS_EnvelopedData_decrypt(CMS_EnvelopedData *env, BIO *detached_data,
|
| 310 |
+
EVP_PKEY *pkey, X509 *cert,
|
| 311 |
+
ASN1_OCTET_STRING *secret, unsigned int flags,
|
| 312 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 313 |
+
|
| 314 |
+
CMS_RecipientInfo *CMS_add1_recipient_cert(CMS_ContentInfo *cms,
|
| 315 |
+
X509 *recip, unsigned int flags);
|
| 316 |
+
CMS_RecipientInfo *CMS_add1_recipient(CMS_ContentInfo *cms, X509 *recip,
|
| 317 |
+
EVP_PKEY *originatorPrivKey, X509 * originator, unsigned int flags);
|
| 318 |
+
int CMS_RecipientInfo_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pkey);
|
| 319 |
+
int CMS_RecipientInfo_ktri_cert_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 320 |
+
int CMS_RecipientInfo_ktri_get0_algs(CMS_RecipientInfo *ri,
|
| 321 |
+
EVP_PKEY **pk, X509 **recip,
|
| 322 |
+
X509_ALGOR **palg);
|
| 323 |
+
int CMS_RecipientInfo_ktri_get0_signer_id(CMS_RecipientInfo *ri,
|
| 324 |
+
ASN1_OCTET_STRING **keyid,
|
| 325 |
+
X509_NAME **issuer,
|
| 326 |
+
ASN1_INTEGER **sno);
|
| 327 |
+
|
| 328 |
+
CMS_RecipientInfo *CMS_add0_recipient_key(CMS_ContentInfo *cms, int nid,
|
| 329 |
+
unsigned char *key, size_t keylen,
|
| 330 |
+
unsigned char *id, size_t idlen,
|
| 331 |
+
ASN1_GENERALIZEDTIME *date,
|
| 332 |
+
ASN1_OBJECT *otherTypeId,
|
| 333 |
+
ASN1_TYPE *otherType);
|
| 334 |
+
|
| 335 |
+
int CMS_RecipientInfo_kekri_get0_id(CMS_RecipientInfo *ri,
|
| 336 |
+
X509_ALGOR **palg,
|
| 337 |
+
ASN1_OCTET_STRING **pid,
|
| 338 |
+
ASN1_GENERALIZEDTIME **pdate,
|
| 339 |
+
ASN1_OBJECT **potherid,
|
| 340 |
+
ASN1_TYPE **pothertype);
|
| 341 |
+
|
| 342 |
+
int CMS_RecipientInfo_set0_key(CMS_RecipientInfo *ri,
|
| 343 |
+
unsigned char *key, size_t keylen);
|
| 344 |
+
|
| 345 |
+
int CMS_RecipientInfo_kekri_id_cmp(CMS_RecipientInfo *ri,
|
| 346 |
+
const unsigned char *id, size_t idlen);
|
| 347 |
+
|
| 348 |
+
int CMS_RecipientInfo_set0_password(CMS_RecipientInfo *ri,
|
| 349 |
+
unsigned char *pass,
|
| 350 |
+
ossl_ssize_t passlen);
|
| 351 |
+
|
| 352 |
+
CMS_RecipientInfo *CMS_add0_recipient_password(CMS_ContentInfo *cms,
|
| 353 |
+
int iter, int wrap_nid,
|
| 354 |
+
int pbe_nid,
|
| 355 |
+
unsigned char *pass,
|
| 356 |
+
ossl_ssize_t passlen,
|
| 357 |
+
const EVP_CIPHER *kekciph);
|
| 358 |
+
|
| 359 |
+
int CMS_RecipientInfo_decrypt(CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 360 |
+
int CMS_RecipientInfo_encrypt(const CMS_ContentInfo *cms, CMS_RecipientInfo *ri);
|
| 361 |
+
|
| 362 |
+
int CMS_uncompress(CMS_ContentInfo *cms, BIO *dcont, BIO *out,
|
| 363 |
+
unsigned int flags);
|
| 364 |
+
CMS_ContentInfo *CMS_compress(BIO *in, int comp_nid, unsigned int flags);
|
| 365 |
+
|
| 366 |
+
int CMS_set1_eContentType(CMS_ContentInfo *cms, const ASN1_OBJECT *oid);
|
| 367 |
+
const ASN1_OBJECT *CMS_get0_eContentType(CMS_ContentInfo *cms);
|
| 368 |
+
|
| 369 |
+
CMS_CertificateChoices *CMS_add0_CertificateChoices(CMS_ContentInfo *cms);
|
| 370 |
+
int CMS_add0_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 371 |
+
int CMS_add1_cert(CMS_ContentInfo *cms, X509 *cert);
|
| 372 |
+
STACK_OF(X509) *CMS_get1_certs(CMS_ContentInfo *cms);
|
| 373 |
+
|
| 374 |
+
CMS_RevocationInfoChoice *CMS_add0_RevocationInfoChoice(CMS_ContentInfo *cms);
|
| 375 |
+
int CMS_add0_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 376 |
+
int CMS_add1_crl(CMS_ContentInfo *cms, X509_CRL *crl);
|
| 377 |
+
STACK_OF(X509_CRL) *CMS_get1_crls(CMS_ContentInfo *cms);
|
| 378 |
+
|
| 379 |
+
int CMS_SignedData_init(CMS_ContentInfo *cms);
|
| 380 |
+
CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms,
|
| 381 |
+
X509 *signer, EVP_PKEY *pk, const EVP_MD *md,
|
| 382 |
+
unsigned int flags);
|
| 383 |
+
EVP_PKEY_CTX *CMS_SignerInfo_get0_pkey_ctx(CMS_SignerInfo *si);
|
| 384 |
+
EVP_MD_CTX *CMS_SignerInfo_get0_md_ctx(CMS_SignerInfo *si);
|
| 385 |
+
STACK_OF(CMS_SignerInfo) *CMS_get0_SignerInfos(CMS_ContentInfo *cms);
|
| 386 |
+
|
| 387 |
+
void CMS_SignerInfo_set1_signer_cert(CMS_SignerInfo *si, X509 *signer);
|
| 388 |
+
int CMS_SignerInfo_get0_signer_id(CMS_SignerInfo *si,
|
| 389 |
+
ASN1_OCTET_STRING **keyid,
|
| 390 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 391 |
+
int CMS_SignerInfo_cert_cmp(CMS_SignerInfo *si, X509 *cert);
|
| 392 |
+
int CMS_set1_signers_certs(CMS_ContentInfo *cms, STACK_OF(X509) *certs,
|
| 393 |
+
unsigned int flags);
|
| 394 |
+
void CMS_SignerInfo_get0_algs(CMS_SignerInfo *si, EVP_PKEY **pk,
|
| 395 |
+
X509 **signer, X509_ALGOR **pdig,
|
| 396 |
+
X509_ALGOR **psig);
|
| 397 |
+
ASN1_OCTET_STRING *CMS_SignerInfo_get0_signature(CMS_SignerInfo *si);
|
| 398 |
+
int CMS_SignerInfo_sign(CMS_SignerInfo *si);
|
| 399 |
+
int CMS_SignerInfo_verify(CMS_SignerInfo *si);
|
| 400 |
+
int CMS_SignerInfo_verify_content(CMS_SignerInfo *si, BIO *chain);
|
| 401 |
+
BIO *CMS_SignedData_verify(CMS_SignedData *sd, BIO *detached_data,
|
| 402 |
+
STACK_OF(X509) *scerts, X509_STORE *store,
|
| 403 |
+
STACK_OF(X509) *extra, STACK_OF(X509_CRL) *crls,
|
| 404 |
+
unsigned int flags,
|
| 405 |
+
OSSL_LIB_CTX *libctx, const char *propq);
|
| 406 |
+
|
| 407 |
+
int CMS_add_smimecap(CMS_SignerInfo *si, STACK_OF(X509_ALGOR) *algs);
|
| 408 |
+
int CMS_add_simple_smimecap(STACK_OF(X509_ALGOR) **algs,
|
| 409 |
+
int algnid, int keysize);
|
| 410 |
+
int CMS_add_standard_smimecap(STACK_OF(X509_ALGOR) **smcap);
|
| 411 |
+
|
| 412 |
+
int CMS_signed_get_attr_count(const CMS_SignerInfo *si);
|
| 413 |
+
int CMS_signed_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 414 |
+
int lastpos);
|
| 415 |
+
int CMS_signed_get_attr_by_OBJ(const CMS_SignerInfo *si, const ASN1_OBJECT *obj,
|
| 416 |
+
int lastpos);
|
| 417 |
+
X509_ATTRIBUTE *CMS_signed_get_attr(const CMS_SignerInfo *si, int loc);
|
| 418 |
+
X509_ATTRIBUTE *CMS_signed_delete_attr(CMS_SignerInfo *si, int loc);
|
| 419 |
+
int CMS_signed_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 420 |
+
int CMS_signed_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 421 |
+
const ASN1_OBJECT *obj, int type,
|
| 422 |
+
const void *bytes, int len);
|
| 423 |
+
int CMS_signed_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 424 |
+
int nid, int type,
|
| 425 |
+
const void *bytes, int len);
|
| 426 |
+
int CMS_signed_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 427 |
+
const char *attrname, int type,
|
| 428 |
+
const void *bytes, int len);
|
| 429 |
+
void *CMS_signed_get0_data_by_OBJ(const CMS_SignerInfo *si,
|
| 430 |
+
const ASN1_OBJECT *oid,
|
| 431 |
+
int lastpos, int type);
|
| 432 |
+
|
| 433 |
+
int CMS_unsigned_get_attr_count(const CMS_SignerInfo *si);
|
| 434 |
+
int CMS_unsigned_get_attr_by_NID(const CMS_SignerInfo *si, int nid,
|
| 435 |
+
int lastpos);
|
| 436 |
+
int CMS_unsigned_get_attr_by_OBJ(const CMS_SignerInfo *si,
|
| 437 |
+
const ASN1_OBJECT *obj, int lastpos);
|
| 438 |
+
X509_ATTRIBUTE *CMS_unsigned_get_attr(const CMS_SignerInfo *si, int loc);
|
| 439 |
+
X509_ATTRIBUTE *CMS_unsigned_delete_attr(CMS_SignerInfo *si, int loc);
|
| 440 |
+
int CMS_unsigned_add1_attr(CMS_SignerInfo *si, X509_ATTRIBUTE *attr);
|
| 441 |
+
int CMS_unsigned_add1_attr_by_OBJ(CMS_SignerInfo *si,
|
| 442 |
+
const ASN1_OBJECT *obj, int type,
|
| 443 |
+
const void *bytes, int len);
|
| 444 |
+
int CMS_unsigned_add1_attr_by_NID(CMS_SignerInfo *si,
|
| 445 |
+
int nid, int type,
|
| 446 |
+
const void *bytes, int len);
|
| 447 |
+
int CMS_unsigned_add1_attr_by_txt(CMS_SignerInfo *si,
|
| 448 |
+
const char *attrname, int type,
|
| 449 |
+
const void *bytes, int len);
|
| 450 |
+
void *CMS_unsigned_get0_data_by_OBJ(CMS_SignerInfo *si, ASN1_OBJECT *oid,
|
| 451 |
+
int lastpos, int type);
|
| 452 |
+
|
| 453 |
+
int CMS_get1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest **prr);
|
| 454 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0(
|
| 455 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 456 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 457 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo);
|
| 458 |
+
CMS_ReceiptRequest *CMS_ReceiptRequest_create0_ex(
|
| 459 |
+
unsigned char *id, int idlen, int allorfirst,
|
| 460 |
+
STACK_OF(GENERAL_NAMES) *receiptList,
|
| 461 |
+
STACK_OF(GENERAL_NAMES) *receiptsTo,
|
| 462 |
+
OSSL_LIB_CTX *libctx);
|
| 463 |
+
|
| 464 |
+
int CMS_add1_ReceiptRequest(CMS_SignerInfo *si, CMS_ReceiptRequest *rr);
|
| 465 |
+
void CMS_ReceiptRequest_get0_values(CMS_ReceiptRequest *rr,
|
| 466 |
+
ASN1_STRING **pcid,
|
| 467 |
+
int *pallorfirst,
|
| 468 |
+
STACK_OF(GENERAL_NAMES) **plist,
|
| 469 |
+
STACK_OF(GENERAL_NAMES) **prto);
|
| 470 |
+
int CMS_RecipientInfo_kari_get0_alg(CMS_RecipientInfo *ri,
|
| 471 |
+
X509_ALGOR **palg,
|
| 472 |
+
ASN1_OCTET_STRING **pukm);
|
| 473 |
+
STACK_OF(CMS_RecipientEncryptedKey)
|
| 474 |
+
*CMS_RecipientInfo_kari_get0_reks(CMS_RecipientInfo *ri);
|
| 475 |
+
|
| 476 |
+
int CMS_RecipientInfo_kari_get0_orig_id(CMS_RecipientInfo *ri,
|
| 477 |
+
X509_ALGOR **pubalg,
|
| 478 |
+
ASN1_BIT_STRING **pubkey,
|
| 479 |
+
ASN1_OCTET_STRING **keyid,
|
| 480 |
+
X509_NAME **issuer,
|
| 481 |
+
ASN1_INTEGER **sno);
|
| 482 |
+
|
| 483 |
+
int CMS_RecipientInfo_kari_orig_id_cmp(CMS_RecipientInfo *ri, X509 *cert);
|
| 484 |
+
|
| 485 |
+
int CMS_RecipientEncryptedKey_get0_id(CMS_RecipientEncryptedKey *rek,
|
| 486 |
+
ASN1_OCTET_STRING **keyid,
|
| 487 |
+
ASN1_GENERALIZEDTIME **tm,
|
| 488 |
+
CMS_OtherKeyAttribute **other,
|
| 489 |
+
X509_NAME **issuer, ASN1_INTEGER **sno);
|
| 490 |
+
int CMS_RecipientEncryptedKey_cert_cmp(CMS_RecipientEncryptedKey *rek,
|
| 491 |
+
X509 *cert);
|
| 492 |
+
int CMS_RecipientInfo_kari_set0_pkey(CMS_RecipientInfo *ri, EVP_PKEY *pk);
|
| 493 |
+
int CMS_RecipientInfo_kari_set0_pkey_and_peer(CMS_RecipientInfo *ri, EVP_PKEY *pk, X509 *peer);
|
| 494 |
+
EVP_CIPHER_CTX *CMS_RecipientInfo_kari_get0_ctx(CMS_RecipientInfo *ri);
|
| 495 |
+
int CMS_RecipientInfo_kari_decrypt(CMS_ContentInfo *cms,
|
| 496 |
+
CMS_RecipientInfo *ri,
|
| 497 |
+
CMS_RecipientEncryptedKey *rek);
|
| 498 |
+
|
| 499 |
+
int CMS_SharedInfo_encode(unsigned char **pder, X509_ALGOR *kekalg,
|
| 500 |
+
ASN1_OCTET_STRING *ukm, int keylen);
|
| 501 |
+
|
| 502 |
+
/* Backward compatibility for spelling errors. */
|
| 503 |
+
# define CMS_R_UNKNOWN_DIGEST_ALGORITM CMS_R_UNKNOWN_DIGEST_ALGORITHM
|
| 504 |
+
# define CMS_R_UNSUPPORTED_RECPIENTINFO_TYPE \
|
| 505 |
+
CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE
|
| 506 |
+
|
| 507 |
+
# ifdef __cplusplus
|
| 508 |
+
}
|
| 509 |
+
# endif
|
| 510 |
+
# endif
|
| 511 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/comp.h
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* Copyright 2015-2024 The OpenSSL Project Authors. All Rights Reserved.
|
| 3 |
+
*
|
| 4 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 5 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 6 |
+
* in the file LICENSE in the source distribution or at
|
| 7 |
+
* https://www.openssl.org/source/license.html
|
| 8 |
+
*/
|
| 9 |
+
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
#ifndef OPENSSL_COMP_H
|
| 13 |
+
# define OPENSSL_COMP_H
|
| 14 |
+
# pragma once
|
| 15 |
+
|
| 16 |
+
# include <openssl/macros.h>
|
| 17 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 18 |
+
# define HEADER_COMP_H
|
| 19 |
+
# endif
|
| 20 |
+
|
| 21 |
+
# include <openssl/opensslconf.h>
|
| 22 |
+
|
| 23 |
+
# include <openssl/crypto.h>
|
| 24 |
+
# include <openssl/comperr.h>
|
| 25 |
+
# ifdef __cplusplus
|
| 26 |
+
extern "C" {
|
| 27 |
+
# endif
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
# ifndef OPENSSL_NO_COMP
|
| 32 |
+
|
| 33 |
+
COMP_CTX *COMP_CTX_new(COMP_METHOD *meth);
|
| 34 |
+
const COMP_METHOD *COMP_CTX_get_method(const COMP_CTX *ctx);
|
| 35 |
+
int COMP_CTX_get_type(const COMP_CTX* comp);
|
| 36 |
+
int COMP_get_type(const COMP_METHOD *meth);
|
| 37 |
+
const char *COMP_get_name(const COMP_METHOD *meth);
|
| 38 |
+
void COMP_CTX_free(COMP_CTX *ctx);
|
| 39 |
+
|
| 40 |
+
int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 41 |
+
unsigned char *in, int ilen);
|
| 42 |
+
int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
| 43 |
+
unsigned char *in, int ilen);
|
| 44 |
+
|
| 45 |
+
COMP_METHOD *COMP_zlib(void);
|
| 46 |
+
COMP_METHOD *COMP_zlib_oneshot(void);
|
| 47 |
+
COMP_METHOD *COMP_brotli(void);
|
| 48 |
+
COMP_METHOD *COMP_brotli_oneshot(void);
|
| 49 |
+
COMP_METHOD *COMP_zstd(void);
|
| 50 |
+
COMP_METHOD *COMP_zstd_oneshot(void);
|
| 51 |
+
|
| 52 |
+
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 53 |
+
# define COMP_zlib_cleanup() while(0) continue
|
| 54 |
+
# endif
|
| 55 |
+
|
| 56 |
+
# ifdef OPENSSL_BIO_H
|
| 57 |
+
const BIO_METHOD *BIO_f_zlib(void);
|
| 58 |
+
const BIO_METHOD *BIO_f_brotli(void);
|
| 59 |
+
const BIO_METHOD *BIO_f_zstd(void);
|
| 60 |
+
# endif
|
| 61 |
+
|
| 62 |
+
# endif
|
| 63 |
+
|
| 64 |
+
typedef struct ssl_comp_st SSL_COMP;
|
| 65 |
+
|
| 66 |
+
SKM_DEFINE_STACK_OF_INTERNAL(SSL_COMP, SSL_COMP, SSL_COMP)
|
| 67 |
+
#define sk_SSL_COMP_num(sk) OPENSSL_sk_num(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 68 |
+
#define sk_SSL_COMP_value(sk, idx) ((SSL_COMP *)OPENSSL_sk_value(ossl_check_const_SSL_COMP_sk_type(sk), (idx)))
|
| 69 |
+
#define sk_SSL_COMP_new(cmp) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new(ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 70 |
+
#define sk_SSL_COMP_new_null() ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_null())
|
| 71 |
+
#define sk_SSL_COMP_new_reserve(cmp, n) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_new_reserve(ossl_check_SSL_COMP_compfunc_type(cmp), (n)))
|
| 72 |
+
#define sk_SSL_COMP_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_SSL_COMP_sk_type(sk), (n))
|
| 73 |
+
#define sk_SSL_COMP_free(sk) OPENSSL_sk_free(ossl_check_SSL_COMP_sk_type(sk))
|
| 74 |
+
#define sk_SSL_COMP_zero(sk) OPENSSL_sk_zero(ossl_check_SSL_COMP_sk_type(sk))
|
| 75 |
+
#define sk_SSL_COMP_delete(sk, i) ((SSL_COMP *)OPENSSL_sk_delete(ossl_check_SSL_COMP_sk_type(sk), (i)))
|
| 76 |
+
#define sk_SSL_COMP_delete_ptr(sk, ptr) ((SSL_COMP *)OPENSSL_sk_delete_ptr(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr)))
|
| 77 |
+
#define sk_SSL_COMP_push(sk, ptr) OPENSSL_sk_push(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 78 |
+
#define sk_SSL_COMP_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 79 |
+
#define sk_SSL_COMP_pop(sk) ((SSL_COMP *)OPENSSL_sk_pop(ossl_check_SSL_COMP_sk_type(sk)))
|
| 80 |
+
#define sk_SSL_COMP_shift(sk) ((SSL_COMP *)OPENSSL_sk_shift(ossl_check_SSL_COMP_sk_type(sk)))
|
| 81 |
+
#define sk_SSL_COMP_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_SSL_COMP_sk_type(sk),ossl_check_SSL_COMP_freefunc_type(freefunc))
|
| 82 |
+
#define sk_SSL_COMP_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), (idx))
|
| 83 |
+
#define sk_SSL_COMP_set(sk, idx, ptr) ((SSL_COMP *)OPENSSL_sk_set(ossl_check_SSL_COMP_sk_type(sk), (idx), ossl_check_SSL_COMP_type(ptr)))
|
| 84 |
+
#define sk_SSL_COMP_find(sk, ptr) OPENSSL_sk_find(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 85 |
+
#define sk_SSL_COMP_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr))
|
| 86 |
+
#define sk_SSL_COMP_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_type(ptr), pnum)
|
| 87 |
+
#define sk_SSL_COMP_sort(sk) OPENSSL_sk_sort(ossl_check_SSL_COMP_sk_type(sk))
|
| 88 |
+
#define sk_SSL_COMP_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_SSL_COMP_sk_type(sk))
|
| 89 |
+
#define sk_SSL_COMP_dup(sk) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_dup(ossl_check_const_SSL_COMP_sk_type(sk)))
|
| 90 |
+
#define sk_SSL_COMP_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(SSL_COMP) *)OPENSSL_sk_deep_copy(ossl_check_const_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_copyfunc_type(copyfunc), ossl_check_SSL_COMP_freefunc_type(freefunc)))
|
| 91 |
+
#define sk_SSL_COMP_set_cmp_func(sk, cmp) ((sk_SSL_COMP_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_SSL_COMP_sk_type(sk), ossl_check_SSL_COMP_compfunc_type(cmp)))
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
|
| 95 |
+
# ifdef __cplusplus
|
| 96 |
+
}
|
| 97 |
+
# endif
|
| 98 |
+
#endif
|
data_prepare/node-v24.12.0-linux-x64/include/node/openssl/archs/aix64-gcc-as/no-asm/include/openssl/conf.h
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/*
|
| 2 |
+
* WARNING: do not edit!
|
| 3 |
+
* Generated by Makefile from include/openssl/conf.h.in
|
| 4 |
+
*
|
| 5 |
+
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
| 6 |
+
*
|
| 7 |
+
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
| 8 |
+
* this file except in compliance with the License. You can obtain a copy
|
| 9 |
+
* in the file LICENSE in the source distribution or at
|
| 10 |
+
* https://www.openssl.org/source/license.html
|
| 11 |
+
*/
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
|
| 15 |
+
#ifndef OPENSSL_CONF_H
|
| 16 |
+
# define OPENSSL_CONF_H
|
| 17 |
+
# pragma once
|
| 18 |
+
|
| 19 |
+
# include <openssl/macros.h>
|
| 20 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 21 |
+
# define HEADER_CONF_H
|
| 22 |
+
# endif
|
| 23 |
+
|
| 24 |
+
# include <openssl/bio.h>
|
| 25 |
+
# include <openssl/lhash.h>
|
| 26 |
+
# include <openssl/safestack.h>
|
| 27 |
+
# include <openssl/e_os2.h>
|
| 28 |
+
# include <openssl/types.h>
|
| 29 |
+
# include <openssl/conferr.h>
|
| 30 |
+
# ifndef OPENSSL_NO_STDIO
|
| 31 |
+
# include <stdio.h>
|
| 32 |
+
# endif
|
| 33 |
+
|
| 34 |
+
#ifdef __cplusplus
|
| 35 |
+
extern "C" {
|
| 36 |
+
#endif
|
| 37 |
+
|
| 38 |
+
typedef struct {
|
| 39 |
+
char *section;
|
| 40 |
+
char *name;
|
| 41 |
+
char *value;
|
| 42 |
+
} CONF_VALUE;
|
| 43 |
+
|
| 44 |
+
SKM_DEFINE_STACK_OF_INTERNAL(CONF_VALUE, CONF_VALUE, CONF_VALUE)
|
| 45 |
+
#define sk_CONF_VALUE_num(sk) OPENSSL_sk_num(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 46 |
+
#define sk_CONF_VALUE_value(sk, idx) ((CONF_VALUE *)OPENSSL_sk_value(ossl_check_const_CONF_VALUE_sk_type(sk), (idx)))
|
| 47 |
+
#define sk_CONF_VALUE_new(cmp) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new(ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 48 |
+
#define sk_CONF_VALUE_new_null() ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_null())
|
| 49 |
+
#define sk_CONF_VALUE_new_reserve(cmp, n) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_new_reserve(ossl_check_CONF_VALUE_compfunc_type(cmp), (n)))
|
| 50 |
+
#define sk_CONF_VALUE_reserve(sk, n) OPENSSL_sk_reserve(ossl_check_CONF_VALUE_sk_type(sk), (n))
|
| 51 |
+
#define sk_CONF_VALUE_free(sk) OPENSSL_sk_free(ossl_check_CONF_VALUE_sk_type(sk))
|
| 52 |
+
#define sk_CONF_VALUE_zero(sk) OPENSSL_sk_zero(ossl_check_CONF_VALUE_sk_type(sk))
|
| 53 |
+
#define sk_CONF_VALUE_delete(sk, i) ((CONF_VALUE *)OPENSSL_sk_delete(ossl_check_CONF_VALUE_sk_type(sk), (i)))
|
| 54 |
+
#define sk_CONF_VALUE_delete_ptr(sk, ptr) ((CONF_VALUE *)OPENSSL_sk_delete_ptr(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr)))
|
| 55 |
+
#define sk_CONF_VALUE_push(sk, ptr) OPENSSL_sk_push(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 56 |
+
#define sk_CONF_VALUE_unshift(sk, ptr) OPENSSL_sk_unshift(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 57 |
+
#define sk_CONF_VALUE_pop(sk) ((CONF_VALUE *)OPENSSL_sk_pop(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 58 |
+
#define sk_CONF_VALUE_shift(sk) ((CONF_VALUE *)OPENSSL_sk_shift(ossl_check_CONF_VALUE_sk_type(sk)))
|
| 59 |
+
#define sk_CONF_VALUE_pop_free(sk, freefunc) OPENSSL_sk_pop_free(ossl_check_CONF_VALUE_sk_type(sk),ossl_check_CONF_VALUE_freefunc_type(freefunc))
|
| 60 |
+
#define sk_CONF_VALUE_insert(sk, ptr, idx) OPENSSL_sk_insert(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), (idx))
|
| 61 |
+
#define sk_CONF_VALUE_set(sk, idx, ptr) ((CONF_VALUE *)OPENSSL_sk_set(ossl_check_CONF_VALUE_sk_type(sk), (idx), ossl_check_CONF_VALUE_type(ptr)))
|
| 62 |
+
#define sk_CONF_VALUE_find(sk, ptr) OPENSSL_sk_find(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 63 |
+
#define sk_CONF_VALUE_find_ex(sk, ptr) OPENSSL_sk_find_ex(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr))
|
| 64 |
+
#define sk_CONF_VALUE_find_all(sk, ptr, pnum) OPENSSL_sk_find_all(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_type(ptr), pnum)
|
| 65 |
+
#define sk_CONF_VALUE_sort(sk) OPENSSL_sk_sort(ossl_check_CONF_VALUE_sk_type(sk))
|
| 66 |
+
#define sk_CONF_VALUE_is_sorted(sk) OPENSSL_sk_is_sorted(ossl_check_const_CONF_VALUE_sk_type(sk))
|
| 67 |
+
#define sk_CONF_VALUE_dup(sk) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_dup(ossl_check_const_CONF_VALUE_sk_type(sk)))
|
| 68 |
+
#define sk_CONF_VALUE_deep_copy(sk, copyfunc, freefunc) ((STACK_OF(CONF_VALUE) *)OPENSSL_sk_deep_copy(ossl_check_const_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_copyfunc_type(copyfunc), ossl_check_CONF_VALUE_freefunc_type(freefunc)))
|
| 69 |
+
#define sk_CONF_VALUE_set_cmp_func(sk, cmp) ((sk_CONF_VALUE_compfunc)OPENSSL_sk_set_cmp_func(ossl_check_CONF_VALUE_sk_type(sk), ossl_check_CONF_VALUE_compfunc_type(cmp)))
|
| 70 |
+
DEFINE_LHASH_OF_INTERNAL(CONF_VALUE);
|
| 71 |
+
#define lh_CONF_VALUE_new(hfn, cmp) ((LHASH_OF(CONF_VALUE) *)OPENSSL_LH_set_thunks(OPENSSL_LH_new(ossl_check_CONF_VALUE_lh_hashfunc_type(hfn), ossl_check_CONF_VALUE_lh_compfunc_type(cmp)), lh_CONF_VALUE_hash_thunk, lh_CONF_VALUE_comp_thunk, lh_CONF_VALUE_doall_thunk, lh_CONF_VALUE_doall_arg_thunk))
|
| 72 |
+
#define lh_CONF_VALUE_free(lh) OPENSSL_LH_free(ossl_check_CONF_VALUE_lh_type(lh))
|
| 73 |
+
#define lh_CONF_VALUE_flush(lh) OPENSSL_LH_flush(ossl_check_CONF_VALUE_lh_type(lh))
|
| 74 |
+
#define lh_CONF_VALUE_insert(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_insert(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_plain_type(ptr)))
|
| 75 |
+
#define lh_CONF_VALUE_delete(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_delete(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 76 |
+
#define lh_CONF_VALUE_retrieve(lh, ptr) ((CONF_VALUE *)OPENSSL_LH_retrieve(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_const_CONF_VALUE_lh_plain_type(ptr)))
|
| 77 |
+
#define lh_CONF_VALUE_error(lh) OPENSSL_LH_error(ossl_check_CONF_VALUE_lh_type(lh))
|
| 78 |
+
#define lh_CONF_VALUE_num_items(lh) OPENSSL_LH_num_items(ossl_check_CONF_VALUE_lh_type(lh))
|
| 79 |
+
#define lh_CONF_VALUE_node_stats_bio(lh, out) OPENSSL_LH_node_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 80 |
+
#define lh_CONF_VALUE_node_usage_stats_bio(lh, out) OPENSSL_LH_node_usage_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 81 |
+
#define lh_CONF_VALUE_stats_bio(lh, out) OPENSSL_LH_stats_bio(ossl_check_const_CONF_VALUE_lh_type(lh), out)
|
| 82 |
+
#define lh_CONF_VALUE_get_down_load(lh) OPENSSL_LH_get_down_load(ossl_check_CONF_VALUE_lh_type(lh))
|
| 83 |
+
#define lh_CONF_VALUE_set_down_load(lh, dl) OPENSSL_LH_set_down_load(ossl_check_CONF_VALUE_lh_type(lh), dl)
|
| 84 |
+
#define lh_CONF_VALUE_doall(lh, dfn) OPENSSL_LH_doall(ossl_check_CONF_VALUE_lh_type(lh), ossl_check_CONF_VALUE_lh_doallfunc_type(dfn))
|
| 85 |
+
|
| 86 |
+
|
| 87 |
+
struct conf_st;
|
| 88 |
+
struct conf_method_st;
|
| 89 |
+
typedef struct conf_method_st CONF_METHOD;
|
| 90 |
+
|
| 91 |
+
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 92 |
+
# include <openssl/conftypes.h>
|
| 93 |
+
# endif
|
| 94 |
+
|
| 95 |
+
/* Module definitions */
|
| 96 |
+
typedef struct conf_imodule_st CONF_IMODULE;
|
| 97 |
+
typedef struct conf_module_st CONF_MODULE;
|
| 98 |
+
|
| 99 |
+
STACK_OF(CONF_MODULE);
|
| 100 |
+
STACK_OF(CONF_IMODULE);
|
| 101 |
+
|
| 102 |
+
/* DSO module function typedefs */
|
| 103 |
+
typedef int conf_init_func (CONF_IMODULE *md, const CONF *cnf);
|
| 104 |
+
typedef void conf_finish_func (CONF_IMODULE *md);
|
| 105 |
+
|
| 106 |
+
# define CONF_MFLAGS_IGNORE_ERRORS 0x1
|
| 107 |
+
# define CONF_MFLAGS_IGNORE_RETURN_CODES 0x2
|
| 108 |
+
# define CONF_MFLAGS_SILENT 0x4
|
| 109 |
+
# define CONF_MFLAGS_NO_DSO 0x8
|
| 110 |
+
# define CONF_MFLAGS_IGNORE_MISSING_FILE 0x10
|
| 111 |
+
# define CONF_MFLAGS_DEFAULT_SECTION 0x20
|
| 112 |
+
|
| 113 |
+
int CONF_set_default_method(CONF_METHOD *meth);
|
| 114 |
+
void CONF_set_nconf(CONF *conf, LHASH_OF(CONF_VALUE) *hash);
|
| 115 |
+
LHASH_OF(CONF_VALUE) *CONF_load(LHASH_OF(CONF_VALUE) *conf, const char *file,
|
| 116 |
+
long *eline);
|
| 117 |
+
# ifndef OPENSSL_NO_STDIO
|
| 118 |
+
LHASH_OF(CONF_VALUE) *CONF_load_fp(LHASH_OF(CONF_VALUE) *conf, FILE *fp,
|
| 119 |
+
long *eline);
|
| 120 |
+
# endif
|
| 121 |
+
LHASH_OF(CONF_VALUE) *CONF_load_bio(LHASH_OF(CONF_VALUE) *conf, BIO *bp,
|
| 122 |
+
long *eline);
|
| 123 |
+
STACK_OF(CONF_VALUE) *CONF_get_section(LHASH_OF(CONF_VALUE) *conf,
|
| 124 |
+
const char *section);
|
| 125 |
+
char *CONF_get_string(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 126 |
+
const char *name);
|
| 127 |
+
long CONF_get_number(LHASH_OF(CONF_VALUE) *conf, const char *group,
|
| 128 |
+
const char *name);
|
| 129 |
+
void CONF_free(LHASH_OF(CONF_VALUE) *conf);
|
| 130 |
+
#ifndef OPENSSL_NO_STDIO
|
| 131 |
+
int CONF_dump_fp(LHASH_OF(CONF_VALUE) *conf, FILE *out);
|
| 132 |
+
#endif
|
| 133 |
+
int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
| 134 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 135 |
+
OSSL_DEPRECATEDIN_1_1_0 void OPENSSL_config(const char *config_name);
|
| 136 |
+
#endif
|
| 137 |
+
|
| 138 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 139 |
+
# define OPENSSL_no_config() \
|
| 140 |
+
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
| 141 |
+
#endif
|
| 142 |
+
|
| 143 |
+
/*
|
| 144 |
+
* New conf code. The semantics are different from the functions above. If
|
| 145 |
+
* that wasn't the case, the above functions would have been replaced
|
| 146 |
+
*/
|
| 147 |
+
|
| 148 |
+
CONF *NCONF_new_ex(OSSL_LIB_CTX *libctx, CONF_METHOD *meth);
|
| 149 |
+
OSSL_LIB_CTX *NCONF_get0_libctx(const CONF *conf);
|
| 150 |
+
CONF *NCONF_new(CONF_METHOD *meth);
|
| 151 |
+
CONF_METHOD *NCONF_default(void);
|
| 152 |
+
#ifndef OPENSSL_NO_DEPRECATED_3_0
|
| 153 |
+
OSSL_DEPRECATEDIN_3_0 CONF_METHOD *NCONF_WIN32(void);
|
| 154 |
+
#endif
|
| 155 |
+
void NCONF_free(CONF *conf);
|
| 156 |
+
void NCONF_free_data(CONF *conf);
|
| 157 |
+
|
| 158 |
+
int NCONF_load(CONF *conf, const char *file, long *eline);
|
| 159 |
+
# ifndef OPENSSL_NO_STDIO
|
| 160 |
+
int NCONF_load_fp(CONF *conf, FILE *fp, long *eline);
|
| 161 |
+
# endif
|
| 162 |
+
int NCONF_load_bio(CONF *conf, BIO *bp, long *eline);
|
| 163 |
+
STACK_OF(OPENSSL_CSTRING) *NCONF_get_section_names(const CONF *conf);
|
| 164 |
+
STACK_OF(CONF_VALUE) *NCONF_get_section(const CONF *conf,
|
| 165 |
+
const char *section);
|
| 166 |
+
char *NCONF_get_string(const CONF *conf, const char *group, const char *name);
|
| 167 |
+
int NCONF_get_number_e(const CONF *conf, const char *group, const char *name,
|
| 168 |
+
long *result);
|
| 169 |
+
#ifndef OPENSSL_NO_STDIO
|
| 170 |
+
int NCONF_dump_fp(const CONF *conf, FILE *out);
|
| 171 |
+
#endif
|
| 172 |
+
int NCONF_dump_bio(const CONF *conf, BIO *out);
|
| 173 |
+
|
| 174 |
+
#define NCONF_get_number(c,g,n,r) NCONF_get_number_e(c,g,n,r)
|
| 175 |
+
|
| 176 |
+
/* Module functions */
|
| 177 |
+
|
| 178 |
+
int CONF_modules_load(const CONF *cnf, const char *appname,
|
| 179 |
+
unsigned long flags);
|
| 180 |
+
int CONF_modules_load_file_ex(OSSL_LIB_CTX *libctx, const char *filename,
|
| 181 |
+
const char *appname, unsigned long flags);
|
| 182 |
+
int CONF_modules_load_file(const char *filename, const char *appname,
|
| 183 |
+
unsigned long flags);
|
| 184 |
+
void CONF_modules_unload(int all);
|
| 185 |
+
void CONF_modules_finish(void);
|
| 186 |
+
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
| 187 |
+
# define CONF_modules_free() while(0) continue
|
| 188 |
+
#endif
|
| 189 |
+
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
| 190 |
+
conf_finish_func *ffunc);
|
| 191 |
+
|
| 192 |
+
const char *CONF_imodule_get_name(const CONF_IMODULE *md);
|
| 193 |
+
const char *CONF_imodule_get_value(const CONF_IMODULE *md);
|
| 194 |
+
void *CONF_imodule_get_usr_data(const CONF_IMODULE *md);
|
| 195 |
+
void CONF_imodule_set_usr_data(CONF_IMODULE *md, void *usr_data);
|
| 196 |
+
CONF_MODULE *CONF_imodule_get_module(const CONF_IMODULE *md);
|
| 197 |
+
unsigned long CONF_imodule_get_flags(const CONF_IMODULE *md);
|
| 198 |
+
void CONF_imodule_set_flags(CONF_IMODULE *md, unsigned long flags);
|
| 199 |
+
void *CONF_module_get_usr_data(CONF_MODULE *pmod);
|
| 200 |
+
void CONF_module_set_usr_data(CONF_MODULE *pmod, void *usr_data);
|
| 201 |
+
|
| 202 |
+
char *CONF_get1_default_config_file(void);
|
| 203 |
+
|
| 204 |
+
int CONF_parse_list(const char *list, int sep, int nospc,
|
| 205 |
+
int (*list_cb) (const char *elem, int len, void *usr),
|
| 206 |
+
void *arg);
|
| 207 |
+
|
| 208 |
+
void OPENSSL_load_builtin_modules(void);
|
| 209 |
+
|
| 210 |
+
|
| 211 |
+
# ifdef __cplusplus
|
| 212 |
+
}
|
| 213 |
+
# endif
|
| 214 |
+
#endif
|