diff options
-rw-r--r-- | lib/crypto-mbedtls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/crypto-mbedtls.c b/lib/crypto-mbedtls.c index b650452..e323567 100644 --- a/lib/crypto-mbedtls.c +++ b/lib/crypto-mbedtls.c @@ -70,7 +70,7 @@ pk_init(uc_vm_t *vm, size_t nargs) 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); } @@ -131,7 +131,7 @@ pk_verify(uc_vm_t *vm, size_t nargs) uc_vm_raise_exception(vm, EXCEPTION_TYPE, "unknown MD algorithm"); const mbedtls_md_type_t md_type = mbedtls_md_get_type(md_info); - + int err = mbedtls_pk_verify(ctx, md_type, (const unsigned char*)ucv_string_get(hash), ucv_string_length(hash), (const unsigned char*)ucv_string_get(sig), ucv_string_length(sig)); @@ -141,7 +141,7 @@ pk_verify(uc_vm_t *vm, size_t nargs) mbedtls_low_level_strerr(err)); return TRUE; -} +} static const uc_function_list_t global_fns[] = { { "md_digest", md_digest }, |