]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Export new ABIs. Doc fixes for new APIs.
authorSimon Josefsson <simon@josefsson.org>
Wed, 14 Apr 2010 12:50:30 +0000 (14:50 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 14 Apr 2010 12:50:30 +0000 (14:50 +0200)
NEWS
lib/crypto-api.c
lib/ext_safe_renegotiation.c
lib/gnutls_algorithms.c
lib/gnutls_cert.c
lib/libgnutls.map
lib/x509/x509.c

diff --git a/NEWS b/NEWS
index 2825268575cc5bd759467d4acad011f522c8969b..0a392e90df7d391c5d180361010a9486fef62424 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -65,7 +65,6 @@ Daniel Nylander, Sergio Zanchetta, Tao Wei, and Aron Xu.
 
 ** API and ABI modifications:
 gnutls_certificate_set_verify_function: ADDED.
-gnutls_safe_renegotiation_status: ADDED.
 gnutls_cipher_decrypt: ADDED.
 gnutls_cipher_deinit: ADDED.
 gnutls_cipher_encrypt: ADDED.
@@ -85,6 +84,7 @@ gnutls_hmac_init: ADDED.
 gnutls_hmac_output: ADDED.
 gnutls_safe_negotiation_set_initial: ADDED.
 gnutls_safe_renegotiation_set: ADDED.
+gnutls_safe_renegotiation_status: ADDED.
 %UNSAFE_RENEGOTIATION: Added to priority strings
 %INITIAL_SAFE_RENEGOTIATION: Added to priority strings
 %DISABLE_SAFE_RENEGOTIATION: Added to priority strings (do not use)
index b2c724e58ec6a6bc60d64a39564cbc0e27097d45..453b8c1170b8dfe4fa97efa7a614fe76bbc0fccc 100644 (file)
  * accelerator in use.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
 int
 gnutls_cipher_init (gnutls_cipher_hd_t * handle,
                    gnutls_cipher_algorithm_t cipher,
-                   const gnutls_datum_t * key,
-                   const gnutls_datum_t * iv)
+                   const gnutls_datum_t * key, const gnutls_datum_t * iv)
 {
-  *handle = gnutls_malloc(sizeof(cipher_hd_st));
-  if (*handle == NULL) {
-    gnutls_assert();
-    return GNUTLS_E_MEMORY_ERROR;
-  }
-  
-  return _gnutls_cipher_init(((cipher_hd_st*)*handle), cipher, key, iv);
+  *handle = gnutls_malloc (sizeof (cipher_hd_st));
+  if (*handle == NULL)
+    {
+      gnutls_assert ();
+      return GNUTLS_E_MEMORY_ERROR;
+    }
+
+  return _gnutls_cipher_init (((cipher_hd_st *) * handle), cipher, key, iv);
 }
 
 /**
@@ -69,10 +71,13 @@ gnutls_cipher_init (gnutls_cipher_hd_t * handle,
  * specified by the context.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, int textlen)
+int
+gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, int textlen)
 {
-  return _gnutls_cipher_encrypt((cipher_hd_st*)handle, text, textlen);
+  return _gnutls_cipher_encrypt ((cipher_hd_st *) handle, text, textlen);
 }
 
 /**
@@ -85,13 +90,15 @@ int gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, int textlen)
  * specified by the context.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
 int
 gnutls_cipher_decrypt (gnutls_cipher_hd_t handle, void *ciphertext,
-                       int ciphertextlen)
+                      int ciphertextlen)
 {
-  return _gnutls_cipher_decrypt((cipher_hd_st*)handle, ciphertext,
-                               ciphertextlen);
+  return _gnutls_cipher_decrypt ((cipher_hd_st *) handle, ciphertext,
+                                ciphertextlen);
 }
 
 /**
@@ -100,11 +107,13 @@ gnutls_cipher_decrypt (gnutls_cipher_hd_t handle, void *ciphertext,
  *
  * This function will deinitialize all resources occupied by the given
  * encryption context.
+ *
+ * Since: 2.10.0
  **/
 void
 gnutls_cipher_deinit (gnutls_cipher_hd_t handle)
 {
-  return _gnutls_cipher_deinit((cipher_hd_st*)handle);
+  return _gnutls_cipher_deinit ((cipher_hd_st *) handle);
 }
 
 
@@ -123,19 +132,22 @@ gnutls_cipher_deinit (gnutls_cipher_hd_t handle)
  * cryptographic accelerator in use.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
 int
 gnutls_hmac_init (gnutls_hmac_hd_t * dig,
                  gnutls_digest_algorithm_t algorithm,
                  const void *key, int keylen)
 {
-  *dig = gnutls_malloc(sizeof(digest_hd_st));
-  if (*dig == NULL) {
-    gnutls_assert();
-    return GNUTLS_E_MEMORY_ERROR;
-  }
+  *dig = gnutls_malloc (sizeof (digest_hd_st));
+  if (*dig == NULL)
+    {
+      gnutls_assert ();
+      return GNUTLS_E_MEMORY_ERROR;
+    }
 
-  return _gnutls_hmac_init(((digest_hd_st*)*dig), algorithm, key, keylen);
+  return _gnutls_hmac_init (((digest_hd_st *) * dig), algorithm, key, keylen);
 }
 
 /**
@@ -148,10 +160,13 @@ gnutls_hmac_init (gnutls_hmac_hd_t * dig,
  * specified by the context.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen)
+int
+gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen)
 {
-  return _gnutls_hmac((digest_hd_st*)handle, text, textlen);
+  return _gnutls_hmac ((digest_hd_st *) handle, text, textlen);
 }
 
 /**
@@ -160,11 +175,13 @@ int gnutls_hmac (gnutls_hmac_hd_t handle, const void *text, size_t textlen)
  * @digest: is the output value of the MAC
  *
  * This function will output the current MAC value.
+ *
+ * Since: 2.10.0
  **/
 void
 gnutls_hmac_output (gnutls_hmac_hd_t handle, void *digest)
 {
-  return _gnutls_hmac_output((digest_hd_st*)handle, digest);
+  return _gnutls_hmac_output ((digest_hd_st *) handle, digest);
 }
 
 /**
@@ -174,10 +191,13 @@ gnutls_hmac_output (gnutls_hmac_hd_t handle, void *digest)
  *
  * This function will deinitialize all resources occupied by
  * the given hmac context.
+ *
+ * Since: 2.10.0
  **/
-void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest)
+void
+gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest)
 {
-  _gnutls_hmac_deinit((digest_hd_st*)handle, digest);
+  _gnutls_hmac_deinit ((digest_hd_st *) handle, digest);
 }
 
 /**
@@ -189,10 +209,12 @@ void gnutls_hmac_deinit (gnutls_hmac_hd_t handle, void *digest)
  *
  * Returns: The length or zero on error.
  *
+ * Since: 2.10.0
  **/
-int gnutls_hmac_get_len( gnutls_mac_algorithm_t algorithm)
+int
+gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm)
 {
-  return _gnutls_hmac_get_algo_len(algorithm);
+  return _gnutls_hmac_get_algo_len (algorithm);
 }
 
 /**
@@ -208,12 +230,15 @@ int gnutls_hmac_get_len( gnutls_mac_algorithm_t algorithm)
  * on a single call.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm,
-                     const void* key, int keylen,
-                     const void* text, size_t textlen, void* digest)
+int
+gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm,
+                 const void *key, int keylen,
+                 const void *text, size_t textlen, void *digest)
 {
-  return _gnutls_hmac_fast(algorithm, key, keylen, text, textlen, digest);
+  return _gnutls_hmac_fast (algorithm, key, keylen, text, textlen, digest);
 }
 
 /* HASH */
@@ -229,17 +254,20 @@ int gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm,
  * accelerator in use.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_hash_init (gnutls_hash_hd_t * dig,
-                     gnutls_digest_algorithm_t algorithm)
+int
+gnutls_hash_init (gnutls_hash_hd_t * dig, gnutls_digest_algorithm_t algorithm)
 {
-  *dig = gnutls_malloc(sizeof(digest_hd_st));
-  if (*dig == NULL) {
-    gnutls_assert();
-    return GNUTLS_E_MEMORY_ERROR;
-  }
+  *dig = gnutls_malloc (sizeof (digest_hd_st));
+  if (*dig == NULL)
+    {
+      gnutls_assert ();
+      return GNUTLS_E_MEMORY_ERROR;
+    }
 
-  return _gnutls_hash_init(((digest_hd_st*)*dig), algorithm);
+  return _gnutls_hash_init (((digest_hd_st *) * dig), algorithm);
 }
 
 /**
@@ -252,10 +280,13 @@ int gnutls_hash_init (gnutls_hash_hd_t * dig,
  * specified by the context.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_hash (gnutls_hash_hd_t handle, const void *text, size_t textlen)
+int
+gnutls_hash (gnutls_hash_hd_t handle, const void *text, size_t textlen)
 {
-  return _gnutls_hash((digest_hd_st*)handle, text, textlen);
+  return _gnutls_hash ((digest_hd_st *) handle, text, textlen);
 }
 
 /**
@@ -264,10 +295,13 @@ int gnutls_hash (gnutls_hash_hd_t handle, const void *text, size_t textlen)
  * @digest: is the output value of the hash
  *
  * This function will output the current hash value.
+ *
+ * Since: 2.10.0
  **/
-void gnutls_hash_output (gnutls_hash_hd_t handle, void *digest)
+void
+gnutls_hash_output (gnutls_hash_hd_t handle, void *digest)
 {
-  return _gnutls_hash_output((digest_hd_st*)handle, digest);
+  return _gnutls_hash_output ((digest_hd_st *) handle, digest);
 }
 
 /**
@@ -277,11 +311,13 @@ void gnutls_hash_output (gnutls_hash_hd_t handle, void *digest)
  *
  * This function will deinitialize all resources occupied by
  * the given hash context.
+ *
+ * Since: 2.10.0
  **/
 void
 gnutls_hash_deinit (gnutls_hash_hd_t handle, void *digest)
 {
-  _gnutls_hash_deinit((digest_hd_st*)handle, digest);
+  _gnutls_hash_deinit ((digest_hd_st *) handle, digest);
 }
 
 /**
@@ -293,10 +329,12 @@ gnutls_hash_deinit (gnutls_hash_hd_t handle, void *digest)
  *
  * Returns: The length or zero on error.
  *
+ * Since: 2.10.0
  **/
-int gnutls_hash_get_len( gnutls_digest_algorithm_t algorithm)
+int
+gnutls_hash_get_len (gnutls_digest_algorithm_t algorithm)
 {
-  return _gnutls_hash_get_algo_len(algorithm);
+  return _gnutls_hash_get_algo_len (algorithm);
 }
 
 /**
@@ -310,9 +348,12 @@ int gnutls_hash_get_len( gnutls_digest_algorithm_t algorithm)
  * on a single call.
  *
  * Returns: Zero or a negative value on error.
+ *
+ * Since: 2.10.0
  **/
-int gnutls_hash_fast (gnutls_digest_algorithm_t algorithm,
-                     const void *text, size_t textlen, void *digest)
+int
+gnutls_hash_fast (gnutls_digest_algorithm_t algorithm,
+                 const void *text, size_t textlen, void *digest)
 {
-  return _gnutls_hash_fast(algorithm, text, textlen, digest);
+  return _gnutls_hash_fast (algorithm, text, textlen, digest);
 }
index bb22a7121d5bb32d39331dc8e36ab3031cbfcf60..fe29f998a77f32fe1e65c1d9f4e68d09f63ed31b 100644 (file)
@@ -122,11 +122,13 @@ _gnutls_safe_renegotiation_send_params (gnutls_session_t session,
  * @session: is a #gnutls_session_t structure.
  * @value: 0 to disable and 1 to enable
  *
- * Used to enable and disable initial safe renegotiation for the current
- * session. By default it is allowed for a client to not advertise safe
- * renegotiation capability but there might be cases where signalling
- * a client of its insecurity by rejecting session might be beneficial.
- * This option has meaning only in server side.
+ * Used to enable and disable initial safe renegotiation for the
+ * current session. By default it is allowed for a client to not
+ * advertise safe renegotiation capability but there might be cases
+ * where signalling a client of its insecurity by rejecting session
+ * might be beneficial.  This option has meaning only in server side.
+ *
+ * Since: 2.10.0
  **/
 void
 gnutls_safe_negotiation_set_initial (gnutls_session_t session, int value)
@@ -143,6 +145,8 @@ gnutls_safe_negotiation_set_initial (gnutls_session_t session, int value)
  * session. Normally you shouldn't cope with this function since the
  * default (enable) is sufficient, but there might be servers that
  * cannot handle or correctly handle the extension.
+ *
+ * Since: 2.10.0
  **/
 void
 gnutls_safe_renegotiation_set (gnutls_session_t session, int value)
@@ -159,6 +163,8 @@ gnutls_safe_renegotiation_set (gnutls_session_t session, int value)
  *
  * Returns: 0 when safe renegotiation is not used and non zero when
  *   safe renegotiation is used.
+ *
+ * Since: 2.10.0
  **/
 int
 gnutls_safe_renegotiation_status (gnutls_session_t session)
index 0e2faca607114234a72b0c35f16b185b0572e020..d1ecebb5bedd4d8ba19496a4af19d48a5a236eb7 100644 (file)
@@ -814,6 +814,17 @@ _gnutls_mac_is_ok (gnutls_mac_algorithm_t algorithm)
 }
 
 /* CIPHER functions */
+
+/**
+ * gnutls_cipher_get_block_size:
+ * @algorithm: is an encryption algorithm
+ *
+ * Get block size for encryption algorithm.
+ *
+ * Returns: block size for encryption algorithm.
+ *
+ * Since: 2.10.0
+ **/
 int
 gnutls_cipher_get_block_size (gnutls_cipher_algorithm_t algorithm)
 {
index f4e59e021e474238d896e33a9481d4c47ef90f4b..42a8b9675b29bbd5b1044e50f24fed8a8e563f56 100644 (file)
@@ -445,10 +445,13 @@ void gnutls_certificate_server_set_retrieve_function
  *
  * The callback function should return 0 for the handshake to continue
  * or non-zero to terminate.
+ *
+ * Since: 2.10.0
  **/
-void gnutls_certificate_set_verify_function
-  (gnutls_certificate_credentials_t cred,
-   gnutls_certificate_verify_function * func)
+void
+gnutls_certificate_set_verify_function
+(gnutls_certificate_credentials_t cred,
+ gnutls_certificate_verify_function * func)
 {
   cred->verify_callback = func;
 }
index a69a39514fd823d51654762d57b992c651c7bd59..5dfc75d8848dbe61a6ce47899dff4b0be3b63b87 100644 (file)
@@ -599,6 +599,9 @@ GNUTLS_2_10
     gnutls_hmac_deinit;
     gnutls_hmac_output;
     gnutls_certificate_set_verify_function;
+    gnutls_safe_negotiation_set_initial;
+    gnutls_safe_renegotiation_set;
+    gnutls_safe_renegotiation_status;
 } GNUTLS_2_8;
 
 GNUTLS_PRIVATE {
index 8d27e71d6b043e080eed18ea367da8421978b4d6..173cbc12802223325901348b3fb8d4148670da1f 100644 (file)
@@ -1399,7 +1399,6 @@ gnutls_x509_crt_get_subject_alt_othername_oid (gnutls_x509_crt_t cert,
  * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned.
  *
  * Since: 2.10.0
- *
  **/
 int
 gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert,