mbedtls_rsa_context g_RSACtx; mbedtls_pk_init(&g_RSAKeyContex); mbedtls_pk_setup(&g_RSAKeyContex, mbedtls_pk_info_from_type((mbedtls_pk_type_t)MBEDTLS_PK_RSA)); mbedtls_pk_parse_public_key(&g_RSAKeyContex, (unsigned char*)pubKey, (size_t)keyLen); pubKey is: ---BEGIN PUBLIC...
Im trying to parse my public key with mbedtls_pk_parse_public_key to an pk_context. My code looks like this: int32_ts32Err =0; mbedtls_pk_init(&pk);int32_ttempsize =strlen(ecdsaPublic); s32Err = mbedtls_pk_parse_public_key(&pk, ecdsaPublic, tempsize +1); my ...
Using mbedtls_pk_parse_public_key will always result in: PK - The algorithm tag or value is invalid : ASN1 - ASN1 tag was of an unexpected value int error_code = 0; //only for github (Key taken from "https://tls.mbed.org/kb/cryptography/...
recently, i doing verify on rt685 using mbedtls library, but when i use mbedtls_pk_parse_public_key function. it just crash when i turn on the power and got it into hard fault. i have no idea, what it happen, and hard to debug, thanks. Tags: mbedtls rt685 ...
mbedtls_rsa_context g_RSACtx; mbedtls_pk_init(&g_RSAKeyContex); mbedtls_pk_setup(&g_RSAKeyContex, mbedtls_pk_info_from_type((mbedtls_pk_type_t)MBEDTLS_PK_RSA)); mbedtls_pk_parse_public_key(&g_RSAKeyContex, (unsigned char*)pubKey, (size_t)keyLen); ...