]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Added gnutls_x509_dn_oid_name().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Jan 2012 22:34:53 +0000 (23:34 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Mon, 9 Jan 2012 22:34:53 +0000 (23:34 +0100)
NEWS
lib/includes/gnutls/x509.h
lib/libgnutls.map
lib/x509/common.c
lib/x509/common.h
lib/x509/dn.c

diff --git a/NEWS b/NEWS
index 5ff929a5e8079c834f11c0dac51b5c85c0b0309c..da74964ca33ee9307b93940b87029d2360fdb60b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -10,9 +10,12 @@ and public keys as well.
 ** libgnutls: Corrected memory leak in DH parameter
 generation.
 
+** libgnutls: Added gnutls_x509_dn_oid_name() to 
+return a descriptive name of a DN OID.
+
 ** API and ABI modifications:
 gnutls_pubkey_encrypt_data: Added
-
+gnutls_x509_dn_oid_name: Added
 
 * Version 3.0.11 (released 2012-01-06)
 
index 2ade033d95c1585c97fb8f4b67d3b50a5700e9ec..e34f372140343cef17a2d5946767503a24bc5795 100644 (file)
@@ -295,6 +295,8 @@ extern "C"
 
   int gnutls_x509_dn_oid_known (const char *oid);
 
+  const char* gnutls_x509_dn_oid_name (const char *oid);
+
   /* Read extensions by OID. */
   int gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx,
                                          void *oid, size_t * oid_size);
index 81b0cef289346673465950457397d2d69ca93f5e..d570cb1cb542fdbfd473b067374a351a177e2c01 100644 (file)
@@ -728,6 +728,7 @@ GNUTLS_3_0_0 {
        gnutls_priority_get_cipher_suite_index;
        gnutls_random_art;
        gnutls_pubkey_encrypt_data;
+       gnutls_x509_dn_oid_name;
 } GNUTLS_2_12;
 
 GNUTLS_PRIVATE {
index 69db11db7022fcd37f6319e4cb9098b5cd812470..ce84d379eea37216b23f9e99a39535a081d2ac42 100644 (file)
@@ -171,8 +171,18 @@ _gnutls_x509_oid_data_choice (const char *oid)
   return 0;
 }
 
-const char *
-_gnutls_x509_oid2ldap_string (const char *oid)
+/**
+ * gnutls_x509_dn_oid_name:
+ * @oid: holds an Object Identifier in a null terminated string
+ *
+ * This function will return the name of a known DN OID. 
+ *
+ * Returns: A null terminated string or NULL otherwise.
+ *
+ * Since: 3.0.0
+ **/
+const char*
+gnutls_x509_dn_oid_name (const char *oid)
 {
   int i = 0;
 
index 1d6caaf23d35c56779cbc410179c8e928d1ef588..ec6a6cd4310995470cf760f466d6c04478441028 100644 (file)
@@ -79,8 +79,6 @@ int _gnutls_x509_data2hex (const opaque * data, size_t data_size,
 
 const char *_gnutls_x509_oid2asn_string (const char *oid);
 
-const char *_gnutls_x509_oid2ldap_string (const char *OID);
-
 int _gnutls_x509_oid_data_choice (const char *OID);
 int _gnutls_x509_oid_data_printable (const char *OID);
 
index 1cfe3a07bc3803ae2223cef97c26fe48e126595d..fd9052ea4bfef6711606a3a08ba81e933b19195c 100644 (file)
@@ -42,7 +42,7 @@ oid2ldap_string (const char *oid)
 {
   const char *ret;
 
-  ret = _gnutls_x509_oid2ldap_string (oid);
+  ret = gnutls_x509_dn_oid_name (oid);
   if (ret)
     return ret;