59 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
59 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. |
60 * ECDH support in OpenSSL originally developed by |
60 * ECDH support in OpenSSL originally developed by |
61 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. |
61 * SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project. |
62 */ |
62 */ |
63 /* |
63 /* |
64 © Portions copyright (c) 2006, 2010 Nokia Corporation. All rights reserved. |
64 © Portions copyright (c) 2006 Nokia Corporation. All rights reserved. |
65 */ |
65 */ |
66 |
66 |
67 #ifndef HEADER_X509_H |
67 #ifndef HEADER_X509_H |
68 #define HEADER_X509_H |
68 #define HEADER_X509_H |
69 |
69 |
910 DECLARE_ASN1_FUNCTIONS(X509_SIG) |
910 DECLARE_ASN1_FUNCTIONS(X509_SIG) |
911 DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) |
911 DECLARE_ASN1_FUNCTIONS(X509_REQ_INFO) |
912 DECLARE_ASN1_FUNCTIONS(X509_REQ) |
912 DECLARE_ASN1_FUNCTIONS(X509_REQ) |
913 |
913 |
914 DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) |
914 DECLARE_ASN1_FUNCTIONS(X509_ATTRIBUTE) |
915 IMPORT_C X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); |
915 X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value); |
916 |
916 |
917 DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) |
917 DECLARE_ASN1_FUNCTIONS(X509_EXTENSION) |
918 |
918 |
919 DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) |
919 DECLARE_ASN1_FUNCTIONS(X509_NAME_ENTRY) |
920 |
920 |
921 DECLARE_ASN1_FUNCTIONS(X509_NAME) |
921 DECLARE_ASN1_FUNCTIONS(X509_NAME) |
922 |
922 |
923 IMPORT_C int X509_NAME_set(X509_NAME **xn, X509_NAME *name); |
923 int X509_NAME_set(X509_NAME **xn, X509_NAME *name); |
924 |
924 |
925 DECLARE_ASN1_FUNCTIONS(X509_CINF) |
925 DECLARE_ASN1_FUNCTIONS(X509_CINF) |
926 |
926 |
927 DECLARE_ASN1_FUNCTIONS(X509) |
927 DECLARE_ASN1_FUNCTIONS(X509) |
928 DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) |
928 DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX) |
962 DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
962 DECLARE_ASN1_FUNCTIONS(NETSCAPE_SPKAC) |
963 DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) |
963 DECLARE_ASN1_FUNCTIONS(NETSCAPE_CERT_SEQUENCE) |
964 |
964 |
965 #ifndef OPENSSL_NO_EVP |
965 #ifndef OPENSSL_NO_EVP |
966 IMPORT_C X509_INFO * X509_INFO_new(void); |
966 IMPORT_C X509_INFO * X509_INFO_new(void); |
967 IMPORT_C void X509_INFO_free(X509_INFO *a); |
967 void X509_INFO_free(X509_INFO *a); |
968 IMPORT_C char* X509_NAME_oneline(X509_NAME *a,char *buf,int size); |
968 IMPORT_C char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); |
969 |
969 |
970 IMPORT_C int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, |
970 IMPORT_C int ASN1_verify(i2d_of_void *i2d, X509_ALGOR *algor1, |
971 ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey); |
971 ASN1_BIT_STRING *signature,char *data,EVP_PKEY *pkey); |
972 |
972 |
973 IMPORT_C int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data, |
973 IMPORT_C int ASN1_digest(i2d_of_void *i2d,const EVP_MD *type,char *data, |
1025 const ASN1_OBJECT *obj, int type, |
1025 const ASN1_OBJECT *obj, int type, |
1026 const unsigned char *bytes, int len); |
1026 const unsigned char *bytes, int len); |
1027 IMPORT_C int X509_REQ_add1_attr_by_NID(X509_REQ *req, |
1027 IMPORT_C int X509_REQ_add1_attr_by_NID(X509_REQ *req, |
1028 int nid, int type, |
1028 int nid, int type, |
1029 const unsigned char *bytes, int len); |
1029 const unsigned char *bytes, int len); |
1030 IMPORT_C int X509_REQ_add1_attr_by_txt(X509_REQ *req, |
1030 int X509_REQ_add1_attr_by_txt(X509_REQ *req, |
1031 const char *attrname, int type, |
1031 const char *attrname, int type, |
1032 const unsigned char *bytes, int len); |
1032 const unsigned char *bytes, int len); |
1033 |
1033 |
1034 IMPORT_C int X509_CRL_set_version(X509_CRL *x, long version); |
1034 IMPORT_C int X509_CRL_set_version(X509_CRL *x, long version); |
1035 IMPORT_C int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); |
1035 IMPORT_C int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name); |