diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 14:13:23 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2011-04-10 14:13:23 +0200 |
commit | 2725c5c9885daa057c11393ad6522048e9d1cc43 (patch) | |
tree | 75f7c70e12429f6bb6e587f543b56df1d384c619 /lib | |
parent | 7c34680c910089bf6d102664d767940d0ceeca64 (diff) | |
download | gnutls-2725c5c9885daa057c11393ad6522048e9d1cc43.tar.gz |
Corrected documentation of several API functions.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gnutls_algorithms.c | 2 | ||||
-rw-r--r-- | lib/gnutls_dtls.c | 24 | ||||
-rw-r--r-- | lib/gnutls_mem.c | 3 | ||||
-rw-r--r-- | lib/gnutls_psk.c | 2 | ||||
-rw-r--r-- | lib/gnutls_record.c | 4 | ||||
-rw-r--r-- | lib/includes/gnutls/gnutls.h.in | 2 | ||||
-rw-r--r-- | lib/pkcs11.c | 2 | ||||
-rw-r--r-- | lib/pkcs11_privkey.c | 1 | ||||
-rw-r--r-- | lib/x509/verify-high.c | 3 | ||||
-rw-r--r-- | lib/x509/verify.c | 4 |
10 files changed, 25 insertions, 22 deletions
diff --git a/lib/gnutls_algorithms.c b/lib/gnutls_algorithms.c index 8f3b687aa4..972eee5bde 100644 --- a/lib/gnutls_algorithms.c +++ b/lib/gnutls_algorithms.c @@ -1572,7 +1572,7 @@ gnutls_cipher_suite_get_name (gnutls_kx_algorithm_t kx_algorithm, * @kx: output variable indicating key exchange algorithm, or %NULL. * @cipher: output variable indicating cipher, or %NULL. * @mac: output variable indicating MAC algorithm, or %NULL. - * @version: output variable indicating TLS protocol version, or %NULL. + * @min_version: output variable indicating TLS protocol version, or %NULL. * * Get information about supported cipher suites. Use the function * iteratively to get information about all supported cipher suites. diff --git a/lib/gnutls_dtls.c b/lib/gnutls_dtls.c index 0f3748471d..a77b65f63f 100644 --- a/lib/gnutls_dtls.c +++ b/lib/gnutls_dtls.c @@ -498,7 +498,7 @@ unsigned int gnutls_dtls_get_mtu (gnutls_session_t session) * @key: is a random key to be used at cookie generation * @client_data: contains data identifying the client (i.e. address) * @client_data_size: The size of client's data - * @cookie: The previous cookie returned by gnutls_dtls_cookie_verify() + * @prestate: The previous cookie returned by gnutls_dtls_cookie_verify() * @ptr: A transport pointer to be used by @push_func * @push_func: A function that will be used to reply * @@ -601,9 +601,9 @@ uint8_t digest[C_HASH_SIZE]; * @key: is a random key to be used at cookie generation * @client_data: contains data identifying the client (i.e. address) * @client_data_size: The size of client's data - * @msg: An incoming message that initiates a connection. + * @_msg: An incoming message that initiates a connection. * @msg_size: The size of the message. - * @cookie: The cookie of this client. + * @prestate: The cookie of this client. * * This function will verify an incoming message for * a valid cookie. If a valid cookie is returned then @@ -615,7 +615,7 @@ uint8_t digest[C_HASH_SIZE]; **/ int gnutls_dtls_cookie_verify(gnutls_datum_t* key, void* client_data, size_t client_data_size, - void* _msg, size_t msg_size, gnutls_dtls_prestate_st* out) + void* _msg, size_t msg_size, gnutls_dtls_prestate_st* prestate) { gnutls_datum_t cookie; int sid_size; @@ -663,9 +663,9 @@ uint8_t digest[C_HASH_SIZE]; if (memcmp(digest, cookie.data, COOKIE_MAC_SIZE) != 0) return gnutls_assert_val(GNUTLS_E_BAD_COOKIE); - out->record_seq = msg[10]; /* client's record seq */ - out->hsk_read_seq = msg[DTLS_RECORD_HEADER_SIZE+5]; /* client's hsk seq */ - out->hsk_write_seq = 0;/* we always send zero for this msg */ + prestate->record_seq = msg[10]; /* client's record seq */ + prestate->hsk_read_seq = msg[DTLS_RECORD_HEADER_SIZE+5]; /* client's hsk seq */ + prestate->hsk_write_seq = 0;/* we always send zero for this msg */ return 0; } @@ -682,12 +682,12 @@ uint8_t digest[C_HASH_SIZE]; * Returns: zero on success, or a negative error code. * **/ -void gnutls_dtls_prestate_set(gnutls_session_t session, gnutls_dtls_prestate_st* st) +void gnutls_dtls_prestate_set(gnutls_session_t session, gnutls_dtls_prestate_st* prestate) { record_parameters_st *params; int ret; - if (st == NULL) + if (prestate == NULL) return; /* we do not care about read_params, since we accept anything @@ -697,8 +697,8 @@ void gnutls_dtls_prestate_set(gnutls_session_t session, gnutls_dtls_prestate_st* if (ret < 0) return; - params->write.sequence_number.i[7] = st->record_seq; + params->write.sequence_number.i[7] = prestate->record_seq; - session->internals.dtls.hsk_read_seq = st->hsk_read_seq; - session->internals.dtls.hsk_write_seq = st->hsk_write_seq + 1; + session->internals.dtls.hsk_read_seq = prestate->hsk_read_seq; + session->internals.dtls.hsk_write_seq = prestate->hsk_write_seq + 1; } diff --git a/lib/gnutls_mem.c b/lib/gnutls_mem.c index bc96662c78..0226fe21cd 100644 --- a/lib/gnutls_mem.c +++ b/lib/gnutls_mem.c @@ -106,6 +106,7 @@ _gnutls_strdup (const char *str) /** * gnutls_malloc: + * @s: size to allocate in bytes * * This function will allocate 's' bytes data, and * return a pointer to memory. This function is supposed @@ -121,7 +122,7 @@ gnutls_malloc (size_t s) /** * gnutls_free: - * @d: pointer to memory + * @ptr: pointer to memory * * This function will free data pointed by ptr. * diff --git a/lib/gnutls_psk.c b/lib/gnutls_psk.c index 20b9a06f33..c164178c24 100644 --- a/lib/gnutls_psk.c +++ b/lib/gnutls_psk.c @@ -78,7 +78,7 @@ gnutls_psk_allocate_client_credentials (gnutls_psk_client_credentials_t * sc) * @res: is a #gnutls_psk_client_credentials_t structure. * @username: is the user's zero-terminated userid * @key: is the user's key - * @format: indicate the format of the key, either + * @flags: indicate the format of the key, either * %GNUTLS_PSK_KEY_RAW or %GNUTLS_PSK_KEY_HEX. * * This function sets the username and password, in a diff --git a/lib/gnutls_record.c b/lib/gnutls_record.c index 8ec637aeb8..ceee3f0cb9 100644 --- a/lib/gnutls_record.c +++ b/lib/gnutls_record.c @@ -1260,7 +1260,7 @@ gnutls_record_recv (gnutls_session_t session, void *data, size_t data_size) * @session: is a #gnutls_session_t structure. * @data: the buffer that the data will be read into * @data_size: the number of requested bytes - * @seq: is the packet's 64-bit sequence number. + * @seq: is the packet's 64-bit sequence number. Should have space for 8 bytes. * * This function is the same as gnutls_record_recv(), except that * it returns in addition to data, the sequence number of the data. @@ -1277,7 +1277,7 @@ gnutls_record_recv (gnutls_session_t session, void *data, size_t data_size) **/ ssize_t gnutls_record_recv_seq (gnutls_session_t session, void *data, size_t data_size, - unsigned char seq[8]) + unsigned char *seq) { return _gnutls_recv_int (session, GNUTLS_APPLICATION_DATA, -1, data, data_size, seq); diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in index 821002135b..75521da663 100644 --- a/lib/includes/gnutls/gnutls.h.in +++ b/lib/includes/gnutls/gnutls.h.in @@ -782,7 +782,7 @@ extern "C" #define gnutls_read gnutls_record_recv #define gnutls_write gnutls_record_send ssize_t gnutls_record_recv_seq (gnutls_session_t session, void *data, size_t data_size, - unsigned char seq[8]); + unsigned char *seq); void gnutls_session_enable_compatibility_mode (gnutls_session_t session); diff --git a/lib/pkcs11.c b/lib/pkcs11.c index 81c043b1e0..c261553e76 100644 --- a/lib/pkcs11.c +++ b/lib/pkcs11.c @@ -2011,7 +2011,7 @@ gnutls_pkcs11_obj_export_url (gnutls_pkcs11_obj_t obj, /** * gnutls_pkcs11_obj_get_type: - * @certificate: Holds the PKCS 11 certificate + * @obj: Holds the PKCS 11 object * * This function will return the type of the certificate being * stored in the structure. diff --git a/lib/pkcs11_privkey.c b/lib/pkcs11_privkey.c index 7842f06c07..cf02a24778 100644 --- a/lib/pkcs11_privkey.c +++ b/lib/pkcs11_privkey.c @@ -75,6 +75,7 @@ gnutls_pkcs11_privkey_deinit (gnutls_pkcs11_privkey_t key) /** * gnutls_pkcs11_privkey_get_pk_algorithm: * @key: should contain a #gnutls_pkcs11_privkey_t structure + * @bits: if bits is non null it will hold the size of the parameters' in bits * * This function will return the public key algorithm of a private * key. diff --git a/lib/x509/verify-high.c b/lib/x509/verify-high.c index 479f3c2784..7aaedcb698 100644 --- a/lib/x509/verify-high.c +++ b/lib/x509/verify-high.c @@ -319,7 +319,8 @@ gnutls_datum_t dn; /** * gnutls_x509_trust_list_verify_crt: * @list: The structure of the list - * @cert: is the certificate to be verified + * @cert_list: is the certificate list to be verified + * @cert_list_size: is the certificate list size * @flags: Flags that may be used to change the verification algorithm. Use OR of the gnutls_certificate_verify_flags enumerations. * @verify: will hold the certificate verification output. * @func: If non-null will be called on each chain element verification with the output. diff --git a/lib/x509/verify.c b/lib/x509/verify.c index f05c191895..5b6831a3d4 100644 --- a/lib/x509/verify.c +++ b/lib/x509/verify.c @@ -1194,10 +1194,10 @@ gnutls_x509_crt_verify (gnutls_x509_crt_t cert, * negative error value. **/ int -gnutls_x509_crl_check_issuer (gnutls_x509_crl_t cert, +gnutls_x509_crl_check_issuer (gnutls_x509_crl_t crl, gnutls_x509_crt_t issuer) { - return is_crl_issuer (cert, issuer); + return is_crl_issuer (crl, issuer); } /** |