Eneboo - Documentación para desarrolladores
|
00001 /* crypto/store/str_locl.h -*- mode:C; c-file-style: "eay" -*- */ 00002 /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL 00003 * project 2003. 00004 */ 00005 /* ==================================================================== 00006 * Copyright (c) 2003 The OpenSSL Project. All rights reserved. 00007 * 00008 * Redistribution and use in source and binary forms, with or without 00009 * modification, are permitted provided that the following conditions 00010 * are met: 00011 * 00012 * 1. Redistributions of source code must retain the above copyright 00013 * notice, this list of conditions and the following disclaimer. 00014 * 00015 * 2. Redistributions in binary form must reproduce the above copyright 00016 * notice, this list of conditions and the following disclaimer in 00017 * the documentation and/or other materials provided with the 00018 * distribution. 00019 * 00020 * 3. All advertising materials mentioning features or use of this 00021 * software must display the following acknowledgment: 00022 * "This product includes software developed by the OpenSSL Project 00023 * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 00024 * 00025 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 00026 * endorse or promote products derived from this software without 00027 * prior written permission. For written permission, please contact 00028 * openssl-core@openssl.org. 00029 * 00030 * 5. Products derived from this software may not be called "OpenSSL" 00031 * nor may "OpenSSL" appear in their names without prior written 00032 * permission of the OpenSSL Project. 00033 * 00034 * 6. Redistributions of any form whatsoever must retain the following 00035 * acknowledgment: 00036 * "This product includes software developed by the OpenSSL Project 00037 * for use in the OpenSSL Toolkit (http://www.openssl.org/)" 00038 * 00039 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 00040 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00041 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00042 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 00043 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00044 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 00045 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00046 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 00047 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 00048 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00049 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 00050 * OF THE POSSIBILITY OF SUCH DAMAGE. 00051 * ==================================================================== 00052 * 00053 * This product includes cryptographic software written by Eric Young 00054 * (eay@cryptsoft.com). This product includes software written by Tim 00055 * Hudson (tjh@cryptsoft.com). 00056 * 00057 */ 00058 00059 #ifndef HEADER_STORE_LOCL_H 00060 #define HEADER_STORE_LOCL_H 00061 00062 #include <openssl/crypto.h> 00063 #include <openssl/store.h> 00064 00065 #ifdef __cplusplus 00066 extern "C" { 00067 #endif 00068 00069 struct store_method_st 00070 { 00071 char *name; 00072 00073 /* All the functions return a positive integer or non-NULL for success 00074 and 0, a negative integer or NULL for failure */ 00075 00076 /* Initialise the STORE with private data */ 00077 STORE_INITIALISE_FUNC_PTR init; 00078 /* Initialise the STORE with private data */ 00079 STORE_CLEANUP_FUNC_PTR clean; 00080 /* Generate an object of a given type */ 00081 STORE_GENERATE_OBJECT_FUNC_PTR generate_object; 00082 /* Get an object of a given type. This function isn't really very 00083 useful since the listing functions (below) can be used for the 00084 same purpose and are much more general. */ 00085 STORE_GET_OBJECT_FUNC_PTR get_object; 00086 /* Store an object of a given type. */ 00087 STORE_STORE_OBJECT_FUNC_PTR store_object; 00088 /* Modify the attributes bound to an object of a given type. */ 00089 STORE_MODIFY_OBJECT_FUNC_PTR modify_object; 00090 /* Revoke an object of a given type. */ 00091 STORE_HANDLE_OBJECT_FUNC_PTR revoke_object; 00092 /* Delete an object of a given type. */ 00093 STORE_HANDLE_OBJECT_FUNC_PTR delete_object; 00094 /* List a bunch of objects of a given type and with the associated 00095 attributes. */ 00096 STORE_START_OBJECT_FUNC_PTR list_object_start; 00097 STORE_NEXT_OBJECT_FUNC_PTR list_object_next; 00098 STORE_END_OBJECT_FUNC_PTR list_object_end; 00099 STORE_END_OBJECT_FUNC_PTR list_object_endp; 00100 /* Store-level function to make any necessary update operations. */ 00101 STORE_GENERIC_FUNC_PTR update_store; 00102 /* Store-level function to get exclusive access to the store. */ 00103 STORE_GENERIC_FUNC_PTR lock_store; 00104 /* Store-level function to release exclusive access to the store. */ 00105 STORE_GENERIC_FUNC_PTR unlock_store; 00106 00107 /* Generic control function */ 00108 STORE_CTRL_FUNC_PTR ctrl; 00109 }; 00110 00111 struct store_st 00112 { 00113 const STORE_METHOD *meth; 00114 /* functional reference if 'meth' is ENGINE-provided */ 00115 ENGINE *engine; 00116 00117 CRYPTO_EX_DATA ex_data; 00118 int references; 00119 }; 00120 #ifdef __cplusplus 00121 } 00122 #endif 00123 00124 #endif