mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-24 00:06:32 +01:00
Add test for x509write_key
This commit is contained in:
parent
0088c69fbf
commit
7f1f0926e4
3 changed files with 33 additions and 21 deletions
|
|
@ -563,27 +563,6 @@ int x509write_key_der( rsa_context *rsa, unsigned char *buf, size_t size )
|
|||
ASN1_CHK_ADD( len, asn1_write_len( &c, buf, len ) );
|
||||
ASN1_CHK_ADD( len, asn1_write_tag( &c, buf, ASN1_CONSTRUCTED | ASN1_SEQUENCE ) );
|
||||
|
||||
// TODO: Make NON RSA Specific variant later on
|
||||
/* *--c = 0;
|
||||
len += 1;
|
||||
|
||||
len += asn1_write_len( &c, len);
|
||||
len += asn1_write_tag( &c, ASN1_BIT_STRING );
|
||||
|
||||
len += asn1_write_oid( &c, OID_PKCS1_RSA );
|
||||
|
||||
len += asn1_write_int( &c, 0 );
|
||||
|
||||
len += asn1_write_len( &c, len);
|
||||
len += asn1_write_tag( &c, ASN1_CONSTRUCTED | ASN1_SEQUENCE );*/
|
||||
|
||||
/* for(i = 0; i < len; ++i)
|
||||
{
|
||||
if (i % 16 == 0 ) printf("\n");
|
||||
printf("%02x ", c[i]);
|
||||
}
|
||||
printf("\n");*/
|
||||
|
||||
return( len );
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue