1 /*	$NetBSD: tls_prng.h,v 1.1.1.1 2009/06/23 10:08:57 tron Exp $	*/
2 
3 #ifndef _TLS_PRNG_SRC_H_INCLUDED_
4 #define _TLS_PRNG_SRC_H_INCLUDED_
5 
6 /*++
7 /* NAME
8 /*	tls_prng_src 3h
9 /* SUMMARY
10 /*	OpenSSL PRNG maintenance routines
11 /* SYNOPSIS
12 /*	#include <tls_prng_src.h>
13 /* DESCRIPTION
14 /* .nf
15 
16  /*
17   * External interface.
18   */
19 typedef struct TLS_PRNG_SRC {
20     int     fd;				/* file handle */
21     char   *name;			/* resource name */
22     int     timeout;			/* time limit of applicable */
23 } TLS_PRNG_SRC;
24 
25 extern TLS_PRNG_SRC *tls_prng_egd_open(const char *, int);
26 extern ssize_t tls_prng_egd_read(TLS_PRNG_SRC *, size_t);
27 extern int tls_prng_egd_close(TLS_PRNG_SRC *);
28 
29 extern TLS_PRNG_SRC *tls_prng_dev_open(const char *, int);
30 extern ssize_t tls_prng_dev_read(TLS_PRNG_SRC *, size_t);
31 extern int tls_prng_dev_close(TLS_PRNG_SRC *);
32 
33 extern TLS_PRNG_SRC *tls_prng_file_open(const char *, int);
34 extern ssize_t tls_prng_file_read(TLS_PRNG_SRC *, size_t);
35 extern int tls_prng_file_close(TLS_PRNG_SRC *);
36 
37 extern TLS_PRNG_SRC *tls_prng_exch_open(const char *);
38 extern void tls_prng_exch_update(TLS_PRNG_SRC *);
39 extern void tls_prng_exch_close(TLS_PRNG_SRC *);
40 
41 /* LICENSE
42 /* .ad
43 /* .fi
44 /*	The Secure Mailer license must be distributed with this software.
45 /* AUTHOR(S)
46 /*	Wietse Venema
47 /*	IBM T.J. Watson Research
48 /*	P.O. Box 704
49 /*	Yorktown Heights, NY 10598, USA
50 /*--*/
51 
52 #endif
53