#include "stack.h"
#include "asn1.h"
+#include "safestack.h"
#ifndef NO_RSA
#include "rsa.h"
unsigned long hash; /* Keep the hash around for lookups */
} X509_NAME;
+DECLARE_STACK_OF(X509_NAME)
+
#define X509_EX_V_NETSCAPE_HACK 0x8000
#define X509_EX_V_INIT 0x0001
typedef struct X509_extension_st
char *name;
} X509;
+DECLARE_STACK_OF(X509)
+DECLARE_ASN1_SET_OF(X509)
+
typedef struct X509_revoked_st
{
ASN1_INTEGER *serialNumber;
ASN1_INTEGER *iter;
} PBEPARAM;
+/* Password based encryption V2 structures */
+
+typedef struct PBE2PARAM_st {
+X509_ALGOR *keyfunc;
+X509_ALGOR *encryption;
+} PBE2PARAM;
+
+typedef struct PBKDF2PARAM_st {
+ASN1_OCTET_STRING *salt;
+ASN1_INTEGER *iter;
+ASN1_INTEGER *keylength;
+X509_ALGOR *prf;
+} PBKDF2PARAM;
+
+
/* PKCS#8 private key info structure */
typedef struct pkcs8_priv_key_info_st
int X509_verify_cert(X509_STORE_CTX *ctx);
/* lookup a cert from a X509 STACK */
-X509 *X509_find_by_issuer_and_serial(STACK *sk,X509_NAME *name,
- ASN1_INTEGER *serial);
-X509 *X509_find_by_subject(STACK *sk,X509_NAME *name);
+X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk,X509_NAME *name,
+ ASN1_INTEGER *serial);
+X509 *X509_find_by_subject(STACK_OF(X509) *sk,X509_NAME *name);
int i2d_PBEPARAM(PBEPARAM *a, unsigned char **pp);
PBEPARAM *PBEPARAM_new(void);
void PBEPARAM_free(PBEPARAM *a);
X509_ALGOR *PKCS5_pbe_set(int alg, int iter, unsigned char *salt, int saltlen);
+int i2d_PBKDF2PARAM(PBKDF2PARAM *a, unsigned char **pp);
+PBKDF2PARAM *PBKDF2PARAM_new(void);
+PBKDF2PARAM *d2i_PBKDF2PARAM(PBKDF2PARAM **a, unsigned char **pp, long length);
+void PBKDF2PARAM_free(PBKDF2PARAM *a);
+
+int i2d_PBE2PARAM(PBE2PARAM *a, unsigned char **pp);
+PBE2PARAM *PBE2PARAM_new(void);
+PBE2PARAM *d2i_PBE2PARAM(PBE2PARAM **a, unsigned char **pp, long length);
+void PBE2PARAM_free(PBE2PARAM *a);
+
/* PKCS#8 utilities */
int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **pp);
PBEPARAM *d2i_PBEPARAM();
void PBEPARAM_free();
+int i2d_PBKDF2PARAM();
+PBKDF2PARAM *PBKDF2PARAM_new();
+PBKDF2PARAM *d2i_PBKDF2PARAM();
+void PBKDF2PARAM_free();
+
+int i2d_PBE2PARAM();
+PBE2PARAM *PBE2PARAM_new();
+PBE2PARAM *d2i_PBE2PARAM();
+void PBE2PARAM_free();
+
int i2d_PKCS8_PRIV_KEY_INFO();
PKCS8_PRIV_KEY_INFO *PKCS8_PRIV_KEY_INFO_new();
PKCS8_PRIV_KEY_INFO *d2i_PKCS8_PRIV_KEY_INFO();