OID functionality moved to a separate module.
A new OID module has been created that contains the main OID searching
functionality based on type-dependent arrays. A base type is used to
contain the basic values (oid_descriptor_t) and that type is extended to
contain type specific information (like a pk_alg_t).
As a result the rsa sign and verify function prototypes have changed. They
now expect a md_type_t identifier instead of the removed RSA_SIG_XXX
defines.
All OID definitions have been moved to oid.h
All OID matching code is in the OID module.
The RSA PKCS#1 functions cleaned up as a result and adapted to use the
MD layer.
The SSL layer cleanup up as a result and adapted to use the MD layer.
The X509 parser cleaned up and matches OIDs in certificates with new
module and adapted to use the MD layer.
The X509 writer cleaned up and adapted to use the MD layer.
Apps and tests modified accordingly
diff --git a/include/polarssl/config.h b/include/polarssl/config.h
index 40ea455..5d27db7 100644
--- a/include/polarssl/config.h
+++ b/include/polarssl/config.h
@@ -710,6 +710,20 @@
#define POLARSSL_NET_C
/**
+ * \def POLARSSL_OID_C
+ *
+ * Enable the OID database
+ *
+ * Module: library/oid.c
+ * Caller: library/rsa.c
+ * library/x509parse.c
+ * library/x509write.c
+ *
+ * This modules translates between OIDs and internal values.
+ */
+#define POLARSSL_OID_C
+
+/**
* \def POLARSSL_PADLOCK_C
*
* Enable VIA Padlock support on x86.
@@ -775,7 +789,7 @@
* library/ssl_tls.c
* library/x509.c
*
- * Requires: POLARSSL_BIGNUM_C
+ * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C
*
* This module is required for SSL/TLS and MD5-signed certificates.
*/
@@ -911,7 +925,8 @@
* library/ssl_srv.c
* library/ssl_tls.c
*
- * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_RSA_C
+ * Requires: POLARSSL_ASN1_PARSE_C, POLARSSL_BIGNUM_C, POLARSSL_OID_C,
+ * POLARSSL_RSA_C
*
* This module is required for X.509 certificate parsing.
*/
@@ -924,7 +939,7 @@
*
* Module: library/x509write.c
*
- * Requires: POLARSSL_BIGNUM_C, POLARSSL_RSA_C
+ * Requires: POLARSSL_BIGNUM_C, POLARSSL_OID_C, POLARSSL_RSA_C
*
* This module is required for X.509 certificate request writing.
*/