mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-29 11:41:15 +03:00
Finish parsing RSASSA-PSS parameters
This commit is contained in:
@ -93,9 +93,13 @@
|
||||
/** Returns the size of the binary string, without the trailing \\0 */
|
||||
#define OID_SIZE(x) (sizeof(x) - 1)
|
||||
|
||||
/** Compares two asn1_buf structures for the same OID. Only works for
|
||||
* 'defined' oid_str values (OID_HMAC_SHA1), you cannot use a 'unsigned
|
||||
* char *oid' here!
|
||||
/**
|
||||
* Compares an asn1_buf structure to a reference OID.
|
||||
*
|
||||
* Only works for 'defined' oid_str values (OID_HMAC_SHA1), you cannot use a
|
||||
* 'unsigned char *oid' here!
|
||||
*
|
||||
* Warning: returns true when the OIDs are equal (unlike memcmp)!
|
||||
*/
|
||||
#define OID_CMP(oid_str, oid_buf) \
|
||||
( ( OID_SIZE(oid_str) == (oid_buf)->len ) && \
|
||||
|
@ -195,6 +195,7 @@
|
||||
|
||||
/* RFC 4055 */
|
||||
#define OID_RSASSA_PSS OID_PKCS1 "\x0a" /**< id-RSASSA-PSS ::= { pkcs-1 10 } */
|
||||
#define OID_MGF1 OID_PKCS1 "\x08" /**< id-mgf1 ::= { pkcs-1 8 } */
|
||||
|
||||
/*
|
||||
* Digest algorithms
|
||||
|
@ -256,7 +256,8 @@ int x509_get_alg_null( unsigned char **p, const unsigned char *end,
|
||||
x509_buf *alg );
|
||||
int x509_get_alg( unsigned char **p, const unsigned char *end,
|
||||
x509_buf *alg, x509_buf *params );
|
||||
int x509_get_rsassa_pss_params( const x509_buf *params, md_type_t *md_alg,
|
||||
int x509_get_rsassa_pss_params( const x509_buf *params,
|
||||
md_type_t *md_alg, md_type_t *mgf_md,
|
||||
int *salt_len, int *trailer_field );
|
||||
int x509_get_sig( unsigned char **p, const unsigned char *end, x509_buf *sig );
|
||||
int x509_get_sig_alg( const x509_buf *sig_oid, md_type_t *md_alg,
|
||||
|
Reference in New Issue
Block a user