From ca3883ef27453dfaa5f392c078fb0699d94e2385 Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Sat, 14 Sep 2024 22:57:01 +0200 Subject: crypto: clean up unused code --- lib/crypto-mbedtls.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/lib/crypto-mbedtls.c b/lib/crypto-mbedtls.c index e4a3b1e..1cc9a99 100644 --- a/lib/crypto-mbedtls.c +++ b/lib/crypto-mbedtls.c @@ -42,35 +42,12 @@ md_digest(uc_vm_t *vm, size_t nargs) return rv; } -#if 0 - -static uc_value_t * -ecsa_verify(uc_vm_t *vm, size_t nargs) -{ - // Read key from 0x04 | x | y - int mbedtls_ecp_point_read_binary(const mbedtls_ecp_group *grp, - mbedtls_ecp_point *pt, - const unsigned char *buf, size_t ilen); - - // Verify - int mbedtls_ecdsa_verify(mbedtls_ecp_group *grp, - const unsigned char *buf, size_t blen, - const mbedtls_ecp_point *Q, - const mbedtls_mpi *r, - const mbedtls_mpi *s); -} -#endif - static uc_value_t * pk_init(uc_vm_t *vm, size_t nargs) { - const mbedtls_pk_info_t *info = mbedtls_pk_info_from_type(MBEDTLS_PK_ECDSA); mbedtls_pk_context *ctx = malloc(sizeof(mbedtls_pk_context)); mbedtls_pk_init(ctx); - /* if (mbedtls_pk_setup(ctx, info)) */ - /* uc_vm_raise_exception(vm, EXCEPTION_RUNTIME, "ECDSA not available"); */ - return uc_resource_new(pk_type, ctx); } -- cgit v1.2.3