diff options
author | tpashkin <tpashkin@yandex-team.ru> | 2022-02-10 16:46:42 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:42 +0300 |
commit | 656921707c02b816d730f31c1fdc1d615adbfe00 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /contrib/libs/openssl/crypto/x509 | |
parent | 5475379a04e37df30085bd1724f1c57e3f40996f (diff) | |
download | ydb-656921707c02b816d730f31c1fdc1d615adbfe00.tar.gz |
Restoring authorship annotation for <tpashkin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/openssl/crypto/x509')
29 files changed, 227 insertions, 227 deletions
diff --git a/contrib/libs/openssl/crypto/x509/by_dir.c b/contrib/libs/openssl/crypto/x509/by_dir.c index 8da9fc4313..238c2519a6 100644 --- a/contrib/libs/openssl/crypto/x509/by_dir.c +++ b/contrib/libs/openssl/crypto/x509/by_dir.c @@ -19,8 +19,8 @@ #endif #include <openssl/x509.h> -#include "crypto/x509.h" -#include "x509_local.h" +#include "crypto/x509.h" +#include "x509_local.h" struct lookup_dir_hashes_st { unsigned long hash; diff --git a/contrib/libs/openssl/crypto/x509/by_file.c b/contrib/libs/openssl/crypto/x509/by_file.c index b058309808..237b362e27 100644 --- a/contrib/libs/openssl/crypto/x509/by_file.c +++ b/contrib/libs/openssl/crypto/x509/by_file.c @@ -15,7 +15,7 @@ #include <openssl/buffer.h> #include <openssl/x509.h> #include <openssl/pem.h> -#include "x509_local.h" +#include "x509_local.h" static int by_file_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc, long argl, char **ret); diff --git a/contrib/libs/openssl/crypto/x509/t_x509.c b/contrib/libs/openssl/crypto/x509/t_x509.c index b330a68699..ece987a6bd 100644 --- a/contrib/libs/openssl/crypto/x509/t_x509.c +++ b/contrib/libs/openssl/crypto/x509/t_x509.c @@ -14,7 +14,7 @@ #include <openssl/objects.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "crypto/asn1.h" +#include "crypto/asn1.h" #ifndef OPENSSL_NO_STDIO int X509_print_fp(FILE *fp, X509 *x) diff --git a/contrib/libs/openssl/crypto/x509/x509_att.c b/contrib/libs/openssl/crypto/x509/x509_att.c index 93db322cec..cc9f9d1909 100644 --- a/contrib/libs/openssl/crypto/x509/x509_att.c +++ b/contrib/libs/openssl/crypto/x509/x509_att.c @@ -15,7 +15,7 @@ #include <openssl/evp.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "x509_local.h" +#include "x509_local.h" int X509at_get_attr_count(const STACK_OF(X509_ATTRIBUTE) *x) { diff --git a/contrib/libs/openssl/crypto/x509/x509_cmp.c b/contrib/libs/openssl/crypto/x509/x509_cmp.c index 4e6cdc2ab2..1d8d2d7b28 100644 --- a/contrib/libs/openssl/crypto/x509/x509_cmp.c +++ b/contrib/libs/openssl/crypto/x509/x509_cmp.c @@ -13,7 +13,7 @@ #include <openssl/objects.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "crypto/x509.h" +#include "crypto/x509.h" int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b) { @@ -136,7 +136,7 @@ unsigned long X509_subject_name_hash_old(X509 *x) int X509_cmp(const X509 *a, const X509 *b) { int rv = 0; - + if (a == b) /* for efficiency */ return 0; diff --git a/contrib/libs/openssl/crypto/x509/x509_ext.c b/contrib/libs/openssl/crypto/x509/x509_ext.c index 59ce5278a3..4cdab724ea 100644 --- a/contrib/libs/openssl/crypto/x509/x509_ext.c +++ b/contrib/libs/openssl/crypto/x509/x509_ext.c @@ -13,7 +13,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/x509v3.h> int X509_CRL_get_ext_count(const X509_CRL *x) diff --git a/contrib/libs/openssl/crypto/x509/x509_local.h b/contrib/libs/openssl/crypto/x509/x509_local.h index 7eb251bff1..10807e1def 100644 --- a/contrib/libs/openssl/crypto/x509/x509_local.h +++ b/contrib/libs/openssl/crypto/x509/x509_local.h @@ -1,149 +1,149 @@ -/* +/* * Copyright 2014-2020 The OpenSSL Project Authors. All Rights Reserved. - * - * Licensed under the OpenSSL license (the "License"). You may not use - * this file except in compliance with the License. You can obtain a copy - * in the file LICENSE in the source distribution or at - * https://www.openssl.org/source/license.html - */ - -#include "internal/refcount.h" - -/* - * This structure holds all parameters associated with a verify operation by - * including an X509_VERIFY_PARAM structure in related structures the - * parameters used can be customized - */ - -struct X509_VERIFY_PARAM_st { - char *name; - time_t check_time; /* Time to use */ - uint32_t inh_flags; /* Inheritance flags */ - unsigned long flags; /* Various verify flags */ - int purpose; /* purpose to check untrusted certificates */ - int trust; /* trust setting to check */ - int depth; /* Verify depth */ - int auth_level; /* Security level for chain verification */ - STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */ - /* Peer identity details */ - STACK_OF(OPENSSL_STRING) *hosts; /* Set of acceptable names */ - unsigned int hostflags; /* Flags to control matching features */ - char *peername; /* Matching hostname in peer certificate */ - char *email; /* If not NULL email address to match */ - size_t emaillen; - unsigned char *ip; /* If not NULL IP address to match */ - size_t iplen; /* Length of IP address */ -}; - -/* No error callback if depth < 0 */ -int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int depth); - -/* a sequence of these are used */ -struct x509_attributes_st { - ASN1_OBJECT *object; - STACK_OF(ASN1_TYPE) *set; -}; - -struct X509_extension_st { - ASN1_OBJECT *object; - ASN1_BOOLEAN critical; - ASN1_OCTET_STRING value; -}; - -/* - * Method to handle CRL access. In general a CRL could be very large (several - * Mb) and can consume large amounts of resources if stored in memory by - * multiple processes. This method allows general CRL operations to be - * redirected to more efficient callbacks: for example a CRL entry database. - */ - -#define X509_CRL_METHOD_DYNAMIC 1 - -struct x509_crl_method_st { - int flags; - int (*crl_init) (X509_CRL *crl); - int (*crl_free) (X509_CRL *crl); - int (*crl_lookup) (X509_CRL *crl, X509_REVOKED **ret, - ASN1_INTEGER *ser, X509_NAME *issuer); - int (*crl_verify) (X509_CRL *crl, EVP_PKEY *pk); -}; - -struct x509_lookup_method_st { - char *name; - int (*new_item) (X509_LOOKUP *ctx); - void (*free) (X509_LOOKUP *ctx); - int (*init) (X509_LOOKUP *ctx); - int (*shutdown) (X509_LOOKUP *ctx); - int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl, - char **ret); - int (*get_by_subject) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, - X509_NAME *name, X509_OBJECT *ret); - int (*get_by_issuer_serial) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, - X509_NAME *name, ASN1_INTEGER *serial, - X509_OBJECT *ret); - int (*get_by_fingerprint) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, - const unsigned char *bytes, int len, - X509_OBJECT *ret); - int (*get_by_alias) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, - const char *str, int len, X509_OBJECT *ret); -}; - -/* This is the functions plus an instance of the local variables. */ -struct x509_lookup_st { - int init; /* have we been started */ - int skip; /* don't use us. */ - X509_LOOKUP_METHOD *method; /* the functions */ - void *method_data; /* method data */ - X509_STORE *store_ctx; /* who owns us */ -}; - -/* - * This is used to hold everything. It is used for all certificate - * validation. Once we have a certificate chain, the 'verify' function is - * then called to actually check the cert chain. - */ -struct x509_store_st { - /* The following is a cache of trusted certs */ - int cache; /* if true, stash any hits */ - STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ - /* These are external lookup methods */ - STACK_OF(X509_LOOKUP) *get_cert_methods; - X509_VERIFY_PARAM *param; - /* Callbacks for various operations */ - /* called to verify a certificate */ - int (*verify) (X509_STORE_CTX *ctx); - /* error callback */ - int (*verify_cb) (int ok, X509_STORE_CTX *ctx); - /* get issuers cert from ctx */ - int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x); - /* check issued */ - int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer); - /* Check revocation status of chain */ - int (*check_revocation) (X509_STORE_CTX *ctx); - /* retrieve CRL */ - int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); - /* Check CRL validity */ - int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl); - /* Check certificate against CRL */ - int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); - /* Check policy status of the chain */ - int (*check_policy) (X509_STORE_CTX *ctx); - STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm); - STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm); - int (*cleanup) (X509_STORE_CTX *ctx); - CRYPTO_EX_DATA ex_data; - CRYPTO_REF_COUNT references; - CRYPTO_RWLOCK *lock; -}; - -typedef struct lookup_dir_hashes_st BY_DIR_HASH; -typedef struct lookup_dir_entry_st BY_DIR_ENTRY; -DEFINE_STACK_OF(BY_DIR_HASH) -DEFINE_STACK_OF(BY_DIR_ENTRY) -typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; -DEFINE_STACK_OF(STACK_OF_X509_NAME_ENTRY) - -void x509_set_signature_info(X509_SIG_INFO *siginf, const X509_ALGOR *alg, - const ASN1_STRING *sig); + * + * Licensed under the OpenSSL license (the "License"). You may not use + * this file except in compliance with the License. You can obtain a copy + * in the file LICENSE in the source distribution or at + * https://www.openssl.org/source/license.html + */ + +#include "internal/refcount.h" + +/* + * This structure holds all parameters associated with a verify operation by + * including an X509_VERIFY_PARAM structure in related structures the + * parameters used can be customized + */ + +struct X509_VERIFY_PARAM_st { + char *name; + time_t check_time; /* Time to use */ + uint32_t inh_flags; /* Inheritance flags */ + unsigned long flags; /* Various verify flags */ + int purpose; /* purpose to check untrusted certificates */ + int trust; /* trust setting to check */ + int depth; /* Verify depth */ + int auth_level; /* Security level for chain verification */ + STACK_OF(ASN1_OBJECT) *policies; /* Permissible policies */ + /* Peer identity details */ + STACK_OF(OPENSSL_STRING) *hosts; /* Set of acceptable names */ + unsigned int hostflags; /* Flags to control matching features */ + char *peername; /* Matching hostname in peer certificate */ + char *email; /* If not NULL email address to match */ + size_t emaillen; + unsigned char *ip; /* If not NULL IP address to match */ + size_t iplen; /* Length of IP address */ +}; + +/* No error callback if depth < 0 */ +int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int depth); + +/* a sequence of these are used */ +struct x509_attributes_st { + ASN1_OBJECT *object; + STACK_OF(ASN1_TYPE) *set; +}; + +struct X509_extension_st { + ASN1_OBJECT *object; + ASN1_BOOLEAN critical; + ASN1_OCTET_STRING value; +}; + +/* + * Method to handle CRL access. In general a CRL could be very large (several + * Mb) and can consume large amounts of resources if stored in memory by + * multiple processes. This method allows general CRL operations to be + * redirected to more efficient callbacks: for example a CRL entry database. + */ + +#define X509_CRL_METHOD_DYNAMIC 1 + +struct x509_crl_method_st { + int flags; + int (*crl_init) (X509_CRL *crl); + int (*crl_free) (X509_CRL *crl); + int (*crl_lookup) (X509_CRL *crl, X509_REVOKED **ret, + ASN1_INTEGER *ser, X509_NAME *issuer); + int (*crl_verify) (X509_CRL *crl, EVP_PKEY *pk); +}; + +struct x509_lookup_method_st { + char *name; + int (*new_item) (X509_LOOKUP *ctx); + void (*free) (X509_LOOKUP *ctx); + int (*init) (X509_LOOKUP *ctx); + int (*shutdown) (X509_LOOKUP *ctx); + int (*ctrl) (X509_LOOKUP *ctx, int cmd, const char *argc, long argl, + char **ret); + int (*get_by_subject) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + X509_NAME *name, X509_OBJECT *ret); + int (*get_by_issuer_serial) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + X509_NAME *name, ASN1_INTEGER *serial, + X509_OBJECT *ret); + int (*get_by_fingerprint) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + const unsigned char *bytes, int len, + X509_OBJECT *ret); + int (*get_by_alias) (X509_LOOKUP *ctx, X509_LOOKUP_TYPE type, + const char *str, int len, X509_OBJECT *ret); +}; + +/* This is the functions plus an instance of the local variables. */ +struct x509_lookup_st { + int init; /* have we been started */ + int skip; /* don't use us. */ + X509_LOOKUP_METHOD *method; /* the functions */ + void *method_data; /* method data */ + X509_STORE *store_ctx; /* who owns us */ +}; + +/* + * This is used to hold everything. It is used for all certificate + * validation. Once we have a certificate chain, the 'verify' function is + * then called to actually check the cert chain. + */ +struct x509_store_st { + /* The following is a cache of trusted certs */ + int cache; /* if true, stash any hits */ + STACK_OF(X509_OBJECT) *objs; /* Cache of all objects */ + /* These are external lookup methods */ + STACK_OF(X509_LOOKUP) *get_cert_methods; + X509_VERIFY_PARAM *param; + /* Callbacks for various operations */ + /* called to verify a certificate */ + int (*verify) (X509_STORE_CTX *ctx); + /* error callback */ + int (*verify_cb) (int ok, X509_STORE_CTX *ctx); + /* get issuers cert from ctx */ + int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x); + /* check issued */ + int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer); + /* Check revocation status of chain */ + int (*check_revocation) (X509_STORE_CTX *ctx); + /* retrieve CRL */ + int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x); + /* Check CRL validity */ + int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl); + /* Check certificate against CRL */ + int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x); + /* Check policy status of the chain */ + int (*check_policy) (X509_STORE_CTX *ctx); + STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm); + STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm); + int (*cleanup) (X509_STORE_CTX *ctx); + CRYPTO_EX_DATA ex_data; + CRYPTO_REF_COUNT references; + CRYPTO_RWLOCK *lock; +}; + +typedef struct lookup_dir_hashes_st BY_DIR_HASH; +typedef struct lookup_dir_entry_st BY_DIR_ENTRY; +DEFINE_STACK_OF(BY_DIR_HASH) +DEFINE_STACK_OF(BY_DIR_ENTRY) +typedef STACK_OF(X509_NAME_ENTRY) STACK_OF_X509_NAME_ENTRY; +DEFINE_STACK_OF(STACK_OF_X509_NAME_ENTRY) + +void x509_set_signature_info(X509_SIG_INFO *siginf, const X509_ALGOR *alg, + const ASN1_STRING *sig); int x509_likely_issued(X509 *issuer, X509 *subject); int x509_signing_allowed(const X509 *issuer, const X509 *subject); diff --git a/contrib/libs/openssl/crypto/x509/x509_lu.c b/contrib/libs/openssl/crypto/x509/x509_lu.c index bbb51cc195..641a41c35c 100644 --- a/contrib/libs/openssl/crypto/x509/x509_lu.c +++ b/contrib/libs/openssl/crypto/x509/x509_lu.c @@ -11,9 +11,9 @@ #include "internal/cryptlib.h" #include "internal/refcount.h" #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/x509v3.h> -#include "x509_local.h" +#include "x509_local.h" X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method) { diff --git a/contrib/libs/openssl/crypto/x509/x509_meth.c b/contrib/libs/openssl/crypto/x509/x509_meth.c index 0a736a96c9..9348cc8eb7 100644 --- a/contrib/libs/openssl/crypto/x509/x509_meth.c +++ b/contrib/libs/openssl/crypto/x509/x509_meth.c @@ -15,7 +15,7 @@ #include <openssl/asn1.h> #include <openssl/x509.h> #include <openssl/ossl_typ.h> -#include "x509_local.h" +#include "x509_local.h" X509_LOOKUP_METHOD *X509_LOOKUP_meth_new(const char *name) { diff --git a/contrib/libs/openssl/crypto/x509/x509_obj.c b/contrib/libs/openssl/crypto/x509/x509_obj.c index af12404092..f54d483cc4 100644 --- a/contrib/libs/openssl/crypto/x509/x509_obj.c +++ b/contrib/libs/openssl/crypto/x509/x509_obj.c @@ -12,7 +12,7 @@ #include <openssl/objects.h> #include <openssl/x509.h> #include <openssl/buffer.h> -#include "crypto/x509.h" +#include "crypto/x509.h" /* * Limit to ensure we don't overflow: much greater than diff --git a/contrib/libs/openssl/crypto/x509/x509_r2x.c b/contrib/libs/openssl/crypto/x509/x509_r2x.c index 6f5f2f8bce..6b1623feac 100644 --- a/contrib/libs/openssl/crypto/x509/x509_r2x.c +++ b/contrib/libs/openssl/crypto/x509/x509_r2x.c @@ -13,7 +13,7 @@ #include <openssl/evp.h> #include <openssl/asn1.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/objects.h> #include <openssl/buffer.h> diff --git a/contrib/libs/openssl/crypto/x509/x509_req.c b/contrib/libs/openssl/crypto/x509/x509_req.c index d2614a7f51..dd674926dd 100644 --- a/contrib/libs/openssl/crypto/x509/x509_req.c +++ b/contrib/libs/openssl/crypto/x509/x509_req.c @@ -14,7 +14,7 @@ #include <openssl/asn1.h> #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/objects.h> #include <openssl/buffer.h> #include <openssl/pem.h> diff --git a/contrib/libs/openssl/crypto/x509/x509_set.c b/contrib/libs/openssl/crypto/x509/x509_set.c index d46b4ef175..164b4e2be1 100644 --- a/contrib/libs/openssl/crypto/x509/x509_set.c +++ b/contrib/libs/openssl/crypto/x509/x509_set.c @@ -15,9 +15,9 @@ #include <openssl/evp.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "crypto/asn1.h" -#include "crypto/x509.h" -#include "x509_local.h" +#include "crypto/asn1.h" +#include "crypto/x509.h" +#include "x509_local.h" int X509_set_version(X509 *x, long version) { diff --git a/contrib/libs/openssl/crypto/x509/x509_trs.c b/contrib/libs/openssl/crypto/x509/x509_trs.c index a00ce5d809..a10d437735 100644 --- a/contrib/libs/openssl/crypto/x509/x509_trs.c +++ b/contrib/libs/openssl/crypto/x509/x509_trs.c @@ -1,5 +1,5 @@ /* - * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1999-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -10,7 +10,7 @@ #include <stdio.h> #include "internal/cryptlib.h" #include <openssl/x509v3.h> -#include "crypto/x509.h" +#include "crypto/x509.h" static int tr_cmp(const X509_TRUST *const *a, const X509_TRUST *const *b); static void trtable_free(X509_TRUST *p); @@ -240,9 +240,9 @@ static int trust_1oid(X509_TRUST *trust, X509 *x, int flags) static int trust_compat(X509_TRUST *trust, X509 *x, int flags) { /* Call for side-effect of computing hash and caching extensions */ - if (X509_check_purpose(x, -1, 0) != 1) - return X509_TRUST_UNTRUSTED; - if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS)) + if (X509_check_purpose(x, -1, 0) != 1) + return X509_TRUST_UNTRUSTED; + if ((flags & X509_TRUST_NO_SS_COMPAT) == 0 && (x->ex_flags & EXFLAG_SS)) return X509_TRUST_TRUSTED; else return X509_TRUST_UNTRUSTED; diff --git a/contrib/libs/openssl/crypto/x509/x509_v3.c b/contrib/libs/openssl/crypto/x509/x509_v3.c index 24f09f0644..c787602330 100644 --- a/contrib/libs/openssl/crypto/x509/x509_v3.c +++ b/contrib/libs/openssl/crypto/x509/x509_v3.c @@ -15,7 +15,7 @@ #include <openssl/evp.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "x509_local.h" +#include "x509_local.h" int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x) { diff --git a/contrib/libs/openssl/crypto/x509/x509_vfy.c b/contrib/libs/openssl/crypto/x509/x509_vfy.c index 856dcc529a..20a36e763c 100644 --- a/contrib/libs/openssl/crypto/x509/x509_vfy.c +++ b/contrib/libs/openssl/crypto/x509/x509_vfy.c @@ -12,7 +12,7 @@ #include <errno.h> #include <limits.h> -#include "crypto/ctype.h" +#include "crypto/ctype.h" #include "internal/cryptlib.h" #include <openssl/crypto.h> #include <openssl/buffer.h> @@ -22,8 +22,8 @@ #include <openssl/x509v3.h> #include <openssl/objects.h> #include "internal/dane.h" -#include "crypto/x509.h" -#include "x509_local.h" +#include "crypto/x509.h" +#include "x509_local.h" /* CRL score values */ @@ -113,8 +113,8 @@ static int null_callback(int ok, X509_STORE_CTX *e) */ static int cert_self_signed(X509 *x) { - if (X509_check_purpose(x, -1, 0) != 1) - return 0; + if (X509_check_purpose(x, -1, 0) != 1) + return 0; if (x->ex_flags & EXFLAG_SS) return 1; else @@ -537,11 +537,11 @@ static int check_chain_extensions(X509_STORE_CTX *ctx) } if (ret > 0 && (x->ex_flags & EXFLAG_CA) == 0 - && x->ex_pathlen != -1 - && (ctx->param->flags & X509_V_FLAG_X509_STRICT)) { - ctx->error = X509_V_ERR_INVALID_EXTENSION; - ret = 0; - } + && x->ex_pathlen != -1 + && (ctx->param->flags & X509_V_FLAG_X509_STRICT)) { + ctx->error = X509_V_ERR_INVALID_EXTENSION; + ret = 0; + } if (ret == 0 && !verify_cb_cert(ctx, x, i, X509_V_OK)) return 0; /* check_purpose() makes the callback as needed */ diff --git a/contrib/libs/openssl/crypto/x509/x509_vpm.c b/contrib/libs/openssl/crypto/x509/x509_vpm.c index 551edfdee9..535f169a29 100644 --- a/contrib/libs/openssl/crypto/x509/x509_vpm.c +++ b/contrib/libs/openssl/crypto/x509/x509_vpm.c @@ -14,9 +14,9 @@ #include <openssl/buffer.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "crypto/x509.h" +#include "crypto/x509.h" -#include "x509_local.h" +#include "x509_local.h" /* X509_VERIFY_PARAM functions */ diff --git a/contrib/libs/openssl/crypto/x509/x509cset.c b/contrib/libs/openssl/crypto/x509/x509cset.c index 613a126514..6c08509138 100644 --- a/contrib/libs/openssl/crypto/x509/x509cset.c +++ b/contrib/libs/openssl/crypto/x509/x509cset.c @@ -14,7 +14,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" int X509_CRL_set_version(X509_CRL *x, long version) { diff --git a/contrib/libs/openssl/crypto/x509/x509name.c b/contrib/libs/openssl/crypto/x509/x509name.c index 2b1dea6235..c86d8e7914 100644 --- a/contrib/libs/openssl/crypto/x509/x509name.c +++ b/contrib/libs/openssl/crypto/x509/x509name.c @@ -14,7 +14,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len) { diff --git a/contrib/libs/openssl/crypto/x509/x509rset.c b/contrib/libs/openssl/crypto/x509/x509rset.c index 98c4186944..9da3f2ee27 100644 --- a/contrib/libs/openssl/crypto/x509/x509rset.c +++ b/contrib/libs/openssl/crypto/x509/x509rset.c @@ -13,7 +13,7 @@ #include <openssl/objects.h> #include <openssl/evp.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" int X509_REQ_set_version(X509_REQ *x, long version) { diff --git a/contrib/libs/openssl/crypto/x509/x_all.c b/contrib/libs/openssl/crypto/x509/x_all.c index 04c34cfffb..a4e9cdaee8 100644 --- a/contrib/libs/openssl/crypto/x509/x_all.c +++ b/contrib/libs/openssl/crypto/x509/x_all.c @@ -13,7 +13,7 @@ #include <openssl/asn1.h> #include <openssl/evp.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/ocsp.h> #include <openssl/rsa.h> #include <openssl/dsa.h> @@ -362,7 +362,7 @@ int X509_pubkey_digest(const X509 *data, const EVP_MD *type, int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { - if (type == EVP_sha1() && (data->ex_flags & EXFLAG_SET) != 0 + if (type == EVP_sha1() && (data->ex_flags & EXFLAG_SET) != 0 && (data->ex_flags & EXFLAG_NO_FINGERPRINT) == 0) { /* Asking for SHA1 and we already computed it. */ if (len != NULL) @@ -377,8 +377,8 @@ int X509_digest(const X509 *data, const EVP_MD *type, unsigned char *md, int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type, unsigned char *md, unsigned int *len) { - if (type == EVP_sha1() && (data->flags & EXFLAG_SET) != 0 - && (data->flags & EXFLAG_INVALID) == 0) { + if (type == EVP_sha1() && (data->flags & EXFLAG_SET) != 0 + && (data->flags & EXFLAG_INVALID) == 0) { /* Asking for SHA1; always computed in CRL d2i. */ if (len != NULL) *len = sizeof(data->sha1_hash); diff --git a/contrib/libs/openssl/crypto/x509/x_attrib.c b/contrib/libs/openssl/crypto/x509/x_attrib.c index c260d7dbb3..7342c4f6bc 100644 --- a/contrib/libs/openssl/crypto/x509/x_attrib.c +++ b/contrib/libs/openssl/crypto/x509/x_attrib.c @@ -12,7 +12,7 @@ #include <openssl/objects.h> #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "x509_local.h" +#include "x509_local.h" /*- * X509_ATTRIBUTE: this has the following form: diff --git a/contrib/libs/openssl/crypto/x509/x_crl.c b/contrib/libs/openssl/crypto/x509/x_crl.c index 10c0345d4e..c9762f9e23 100644 --- a/contrib/libs/openssl/crypto/x509/x_crl.c +++ b/contrib/libs/openssl/crypto/x509/x_crl.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the OpenSSL license (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -11,13 +11,13 @@ #include "internal/cryptlib.h" #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" #include <openssl/x509v3.h> -#include "x509_local.h" +#include "x509_local.h" static int X509_REVOKED_cmp(const X509_REVOKED *const *a, const X509_REVOKED *const *b); -static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); +static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp); ASN1_SEQUENCE(X509_REVOKED) = { ASN1_EMBED(X509_REVOKED,serialNumber, ASN1_INTEGER), @@ -155,7 +155,7 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, X509_CRL *crl = (X509_CRL *)*pval; STACK_OF(X509_EXTENSION) *exts; X509_EXTENSION *ext; - int idx, i; + int idx, i; switch (operation) { case ASN1_OP_D2I_PRE: @@ -184,35 +184,35 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, break; case ASN1_OP_D2I_POST: - if (!X509_CRL_digest(crl, EVP_sha1(), crl->sha1_hash, NULL)) - crl->flags |= EXFLAG_INVALID; + if (!X509_CRL_digest(crl, EVP_sha1(), crl->sha1_hash, NULL)) + crl->flags |= EXFLAG_INVALID; crl->idp = X509_CRL_get_ext_d2i(crl, - NID_issuing_distribution_point, &i, + NID_issuing_distribution_point, &i, NULL); - if (crl->idp != NULL) { - if (!setup_idp(crl, crl->idp)) - crl->flags |= EXFLAG_INVALID; - } - else if (i != -1) { - crl->flags |= EXFLAG_INVALID; - } + if (crl->idp != NULL) { + if (!setup_idp(crl, crl->idp)) + crl->flags |= EXFLAG_INVALID; + } + else if (i != -1) { + crl->flags |= EXFLAG_INVALID; + } crl->akid = X509_CRL_get_ext_d2i(crl, - NID_authority_key_identifier, &i, + NID_authority_key_identifier, &i, NULL); - if (crl->akid == NULL && i != -1) - crl->flags |= EXFLAG_INVALID; + if (crl->akid == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; crl->crl_number = X509_CRL_get_ext_d2i(crl, - NID_crl_number, &i, NULL); - if (crl->crl_number == NULL && i != -1) - crl->flags |= EXFLAG_INVALID; + NID_crl_number, &i, NULL); + if (crl->crl_number == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; crl->base_crl_number = X509_CRL_get_ext_d2i(crl, - NID_delta_crl, &i, + NID_delta_crl, &i, NULL); - if (crl->base_crl_number == NULL && i != -1) - crl->flags |= EXFLAG_INVALID; + if (crl->base_crl_number == NULL && i != -1) + crl->flags |= EXFLAG_INVALID; /* Delta CRLs must have CRL number */ if (crl->base_crl_number && !crl->crl_number) crl->flags |= EXFLAG_INVALID; @@ -271,10 +271,10 @@ static int crl_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, /* Convert IDP into a more convenient form */ -static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) +static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) { int idp_only = 0; - + /* Set various flags according to IDP */ crl->idp_flags |= IDP_PRESENT; if (idp->onlyuser > 0) { @@ -305,7 +305,7 @@ static int setup_idp(X509_CRL *crl, ISSUING_DIST_POINT *idp) crl->idp_reasons &= CRLDP_ALL_REASONS; } - return DIST_POINT_set_dpname(idp->distpoint, X509_CRL_get_issuer(crl)); + return DIST_POINT_set_dpname(idp->distpoint, X509_CRL_get_issuer(crl)); } ASN1_SEQUENCE_ref(X509_CRL, crl_cb) = { diff --git a/contrib/libs/openssl/crypto/x509/x_exten.c b/contrib/libs/openssl/crypto/x509/x_exten.c index ab91326768..bd7518ef12 100644 --- a/contrib/libs/openssl/crypto/x509/x_exten.c +++ b/contrib/libs/openssl/crypto/x509/x_exten.c @@ -11,7 +11,7 @@ #include <openssl/x509.h> #include <openssl/asn1.h> #include <openssl/asn1t.h> -#include "x509_local.h" +#include "x509_local.h" ASN1_SEQUENCE(X509_EXTENSION) = { ASN1_SIMPLE(X509_EXTENSION, object, ASN1_OBJECT), diff --git a/contrib/libs/openssl/crypto/x509/x_name.c b/contrib/libs/openssl/crypto/x509/x_name.c index c34c78d840..aa7f4722b6 100644 --- a/contrib/libs/openssl/crypto/x509/x_name.c +++ b/contrib/libs/openssl/crypto/x509/x_name.c @@ -8,13 +8,13 @@ */ #include <stdio.h> -#include "crypto/ctype.h" +#include "crypto/ctype.h" #include "internal/cryptlib.h" #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/x509.h" -#include "crypto/asn1.h" -#include "x509_local.h" +#include "crypto/x509.h" +#include "crypto/asn1.h" +#include "x509_local.h" /* * Maximum length of X509_NAME: much larger than anything we should diff --git a/contrib/libs/openssl/crypto/x509/x_pubkey.c b/contrib/libs/openssl/crypto/x509/x_pubkey.c index 6067505133..9be7e92865 100644 --- a/contrib/libs/openssl/crypto/x509/x_pubkey.c +++ b/contrib/libs/openssl/crypto/x509/x_pubkey.c @@ -11,9 +11,9 @@ #include "internal/cryptlib.h" #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/asn1.h" -#include "crypto/evp.h" -#include "crypto/x509.h" +#include "crypto/asn1.h" +#include "crypto/evp.h" +#include "crypto/x509.h" #include <openssl/rsa.h> #include <openssl/dsa.h> diff --git a/contrib/libs/openssl/crypto/x509/x_req.c b/contrib/libs/openssl/crypto/x509/x_req.c index 25031031cf..d2b02f6dae 100644 --- a/contrib/libs/openssl/crypto/x509/x_req.c +++ b/contrib/libs/openssl/crypto/x509/x_req.c @@ -11,7 +11,7 @@ #include "internal/cryptlib.h" #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" /*- * X509_REQ_INFO is handled in an unusual way to get round diff --git a/contrib/libs/openssl/crypto/x509/x_x509.c b/contrib/libs/openssl/crypto/x509/x_x509.c index c15d53368c..7aa8b77ae7 100644 --- a/contrib/libs/openssl/crypto/x509/x_x509.c +++ b/contrib/libs/openssl/crypto/x509/x_x509.c @@ -13,7 +13,7 @@ #include <openssl/asn1t.h> #include <openssl/x509.h> #include <openssl/x509v3.h> -#include "crypto/x509.h" +#include "crypto/x509.h" ASN1_SEQUENCE_enc(X509_CINF, enc, 0) = { ASN1_EXP_OPT(X509_CINF, version, ASN1_INTEGER, 0), diff --git a/contrib/libs/openssl/crypto/x509/x_x509a.c b/contrib/libs/openssl/crypto/x509/x_x509a.c index 319f016268..c5175faef7 100644 --- a/contrib/libs/openssl/crypto/x509/x_x509a.c +++ b/contrib/libs/openssl/crypto/x509/x_x509a.c @@ -12,7 +12,7 @@ #include <openssl/evp.h> #include <openssl/asn1t.h> #include <openssl/x509.h> -#include "crypto/x509.h" +#include "crypto/x509.h" /* * X509_CERT_AUX routines. These are used to encode additional user |