]> git.ipfire.org Git - thirdparty/rng-tools.git/blobdiff - rngd_entsource.h
Add TPM RNG support.
[thirdparty/rng-tools.git] / rngd_entsource.h
index 5c9b3505790a45f679e8ea37ec6ede1673032130..dd1d116d04dbbd52561d11185883f71bbdd846b6 100644 (file)
@@ -7,7 +7,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- * 
+ *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
 /* Logic and contexts */
 extern fips_ctx_t fipsctx;             /* Context for the FIPS tests */
+extern fips_ctx_t tpm_fipsctx; /* Context for the tpm FIPS tests */
 
 /*
  * Initialize entropy source and entropy conditioning
  *
  * sourcedev is the path to the entropy source
  */
-extern void init_entropy_source(const char* sourcedev);
+extern int init_entropy_source(struct rng *);
+extern int init_tpm_entropy_source(struct rng *);
 
 /* Read data from the entropy source */
-void xread(void *buf, size_t size);
+extern int xread(void *buf, size_t size, struct rng *ent_src);
+extern int xread_tpm(void *buf, size_t size, struct rng *ent_src);
 
 #endif /* RNGD_ENTSOURCE__H */