123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291 |
- #include "internal/refcount.h"
- #include <openssl/x509.h>
- #include <openssl/conf.h>
- struct X509_name_entry_st {
- ASN1_OBJECT *object;
- ASN1_STRING *value;
- int set;
- int size;
- };
- struct X509_name_st {
- STACK_OF(X509_NAME_ENTRY) *entries;
- int modified;
- BUF_MEM *bytes;
-
- unsigned char *canon_enc;
- int canon_enclen;
- } ;
- struct x509_sig_info_st {
-
- int mdnid;
-
- int pknid;
-
- int secbits;
-
- uint32_t flags;
- };
- struct X509_req_info_st {
- ASN1_ENCODING enc;
- ASN1_INTEGER *version;
- X509_NAME *subject;
- X509_PUBKEY *pubkey;
-
- STACK_OF(X509_ATTRIBUTE) *attributes;
- };
- struct X509_req_st {
- X509_REQ_INFO req_info;
- X509_ALGOR sig_alg;
- ASN1_BIT_STRING *signature;
- CRYPTO_REF_COUNT references;
- CRYPTO_RWLOCK *lock;
- };
- struct X509_crl_info_st {
- ASN1_INTEGER *version;
- X509_ALGOR sig_alg;
- X509_NAME *issuer;
- ASN1_TIME *lastUpdate;
- ASN1_TIME *nextUpdate;
- STACK_OF(X509_REVOKED) *revoked;
- STACK_OF(X509_EXTENSION) *extensions;
- ASN1_ENCODING enc;
- };
- struct X509_crl_st {
- X509_CRL_INFO crl;
- X509_ALGOR sig_alg;
- ASN1_BIT_STRING signature;
- CRYPTO_REF_COUNT references;
- int flags;
-
- AUTHORITY_KEYID *akid;
- ISSUING_DIST_POINT *idp;
-
- int idp_flags;
- int idp_reasons;
-
- ASN1_INTEGER *crl_number;
- ASN1_INTEGER *base_crl_number;
- STACK_OF(GENERAL_NAMES) *issuers;
-
- unsigned char sha1_hash[SHA_DIGEST_LENGTH];
-
- const X509_CRL_METHOD *meth;
- void *meth_data;
- CRYPTO_RWLOCK *lock;
- };
- struct x509_revoked_st {
- ASN1_INTEGER serialNumber;
- ASN1_TIME *revocationDate;
- STACK_OF(X509_EXTENSION) *extensions;
-
- STACK_OF(GENERAL_NAME) *issuer;
-
- int reason;
-
- int sequence;
- };
- struct x509_cert_aux_st {
- STACK_OF(ASN1_OBJECT) *trust;
- STACK_OF(ASN1_OBJECT) *reject;
- ASN1_UTF8STRING *alias;
- ASN1_OCTET_STRING *keyid;
- STACK_OF(X509_ALGOR) *other;
- };
- struct x509_cinf_st {
- ASN1_INTEGER *version;
- ASN1_INTEGER serialNumber;
- X509_ALGOR signature;
- X509_NAME *issuer;
- X509_VAL validity;
- X509_NAME *subject;
- X509_PUBKEY *key;
- ASN1_BIT_STRING *issuerUID;
- ASN1_BIT_STRING *subjectUID;
- STACK_OF(X509_EXTENSION) *extensions;
- ASN1_ENCODING enc;
- };
- struct x509_st {
- X509_CINF cert_info;
- X509_ALGOR sig_alg;
- ASN1_BIT_STRING signature;
- X509_SIG_INFO siginf;
- CRYPTO_REF_COUNT references;
- CRYPTO_EX_DATA ex_data;
-
- long ex_pathlen;
- long ex_pcpathlen;
- uint32_t ex_flags;
- uint32_t ex_kusage;
- uint32_t ex_xkusage;
- uint32_t ex_nscert;
- ASN1_OCTET_STRING *skid;
- AUTHORITY_KEYID *akid;
- X509_POLICY_CACHE *policy_cache;
- STACK_OF(DIST_POINT) *crldp;
- STACK_OF(GENERAL_NAME) *altname;
- NAME_CONSTRAINTS *nc;
- #ifndef OPENSSL_NO_RFC3779
- STACK_OF(IPAddressFamily) *rfc3779_addr;
- struct ASIdentifiers_st *rfc3779_asid;
- # endif
- unsigned char sha1_hash[SHA_DIGEST_LENGTH];
- X509_CERT_AUX *aux;
- CRYPTO_RWLOCK *lock;
- volatile int ex_cached;
- } ;
- struct x509_store_ctx_st {
- X509_STORE *ctx;
-
-
- X509 *cert;
-
- STACK_OF(X509) *untrusted;
-
- STACK_OF(X509_CRL) *crls;
- X509_VERIFY_PARAM *param;
-
- void *other_ctx;
-
-
- int (*verify) (X509_STORE_CTX *ctx);
-
- int (*verify_cb) (int ok, X509_STORE_CTX *ctx);
-
- int (*get_issuer) (X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
-
- int (*check_issued) (X509_STORE_CTX *ctx, X509 *x, X509 *issuer);
-
- int (*check_revocation) (X509_STORE_CTX *ctx);
-
- int (*get_crl) (X509_STORE_CTX *ctx, X509_CRL **crl, X509 *x);
-
- int (*check_crl) (X509_STORE_CTX *ctx, X509_CRL *crl);
-
- int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
-
- 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);
-
-
- int valid;
-
- int num_untrusted;
-
- STACK_OF(X509) *chain;
-
- X509_POLICY_TREE *tree;
-
- int explicit_policy;
-
- int error_depth;
- int error;
- X509 *current_cert;
-
- X509 *current_issuer;
-
- X509_CRL *current_crl;
-
- int current_crl_score;
-
- unsigned int current_reasons;
-
- X509_STORE_CTX *parent;
- CRYPTO_EX_DATA ex_data;
- SSL_DANE *dane;
-
- int bare_ta_signed;
- };
- struct pkcs8_priv_key_info_st {
- ASN1_INTEGER *version;
- X509_ALGOR *pkeyalg;
- ASN1_OCTET_STRING *pkey;
- STACK_OF(X509_ATTRIBUTE) *attributes;
- };
- struct X509_sig_st {
- X509_ALGOR *algor;
- ASN1_OCTET_STRING *digest;
- };
- struct x509_object_st {
-
- X509_LOOKUP_TYPE type;
- union {
- char *ptr;
- X509 *x509;
- X509_CRL *crl;
- EVP_PKEY *pkey;
- } data;
- };
- int a2i_ipadd(unsigned char *ipout, const char *ipasc);
- int x509_set1_time(ASN1_TIME **ptm, const ASN1_TIME *tm);
- void x509_init_sig_info(X509 *x);
- int x509v3_add_len_value_uchar(const char *name, const unsigned char *value,
- size_t vallen, STACK_OF(CONF_VALUE) **extlist);
|