extern "C" {
#endif
+#ifdef VMS
+#undef X509_REVOKED_get_ext_by_critical
+#define X509_REVOKED_get_ext_by_critical X509_REVOKED_get_ext_by_critic
+#endif
+
#include <openssl/stack.h>
#include <openssl/asn1.h>
#include <openssl/safestack.h>
void (*ex_free)(); /* clear argp stuff */
} X509_EXTENSION;
+DECLARE_STACK_OF(X509_EXTENSION)
+DECLARE_ASN1_SET_OF(X509_EXTENSION)
+
+/* a sequence of these are used */
+typedef struct x509_attributes_st
+ {
+ ASN1_OBJECT *object;
+ int set; /* 1 for a set, 0 for a single item (which is wrong) */
+ union {
+ char *ptr;
+/* 1 */ STACK_OF(ASN1_TYPE) *set;
+/* 0 */ ASN1_TYPE *single;
+ } value;
+ } X509_ATTRIBUTE;
+
+DECLARE_STACK_OF(X509_ATTRIBUTE)
+DECLARE_ASN1_SET_OF(X509_ATTRIBUTE)
+
typedef struct X509_req_info_st
{
ASN1_INTEGER *version;
X509_NAME *subject;
X509_PUBKEY *pubkey;
/* d=2 hl=2 l= 0 cons: cont: 00 */
- STACK /* X509_ATTRIBUTE */ *attributes; /* [ 0 ] */
+ STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
int req_kludge;
} X509_REQ_INFO;
X509_PUBKEY *key;
ASN1_BIT_STRING *issuerUID; /* [ 1 ] optional in v2 */
ASN1_BIT_STRING *subjectUID; /* [ 2 ] optional in v2 */
- STACK /* X509_EXTENSION */ *extensions; /* [ 3 ] optional in v3 */
+ STACK_OF(X509_EXTENSION) *extensions; /* [ 3 ] optional in v3 */
} X509_CINF;
typedef struct x509_st
{
ASN1_INTEGER *serialNumber;
ASN1_UTCTIME *revocationDate;
- STACK /* optional X509_EXTENSION */ *extensions;
+ STACK_OF(X509_EXTENSION) /* optional */ *extensions;
int sequence; /* load sequence */
} X509_REVOKED;
ASN1_UTCTIME *lastUpdate;
ASN1_UTCTIME *nextUpdate;
STACK /* X509_REVOKED */ *revoked;
- STACK /* [0] X509_EXTENSION */ *extensions;
+ STACK_OF(X509_EXTENSION) /* [0] */ *extensions;
} X509_CRL_INFO;
typedef struct X509_crl_st
int references;
} X509_CRL;
-/* a sequence of these are used */
-typedef struct x509_attributes_st
- {
- ASN1_OBJECT *object;
- int set; /* 1 for a set, 0 for a single item (which is wrong) */
- union {
- char *ptr;
-/* 1 */ STACK /* ASN1_TYPE */ *set;
-/* 0 */ ASN1_TYPE *single;
- } value;
- } X509_ATTRIBUTE;
-
-DECLARE_STACK_OF(X509_ATTRIBUTE)
-
typedef struct private_key_st
{
int version;
int references;
} X509_INFO;
+
+DECLARE_STACK_OF(X509_INFO)
#endif
/* The next 2 structures and their 8 routines were sent to me by
int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a,unsigned char **pp);
X509_ATTRIBUTE *d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a,unsigned char **pp,
long length);
-X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, char *value);
+X509_ATTRIBUTE *X509_ATTRIBUTE_create(int nid, int atrtype, void *value);
X509_EXTENSION *X509_EXTENSION_new(void );
ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
-int X509v3_get_ext_count(STACK *x);
-int X509v3_get_ext_by_NID(STACK *x, int nid, int lastpos);
-int X509v3_get_ext_by_OBJ(STACK *x,ASN1_OBJECT *obj,int lastpos);
-int X509v3_get_ext_by_critical(STACK *x, int crit, int lastpos);
-X509_EXTENSION *X509v3_get_ext(STACK *x, int loc);
-X509_EXTENSION *X509v3_delete_ext(STACK *x, int loc);
-STACK * X509v3_add_ext(STACK **x, X509_EXTENSION *ex, int loc);
+int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);
+int X509v3_get_ext_by_NID(const STACK_OF(X509_EXTENSION) *x,
+ int nid, int lastpos);
+int X509v3_get_ext_by_OBJ(const STACK_OF(X509_EXTENSION) *x,
+ ASN1_OBJECT *obj,int lastpos);
+int X509v3_get_ext_by_critical(const STACK_OF(X509_EXTENSION) *x,
+ int crit, int lastpos);
+X509_EXTENSION *X509v3_get_ext(const STACK_OF(X509_EXTENSION) *x, int loc);
+X509_EXTENSION *X509v3_delete_ext(STACK_OF(X509_EXTENSION) *x, int loc);
+STACK_OF(X509_EXTENSION) *X509v3_add_ext(STACK_OF(X509_EXTENSION) **x,
+ X509_EXTENSION *ex, int loc);
int X509_get_ext_count(X509 *x);
int X509_get_ext_by_NID(X509 *x, int nid, int lastpos);
/* Password based encryption routines */
+int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
+ unsigned char *salt, int saltlen, int iter, EVP_CIPHER_CTX *ctx,
+ int en_de);
int EVP_PBE_ALGOR_CipherInit(X509_ALGOR *algor, const char *pass,
int passlen, EVP_CIPHER_CTX *ctx, int en_de);
int EVP_PBE_alg_add(int nid, EVP_CIPHER *cipher, EVP_MD *md,