]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Renamed get_pk functions to export.
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 27 Jan 2014 14:30:03 +0000 (15:30 +0100)
committerNikos Mavrogiannopoulos <nmav@redhat.com>
Mon, 27 Jan 2014 14:30:03 +0000 (15:30 +0100)
gnutls_pubkey_export_ecc_x962 replaces gnutls_pubkey_get_pk_ecc_x962
gnutls_pubkey_export_ecc_raw replaces gnutls_pubkey_get_pk_ecc_raw
gnutls_pubkey_export_dsa_raw replaces gnutls_pubkey_get_pk_dsa_raw
gnutls_pubkey_export_rsa_raw replaces gnutls_pubkey_get_pk_rsa_raw

NEWS
lib/gnutls_privkey_raw.c
lib/gnutls_pubkey.c
lib/includes/gnutls/abstract.h
lib/libgnutls.map

diff --git a/NEWS b/NEWS
index 5900830a10a717b82b7d2110710b327e79cffa48..5e29194df69a3ff7a4249ae83de893da524bbf21 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -71,9 +71,13 @@ gnutls_privkey_generate: Added
 gnutls_pkcs11_crt_is_known: Added
 gnutls_fips140_mode_enabled: Added
 gnutls_sec_param_to_symmetric_bits: Added
-gnutls_privkey_get_pk_ecc_raw: Added
-gnutls_privkey_get_pk_dsa_raw: Added
-gnutls_privkey_get_pk_rsa_raw: Added
+gnutls_pubkey_export_ecc_x962: Added (replaces gnutls_pubkey_get_pk_ecc_x962)
+gnutls_pubkey_export_ecc_raw: Added (replaces gnutls_pubkey_get_pk_ecc_raw)
+gnutls_pubkey_export_dsa_raw: Added (replaces gnutls_pubkey_get_pk_dsa_raw)
+gnutls_pubkey_export_rsa_raw: Added (replaces gnutls_pubkey_get_pk_rsa_raw)
+gnutls_privkey_export_ecc_raw: Added
+gnutls_privkey_export_dsa_raw: Added
+gnutls_privkey_export_rsa_raw: Added
 gnutls_privkey_import_ecc_raw: Added
 gnutls_privkey_import_dsa_raw: Added
 gnutls_privkey_import_rsa_raw: Added
index 0d001a0bd138e573040ccbe34621de806c634073..dafbe11e21a6779352d7909f8a54f87f4bd6f65c 100644 (file)
@@ -35,7 +35,7 @@
 #include <abstract_int.h>
 
 /**
- * gnutls_privkey_get_pk_rsa_raw:
+ * gnutls_privkey_export_rsa_raw:
  * @key: Holds the certificate
  * @m: will hold the modulus
  * @e: will hold the public exponent
@@ -55,7 +55,7 @@
  * Since: 3.3.0
  **/
 int
-gnutls_privkey_get_pk_rsa_raw(gnutls_privkey_t key,
+gnutls_privkey_export_rsa_raw(gnutls_privkey_t key,
                                    gnutls_datum_t * m, gnutls_datum_t * e,
                                    gnutls_datum_t * d, gnutls_datum_t * p,
                                    gnutls_datum_t * q, gnutls_datum_t * u,
@@ -84,7 +84,7 @@ int ret;
 }
 
 /**
- * gnutls_privkey_get_pk_dsa_raw:
+ * gnutls_privkey_export_dsa_raw:
  * @key: Holds the public key
  * @p: will hold the p
  * @q: will hold the q
@@ -101,7 +101,7 @@ int ret;
  * Since: 3.3.0
  **/
 int
-gnutls_privkey_get_pk_dsa_raw(gnutls_privkey_t key,
+gnutls_privkey_export_dsa_raw(gnutls_privkey_t key,
                             gnutls_datum_t * p, gnutls_datum_t * q,
                             gnutls_datum_t * g, gnutls_datum_t * y,
                             gnutls_datum_t * x)
@@ -129,7 +129,7 @@ int ret;
 
 
 /**
- * gnutls_privkey_get_pk_ecc_raw:
+ * gnutls_privkey_export_ecc_raw:
  * @key: Holds the public key
  * @curve: will hold the curve
  * @x: will hold the x coordinate
@@ -145,7 +145,7 @@ int ret;
  * Since: 3.3.0
  **/
 int
-gnutls_privkey_get_pk_ecc_raw(gnutls_privkey_t key,
+gnutls_privkey_export_ecc_raw(gnutls_privkey_t key,
                                       gnutls_ecc_curve_t * curve,
                                       gnutls_datum_t * x,
                                       gnutls_datum_t * y,
index f8527d9ece29c8b5851892c6d6f51b92424a5038..18e0218d3a5bef652d2874485771288e40b13d0f 100644 (file)
@@ -772,7 +772,7 @@ gnutls_pubkey_get_key_id(gnutls_pubkey_t key, unsigned int flags,
 }
 
 /**
- * gnutls_pubkey_get_pk_rsa_raw:
+ * gnutls_pubkey_export_rsa_raw:
  * @key: Holds the certificate
  * @m: will hold the modulus
  * @e: will hold the public exponent
@@ -783,10 +783,10 @@ gnutls_pubkey_get_key_id(gnutls_pubkey_t key, unsigned int flags,
  *
  * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
  *
- * Since: 2.12.0
+ * Since: 3.3.0
  **/
 int
-gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
+gnutls_pubkey_export_rsa_raw(gnutls_pubkey_t key,
                             gnutls_datum_t * m, gnutls_datum_t * e)
 {
        int ret;
@@ -817,8 +817,9 @@ gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
        return 0;
 }
 
+
 /**
- * gnutls_pubkey_get_pk_dsa_raw:
+ * gnutls_pubkey_export_dsa_raw:
  * @key: Holds the public key
  * @p: will hold the p
  * @q: will hold the q
@@ -831,10 +832,10 @@ gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
  *
  * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
  *
- * Since: 2.12.0
+ * Since: 3.3.0
  **/
 int
-gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
+gnutls_pubkey_export_dsa_raw(gnutls_pubkey_t key,
                             gnutls_datum_t * p, gnutls_datum_t * q,
                             gnutls_datum_t * g, gnutls_datum_t * y)
 {
@@ -890,7 +891,7 @@ gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
 }
 
 /**
- * gnutls_pubkey_get_pk_ecc_raw:
+ * gnutls_pubkey_export_ecc_raw:
  * @key: Holds the public key
  * @curve: will hold the curve
  * @x: will hold x
@@ -905,7 +906,7 @@ gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
  * Since: 3.0
  **/
 int
-gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
+gnutls_pubkey_export_ecc_raw(gnutls_pubkey_t key,
                             gnutls_ecc_curve_t * curve,
                             gnutls_datum_t * x, gnutls_datum_t * y)
 {
@@ -942,7 +943,7 @@ gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
 }
 
 /**
- * gnutls_pubkey_get_pk_ecc_x962:
+ * gnutls_pubkey_export_ecc_x962:
  * @key: Holds the public key
  * @parameters: DER encoding of an ANSI X9.62 parameters
  * @ecpoint: DER encoding of ANSI X9.62 ECPoint
@@ -953,9 +954,9 @@ gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
  *
  * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code.
  *
- * Since: 3.0
+ * Since: 3.3.0
  **/
-int gnutls_pubkey_get_pk_ecc_x962(gnutls_pubkey_t key,
+int gnutls_pubkey_export_ecc_x962(gnutls_pubkey_t key,
                                  gnutls_datum_t * parameters,
                                  gnutls_datum_t * ecpoint)
 {
@@ -2096,3 +2097,58 @@ int gnutls_pubkey_import_x509_raw(gnutls_pubkey_t pkey,
 
        return ret;
 }
+
+/* ABI Compatibility functions */
+#undef gnutls_pubkey_get_pk_ecc_x962
+int gnutls_pubkey_get_pk_ecc_x962(gnutls_pubkey_t key,
+                                 gnutls_datum_t * parameters,
+                                 gnutls_datum_t * ecpoint);
+
+int gnutls_pubkey_get_pk_ecc_x962(gnutls_pubkey_t key,
+                                 gnutls_datum_t * parameters,
+                                 gnutls_datum_t * ecpoint)
+{
+       return gnutls_pubkey_export_ecc_x962(key, parameters, ecpoint);
+}
+
+#undef gnutls_pubkey_get_pk_rsa_raw
+int
+gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
+                            gnutls_datum_t * m, gnutls_datum_t * e);
+
+int
+gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
+                            gnutls_datum_t * m, gnutls_datum_t * e)
+{
+       return gnutls_pubkey_export_rsa_raw(key, m, e);
+}
+
+#undef gnutls_pubkey_get_pk_dsa_raw
+int
+gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
+                            gnutls_datum_t * p, gnutls_datum_t * q,
+                            gnutls_datum_t * g, gnutls_datum_t * y);
+
+int
+gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
+                            gnutls_datum_t * p, gnutls_datum_t * q,
+                            gnutls_datum_t * g, gnutls_datum_t * y)
+{
+       return gnutls_pubkey_export_dsa_raw(key, p, q, g, y);
+}
+
+
+#undef gnutls_pubkey_get_pk_ecc_raw
+int
+gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
+                            gnutls_ecc_curve_t * curve,
+                            gnutls_datum_t * x, gnutls_datum_t * y);
+
+int
+gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
+                            gnutls_ecc_curve_t * curve,
+                            gnutls_datum_t * x, gnutls_datum_t * y)
+{
+       return gnutls_pubkey_export_ecc_raw(key, curve, x, y);
+}
+
index 51ed11a3f4a2a895530538d31b75c5a2818c3d3f..4a1e3acf0ca4bb9f5f51d84933723cba11719f4d 100644 (file)
@@ -125,16 +125,23 @@ int gnutls_pubkey_get_preferred_hash_algorithm(gnutls_pubkey_t key,
                                               gnutls_digest_algorithm_t
                                               * hash, unsigned int *mand);
 
-int gnutls_pubkey_get_pk_rsa_raw(gnutls_pubkey_t key,
+#define gnutls_pubkey_get_pk_rsa_raw gnutls_pubkey_export_rsa_raw
+int gnutls_pubkey_export_rsa_raw(gnutls_pubkey_t key,
                                 gnutls_datum_t * m, gnutls_datum_t * e);
-int gnutls_pubkey_get_pk_dsa_raw(gnutls_pubkey_t key,
+
+#define gnutls_pubkey_get_pk_dsa_raw gnutls_pubkey_export_dsa_raw
+int gnutls_pubkey_export_dsa_raw(gnutls_pubkey_t key,
                                 gnutls_datum_t * p,
                                 gnutls_datum_t * q,
                                 gnutls_datum_t * g, gnutls_datum_t * y);
-int gnutls_pubkey_get_pk_ecc_raw(gnutls_pubkey_t key,
+
+#define gnutls_pubkey_get_pk_ecc_raw gnutls_pubkey_export_ecc_raw
+int gnutls_pubkey_export_ecc_raw(gnutls_pubkey_t key,
                                 gnutls_ecc_curve_t * curve,
                                 gnutls_datum_t * x, gnutls_datum_t * y);
-int gnutls_pubkey_get_pk_ecc_x962(gnutls_pubkey_t key,
+
+#define gnutls_pubkey_get_pk_ecc_x962 gnutls_pubkey_export_ecc_x962
+int gnutls_pubkey_export_ecc_x962(gnutls_pubkey_t key,
                                  gnutls_datum_t * parameters,
                                  gnutls_datum_t * ecpoint);
 
@@ -367,7 +374,7 @@ int gnutls_privkey_decrypt_data(gnutls_privkey_t key,
                                gnutls_datum_t * plaintext);
 
 int
-gnutls_privkey_get_pk_rsa_raw(gnutls_privkey_t key,
+gnutls_privkey_export_rsa_raw(gnutls_privkey_t key,
                                    gnutls_datum_t * m, gnutls_datum_t * e,
                                    gnutls_datum_t * d, gnutls_datum_t * p,
                                    gnutls_datum_t * q, gnutls_datum_t * u,
@@ -375,13 +382,13 @@ gnutls_privkey_get_pk_rsa_raw(gnutls_privkey_t key,
                                    gnutls_datum_t * e2);
 
 int
-gnutls_privkey_get_pk_dsa_raw(gnutls_privkey_t key,
+gnutls_privkey_export_dsa_raw(gnutls_privkey_t key,
                             gnutls_datum_t * p, gnutls_datum_t * q,
                             gnutls_datum_t * g, gnutls_datum_t * y,
                             gnutls_datum_t * x);
 
 int
-gnutls_privkey_get_pk_ecc_raw(gnutls_privkey_t key,
+gnutls_privkey_export_ecc_raw(gnutls_privkey_t key,
                                       gnutls_ecc_curve_t * curve,
                                       gnutls_datum_t * x,
                                       gnutls_datum_t * y,
index 5fffbe8f5cc21cde04d396e446d8598318afefd6..9878826db339514312aa8b7cc13a743798cc2af7 100644 (file)
@@ -930,12 +930,16 @@ GNUTLS_3_1_0 {
        gnutls_record_check_corked;
        gnutls_pkcs11_crt_is_known;
        gnutls_sec_param_to_symmetric_bits;
-       gnutls_privkey_get_pk_ecc_raw;
-       gnutls_privkey_get_pk_dsa_raw;
-       gnutls_privkey_get_pk_rsa_raw;
+       gnutls_privkey_export_ecc_raw;
+       gnutls_privkey_export_dsa_raw;
+       gnutls_privkey_export_rsa_raw;
        gnutls_privkey_import_rsa_raw;
        gnutls_privkey_import_dsa_raw;
        gnutls_privkey_import_ecc_raw;
+       gnutls_pubkey_export_ecc_x962;
+       gnutls_pubkey_export_ecc_raw;
+       gnutls_pubkey_export_dsa_raw;
+       gnutls_pubkey_export_rsa_raw;
 } GNUTLS_3_0_0;
 
 GNUTLS_PRIVATE {