crypto.h revision 68651
155714Skris/* crypto/crypto.h */
255714Skris/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
355714Skris * All rights reserved.
455714Skris *
555714Skris * This package is an SSL implementation written
655714Skris * by Eric Young (eay@cryptsoft.com).
755714Skris * The implementation was written so as to conform with Netscapes SSL.
855714Skris *
955714Skris * This library is free for commercial and non-commercial use as long as
1055714Skris * the following conditions are aheared to.  The following conditions
1155714Skris * apply to all code found in this distribution, be it the RC4, RSA,
1255714Skris * lhash, DES, etc., code; not just the SSL code.  The SSL documentation
1355714Skris * included with this distribution is covered by the same copyright terms
1455714Skris * except that the holder is Tim Hudson (tjh@cryptsoft.com).
1555714Skris *
1655714Skris * Copyright remains Eric Young's, and as such any Copyright notices in
1755714Skris * the code are not to be removed.
1855714Skris * If this package is used in a product, Eric Young should be given attribution
1955714Skris * as the author of the parts of the library used.
2055714Skris * This can be in the form of a textual message at program startup or
2155714Skris * in documentation (online or textual) provided with the package.
2255714Skris *
2355714Skris * Redistribution and use in source and binary forms, with or without
2455714Skris * modification, are permitted provided that the following conditions
2555714Skris * are met:
2655714Skris * 1. Redistributions of source code must retain the copyright
2755714Skris *    notice, this list of conditions and the following disclaimer.
2855714Skris * 2. Redistributions in binary form must reproduce the above copyright
2955714Skris *    notice, this list of conditions and the following disclaimer in the
3055714Skris *    documentation and/or other materials provided with the distribution.
3155714Skris * 3. All advertising materials mentioning features or use of this software
3255714Skris *    must display the following acknowledgement:
3355714Skris *    "This product includes cryptographic software written by
3455714Skris *     Eric Young (eay@cryptsoft.com)"
3555714Skris *    The word 'cryptographic' can be left out if the rouines from the library
3655714Skris *    being used are not cryptographic related :-).
3755714Skris * 4. If you include any Windows specific code (or a derivative thereof) from
3855714Skris *    the apps directory (application code) you must include an acknowledgement:
3955714Skris *    "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
4055714Skris *
4155714Skris * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
4255714Skris * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4355714Skris * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4455714Skris * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
4555714Skris * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
4655714Skris * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
4755714Skris * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
4855714Skris * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
4955714Skris * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
5055714Skris * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
5155714Skris * SUCH DAMAGE.
5255714Skris *
5355714Skris * The licence and distribution terms for any publically available version or
5455714Skris * derivative of this code cannot be changed.  i.e. this code cannot simply be
5555714Skris * copied and put under another distribution licence
5655714Skris * [including the GNU Public Licence.]
5755714Skris */
5855714Skris
5955714Skris#ifndef HEADER_CRYPTO_H
6055714Skris#define HEADER_CRYPTO_H
6155714Skris
6259191Skris#include <stdlib.h>
6359191Skris
6455714Skris#ifndef NO_FP_API
6555714Skris#include <stdio.h>
6655714Skris#endif
6755714Skris
6855714Skris#include <openssl/stack.h>
6959191Skris#include <openssl/safestack.h>
7055714Skris#include <openssl/opensslv.h>
7155714Skris
7255714Skris#ifdef CHARSET_EBCDIC
7355714Skris#include <openssl/ebcdic.h>
7455714Skris#endif
7555714Skris
7668651Skris/* Resolve problems on some operating systems with symbol names that clash
7768651Skris   one way or another */
7868651Skris#include <openssl/symhacks.h>
7968651Skris
8068651Skris#ifdef  __cplusplus
8168651Skrisextern "C" {
8259191Skris#endif
8359191Skris
8455714Skris/* Backward compatibility to SSLeay */
8555714Skris/* This is more to be used to check the correct DLL is being used
8655714Skris * in the MS world. */
8755714Skris#define SSLEAY_VERSION_NUMBER	OPENSSL_VERSION_NUMBER
8855714Skris#define SSLEAY_VERSION		0
8955714Skris/* #define SSLEAY_OPTIONS	1 no longer supported */
9055714Skris#define SSLEAY_CFLAGS		2
9155714Skris#define SSLEAY_BUILT_ON		3
9255714Skris#define SSLEAY_PLATFORM		4
9355714Skris
9455714Skris/* When changing the CRYPTO_LOCK_* list, be sure to maintin the text lock
9555714Skris * names in cryptlib.c
9655714Skris */
9755714Skris
9855714Skris#define	CRYPTO_LOCK_ERR			1
9955714Skris#define	CRYPTO_LOCK_ERR_HASH		2
10055714Skris#define	CRYPTO_LOCK_X509		3
10155714Skris#define	CRYPTO_LOCK_X509_INFO		4
10255714Skris#define	CRYPTO_LOCK_X509_PKEY		5
10355714Skris#define CRYPTO_LOCK_X509_CRL		6
10455714Skris#define CRYPTO_LOCK_X509_REQ		7
10555714Skris#define CRYPTO_LOCK_DSA			8
10655714Skris#define CRYPTO_LOCK_RSA			9
10755714Skris#define CRYPTO_LOCK_EVP_PKEY		10
10855714Skris#define	CRYPTO_LOCK_X509_STORE		11
10955714Skris#define	CRYPTO_LOCK_SSL_CTX		12
11055714Skris#define	CRYPTO_LOCK_SSL_CERT		13
11155714Skris#define	CRYPTO_LOCK_SSL_SESSION		14
11255714Skris#define	CRYPTO_LOCK_SSL_SESS_CERT	15
11355714Skris#define	CRYPTO_LOCK_SSL			16
11455714Skris#define	CRYPTO_LOCK_RAND		17
11555714Skris#define	CRYPTO_LOCK_MALLOC		18
11655714Skris#define	CRYPTO_LOCK_BIO			19
11755714Skris#define	CRYPTO_LOCK_GETHOSTBYNAME	20
11855714Skris#define	CRYPTO_LOCK_GETSERVBYNAME	21
11955714Skris#define	CRYPTO_LOCK_READDIR		22
12055714Skris#define	CRYPTO_LOCK_RSA_BLINDING	23
12159191Skris#define	CRYPTO_LOCK_DH			24
12259191Skris#define	CRYPTO_LOCK_MALLOC2		25
12368651Skris#define	CRYPTO_LOCK_DSO			26
12468651Skris#define	CRYPTO_LOCK_DYNLOCK		27
12568651Skris#define	CRYPTO_NUM_LOCKS		28
12655714Skris
12755714Skris#define CRYPTO_LOCK		1
12855714Skris#define CRYPTO_UNLOCK		2
12955714Skris#define CRYPTO_READ		4
13055714Skris#define CRYPTO_WRITE		8
13155714Skris
13255714Skris#ifndef NO_LOCKING
13355714Skris#ifndef CRYPTO_w_lock
13455714Skris#define CRYPTO_w_lock(type)	\
13555714Skris	CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
13655714Skris#define CRYPTO_w_unlock(type)	\
13755714Skris	CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
13855714Skris#define CRYPTO_r_lock(type)	\
13955714Skris	CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
14055714Skris#define CRYPTO_r_unlock(type)	\
14155714Skris	CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
14255714Skris#define CRYPTO_add(addr,amount,type)	\
14355714Skris	CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
14455714Skris#endif
14555714Skris#else
14655714Skris#define CRYPTO_w_lock(a)
14755714Skris#define	CRYPTO_w_unlock(a)
14855714Skris#define CRYPTO_r_lock(a)
14955714Skris#define CRYPTO_r_unlock(a)
15055714Skris#define CRYPTO_add(a,b,c)	((*(a))+=(b))
15155714Skris#endif
15255714Skris
15368651Skris/* Some applications as well as some parts of OpenSSL need to allocate
15468651Skris   and deallocate locks in a dynamic fashion.  The following typedef
15568651Skris   makes this possible in a type-safe manner.  */
15668651Skris/* struct CRYPTO_dynlock_value has to be defined by the application. */
15768651Skristypedef struct
15868651Skris	{
15968651Skris	int references;
16068651Skris	struct CRYPTO_dynlock_value *data;
16168651Skris	} CRYPTO_dynlock;
16268651Skris
16368651Skris
16455714Skris/* The following can be used to detect memory leaks in the SSLeay library.
16555714Skris * It used, it turns on malloc checking */
16655714Skris
16755714Skris#define CRYPTO_MEM_CHECK_OFF	0x0	/* an enume */
16855714Skris#define CRYPTO_MEM_CHECK_ON	0x1	/* a bit */
16955714Skris#define CRYPTO_MEM_CHECK_ENABLE	0x2	/* a bit */
17055714Skris#define CRYPTO_MEM_CHECK_DISABLE 0x3	/* an enume */
17155714Skris
17259191Skris/* The following are bit values to turn on or off options connected to the
17359191Skris * malloc checking functionality */
17455714Skris
17559191Skris/* Adds time to the memory checking information */
17659191Skris#define V_CRYPTO_MDEBUG_TIME	0x1 /* a bit */
17759191Skris/* Adds thread number to the memory checking information */
17859191Skris#define V_CRYPTO_MDEBUG_THREAD	0x2 /* a bit */
17959191Skris
18059191Skris#define V_CRYPTO_MDEBUG_ALL (V_CRYPTO_MDEBUG_TIME | V_CRYPTO_MDEBUG_THREAD)
18159191Skris
18259191Skris
18355714Skris/* predec of the BIO type */
18455714Skristypedef struct bio_st BIO_dummy;
18555714Skris
18655714Skristypedef struct crypto_ex_data_st
18755714Skris	{
18855714Skris	STACK *sk;
18955714Skris	int dummy; /* gcc is screwing up this data structure :-( */
19055714Skris	} CRYPTO_EX_DATA;
19155714Skris
19259191Skris/* Called when a new object is created */
19359191Skristypedef int CRYPTO_EX_new(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
19459191Skris					int idx, long argl, void *argp);
19559191Skris/* Called when an object is free()ed */
19659191Skristypedef void CRYPTO_EX_free(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
19759191Skris					int idx, long argl, void *argp);
19859191Skris/* Called when we need to dup an object */
19959191Skristypedef int CRYPTO_EX_dup(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
20059191Skris					int idx, long argl, void *argp);
20159191Skris
20255714Skris/* This stuff is basically class callback functions
20359191Skris * The current classes are SSL_CTX, SSL, SSL_SESSION, and a few more */
20459191Skris
20555714Skristypedef struct crypto_ex_data_func_st
20655714Skris	{
20755714Skris	long argl;	/* Arbitary long */
20859191Skris	void *argp;	/* Arbitary void * */
20959191Skris	CRYPTO_EX_new *new_func;
21059191Skris	CRYPTO_EX_free *free_func;
21159191Skris	CRYPTO_EX_dup *dup_func;
21255714Skris	} CRYPTO_EX_DATA_FUNCS;
21355714Skris
21459191SkrisDECLARE_STACK_OF(CRYPTO_EX_DATA_FUNCS)
21559191Skris
21655714Skris/* Per class, we have a STACK of CRYPTO_EX_DATA_FUNCS for each CRYPTO_EX_DATA
21755714Skris * entry.
21855714Skris */
21955714Skris
22055714Skris#define CRYPTO_EX_INDEX_BIO		0
22155714Skris#define CRYPTO_EX_INDEX_SSL		1
22255714Skris#define CRYPTO_EX_INDEX_SSL_CTX		2
22355714Skris#define CRYPTO_EX_INDEX_SSL_SESSION	3
22455714Skris#define CRYPTO_EX_INDEX_X509_STORE	4
22555714Skris#define CRYPTO_EX_INDEX_X509_STORE_CTX	5
22655714Skris
22759191Skris
22859191Skris/* This is the default callbacks, but we can have others as well:
22959191Skris * this is needed in Win32 where the application malloc and the
23059191Skris * library malloc may not be the same.
23159191Skris */
23255714Skris#define CRYPTO_malloc_init()	CRYPTO_set_mem_functions(\
23359191Skris	malloc, realloc, free)
23455714Skris
23559191Skris#if defined CRYPTO_MDEBUG_ALL || defined CRYPTO_MDEBUG_TIME || defined CRYPTO_MDEBUG_THREAD
23655714Skris# ifndef CRYPTO_MDEBUG /* avoid duplicate #define */
23755714Skris#  define CRYPTO_MDEBUG
23855714Skris# endif
23955714Skris#endif
24055714Skris
24159191Skris/* Set standard debugging functions (not done by default
24259191Skris * unless CRYPTO_MDEBUG is defined) */
24359191Skris#define CRYPTO_malloc_debug_init()	do {\
24459191Skris	CRYPTO_set_mem_debug_functions(\
24568651Skris		CRYPTO_dbg_malloc,\
24668651Skris		CRYPTO_dbg_realloc,\
24768651Skris		CRYPTO_dbg_free,\
24868651Skris		CRYPTO_dbg_set_options,\
24968651Skris		CRYPTO_dbg_get_options);\
25059191Skris	} while(0)
25159191Skris
25259191Skrisint CRYPTO_mem_ctrl(int mode);
25359191Skrisint CRYPTO_is_mem_check_on(void);
25459191Skris
25559191Skris/* for applications */
25655714Skris#define MemCheck_start() CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON)
25755714Skris#define MemCheck_stop()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF)
25859191Skris
25959191Skris/* for library-internal use */
26055714Skris#define MemCheck_on()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ENABLE)
26155714Skris#define MemCheck_off()	CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_DISABLE)
26259191Skris#define is_MemCheck_on() CRYPTO_is_mem_check_on()
26359191Skris
26468651Skris#define OPENSSL_malloc(num)	CRYPTO_malloc((int)num,__FILE__,__LINE__)
26568651Skris#define OPENSSL_realloc(addr,num) \
26659191Skris	CRYPTO_realloc((char *)addr,(int)num,__FILE__,__LINE__)
26768651Skris#define OPENSSL_remalloc(addr,num) \
26859191Skris	CRYPTO_remalloc((char **)addr,(int)num,__FILE__,__LINE__)
26968651Skris#define OPENSSL_freeFunc	CRYPTO_free
27068651Skris#define OPENSSL_free(addr)	CRYPTO_free(addr)
27159191Skris
27268651Skris#define OPENSSL_malloc_locked(num) \
27368651Skris	CRYPTO_malloc_locked((int)num,__FILE__,__LINE__)
27468651Skris#define OPENSSL_free_locked(addr) CRYPTO_free_locked(addr)
27555714Skris
27659191Skris
27755714Skrisconst char *SSLeay_version(int type);
27855714Skrisunsigned long SSLeay(void);
27955714Skris
28059191Skrisint CRYPTO_get_ex_new_index(int idx, STACK_OF(CRYPTO_EX_DATA_FUNCS) **skp, long argl, void *argp,
28159191Skris	     CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
28259191Skrisint CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
28359191Skrisvoid *CRYPTO_get_ex_data(CRYPTO_EX_DATA *ad,int idx);
28459191Skrisint CRYPTO_dup_ex_data(STACK_OF(CRYPTO_EX_DATA_FUNCS) *meth, CRYPTO_EX_DATA *to,
28559191Skris	     CRYPTO_EX_DATA *from);
28659191Skrisvoid CRYPTO_free_ex_data(STACK_OF(CRYPTO_EX_DATA_FUNCS) *meth, void *obj, CRYPTO_EX_DATA *ad);
28759191Skrisvoid CRYPTO_new_ex_data(STACK_OF(CRYPTO_EX_DATA_FUNCS) *meth, void *obj, CRYPTO_EX_DATA *ad);
28855714Skris
28955714Skrisint CRYPTO_get_new_lockid(char *name);
29055714Skris
29155714Skrisint CRYPTO_num_locks(void); /* return CRYPTO_NUM_LOCKS (shared libs!) */
29255714Skrisvoid CRYPTO_lock(int mode, int type,const char *file,int line);
29355714Skrisvoid CRYPTO_set_locking_callback(void (*func)(int mode,int type,
29455714Skris					      const char *file,int line));
29555714Skrisvoid (*CRYPTO_get_locking_callback(void))(int mode,int type,const char *file,
29655714Skris		int line);
29755714Skrisvoid CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount,int type,
29855714Skris					      const char *file, int line));
29955714Skrisint (*CRYPTO_get_add_lock_callback(void))(int *num,int mount,int type,
30055714Skris					  const char *file,int line);
30155714Skrisvoid CRYPTO_set_id_callback(unsigned long (*func)(void));
30255714Skrisunsigned long (*CRYPTO_get_id_callback(void))(void);
30355714Skrisunsigned long CRYPTO_thread_id(void);
30455714Skrisconst char *CRYPTO_get_lock_name(int type);
30555714Skrisint CRYPTO_add_lock(int *pointer,int amount,int type, const char *file,
30655714Skris		    int line);
30755714Skris
30868651Skrisint CRYPTO_get_new_dynlockid(void);
30968651Skrisvoid CRYPTO_destroy_dynlockid(int i);
31068651Skrisstruct CRYPTO_dynlock_value *CRYPTO_get_dynlock_value(int i);
31168651Skrisvoid CRYPTO_set_dynlock_create_callback(struct CRYPTO_dynlock_value *(*dyn_create_function)(const char *file, int line));
31268651Skrisvoid CRYPTO_set_dynlock_lock_callback(void (*dyn_lock_function)(int mode, struct CRYPTO_dynlock_value *l, const char *file, int line));
31368651Skrisvoid CRYPTO_set_dynlock_destroy_callback(void (*dyn_destroy_function)(struct CRYPTO_dynlock_value *l, const char *file, int line));
31468651Skrisstruct CRYPTO_dynlock_value *(*CRYPTO_get_dynlock_create_callback(void))(const char *file,int line);
31568651Skrisvoid (*CRYPTO_get_dynlock_lock_callback(void))(int mode, struct CRYPTO_dynlock_value *l, const char *file,int line);
31668651Skrisvoid (*CRYPTO_get_dynlock_destroy_callback(void))(struct CRYPTO_dynlock_value *l, const char *file,int line);
31768651Skris
31859191Skris/* CRYPTO_set_mem_functions includes CRYPTO_set_locked_mem_functions --
31959191Skris * call the latter last if you need different functions */
32059191Skrisint CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *));
32159191Skrisint CRYPTO_set_locked_mem_functions(void *(*m)(size_t), void (*free_func)(void *));
32268651Skrisint CRYPTO_set_mem_debug_functions(void (*m)(void *,int,const char *,int,int),
32368651Skris				   void (*r)(void *,void *,int,const char *,int,int),
32468651Skris				   void (*f)(void *,int),
32568651Skris				   void (*so)(long),
32668651Skris				   long (*go)(void));
32759191Skrisvoid CRYPTO_get_mem_functions(void *(**m)(size_t),void *(**r)(void *, size_t), void (**f)(void *));
32859191Skrisvoid CRYPTO_get_locked_mem_functions(void *(**m)(size_t), void (**f)(void *));
32968651Skrisvoid CRYPTO_get_mem_debug_functions(void (**m)(void *,int,const char *,int,int),
33068651Skris				    void (**r)(void *,void *,int,const char *,int,int),
33168651Skris				    void (**f)(void *,int),
33268651Skris				    void (**so)(long),
33368651Skris				    long (**go)(void));
33455714Skris
33559191Skrisvoid *CRYPTO_malloc_locked(int num, const char *file, int line);
33655714Skrisvoid CRYPTO_free_locked(void *);
33759191Skrisvoid *CRYPTO_malloc(int num, const char *file, int line);
33855714Skrisvoid CRYPTO_free(void *);
33959191Skrisvoid *CRYPTO_realloc(void *addr,int num, const char *file, int line);
34059191Skrisvoid *CRYPTO_remalloc(void *addr,int num, const char *file, int line);
34155714Skris
34259191Skrisvoid CRYPTO_set_mem_debug_options(long bits);
34359191Skrislong CRYPTO_get_mem_debug_options(void);
34459191Skris
34559191Skris#define CRYPTO_push_info(info) \
34659191Skris        CRYPTO_push_info_(info, __FILE__, __LINE__);
34759191Skrisint CRYPTO_push_info_(const char *info, const char *file, int line);
34859191Skrisint CRYPTO_pop_info(void);
34959191Skrisint CRYPTO_remove_all_info(void);
35059191Skris
35159191Skris/* The last argument has the following significance:
35259191Skris *
35359191Skris * 0:	called before the actual memory allocation has taken place
35459191Skris * 1:	called after the actual memory allocation has taken place
35559191Skris */
35659191Skrisvoid CRYPTO_dbg_malloc(void *addr,int num,const char *file,int line,int before_p);
35759191Skrisvoid CRYPTO_dbg_realloc(void *addr1,void *addr2,int num,const char *file,int line,int before_p);
35859191Skrisvoid CRYPTO_dbg_free(void *addr,int before_p);
35959191Skris
36059191Skris/* Tell the debugging code about options.  By default, the following values
36159191Skris * apply:
36259191Skris *
36359191Skris * 0:	Clear all options.
36459191Skris * 1:	Set the "Show Time" option.
36559191Skris * 2:	Set the "Show Thread Number" option.
36659191Skris * 3:	1 + 2
36759191Skris */
36859191Skrisvoid CRYPTO_dbg_set_options(long bits);
36959191Skrislong CRYPTO_dbg_get_options(void);
37059191Skris
37155714Skris#ifndef NO_FP_API
37255714Skrisvoid CRYPTO_mem_leaks_fp(FILE *);
37355714Skris#endif
37455714Skrisvoid CRYPTO_mem_leaks(struct bio_st *bio);
37555714Skris/* unsigned long order, char *file, int line, int num_bytes, char *addr */
37668651Skrisvoid CRYPTO_mem_leaks_cb(void (*cb)(unsigned long, const char *, int, int, void *));
37755714Skris
37859191Skrisvoid ERR_load_CRYPTO_strings(void);
37955714Skris
38055714Skris/* BEGIN ERROR CODES */
38155714Skris/* The following lines are auto generated by the script mkerr.pl. Any changes
38255714Skris * made after this point may be overwritten when the script is next run.
38355714Skris */
38455714Skris
38555714Skris/* Error codes for the CRYPTO functions. */
38655714Skris
38755714Skris/* Function codes. */
38855714Skris#define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX		 100
38968651Skris#define CRYPTO_F_CRYPTO_GET_NEW_DYNLOCKID		 103
39055714Skris#define CRYPTO_F_CRYPTO_GET_NEW_LOCKID			 101
39155714Skris#define CRYPTO_F_CRYPTO_SET_EX_DATA			 102
39255714Skris
39355714Skris/* Reason codes. */
39468651Skris#define CRYPTO_R_NO_DYNLOCK_CREATE_CALLBACK		 100
39555714Skris
39655714Skris#ifdef  __cplusplus
39755714Skris}
39855714Skris#endif
39955714Skris#endif
40055714Skris
401