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