diff options
Diffstat (limited to 'src/lib/libcrypto/x509/x509.h')
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 140 |
1 files changed, 22 insertions, 118 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index e71b5257e5..e8c1a59cf2 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -55,16 +55,10 @@ | |||
55 | * copied and put under another distribution licence | 55 | * copied and put under another distribution licence |
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | /* ==================================================================== | ||
59 | * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. | ||
60 | * ECDH support in OpenSSL originally developed by | ||
61 | * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. | ||
62 | */ | ||
63 | 58 | ||
64 | #ifndef HEADER_X509_H | 59 | #ifndef HEADER_X509_H |
65 | #define HEADER_X509_H | 60 | #define HEADER_X509_H |
66 | 61 | ||
67 | #include <openssl/e_os2.h> | ||
68 | #include <openssl/symhacks.h> | 62 | #include <openssl/symhacks.h> |
69 | #ifndef OPENSSL_NO_BUFFER | 63 | #ifndef OPENSSL_NO_BUFFER |
70 | #include <openssl/buffer.h> | 64 | #include <openssl/buffer.h> |
@@ -79,33 +73,21 @@ | |||
79 | #include <openssl/asn1.h> | 73 | #include <openssl/asn1.h> |
80 | #include <openssl/safestack.h> | 74 | #include <openssl/safestack.h> |
81 | 75 | ||
82 | #ifndef OPENSSL_NO_EC | ||
83 | #include <openssl/ec.h> | ||
84 | #endif | ||
85 | |||
86 | #ifndef OPENSSL_NO_ECDSA | ||
87 | #include <openssl/ecdsa.h> | ||
88 | #endif | ||
89 | |||
90 | #ifndef OPENSSL_NO_ECDH | ||
91 | #include <openssl/ecdh.h> | ||
92 | #endif | ||
93 | |||
94 | #ifndef OPENSSL_NO_DEPRECATED | ||
95 | #ifndef OPENSSL_NO_RSA | 76 | #ifndef OPENSSL_NO_RSA |
96 | #include <openssl/rsa.h> | 77 | #include <openssl/rsa.h> |
97 | #endif | 78 | #endif |
79 | |||
98 | #ifndef OPENSSL_NO_DSA | 80 | #ifndef OPENSSL_NO_DSA |
99 | #include <openssl/dsa.h> | 81 | #include <openssl/dsa.h> |
100 | #endif | 82 | #endif |
83 | |||
101 | #ifndef OPENSSL_NO_DH | 84 | #ifndef OPENSSL_NO_DH |
102 | #include <openssl/dh.h> | 85 | #include <openssl/dh.h> |
103 | #endif | 86 | #endif |
104 | #endif | ||
105 | |||
106 | #ifndef OPENSSL_NO_SHA | 87 | #ifndef OPENSSL_NO_SHA |
107 | #include <openssl/sha.h> | 88 | #include <openssl/sha.h> |
108 | #endif | 89 | #endif |
90 | #include <openssl/e_os2.h> | ||
109 | #include <openssl/ossl_typ.h> | 91 | #include <openssl/ossl_typ.h> |
110 | 92 | ||
111 | #ifdef __cplusplus | 93 | #ifdef __cplusplus |
@@ -113,9 +95,8 @@ extern "C" { | |||
113 | #endif | 95 | #endif |
114 | 96 | ||
115 | #ifdef OPENSSL_SYS_WIN32 | 97 | #ifdef OPENSSL_SYS_WIN32 |
116 | /* Under Win32 these are defined in wincrypt.h */ | 98 | /* Under Win32 this is defined in wincrypt.h */ |
117 | #undef X509_NAME | 99 | #undef X509_NAME |
118 | #undef X509_CERT_PAIR | ||
119 | #endif | 100 | #endif |
120 | 101 | ||
121 | #define X509_FILETYPE_PEM 1 | 102 | #define X509_FILETYPE_PEM 1 |
@@ -136,8 +117,8 @@ extern "C" { | |||
136 | typedef struct X509_objects_st | 117 | typedef struct X509_objects_st |
137 | { | 118 | { |
138 | int nid; | 119 | int nid; |
139 | int (*a2i)(void); | 120 | int (*a2i)(); |
140 | int (*i2a)(void); | 121 | int (*i2a)(); |
141 | } X509_OBJECTS; | 122 | } X509_OBJECTS; |
142 | 123 | ||
143 | struct X509_algor_st | 124 | struct X509_algor_st |
@@ -146,10 +127,9 @@ struct X509_algor_st | |||
146 | ASN1_TYPE *parameter; | 127 | ASN1_TYPE *parameter; |
147 | } /* X509_ALGOR */; | 128 | } /* X509_ALGOR */; |
148 | 129 | ||
130 | DECLARE_STACK_OF(X509_ALGOR) | ||
149 | DECLARE_ASN1_SET_OF(X509_ALGOR) | 131 | DECLARE_ASN1_SET_OF(X509_ALGOR) |
150 | 132 | ||
151 | typedef STACK_OF(X509_ALGOR) X509_ALGORS; | ||
152 | |||
153 | typedef struct X509_val_st | 133 | typedef struct X509_val_st |
154 | { | 134 | { |
155 | ASN1_TIME *notBefore; | 135 | ASN1_TIME *notBefore; |
@@ -204,8 +184,6 @@ typedef struct X509_extension_st | |||
204 | ASN1_OCTET_STRING *value; | 184 | ASN1_OCTET_STRING *value; |
205 | } X509_EXTENSION; | 185 | } X509_EXTENSION; |
206 | 186 | ||
207 | typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS; | ||
208 | |||
209 | DECLARE_STACK_OF(X509_EXTENSION) | 187 | DECLARE_STACK_OF(X509_EXTENSION) |
210 | DECLARE_ASN1_SET_OF(X509_EXTENSION) | 188 | DECLARE_ASN1_SET_OF(X509_EXTENSION) |
211 | 189 | ||
@@ -283,18 +261,12 @@ struct x509_st | |||
283 | CRYPTO_EX_DATA ex_data; | 261 | CRYPTO_EX_DATA ex_data; |
284 | /* These contain copies of various extension values */ | 262 | /* These contain copies of various extension values */ |
285 | long ex_pathlen; | 263 | long ex_pathlen; |
286 | long ex_pcpathlen; | ||
287 | unsigned long ex_flags; | 264 | unsigned long ex_flags; |
288 | unsigned long ex_kusage; | 265 | unsigned long ex_kusage; |
289 | unsigned long ex_xkusage; | 266 | unsigned long ex_xkusage; |
290 | unsigned long ex_nscert; | 267 | unsigned long ex_nscert; |
291 | ASN1_OCTET_STRING *skid; | 268 | ASN1_OCTET_STRING *skid; |
292 | struct AUTHORITY_KEYID_st *akid; | 269 | struct AUTHORITY_KEYID_st *akid; |
293 | X509_POLICY_CACHE *policy_cache; | ||
294 | #ifndef OPENSSL_NO_RFC3779 | ||
295 | STACK_OF(IPAddressFamily) *rfc3779_addr; | ||
296 | struct ASIdentifiers_st *rfc3779_asid; | ||
297 | #endif | ||
298 | #ifndef OPENSSL_NO_SHA | 270 | #ifndef OPENSSL_NO_SHA |
299 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; | 271 | unsigned char sha1_hash[SHA_DIGEST_LENGTH]; |
300 | #endif | 272 | #endif |
@@ -317,11 +289,6 @@ typedef struct x509_trust_st { | |||
317 | 289 | ||
318 | DECLARE_STACK_OF(X509_TRUST) | 290 | DECLARE_STACK_OF(X509_TRUST) |
319 | 291 | ||
320 | typedef struct x509_cert_pair_st { | ||
321 | X509 *forward; | ||
322 | X509 *reverse; | ||
323 | } X509_CERT_PAIR; | ||
324 | |||
325 | /* standard trust ids */ | 292 | /* standard trust ids */ |
326 | 293 | ||
327 | #define X509_TRUST_DEFAULT -1 /* Only valid in purpose settings */ | 294 | #define X509_TRUST_DEFAULT -1 /* Only valid in purpose settings */ |
@@ -688,17 +655,6 @@ extern "C" { | |||
688 | #define i2d_DSAPrivateKey_bio(bp,dsa) ASN1_i2d_bio(i2d_DSAPrivateKey,bp, \ | 655 | #define i2d_DSAPrivateKey_bio(bp,dsa) ASN1_i2d_bio(i2d_DSAPrivateKey,bp, \ |
689 | (unsigned char *)dsa) | 656 | (unsigned char *)dsa) |
690 | 657 | ||
691 | #define d2i_ECPrivateKey_fp(fp,ecdsa) (EC_KEY *)ASN1_d2i_fp((char *(*)())\ | ||
692 | EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (fp), \ | ||
693 | (unsigned char **)(ecdsa)) | ||
694 | #define i2d_ECPrivateKey_fp(fp,ecdsa) ASN1_i2d_fp(i2d_ECPrivateKey,fp, \ | ||
695 | (unsigned char *)ecdsa) | ||
696 | #define d2i_ECPrivateKey_bio(bp,ecdsa) (EC_KEY *)ASN1_d2i_bio((char *(*)())\ | ||
697 | EC_KEY_new,(char *(*)())d2i_ECPrivateKey, (bp), \ | ||
698 | (unsigned char **)(ecdsa)) | ||
699 | #define i2d_ECPrivateKey_bio(bp,ecdsa) ASN1_i2d_bio(i2d_ECPrivateKey,bp, \ | ||
700 | (unsigned char *)ecdsa) | ||
701 | |||
702 | #define X509_ALGOR_dup(xn) (X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR,\ | 658 | #define X509_ALGOR_dup(xn) (X509_ALGOR *)ASN1_dup((int (*)())i2d_X509_ALGOR,\ |
703 | (char *(*)())d2i_X509_ALGOR,(char *)xn) | 659 | (char *(*)())d2i_X509_ALGOR,(char *)xn) |
704 | 660 | ||
@@ -802,12 +758,6 @@ int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa); | |||
802 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); | 758 | DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); |
803 | int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); | 759 | int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); |
804 | #endif | 760 | #endif |
805 | #ifndef OPENSSL_NO_EC | ||
806 | EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey); | ||
807 | int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey); | ||
808 | EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey); | ||
809 | int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey); | ||
810 | #endif | ||
811 | X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); | 761 | X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); |
812 | int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); | 762 | int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); |
813 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, | 763 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, |
@@ -841,12 +791,6 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa); | |||
841 | DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); | 791 | DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); |
842 | int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); | 792 | int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); |
843 | #endif | 793 | #endif |
844 | #ifndef OPENSSL_NO_EC | ||
845 | EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey); | ||
846 | int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey); | ||
847 | EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey); | ||
848 | int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey); | ||
849 | #endif | ||
850 | X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); | 794 | X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); |
851 | int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); | 795 | int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); |
852 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, | 796 | PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, |
@@ -865,10 +809,6 @@ X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex); | |||
865 | X509_CRL *X509_CRL_dup(X509_CRL *crl); | 809 | X509_CRL *X509_CRL_dup(X509_CRL *crl); |
866 | X509_REQ *X509_REQ_dup(X509_REQ *req); | 810 | X509_REQ *X509_REQ_dup(X509_REQ *req); |
867 | X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); | 811 | X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); |
868 | int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval); | ||
869 | void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval, | ||
870 | X509_ALGOR *algor); | ||
871 | |||
872 | X509_NAME *X509_NAME_dup(X509_NAME *xn); | 812 | X509_NAME *X509_NAME_dup(X509_NAME *xn); |
873 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); | 813 | X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); |
874 | 814 | ||
@@ -890,7 +830,6 @@ X509_REQ * X509_to_X509_REQ(X509 *x, EVP_PKEY *pkey, const EVP_MD *md); | |||
890 | X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); | 830 | X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); |
891 | 831 | ||
892 | DECLARE_ASN1_FUNCTIONS(X509_ALGOR) | 832 | DECLARE_ASN1_FUNCTIONS(X509_ALGOR) |
893 | DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS) | ||
894 | DECLARE_ASN1_FUNCTIONS(X509_VAL) | 833 | DECLARE_ASN1_FUNCTIONS(X509_VAL) |
895 | 834 | ||
896 | DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) | 835 | DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) |
@@ -900,21 +839,16 @@ EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key); | |||
900 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, | 839 | int X509_get_pubkey_parameters(EVP_PKEY *pkey, |
901 | STACK_OF(X509) *chain); | 840 | STACK_OF(X509) *chain); |
902 | int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); | 841 | int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); |
903 | EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,const unsigned char **pp, | 842 | EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,unsigned char **pp, |
904 | long length); | 843 | long length); |
905 | #ifndef OPENSSL_NO_RSA | 844 | #ifndef OPENSSL_NO_RSA |
906 | int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); | 845 | int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); |
907 | RSA * d2i_RSA_PUBKEY(RSA **a,const unsigned char **pp, | 846 | RSA * d2i_RSA_PUBKEY(RSA **a,unsigned char **pp, |
908 | long length); | 847 | long length); |
909 | #endif | 848 | #endif |
910 | #ifndef OPENSSL_NO_DSA | 849 | #ifndef OPENSSL_NO_DSA |
911 | int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); | 850 | int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); |
912 | DSA * d2i_DSA_PUBKEY(DSA **a,const unsigned char **pp, | 851 | DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp, |
913 | long length); | ||
914 | #endif | ||
915 | #ifndef OPENSSL_NO_EC | ||
916 | int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp); | ||
917 | EC_KEY *d2i_EC_PUBKEY(EC_KEY **a, const unsigned char **pp, | ||
918 | long length); | 852 | long length); |
919 | #endif | 853 | #endif |
920 | 854 | ||
@@ -926,7 +860,6 @@ DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) | |||
926 | X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); | 860 | X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); |
927 | 861 | ||
928 | DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) | 862 | DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) |
929 | DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS) | ||
930 | 863 | ||
931 | DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) | 864 | DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) |
932 | 865 | ||
@@ -939,19 +872,16 @@ DECLARE_ASN1_FUNCTIONS(X509_CINF) | |||
939 | DECLARE_ASN1_FUNCTIONS(X509) | 872 | DECLARE_ASN1_FUNCTIONS(X509) |
940 | DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) | 873 | DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) |
941 | 874 | ||
942 | DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR) | ||
943 | |||
944 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | 875 | int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, |
945 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); | 876 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func); |
946 | int X509_set_ex_data(X509 *r, int idx, void *arg); | 877 | int X509_set_ex_data(X509 *r, int idx, void *arg); |
947 | void *X509_get_ex_data(X509 *r, int idx); | 878 | void *X509_get_ex_data(X509 *r, int idx); |
948 | int i2d_X509_AUX(X509 *a,unsigned char **pp); | 879 | int i2d_X509_AUX(X509 *a,unsigned char **pp); |
949 | X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); | 880 | X509 * d2i_X509_AUX(X509 **a,unsigned char **pp,long length); |
950 | 881 | ||
951 | int X509_alias_set1(X509 *x, unsigned char *name, int len); | 882 | int X509_alias_set1(X509 *x, unsigned char *name, int len); |
952 | int X509_keyid_set1(X509 *x, unsigned char *id, int len); | 883 | int X509_keyid_set1(X509 *x, unsigned char *id, int len); |
953 | unsigned char * X509_alias_get0(X509 *x, int *len); | 884 | unsigned char * X509_alias_get0(X509 *x, int *len); |
954 | unsigned char * X509_keyid_get0(X509 *x, int *len); | ||
955 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); | 885 | int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); |
956 | int X509_TRUST_set(int *t, int trust); | 886 | int X509_TRUST_set(int *t, int trust); |
957 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); | 887 | int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); |
@@ -968,7 +898,7 @@ int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev); | |||
968 | X509_PKEY * X509_PKEY_new(void ); | 898 | X509_PKEY * X509_PKEY_new(void ); |
969 | void X509_PKEY_free(X509_PKEY *a); | 899 | void X509_PKEY_free(X509_PKEY *a); |
970 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); | 900 | int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); |
971 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length); | 901 | X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,unsigned char **pp,long length); |
972 | 902 | ||
973 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) | 903 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) |
974 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) | 904 | DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
@@ -979,15 +909,15 @@ X509_INFO * X509_INFO_new(void); | |||
979 | void X509_INFO_free(X509_INFO *a); | 909 | void X509_INFO_free(X509_INFO *a); |
980 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); | 910 | char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); |
981 | 911 | ||
982 | int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, | 912 | int ASN1_verify(int (*i2d)(), X509_ALGOR *algor1, |
983 | ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey); | 913 | ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey); |
984 | 914 | ||
985 | int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data, | 915 | int ASN1_digest(int (*i2d)(),const EVP_MD *type,char *data, |
986 | unsigned char *md,unsigned int *len); | 916 | unsigned char *md,unsigned int *len); |
987 | 917 | ||
988 | int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, | 918 | int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, |
989 | X509_ALGOR *algor2, ASN1_BIT_STRING *signature, | 919 | ASN1_BIT_STRING *signature, |
990 | char *data,EVP_PKEY *pkey, const EVP_MD *type); | 920 | char *data,EVP_PKEY *pkey, const EVP_MD *type); |
991 | 921 | ||
992 | int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data, | 922 | int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data, |
993 | unsigned char *md,unsigned int *len); | 923 | unsigned char *md,unsigned int *len); |
@@ -1052,8 +982,6 @@ int X509_CRL_sort(X509_CRL *crl); | |||
1052 | int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); | 982 | int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); |
1053 | int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); | 983 | int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); |
1054 | 984 | ||
1055 | int X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey); | ||
1056 | |||
1057 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); | 985 | int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); |
1058 | 986 | ||
1059 | int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); | 987 | int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); |
@@ -1200,8 +1128,6 @@ STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_NID(STACK_OF(X509_ATTRIBUTE) **x, | |||
1200 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, | 1128 | STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, |
1201 | const char *attrname, int type, | 1129 | const char *attrname, int type, |
1202 | const unsigned char *bytes, int len); | 1130 | const unsigned char *bytes, int len); |
1203 | void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x, | ||
1204 | ASN1_OBJECT *obj, int lastpos, int type); | ||
1205 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, | 1131 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, |
1206 | int atrtype, const void *data, int len); | 1132 | int atrtype, const void *data, int len); |
1207 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, | 1133 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, |
@@ -1216,24 +1142,6 @@ int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr); | |||
1216 | ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); | 1142 | ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); |
1217 | ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); | 1143 | ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); |
1218 | 1144 | ||
1219 | int EVP_PKEY_get_attr_count(const EVP_PKEY *key); | ||
1220 | int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, | ||
1221 | int lastpos); | ||
1222 | int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, | ||
1223 | int lastpos); | ||
1224 | X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc); | ||
1225 | X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc); | ||
1226 | int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr); | ||
1227 | int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, | ||
1228 | const ASN1_OBJECT *obj, int type, | ||
1229 | const unsigned char *bytes, int len); | ||
1230 | int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, | ||
1231 | int nid, int type, | ||
1232 | const unsigned char *bytes, int len); | ||
1233 | int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, | ||
1234 | const char *attrname, int type, | ||
1235 | const unsigned char *bytes, int len); | ||
1236 | |||
1237 | int X509_verify_cert(X509_STORE_CTX *ctx); | 1145 | int X509_verify_cert(X509_STORE_CTX *ctx); |
1238 | 1146 | ||
1239 | /* lookup a cert from a X509 STACK */ | 1147 | /* lookup a cert from a X509 STACK */ |
@@ -1280,20 +1188,18 @@ void ERR_load_X509_strings(void); | |||
1280 | /* Function codes. */ | 1188 | /* Function codes. */ |
1281 | #define X509_F_ADD_CERT_DIR 100 | 1189 | #define X509_F_ADD_CERT_DIR 100 |
1282 | #define X509_F_BY_FILE_CTRL 101 | 1190 | #define X509_F_BY_FILE_CTRL 101 |
1283 | #define X509_F_CHECK_POLICY 145 | ||
1284 | #define X509_F_DIR_CTRL 102 | 1191 | #define X509_F_DIR_CTRL 102 |
1285 | #define X509_F_GET_CERT_BY_SUBJECT 103 | 1192 | #define X509_F_GET_CERT_BY_SUBJECT 103 |
1286 | #define X509_F_NETSCAPE_SPKI_B64_DECODE 129 | 1193 | #define X509_F_NETSCAPE_SPKI_B64_DECODE 129 |
1287 | #define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 | 1194 | #define X509_F_NETSCAPE_SPKI_B64_ENCODE 130 |
1288 | #define X509_F_X509AT_ADD1_ATTR 135 | ||
1289 | #define X509_F_X509V3_ADD_EXT 104 | 1195 | #define X509_F_X509V3_ADD_EXT 104 |
1196 | #define X509_F_X509_ADD_ATTR 135 | ||
1290 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 | 1197 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 136 |
1291 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 | 1198 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 137 |
1292 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 | 1199 | #define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 140 |
1293 | #define X509_F_X509_ATTRIBUTE_GET0_DATA 139 | 1200 | #define X509_F_X509_ATTRIBUTE_GET0_DATA 139 |
1294 | #define X509_F_X509_ATTRIBUTE_SET1_DATA 138 | 1201 | #define X509_F_X509_ATTRIBUTE_SET1_DATA 138 |
1295 | #define X509_F_X509_CHECK_PRIVATE_KEY 128 | 1202 | #define X509_F_X509_CHECK_PRIVATE_KEY 128 |
1296 | #define X509_F_X509_CRL_PRINT_FP 147 | ||
1297 | #define X509_F_X509_EXTENSION_CREATE_BY_NID 108 | 1203 | #define X509_F_X509_EXTENSION_CREATE_BY_NID 108 |
1298 | #define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 | 1204 | #define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 |
1299 | #define X509_F_X509_GET_PUBKEY_PARAMETERS 110 | 1205 | #define X509_F_X509_GET_PUBKEY_PARAMETERS 110 |
@@ -1306,16 +1212,14 @@ void ERR_load_X509_strings(void); | |||
1306 | #define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 | 1212 | #define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 |
1307 | #define X509_F_X509_NAME_ONELINE 116 | 1213 | #define X509_F_X509_NAME_ONELINE 116 |
1308 | #define X509_F_X509_NAME_PRINT 117 | 1214 | #define X509_F_X509_NAME_PRINT 117 |
1309 | #define X509_F_X509_PRINT_EX_FP 118 | 1215 | #define X509_F_X509_PRINT_FP 118 |
1310 | #define X509_F_X509_PUBKEY_GET 119 | 1216 | #define X509_F_X509_PUBKEY_GET 119 |
1311 | #define X509_F_X509_PUBKEY_SET 120 | 1217 | #define X509_F_X509_PUBKEY_SET 120 |
1312 | #define X509_F_X509_REQ_CHECK_PRIVATE_KEY 144 | 1218 | #define X509_F_X509_REQ_PRINT 121 |
1313 | #define X509_F_X509_REQ_PRINT_EX 121 | ||
1314 | #define X509_F_X509_REQ_PRINT_FP 122 | 1219 | #define X509_F_X509_REQ_PRINT_FP 122 |
1315 | #define X509_F_X509_REQ_TO_X509 123 | 1220 | #define X509_F_X509_REQ_TO_X509 123 |
1316 | #define X509_F_X509_STORE_ADD_CERT 124 | 1221 | #define X509_F_X509_STORE_ADD_CERT 124 |
1317 | #define X509_F_X509_STORE_ADD_CRL 125 | 1222 | #define X509_F_X509_STORE_ADD_CRL 125 |
1318 | #define X509_F_X509_STORE_CTX_GET1_ISSUER 146 | ||
1319 | #define X509_F_X509_STORE_CTX_INIT 143 | 1223 | #define X509_F_X509_STORE_CTX_INIT 143 |
1320 | #define X509_F_X509_STORE_CTX_NEW 142 | 1224 | #define X509_F_X509_STORE_CTX_NEW 142 |
1321 | #define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 | 1225 | #define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 134 |