-/* crypto/store/store.h -*- mode:C; c-file-style: "eay" -*- */
/*
* Written by Richard Levitte (richard@levitte.org) for the OpenSSL project
* 2003.
# endif
# include <openssl/ossl_typ.h>
-# ifdef OPENSSL_USE_DEPRECATED
+# if OPENSSL_API_COMPAT < 0x10100000L
# include <openssl/evp.h>
# include <openssl/bn.h>
# include <openssl/x509.h>
/* Some methods may use extra data */
# define STORE_set_app_data(s,arg) STORE_set_ex_data(s,0,arg)
# define STORE_get_app_data(s) STORE_get_ex_data(s,0)
-int STORE_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
- CRYPTO_EX_dup *dup_func,
- CRYPTO_EX_free *free_func);
+
+#define STORE_get_ex_new_index(l, p, newf, dupf, freef) \
+ CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_STORE, l, p, newf, dupf, freef)
int STORE_set_ex_data(STORE *r, int idx, void *arg);
void *STORE_get_ex_data(STORE *r, int idx);
STORE_PARAM_KEY_PARAMETERS = 0x03, /* ??? */
STORE_PARAM_KEY_NO_PARAMETERS = 0x04, /* N/A */
STORE_PARAM_AUTH_PASSPHRASE = 0x05, /* char * */
- STORE_PARAM_AUTH_KRB5_TICKET = 0x06, /* void * */
- STORE_PARAM_TYPE_NUM = 0x06 /* The amount of known parameter types */
+ STORE_PARAM_TYPE_NUM = 0x05 /* The amount of known parameter types */
} STORE_PARAM_TYPES;
/*
* Parameter value sizes. -1 means unknown, anything else is the required
BUF_MEM *arbitrary;
} data;
} STORE_OBJECT;
-DECLARE_STACK_OF(STORE_OBJECT)
+DEFINE_STACK_OF(STORE_OBJECT)
STORE_OBJECT *STORE_OBJECT_new(void);
void STORE_OBJECT_free(STORE_OBJECT *data);
+/* A generic structure to pass assorted data in a expandable way */
+typedef struct openssl_item_st {
+ int code;
+ void *value; /* Not used for flag attributes */
+ size_t value_size; /* Max size of value for output, length for
+ * input */
+ size_t *value_length; /* Returned length of value for output */
+} OPENSSL_ITEM;
+
/*
* The following functions handle the storage. They return 0, a negative
* number or NULL on error, anything else on success.