summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509/x509.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/x509/x509.h')
-rw-r--r--src/lib/libcrypto/x509/x509.h140
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" {
136typedef struct X509_objects_st 117typedef 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
143struct X509_algor_st 124struct 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
130DECLARE_STACK_OF(X509_ALGOR)
149DECLARE_ASN1_SET_OF(X509_ALGOR) 131DECLARE_ASN1_SET_OF(X509_ALGOR)
150 132
151typedef STACK_OF(X509_ALGOR) X509_ALGORS;
152
153typedef struct X509_val_st 133typedef 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
207typedef STACK_OF(X509_EXTENSION) X509_EXTENSIONS;
208
209DECLARE_STACK_OF(X509_EXTENSION) 187DECLARE_STACK_OF(X509_EXTENSION)
210DECLARE_ASN1_SET_OF(X509_EXTENSION) 188DECLARE_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
318DECLARE_STACK_OF(X509_TRUST) 290DECLARE_STACK_OF(X509_TRUST)
319 291
320typedef 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);
802DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa); 758DSA *d2i_DSAPrivateKey_fp(FILE *fp, DSA **dsa);
803int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa); 759int i2d_DSAPrivateKey_fp(FILE *fp, DSA *dsa);
804#endif 760#endif
805#ifndef OPENSSL_NO_EC
806EC_KEY *d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **eckey);
807int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *eckey);
808EC_KEY *d2i_ECPrivateKey_fp(FILE *fp, EC_KEY **eckey);
809int i2d_ECPrivateKey_fp(FILE *fp, EC_KEY *eckey);
810#endif
811X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8); 761X509_SIG *d2i_PKCS8_fp(FILE *fp,X509_SIG **p8);
812int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8); 762int i2d_PKCS8_fp(FILE *fp,X509_SIG *p8);
813PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp, 763PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_fp(FILE *fp,
@@ -841,12 +791,6 @@ int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa);
841DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa); 791DSA *d2i_DSAPrivateKey_bio(BIO *bp, DSA **dsa);
842int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa); 792int i2d_DSAPrivateKey_bio(BIO *bp, DSA *dsa);
843#endif 793#endif
844#ifndef OPENSSL_NO_EC
845EC_KEY *d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **eckey);
846int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *eckey);
847EC_KEY *d2i_ECPrivateKey_bio(BIO *bp, EC_KEY **eckey);
848int i2d_ECPrivateKey_bio(BIO *bp, EC_KEY *eckey);
849#endif
850X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8); 794X509_SIG *d2i_PKCS8_bio(BIO *bp,X509_SIG **p8);
851int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8); 795int i2d_PKCS8_bio(BIO *bp,X509_SIG *p8);
852PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp, 796PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO_bio(BIO *bp,
@@ -865,10 +809,6 @@ X509_EXTENSION *X509_EXTENSION_dup(X509_EXTENSION *ex);
865X509_CRL *X509_CRL_dup(X509_CRL *crl); 809X509_CRL *X509_CRL_dup(X509_CRL *crl);
866X509_REQ *X509_REQ_dup(X509_REQ *req); 810X509_REQ *X509_REQ_dup(X509_REQ *req);
867X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn); 811X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *xn);
868int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
869void X509_ALGOR_get0(ASN1_OBJECT **paobj, int *pptype, void **ppval,
870 X509_ALGOR *algor);
871
872X509_NAME *X509_NAME_dup(X509_NAME *xn); 812X509_NAME *X509_NAME_dup(X509_NAME *xn);
873X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne); 813X509_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);
890X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey); 830X509 * X509_REQ_to_X509(X509_REQ *r, int days,EVP_PKEY *pkey);
891 831
892DECLARE_ASN1_FUNCTIONS(X509_ALGOR) 832DECLARE_ASN1_FUNCTIONS(X509_ALGOR)
893DECLARE_ASN1_ENCODE_FUNCTIONS(X509_ALGORS, X509_ALGORS, X509_ALGORS)
894DECLARE_ASN1_FUNCTIONS(X509_VAL) 833DECLARE_ASN1_FUNCTIONS(X509_VAL)
895 834
896DECLARE_ASN1_FUNCTIONS(X509_PUBKEY) 835DECLARE_ASN1_FUNCTIONS(X509_PUBKEY)
@@ -900,21 +839,16 @@ EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key);
900int X509_get_pubkey_parameters(EVP_PKEY *pkey, 839int X509_get_pubkey_parameters(EVP_PKEY *pkey,
901 STACK_OF(X509) *chain); 840 STACK_OF(X509) *chain);
902int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp); 841int i2d_PUBKEY(EVP_PKEY *a,unsigned char **pp);
903EVP_PKEY * d2i_PUBKEY(EVP_PKEY **a,const unsigned char **pp, 842EVP_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
906int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp); 845int i2d_RSA_PUBKEY(RSA *a,unsigned char **pp);
907RSA * d2i_RSA_PUBKEY(RSA **a,const unsigned char **pp, 846RSA * 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
911int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp); 850int i2d_DSA_PUBKEY(DSA *a,unsigned char **pp);
912DSA * d2i_DSA_PUBKEY(DSA **a,const unsigned char **pp, 851DSA * d2i_DSA_PUBKEY(DSA **a,unsigned char **pp,
913 long length);
914#endif
915#ifndef OPENSSL_NO_EC
916int i2d_EC_PUBKEY(EC_KEY *a, unsigned char **pp);
917EC_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)
926X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); 860X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
927 861
928DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) 862DECLARE_ASN1_FUNCTIONS(X509_EXTENSION)
929DECLARE_ASN1_ENCODE_FUNCTIONS(X509_EXTENSIONS, X509_EXTENSIONS, X509_EXTENSIONS)
930 863
931DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) 864DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY)
932 865
@@ -939,19 +872,16 @@ DECLARE_ASN1_FUNCTIONS(X509_CINF)
939DECLARE_ASN1_FUNCTIONS(X509) 872DECLARE_ASN1_FUNCTIONS(X509)
940DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) 873DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
941 874
942DECLARE_ASN1_FUNCTIONS(X509_CERT_PAIR)
943
944int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, 875int 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);
946int X509_set_ex_data(X509 *r, int idx, void *arg); 877int X509_set_ex_data(X509 *r, int idx, void *arg);
947void *X509_get_ex_data(X509 *r, int idx); 878void *X509_get_ex_data(X509 *r, int idx);
948int i2d_X509_AUX(X509 *a,unsigned char **pp); 879int i2d_X509_AUX(X509 *a,unsigned char **pp);
949X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); 880X509 * d2i_X509_AUX(X509 **a,unsigned char **pp,long length);
950 881
951int X509_alias_set1(X509 *x, unsigned char *name, int len); 882int X509_alias_set1(X509 *x, unsigned char *name, int len);
952int X509_keyid_set1(X509 *x, unsigned char *id, int len); 883int X509_keyid_set1(X509 *x, unsigned char *id, int len);
953unsigned char * X509_alias_get0(X509 *x, int *len); 884unsigned char * X509_alias_get0(X509 *x, int *len);
954unsigned char * X509_keyid_get0(X509 *x, int *len);
955int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int); 885int (*X509_TRUST_set_default(int (*trust)(int , X509 *, int)))(int, X509 *, int);
956int X509_TRUST_set(int *t, int trust); 886int X509_TRUST_set(int *t, int trust);
957int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj); 887int X509_add1_trust_object(X509 *x, ASN1_OBJECT *obj);
@@ -968,7 +898,7 @@ int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
968X509_PKEY * X509_PKEY_new(void ); 898X509_PKEY * X509_PKEY_new(void );
969void X509_PKEY_free(X509_PKEY *a); 899void X509_PKEY_free(X509_PKEY *a);
970int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp); 900int i2d_X509_PKEY(X509_PKEY *a,unsigned char **pp);
971X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,const unsigned char **pp,long length); 901X509_PKEY * d2i_X509_PKEY(X509_PKEY **a,unsigned char **pp,long length);
972 902
973DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI) 903DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKI)
974DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) 904DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC)
@@ -979,15 +909,15 @@ X509_INFO * X509_INFO_new(void);
979void X509_INFO_free(X509_INFO *a); 909void X509_INFO_free(X509_INFO *a);
980char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); 910char * X509_NAME_oneline(X509_NAME *a,char *buf,int size);
981 911
982int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, 912int 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
985int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data, 915int 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
988int ASN1_sign(i2d_of_void *i2d, X509_ALGOR *algor1, 918int 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
992int ASN1_item_digest(const ASN1_ITEM *it,const EVP_MD *type,void *data, 922int 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);
1052int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial); 982int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
1053int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm); 983int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
1054 984
1055int X509_REQ_check_private_key(X509_REQ *x509,EVP_PKEY *pkey);
1056
1057int X509_check_private_key(X509 *x509,EVP_PKEY *pkey); 985int X509_check_private_key(X509 *x509,EVP_PKEY *pkey);
1058 986
1059int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b); 987int 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,
1200STACK_OF(X509_ATTRIBUTE) *X509at_add1_attr_by_txt(STACK_OF(X509_ATTRIBUTE) **x, 1128STACK_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);
1203void *X509at_get0_data_by_OBJ(STACK_OF(X509_ATTRIBUTE) *x,
1204 ASN1_OBJECT *obj, int lastpos, int type);
1205X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **attr, int nid, 1131X509_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);
1207X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr, 1133X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **attr,
@@ -1216,24 +1142,6 @@ int X509_ATTRIBUTE_count(X509_ATTRIBUTE *attr);
1216ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr); 1142ASN1_OBJECT *X509_ATTRIBUTE_get0_object(X509_ATTRIBUTE *attr);
1217ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx); 1143ASN1_TYPE *X509_ATTRIBUTE_get0_type(X509_ATTRIBUTE *attr, int idx);
1218 1144
1219int EVP_PKEY_get_attr_count(const EVP_PKEY *key);
1220int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid,
1221 int lastpos);
1222int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj,
1223 int lastpos);
1224X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc);
1225X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc);
1226int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr);
1227int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key,
1228 const ASN1_OBJECT *obj, int type,
1229 const unsigned char *bytes, int len);
1230int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key,
1231 int nid, int type,
1232 const unsigned char *bytes, int len);
1233int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
1234 const char *attrname, int type,
1235 const unsigned char *bytes, int len);
1236
1237int X509_verify_cert(X509_STORE_CTX *ctx); 1145int 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