VirtualBox

忽略:
時間撮記:
2022-3-3 下午07:17:34 (3 年 以前)
作者:
vboxsync
svn:sync-xref-src-repo-rev:
150325
訊息:

libs/openssl-3.0.1: started applying and adjusting our OpenSSL changes to 3.0.1. bugref:10128

位置:
trunk/src/libs/openssl-3.0.1
檔案:
修改 2 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/libs/openssl-3.0.1

    • 屬性 svn:mergeinfo
      •  

        old new  
        1212/vendor/openssl/1.1.1c:131722-131725
        1313/vendor/openssl/1.1.1k:145841-145843
         14/vendor/openssl/3.0.1:150323-150324
         15/vendor/openssl/current:147554-150322
  • trunk/src/libs/openssl-3.0.1/include/openssl/store.h

    r91772 r94082  
    11/*
    2  * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
    3  *
    4  * Licensed under the OpenSSL license (the "License").  You may not use
     2 * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
     3 *
     4 * Licensed under the Apache License 2.0 (the "License").  You may not use
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <stdarg.h>
    14 # include <openssl/ossl_typ.h>
     20# include <openssl/types.h>
    1521# include <openssl/pem.h>
    1622# include <openssl/storeerr.h>
     
    4753 * through.
    4854 */
    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);
     55OSSL_STORE_CTX *
     56OSSL_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);
     59OSSL_STORE_CTX *
     60OSSL_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);
    5365
    5466/*
     
    5870 * Each command takes different arguments.
    5971 */
    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
     73OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd,
     74                                          ... /* args */);
     75OSSL_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
    6280
    6381/*
     
    6886/* Where custom commands start */
    6987# define OSSL_STORE_C_CUSTOM_START    100
     88
     89# endif
    7090
    7191/*
     
    97117int OSSL_STORE_close(OSSL_STORE_CTX *ctx);
    98118
     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 */
     132OSSL_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);
    99138
    100139/*-
     
    110149# define OSSL_STORE_INFO_NAME           1   /* char * */
    111150# 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 * */
    115155
    116156/*
     
    121161 * and will therefore be freed when the OSSL_STORE_INFO is freed.
    122162 */
     163OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data);
    123164OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name);
    124165int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc);
    125166OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params);
     167OSSL_STORE_INFO *OSSL_STORE_INFO_new_PUBKEY(EVP_PKEY *pubkey);
    126168OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey);
    127169OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509);
     
    132174 */
    133175int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info);
     176void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info);
    134177const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info);
    135178char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info);
     
    138181EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info);
    139182EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info);
     183EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info);
     184EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info);
    140185EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info);
    141186EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info);
     
    186231/* Search term accessors */
    187232int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion);
    188 X509_NAME *OSSL_STORE_SEARCH_get0_name(OSSL_STORE_SEARCH *criterion);
     233X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion);
    189234const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH
    190235                                                  *criterion);
     
    199244 */
    200245int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
    201 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
    202 
     246int 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
     254typedef struct ossl_store_loader_st OSSL_STORE_LOADER;
     255
     256OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
     257                                           const char *scheme,
     258                                           const char *properties);
     259int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader);
     260void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
     261const OSSL_PROVIDER *OSSL_STORE_LOADER_get0_provider(const OSSL_STORE_LOADER *
     262                                                loader);
     263const char *OSSL_STORE_LOADER_get0_properties(const OSSL_STORE_LOADER *loader);
     264const char *OSSL_STORE_LOADER_get0_description(const OSSL_STORE_LOADER *loader);
     265int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader,
     266                           const char *scheme);
     267void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
     268                                       void (*fn)(OSSL_STORE_LOADER *loader,
     269                                                  void *arg),
     270                                       void *arg);
     271int OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader,
     272                                   void (*fn)(const char *name, void *data),
     273                                   void *data);
    203274
    204275/*-
     
    210281 */
    211282
    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
    216285/* struct ossl_store_loader_ctx_st is defined differently by each loader */
    217286typedef 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);
     287typedef 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);
     290typedef 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
     295typedef 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);
     299typedef int (*OSSL_STORE_ctrl_fn)
     300    (OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args);
     301typedef int (*OSSL_STORE_expect_fn)
     302    (OSSL_STORE_LOADER_CTX *ctx, int expected);
     303typedef int (*OSSL_STORE_find_fn)
     304    (OSSL_STORE_LOADER_CTX *ctx, const OSSL_STORE_SEARCH *criteria);
     305typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)
     306    (OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data);
     307typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx);
     308typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx);
     309typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx);
     310
     311# endif
     312# ifndef OPENSSL_NO_DEPRECATED_3_0
     313OSSL_DEPRECATEDIN_3_0
     314OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme);
     315OSSL_DEPRECATEDIN_3_0
    223316int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader,
    224317                               OSSL_STORE_open_fn open_function);
    225 typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd,
    226                                   va_list args);
     318OSSL_DEPRECATEDIN_3_0
     319int OSSL_STORE_LOADER_set_open_ex(OSSL_STORE_LOADER *loader,
     320                                  OSSL_STORE_open_ex_fn open_ex_function);
     321OSSL_DEPRECATEDIN_3_0
     322int OSSL_STORE_LOADER_set_attach(OSSL_STORE_LOADER *loader,
     323                                 OSSL_STORE_attach_fn attach_function);
     324OSSL_DEPRECATEDIN_3_0
    227325int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader,
    228326                               OSSL_STORE_ctrl_fn ctrl_function);
    229 typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected);
     327OSSL_DEPRECATEDIN_3_0
    230328int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader,
    231329                                 OSSL_STORE_expect_fn expect_function);
    232 typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx,
    233                                   OSSL_STORE_SEARCH *criteria);
     330OSSL_DEPRECATEDIN_3_0
    234331int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader,
    235332                               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);
     333OSSL_DEPRECATEDIN_3_0
    239334int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader,
    240335                               OSSL_STORE_load_fn load_function);
    241 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx);
     336OSSL_DEPRECATEDIN_3_0
    242337int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader,
    243338                              OSSL_STORE_eof_fn eof_function);
    244 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx);
     339OSSL_DEPRECATEDIN_3_0
    245340int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader,
    246341                                OSSL_STORE_error_fn error_function);
    247 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx);
     342OSSL_DEPRECATEDIN_3_0
    248343int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader,
    249344                                OSSL_STORE_close_fn close_function);
    250 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
    251 
     345OSSL_DEPRECATEDIN_3_0
     346const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader);
     347OSSL_DEPRECATEDIN_3_0
     348const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader);
     349OSSL_DEPRECATEDIN_3_0
    252350int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader);
     351OSSL_DEPRECATEDIN_3_0
    253352OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme);
     353# endif
    254354
    255355/*-
     
    257357 *  -------------------------------
    258358 */
    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
     360OSSL_DEPRECATEDIN_3_0
     361int OSSL_STORE_do_all_loaders(void (*do_function)(const OSSL_STORE_LOADER *loader,
     362                                                  void *do_arg),
    261363                              void *do_arg);
     364# endif
    262365
    263366# ifdef  __cplusplus
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette