Define the OPENSSL_ITEM structure.
[openssl.git] / crypto / crypto.h
index d1d2400d87e84faf50d93a32999e3163cd59a41f..dd90cfa55d0f312437abc149be71d8e25dd2149f 100644 (file)
@@ -1,6 +1,6 @@
 /* crypto/crypto.h */
 /* ====================================================================
- * Copyright (c) 1998-2002 The OpenSSL Project.  All rights reserved.
+ * Copyright (c) 1998-2003 The OpenSSL Project.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #include <stdlib.h>
 
+#include <openssl/e_os2.h>
+
 #ifndef OPENSSL_NO_FP_API
 #include <stdio.h>
-#ifdef OPENSSL_SYS_WINCE
-#include <stdio_extras.h>
-#endif
 #endif
 
 #include <openssl/stack.h>
@@ -153,6 +152,16 @@ extern "C" {
 #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
  */
@@ -192,7 +201,9 @@ extern "C" {
 #define CRYPTO_LOCK_EC                 33
 #define CRYPTO_LOCK_ECDH               34
 #define CRYPTO_LOCK_BN                 35
-#define CRYPTO_NUM_LOCKS               36
+#define CRYPTO_LOCK_EC_PRE_COMP                36
+#define CRYPTO_LOCK_STORE              37
+#define CRYPTO_NUM_LOCKS               38
 
 #define CRYPTO_LOCK            1
 #define CRYPTO_UNLOCK          2
@@ -301,6 +312,8 @@ DECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
 #define CRYPTO_EX_INDEX_UI             11
 #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). */
@@ -454,6 +467,8 @@ void *CRYPTO_realloc_clean(void *addr,int old_num,int num,const char *file,
                           int line);
 void *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
 
+void OPENSSL_cleanse(void *ptr, size_t len);
+
 void CRYPTO_set_mem_debug_options(long bits);
 long CRYPTO_get_mem_debug_options(void);