summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2024-09-14 22:57:01 +0200
committerMikael Magnusson <mikma@users.sourceforge.net>2024-09-14 22:57:01 +0200
commitca3883ef27453dfaa5f392c078fb0699d94e2385 (patch)
tree162176246748da15f9fab0c46ff7a73476170ffd
parentb1c08d67a052e726ad0c89002f6d9724f89f41b1 (diff)
crypto: clean up unused code
-rw-r--r--lib/crypto-mbedtls.c23
1 files changed, 0 insertions, 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);
}