diff options
75 files changed, 524 insertions, 536 deletions
diff --git a/lib/algorithms/cert_types.c b/lib/algorithms/cert_types.c index b0f2a8851d..12b8151dba 100644 --- a/lib/algorithms/cert_types.c +++ b/lib/algorithms/cert_types.c @@ -84,7 +84,7 @@ static const gnutls_certificate_type_t supported_certificate_types[] = { * OpenPGP certificates, you must link to libgnutls-extra and call * gnutls_global_init_extra(). * - * Returns: a zero-terminated list of #gnutls_certificate_type_t + * Returns: a (0)-terminated list of #gnutls_certificate_type_t * integers indicating the available certificate types. **/ const gnutls_certificate_type_t * diff --git a/lib/algorithms/ciphers.c b/lib/algorithms/ciphers.c index 7b845f9bfa..9bcd4d9c86 100644 --- a/lib/algorithms/ciphers.c +++ b/lib/algorithms/ciphers.c @@ -237,7 +237,7 @@ gnutls_cipher_get_id (const char *name) * * This function is not thread safe. * - * Returns: a zero-terminated list of #gnutls_cipher_algorithm_t + * Returns: a (0)-terminated list of #gnutls_cipher_algorithm_t * integers indicating the available ciphers. * **/ diff --git a/lib/algorithms/ecc.c b/lib/algorithms/ecc.c index 53a89209f3..4360aef00f 100644 --- a/lib/algorithms/ecc.c +++ b/lib/algorithms/ecc.c @@ -279,7 +279,7 @@ _gnutls_ecc_curve_get_params (gnutls_ecc_curve_t curve) * * Returns the size in bytes of the curve. * - * Returns: a the size or zero. + * Returns: a the size or (0). **/ int gnutls_ecc_curve_get_size (gnutls_ecc_curve_t curve) { diff --git a/lib/algorithms/kx.c b/lib/algorithms/kx.c index f3e2196afa..23a71527aa 100644 --- a/lib/algorithms/kx.c +++ b/lib/algorithms/kx.c @@ -203,7 +203,7 @@ gnutls_kx_get_id (const char *name) * * This function is not thread safe. * - * Returns: a zero-terminated list of #gnutls_kx_algorithm_t integers + * Returns: a (0)-terminated list of #gnutls_kx_algorithm_t integers * indicating the available key exchange algorithms. **/ const gnutls_kx_algorithm_t * diff --git a/lib/algorithms/mac.c b/lib/algorithms/mac.c index 9390d1364f..6725d88cb4 100644 --- a/lib/algorithms/mac.c +++ b/lib/algorithms/mac.c @@ -147,7 +147,7 @@ gnutls_mac_get_key_size (gnutls_mac_algorithm_t algorithm) * * This function is not thread safe. * - * Returns: Return a zero-terminated list of #gnutls_mac_algorithm_t + * Returns: Return a (0)-terminated list of #gnutls_mac_algorithm_t * integers indicating the available MACs. **/ const gnutls_mac_algorithm_t * diff --git a/lib/algorithms/protocols.c b/lib/algorithms/protocols.c index 33229764f8..26b5e1ae65 100644 --- a/lib/algorithms/protocols.c +++ b/lib/algorithms/protocols.c @@ -162,7 +162,7 @@ gnutls_protocol_get_id (const char *name) * * This function is not threat safe. * - * Returns: a zero-terminated list of #gnutls_protocol_t integers + * Returns: a (0)-terminated list of #gnutls_protocol_t integers * indicating the available protocols. * **/ diff --git a/lib/algorithms/publickey.c b/lib/algorithms/publickey.c index 5018f779b2..05e0ba1e32 100644 --- a/lib/algorithms/publickey.c +++ b/lib/algorithms/publickey.c @@ -140,7 +140,7 @@ gnutls_pk_algorithm_get_name (gnutls_pk_algorithm_t algorithm) * * This function is not thread safe. * - * Returns: a zero-terminated list of #gnutls_pk_algorithm_t integers + * Returns: a (0)-terminated list of #gnutls_pk_algorithm_t integers * indicating the available ciphers. * * Since: 2.6.0 diff --git a/lib/algorithms/secparams.c b/lib/algorithms/secparams.c index b9bb0e34a3..c3acfe5552 100644 --- a/lib/algorithms/secparams.c +++ b/lib/algorithms/secparams.c @@ -64,7 +64,7 @@ static const gnutls_sec_params_entry sec_params[] = { * will convert a human understandable security parameter to an * appropriate size for the specific algorithm. * - * Returns: The number of bits, or zero. + * Returns: The number of bits, or (0). * **/ unsigned int diff --git a/lib/algorithms/sign.c b/lib/algorithms/sign.c index 414df76af4..9af8a5308a 100644 --- a/lib/algorithms/sign.c +++ b/lib/algorithms/sign.c @@ -113,7 +113,7 @@ gnutls_sign_get_name (gnutls_sign_algorithm_t sign) * * Get a list of supported public key signature algorithms. * - * Returns: a zero-terminated list of #gnutls_sign_algorithm_t + * Returns: a (0)-terminated list of #gnutls_sign_algorithm_t * integers indicating the available ciphers. * **/ diff --git a/lib/auth/cert.c b/lib/auth/cert.c index 11e2099c2f..207f0031df 100644 --- a/lib/auth/cert.c +++ b/lib/auth/cert.c @@ -662,7 +662,7 @@ cleanup: /* Finds the appropriate certificate depending on the cA Distinguished name * advertized by the server. If none matches then returns 0 and -1 as index. - * In case of an error a negative value, is returned. + * In case of an error a negative error code, is returned. * * 20020128: added ability to select a certificate depending on the SIGN * algorithm (only in automatic mode). @@ -1811,7 +1811,7 @@ _gnutls_gen_cert_server_cert_req (gnutls_session_t session, /* This function will return the appropriate certificate to use. * Fills in the apr_cert_list, apr_cert_list_length and apr_pkey. - * The return value is a negative value on error. + * The return value is a negative error code on error. * * It is normal to return 0 with no certificates in client side. * @@ -2080,7 +2080,7 @@ _gnutls_selected_certs_set (gnutls_session_t session, * requested_algo holds the parameters required by the peer (RSA, DSA * or -1 for any). * - * Returns 0 on success and a negative value on error. The + * Returns 0 on success and a negative error code on error. The * selected certificate will be in session->internals.selected_*. * */ diff --git a/lib/auth/psk.c b/lib/auth/psk.c index a7d76638e1..358dac15aa 100644 --- a/lib/auth/psk.c +++ b/lib/auth/psk.c @@ -88,7 +88,7 @@ _gnutls_set_psk_session_key (gnutls_session_t session, /* format of the premaster secret: * (uint16_t) psk_size - * psk_size bytes of zeros + * psk_size bytes of (0)s * (uint16_t) psk_size * the psk */ @@ -107,7 +107,7 @@ error: } /* returns the username and they key for the PSK session. - * Free is non zero if they have to be freed. + * Free is non (0) if they have to be freed. */ int _gnutls_find_psk_key( gnutls_session_t session, gnutls_psk_client_credentials_t cred, gnutls_datum_t * username, gnutls_datum_t* key, int* free) diff --git a/lib/auth/rsa_export.c b/lib/auth/rsa_export.c index 6d258f395d..9e5d56f2b6 100644 --- a/lib/auth/rsa_export.c +++ b/lib/auth/rsa_export.c @@ -327,7 +327,7 @@ gen_rsa_export_server_kx (gnutls_session_t session, gnutls_buffer_st* data) return data->length; } -/* if the peer's certificate is of 512 bits or less, returns non zero. +/* if the peer's certificate is of 512 bits or less, returns non (0). */ int _gnutls_peers_cert_less_512 (gnutls_session_t session) diff --git a/lib/crypto-api.c b/lib/crypto-api.c index a5ee8582d5..5f79ad0d11 100644 --- a/lib/crypto-api.c +++ b/lib/crypto-api.c @@ -41,7 +41,7 @@ * current crypto backend in use by gnutls or the cryptographic * accelerator in use. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -70,7 +70,7 @@ gnutls_cipher_init (gnutls_cipher_hd_t * handle, * associated data (AEAD) ciphers and will return the * output tag. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.99.0 **/ @@ -96,7 +96,7 @@ gnutls_cipher_tag (gnutls_cipher_hd_t handle, void *tag, size_t tag_size) * input data. This function can only be called once * and before any encryption operations. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.99.0 **/ @@ -137,7 +137,7 @@ gnutls_cipher_set_iv (gnutls_cipher_hd_t handle, void *iv, size_t ivlen) * This function will encrypt the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -156,7 +156,7 @@ gnutls_cipher_encrypt (gnutls_cipher_hd_t handle, void *text, size_t textlen) * This function will decrypt the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -179,7 +179,7 @@ gnutls_cipher_decrypt (gnutls_cipher_hd_t handle, void *ciphertext, * This function will encrypt the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -202,7 +202,7 @@ gnutls_cipher_encrypt2 (gnutls_cipher_hd_t handle, const void *text, size_t text * This function will decrypt the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -245,7 +245,7 @@ gnutls_cipher_deinit (gnutls_cipher_hd_t handle) * effectively use the current crypto backend in use by gnutls or the * cryptographic accelerator in use. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -273,7 +273,7 @@ gnutls_hmac_init (gnutls_hmac_hd_t * dig, * This function will hash the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -344,7 +344,7 @@ gnutls_hmac_get_len (gnutls_mac_algorithm_t algorithm) * This convenience function will hash the given data and return output * on a single call. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -368,7 +368,7 @@ gnutls_hmac_fast (gnutls_mac_algorithm_t algorithm, * current crypto backend in use by gnutls or the cryptographic * accelerator in use. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -394,7 +394,7 @@ gnutls_hash_init (gnutls_hash_hd_t * dig, gnutls_digest_algorithm_t algorithm) * This function will hash the given data using the algorithm * specified by the context. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ @@ -463,7 +463,7 @@ gnutls_hash_get_len (gnutls_digest_algorithm_t algorithm) * This convenience function will hash the given data and return output * on a single call. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * * Since: 2.10.0 **/ diff --git a/lib/crypto-backend.c b/lib/crypto-backend.c index 1cfebf8d1c..daac56332c 100644 --- a/lib/crypto-backend.c +++ b/lib/crypto-backend.c @@ -162,7 +162,7 @@ _gnutls_crypto_deregister (void) * For simplicity you can use the convenience * gnutls_crypto_single_cipher_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -196,7 +196,7 @@ _gnutls_get_crypto_cipher (gnutls_cipher_algorithm_t algo) * For simplicity you can use the convenience * gnutls_crypto_rnd_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -231,7 +231,7 @@ gnutls_crypto_rnd_register (int priority, * For simplicity you can use the convenience * gnutls_crypto_single_mac_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -266,7 +266,7 @@ _gnutls_get_crypto_mac (gnutls_mac_algorithm_t algo) * For simplicity you can use the convenience * gnutls_crypto_single_digest_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -303,7 +303,7 @@ _gnutls_get_crypto_digest (gnutls_digest_algorithm_t algo) * For simplicity you can use the convenience gnutls_crypto_bigint_register() * macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -340,7 +340,7 @@ gnutls_crypto_bigint_register (int priority, * For simplicity you can use the convenience gnutls_crypto_pk_register() * macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -374,7 +374,7 @@ gnutls_crypto_pk_register (int priority, * For simplicity you can use the convenience * gnutls_crypto_cipher_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -408,7 +408,7 @@ gnutls_crypto_cipher_register (int priority, * For simplicity you can use the convenience * gnutls_crypto_digest_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ @@ -442,7 +442,7 @@ gnutls_crypto_mac_register (int priority, * For simplicity you can use the convenience * gnutls_crypto_digest_register() macro. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.6.0 -*/ diff --git a/lib/ext/max_record.c b/lib/ext/max_record.c index b362983dcf..67fcf38535 100644 --- a/lib/ext/max_record.c +++ b/lib/ext/max_record.c @@ -298,8 +298,8 @@ gnutls_record_get_max_size (gnutls_session_t session) * This function uses a TLS extension called 'max record size'. Not * all TLS implementations use or even understand this extension. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ ssize_t gnutls_record_set_max_size (gnutls_session_t session, size_t size) diff --git a/lib/ext/safe_renegotiation.c b/lib/ext/safe_renegotiation.c index 4373e37e10..4f5d3ae694 100644 --- a/lib/ext/safe_renegotiation.c +++ b/lib/ext/safe_renegotiation.c @@ -446,7 +446,7 @@ _gnutls_sr_deinit_data (extension_priv_data_t priv) * Can be used to check whether safe renegotiation is being used * in the current session. * - * Returns: 0 when safe renegotiation is not used and non zero when + * Returns: 0 when safe renegotiation is not used and non (0) when * safe renegotiation is used. * * Since: 2.10.0 diff --git a/lib/ext/server_name.c b/lib/ext/server_name.c index ea3e10ea51..eb9650188d 100644 --- a/lib/ext/server_name.c +++ b/lib/ext/server_name.c @@ -107,7 +107,7 @@ _gnutls_server_name_recv_params (gnutls_session_t session, } else _gnutls_handshake_log - ("HSK[%p]: Received zero size server name (under attack?)\n", + ("HSK[%p]: Received (0) size server name (under attack?)\n", session); } @@ -274,8 +274,8 @@ _gnutls_server_name_send_params (gnutls_session_t session, * and so on. If no name with the given index exists * GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE is returned. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_server_name_get (gnutls_session_t session, void *data, @@ -343,12 +343,12 @@ gnutls_server_name_get (gnutls_session_t session, void *data, * virtual hosting. * * The value of @name depends on the @type type. In case of - * %GNUTLS_NAME_DNS, an ASCII zero-terminated domain name string, + * %GNUTLS_NAME_DNS, an ASCII (0)-terminated domain name string, * without the trailing dot, is expected. IPv4 or IPv6 addresses are * not permitted. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_server_name_set (gnutls_session_t session, diff --git a/lib/ext/session_ticket.c b/lib/ext/session_ticket.c index 5d0b0c0da1..7955396d61 100644 --- a/lib/ext/session_ticket.c +++ b/lib/ext/session_ticket.c @@ -350,7 +350,7 @@ session_ticket_recv_params (gnutls_session_t session, return 0; } -/* returns a positive number if we send the extension data, zero if we +/* returns a positive number if we send the extension data, (0) if we do not want to send it, and a negative number on failure. */ static int diff --git a/lib/gcrypt/mpi.c b/lib/gcrypt/mpi.c index c3bdd619a1..f71a230164 100644 --- a/lib/gcrypt/mpi.c +++ b/lib/gcrypt/mpi.c @@ -47,7 +47,7 @@ _format_conv (gnutls_bigint_format_t format) return GCRYMPI_FMT_PGP; } -/* returns zero on success +/* returns (0) on success */ static bigint_t wrap_gcry_mpi_scan (const void *buffer, size_t nbytes, @@ -82,7 +82,7 @@ wrap_gcry_mpi_print (const bigint_t a, void *buffer, size_t * nbytes, { /* in STD format we may want to include - * an extra byte for zero. Sometimes the gcry_ + * an extra byte for (0). Sometimes the gcry_ * function doesn't add it. */ if (format == GNUTLS_MPI_FORMAT_STD) diff --git a/lib/gnutls_alert.c b/lib/gnutls_alert.c index 1245148ded..788dec5456 100644 --- a/lib/gnutls_alert.c +++ b/lib/gnutls_alert.c @@ -310,7 +310,7 @@ gnutls_alert_send_appropriate (gnutls_session_t session, int err) * * If no alert has been received the returned value is undefined. * - * Returns: returns the last alert received, a + * Returns: the last alert received, a * #gnutls_alert_description_t value. **/ gnutls_alert_description_t diff --git a/lib/gnutls_anon_cred.c b/lib/gnutls_anon_cred.c index 93dbb81ec4..b427a8dd34 100644 --- a/lib/gnutls_anon_cred.c +++ b/lib/gnutls_anon_cred.c @@ -125,7 +125,7 @@ gnutls_anon_set_server_dh_params (gnutls_anon_server_credentials_t res, * * This function will set a callback in order for the server to get * the Diffie-Hellman parameters for anonymous authentication. The - * callback should return zero on success. + * callback should return %GNUTLS_E_SUCCESS (0) on success. **/ void gnutls_anon_set_server_params_function (gnutls_anon_server_credentials_t res, diff --git a/lib/gnutls_auth.c b/lib/gnutls_auth.c index 7a79053767..7306725cb7 100644 --- a/lib/gnutls_auth.c +++ b/lib/gnutls_auth.c @@ -90,8 +90,8 @@ gnutls_credentials_clear (gnutls_session_t session) * For %GNUTLS_CRD_CERTIFICATE, @cred should be * #gnutls_certificate_credentials_t. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_credentials_set (gnutls_session_t session, diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c index e9b95c4ff0..198a495346 100644 --- a/lib/gnutls_buffers.c +++ b/lib/gnutls_buffers.c @@ -595,7 +595,7 @@ _gnutls_io_write_flush (gnutls_session_t session) * a timeframe. * * Returns 0 if data were received, GNUTLS_E_TIMEDOUT - * on timeout and a negative value on error. + * on timeout and a negative error code on error. */ int _gnutls_io_check_recv (gnutls_session_t session, unsigned int ms) diff --git a/lib/gnutls_cert.c b/lib/gnutls_cert.c index cbc627aa84..403ac917bf 100644 --- a/lib/gnutls_cert.c +++ b/lib/gnutls_cert.c @@ -108,7 +108,7 @@ gnutls_certificate_free_cas (gnutls_certificate_credentials_t sc) * * This function will return the issuer of a given certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -642,7 +642,7 @@ _gnutls_openpgp_crt_verify_peers (gnutls_session_t session, * This function uses gnutls_x509_crt_list_verify() with the CAs in * the credentials as trusted CAs. * - * Returns: a negative error code on error and zero on success. + * Returns: a negative error code on error and %GNUTLS_E_SUCCESS (0) on success. **/ int gnutls_certificate_verify_peers2 (gnutls_session_t session, diff --git a/lib/gnutls_dh_primes.c b/lib/gnutls_dh_primes.c index 511a235c86..4e7fa0369d 100644 --- a/lib/gnutls_dh_primes.c +++ b/lib/gnutls_dh_primes.c @@ -58,8 +58,8 @@ _gnutls_dh_params_to_mpi (gnutls_dh_params_t dh_primes) * in the Diffie-Hellman key exchange. The new parameters should be * stored in the appropriate gnutls_datum. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_import_raw (gnutls_dh_params_t dh_params, @@ -99,8 +99,8 @@ gnutls_dh_params_import_raw (gnutls_dh_params_t dh_params, * * This function will initialize the DH parameters structure. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_init (gnutls_dh_params_t * dh_params) @@ -144,8 +144,8 @@ gnutls_dh_params_deinit (gnutls_dh_params_t dh_params) * This function will copy the DH parameters structure from source * to destination. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_cpy (gnutls_dh_params_t dst, gnutls_dh_params_t src) @@ -179,8 +179,8 @@ gnutls_dh_params_cpy (gnutls_dh_params_t dst, gnutls_dh_params_t src) * Since clients use the parameters sent by the server, it's of * no use to call this in client side. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_generate2 (gnutls_dh_params_t params, unsigned int bits) @@ -213,8 +213,8 @@ gnutls_dh_params_generate2 (gnutls_dh_params_t params, unsigned int bits) * If the structure is PEM encoded, it should have a header * of "BEGIN DH PARAMETERS". * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_import_pkcs3 (gnutls_dh_params_t params, @@ -325,8 +325,8 @@ gnutls_dh_params_import_pkcs3 (gnutls_dh_params_t params, * If the structure is PEM encoded, it will have a header * of "BEGIN DH PARAMETERS". * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_export_pkcs3 (gnutls_dh_params_t params, @@ -499,8 +499,8 @@ gnutls_dh_params_export_pkcs3 (gnutls_dh_params_t params, * allocated using gnutls_malloc() and will be stored in the * appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_dh_params_export_raw (gnutls_dh_params_t params, diff --git a/lib/gnutls_dtls.c b/lib/gnutls_dtls.c index 8bfbd2e52d..b46f83215a 100644 --- a/lib/gnutls_dtls.c +++ b/lib/gnutls_dtls.c @@ -315,7 +315,7 @@ static void rot_window(gnutls_session_t session, int places) #define MOVE_SIZE 20 /* Checks if a sequence number is not replayed. If replayed - * returns a negative value, otherwise zero. + * returns a negative error code, otherwise zero. */ int _dtls_record_check(gnutls_session_t session, uint64 * _seq) { @@ -608,7 +608,7 @@ uint8_t digest[C_HASH_SIZE]; * it should be associated with the session using * gnutls_dtls_prestate_set(); * - * Returns: zero on success, or a negative error code. + * Returns: %GNUTLS_E_SUCCESS (0) on success, or a negative error code. * **/ int gnutls_dtls_cookie_verify(gnutls_datum_t* key, @@ -677,7 +677,7 @@ uint8_t digest[C_HASH_SIZE]; * the cookie authentication with the client, with the newly * established session. * - * Returns: zero on success, or a negative error code. + * Returns: %GNUTLS_E_SUCCESS (0) on success, or a negative error code. * **/ void gnutls_dtls_prestate_set(gnutls_session_t session, gnutls_dtls_prestate_st* prestate) diff --git a/lib/gnutls_errors.c b/lib/gnutls_errors.c index 8e9ade01d0..a56a18f3a0 100644 --- a/lib/gnutls_errors.c +++ b/lib/gnutls_errors.c @@ -336,9 +336,9 @@ static const gnutls_error_entry error_algorithms[] = { /** * gnutls_error_is_fatal: - * @error: is a GnuTLS error code, a negative value + * @error: is a GnuTLS error code, a negative error code * - * If a GnuTLS function returns a negative value you may feed that + * If a GnuTLS function returns a negative error code you may feed that * value to this function to see if the error condition is fatal. * * Note that you may want to check the error code manually, since some @@ -375,7 +375,7 @@ gnutls_error_is_fatal (int error) /** * gnutls_perror: - * @error: is a GnuTLS error code, a negative value + * @error: is a GnuTLS error code, a negative error code * * This function is like perror(). The only difference is that it * accepts an error number returned by a gnutls function. @@ -389,13 +389,13 @@ gnutls_perror (int error) /** * gnutls_strerror: - * @error: is a GnuTLS error code, a negative value + * @error: is a GnuTLS error code, a negative error code * * This function is similar to strerror. The difference is that it * accepts an error number returned by a gnutls function; In case of * an unknown error a descriptive string is sent instead of %NULL. * - * Error codes are always a negative value. + * Error codes are always a negative error code. * * Returns: A string explaining the GnuTLS error message. **/ diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c index 92cb0a7452..2c57717a40 100644 --- a/lib/gnutls_global.c +++ b/lib/gnutls_global.c @@ -197,8 +197,8 @@ static int _gnutls_init = 0; * function after aquiring a thread mutex. To ignore the potential * memory leak is also an option. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_global_init (void) @@ -318,7 +318,7 @@ gnutls_global_deinit (void) * * See %GNUTLS_VERSION for a suitable @req_version string. * - * Return value: Check that the version of the library is at + * Returns: Check that the version of the library is at * minimum the one given as a string in @req_version and return the * actual version string of the library; return %NULL if the * condition is not met. If %NULL is passed to this function no diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index 9c1bd2a9a1..0b2e16eb1c 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -334,7 +334,7 @@ _gnutls_tls_create_random (opaque * dst) return 0; } -/* returns the 0 on success or a negative value. +/* returns the 0 on success or a negative error code. */ int _gnutls_negotiate_version (gnutls_session_t session, @@ -2162,7 +2162,7 @@ _gnutls_recv_hello_verify_request (gnutls_session_t session, * %GNUTLS_A_NO_RENEGOTIATION. A client may also choose to ignore * this message. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_rehandshake (gnutls_session_t session) @@ -2297,7 +2297,7 @@ cleanup: * in the case of %GNUTLS_E_GOT_APPLICATION_DATA it might also mean that * some data were pending. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_handshake (gnutls_session_t session) diff --git a/lib/gnutls_mpi.c b/lib/gnutls_mpi.c index 693de3e020..fddb87e8e7 100644 --- a/lib/gnutls_mpi.c +++ b/lib/gnutls_mpi.c @@ -124,7 +124,7 @@ _gnutls_mpi_release (bigint_t * x) *x = NULL; } -/* returns zero on success +/* returns %GNUTLS_E_SUCCESS (0) on success */ int _gnutls_mpi_scan (bigint_t * ret_mpi, const void *buffer, size_t nbytes) @@ -140,7 +140,7 @@ _gnutls_mpi_scan (bigint_t * ret_mpi, const void *buffer, size_t nbytes) return 0; } -/* returns zero on success. Fails if the number is zero. +/* returns %GNUTLS_E_SUCCESS (0) on success. Fails if the number is zero. */ int _gnutls_mpi_scan_nz (bigint_t * ret_mpi, const void *buffer, size_t nbytes) diff --git a/lib/gnutls_pcert.c b/lib/gnutls_pcert.c index 70f4f9f0d1..ef360a17ff 100644 --- a/lib/gnutls_pcert.c +++ b/lib/gnutls_pcert.c @@ -39,7 +39,7 @@ * #gnutls_pcert_st structure. The structure must be deinitialized * afterwards using gnutls_pcert_deinit(); * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_pcert_import_x509 (gnutls_pcert_st* pcert, @@ -110,7 +110,7 @@ cleanup: * #gnutls_pcert_st structure. The structure must be deinitialized * afterwards using gnutls_pcert_deinit(); * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_pcert_import_x509_raw (gnutls_pcert_st *pcert, @@ -158,7 +158,7 @@ cleanup: * #gnutls_pcert_st structure. The structure must be deinitialized * afterwards using gnutls_pcert_deinit(); * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_pcert_import_openpgp (gnutls_pcert_st* pcert, @@ -230,7 +230,7 @@ cleanup: * #gnutls_pcert_st structure. The structure must be deinitialized * afterwards using gnutls_pcert_deinit(); * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_pcert_import_openpgp_raw (gnutls_pcert_st *pcert, diff --git a/lib/gnutls_priority.c b/lib/gnutls_priority.c index f0affa1354..bc26339bec 100644 --- a/lib/gnutls_priority.c +++ b/lib/gnutls_priority.c @@ -45,7 +45,7 @@ break_comma_list (char *etag, * set on the client. The server does not use the algorithm's * priority except for disabling algorithms that were not specified. * - * Returns: %GNUTLS_E_SUCCESS on success, or an error code. + * Returns: %GNUTLS_E_SUCCESS (0) on success, or a negative error code. **/ int gnutls_cipher_set_priority (gnutls_session_t session, const int *list) @@ -585,8 +585,7 @@ gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority) * * The #priorities option allows you to specify a colon * separated list of the cipher priorities to enable. - * - * Common keywords: Some keywords are defined to provide quick access + * Some keywords are defined to provide quick access * to common preferences. * * "PERFORMANCE" means all the "secure" ciphersuites are enabled, @@ -615,9 +614,8 @@ gnutls_priority_set (gnutls_session_t session, gnutls_priority_t priority) * "NONE" means nothing is enabled. This disables even protocols and * compression methods. * - * Special keywords: + * Special keywords are "!", "-" and "+". * "!" or "-" appended with an algorithm will remove this algorithm. - * * "+" appended with an algorithm will add this algorithm. * * Check the GnuTLS manual section "Priority strings" for detailed diff --git a/lib/gnutls_privkey.c b/lib/gnutls_privkey.c index 6bd973603e..3a29212012 100644 --- a/lib/gnutls_privkey.c +++ b/lib/gnutls_privkey.c @@ -60,7 +60,7 @@ struct gnutls_privkey_st * actually the type of the subsystem used to set this private key. * * Returns: a member of the #gnutls_privkey_type_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ gnutls_privkey_type_t gnutls_privkey_get_type (gnutls_privkey_t key) @@ -78,7 +78,7 @@ gnutls_privkey_get_type (gnutls_privkey_t key) * the security parameter of the key. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_privkey_get_pk_algorithm (gnutls_privkey_t key, unsigned int *bits) @@ -244,7 +244,7 @@ _gnutls_privkey_get_public_mpis (gnutls_privkey_t key, * * This function will initialize an private key structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -313,7 +313,7 @@ static int check_if_clean(gnutls_privkey_t key) * The #gnutls_pkcs11_privkey_t object must not be deallocated * during the lifetime of this structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -351,7 +351,7 @@ int ret; * The #gnutls_x509_privkey_t object must not be deallocated * during the lifetime of this structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -389,7 +389,7 @@ int ret; * during the lifetime of this structure. The subkey set as * preferred will be used, or the master key otherwise. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -447,7 +447,7 @@ uint8_t keyid[GNUTLS_OPENPGP_KEYID_SIZE]; * Use gnutls_pubkey_get_preferred_hash_algorithm() to determine * the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.12.0 @@ -508,7 +508,7 @@ cleanup: * Use gnutls_pubkey_get_preferred_hash_algorithm() to determine * the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.12.0 @@ -562,7 +562,7 @@ cleanup: * This function will sign the given data using a signature algorithm * supported by the private key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int @@ -602,7 +602,7 @@ _gnutls_privkey_sign_hash (gnutls_privkey_t key, * This function will decrypt the given data using the algorithm * supported by the private key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/gnutls_psk.c b/lib/gnutls_psk.c index 31f77793d6..1315c7119f 100644 --- a/lib/gnutls_psk.c +++ b/lib/gnutls_psk.c @@ -443,7 +443,7 @@ gnutls_psk_set_server_dh_params (gnutls_psk_server_credentials_t res, * * This function will set a callback in order for the server to get * the Diffie-Hellman parameters for PSK authentication. The callback - * should return zero on success. + * should return %GNUTLS_E_SUCCESS (0) on success. **/ void gnutls_psk_set_server_params_function (gnutls_psk_server_credentials_t res, diff --git a/lib/gnutls_pubkey.c b/lib/gnutls_pubkey.c index 52fb837220..08b6895b95 100644 --- a/lib/gnutls_pubkey.c +++ b/lib/gnutls_pubkey.c @@ -87,7 +87,7 @@ int pubkey_to_bits(gnutls_pk_algorithm_t pk, gnutls_pk_params_st* params) * the security parameter of the key. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_pubkey_get_pk_algorithm (gnutls_pubkey_t key, unsigned int *bits) @@ -105,7 +105,7 @@ gnutls_pubkey_get_pk_algorithm (gnutls_pubkey_t key, unsigned int *bits) * * This function will return the key usage of the public key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -123,7 +123,7 @@ gnutls_pubkey_get_key_usage (gnutls_pubkey_t key, unsigned int *usage) * * This function will initialize an public key structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -161,7 +161,7 @@ gnutls_pubkey_deinit (gnutls_pubkey_t key) * This function will import the given public key to the abstract * #gnutls_pubkey_t structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -196,7 +196,7 @@ gnutls_pubkey_import_x509 (gnutls_pubkey_t key, gnutls_x509_crt_t crt, * This function will import the given public key to the abstract * #gnutls_pubkey_t structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.12.0 @@ -222,7 +222,7 @@ gnutls_pubkey_import_privkey (gnutls_pubkey_t key, gnutls_privkey_t pkey, * algorithm to use for signing with this certificate. Some certificates (i.e. * DSA might not be able to sign without the preferred algorithm). * - * Returns: the 0 if the hash algorithm is found. A negative value is + * Returns: the 0 if the hash algorithm is found. A negative error code is * returned on error. * * Since: 2.11.0 @@ -258,7 +258,7 @@ gnutls_pubkey_get_preferred_hash_algorithm (gnutls_pubkey_t key, * This function will import the given public key to the abstract * #gnutls_pubkey_t structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -314,7 +314,7 @@ gnutls_pubkey_import_pkcs11 (gnutls_pubkey_t key, * #gnutls_pubkey_t structure. The subkey set as preferred will be * imported or the master key otherwise. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -394,7 +394,7 @@ gnutls_pubkey_import_openpgp (gnutls_pubkey_t key, * be returned. The output will normally be a SHA-1 hash output, * which is 20 bytes. * - * Return value: In case of failure a negative value will be + * Returns: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -449,7 +449,7 @@ gnutls_pubkey_get_openpgp_key_id (gnutls_pubkey_t key, unsigned int flags, * If the structure is PEM encoded, it will have a header * of "BEGIN CERTIFICATE". * - * Return value: In case of failure a negative value will be + * Returns: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -519,7 +519,7 @@ cleanup: * be returned. The output will normally be a SHA-1 hash output, * which is 20 bytes. * - * Return value: In case of failure a negative value will be + * Returns: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -557,7 +557,7 @@ gnutls_pubkey_get_key_id (gnutls_pubkey_t key, unsigned int flags, * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_pubkey_get_pk_rsa_raw (gnutls_pubkey_t key, @@ -607,7 +607,7 @@ gnutls_pubkey_get_pk_rsa_raw (gnutls_pubkey_t key, * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_pubkey_get_pk_dsa_raw (gnutls_pubkey_t key, @@ -682,7 +682,7 @@ gnutls_pubkey_get_pk_dsa_raw (gnutls_pubkey_t key, * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_pubkey_get_pk_ecc_raw (gnutls_pubkey_t key, gnutls_ecc_curve_t *curve, @@ -734,7 +734,7 @@ gnutls_pubkey_get_pk_ecc_raw (gnutls_pubkey_t key, gnutls_ecc_curve_t *curve, * to the native gnutls_pubkey_t format.The output will be stored * in @ key. * If the Certificate is PEM encoded it should have a header of "PUBLIC KEY". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -827,7 +827,7 @@ cleanup: * This function will set the public parameters from the given public * key to the request. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -866,7 +866,7 @@ gnutls_x509_crt_set_pubkey (gnutls_x509_crt_t crt, gnutls_pubkey_t key) * This function will set the public parameters from the given public * key to the request. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -906,7 +906,7 @@ gnutls_x509_crq_set_pubkey (gnutls_x509_crq_t crq, gnutls_pubkey_t key) * is only useful if the key is to be exported to a certificate or * certificate request. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -928,7 +928,7 @@ gnutls_pubkey_set_key_usage (gnutls_pubkey_t key, unsigned int usage) * This function will import a PKCS 11 certificate to a #gnutls_pubkey_t * structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ @@ -1031,7 +1031,7 @@ gnutls_pubkey_import_rsa_raw (gnutls_pubkey_t key, * native #gnutls_pubkey_t format. The output will be stored * in @key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1217,7 +1217,7 @@ gnutls_pubkey_verify_hash (gnutls_pubkey_t key, unsigned int flags, * This function will read the certifcate and the signed data to * determine the hash algorithm used to generate the signature. * - * Returns: the 0 if the hash algorithm is found. A negative value is + * Returns: the 0 if the hash algorithm is found. A negative error code is * returned on error. **/ int diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index a109d306be..cfafc7ba33 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -1188,13 +1188,11 @@ _gnutls_recv_int (gnutls_session_t session, content_type_t type, * This function has the similar semantics with send(). The only * difference is that it accepts a GnuTLS session, and uses different * error codes. - * * Note that if the send buffer is full, send() will block this * function. See the send() documentation for full information. You * can replace the default push function by using * gnutls_transport_set_ptr2() with a call to send() with a * MSG_DONTWAIT flag if blocking is a problem. - * * If the EINTR is returned by the internal push function (the * default is send()) then %GNUTLS_E_INTERRUPTED will be returned. If * %GNUTLS_E_INTERRUPTED or %GNUTLS_E_AGAIN is returned, you must @@ -1225,19 +1223,16 @@ gnutls_record_send (gnutls_session_t session, const void *data, * This function has the similar semantics with recv(). The only * difference is that it accepts a GnuTLS session, and uses different * error codes. - * * In the special case that a server requests a renegotiation, the * client may receive an error code of %GNUTLS_E_REHANDSHAKE. This * message may be simply ignored, replied with an alert * %GNUTLS_A_NO_RENEGOTIATION, or replied with a new handshake, * depending on the client's will. - * * If %EINTR is returned by the internal push function (the default * is recv()) then %GNUTLS_E_INTERRUPTED will be returned. If * %GNUTLS_E_INTERRUPTED or %GNUTLS_E_AGAIN is returned, you must * call this function again to get the data. See also * gnutls_record_get_direction(). - * * A server may also receive %GNUTLS_E_REHANDSHAKE when a client has * initiated a handshake. In that case the server can only initiate a * handshake or terminate the connection. @@ -1264,7 +1259,6 @@ gnutls_record_recv (gnutls_session_t session, void *data, size_t data_size) * it returns in addition to data, the sequence number of the data. * This is useful in DTLS where record packets might be received * out-of-order. - * * In DTLS the least significant 48-bits are a unique sequence * number, per handshake. If your application is using TLS re-handshakes * then the full 64-bits should be used as a unique sequence. diff --git a/lib/gnutls_sig.c b/lib/gnutls_sig.c index 73f533c396..9954892e7d 100644 --- a/lib/gnutls_sig.c +++ b/lib/gnutls_sig.c @@ -608,7 +608,7 @@ _gnutls_handshake_sign_cert_vrfy12 (gnutls_session_t session, * 20091031: works for TLS 1.2 too! * * For TLS1.x, x<2 returns negative for failure and zero or unspecified for success. - * For TLS1.2 returns the signature algorithm used on success, or a negative value; + * For TLS1.2 returns the signature algorithm used on success, or a negative error code; */ int _gnutls_handshake_sign_cert_vrfy (gnutls_session_t session, diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index e144f16cb3..5b285f9e3b 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -286,7 +286,7 @@ _gnutls_handshake_internal_state_clear (gnutls_session_t session) * This function initializes the current session to null. Every * session must be initialized before use, so internal structures can * be allocated. This function allocates structures which can only - * be free'd by calling gnutls_deinit(). Returns zero on success. + * be free'd by calling gnutls_deinit(). Returns %GNUTLS_E_SUCCESS (0) on success. * * @flags can be one of %GNUTLS_CLIENT and %GNUTLS_SERVER. For a DTLS * entity, the flags %GNUTLS_DATAGRAM and %GNUTLS_NONBLOCK are @@ -1343,7 +1343,7 @@ gnutls_session_channel_binding (gnutls_session_t session, /* returns overhead imposed by the record layer (encryption/compression) * etc. It does include the record layer headers. * - * It may return a negative value on error. + * It may return a negative error code on error. */ int _gnutls_record_overhead_rt(gnutls_session_t session) { diff --git a/lib/gnutls_str.c b/lib/gnutls_str.c index 71a07f47dd..f22c490e63 100644 --- a/lib/gnutls_str.c +++ b/lib/gnutls_str.c @@ -471,7 +471,7 @@ _gnutls_bin2hex (const void *_old, size_t oldlen, * * Convert a buffer with hex data to binary data. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ diff --git a/lib/gnutls_ui.c b/lib/gnutls_ui.c index a4cdd1667a..e953eee67c 100644 --- a/lib/gnutls_ui.c +++ b/lib/gnutls_ui.c @@ -373,7 +373,7 @@ gnutls_dh_get_prime_bits (gnutls_session_t session) * Get the export RSA parameter's modulus size. * * Returns: the bits used in the last RSA-EXPORT key exchange with the - * peer, or a negative value in case of error. + * peer, or a negative error code in case of error. **/ int gnutls_rsa_export_get_modulus_bits (gnutls_session_t session) @@ -395,7 +395,7 @@ gnutls_rsa_export_get_modulus_bits (gnutls_session_t session) * anonymous and ephemeral Diffie-Hellman. * * Returns: the public key bit size used in the last Diffie-Hellman - * key exchange with the peer, or a negative value in case of error. + * key exchange with the peer, or a negative error code in case of error. **/ int gnutls_dh_get_peers_public_bits (gnutls_session_t session) @@ -522,7 +522,7 @@ gnutls_certificate_get_peers (gnutls_session_t * Get whether client certificate is requested or not. * * Returns: 0 if the peer (server) did not request client - * authentication or 1 otherwise, or a negative value in case of + * authentication or 1 otherwise, or a negative error code in case of * error. **/ int @@ -611,7 +611,7 @@ gnutls_certificate_set_dh_params (gnutls_certificate_credentials_t res, * * This function will set a callback in order for the server to get * the Diffie-Hellman or RSA parameters for certificate - * authentication. The callback should return zero on success. + * authentication. The callback should return %GNUTLS_E_SUCCESS (0) on success. **/ void gnutls_certificate_set_params_function (gnutls_certificate_credentials_t res, @@ -681,7 +681,7 @@ gnutls_certificate_set_rsa_export_params (gnutls_certificate_credentials_t * * This function will set a callback in order for the server to get * the Diffie-Hellman or RSA parameters for PSK authentication. The - * callback should return zero on success. + * callback should return %GNUTLS_E_SUCCESS (0) on success. **/ void gnutls_psk_set_params_function (gnutls_psk_server_credentials_t res, @@ -697,7 +697,7 @@ gnutls_psk_set_params_function (gnutls_psk_server_credentials_t res, * * This function will set a callback in order for the server to get * the Diffie-Hellman or RSA parameters for anonymous authentication. - * The callback should return zero on success. + * The callback should return %GNUTLS_E_SUCCESS (0) on success. **/ void gnutls_anon_set_params_function (gnutls_anon_server_credentials_t res, diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c index 07911097b7..0c1d305eef 100644 --- a/lib/gnutls_x509.c +++ b/lib/gnutls_x509.c @@ -1199,7 +1199,7 @@ cleanup: * a certificate request is sent. This can be disabled using * gnutls_certificate_send_x509_rdn_sequence(). * - * Returns: the number of certificates processed or a negative value + * Returns: the number of certificates processed or a negative error code * on error. **/ int @@ -1306,7 +1306,7 @@ cleanup: * This function can also accept PKCS #11 URLs. In that case it * will import all certificates that are marked as trusted. * - * Returns: number of certificates processed, or a negative value on + * Returns: number of certificates processed, or a negative error code on * error. **/ int @@ -1459,7 +1459,7 @@ read_crl_mem (gnutls_certificate_credentials_t res, const void *crl, * gnutls_certificate_verify_peers2(). This function may be called * multiple times. * - * Returns: number of CRLs processed, or a negative value on error. + * Returns: number of CRLs processed, or a negative error code on error. **/ int gnutls_certificate_set_x509_crl_mem (gnutls_certificate_credentials_t res, @@ -1538,7 +1538,7 @@ cleanup: * gnutls_certificate_verify_peers2(). * This function may be called multiple times. * - * Returns: number of CRLs processed or a negative value on error. + * Returns: number of CRLs processed or a negative error code on error. **/ int gnutls_certificate_set_x509_crl_file (gnutls_certificate_credentials_t res, diff --git a/lib/minitasn1/decoding.c b/lib/minitasn1/decoding.c index 8c8b01fd32..ae32c98b03 100644 --- a/lib/minitasn1/decoding.c +++ b/lib/minitasn1/decoding.c @@ -168,7 +168,7 @@ asn1_get_tag_der (const unsigned char *der, int der_len, * asn1_get_length_der() is that this function will return a length * even if the value has indefinite encoding. * - * Returns: Return the decoded length value, or negative value when + * Returns: Return the decoded length value, or negative error code when * the value was too big. * * Since: 2.0 diff --git a/lib/minitasn1/errors.c b/lib/minitasn1/errors.c index 052c64ff3b..271158d9d8 100644 --- a/lib/minitasn1/errors.c +++ b/lib/minitasn1/errors.c @@ -85,7 +85,7 @@ asn1_perror (asn1_retCode error) * * This function replaces libtasn1_strerror() in older libtasn1. * - * Returns: Pointer to static zero-terminated string describing error + * Returns: Pointer to static (0)-terminated string describing error * code. * * Since: 1.6 @@ -130,7 +130,7 @@ libtasn1_perror (asn1_retCode error) * similar to strerror. The only difference is that it accepts an * error (number) returned by a libtasn1 function. * - * Returns: Pointer to static zero-terminated string describing error + * Returns: Pointer to static (0)-terminated string describing error * code. * * Deprecated: Use asn1_strerror() instead. diff --git a/lib/nettle/ecc_verify_hash.c b/lib/nettle/ecc_verify_hash.c index 54d98f351e..4f4ddbb049 100644 --- a/lib/nettle/ecc_verify_hash.c +++ b/lib/nettle/ecc_verify_hash.c @@ -80,7 +80,7 @@ ecc_verify_hash (struct dsa_signature *signature, goto error; } - /* check for zero */ + /* check for (0) */ if (mpz_cmp_ui (signature->r, 0) == 0 || mpz_cmp_ui (signature->s, 0) == 0 || mpz_cmp (signature->r, key->order) >= 0 || mpz_cmp (signature->s, key->order) >= 0) diff --git a/lib/opencdk/kbnode.c b/lib/opencdk/kbnode.c index cfad127e7a..c713cfa01e 100644 --- a/lib/opencdk/kbnode.c +++ b/lib/opencdk/kbnode.c @@ -496,7 +496,7 @@ cdk_kbnode_write_to_mem_alloc (cdk_kbnode_t node, * @r_nbytes: the new length of the buffer. * * Tries to write the contents of the key node to the buffer @buf and - * return the length of it in @r_nbytes. If buf is zero, only the + * return the length of it in @r_nbytes. If buf is (0), only the * length of the node is calculated and returned in @r_nbytes. * Whenever it is possible, the cdk_kbnode_write_to_mem_alloc should be used. **/ @@ -568,7 +568,7 @@ cdk_kbnode_write_to_mem (cdk_kbnode_t node, byte * buf, size_t * r_nbytes) * @node: the key node * @hashctx: opaque pointer to the hash context * @is_v4: OpenPGP signature (yes=1, no=0) - * @pkttype: packet type to hash (if zero use the packet type from the node) + * @pkttype: packet type to hash (if (0) use the packet type from the node) * @flags: flags which depend on the operation * * Hashes the key node contents. Two modes are supported. If the packet diff --git a/lib/opencdk/sig-check.c b/lib/opencdk/sig-check.c index 90723d01a1..79dac5f6b5 100644 --- a/lib/opencdk/sig-check.c +++ b/lib/opencdk/sig-check.c @@ -455,9 +455,9 @@ uid_list_free (struct verify_uid *list) } } -/* returns non zero if all UIDs in the list have at least one +/* returns non (0) if all UIDs in the list have at least one * signature. If the list is empty or no signatures are present - * a zero value is returned. + * a (0) value is returned. */ static int uid_list_all_signed (struct verify_uid *list) @@ -487,7 +487,7 @@ uid_list_all_signed (struct verify_uid *list) * * Check all signatures. When no key is available for checking, the * sigstat is marked as 'NOKEY'. The @r_status contains the key flags - * which are or-ed or zero when there are no flags. + * which are or-ed or (0) when there are no flags. **/ cdk_error_t cdk_pk_check_sigs (cdk_kbnode_t key, cdk_keydb_hd_t keydb, int *r_status) diff --git a/lib/openpgp/extras.c b/lib/openpgp/extras.c index 3810fb4c68..fc40c87b08 100644 --- a/lib/openpgp/extras.c +++ b/lib/openpgp/extras.c @@ -214,7 +214,7 @@ error: * This function will return the number of OpenPGP certificates * present in the given keyring. * - * Returns: the number of subkeys, or a negative value on error. + * Returns: the number of subkeys, or a negative error code on error. **/ int gnutls_openpgp_keyring_get_crt_count (gnutls_openpgp_keyring_t ring) diff --git a/lib/openpgp/gnutls_openpgp.c b/lib/openpgp/gnutls_openpgp.c index 2a827ba7df..433a352759 100644 --- a/lib/openpgp/gnutls_openpgp.c +++ b/lib/openpgp/gnutls_openpgp.c @@ -79,8 +79,8 @@ _gnutls_map_cdk_rc (int rc) * been set and be used. See gnutls_openpgp_crt_set_preferred_key_id(). * Otherwise the master key will be used. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_certificate_set_openpgp_key (gnutls_certificate_credentials_t res, @@ -231,7 +231,7 @@ leave: * This funtion is used to load OpenPGP keys into the GnuTLS credential * structure. The datum should contain at least one valid non encrypted subkey. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -254,7 +254,7 @@ gnutls_certificate_set_openpgp_key_mem (gnutls_certificate_credentials_t res, * This funtion is used to load OpenPGP keys into the GnuTLS * credentials structure. The file should contain at least one valid non encrypted subkey. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -303,7 +303,7 @@ get_keyid (gnutls_openpgp_keyid_t keyid, const char *str) * case the gnutls_openpgp_crt_get_auth_subkey() will be used to * retrieve the subkey. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.4.0 @@ -400,7 +400,7 @@ gnutls_certificate_set_openpgp_key_mem2 (gnutls_certificate_credentials_t res, * case the gnutls_openpgp_crt_get_auth_subkey() will be used to * retrieve the subkey. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.4.0 @@ -508,7 +508,7 @@ gnutls_openpgp_count_key_names (const gnutls_datum_t * cert) * is needed for an operations. The keyring will also be used at the * verification functions. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -555,7 +555,7 @@ gnutls_certificate_set_openpgp_keyring_file (gnutls_certificate_credentials_t * is needed for an operations. The keyring will also be used at the * verification functions. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/openpgp/output.c b/lib/openpgp/output.c index c4a7bf873a..74b0b8c6bd 100644 --- a/lib/openpgp/output.c +++ b/lib/openpgp/output.c @@ -499,12 +499,12 @@ print_oneline (gnutls_buffer_st * str, gnutls_openpgp_crt_t cert) * gnutls_openpgp_crt_print: * @cert: The structure to be printed * @format: Indicate the format to use - * @out: Newly allocated datum with zero terminated string. + * @out: Newly allocated datum with (0) terminated string. * * This function will pretty print an OpenPGP certificate, suitable * for display to a human. * - * The format should be zero for future compatibility. + * The format should be (0) for future compatibility. * * The output @out needs to be deallocate using gnutls_free(). * diff --git a/lib/openpgp/pgp.c b/lib/openpgp/pgp.c index e4028c86fb..506081c86a 100644 --- a/lib/openpgp/pgp.c +++ b/lib/openpgp/pgp.c @@ -420,7 +420,7 @@ gnutls_openpgp_crt_get_pk_algorithm (gnutls_openpgp_crt_t key, * * Extract the version of the OpenPGP key. * - * Returns: the version number is returned, or a negative value on errors. + * Returns: the version number is returned, or a negative error code on errors. **/ int gnutls_openpgp_crt_get_version (gnutls_openpgp_crt_t key) @@ -590,7 +590,7 @@ gnutls_openpgp_crt_check_hostname (gnutls_openpgp_crt_t key, if (ret == 0) { /* Length returned by gnutls_openpgp_crt_get_name includes - the terminating zero. */ + the terminating (0). */ dnsnamesize--; if (_gnutls_hostname_compare (dnsname, dnsnamesize, hostname, 0)) @@ -660,7 +660,7 @@ gnutls_openpgp_crt_get_key_usage (gnutls_openpgp_crt_t key, * This function will return the number of subkeys present in the * given OpenPGP certificate. * - * Returns: the number of subkeys, or a negative value on error. + * Returns: the number of subkeys, or a negative error code on error. * * Since: 2.4.0 **/ @@ -806,7 +806,7 @@ _gnutls_openpgp_find_subkey_idx (cdk_kbnode_t knode, uint32_t keyid[2], * @key: the structure that contains the OpenPGP public key. * @idx: is the subkey index * - * Get subkey revocation status. A negative value indicates an error. + * Get subkey revocation status. A negative error code indicates an error. * * Returns: true (1) if the key has been revoked, or false (0) if it * has not. @@ -1066,7 +1066,7 @@ gnutls_openpgp_crt_get_subkey_idx (gnutls_openpgp_crt_t key, * key algorithm. The key usage value will ORed values of * %GNUTLS_KEY_DIGITAL_SIGNATURE or %GNUTLS_KEY_KEY_ENCIPHERMENT. * - * A negative value may be returned in case of parsing error. + * A negative error code may be returned in case of parsing error. * * Returns: key usage value. * @@ -1403,7 +1403,7 @@ cleanup: * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1436,7 +1436,7 @@ gnutls_openpgp_crt_get_pk_rsa_raw (gnutls_openpgp_crt_t crt, * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1469,7 +1469,7 @@ gnutls_openpgp_crt_get_pk_dsa_raw (gnutls_openpgp_crt_t crt, * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1505,7 +1505,7 @@ gnutls_openpgp_crt_get_subkey_pk_rsa_raw (gnutls_openpgp_crt_t crt, * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1566,8 +1566,8 @@ gnutls_openpgp_crt_get_preferred_key_id (gnutls_openpgp_crt_t key, * This allows setting a preferred key id for the given certificate. * This key will be used by functions that involve key handling. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_openpgp_crt_set_preferred_key_id (gnutls_openpgp_crt_t key, @@ -1600,14 +1600,14 @@ gnutls_openpgp_crt_set_preferred_key_id (gnutls_openpgp_crt_t key, * gnutls_openpgp_crt_get_auth_subkey: * @crt: the structure that contains the OpenPGP public key. * @keyid: the struct to save the keyid. - * @flag: Non zero indicates that a valid subkey is always returned. + * @flag: Non (0) indicates that a valid subkey is always returned. * * Returns the 64-bit keyID of the first valid OpenPGP subkey marked - * for authentication. If flag is non zero and no authentication + * for authentication. If flag is non (0) and no authentication * subkey exists, then a valid subkey will be returned even if it is * not marked for authentication. * Returns the 64-bit keyID of the first valid OpenPGP subkey marked - * for authentication. If flag is non zero and no authentication + * for authentication. If flag is non (0) and no authentication * subkey exists, then a valid subkey will be returned even if it is * not marked for authentication. * diff --git a/lib/openpgp/privkey.c b/lib/openpgp/privkey.c index 28926a4bce..ae4a04a41b 100644 --- a/lib/openpgp/privkey.c +++ b/lib/openpgp/privkey.c @@ -107,7 +107,7 @@ gnutls_openpgp_privkey_sec_param (gnutls_openpgp_privkey_t key) * @data: The RAW or BASE64 encoded key. * @format: One of #gnutls_openpgp_crt_fmt_t elements. * @password: not used for now - * @flags: should be zero + * @flags: should be (0) * * This function will convert the given RAW or Base64 encoded key to * the native gnutls_openpgp_privkey_t format. The output will be @@ -190,7 +190,7 @@ gnutls_openpgp_privkey_import (gnutls_openpgp_privkey_t key, * @key: Holds the key. * @format: One of gnutls_openpgp_crt_fmt_t elements. * @password: the password that will be used to encrypt the key. (unused for now) - * @flags: zero for future compatibility + * @flags: (0) for future compatibility * @output_data: will contain the key base64 encoded or raw * @output_data_size: holds the size of output_data (and will be * replaced by the actual size of parameters) @@ -228,7 +228,7 @@ gnutls_openpgp_privkey_export (gnutls_openpgp_privkey_t key, * For DSA the bits returned are of the public exponent. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. * * Since: 2.4.0 **/ @@ -282,7 +282,7 @@ _gnutls_openpgp_get_algo (int cdk_algo) * Get revocation status of key. * * Returns: true (1) if the key has been revoked, or false (0) if it - * has not, or a negative value indicates an error. + * has not, or a negative error code indicates an error. * * Since: 2.4.0 **/ @@ -395,7 +395,7 @@ gnutls_openpgp_privkey_get_key_id (gnutls_openpgp_privkey_t key, * This function will return the number of subkeys present in the * given OpenPGP certificate. * - * Returns: the number of subkeys, or a negative value on error. + * Returns: the number of subkeys, or a negative error code on error. * * Since: 2.4.0 **/ @@ -452,7 +452,7 @@ _get_secret_subkey (gnutls_openpgp_privkey_t key, unsigned int indx) * Get revocation status of key. * * Returns: true (1) if the key has been revoked, or false (0) if it - * has not, or a negative value indicates an error. + * has not, or a negative error code indicates an error. * * Since: 2.4.0 **/ @@ -491,7 +491,7 @@ gnutls_openpgp_privkey_get_subkey_revoked_status (gnutls_openpgp_privkey_t * For DSA the bits returned are of the public exponent. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. * * Since: 2.4.0 **/ @@ -999,7 +999,7 @@ cleanup: * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1035,7 +1035,7 @@ gnutls_openpgp_privkey_export_rsa_raw (gnutls_openpgp_privkey_t pkey, * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1073,7 +1073,7 @@ gnutls_openpgp_privkey_export_dsa_raw (gnutls_openpgp_privkey_t pkey, * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1114,7 +1114,7 @@ gnutls_openpgp_privkey_export_subkey_rsa_raw (gnutls_openpgp_privkey_t pkey, * in the given certificate. The new parameters will be allocated * using gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * * Since: 2.4.0 **/ @@ -1216,7 +1216,7 @@ gnutls_openpgp_privkey_set_preferred_key_id (gnutls_openpgp_privkey_t key, * should use gnutls_openpgp_privkey_set_preferred_key_id() before * calling this function to set the subkey to use. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated: Use gnutls_privkey_sign_hash() instead. @@ -1281,7 +1281,7 @@ gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key, /*- * _gnutls_openpgp_privkey_decrypt_data: * @key: Holds the key - * @flags: zero for now + * @flags: (0) for now * @ciphertext: holds the data to be decrypted * @plaintext: will contain newly allocated plaintext * @@ -1289,7 +1289,7 @@ gnutls_openpgp_privkey_sign_hash (gnutls_openpgp_privkey_t key, * should use gnutls_openpgp_privkey_set_preferred_key_id() before * calling this function to set the subkey to use. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int diff --git a/lib/pkcs11.c b/lib/pkcs11.c index cadc1f63fb..574db0b3b3 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -239,7 +239,7 @@ fail: * list used in gnutls. After this function is called the module will * be used for PKCS 11 operations. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -285,7 +285,7 @@ gnutls_pkcs11_add_provider (const char *name, const char *params) * output is text it returns null terminated string although %output_size contains * the size of the actual data only. * - * Returns: zero on success or a negative value on error. + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. **/ int gnutls_pkcs11_obj_get_info (gnutls_pkcs11_obj_t crt, @@ -429,7 +429,7 @@ static int init = 0; * by gnutls_global_init() using the %GNUTLS_PKCS11_FLAG_AUTO. If other option * is required then it must be called before it. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -536,7 +536,7 @@ gnutls_pkcs11_deinit (void) * first such invocation, the 'attempt' counter will have value zero; * it will increase by one for each subsequent attempt. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ void @@ -555,7 +555,7 @@ gnutls_pkcs11_set_pin_function (gnutls_pkcs11_pin_callback_t fn, * This function will set a callback function to be used when a token * needs to be inserted to continue PKCS 11 operations. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ void @@ -636,7 +636,7 @@ pkcs11_info_to_url (struct p11_kit_uri *info, * * This function will initialize a pkcs11 certificate structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -692,8 +692,8 @@ gnutls_pkcs11_obj_deinit (gnutls_pkcs11_obj_t obj) * If the structure is PEM encoded, it will have a header * of "BEGIN CERTIFICATE". * - * Return value: In case of failure a negative value will be - * returned, and 0 on success. + * Returns: In case of failure a negative error code will be + * returned, and %GNUTLS_E_SUCCESS (0) on success. **/ int gnutls_pkcs11_obj_export (gnutls_pkcs11_obj_t obj, @@ -1411,7 +1411,7 @@ pkcs11_obj_flags_to_int (unsigned int flags) * parsing (such as X.509 or OpenPGP) since the #gnutls_pkcs11_obj_t is * format agnostic. Only data are transferred. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1488,7 +1488,7 @@ find_token_num (struct ck_function_list *module, * This function will return the URL for each token available * in system. The url has to be released using gnutls_free() * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * if the sequence number exceeds the available tokens, otherwise a negative error value. **/ @@ -1534,7 +1534,7 @@ gnutls_pkcs11_token_get_url (unsigned int seq, * This function will return information about the PKCS 11 token such * as the label, id as well as token information where the key is stored. * - * Returns: zero on success or a negative value on error. + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. **/ int gnutls_pkcs11_token_get_info (const char *url, @@ -1603,7 +1603,7 @@ gnutls_pkcs11_token_get_info (const char *url, * * This function will export a URL identifying the given certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2191,7 +2191,7 @@ fail: * This function will initialize and set values to an object list * by using all objects identified by a PKCS 11 URL. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2248,7 +2248,7 @@ gnutls_pkcs11_obj_list_import_url (gnutls_pkcs11_obj_t * p_list, * without involving the #gnutls_pkcs11_obj_t structure. This function will * fail if the certificate stored is not of X.509 type. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2296,7 +2296,7 @@ cleanup: * This function will import a PKCS 11 certificate to a #gnutls_x509_crt_t * structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2316,7 +2316,7 @@ gnutls_x509_crt_import_pkcs11 (gnutls_x509_crt_t crt, * This function will import a PKCS 11 certificate list to a list of * #gnutls_x509_crt_t structure. These must not be initialized. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2391,7 +2391,7 @@ find_flags (struct ck_function_list * module, ck_session_handle_t pks, * * This function will return information about the PKCS 11 token flags. * - * Returns: zero on success or a negative value on error. + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. **/ int gnutls_pkcs11_token_get_flags (const char *url, unsigned int *flags) @@ -2435,7 +2435,7 @@ gnutls_pkcs11_token_get_flags (const char *url, unsigned int *flags) * by the token. It should be called with an increasing index until * it return GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE. * - * Returns: zero on success or a negative value on error. + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. **/ int gnutls_pkcs11_token_get_mechanism (const char *url, int idx, diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index ab2672dd4c..cef8a60dc7 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -41,7 +41,7 @@ struct gnutls_pkcs11_privkey_st * * This function will initialize an private key structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -87,7 +87,7 @@ gnutls_pkcs11_privkey_deinit (gnutls_pkcs11_privkey_t key) * key. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_pkcs11_privkey_get_pk_algorithm (gnutls_pkcs11_privkey_t key, @@ -110,7 +110,7 @@ gnutls_pkcs11_privkey_get_pk_algorithm (gnutls_pkcs11_privkey_t key, * output is text it returns null terminated string although #output_size contains * the size of the actual data only. * - * Returns: zero on success or a negative value on error. + * Returns: %GNUTLS_E_SUCCESS (0) on success or a negative error code on error. **/ int gnutls_pkcs11_privkey_get_info (gnutls_pkcs11_privkey_t pkey, @@ -148,7 +148,7 @@ gnutls_pkcs11_privkey_get_info (gnutls_pkcs11_privkey_t pkey, * supported by the private key. It is assumed that the given data * are the output of a hash function. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int @@ -223,7 +223,7 @@ cleanup: * in most cases keys cannot be exported, the private key structure * is being associated with the available operations on the token. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -302,7 +302,7 @@ cleanup: * This function will decrypt the given data using the public key algorithm * supported by the private key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int @@ -377,7 +377,7 @@ cleanup: * * This function will export a URL identifying the given key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/pkcs11_secret.c b/lib/pkcs11_secret.c index 44fc2817cf..63afa530ec 100644 --- a/lib/pkcs11_secret.c +++ b/lib/pkcs11_secret.c @@ -38,7 +38,7 @@ * This function will copy a raw secret (symmetric) key into a PKCS #11 * token specified by a URL. The key can be marked as sensitive or not. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/pkcs11_write.c b/lib/pkcs11_write.c index ea555cac53..ed1ee08e90 100644 --- a/lib/pkcs11_write.c +++ b/lib/pkcs11_write.c @@ -39,7 +39,7 @@ static const ck_bool_t fval = 0; * This function will copy a certificate into a PKCS #11 token specified by * a URL. The certificate can be marked as trusted or not. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -214,7 +214,7 @@ cleanup: * a URL. It is highly recommended flags to contain %GNUTLS_PKCS11_OBJ_FLAG_MARK_SENSITIVE * unless there is a strong reason not to. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -650,7 +650,7 @@ gnutls_pkcs11_delete_url (const char *object_url, unsigned int flags) * at a factory defaults state the security officer's PIN given will be * set to be the default. Otherwise it should match the officer's PIN. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -710,7 +710,7 @@ gnutls_pkcs11_token_init (const char *token_url, * If it is called to set a user pin for first time the oldpin must * be NULL. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/random.c b/lib/random.c index 1e4af0e9c7..04867322d0 100644 --- a/lib/random.c +++ b/lib/random.c @@ -64,7 +64,7 @@ _gnutls_rnd_deinit (void) * This function will generate random data and store it * to output buffer. * - * Returns: Zero or a negative value on error. + * Returns: Zero or a negative error code on error. * **/ diff --git a/lib/x509/common.c b/lib/x509/common.c index 55543be504..52b7436d89 100644 --- a/lib/x509/common.c +++ b/lib/x509/common.c @@ -1092,7 +1092,7 @@ _gnutls_x509_der_encode_and_copy (ASN1_TYPE src, const char *src_name, } /* Writes the value of the datum in the given ASN1_TYPE. If str is non - * zero it encodes it as OCTET STRING. + * (0) it encodes it as OCTET STRING. */ int _gnutls_x509_write_value (ASN1_TYPE c, const char *root, @@ -1348,7 +1348,7 @@ cleanup: * enumeration that is the signature algorithm that has been used to * sign this certificate. * - * Returns: a #gnutls_sign_algorithm_t value, or a negative value on + * Returns: a #gnutls_sign_algorithm_t value, or a negative error code on * error. -*/ int diff --git a/lib/x509/crl.c b/lib/x509/crl.c index 761551c8ad..57decfc98e 100644 --- a/lib/x509/crl.c +++ b/lib/x509/crl.c @@ -44,7 +44,7 @@ * Authority. The revocation lists are always signed with the * authority's private key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -97,7 +97,7 @@ gnutls_x509_crl_deinit (gnutls_x509_crl_t crl) * * If the CRL is PEM encoded it should have a header of "X509 CRL". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -197,8 +197,8 @@ gnutls_x509_crl_get_issuer_dn (const gnutls_x509_crl_t crl, char *buf, * gnutls_x509_crl_get_issuer_dn_by_oid: * @crl: should contain a gnutls_x509_crl_t structure * @oid: holds an Object Identified in null terminated string - * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use zero to get the first one. - * @raw_flag: If non zero returns the raw DER data of the DN part. + * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one. + * @raw_flag: If non (0) returns the raw DER data of the DN part. * @buf: a pointer to a structure to hold the peer's name (may be null) * @sizeof_buf: initially holds the size of @buf * @@ -208,7 +208,7 @@ gnutls_x509_crl_get_issuer_dn (const gnutls_x509_crl_t crl, char *buf, * depending on the certificate data. * * Some helper macros with popular OIDs can be found in gnutls/x509.h - * If raw flag is zero, this function will only return known OIDs as + * If raw flag is (0), this function will only return known OIDs as * text. Other OIDs will be DER encoded, as described in RFC2253 -- in * hex format with a '\#' prefix. You can check about known OIDs * using gnutls_x509_dn_oid_known(). @@ -239,7 +239,7 @@ gnutls_x509_crl_get_issuer_dn_by_oid (gnutls_x509_crl_t crl, /** * gnutls_x509_crl_get_dn_oid: * @crl: should contain a gnutls_x509_crl_t structure - * @indx: Specifies which DN OID to send. Use zero to get the first one. + * @indx: Specifies which DN OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the name (may be null) * @sizeof_oid: initially holds the size of 'oid' * @@ -275,7 +275,7 @@ gnutls_x509_crl_get_dn_oid (gnutls_x509_crl_t crl, * This function will return a value of the #gnutls_sign_algorithm_t * enumeration that is the signature algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -319,8 +319,8 @@ gnutls_x509_crl_get_signature_algorithm (gnutls_x509_crl_t crl) * * This function will extract the signature field of a CRL. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. and a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. and a negative error code on error. **/ int gnutls_x509_crl_get_signature (gnutls_x509_crl_t crl, @@ -374,7 +374,7 @@ gnutls_x509_crl_get_signature (gnutls_x509_crl_t crl, * * This function will return the version of the specified CRL. * - * Returns: The version number, or a negative value on error. + * Returns: The version number, or a negative error code on error. **/ int gnutls_x509_crl_get_version (gnutls_x509_crl_t crl) @@ -449,7 +449,7 @@ gnutls_x509_crl_get_next_update (gnutls_x509_crl_t crl) * This function will return the number of revoked certificates in the * given CRL. * - * Returns: number of certificates, a negative value on failure. + * Returns: number of certificates, a negative error code on failure. **/ int gnutls_x509_crl_get_crt_count (gnutls_x509_crl_t crl) @@ -487,8 +487,8 @@ gnutls_x509_crl_get_crt_count (gnutls_x509_crl_t crl) * This function will retrieve the serial number of the specified, by * the index, revoked certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. and a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. and a negative error code on error. **/ int gnutls_x509_crl_get_crt_serial (gnutls_x509_crl_t crl, int indx, @@ -539,7 +539,7 @@ gnutls_x509_crl_get_crt_serial (gnutls_x509_crl_t crl, int indx, * This function will return a pointer to the DER encoded DN structure * and the length. * - * Returns: a negative value on error, and zero on success. + * Returns: a negative error code on error, and (0) on success. * * Since: 2.12.0 **/ @@ -627,8 +627,8 @@ cleanup: * If the structure is PEM encoded, it will have a header * of "BEGIN X509 CRL". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. and a negative value on failure. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. and a negative error code on failure. **/ int gnutls_x509_crl_export (gnutls_x509_crl_t crl, @@ -652,7 +652,7 @@ gnutls_x509_crl_export (gnutls_x509_crl_t crl, * * This function will copy an X.509 certificate structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int @@ -706,7 +706,7 @@ _gnutls_x509_crl_cpy (gnutls_x509_crl_t dest, gnutls_x509_crl_t src) * @crl: should contain a #gnutls_x509_crl_t structure * @ret: The place where the identifier will be copied * @ret_size: Holds the size of the result field. - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * (may be null) * * This function will return the CRL authority's key identifier. This @@ -714,8 +714,8 @@ _gnutls_x509_crl_cpy (gnutls_x509_crl_t dest, gnutls_x509_crl_t src) * (2.5.29.35). Note that this function only returns the * keyIdentifier field of the extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. * * Since: 2.8.0 **/ @@ -797,14 +797,14 @@ gnutls_x509_crl_get_authority_key_id (gnutls_x509_crl_t crl, void *ret, * @crl: should contain a #gnutls_x509_crl_t structure * @ret: The place where the number will be copied * @ret_size: Holds the size of the result field. - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * (may be null) * * This function will return the CRL number extension. This is * obtained by the CRL Number extension field (2.5.29.20). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. * * Since: 2.8.0 **/ @@ -856,7 +856,7 @@ gnutls_x509_crl_get_number (gnutls_x509_crl_t crl, void *ret, /** * gnutls_x509_crl_get_extension_oid: * @crl: should contain a #gnutls_x509_crl_t structure - * @indx: Specifies which extension OID to send, use zero to get the first one. + * @indx: Specifies which extension OID to send, use (0) to get the first one. * @oid: a pointer to a structure to hold the OID (may be null) * @sizeof_oid: initially holds the size of @oid * @@ -864,8 +864,8 @@ gnutls_x509_crl_get_number (gnutls_x509_crl_t crl, void *ret, * The extension OID will be stored as a string in the provided * buffer. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -896,7 +896,7 @@ gnutls_x509_crl_get_extension_oid (gnutls_x509_crl_t crl, int indx, /** * gnutls_x509_crl_get_extension_info: * @crl: should contain a #gnutls_x509_crl_t structure - * @indx: Specifies which extension OID to send, use zero to get the first one. + * @indx: Specifies which extension OID to send, use (0) to get the first one. * @oid: a pointer to a structure to hold the OID * @sizeof_oid: initially holds the maximum size of @oid, on return * holds actual size of @oid. @@ -911,8 +911,8 @@ gnutls_x509_crl_get_extension_oid (gnutls_x509_crl_t crl, int indx, * *@sizeof_oid is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will be * returned. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -974,7 +974,7 @@ gnutls_x509_crl_get_extension_info (gnutls_x509_crl_t crl, int indx, /** * gnutls_x509_crl_get_extension_data: * @crl: should contain a #gnutls_x509_crl_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @data: a pointer to a structure to hold the data (may be null) * @sizeof_data: initially holds the size of @oid * @@ -987,8 +987,8 @@ gnutls_x509_crl_get_extension_info (gnutls_x509_crl_t crl, int indx, * if you want to get data indexed by the extension OID rather than * sequence. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -1031,7 +1031,7 @@ gnutls_x509_crl_get_extension_data (gnutls_x509_crl_t crl, int indx, * @size: It will contain the size of the list. * @data: The PEM encoded CRL. * @format: One of DER or PEM. - * @flags: must be zero or an OR'd sequence of gnutls_certificate_import_flags. + * @flags: must be (0) or an OR'd sequence of gnutls_certificate_import_flags. * * This function will convert the given PEM encoded CRL list * to the native gnutls_x509_crl_t format. The output will be stored @@ -1088,7 +1088,7 @@ int ret; * @crl_max: Initially must hold the maximum number of crls. It will be updated with the number of crls available. * @data: The PEM encoded CRLs * @format: One of DER or PEM. - * @flags: must be zero or an OR'd sequence of gnutls_certificate_import_flags. + * @flags: must be (0) or an OR'd sequence of gnutls_certificate_import_flags. * * This function will convert the given PEM encoded CRL list * to the native gnutls_x509_crl_t format. The output will be stored diff --git a/lib/x509/crl_write.c b/lib/x509/crl_write.c index 76b90469d2..055459bbc5 100644 --- a/lib/x509/crl_write.c +++ b/lib/x509/crl_write.c @@ -48,7 +48,7 @@ static void disable_optional_stuff (gnutls_x509_crl_t crl); * must be one for CRL version 1, and so on. The CRLs generated * by gnutls should have a version number of 2. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -90,7 +90,7 @@ gnutls_x509_crl_set_version (gnutls_x509_crl_t crl, unsigned int version) * This must be the last step in a certificate CRL since all * the previously set parameters are now signed. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated: Use gnutls_x509_crl_privkey_sign() instead. @@ -147,7 +147,7 @@ fail: * This function is the same a gnutls_x509_crl_sign2() with no flags, and * SHA1 as the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated: Use gnutls_x509_crl_privkey_sign(). @@ -166,7 +166,7 @@ gnutls_x509_crl_sign (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer, * * This function will set the time this CRL was issued. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -188,7 +188,7 @@ gnutls_x509_crl_set_this_update (gnutls_x509_crl_t crl, time_t act_time) * * This function will set the time this CRL will be updated. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -211,7 +211,7 @@ gnutls_x509_crl_set_next_update (gnutls_x509_crl_t crl, time_t exp_time) * * This function will set a revoked certificate's serial number to the CRL. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -276,7 +276,7 @@ gnutls_x509_crl_set_crt_serial (gnutls_x509_crl_t crl, * * This function will set a revoked certificate's serial number to the CRL. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -338,7 +338,7 @@ disable_optional_stuff (gnutls_x509_crl_t crl) * This function will set the CRL's authority key ID extension. Only * the keyIdentifier field can be set with this function. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -402,7 +402,7 @@ gnutls_x509_crl_set_authority_key_id (gnutls_x509_crl_t crl, * * This function will set the CRL's number extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -472,7 +472,7 @@ gnutls_x509_crl_set_number (gnutls_x509_crl_t crl, * This must be the last step in a certificate CRL since all * the previously set parameters are now signed. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/crq.c b/lib/x509/crq.c index 31ee862067..ce6ec5af79 100644 --- a/lib/x509/crq.c +++ b/lib/x509/crq.c @@ -45,7 +45,7 @@ * This function will initialize a PKCS#10 certificate request * structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -105,7 +105,7 @@ gnutls_x509_crq_deinit (gnutls_x509_crq_t crq) * If the Certificate is PEM encoded it should have a header of "NEW * CERTIFICATE REQUEST". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -205,8 +205,8 @@ gnutls_x509_crq_get_dn (gnutls_x509_crq_t crq, char *buf, size_t * sizeof_buf) * @crq: should contain a gnutls_x509_crq_t structure * @oid: holds an Object Identified in null terminated string * @indx: In case multiple same OIDs exist in the RDN, this specifies - * which to send. Use zero to get the first one. - * @raw_flag: If non zero returns the raw DER data of the DN part. + * which to send. Use (0) to get the first one. + * @raw_flag: If non (0) returns the raw DER data of the DN part. * @buf: a pointer to a structure to hold the name (may be %NULL) * @sizeof_buf: initially holds the size of @buf * @@ -216,7 +216,7 @@ gnutls_x509_crq_get_dn (gnutls_x509_crq_t crq, char *buf, size_t * sizeof_buf) * or UTF-8 encoded, depending on the certificate data. * * Some helper macros with popular OIDs can be found in gnutls/x509.h - * If raw flag is zero, this function will only return known OIDs as + * If raw flag is (0), this function will only return known OIDs as * text. Other OIDs will be DER encoded, as described in RFC2253 -- * in hex format with a '\#' prefix. You can check about known OIDs * using gnutls_x509_dn_oid_known(). @@ -245,7 +245,7 @@ gnutls_x509_crq_get_dn_by_oid (gnutls_x509_crq_t crq, const char *oid, /** * gnutls_x509_crq_get_dn_oid: * @crq: should contain a gnutls_x509_crq_t structure - * @indx: Specifies which DN OID to send. Use zero to get the first one. + * @indx: Specifies which DN OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the name (may be %NULL) * @sizeof_oid: initially holds the size of @oid * @@ -409,14 +409,14 @@ cleanup: /** * gnutls_x509_crq_get_challenge_password: * @crq: should contain a #gnutls_x509_crq_t structure - * @pass: will hold a zero-terminated password string + * @pass: will hold a (0)-terminated password string * @sizeof_pass: Initially holds the size of @pass. * * This function will return the challenge password in the request. * The challenge password is intended to be used for requesting a * revocation of the certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -593,7 +593,7 @@ set_attribute (ASN1_TYPE asn, const char *root, /** * gnutls_x509_crq_set_attribute_by_oid: * @crq: should contain a #gnutls_x509_crq_t structure - * @oid: holds an Object Identified in zero-terminated string + * @oid: holds an Object Identified in (0)-terminated string * @buf: a pointer to a structure that holds the attribute data * @sizeof_buf: holds the size of @buf * @@ -601,7 +601,7 @@ set_attribute (ASN1_TYPE asn, const char *root, * specified by the given Object ID. The attribute must be be DER * encoded. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -627,9 +627,9 @@ gnutls_x509_crq_set_attribute_by_oid (gnutls_x509_crq_t crq, /** * gnutls_x509_crq_get_attribute_by_oid: * @crq: should contain a #gnutls_x509_crq_t structure - * @oid: holds an Object Identified in zero-terminated string + * @oid: holds an Object Identified in (0)-terminated string * @indx: In case multiple same OIDs exist in the attribute list, this - * specifies which to send, use zero to get the first one + * specifies which to send, use (0) to get the first one * @buf: a pointer to a structure to hold the attribute data (may be %NULL) * @sizeof_buf: initially holds the size of @buf * @@ -637,7 +637,7 @@ gnutls_x509_crq_set_attribute_by_oid (gnutls_x509_crq_t crq, * specified by the given Object ID. The attribute will be DER * encoded. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -658,7 +658,7 @@ gnutls_x509_crq_get_attribute_by_oid (gnutls_x509_crq_t crq, /** * gnutls_x509_crq_set_dn_by_oid: * @crq: should contain a #gnutls_x509_crq_t structure - * @oid: holds an Object Identifier in a zero-terminated string + * @oid: holds an Object Identifier in a (0)-terminated string * @raw_flag: must be 0, or 1 if the data are DER encoded * @data: a pointer to the input data * @sizeof_data: holds the size of @data @@ -673,7 +673,7 @@ gnutls_x509_crq_get_attribute_by_oid (gnutls_x509_crq_t crq, * not known (by gnutls) you should properly DER encode your data, and * call this function with raw_flag set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -699,7 +699,7 @@ gnutls_x509_crq_set_dn_by_oid (gnutls_x509_crq_t crq, const char *oid, * This function will set the version of the certificate request. For * version 1 requests this must be one. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -735,7 +735,7 @@ gnutls_x509_crq_set_version (gnutls_x509_crq_t crq, unsigned int version) * This function will return the version of the specified Certificate * request. * - * Returns: version of certificate request, or a negative value on + * Returns: version of certificate request, or a negative error code on * error. **/ int @@ -773,7 +773,7 @@ gnutls_x509_crq_get_version (gnutls_x509_crq_t crq) * This function will set the public parameters from the given private * key to the request. Only RSA keys are currently supported. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -811,7 +811,7 @@ gnutls_x509_crq_set_key (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key) * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -876,7 +876,7 @@ cleanup: * This function will set the public parameters from the given private * key to the request. Only RSA keys are currently supported. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.6.0 @@ -940,12 +940,12 @@ error: /** * gnutls_x509_crq_set_challenge_password: * @crq: should contain a #gnutls_x509_crq_t structure - * @pass: holds a zero-terminated password + * @pass: holds a (0)-terminated password * * This function will set a challenge password to be used when * revoking the request. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -997,7 +997,7 @@ gnutls_x509_crq_set_challenge_password (gnutls_x509_crq_t crq, * This must be the last step in a certificate request generation * since all the previously set parameters are now signed. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * %GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all * information in the certificate request (e.g., the version using * gnutls_x509_crq_set_version()). @@ -1054,7 +1054,7 @@ fail: * This function is the same a gnutls_x509_crq_sign2() with no flags, * and SHA1 as the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated: Use gnutls_x509_crq_privkey_sign() instead. @@ -1083,7 +1083,7 @@ gnutls_x509_crq_sign (gnutls_x509_crq_t crq, gnutls_x509_privkey_t key) * If the structure is PEM encoded, it will have a header of "BEGIN * NEW CERTIFICATE REQUEST". * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -1114,7 +1114,7 @@ gnutls_x509_crq_export (gnutls_x509_crq_t crq, * For DSA the bits returned are of the public exponent. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_x509_crq_get_pk_algorithm (gnutls_x509_crq_t crq, unsigned int *bits) @@ -1140,7 +1140,7 @@ gnutls_x509_crq_get_pk_algorithm (gnutls_x509_crq_t crq, unsigned int *bits) /** * gnutls_x509_crq_get_attribute_info: * @crq: should contain a #gnutls_x509_crq_t structure - * @indx: Specifies which attribute OID to send. Use zero to get the first one. + * @indx: Specifies which attribute OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the OID * @sizeof_oid: initially holds the maximum size of @oid, on return * holds actual size of @oid. @@ -1154,8 +1154,8 @@ gnutls_x509_crq_get_pk_algorithm (gnutls_x509_crq_t crq, unsigned int *bits) * *@sizeof_oid is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will be * returned. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -1197,7 +1197,7 @@ gnutls_x509_crq_get_attribute_info (gnutls_x509_crq_t crq, int indx, /** * gnutls_x509_crq_get_attribute_data: * @crq: should contain a #gnutls_x509_crq_t structure - * @indx: Specifies which attribute OID to send. Use zero to get the first one. + * @indx: Specifies which attribute OID to send. Use (0) to get the first one. * @data: a pointer to a structure to hold the data (may be null) * @sizeof_data: initially holds the size of @oid * @@ -1210,8 +1210,8 @@ gnutls_x509_crq_get_attribute_info (gnutls_x509_crq_t crq, int indx, * if you want to get data indexed by the attribute OID rather than * sequence. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -1251,7 +1251,7 @@ gnutls_x509_crq_get_attribute_data (gnutls_x509_crq_t crq, int indx, /** * gnutls_x509_crq_get_extension_info: * @crq: should contain a #gnutls_x509_crq_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the OID * @sizeof_oid: initially holds the maximum size of @oid, on return * holds actual size of @oid. @@ -1266,8 +1266,8 @@ gnutls_x509_crq_get_attribute_data (gnutls_x509_crq_t crq, int indx, * *@sizeof_oid is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will be * returned. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -1383,7 +1383,7 @@ out: /** * gnutls_x509_crq_get_extension_data: * @crq: should contain a #gnutls_x509_crq_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @data: a pointer to a structure to hold the data (may be null) * @sizeof_data: initially holds the size of @oid * @@ -1396,8 +1396,8 @@ out: * if you want to get data indexed by the extension OID rather than * sequence. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If your have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If your have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. * @@ -1486,7 +1486,7 @@ gnutls_x509_crq_get_extension_data (gnutls_x509_crq_t crq, int indx, * gnutls_x509_crq_get_key_usage: * @crq: should contain a #gnutls_x509_crq_t structure * @key_usage: where the key usage bits will be stored - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * * This function will return certificate's key usage, by reading the * keyUsage X.509 extension (2.5.29.15). The key usage value will @@ -1496,7 +1496,7 @@ gnutls_x509_crq_get_extension_data (gnutls_x509_crq_t crq, int indx, * %GNUTLS_KEY_KEY_CERT_SIGN, %GNUTLS_KEY_CRL_SIGN, * %GNUTLS_KEY_ENCIPHER_ONLY, %GNUTLS_KEY_DECIPHER_ONLY. * - * Returns: the certificate key usage, or a negative value in case of + * Returns: the certificate key usage, or a negative error code in case of * parsing error. If the certificate does not contain the keyUsage * extension %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be * returned. @@ -1543,11 +1543,11 @@ gnutls_x509_crq_get_key_usage (gnutls_x509_crq_t crq, /** * gnutls_x509_crq_get_basic_constraints: * @crq: should contain a #gnutls_x509_crq_t structure - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * @ca: pointer to output integer indicating CA status, may be NULL, * value is 1 if the certificate CA flag is set, 0 otherwise. * @pathlen: pointer to output integer indicating path length (may be - * NULL), non-negative values indicate a present pathLenConstraint + * NULL), non-negative error codes indicate a present pathLenConstraint * field and the actual value, -1 indicate that the field is absent. * * This function will read the certificate's basic constraints, and @@ -1555,8 +1555,8 @@ gnutls_x509_crq_get_key_usage (gnutls_x509_crq_t crq, * X.509 extension (2.5.29.19). * * Return value: If the certificate is a CA a positive value will be - * returned, or zero if the certificate does not have CA flag set. - * A negative value may be returned in case of errors. If the + * returned, or (0) if the certificate does not have CA flag set. + * A negative error code may be returned in case of errors. If the * certificate does not contain the basicConstraints extension * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. * @@ -1691,7 +1691,7 @@ get_subject_alt_name (gnutls_x509_crq_t crq, * @ret: is the place where the alternative name will be copied to * @ret_size: holds the size of ret. * @ret_type: holds the #gnutls_x509_subject_alt_name_t name type - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * (may be null) * * This function will return the alternative names, contained in the @@ -1763,17 +1763,17 @@ gnutls_x509_crq_get_subject_alt_othername_oid (gnutls_x509_crq_t crq, * @crq: should contain a #gnutls_x509_crq_t structure * @oid: holds an Object Identified in null terminated string * @indx: In case multiple same OIDs exist in the extensions, this - * specifies which to send. Use zero to get the first one. + * specifies which to send. Use (0) to get the first one. * @buf: a pointer to a structure to hold the name (may be null) * @sizeof_buf: initially holds the size of @buf - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * * This function will return the extension specified by the OID in * the certificate. The extensions will be returned as binary data * DER encoded, in the provided buffer. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative value in case of an error. If the certificate does not + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error code in case of an error. If the certificate does not * contain the specified extension * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. * @@ -1839,7 +1839,7 @@ gnutls_x509_crq_get_extension_by_oid (gnutls_x509_crq_t crq, * * Other values can be set as binary values with the proper DER encoding. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -1936,13 +1936,13 @@ finish: * gnutls_x509_crq_set_basic_constraints: * @crq: a certificate request of type #gnutls_x509_crq_t * @ca: true(1) or false(0) depending on the Certificate authority status. - * @pathLenConstraint: non-negative values indicate maximum length of path, - * and negative values indicate that the pathLenConstraints field should + * @pathLenConstraint: non-negative error codes indicate maximum length of path, + * and negative error codes indicate that the pathLenConstraints field should * not be present. * * This function will set the basicConstraints certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -1990,7 +1990,7 @@ gnutls_x509_crq_set_basic_constraints (gnutls_x509_crq_t crq, * * This function will set the keyUsage certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -2032,7 +2032,7 @@ gnutls_x509_crq_set_key_usage (gnutls_x509_crq_t crq, unsigned int usage) /** * gnutls_x509_crq_get_key_purpose_oid: * @crq: should contain a #gnutls_x509_crq_t structure - * @indx: This specifies which OID to return, use zero to get the first one + * @indx: This specifies which OID to return, use (0) to get the first one * @oid: a pointer to a buffer to hold the OID (may be %NULL) * @sizeof_oid: initially holds the size of @oid * @critical: output variable with critical flag, may be %NULL. @@ -2140,7 +2140,7 @@ gnutls_x509_crq_get_key_purpose_oid (gnutls_x509_crq_t crq, /** * gnutls_x509_crq_set_key_purpose_oid: * @crq: a certificate of type #gnutls_x509_crq_t - * @oid: a pointer to a zero-terminated string that holds the OID + * @oid: a pointer to a (0)-terminated string that holds the OID * @critical: Whether this extension will be critical or not * * This function will set the key purpose OIDs of the Certificate. @@ -2149,7 +2149,7 @@ gnutls_x509_crq_get_key_purpose_oid (gnutls_x509_crq_t crq, * * Subsequent calls to this function will append OIDs to the OID list. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -2331,7 +2331,7 @@ cleanup: * be returned. The output will normally be a SHA-1 hash output, * which is 20 bytes. * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. * * Since: 2.8.0 @@ -2423,7 +2423,7 @@ gnutls_x509_crq_get_key_id (gnutls_x509_crq_t crq, unsigned int flags, * This must be the last step in a certificate request generation * since all the previously set parameters are now signed. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. * %GNUTLS_E_ASN1_VALUE_NOT_FOUND is returned if you didn't set all * information in the certificate request (e.g., the version using * gnutls_x509_crq_set_version()). @@ -2511,7 +2511,7 @@ gnutls_x509_crq_privkey_sign (gnutls_x509_crq_t crq, gnutls_privkey_t key, * This function will verify self signature in the certificate * request and return its status. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, %GNUTLS_E_PK_SIG_VERIFY_FAILED + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, %GNUTLS_E_PK_SIG_VERIFY_FAILED * if verification failed, otherwise a negative error value. **/ int diff --git a/lib/x509/dn.c b/lib/x509/dn.c index 948d6f08cb..c1979318ec 100644 --- a/lib/x509/dn.c +++ b/lib/x509/dn.c @@ -635,7 +635,7 @@ cleanup: } /* This will encode and write the AttributeTypeAndValue field. - * 'multi' must be zero if writing an AttributeTypeAndValue, and 1 if Attribute. + * 'multi' must be (0) if writing an AttributeTypeAndValue, and 1 if Attribute. * In all cases only one value is written. */ int @@ -764,7 +764,7 @@ error: } /* This will write the AttributeTypeAndValue field. The data must be already DER encoded. - * 'multi' must be zero if writing an AttributeTypeAndValue, and 1 if Attribute. + * 'multi' must be (0) if writing an AttributeTypeAndValue, and 1 if Attribute. * In all cases only one value is written. */ static int @@ -807,7 +807,7 @@ _gnutls_x509_write_attribute (const char *given_oid, /* Decodes an X.509 Attribute (if multi==1) or an AttributeTypeAndValue * otherwise. * - * octet_string should be non zero if we are to decode octet strings after + * octet_string should be non (0) if we are to decode octet strings after * decoding. * * The output is allocated and stored in value. @@ -949,7 +949,7 @@ _gnutls_x509_set_dn_oid (ASN1_TYPE asn1_struct, * The object returned must be deallocated using * gnutls_x509_dn_deinit(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.4.0 @@ -983,7 +983,7 @@ gnutls_x509_dn_init (gnutls_x509_dn_t * dn) * with gnutls_x509_dn_init(). You may use gnutls_x509_dn_get_rdn_ava() to * decode the DN. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.4.0 @@ -1032,7 +1032,7 @@ gnutls_x509_dn_deinit (gnutls_x509_dn_t dn) * name will be in the form "C=xxxx,O=yyyy,CN=zzzz" as described in * RFC2253. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, or + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, or * %GNUTLS_E_SHORT_MEMORY_BUFFER is returned and *@sizeof_buf is * updated if the provided buffer is not long enough, otherwise a * negative error value. @@ -1084,7 +1084,7 @@ gnutls_x509_rdn_get (const gnutls_datum_t * idn, * @oid: an Object Identifier * @indx: In case multiple same OIDs exist in the RDN indicates which * to send. Use 0 for the first one. - * @raw_flag: If non zero then the raw DER data are returned. + * @raw_flag: If non (0) then the raw DER data are returned. * @buf: a pointer to a structure to hold the peer's name * @sizeof_buf: holds the size of @buf * @@ -1092,7 +1092,7 @@ gnutls_x509_rdn_get (const gnutls_datum_t * idn, * of the RDN sequence. The name will be encoded using the rules * from RFC2253. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, or + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, or * %GNUTLS_E_SHORT_MEMORY_BUFFER is returned and *@sizeof_buf is * updated if the provided buffer is not long enough, otherwise a * negative error value. @@ -1146,7 +1146,7 @@ gnutls_x509_rdn_get_by_oid (const gnutls_datum_t * idn, const char *oid, * This function will return the specified Object identifier, of the * RDN sequence. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, or + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, or * %GNUTLS_E_SHORT_MEMORY_BUFFER is returned and *@sizeof_buf is * updated if the provided buffer is not long enough, otherwise a * negative error value. @@ -1194,8 +1194,8 @@ gnutls_x509_rdn_get_oid (const gnutls_datum_t * idn, * * FIXME: use a real DN comparison algorithm. * - * Returns 1 if the DN's match and zero if they don't match. Otherwise - * a negative value is returned to indicate error. + * Returns 1 if the DN's match and (0) if they don't match. Otherwise + * a negative error code is returned to indicate error. */ int _gnutls_x509_compare_raw_dn (const gnutls_datum_t * dn1, @@ -1232,7 +1232,7 @@ _gnutls_x509_compare_raw_dn (const gnutls_datum_t * dn1, * If the structure is PEM encoded, it will have a header * of "BEGIN NAME". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/extensions.c b/lib/x509/extensions.c index 43f867175e..a0cd3d9384 100644 --- a/lib/x509/extensions.c +++ b/lib/x509/extensions.c @@ -714,7 +714,7 @@ _gnutls_x509_ext_extract_basicConstraints (int *CA, /* generate the basicConstraints in a DER encoded extension * Use 0 or 1 (TRUE) for CA. - * Use negative values for pathLenConstraint to indicate that the field + * Use negative error codes for pathLenConstraint to indicate that the field * should not be present, >= 0 to indicate set values. */ int diff --git a/lib/x509/output.c b/lib/x509/output.c index e32fa9af05..387c0e0b08 100644 --- a/lib/x509/output.c +++ b/lib/x509/output.c @@ -1549,7 +1549,7 @@ print_oneline (gnutls_buffer_st * str, gnutls_x509_crt_t cert) * gnutls_x509_crt_print: * @cert: The structure to be printed * @format: Indicate the format to use - * @out: Newly allocated datum with zero terminated string. + * @out: Newly allocated datum with (0) terminated string. * * This function will pretty print a X.509 certificate, suitable for * display to a human. @@ -1561,7 +1561,7 @@ print_oneline (gnutls_buffer_st * str, gnutls_x509_crt_t cert) * * The output @out needs to be deallocate using gnutls_free(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1910,14 +1910,14 @@ print_crl (gnutls_buffer_st * str, gnutls_x509_crl_t crl, int notsigned) * gnutls_x509_crl_print: * @crl: The structure to be printed * @format: Indicate the format to use - * @out: Newly allocated datum with zero terminated string. + * @out: Newly allocated datum with (0) terminated string. * * This function will pretty print a X.509 certificate revocation * list, suitable for display to a human. * * The output @out needs to be deallocate using gnutls_free(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -2222,14 +2222,14 @@ print_crq_other (gnutls_buffer_st * str, gnutls_x509_crq_t crq) * gnutls_x509_crq_print: * @crq: The structure to be printed * @format: Indicate the format to use - * @out: Newly allocated datum with zero terminated string. + * @out: Newly allocated datum with (0) terminated string. * * This function will pretty print a certificate request, suitable for * display to a human. * * The output @out needs to be deallocate using gnutls_free(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c index 23253a3b83..d5ef3dd7a5 100644 --- a/lib/x509/pkcs12.c +++ b/lib/x509/pkcs12.c @@ -131,7 +131,7 @@ cleanup: * usually contain lists of X.509 Certificates and X.509 Certificate * revocation lists. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -185,7 +185,7 @@ gnutls_pkcs12_deinit (gnutls_pkcs12_t pkcs12) * * If the PKCS12 is PEM encoded it should have a header of "PKCS12". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -268,7 +268,7 @@ cleanup: * If the structure is PEM encoded, it will have a header * of "BEGIN PKCS12". * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -580,7 +580,7 @@ cleanup: * After the last Bag has been read * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -725,7 +725,7 @@ cleanup: * * This function will insert a Bag into the PKCS12 structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -857,7 +857,7 @@ cleanup: * * This function will generate a MAC for the PKCS12 structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -990,7 +990,7 @@ cleanup: * * This function will verify the MAC for the PKCS12 structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1206,7 +1206,7 @@ write_attributes (gnutls_pkcs12_bag_t bag, int elem, /* Encodes the bag into a SafeContents structure, and puts the output in - * the given datum. Enc is set to non zero if the data are encrypted; + * the given datum. Enc is set to non (0) if the data are encrypted; */ int _pkcs12_encode_safe_contents (gnutls_pkcs12_bag_t bag, ASN1_TYPE * contents, diff --git a/lib/x509/pkcs12_bag.c b/lib/x509/pkcs12_bag.c index a894733936..7741a26c58 100644 --- a/lib/x509/pkcs12_bag.c +++ b/lib/x509/pkcs12_bag.c @@ -42,7 +42,7 @@ * usually contain private keys, lists of X.509 Certificates and X.509 * Certificate revocation lists. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -145,7 +145,7 @@ gnutls_pkcs12_bag_get_count (gnutls_pkcs12_bag_t bag) * that is stored into the bag. Should not be accessed after the bag * is deleted. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -497,7 +497,7 @@ gnutls_pkcs12_bag_set_crt (gnutls_pkcs12_bag_t bag, gnutls_x509_crt_t crt) * This function will insert the given CRL into the * bag. This is just a wrapper over gnutls_pkcs12_bag_set_data(). * - * Returns: the index of the added bag on success, or a negative value + * Returns: the index of the added bag on success, or a negative error code * on failure. **/ int @@ -538,8 +538,8 @@ gnutls_pkcs12_bag_set_crl (gnutls_pkcs12_bag_t bag, gnutls_x509_crl_t crl) * identifier' bag attribute, which is usually used to distinguish * the local private key and the certificate pair. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. or a negative error code on error. **/ int gnutls_pkcs12_bag_set_key_id (gnutls_pkcs12_bag_t bag, int indx, @@ -582,8 +582,8 @@ gnutls_pkcs12_bag_set_key_id (gnutls_pkcs12_bag_t bag, int indx, * The key ID is usually used to distinguish the local private key and * the certificate pair. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. or a negative error code on error. **/ int gnutls_pkcs12_bag_get_key_id (gnutls_pkcs12_bag_t bag, int indx, @@ -617,8 +617,8 @@ gnutls_pkcs12_bag_get_key_id (gnutls_pkcs12_bag_t bag, int indx, * element. The key ID is usually used to distinguish the local * private key and the certificate pair. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. or a negative error code on error. **/ int gnutls_pkcs12_bag_get_friendly_name (gnutls_pkcs12_bag_t bag, int indx, @@ -653,8 +653,8 @@ gnutls_pkcs12_bag_get_friendly_name (gnutls_pkcs12_bag_t bag, int indx, * a 'Friendly name' bag attribute, which is usually used to set a * user name to the local private key and the certificate pair. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. or a negative error code on error. **/ int gnutls_pkcs12_bag_set_friendly_name (gnutls_pkcs12_bag_t bag, int indx, @@ -692,8 +692,8 @@ gnutls_pkcs12_bag_set_friendly_name (gnutls_pkcs12_bag_t bag, int indx, * This function will decrypt the given encrypted bag and return 0 on * success. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_pkcs12_bag_decrypt (gnutls_pkcs12_bag_t bag, const char *pass) @@ -748,8 +748,8 @@ gnutls_pkcs12_bag_decrypt (gnutls_pkcs12_bag_t bag, const char *pass) * * This function will encrypt the given bag. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_pkcs12_bag_encrypt (gnutls_pkcs12_bag_t bag, const char *pass, diff --git a/lib/x509/pkcs12_encr.c b/lib/x509/pkcs12_encr.c index 6ce5407a43..4743cfdc0e 100644 --- a/lib/x509/pkcs12_encr.c +++ b/lib/x509/pkcs12_encr.c @@ -112,7 +112,7 @@ _gnutls_pkcs12_string_to_key (unsigned int id, const opaque * salt, { *p++ = 0; *p++ = pw[j]; - if (++j > pwlen) /* Note, that we include the trailing zero */ + if (++j > pwlen) /* Note, that we include the trailing (0) */ j = 0; } } diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c index aa0ea44eb7..d125443dca 100644 --- a/lib/x509/pkcs7.c +++ b/lib/x509/pkcs7.c @@ -144,7 +144,7 @@ cleanup: * usually contain lists of X.509 Certificates and X.509 Certificate * revocation lists. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -198,7 +198,7 @@ gnutls_pkcs7_deinit (gnutls_pkcs7_t pkcs7) * * If the PKCS7 is PEM encoded it should have a header of "PKCS7". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -271,7 +271,7 @@ cleanup: * After the last certificate has been read * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. If the provided buffer is not long enough, * then @certificate_size is updated and * %GNUTLS_E_SHORT_MEMORY_BUFFER is returned. @@ -373,7 +373,7 @@ cleanup: * This function will return the number of certifcates in the PKCS7 * or RFC2630 certificate set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -427,7 +427,7 @@ gnutls_pkcs7_get_crt_count (gnutls_pkcs7_t pkcs7) * If the structure is PEM encoded, it will have a header * of "BEGIN PKCS7". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -529,7 +529,7 @@ cleanup: * This function will add a certificate to the PKCS7 or RFC2630 * certificate set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -624,7 +624,7 @@ cleanup: * RFC2630 certificate set. This is a wrapper function over * gnutls_pkcs7_set_crt_raw() . * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -665,7 +665,7 @@ gnutls_pkcs7_set_crt (gnutls_pkcs7_t pkcs7, gnutls_x509_crt_t crt) * This function will delete a certificate from a PKCS7 or RFC2630 * certificate set. Index starts from 0. Returns 0 on success. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -732,7 +732,7 @@ cleanup: * * This function will return a crl of the PKCS7 or RFC2630 crl set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. If the provided buffer is not long enough, * then @crl_size is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER is * returned. After the last crl has been read @@ -807,7 +807,7 @@ cleanup: * This function will return the number of certifcates in the PKCS7 * or RFC2630 crl set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -851,7 +851,7 @@ gnutls_pkcs7_get_crl_count (gnutls_pkcs7_t pkcs7) * * This function will add a crl to the PKCS7 or RFC2630 crl set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -935,7 +935,7 @@ cleanup: * This function will add a parsed CRL to the PKCS7 or RFC2630 crl * set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -975,7 +975,7 @@ gnutls_pkcs7_set_crl (gnutls_pkcs7_t pkcs7, gnutls_x509_crl_t crl) * This function will delete a crl from a PKCS7 or RFC2630 crl set. * Index starts from 0. Returns 0 on success. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/privkey.c b/lib/x509/privkey.c index 085d1b05cf..7982bdc82a 100644 --- a/lib/x509/privkey.c +++ b/lib/x509/privkey.c @@ -41,7 +41,7 @@ * * This function will initialize an private key structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -84,7 +84,7 @@ gnutls_x509_privkey_deinit (gnutls_x509_privkey_t key) * This function will copy a private key from source to destination * key. Destination has to be initialized. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -429,7 +429,7 @@ error: * If the key is PEM encoded it should have a header of "RSA PRIVATE * KEY", or "DSA PRIVATE KEY". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -578,7 +578,7 @@ failover: * native #gnutls_x509_privkey_t format. The output will be stored in * @key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -610,7 +610,7 @@ gnutls_x509_privkey_import_rsa_raw (gnutls_x509_privkey_t key, * native #gnutls_x509_privkey_t format. The output will be stored in * @key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -751,7 +751,7 @@ cleanup: * native #gnutls_x509_privkey_t format. The output will be stored * in @key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -844,7 +844,7 @@ cleanup: * native #gnutls_x509_privkey_t format. The output will be stored * in @key. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -911,7 +911,7 @@ cleanup: * key. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_x509_privkey_get_pk_algorithm (gnutls_x509_privkey_t key) @@ -944,7 +944,7 @@ gnutls_x509_privkey_get_pk_algorithm (gnutls_x509_privkey_t key) * If the structure is PEM encoded, it will have a header * of "BEGIN RSA PRIVATE KEY". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1018,7 +1018,7 @@ gnutls_x509_privkey_sec_param (gnutls_x509_privkey_t key) * in the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_x509_privkey_export_ecc_raw (gnutls_x509_privkey_t key, @@ -1082,7 +1082,7 @@ int gnutls_x509_privkey_export_ecc_raw (gnutls_x509_privkey_t key, * in the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1112,7 +1112,7 @@ gnutls_x509_privkey_export_rsa_raw (gnutls_x509_privkey_t key, * in the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1247,7 +1247,7 @@ error: * in the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1333,7 +1333,7 @@ gnutls_x509_privkey_export_dsa_raw (gnutls_x509_privkey_t key, * * Do not set the number of bits directly, use gnutls_sec_param_to_pk_bits(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1398,7 +1398,7 @@ cleanup: * be returned. The output will normally be a SHA-1 hash output, * which is 20 bytes. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1459,7 +1459,7 @@ cleanup: * @hash_algo: The hash algorithm used * @hash_data: holds the data to be signed * @signature: will contain newly allocated signature - * @flags: zero for now + * @flags: (0) for now * * This function will sign the given hashed data using a signature algorithm * supported by the private key. Signature algorithms are always used @@ -1472,7 +1472,7 @@ cleanup: * * The RSA algorithm is used in PKCS #1 v1.5 mode. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ static int @@ -1528,7 +1528,7 @@ cleanup: * requires the data to be hashed and stored in special formats * (e.g. BER Digest-Info for RSA). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated in: 2.12.0 @@ -1579,7 +1579,7 @@ gnutls_x509_privkey_sign_hash (gnutls_x509_privkey_t key, * Use gnutls_x509_crt_get_preferred_hash_algorithm() to determine * the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Deprecated: Use gnutls_privkey_sign_data(). @@ -1643,7 +1643,7 @@ gnutls_x509_privkey_sign_data (gnutls_x509_privkey_t key, * This function will recalculate the secondary parameters in a key. * In RSA keys, this can be the coefficient and exponent1,2. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/privkey_pkcs8.c b/lib/x509/privkey_pkcs8.c index e64aed9ca4..942087d161 100644 --- a/lib/x509/privkey_pkcs8.c +++ b/lib/x509/privkey_pkcs8.c @@ -595,7 +595,7 @@ error: * of "BEGIN ENCRYPTED PRIVATE KEY" or "BEGIN PRIVATE KEY" if * encryption is not used. * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -1175,7 +1175,7 @@ error: * specify the flags if the key is DER encoded, since in that case * the encryption status cannot be auto-detected. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/rfc2818_hostname.c b/lib/x509/rfc2818_hostname.c index a374dec6cf..c7d6d5110b 100644 --- a/lib/x509/rfc2818_hostname.c +++ b/lib/x509/rfc2818_hostname.c @@ -36,7 +36,7 @@ * described in RFC2818 (HTTPS), which takes into account wildcards, * and the DNSName/IPAddress subject alternative name PKIX extension. * - * Returns: non zero for a successful match, and zero on failure. + * Returns: non (0) for a successful match, and (0) on failure. **/ int gnutls_x509_crt_check_hostname (gnutls_x509_crt_t cert, const char *hostname) diff --git a/lib/x509/sign.c b/lib/x509/sign.c index 17654674c9..242dc064a6 100644 --- a/lib/x509/sign.c +++ b/lib/x509/sign.c @@ -86,7 +86,7 @@ _gnutls_x509_get_tbs (ASN1_TYPE cert, const char *tbs_name, * This function will sign a CRL or a certificate with the issuer's private key, and * will copy the issuer's information into the CRL or certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c index 2d4b43c231..ceb62a365d 100644 --- a/lib/x509/verify-high.c +++ b/lib/x509/verify-high.c @@ -63,11 +63,11 @@ struct gnutls_x509_trust_list_st { /** * gnutls_x509_trust_list_init: * @list: The structure to be initialized - * @size: The size of the internal hash table. Use zero for default size. + * @size: The size of the internal hash table. Use (0) for default size. * * This function will initialize an X.509 trust list structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -97,7 +97,7 @@ gnutls_x509_trust_list_init (gnutls_x509_trust_list_t * list, unsigned int size) /** * gnutls_x509_trust_list_deinit: * @list: The structure to be deinitialized - * @all: if non-zero it will deinitialize all the certificates and CRLs contained in the structure. + * @all: if non-(0) it will deinitialize all the certificates and CRLs contained in the structure. * * This function will deinitialize a trust list. **/ @@ -200,7 +200,7 @@ uint32_t hash; * The certificate must not be deinitialized during the lifetime * of the trusted list. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * **/ @@ -387,12 +387,12 @@ gnutls_datum_t dn; * @list: The structure of the list * @cert: is the certificate to find issuer for * @issuer: Will hold the issuer if any. Should be treated as constant. - * @flags: Use zero. + * @flags: Use (0). * * This function will attempt to find the issuer of the * given certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int gnutls_x509_trust_list_get_issuer(gnutls_x509_trust_list_t list, @@ -439,7 +439,7 @@ uint32_t hash; * This function will try to verify the given certificate and return * its status. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -535,7 +535,7 @@ uint32_t hash; * match is found the certificate is considered valid. In addition to that * this function will also check CRLs. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/verify.c b/lib/x509/verify.c index 6ed921cc6b..243b953a2a 100644 --- a/lib/x509/verify.c +++ b/lib/x509/verify.c @@ -213,8 +213,8 @@ cleanup: * This does a straight (DER) compare of the issuer/subject fields in * the given certificates. * - * Returns 1 if they match and zero if they don't match. Otherwise - * a negative value is returned to indicate error. + * Returns 1 if they match and (0) if they don't match. Otherwise + * a negative error code is returned to indicate error. */ static int is_issuer (gnutls_x509_crt_t cert, gnutls_x509_crt_t issuer_cert) @@ -248,8 +248,8 @@ cleanup: } /* Checks if the DN of two certificates is the same. - * Returns 1 if they match and zero if they don't match. Otherwise - * a negative value is returned to indicate error. + * Returns 1 if they match and (0) if they don't match. Otherwise + * a negative error code is returned to indicate error. */ int _gnutls_is_same_dn (gnutls_x509_crt_t cert1, gnutls_x509_crt_t cert2) @@ -529,7 +529,7 @@ cleanup: * given issuer. * * Returns: It will return true (1) if the given certificate is issued - * by the given issuer, and false (0) if not. A negative value is + * by the given issuer, and false (0) if not. A negative error code is * returned in case of an error. **/ int @@ -847,11 +847,7 @@ _gnutls_x509_verify_hashed_data (const gnutls_datum_t * hash, * elements bitwise or'd. For a more detailed verification status use * gnutls_x509_crt_verify() per list element. * - * GNUTLS_CERT_INVALID: the certificate chain is not valid. - * - * GNUTLS_CERT_REVOKED: a certificate in the chain has been revoked. - * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -904,7 +900,7 @@ int i, ret; * This function will try to verify the given certificate and return * its status. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -935,7 +931,7 @@ gnutls_x509_crt_verify (gnutls_x509_crt_t cert, * issuer certificate. It will return true (1) if the given CRL was * issued by the given issuer, and false (0) if not. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -957,7 +953,7 @@ gnutls_x509_crl_check_issuer (gnutls_x509_crl_t crl, * See gnutls_x509_crt_list_verify() for a detailed description of * return values. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 5af20af99f..2adb899914 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -40,7 +40,7 @@ * * This function will initialize an X.509 certificate structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -76,7 +76,7 @@ gnutls_x509_crt_init (gnutls_x509_crt_t * cert) * * This function will copy an X.509 certificate structure. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. -*/ int @@ -156,7 +156,7 @@ gnutls_x509_crt_deinit (gnutls_x509_crt_t cert) * If the Certificate is PEM encoded it should have a header of "X509 * CERTIFICATE", or "CERTIFICATE". * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -284,8 +284,8 @@ gnutls_x509_crt_get_issuer_dn (gnutls_x509_crt_t cert, char *buf, * gnutls_x509_crt_get_issuer_dn_by_oid: * @cert: should contain a #gnutls_x509_crt_t structure * @oid: holds an Object Identified in null terminated string - * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use zero to get the first one. - * @raw_flag: If non zero returns the raw DER data of the DN part. + * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one. + * @raw_flag: If non (0) returns the raw DER data of the DN part. * @buf: a pointer to a structure to hold the name (may be null) * @sizeof_buf: initially holds the size of @buf * @@ -295,7 +295,7 @@ gnutls_x509_crt_get_issuer_dn (gnutls_x509_crt_t cert, char *buf, * ASCII or UTF-8 encoded, depending on the certificate data. * * Some helper macros with popular OIDs can be found in gnutls/x509.h - * If raw flag is zero, this function will only return known OIDs as + * If raw flag is (0), this function will only return known OIDs as * text. Other OIDs will be DER encoded, as described in RFC2253 -- * in hex format with a '\#' prefix. You can check about known OIDs * using gnutls_x509_dn_oid_known(). @@ -326,7 +326,7 @@ gnutls_x509_crt_get_issuer_dn_by_oid (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_issuer_dn_oid: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: This specifies which OID to return. Use zero to get the first one. + * @indx: This specifies which OID to return. Use (0) to get the first one. * @oid: a pointer to a buffer to hold the OID (may be null) * @sizeof_oid: initially holds the size of @oid * @@ -390,8 +390,8 @@ gnutls_x509_crt_get_dn (gnutls_x509_crt_t cert, char *buf, * gnutls_x509_crt_get_dn_by_oid: * @cert: should contain a #gnutls_x509_crt_t structure * @oid: holds an Object Identified in null terminated string - * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use zero to get the first one. - * @raw_flag: If non zero returns the raw DER data of the DN part. + * @indx: In case multiple same OIDs exist in the RDN, this specifies which to send. Use (0) to get the first one. + * @raw_flag: If non (0) returns the raw DER data of the DN part. * @buf: a pointer where the DN part will be copied (may be null). * @sizeof_buf: initially holds the size of @buf * @@ -401,7 +401,7 @@ gnutls_x509_crt_get_dn (gnutls_x509_crt_t cert, char *buf, * that is ASCII or UTF-8 encoded, depending on the certificate data. * * Some helper macros with popular OIDs can be found in gnutls/x509.h - * If raw flag is zero, this function will only return known OIDs as + * If raw flag is (0), this function will only return known OIDs as * text. Other OIDs will be DER encoded, as described in RFC2253 -- * in hex format with a '\#' prefix. You can check about known OIDs * using gnutls_x509_dn_oid_known(). @@ -431,7 +431,7 @@ gnutls_x509_crt_get_dn_by_oid (gnutls_x509_crt_t cert, const char *oid, /** * gnutls_x509_crt_get_dn_oid: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: This specifies which OID to return. Use zero to get the first one. + * @indx: This specifies which OID to return. Use (0) to get the first one. * @oid: a pointer to a buffer to hold the OID (may be null) * @sizeof_oid: initially holds the size of @oid * @@ -467,7 +467,7 @@ gnutls_x509_crt_get_dn_oid (gnutls_x509_crt_t cert, * enumeration that is the signature algorithm that has been used to * sign this certificate. * - * Returns: a #gnutls_sign_algorithm_t value, or a negative value on + * Returns: a #gnutls_sign_algorithm_t value, or a negative error code on * error. **/ int @@ -484,8 +484,8 @@ gnutls_x509_crt_get_signature_algorithm (gnutls_x509_crt_t cert) * * This function will extract the signature field of a certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. and a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. and a negative error code on error. **/ int gnutls_x509_crt_get_signature (gnutls_x509_crt_t cert, @@ -538,7 +538,7 @@ gnutls_x509_crt_get_signature (gnutls_x509_crt_t cert, * * This function will return the version of the specified Certificate. * - * Returns: version of certificate, or a negative value on error. + * Returns: version of certificate, or a negative error code on error. **/ int gnutls_x509_crt_get_version (gnutls_x509_crt_t cert) @@ -622,7 +622,7 @@ gnutls_x509_crt_get_expiration_time (gnutls_x509_crt_t cert) * is not always a 32 or 64bit number. Some CAs use large serial * numbers, thus it may be wise to handle it as something opaque. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -656,13 +656,13 @@ gnutls_x509_crt_get_serial (gnutls_x509_crt_t cert, void *result, * @cert: should contain a #gnutls_x509_crt_t structure * @ret: The place where the identifier will be copied * @ret_size: Holds the size of the result field. - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function will return the X.509v3 certificate's subject key * identifier. This is obtained by the X.509 Subject Key identifier * extension field (2.5.29.14). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -743,14 +743,14 @@ gnutls_x509_crt_get_subject_key_id (gnutls_x509_crt_t cert, void *ret, * @cert: should contain a #gnutls_x509_crt_t structure * @ret: The place where the identifier will be copied * @ret_size: Holds the size of the result field. - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function will return the X.509v3 certificate authority's key * identifier. This is obtained by the X.509 Authority Key * identifier extension field (2.5.29.35). Note that this function * only returns the keyIdentifier field of the extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -841,7 +841,7 @@ gnutls_x509_crt_get_authority_key_id (gnutls_x509_crt_t cert, void *ret, * exponent. * * Returns: a member of the #gnutls_pk_algorithm_t enumeration on - * success, or a negative value on error. + * success, or a negative error code on error. **/ int gnutls_x509_crt_get_pk_algorithm (gnutls_x509_crt_t cert, unsigned int *bits) @@ -1160,7 +1160,7 @@ get_alt_name (gnutls_x509_crt_t cert, const char *extension_id, * @seq: specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.) * @ret: is the place where the alternative name will be copied to * @ret_size: holds the size of ret. - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function retrieves the Alternative Name (2.5.29.17), contained * in the given certificate in the X509v3 Certificate Extensions. @@ -1200,7 +1200,7 @@ gnutls_x509_crt_get_subject_alt_name (gnutls_x509_crt_t cert, * @seq: specifies the sequence number of the alt name (0 for the first one, 1 for the second etc.) * @ret: is the place where the alternative name will be copied to * @ret_size: holds the size of ret. - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function retrieves the Issuer Alternative Name (2.5.29.18), * contained in the given certificate in the X509v3 Certificate @@ -1244,7 +1244,7 @@ gnutls_x509_crt_get_issuer_alt_name (gnutls_x509_crt_t cert, * @ret: is the place where the alternative name will be copied to * @ret_size: holds the size of ret. * @ret_type: holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t). - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function will return the alternative names, contained in the * given certificate. It is the same as @@ -1279,7 +1279,7 @@ gnutls_x509_crt_get_subject_alt_name2 (gnutls_x509_crt_t cert, * @ret: is the place where the alternative name will be copied to * @ret_size: holds the size of ret. * @ret_type: holds the type of the alternative name (one of gnutls_x509_subject_alt_name_t). - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function will return the alternative names, contained in the * given certificate. It is the same as @@ -1383,11 +1383,11 @@ gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_basic_constraints: * @cert: should contain a #gnutls_x509_crt_t structure - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * @ca: pointer to output integer indicating CA status, may be NULL, * value is 1 if the certificate CA flag is set, 0 otherwise. * @pathlen: pointer to output integer indicating path length (may be - * NULL), non-negative values indicate a present pathLenConstraint + * NULL), non-negative error codes indicate a present pathLenConstraint * field and the actual value, -1 indicate that the field is absent. * * This function will read the certificate's basic constraints, and @@ -1395,8 +1395,8 @@ gnutls_x509_crt_get_issuer_alt_othername_oid (gnutls_x509_crt_t cert, * X.509 extension (2.5.29.19). * * Return value: If the certificate is a CA a positive value will be - * returned, or zero if the certificate does not have CA flag set. A - * negative value may be returned in case of errors. If the + * returned, or (0) if the certificate does not have CA flag set. A + * negative error code may be returned in case of errors. If the * certificate does not contain the basicConstraints extension * GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. **/ @@ -1449,17 +1449,17 @@ gnutls_x509_crt_get_basic_constraints (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_ca_status: * @cert: should contain a #gnutls_x509_crt_t structure - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * * This function will return certificates CA status, by reading the * basicConstraints X.509 extension (2.5.29.19). If the certificate is - * a CA a positive value will be returned, or zero if the certificate + * a CA a positive value will be returned, or (0) if the certificate * does not have CA flag set. * * Use gnutls_x509_crt_get_basic_constraints() if you want to read the * pathLenConstraint field too. * - * Returns: A negative value may be returned in case of parsing error. + * Returns: A negative error code may be returned in case of parsing error. * If the certificate does not contain the basicConstraints extension * %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. **/ @@ -1475,7 +1475,7 @@ gnutls_x509_crt_get_ca_status (gnutls_x509_crt_t cert, unsigned int *critical) * gnutls_x509_crt_get_key_usage: * @cert: should contain a #gnutls_x509_crt_t structure * @key_usage: where the key usage bits will be stored - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * * This function will return certificate's key usage, by reading the * keyUsage X.509 extension (2.5.29.15). The key usage value will ORed @@ -1485,7 +1485,7 @@ gnutls_x509_crt_get_ca_status (gnutls_x509_crt_t cert, unsigned int *critical) * %GNUTLS_KEY_KEY_CERT_SIGN, %GNUTLS_KEY_CRL_SIGN, * %GNUTLS_KEY_ENCIPHER_ONLY, %GNUTLS_KEY_DECIPHER_ONLY. * - * Returns: the certificate key usage, or a negative value in case of + * Returns: the certificate key usage, or a negative error code in case of * parsing error. If the certificate does not contain the keyUsage * extension %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be * returned. @@ -1536,9 +1536,9 @@ gnutls_x509_crt_get_key_usage (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_proxy: * @cert: should contain a #gnutls_x509_crt_t structure - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * @pathlen: pointer to output integer indicating path length (may be - * NULL), non-negative values indicate a present pCPathLenConstraint + * NULL), non-negative error codes indicate a present pCPathLenConstraint * field and the actual value, -1 indicate that the field is absent. * @policyLanguage: output variable with OID of policy language * @policy: output variable with policy data @@ -1547,8 +1547,8 @@ gnutls_x509_crt_get_key_usage (gnutls_x509_crt_t cert, * This function will get information from a proxy certificate. It * reads the ProxyCertInfo X.509 extension (1.3.6.1.5.5.7.1.14). * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_x509_crt_get_proxy (gnutls_x509_crt_t cert, @@ -1599,17 +1599,17 @@ gnutls_x509_crt_get_proxy (gnutls_x509_crt_t cert, * gnutls_x509_crt_get_extension_by_oid: * @cert: should contain a #gnutls_x509_crt_t structure * @oid: holds an Object Identified in null terminated string - * @indx: In case multiple same OIDs exist in the extensions, this specifies which to send. Use zero to get the first one. + * @indx: In case multiple same OIDs exist in the extensions, this specifies which to send. Use (0) to get the first one. * @buf: a pointer to a structure to hold the name (may be null) * @sizeof_buf: initially holds the size of @buf - * @critical: will be non zero if the extension is marked as critical + * @critical: will be non (0) if the extension is marked as critical * * This function will return the extension specified by the OID in the * certificate. The extensions will be returned as binary data DER * encoded, in the provided buffer. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. If the certificate does not + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. If the certificate does not * contain the specified extension * GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will be returned. **/ @@ -1663,15 +1663,15 @@ gnutls_x509_crt_get_extension_by_oid (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_extension_oid: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the OID (may be null) * @sizeof_oid: initially holds the size of @oid * * This function will return the requested extension OID in the certificate. * The extension OID will be stored as a string in the provided buffer. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. If you have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. If you have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. **/ @@ -1700,7 +1700,7 @@ gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx, /** * gnutls_x509_crt_get_extension_info: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @oid: a pointer to a structure to hold the OID * @sizeof_oid: initially holds the maximum size of @oid, on return * holds actual size of @oid. @@ -1715,8 +1715,8 @@ gnutls_x509_crt_get_extension_oid (gnutls_x509_crt_t cert, int indx, * *@sizeof_oid is updated and %GNUTLS_E_SHORT_MEMORY_BUFFER will be * returned. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. If you have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. If you have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. **/ @@ -1776,7 +1776,7 @@ gnutls_x509_crt_get_extension_info (gnutls_x509_crt_t cert, int indx, /** * gnutls_x509_crt_get_extension_data: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: Specifies which extension OID to send. Use zero to get the first one. + * @indx: Specifies which extension OID to send. Use (0) to get the first one. * @data: a pointer to a structure to hold the data (may be null) * @sizeof_data: initially holds the size of @oid * @@ -1789,8 +1789,8 @@ gnutls_x509_crt_get_extension_info (gnutls_x509_crt_t cert, int indx, * if you want to get data indexed by the extension OID rather than * sequence. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. If you have reached the + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. If you have reached the * last extension available %GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE * will be returned. **/ @@ -1892,8 +1892,8 @@ cleanup: * This function will return a pointer to the DER encoded DN structure * and the length. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value.or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value.or a negative error code on error. * **/ int @@ -1911,8 +1911,8 @@ gnutls_x509_crt_get_raw_issuer_dn (gnutls_x509_crt_t cert, * This function will return a pointer to the DER encoded DN structure and * the length. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a - * negative error value. or a negative value on error. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a + * negative error value. or a negative error code on error. * **/ int @@ -2143,7 +2143,7 @@ gnutls_x509_crt_get_fingerprint (gnutls_x509_crt_t cert, * If the structure is PEM encoded, it will have a header * of "BEGIN CERTIFICATE". * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -2255,7 +2255,7 @@ cleanup: * be returned. The output will normally be a SHA-1 hash output, * which is 20 bytes. * - * Return value: In case of failure a negative value will be + * Return value: In case of failure a negative error code will be * returned, and 0 on success. **/ int @@ -2447,7 +2447,7 @@ _gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert, * revoked. It is assumed that the CRLs have been verified before. * * Returns: 0 if the certificate is NOT revoked, and 1 if it is. A - * negative value is returned on error. + * negative error code is returned on error. **/ int gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert, @@ -2468,7 +2468,7 @@ gnutls_x509_crt_check_revocation (gnutls_x509_crt_t cert, * * Deprecated: Use gnutls_pubkey_get_verify_algorithm() instead. * - * Returns: the 0 if the hash algorithm is found. A negative value is + * Returns: the 0 if the hash algorithm is found. A negative error code is * returned on error. * * Since: 2.8.0 @@ -2512,7 +2512,7 @@ gnutls_x509_crt_get_verify_algorithm (gnutls_x509_crt_t crt, * gnutls_x509_crt_get_preferred_hash_algorithm: * @crt: Holds the certificate * @hash: The result of the call with the hash algorithm used for signature - * @mand: If non zero it means that the algorithm MUST use this hash. May be NULL. + * @mand: If non (0) it means that the algorithm MUST use this hash. May be NULL. * * This function will read the certifcate and return the appropriate digest * algorithm to use for signing with this certificate. Some certificates (i.e. @@ -2520,7 +2520,7 @@ gnutls_x509_crt_get_verify_algorithm (gnutls_x509_crt_t crt, * * Deprecated: Please use gnutls_pubkey_get_preferred_hash_algorithm(). * - * Returns: the 0 if the hash algorithm is found. A negative value is + * Returns: the 0 if the hash algorithm is found. A negative error code is * returned on error. * * Since: 2.11.0 @@ -2640,7 +2640,7 @@ gnutls_x509_crt_verify_hash (gnutls_x509_crt_t crt, unsigned int flags, * @ret: is the place where the distribution point will be copied to * @ret_size: holds the size of ret. * @reason_flags: Revocation reasons flags. - * @critical: will be non zero if the extension is marked as critical (may be null) + * @critical: will be non (0) if the extension is marked as critical (may be null) * * This function retrieves the CRL distribution points (2.5.29.31), * contained in the given certificate in the X509v3 Certificate @@ -2654,7 +2654,7 @@ gnutls_x509_crt_verify_hash (gnutls_x509_crt_t crt, unsigned int flags, * %GNUTLS_CRL_REASON_CESSATION_OF_OPERATION, * %GNUTLS_CRL_REASON_CERTIFICATE_HOLD, * %GNUTLS_CRL_REASON_PRIVILEGE_WITHDRAWN, - * %GNUTLS_CRL_REASON_AA_COMPROMISE, or zero for all possible reasons. + * %GNUTLS_CRL_REASON_AA_COMPROMISE, or (0) for all possible reasons. * * Returns: %GNUTLS_E_SHORT_MEMORY_BUFFER and updates @ret_size if * @ret_size is not enough to hold the distribution point, or the @@ -2768,7 +2768,7 @@ gnutls_x509_crt_get_crl_dist_points (gnutls_x509_crt_t cert, /** * gnutls_x509_crt_get_key_purpose_oid: * @cert: should contain a #gnutls_x509_crt_t structure - * @indx: This specifies which OID to return. Use zero to get the first one. + * @indx: This specifies which OID to return. Use (0) to get the first one. * @oid: a pointer to a buffer to hold the OID (may be null) * @sizeof_oid: initially holds the size of @oid * @critical: output flag to indicate criticality of extension @@ -2873,7 +2873,7 @@ gnutls_x509_crt_get_key_purpose_oid (gnutls_x509_crt_t cert, * the given structure. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_x509_crt_get_pk_rsa_raw (gnutls_x509_crt_t crt, @@ -2936,7 +2936,7 @@ cleanup: * the given certificate. The new parameters will be allocated using * gnutls_malloc() and will be stored in the appropriate datum. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_x509_crt_get_pk_dsa_raw (gnutls_x509_crt_t crt, @@ -3022,7 +3022,7 @@ cleanup: * @size: It will contain the size of the list. * @data: The PEM encoded certificate. * @format: One of DER or PEM. - * @flags: must be zero or an OR'd sequence of gnutls_certificate_import_flags. + * @flags: must be (0) or an OR'd sequence of gnutls_certificate_import_flags. * * This function will convert the given PEM encoded certificate list * to the native gnutls_x509_crt_t format. The output will be stored @@ -3080,7 +3080,7 @@ int ret; * @cert_max: Initially must hold the maximum number of certs. It will be updated with the number of certs available. * @data: The PEM encoded certificate. * @format: One of DER or PEM. - * @flags: must be zero or an OR'd sequence of gnutls_certificate_import_flags. + * @flags: must be (0) or an OR'd sequence of gnutls_certificate_import_flags. * * This function will convert the given PEM encoded certificate list * to the native gnutls_x509_crt_t format. The output will be stored @@ -3230,7 +3230,7 @@ error: * full subjectUniqueID, then a GNUTLS_E_SHORT_MEMORY_BUFFER error will be * returned, and sizeof_buf will be set to the actual length. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_x509_crt_get_subject_unique_id (gnutls_x509_crt_t crt, char *buf, @@ -3274,7 +3274,7 @@ gnutls_x509_crt_get_subject_unique_id (gnutls_x509_crt_t crt, char *buf, * full subjectUniqueID, then a GNUTLS_E_SHORT_MEMORY_BUFFER error will be * returned, and sizeof_buf will be set to the actual length. * - * Returns: %GNUTLS_E_SUCCESS on success, otherwise an error. + * Returns: %GNUTLS_E_SUCCESS on success, otherwise a negative error code. **/ int gnutls_x509_crt_get_issuer_unique_id (gnutls_x509_crt_t crt, char *buf, diff --git a/lib/x509/x509_write.c b/lib/x509/x509_write.c index d038b6edab..1ae10ed575 100644 --- a/lib/x509/x509_write.c +++ b/lib/x509/x509_write.c @@ -57,7 +57,7 @@ static void disable_optional_stuff (gnutls_x509_crt_t cert); * not known (by gnutls) you should properly DER encode your data, * and call this function with @raw_flag set. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -96,7 +96,7 @@ gnutls_x509_crt_set_dn_by_oid (gnutls_x509_crt_t crt, const char *oid, * operation will copy the signer's name as the issuer of the * certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -129,7 +129,7 @@ gnutls_x509_crt_set_issuer_dn_by_oid (gnutls_x509_crt_t crt, * certificate naming style. Note that if @name is %NULL, you MUST * set it later by using gnutls_x509_crt_set_dn_by_oid() or similar. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -176,7 +176,7 @@ gnutls_x509_crt_set_proxy_dn (gnutls_x509_crt_t crt, gnutls_x509_crt_t eecrt, * functions such as gnutls_x509_crt_set_subject_alt_name() * or gnutls_x509_crt_set_key_usage(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -213,7 +213,7 @@ gnutls_x509_crt_set_version (gnutls_x509_crt_t crt, unsigned int version) * private key to the certificate. Only RSA keys are currently * supported. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * **/ @@ -251,7 +251,7 @@ gnutls_x509_crt_set_key (gnutls_x509_crt_t crt, gnutls_x509_privkey_t key) * the extensions from the given certificate request to the certificate. * Only RSA keys are currently supported. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -297,7 +297,7 @@ gnutls_x509_crt_set_crq (gnutls_x509_crt_t crt, gnutls_x509_crq_t crq) * This function will set extensions from the given request to the * certificate. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.8.0 @@ -385,13 +385,13 @@ gnutls_x509_crt_set_crq_extensions (gnutls_x509_crt_t crt, * @oid: holds an Object Identified in null terminated string * @buf: a pointer to a DER encoded data * @sizeof_buf: holds the size of @buf - * @critical: should be non zero if the extension is to be marked as critical + * @critical: should be non (0) if the extension is to be marked as critical * * This function will set an the extension, by the specified OID, in * the certificate. The extension data should be binary data DER * encoded. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -429,13 +429,13 @@ gnutls_x509_crt_set_extension_by_oid (gnutls_x509_crt_t crt, * gnutls_x509_crt_set_basic_constraints: * @crt: a certificate of type #gnutls_x509_crt_t * @ca: true(1) or false(0). Depending on the Certificate authority status. - * @pathLenConstraint: non-negative values indicate maximum length of path, - * and negative values indicate that the pathLenConstraints field should + * @pathLenConstraint: non-negative error codes indicate maximum length of path, + * and negative error codes indicate that the pathLenConstraints field should * not be present. * * This function will set the basicConstraints certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -485,7 +485,7 @@ gnutls_x509_crt_set_basic_constraints (gnutls_x509_crt_t crt, * Use gnutls_x509_crt_set_basic_constraints() if you want to control * the pathLenConstraint field too. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -501,7 +501,7 @@ gnutls_x509_crt_set_ca_status (gnutls_x509_crt_t crt, unsigned int ca) * * This function will set the keyUsage certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -544,7 +544,7 @@ gnutls_x509_crt_set_key_usage (gnutls_x509_crt_t crt, unsigned int usage) * gnutls_x509_crt_set_subject_alternative_name: * @crt: a certificate of type #gnutls_x509_crt_t * @type: is one of the gnutls_x509_subject_alt_name_t enumerations - * @data_string: The data to be set, a zero terminated string + * @data_string: The data to be set, a (0) terminated string * * This function will set the subject alternative name certificate * extension. This function assumes that data can be expressed as a null @@ -553,7 +553,7 @@ gnutls_x509_crt_set_key_usage (gnutls_x509_crt_t crt, unsigned int usage) * The name of the function is unfortunate since it is incosistent with * gnutls_x509_crt_get_subject_alt_name(). * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -601,7 +601,7 @@ gnutls_x509_crt_set_subject_alternative_name (gnutls_x509_crt_t crt, * * Other values can be set as binary values with the proper DER encoding. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.6.0 @@ -675,8 +675,8 @@ finish: /** * gnutls_x509_crt_set_proxy: * @crt: a certificate of type #gnutls_x509_crt_t - * @pathLenConstraint: non-negative values indicate maximum length of path, - * and negative values indicate that the pathLenConstraints field should + * @pathLenConstraint: non-negative error codes indicate maximum length of path, + * and negative error codes indicate that the pathLenConstraints field should * not be present. * @policyLanguage: OID describing the language of @policy. * @policy: opaque byte array with policy language, can be %NULL @@ -684,7 +684,7 @@ finish: * * This function will set the proxyCertInfo extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -744,7 +744,7 @@ gnutls_x509_crt_set_proxy (gnutls_x509_crt_t crt, * This must be the last step in a certificate generation since all * the previously set parameters are now signed. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -799,7 +799,7 @@ fail: * This function is the same a gnutls_x509_crt_sign2() with no flags, * and SHA1 as the hash algorithm. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -817,7 +817,7 @@ gnutls_x509_crt_sign (gnutls_x509_crt_t crt, gnutls_x509_crt_t issuer, * This function will set the time this Certificate was or will be * activated. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -841,7 +841,7 @@ gnutls_x509_crt_set_activation_time (gnutls_x509_crt_t cert, time_t act_time) * * This function will set the time this Certificate will expire. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -867,7 +867,7 @@ gnutls_x509_crt_set_expiration_time (gnutls_x509_crt_t cert, time_t exp_time) * serial numbers, thus it may be wise to handle it as something * opaque. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -924,7 +924,7 @@ disable_optional_stuff (gnutls_x509_crt_t cert) * * This function will set the CRL distribution points certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -948,7 +948,7 @@ gnutls_x509_crt_set_crl_dist_points (gnutls_x509_crt_t crt, * * This function will set the CRL distribution points certificate extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. * * Since: 2.6.0 @@ -1020,7 +1020,7 @@ gnutls_x509_crt_set_crl_dist_points2 (gnutls_x509_crt_t crt, * extension, from the source to the destination certificate. * This may be useful to copy from a CA certificate to issued ones. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1072,7 +1072,7 @@ gnutls_x509_crt_cpy_crl_dist_points (gnutls_x509_crt_t dst, * This function will set the X.509 certificate's subject key ID * extension. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1135,7 +1135,7 @@ gnutls_x509_crt_set_subject_key_id (gnutls_x509_crt_t cert, * This function will set the X.509 certificate's authority key ID extension. * Only the keyIdentifier field can be set with this function. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int @@ -1201,8 +1201,8 @@ gnutls_x509_crt_set_authority_key_id (gnutls_x509_crt_t cert, * * Subsequent calls to this function will append OIDs to the OID list. * - * Returns: On success, %GNUTLS_E_SUCCESS (zero) is returned, - * otherwise an error code is returned. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, + * otherwise a negative error code is returned. **/ int gnutls_x509_crt_set_key_purpose_oid (gnutls_x509_crt_t cert, @@ -1309,7 +1309,7 @@ gnutls_x509_crt_set_key_purpose_oid (gnutls_x509_crt_t cert, * This must be the last step in a certificate generation since all * the previously set parameters are now signed. * - * Returns: On success, %GNUTLS_E_SUCCESS is returned, otherwise a + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise a * negative error value. **/ int |