Skip to content

Commit d8d31c1

Browse files
author
Ivan Stoev
committed
Patch mbedtls.
1 parent 92622da commit d8d31c1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pCloudCC/lib/mbedtls/library/pkparse.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,6 +1243,17 @@ int pk_parse_public_key( pk_context *ctx,
12431243

12441244
ret = pk_parse_subpubkey( &p, p + keylen, ctx );
12451245

1246+
#if defined(POLARSSL_RSA_C)
1247+
if( ret != 0 )
1248+
{
1249+
pk_init_ctx( ctx, pk_info_from_type( POLARSSL_PK_RSA ) );
1250+
p = (unsigned char *) key;
1251+
ret = pk_get_rsapubkey( &p, p + keylen, pk_rsa( *ctx ) );
1252+
if( ret != 0)
1253+
pk_free( ctx );
1254+
}
1255+
#endif /* POLARSSL_RSA_C */
1256+
12461257
#if defined(POLARSSL_PEM_PARSE_C)
12471258
pem_free( &pem );
12481259
#endif

0 commit comments

Comments
 (0)