Define the OPENSSL_ITEM structure.
authorRichard Levitte <levitte@openssl.org>
Thu, 1 May 2003 03:45:18 +0000 (03:45 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 1 May 2003 03:45:18 +0000 (03:45 +0000)
CHANGES
crypto/crypto.h

diff --git a/CHANGES b/CHANGES
index 9a416dea6bbfa9d8e2f3985dbdea7c2a9b2355dd..57f503b675f364299209941e2eecf023ddfc217b 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,11 @@
 
  Changes between 0.9.7a and 0.9.8  [xx XXX xxxx]
 
 
  Changes between 0.9.7a and 0.9.8  [xx XXX xxxx]
 
+  *) Add a generic structure called OPENSSL_ITEM.  This can be used to
+     pass a list of arguments to any function as well as provide a way
+     for a function to pass data back to the caller.
+     [Richard Levitte]
+
   *) Add the functions BUF_strndup() and BUF_memdup().  BUF_strndup()
      works like BUF_strdup() but can be used to duplicate a portion of
      a string.  The copy gets NUL-terminated.  BUF_memdup() duplicates
   *) Add the functions BUF_strndup() and BUF_memdup().  BUF_strndup()
      works like BUF_strdup() but can be used to duplicate a portion of
      a string.  The copy gets NUL-terminated.  BUF_memdup() duplicates
index 0f15a565444bbb268ecf05099458c302310983ef..dd90cfa55d0f312437abc149be71d8e25dd2149f 100644 (file)
@@ -152,6 +152,16 @@ extern "C" {
 #define SSLEAY_PLATFORM                4
 #define SSLEAY_DIR             5
 
 #define SSLEAY_PLATFORM                4
 #define SSLEAY_DIR             5
 
+/* 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;
+
+
 /* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
  * names in cryptlib.c
  */
 /* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
  * names in cryptlib.c
  */
@@ -192,7 +202,8 @@ extern "C" {
 #define CRYPTO_LOCK_ECDH               34
 #define CRYPTO_LOCK_BN                 35
 #define CRYPTO_LOCK_EC_PRE_COMP                36
 #define CRYPTO_LOCK_ECDH               34
 #define CRYPTO_LOCK_BN                 35
 #define CRYPTO_LOCK_EC_PRE_COMP                36
-#define CRYPTO_NUM_LOCKS               37
+#define CRYPTO_LOCK_STORE              37
+#define CRYPTO_NUM_LOCKS               38
 
 #define CRYPTO_LOCK            1
 #define CRYPTO_UNLOCK          2
 
 #define CRYPTO_LOCK            1
 #define CRYPTO_UNLOCK          2
@@ -302,6 +313,7 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
 #define CRYPTO_EX_INDEX_ECDSA          12
 #define CRYPTO_EX_INDEX_ECDH           13
 #define CRYPTO_EX_INDEX_COMP           14
 #define CRYPTO_EX_INDEX_ECDSA          12
 #define CRYPTO_EX_INDEX_ECDH           13
 #define CRYPTO_EX_INDEX_COMP           14
+#define CRYPTO_EX_INDEX_STORE          15
 
 /* Dynamically assigned indexes start from this value (don't use directly, use
  * via CRYPTO_ex_data_new_class). */
 
 /* Dynamically assigned indexes start from this value (don't use directly, use
  * via CRYPTO_ex_data_new_class). */