1 /* gcrypt-testapi.h - Definitiona for the Regression test API 2 * Copyright (C) 2016 g10 Code GmbH 3 * 4 * This file is part of Libgcrypt. 5 * 6 * Libgcrypt is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU Lesser General Public License as 8 * published by the Free Software Foundation; either version 2.1 of 9 * the License, or (at your option) any later version. 10 * 11 * Libgcrypt is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU Lesser General Public License for more details. 15 * 16 * You should have received a copy of the GNU Lesser General Public 17 * License along with this program; if not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 /* 21 * WARNING: This is a private API to be used by regression tests. In 22 * particular this API does not constitute a well defined ABI. The 23 * header may only be used with its matching Libgcrypt version. 24 */ 25 26 #ifndef GCRY_GCRYPT_TESTAPI_H 27 #define GCRY_GCRYPT_TESTAPI_H 28 29 /* For use with gcry_control: */ 30 #define PRIV_CTL_INIT_EXTRNG_TEST 58 31 #define PRIV_CTL_RUN_EXTRNG_TEST 59 32 #define PRIV_CTL_DEINIT_EXTRNG_TEST 60 33 #define PRIV_CTL_EXTERNAL_LOCK_TEST 61 34 #define PRIV_CTL_DUMP_SECMEM_STATS 62 35 36 #define EXTERNAL_LOCK_TEST_INIT 30111 37 #define EXTERNAL_LOCK_TEST_LOCK 30112 38 #define EXTERNAL_LOCK_TEST_UNLOCK 30113 39 #define EXTERNAL_LOCK_TEST_DESTROY 30114 40 41 /* For use with gcry_cipher_ctl: */ 42 #define PRIV_CIPHERCTL_DISABLE_WEAK_KEY 61 43 #define PRIV_CIPHERCTL_GET_INPUT_VECTOR 62 44 45 46 /* Private interfaces for testing of random-drbg.c. */ 47 struct gcry_drbg_test_vector 48 { 49 const char *flagstr; 50 unsigned char *entropy; 51 size_t entropylen; 52 unsigned char *entpra; 53 unsigned char *entprb; 54 size_t entprlen; 55 unsigned char *addtla; 56 unsigned char *addtlb; 57 size_t addtllen; 58 unsigned char *pers; 59 size_t perslen; 60 unsigned char *expected; 61 size_t expectedlen; 62 unsigned char *entropyreseed; 63 size_t entropyreseed_len; 64 unsigned char *addtl_reseed; 65 size_t addtl_reseed_len; 66 }; 67 68 69 #endif /*GCRY_GCRYPT_TESTAPI_H*/ 70