#ifndef __CRD_UT10XX_TESTS_H
#define __CRD_UT10XX_TESTS_H

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

#include "crd_ut10xx.h"

typedef struct TEST_conf_t
{
	int details;
	int gen_order_reduction;
	int gen_order_inverse;
	int gen_multiples_small_ints;
	int gen_multiples_powers_of_2;
	int gen_multiples_powers_of_31;
	int ecdsa_with_sha1;
	int ecdsa_with_sha224;
	int ecdsa_with_sha256;
	int ecdsa_with_sha384;
	int ecdsa_with_sha512;
}
TEST_conf_t;

extern int TEST_prepare_device(CRD_UT10XX_t *ut, TEST_conf_t *conf);

extern int TEST_session_open(CRD_UT10XX_t *ut);
extern int TEST_session_wr_rd(CRD_UT10XX_t *ut, const unsigned char *out, int out_octets, 
	unsigned char *in, int in_octets);
extern int TEST_session_close(CRD_UT10XX_t *ut);

extern  int TEST_scan_spieeprom(CRD_UT10XX_t *ut, FILE *fd);

extern int TEST_OSSL_gen_order_reduction(CRD_UT10XX_t *ut, const TEST_conf_t *conf);
extern int TEST_OSSL_gen_order_inverse(CRD_UT10XX_t *ut, const TEST_conf_t *conf);
extern int TEST_OSSL_gen_multiples(CRD_UT10XX_t *ut, const TEST_conf_t *conf);
extern int TEST_OSSL_ecdsa(CRD_UT10XX_t *ut, const TEST_conf_t *conf);

extern int ecc_test(CRD_UT10XX_t *ut);

#endif /* __CRD_UT10XX_TESTS_H */
