- 時間撮記:
- 2022-3-3 下午07:17:34 (3 年 以前)
- svn:sync-xref-src-repo-rev:
- 150325
- 位置:
- trunk/src/libs/openssl-3.0.1
- 檔案:
-
- 修改 2 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/libs/openssl-3.0.1
- 屬性 svn:mergeinfo
-
old new 12 12 /vendor/openssl/1.1.1c:131722-131725 13 13 /vendor/openssl/1.1.1k:145841-145843 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322
-
- 屬性 svn:mergeinfo
-
trunk/src/libs/openssl-3.0.1/include/openssl/store.h
r91772 r94082 1 1 /* 2 * Copyright 2016-20 19The OpenSSL Project Authors. All Rights Reserved.3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use2 * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_OSSL_STORE_H 11 # define HEADER_OSSL_STORE_H 10 #ifndef OPENSSL_STORE_H 11 # define OPENSSL_STORE_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_OSSL_STORE_H 17 # endif 12 18 13 19 # include <stdarg.h> 14 # include <openssl/ ossl_typ.h>20 # include <openssl/types.h> 15 21 # include <openssl/pem.h> 16 22 # include <openssl/storeerr.h> … … 47 53 * through. 48 54 */ 49 OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, 50 void *ui_data, 51 OSSL_STORE_post_process_info_fn post_process, 52 void *post_process_data); 55 OSSL_STORE_CTX * 56 OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, void *ui_data, 57 OSSL_STORE_post_process_info_fn post_process, 58 void *post_process_data); 59 OSSL_STORE_CTX * 60 OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq, 61 const UI_METHOD *ui_method, void *ui_data, 62 const OSSL_PARAM params[], 63 OSSL_STORE_post_process_info_fn post_process, 64 void *post_process_data); 53 65 54 66 /* … … 58 70 * Each command takes different arguments. 59 71 */ 60 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ... /* args */); 61 int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args); 72 # ifndef OPENSSL_NO_DEPRECATED_3_0 73 OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, 74 ... /* args */); 75 OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, 76 va_list args); 77 # endif 78 79 # ifndef OPENSSL_NO_DEPRECATED_3_0 62 80 63 81 /* … … 68 86 /* Where custom commands start */ 69 87 # define OSSL_STORE_C_CUSTOM_START 100 88 89 # endif 70 90 71 91 /* … … 97 117 int OSSL_STORE_close(OSSL_STORE_CTX *ctx); 98 118 119 /* 120 * Attach to a BIO. This works like OSSL_STORE_open() except it takes a 121 * BIO instead of a uri, along with a scheme to use when reading. 122 * The given UI method will be used any time the loader needs extra input, 123 * for example when a password or pin is needed, and will be passed the 124 * same user data every time it's needed in this context. 125 * 126 * Returns a context reference which represents the channel to communicate 127 * through. 128 * 129 * Note that this function is considered unsafe, all depending on what the 130 * BIO actually reads. 131 */ 132 OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bio, const char *scheme, 133 OSSL_LIB_CTX *libctx, const char *propq, 134 const UI_METHOD *ui_method, void *ui_data, 135 const OSSL_PARAM params[], 136 OSSL_STORE_post_process_info_fn post_process, 137 void *post_process_data); 99 138 100 139 /*- … … 110 149 # define OSSL_STORE_INFO_NAME 1 /* char * */ 111 150 # define OSSL_STORE_INFO_PARAMS 2 /* EVP_PKEY * */ 112 # define OSSL_STORE_INFO_PKEY 3 /* EVP_PKEY * */ 113 # define OSSL_STORE_INFO_CERT 4 /* X509 * */ 114 # define OSSL_STORE_INFO_CRL 5 /* X509_CRL * */ 151 # define OSSL_STORE_INFO_PUBKEY 3 /* EVP_PKEY * */ 152 # define OSSL_STORE_INFO_PKEY 4 /* EVP_PKEY * */ 153 # define OSSL_STORE_INFO_CERT 5 /* X509 * */ 154 # define OSSL_STORE_INFO_CRL 6 /* X509_CRL * */ 115 155 116 156 /* … … 121 161 * and will therefore be freed when the OSSL_STORE_INFO is freed. 122 162 */ 163 OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data); 123 164 OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name); 124 165 int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc); 125 166 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params); 167 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PUBKEY(EVP_PKEY *pubkey); 126 168 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey); 127 169 OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509); … … 132 174 */ 133 175 int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info); 176 void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info); 134 177 const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info); 135 178 char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info); … … 138 181 EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info); 139 182 EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info); 183 EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info); 184 EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info); 140 185 EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info); 141 186 EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info); … … 186 231 /* Search term accessors */ 187 232 int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion); 188 X509_NAME *OSSL_STORE_SEARCH_get0_name( OSSL_STORE_SEARCH *criterion);233 X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion); 189 234 const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH 190 235 *criterion); … … 199 244 */ 200 245 int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type); 201 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search); 202 246 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search); 247 248 249 /*- 250 * Function to fetch a loader and extract data from it 251 * --------------------------------------------------- 252 */ 253 254 typedef struct ossl_store_loader_st OSSL_STORE_LOADER; 255 256 OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx, 257 const char *scheme, 258 const char *properties); 259 int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader); 260 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); 261 const OSSL_PROVIDER *OSSL_STORE_LOADER_get0_provider(const OSSL_STORE_LOADER * 262 loader); 263 const char *OSSL_STORE_LOADER_get0_properties(const OSSL_STORE_LOADER *loader); 264 const char *OSSL_STORE_LOADER_get0_description(const OSSL_STORE_LOADER *loader); 265 int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader, 266 const char *scheme); 267 void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx, 268 void (*fn)(OSSL_STORE_LOADER *loader, 269 void *arg), 270 void *arg); 271 int OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader, 272 void (*fn)(const char *name, void *data), 273 void *data); 203 274 204 275 /*- … … 210 281 */ 211 282 212 typedef struct ossl_store_loader_st OSSL_STORE_LOADER; 213 OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); 214 const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); 215 const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); 283 # ifndef OPENSSL_NO_DEPRECATED_3_0 284 216 285 /* struct ossl_store_loader_ctx_st is defined differently by each loader */ 217 286 typedef struct ossl_store_loader_ctx_st OSSL_STORE_LOADER_CTX; 218 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn)(const OSSL_STORE_LOADER 219 *loader, 220 const char *uri, 221 const UI_METHOD *ui_method, 222 void *ui_data); 287 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn) 288 (const OSSL_STORE_LOADER *loader, const char *uri, 289 const UI_METHOD *ui_method, void *ui_data); 290 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_ex_fn) 291 (const OSSL_STORE_LOADER *loader, 292 const char *uri, OSSL_LIB_CTX *libctx, const char *propq, 293 const UI_METHOD *ui_method, void *ui_data); 294 295 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_attach_fn) 296 (const OSSL_STORE_LOADER *loader, BIO *bio, 297 OSSL_LIB_CTX *libctx, const char *propq, 298 const UI_METHOD *ui_method, void *ui_data); 299 typedef int (*OSSL_STORE_ctrl_fn) 300 (OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args); 301 typedef int (*OSSL_STORE_expect_fn) 302 (OSSL_STORE_LOADER_CTX *ctx, int expected); 303 typedef int (*OSSL_STORE_find_fn) 304 (OSSL_STORE_LOADER_CTX *ctx, const OSSL_STORE_SEARCH *criteria); 305 typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn) 306 (OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data); 307 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); 308 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); 309 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); 310 311 # endif 312 # ifndef OPENSSL_NO_DEPRECATED_3_0 313 OSSL_DEPRECATEDIN_3_0 314 OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); 315 OSSL_DEPRECATEDIN_3_0 223 316 int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader, 224 317 OSSL_STORE_open_fn open_function); 225 typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd, 226 va_list args); 318 OSSL_DEPRECATEDIN_3_0 319 int OSSL_STORE_LOADER_set_open_ex(OSSL_STORE_LOADER *loader, 320 OSSL_STORE_open_ex_fn open_ex_function); 321 OSSL_DEPRECATEDIN_3_0 322 int OSSL_STORE_LOADER_set_attach(OSSL_STORE_LOADER *loader, 323 OSSL_STORE_attach_fn attach_function); 324 OSSL_DEPRECATEDIN_3_0 227 325 int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader, 228 326 OSSL_STORE_ctrl_fn ctrl_function); 229 typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected); 327 OSSL_DEPRECATEDIN_3_0 230 328 int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader, 231 329 OSSL_STORE_expect_fn expect_function); 232 typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx, 233 OSSL_STORE_SEARCH *criteria); 330 OSSL_DEPRECATEDIN_3_0 234 331 int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader, 235 332 OSSL_STORE_find_fn find_function); 236 typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)(OSSL_STORE_LOADER_CTX *ctx, 237 const UI_METHOD *ui_method, 238 void *ui_data); 333 OSSL_DEPRECATEDIN_3_0 239 334 int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader, 240 335 OSSL_STORE_load_fn load_function); 241 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); 336 OSSL_DEPRECATEDIN_3_0 242 337 int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader, 243 338 OSSL_STORE_eof_fn eof_function); 244 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); 339 OSSL_DEPRECATEDIN_3_0 245 340 int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader, 246 341 OSSL_STORE_error_fn error_function); 247 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); 342 OSSL_DEPRECATEDIN_3_0 248 343 int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader, 249 344 OSSL_STORE_close_fn close_function); 250 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); 251 345 OSSL_DEPRECATEDIN_3_0 346 const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); 347 OSSL_DEPRECATEDIN_3_0 348 const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); 349 OSSL_DEPRECATEDIN_3_0 252 350 int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader); 351 OSSL_DEPRECATEDIN_3_0 253 352 OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme); 353 # endif 254 354 255 355 /*- … … 257 357 * ------------------------------- 258 358 */ 259 int OSSL_STORE_do_all_loaders(void (*do_function) (const OSSL_STORE_LOADER 260 *loader, void *do_arg), 359 # ifndef OPENSSL_NO_DEPRECATED_3_0 360 OSSL_DEPRECATEDIN_3_0 361 int OSSL_STORE_do_all_loaders(void (*do_function)(const OSSL_STORE_LOADER *loader, 362 void *do_arg), 261 363 void *do_arg); 364 # endif 262 365 263 366 # ifdef __cplusplus
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器