Finish parsing RSASSA-PSS parameters
diff --git a/include/polarssl/asn1.h b/include/polarssl/asn1.h
index 11f256c..eacdd08 100644
--- a/include/polarssl/asn1.h
+++ b/include/polarssl/asn1.h
@@ -97,9 +97,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 ) && \
diff --git a/include/polarssl/oid.h b/include/polarssl/oid.h
index 863cfda..c4d5c3f 100644
--- a/include/polarssl/oid.h
+++ b/include/polarssl/oid.h
@@ -209,6 +209,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
diff --git a/include/polarssl/x509.h b/include/polarssl/x509.h
index 9d3218d..7a52e36 100644
--- a/include/polarssl/x509.h
+++ b/include/polarssl/x509.h
@@ -278,7 +278,8 @@
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,