| crypto.h (3.4.10) | | crypto.h (current) | |
| | | | |
| skipping to change at line 59 | | skipping to change at line 59 | |
| | | | |
| void gnutls_cipher_set_iv(gnutls_cipher_hd_t handle, void *iv, | | void gnutls_cipher_set_iv(gnutls_cipher_hd_t handle, void *iv, | |
| size_t ivlen); | | size_t ivlen); | |
| | | | |
| int gnutls_cipher_tag(gnutls_cipher_hd_t handle, void *tag, | | int gnutls_cipher_tag(gnutls_cipher_hd_t handle, void *tag, | |
| size_t tag_size); | | size_t tag_size); | |
| int gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, | | int gnutls_cipher_add_auth(gnutls_cipher_hd_t handle, | |
| const void *text, size_t text_size); | | const void *text, size_t text_size); | |
| | | | |
| void gnutls_cipher_deinit(gnutls_cipher_hd_t handle); | | void gnutls_cipher_deinit(gnutls_cipher_hd_t handle); | |
|
| int gnutls_cipher_get_block_size(gnutls_cipher_algorithm_t algorithm); | | int gnutls_cipher_get_block_size(gnutls_cipher_algorithm_t algorithm) __GNU | |
| int gnutls_cipher_get_iv_size(gnutls_cipher_algorithm_t algorithm); | | TLS_CONST__; | |
| int gnutls_cipher_get_tag_size(gnutls_cipher_algorithm_t algorithm); | | int gnutls_cipher_get_iv_size(gnutls_cipher_algorithm_t algorithm) __GNUTLS | |
| | | _CONST__; | |
| | | int gnutls_cipher_get_tag_size(gnutls_cipher_algorithm_t algorithm) __GNUTL | |
| | | S_CONST__; | |
| | | | |
| /* AEAD API | | /* AEAD API | |
| */ | | */ | |
| typedef struct api_aead_cipher_hd_st *gnutls_aead_cipher_hd_t; | | typedef struct api_aead_cipher_hd_st *gnutls_aead_cipher_hd_t; | |
| | | | |
| int gnutls_aead_cipher_init(gnutls_aead_cipher_hd_t * handle, | | int gnutls_aead_cipher_init(gnutls_aead_cipher_hd_t * handle, | |
| gnutls_cipher_algorithm_t cipher, | | gnutls_cipher_algorithm_t cipher, | |
| const gnutls_datum_t * key); | | const gnutls_datum_t * key); | |
| int | | int | |
| gnutls_aead_cipher_decrypt(gnutls_aead_cipher_hd_t handle, | | gnutls_aead_cipher_decrypt(gnutls_aead_cipher_hd_t handle, | |
| | | | |
| skipping to change at line 92 | | skipping to change at line 92 | |
| const void *ptext, size_t ptext_len, | | const void *ptext, size_t ptext_len, | |
| void *ctext, size_t *ctext_len); | | void *ctext, size_t *ctext_len); | |
| | | | |
| void gnutls_aead_cipher_deinit(gnutls_aead_cipher_hd_t handle); | | void gnutls_aead_cipher_deinit(gnutls_aead_cipher_hd_t handle); | |
| | | | |
| /* Hash - MAC API */ | | /* Hash - MAC API */ | |
| | | | |
| typedef struct hash_hd_st *gnutls_hash_hd_t; | | typedef struct hash_hd_st *gnutls_hash_hd_t; | |
| typedef struct hmac_hd_st *gnutls_hmac_hd_t; | | typedef struct hmac_hd_st *gnutls_hmac_hd_t; | |
| | | | |
|
| size_t gnutls_mac_get_nonce_size(gnutls_mac_algorithm_t algorithm); | | size_t gnutls_mac_get_nonce_size(gnutls_mac_algorithm_t algorithm) __GNUTLS
_CONST__; | |
| int gnutls_hmac_init(gnutls_hmac_hd_t * dig, | | int gnutls_hmac_init(gnutls_hmac_hd_t * dig, | |
| gnutls_mac_algorithm_t algorithm, | | gnutls_mac_algorithm_t algorithm, | |
| const void *key, size_t keylen); | | const void *key, size_t keylen); | |
| void gnutls_hmac_set_nonce(gnutls_hmac_hd_t handle, | | void gnutls_hmac_set_nonce(gnutls_hmac_hd_t handle, | |
| const void *nonce, size_t nonce_len); | | const void *nonce, size_t nonce_len); | |
| int gnutls_hmac(gnutls_hmac_hd_t handle, const void *text, size_t textlen); | | int gnutls_hmac(gnutls_hmac_hd_t handle, const void *text, size_t textlen); | |
| void gnutls_hmac_output(gnutls_hmac_hd_t handle, void *digest); | | void gnutls_hmac_output(gnutls_hmac_hd_t handle, void *digest); | |
| void gnutls_hmac_deinit(gnutls_hmac_hd_t handle, void *digest); | | void gnutls_hmac_deinit(gnutls_hmac_hd_t handle, void *digest); | |
|
| int gnutls_hmac_get_len(gnutls_mac_algorithm_t algorithm); | | int gnutls_hmac_get_len(gnutls_mac_algorithm_t algorithm) __GNUTLS_CONST__; | |
| int gnutls_hmac_fast(gnutls_mac_algorithm_t algorithm, | | int gnutls_hmac_fast(gnutls_mac_algorithm_t algorithm, | |
| const void *key, size_t keylen, | | const void *key, size_t keylen, | |
| const void *text, size_t textlen, void *digest); | | const void *text, size_t textlen, void *digest); | |
| | | | |
| int gnutls_hash_init(gnutls_hash_hd_t * dig, | | int gnutls_hash_init(gnutls_hash_hd_t * dig, | |
| gnutls_digest_algorithm_t algorithm); | | gnutls_digest_algorithm_t algorithm); | |
| int gnutls_hash(gnutls_hash_hd_t handle, const void *text, size_t textlen); | | int gnutls_hash(gnutls_hash_hd_t handle, const void *text, size_t textlen); | |
| void gnutls_hash_output(gnutls_hash_hd_t handle, void *digest); | | void gnutls_hash_output(gnutls_hash_hd_t handle, void *digest); | |
| void gnutls_hash_deinit(gnutls_hash_hd_t handle, void *digest); | | void gnutls_hash_deinit(gnutls_hash_hd_t handle, void *digest); | |
|
| int gnutls_hash_get_len(gnutls_digest_algorithm_t algorithm); | | int gnutls_hash_get_len(gnutls_digest_algorithm_t algorithm) __GNUTLS_CONST
__; | |
| int gnutls_hash_fast(gnutls_digest_algorithm_t algorithm, | | int gnutls_hash_fast(gnutls_digest_algorithm_t algorithm, | |
| const void *text, size_t textlen, void *digest); | | const void *text, size_t textlen, void *digest); | |
| | | | |
| /* register ciphers */ | | /* register ciphers */ | |
| | | | |
| /** | | /** | |
| * gnutls_rnd_level_t: | | * gnutls_rnd_level_t: | |
| * @GNUTLS_RND_NONCE: Non-predictable random number. Fatal in parts | | * @GNUTLS_RND_NONCE: Non-predictable random number. Fatal in parts | |
| * of session if broken, i.e., vulnerable to statistical analysis. | | * of session if broken, i.e., vulnerable to statistical analysis. | |
| * @GNUTLS_RND_RANDOM: Pseudo-random cryptographic random number. | | * @GNUTLS_RND_RANDOM: Pseudo-random cryptographic random number. | |
| | | | |
| skipping to change at line 223 | | skipping to change at line 223 | |
| | | | |
| int | | int | |
| gnutls_crypto_register_digest(gnutls_digest_algorithm_t digest, | | gnutls_crypto_register_digest(gnutls_digest_algorithm_t digest, | |
| int priority, | | int priority, | |
| gnutls_digest_init_func init, | | gnutls_digest_init_func init, | |
| gnutls_digest_hash_func hash, | | gnutls_digest_hash_func hash, | |
| gnutls_digest_output_func output, | | gnutls_digest_output_func output, | |
| gnutls_digest_deinit_func deinit, | | gnutls_digest_deinit_func deinit, | |
| gnutls_digest_fast_func hash_fast); | | gnutls_digest_fast_func hash_fast); | |
| | | | |
|
| | | /* RSA-PKCS#1 1.5 helper functions */ | |
| | | int | |
| | | gnutls_encode_ber_digest_info(gnutls_digest_algorithm_t hash, | |
| | | const gnutls_datum_t * digest, | |
| | | gnutls_datum_t * output); | |
| | | | |
| | | int | |
| | | gnutls_decode_ber_digest_info(const gnutls_datum_t * info, | |
| | | gnutls_digest_algorithm_t *hash, | |
| | | unsigned char *digest, unsigned int *digest_si | |
| | | ze); | |
| | | | |
| /* *INDENT-OFF* */ | | /* *INDENT-OFF* */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| } | | } | |
| #endif | | #endif | |
| /* *INDENT-ON* */ | | /* *INDENT-ON* */ | |
| #endif | | #endif | |
| | | | |
End of changes. 5 change blocks. |
| 6 lines changed or deleted | | 21 lines changed or added | |
|
| gnutls.h (3.4.10) | | gnutls.h (current) | |
| | | | |
| skipping to change at line 56 | | skipping to change at line 56 | |
| #endif | | #endif | |
| /* Get time_t. */ | | /* Get time_t. */ | |
| #include <time.h> | | #include <time.h> | |
| | | | |
| /* *INDENT-OFF* */ | | /* *INDENT-OFF* */ | |
| #ifdef __cplusplus | | #ifdef __cplusplus | |
| extern "C" { | | extern "C" { | |
| #endif | | #endif | |
| /* *INDENT-ON* */ | | /* *INDENT-ON* */ | |
| | | | |
|
| #define GNUTLS_VERSION "3.4.10" | | #define GNUTLS_VERSION "3.5.0" | |
| | | | |
| #define GNUTLS_VERSION_MAJOR 3 | | #define GNUTLS_VERSION_MAJOR 3 | |
|
| #define GNUTLS_VERSION_MINOR 4 | | #define GNUTLS_VERSION_MINOR 5 | |
| #define GNUTLS_VERSION_PATCH 10 | | #define GNUTLS_VERSION_PATCH 0 | |
| | | | |
|
| #define GNUTLS_VERSION_NUMBER 0x03040a | | #define GNUTLS_VERSION_NUMBER 0x030500 | |
| | | | |
| #define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC | | #define GNUTLS_CIPHER_RIJNDAEL_128_CBC GNUTLS_CIPHER_AES_128_CBC | |
| #define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC | | #define GNUTLS_CIPHER_RIJNDAEL_256_CBC GNUTLS_CIPHER_AES_256_CBC | |
| #define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC | | #define GNUTLS_CIPHER_RIJNDAEL_CBC GNUTLS_CIPHER_AES_128_CBC | |
| #define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128 | | #define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128 | |
| | | | |
| #if !defined(GNUTLS_INTERNAL_BUILD) && defined(_WIN32) | | #if !defined(GNUTLS_INTERNAL_BUILD) && defined(_WIN32) | |
| # define _SYM_EXPORT __declspec(dllimport) | | # define _SYM_EXPORT __declspec(dllimport) | |
| #else | | #else | |
| # define _SYM_EXPORT | | # define _SYM_EXPORT | |
| #endif | | #endif | |
| | | | |
|
| | | #ifdef __GNUC__ | |
| | | # define __GNUTLS_CONST__ __attribute__((const)) | |
| | | # define __GNUTLS_PURE__ __attribute__((pure)) | |
| | | #else | |
| | | # define __GNUTLS_CONST__ | |
| | | # define __GNUTLS_PURE__ | |
| | | #endif | |
| | | | |
| /* Use the following definition globally in your program to disable | | /* Use the following definition globally in your program to disable | |
| * implicit initialization of gnutls. */ | | * implicit initialization of gnutls. */ | |
| #define GNUTLS_SKIP_GLOBAL_INIT int _gnutls_global_init_skip(void); \ | | #define GNUTLS_SKIP_GLOBAL_INIT int _gnutls_global_init_skip(void); \ | |
| int _gnutls_global_init_skip(void) {return 1;} | | int _gnutls_global_init_skip(void) {return 1;} | |
| | | | |
| /** | | /** | |
| * gnutls_cipher_algorithm_t: | | * gnutls_cipher_algorithm_t: | |
|
| * @GNUTLS_CIPHER_UNKNOWN: Value to identify an unknown/unsupported algorit | | * @GNUTLS_CIPHER_UNKNOWN: Unknown algorithm. | |
| hm. | | * @GNUTLS_CIPHER_NULL: NULL algorithm. | |
| * @GNUTLS_CIPHER_NULL: The NULL (identity) encryption algorithm. | | | |
| * @GNUTLS_CIPHER_ARCFOUR_128: ARCFOUR stream cipher with 128-bit keys. | | * @GNUTLS_CIPHER_ARCFOUR_128: ARCFOUR stream cipher with 128-bit keys. | |
| * @GNUTLS_CIPHER_3DES_CBC: 3DES in CBC mode. | | * @GNUTLS_CIPHER_3DES_CBC: 3DES in CBC mode. | |
| * @GNUTLS_CIPHER_AES_128_CBC: AES in CBC mode with 128-bit keys. | | * @GNUTLS_CIPHER_AES_128_CBC: AES in CBC mode with 128-bit keys. | |
| * @GNUTLS_CIPHER_AES_192_CBC: AES in CBC mode with 192-bit keys. | | * @GNUTLS_CIPHER_AES_192_CBC: AES in CBC mode with 192-bit keys. | |
| * @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys. | | * @GNUTLS_CIPHER_AES_256_CBC: AES in CBC mode with 256-bit keys. | |
| * @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys. | | * @GNUTLS_CIPHER_ARCFOUR_40: ARCFOUR stream cipher with 40-bit keys. | |
| * @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys. | | * @GNUTLS_CIPHER_CAMELLIA_128_CBC: Camellia in CBC mode with 128-bit keys. | |
| * @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys. | | * @GNUTLS_CIPHER_CAMELLIA_192_CBC: Camellia in CBC mode with 192-bit keys. | |
| * @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys. | | * @GNUTLS_CIPHER_CAMELLIA_256_CBC: Camellia in CBC mode with 256-bit keys. | |
| * @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys. | | * @GNUTLS_CIPHER_RC2_40_CBC: RC2 in CBC mode with 40-bit keys. | |
| | | | |
| skipping to change at line 106 | | skipping to change at line 114 | |
| * @GNUTLS_CIPHER_AES_256_GCM: AES in GCM mode with 256-bit keys. | | * @GNUTLS_CIPHER_AES_256_GCM: AES in GCM mode with 256-bit keys. | |
| * @GNUTLS_CIPHER_AES_128_CCM: AES in CCM mode with 128-bit keys. | | * @GNUTLS_CIPHER_AES_128_CCM: AES in CCM mode with 128-bit keys. | |
| * @GNUTLS_CIPHER_AES_256_CCM: AES in CCM mode with 256-bit keys. | | * @GNUTLS_CIPHER_AES_256_CCM: AES in CCM mode with 256-bit keys. | |
| * @GNUTLS_CIPHER_AES_128_CCM_8: AES in CCM mode with 64-bit tag and 128-bi
t keys. | | * @GNUTLS_CIPHER_AES_128_CCM_8: AES in CCM mode with 64-bit tag and 128-bi
t keys. | |
| * @GNUTLS_CIPHER_AES_256_CCM_8: AES in CCM mode with 64-bit tag and 256-bi
t keys. | | * @GNUTLS_CIPHER_AES_256_CCM_8: AES in CCM mode with 64-bit tag and 256-bi
t keys. | |
| * @GNUTLS_CIPHER_CAMELLIA_128_GCM: CAMELLIA in GCM mode with 128-bit keys. | | * @GNUTLS_CIPHER_CAMELLIA_128_GCM: CAMELLIA in GCM mode with 128-bit keys. | |
| * @GNUTLS_CIPHER_CAMELLIA_256_GCM: CAMELLIA in GCM mode with 256-bit keys. | | * @GNUTLS_CIPHER_CAMELLIA_256_GCM: CAMELLIA in GCM mode with 256-bit keys. | |
| * @GNUTLS_CIPHER_SALSA20_256: Salsa20 with 256-bit keys. | | * @GNUTLS_CIPHER_SALSA20_256: Salsa20 with 256-bit keys. | |
| * @GNUTLS_CIPHER_ESTREAM_SALSA20_256: Estream's Salsa20 variant with 256-b
it keys. | | * @GNUTLS_CIPHER_ESTREAM_SALSA20_256: Estream's Salsa20 variant with 256-b
it keys. | |
| * @GNUTLS_CIPHER_CHACHA20_POLY1305: The Chacha20 cipher with the Poly1305
authenticator (AEAD). | | * @GNUTLS_CIPHER_CHACHA20_POLY1305: The Chacha20 cipher with the Poly1305
authenticator (AEAD). | |
|
| * @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode (placeholder - unsupported | | * @GNUTLS_CIPHER_IDEA_PGP_CFB: IDEA in CFB mode. | |
| ). | | * @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode. | |
| * @GNUTLS_CIPHER_3DES_PGP_CFB: 3DES in CFB mode (placeholder - unsupported | | * @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode. | |
| ). | | * @GNUTLS_CIPHER_BLOWFISH_PGP_CFB: Blowfish in CFB mode. | |
| * @GNUTLS_CIPHER_CAST5_PGP_CFB: CAST5 in CFB mode (placeholder - unsupport | | * @GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: Safer-SK in CFB mode with 128-bit ke | |
| ed). | | ys. | |
| * @GNUTLS_CIPHER_BLOWFISH_PGP_CFB: Blowfish in CFB mode (placeholder - uns | | * @GNUTLS_CIPHER_AES128_PGP_CFB: AES in CFB mode with 128-bit keys. | |
| upported). | | * @GNUTLS_CIPHER_AES192_PGP_CFB: AES in CFB mode with 192-bit keys. | |
| * @GNUTLS_CIPHER_SAFER_SK128_PGP_CFB: Safer-SK in CFB mode with 128-bit ke | | * @GNUTLS_CIPHER_AES256_PGP_CFB: AES in CFB mode with 256-bit keys. | |
| ys (placeholder - unsupported). | | * @GNUTLS_CIPHER_TWOFISH_PGP_CFB: Twofish in CFB mode. | |
| * @GNUTLS_CIPHER_AES128_PGP_CFB: AES in CFB mode with 128-bit keys (placeh | | | |
| older - unsupported). | | | |
| * @GNUTLS_CIPHER_AES192_PGP_CFB: AES in CFB mode with 192-bit keys (placeh | | | |
| older - unsupported). | | | |
| * @GNUTLS_CIPHER_AES256_PGP_CFB: AES in CFB mode with 256-bit keys (placeh | | | |
| older - unsupported). | | | |
| * @GNUTLS_CIPHER_TWOFISH_PGP_CFB: Twofish in CFB mode (placeholder - unsup | | | |
| ported). | | | |
| * | | * | |
| * Enumeration of different symmetric encryption algorithms. | | * Enumeration of different symmetric encryption algorithms. | |
| */ | | */ | |
| typedef enum gnutls_cipher_algorithm { | | typedef enum gnutls_cipher_algorithm { | |
| GNUTLS_CIPHER_UNKNOWN = 0, | | GNUTLS_CIPHER_UNKNOWN = 0, | |
| GNUTLS_CIPHER_NULL = 1, | | GNUTLS_CIPHER_NULL = 1, | |
| GNUTLS_CIPHER_ARCFOUR_128 = 2, | | GNUTLS_CIPHER_ARCFOUR_128 = 2, | |
| GNUTLS_CIPHER_3DES_CBC = 3, | | GNUTLS_CIPHER_3DES_CBC = 3, | |
| GNUTLS_CIPHER_AES_128_CBC = 4, | | GNUTLS_CIPHER_AES_128_CBC = 4, | |
| GNUTLS_CIPHER_AES_256_CBC = 5, | | GNUTLS_CIPHER_AES_256_CBC = 5, | |
| | | | |
| skipping to change at line 262 | | skipping to change at line 270 | |
| GNUTLS_MAC_UNKNOWN = 0, | | GNUTLS_MAC_UNKNOWN = 0, | |
| GNUTLS_MAC_NULL = 1, | | GNUTLS_MAC_NULL = 1, | |
| GNUTLS_MAC_MD5 = 2, | | GNUTLS_MAC_MD5 = 2, | |
| GNUTLS_MAC_SHA1 = 3, | | GNUTLS_MAC_SHA1 = 3, | |
| GNUTLS_MAC_RMD160 = 4, | | GNUTLS_MAC_RMD160 = 4, | |
| GNUTLS_MAC_MD2 = 5, | | GNUTLS_MAC_MD2 = 5, | |
| GNUTLS_MAC_SHA256 = 6, | | GNUTLS_MAC_SHA256 = 6, | |
| GNUTLS_MAC_SHA384 = 7, | | GNUTLS_MAC_SHA384 = 7, | |
| GNUTLS_MAC_SHA512 = 8, | | GNUTLS_MAC_SHA512 = 8, | |
| GNUTLS_MAC_SHA224 = 9, | | GNUTLS_MAC_SHA224 = 9, | |
|
| | | GNUTLS_MAC_SHA3_224 = 10, /* reserved: no implementation */ | |
| | | GNUTLS_MAC_SHA3_256 = 11, /* reserved: no implementation */ | |
| | | GNUTLS_MAC_SHA3_384 = 12, /* reserved: no implementation */ | |
| | | GNUTLS_MAC_SHA3_512 = 13, /* reserved: no implementation */ | |
| /* If you add anything here, make sure you align with | | /* If you add anything here, make sure you align with | |
| gnutls_digest_algorithm_t. */ | | gnutls_digest_algorithm_t. */ | |
| GNUTLS_MAC_AEAD = 200, /* indicates that MAC is on the cipher */ | | GNUTLS_MAC_AEAD = 200, /* indicates that MAC is on the cipher */ | |
| GNUTLS_MAC_UMAC_96 = 201, | | GNUTLS_MAC_UMAC_96 = 201, | |
| GNUTLS_MAC_UMAC_128 = 202 | | GNUTLS_MAC_UMAC_128 = 202 | |
| } gnutls_mac_algorithm_t; | | } gnutls_mac_algorithm_t; | |
| | | | |
| /** | | /** | |
| * gnutls_digest_algorithm_t: | | * gnutls_digest_algorithm_t: | |
| * @GNUTLS_DIG_UNKNOWN: Unknown hash algorithm. | | * @GNUTLS_DIG_UNKNOWN: Unknown hash algorithm. | |
| * @GNUTLS_DIG_NULL: NULL hash algorithm (empty output). | | * @GNUTLS_DIG_NULL: NULL hash algorithm (empty output). | |
| * @GNUTLS_DIG_MD5: MD5 algorithm. | | * @GNUTLS_DIG_MD5: MD5 algorithm. | |
| * @GNUTLS_DIG_SHA1: SHA-1 algorithm. | | * @GNUTLS_DIG_SHA1: SHA-1 algorithm. | |
| * @GNUTLS_DIG_RMD160: RMD160 algorithm. | | * @GNUTLS_DIG_RMD160: RMD160 algorithm. | |
| * @GNUTLS_DIG_MD2: MD2 algorithm. | | * @GNUTLS_DIG_MD2: MD2 algorithm. | |
| * @GNUTLS_DIG_SHA256: SHA-256 algorithm. | | * @GNUTLS_DIG_SHA256: SHA-256 algorithm. | |
| * @GNUTLS_DIG_SHA384: SHA-384 algorithm. | | * @GNUTLS_DIG_SHA384: SHA-384 algorithm. | |
| * @GNUTLS_DIG_SHA512: SHA-512 algorithm. | | * @GNUTLS_DIG_SHA512: SHA-512 algorithm. | |
| * @GNUTLS_DIG_SHA224: SHA-224 algorithm. | | * @GNUTLS_DIG_SHA224: SHA-224 algorithm. | |
|
| | | * @GNUTLS_DIG_SHA3_224: SHA3-224 algorithm. | |
| | | * @GNUTLS_DIG_SHA3_256: SHA3-256 algorithm. | |
| | | * @GNUTLS_DIG_SHA3_384: SHA3-384 algorithm. | |
| | | * @GNUTLS_DIG_SHA3_512: SHA3-512 algorithm. | |
| * | | * | |
| * Enumeration of different digest (hash) algorithms. | | * Enumeration of different digest (hash) algorithms. | |
| */ | | */ | |
| typedef enum { | | typedef enum { | |
| GNUTLS_DIG_UNKNOWN = GNUTLS_MAC_UNKNOWN, | | GNUTLS_DIG_UNKNOWN = GNUTLS_MAC_UNKNOWN, | |
| GNUTLS_DIG_NULL = GNUTLS_MAC_NULL, | | GNUTLS_DIG_NULL = GNUTLS_MAC_NULL, | |
| GNUTLS_DIG_MD5 = GNUTLS_MAC_MD5, | | GNUTLS_DIG_MD5 = GNUTLS_MAC_MD5, | |
| GNUTLS_DIG_SHA1 = GNUTLS_MAC_SHA1, | | GNUTLS_DIG_SHA1 = GNUTLS_MAC_SHA1, | |
| GNUTLS_DIG_RMD160 = GNUTLS_MAC_RMD160, | | GNUTLS_DIG_RMD160 = GNUTLS_MAC_RMD160, | |
| GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2, | | GNUTLS_DIG_MD2 = GNUTLS_MAC_MD2, | |
| GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256, | | GNUTLS_DIG_SHA256 = GNUTLS_MAC_SHA256, | |
| GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384, | | GNUTLS_DIG_SHA384 = GNUTLS_MAC_SHA384, | |
| GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512, | | GNUTLS_DIG_SHA512 = GNUTLS_MAC_SHA512, | |
|
| GNUTLS_DIG_SHA224 = GNUTLS_MAC_SHA224 | | GNUTLS_DIG_SHA224 = GNUTLS_MAC_SHA224, | |
| | | GNUTLS_DIG_SHA3_224 = GNUTLS_MAC_SHA3_224, | |
| | | GNUTLS_DIG_SHA3_256 = GNUTLS_MAC_SHA3_256, | |
| | | GNUTLS_DIG_SHA3_384 = GNUTLS_MAC_SHA3_384, | |
| | | GNUTLS_DIG_SHA3_512 = GNUTLS_MAC_SHA3_512 | |
| /* If you add anything here, make sure you align with | | /* If you add anything here, make sure you align with | |
| gnutls_mac_algorithm_t. */ | | gnutls_mac_algorithm_t. */ | |
| } gnutls_digest_algorithm_t; | | } gnutls_digest_algorithm_t; | |
| | | | |
| /* exported for other gnutls headers. This is the maximum number of | | /* exported for other gnutls headers. This is the maximum number of | |
| * algorithms (ciphers, kx or macs). | | * algorithms (ciphers, kx or macs). | |
| */ | | */ | |
| #define GNUTLS_MAX_ALGORITHM_NUM 32 | | #define GNUTLS_MAX_ALGORITHM_NUM 32 | |
| #define GNUTLS_MAX_SESSION_ID_SIZE 32 | | #define GNUTLS_MAX_SESSION_ID_SIZE 32 | |
| | | | |
| | | | |
| skipping to change at line 727 | | skipping to change at line 747 | |
| GNUTLS_ECC_CURVE_INVALID = 0, | | GNUTLS_ECC_CURVE_INVALID = 0, | |
| GNUTLS_ECC_CURVE_SECP224R1, | | GNUTLS_ECC_CURVE_SECP224R1, | |
| GNUTLS_ECC_CURVE_SECP256R1, | | GNUTLS_ECC_CURVE_SECP256R1, | |
| GNUTLS_ECC_CURVE_SECP384R1, | | GNUTLS_ECC_CURVE_SECP384R1, | |
| GNUTLS_ECC_CURVE_SECP521R1, | | GNUTLS_ECC_CURVE_SECP521R1, | |
| GNUTLS_ECC_CURVE_SECP192R1 | | GNUTLS_ECC_CURVE_SECP192R1 | |
| } gnutls_ecc_curve_t; | | } gnutls_ecc_curve_t; | |
| | | | |
| /* macros to allow specifying a specific curve in gnutls_privkey_generate() | | /* macros to allow specifying a specific curve in gnutls_privkey_generate() | |
| * and gnutls_x509_privkey_generate() */ | | * and gnutls_x509_privkey_generate() */ | |
|
| #define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)(((unsigned int)1<<31)|((
unsigned int)(curve))) | | #define GNUTLS_CURVE_TO_BITS(curve) (unsigned int)((1<<31)|((unsigned int)(
curve))) | |
| #define GNUTLS_BITS_TO_CURVE(bits) (((unsigned int)(bits)) & 0x7FFFFFFF) | | #define GNUTLS_BITS_TO_CURVE(bits) (((unsigned int)(bits)) & 0x7FFFFFFF) | |
| #define GNUTLS_BITS_ARE_CURVE(bits) (((unsigned int)(bits)) & 0x80000000) | | #define GNUTLS_BITS_ARE_CURVE(bits) (((unsigned int)(bits)) & 0x80000000) | |
| | | | |
| /** | | /** | |
| * gnutls_sec_param_t: | | * gnutls_sec_param_t: | |
| * @GNUTLS_SEC_PARAM_UNKNOWN: Cannot be known | | * @GNUTLS_SEC_PARAM_UNKNOWN: Cannot be known | |
| * @GNUTLS_SEC_PARAM_INSECURE: Less than 42 bits of security | | * @GNUTLS_SEC_PARAM_INSECURE: Less than 42 bits of security | |
| * @GNUTLS_SEC_PARAM_EXPORT: 42 bits of security | | * @GNUTLS_SEC_PARAM_EXPORT: 42 bits of security | |
| * @GNUTLS_SEC_PARAM_VERY_WEAK: 64 bits of security | | * @GNUTLS_SEC_PARAM_VERY_WEAK: 64 bits of security | |
| * @GNUTLS_SEC_PARAM_WEAK: 72 bits of security | | * @GNUTLS_SEC_PARAM_WEAK: 72 bits of security | |
| | | | |
| skipping to change at line 820 | | skipping to change at line 840 | |
| | | | |
| int gnutls_init(gnutls_session_t * session, unsigned int flags); | | int gnutls_init(gnutls_session_t * session, unsigned int flags); | |
| void gnutls_deinit(gnutls_session_t session); | | void gnutls_deinit(gnutls_session_t session); | |
| #define _gnutls_deinit(x) gnutls_deinit(x) | | #define _gnutls_deinit(x) gnutls_deinit(x) | |
| | | | |
| int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how); | | int gnutls_bye(gnutls_session_t session, gnutls_close_request_t how); | |
| | | | |
| int gnutls_handshake(gnutls_session_t session); | | int gnutls_handshake(gnutls_session_t session); | |
| | | | |
| #define GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT ((unsigned int)-1) | | #define GNUTLS_DEFAULT_HANDSHAKE_TIMEOUT ((unsigned int)-1) | |
|
| | | #define GNUTLS_INDEFINITE_TIMEOUT ((unsigned int)-2) | |
| void gnutls_handshake_set_timeout(gnutls_session_t session, | | void gnutls_handshake_set_timeout(gnutls_session_t session, | |
| unsigned int ms); | | unsigned int ms); | |
| int gnutls_rehandshake(gnutls_session_t session); | | int gnutls_rehandshake(gnutls_session_t session); | |
| | | | |
| gnutls_alert_description_t gnutls_alert_get(gnutls_session_t session); | | gnutls_alert_description_t gnutls_alert_get(gnutls_session_t session); | |
| int gnutls_alert_send(gnutls_session_t session, | | int gnutls_alert_send(gnutls_session_t session, | |
| gnutls_alert_level_t level, | | gnutls_alert_level_t level, | |
| gnutls_alert_description_t desc); | | gnutls_alert_description_t desc); | |
| int gnutls_alert_send_appropriate(gnutls_session_t session, int err); | | int gnutls_alert_send_appropriate(gnutls_session_t session, int err); | |
| const char *gnutls_alert_get_name(gnutls_alert_description_t alert); | | const char *gnutls_alert_get_name(gnutls_alert_description_t alert); | |
| const char *gnutls_alert_get_strname(gnutls_alert_description_t alert); | | const char *gnutls_alert_get_strname(gnutls_alert_description_t alert); | |
| | | | |
| gnutls_sec_param_t gnutls_pk_bits_to_sec_param(gnutls_pk_algorithm_t algo, | | gnutls_sec_param_t gnutls_pk_bits_to_sec_param(gnutls_pk_algorithm_t algo, | |
| unsigned int bits); | | unsigned int bits); | |
| const char *gnutls_sec_param_get_name(gnutls_sec_param_t param); | | const char *gnutls_sec_param_get_name(gnutls_sec_param_t param); | |
| unsigned int gnutls_sec_param_to_pk_bits(gnutls_pk_algorithm_t algo, | | unsigned int gnutls_sec_param_to_pk_bits(gnutls_pk_algorithm_t algo, | |
| gnutls_sec_param_t param); | | gnutls_sec_param_t param); | |
| unsigned int | | unsigned int | |
|
| gnutls_sec_param_to_symmetric_bits(gnutls_sec_param_t param); | | gnutls_sec_param_to_symmetric_bits(gnutls_sec_param_t param) __GNUTL
S_CONST__; | |
| | | | |
| /* Elliptic curves */ | | /* Elliptic curves */ | |
|
| const char *gnutls_ecc_curve_get_name(gnutls_ecc_curve_t curve); | | const char * | |
| const char *gnutls_ecc_curve_get_oid(gnutls_ecc_curve_t curve); | | gnutls_ecc_curve_get_name(gnutls_ecc_curve_t curve) __GNUTLS_CONST__ | |
| | | ; | |
| | | const char * | |
| | | gnutls_ecc_curve_get_oid(gnutls_ecc_curve_t curve) __GNUTLS_CONST__; | |
| | | | |
|
| int gnutls_ecc_curve_get_size(gnutls_ecc_curve_t curve); | | int | |
| | | gnutls_ecc_curve_get_size(gnutls_ecc_curve_t curve) __GNUTLS_CONST__ | |
| | | ; | |
| gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); | | gnutls_ecc_curve_t gnutls_ecc_curve_get(gnutls_session_t session); | |
| | | | |
| /* get information on the current session */ | | /* get information on the current session */ | |
| gnutls_cipher_algorithm_t gnutls_cipher_get(gnutls_session_t session); | | gnutls_cipher_algorithm_t gnutls_cipher_get(gnutls_session_t session); | |
| gnutls_kx_algorithm_t gnutls_kx_get(gnutls_session_t session); | | gnutls_kx_algorithm_t gnutls_kx_get(gnutls_session_t session); | |
| gnutls_mac_algorithm_t gnutls_mac_get(gnutls_session_t session); | | gnutls_mac_algorithm_t gnutls_mac_get(gnutls_session_t session); | |
| gnutls_compression_method_t | | gnutls_compression_method_t | |
| gnutls_compression_get(gnutls_session_t session); | | gnutls_compression_get(gnutls_session_t session); | |
| gnutls_certificate_type_t | | gnutls_certificate_type_t | |
| gnutls_certificate_type_get(gnutls_session_t session); | | gnutls_certificate_type_get(gnutls_session_t session); | |
| | | | |
| int gnutls_sign_algorithm_get(gnutls_session_t session); | | int gnutls_sign_algorithm_get(gnutls_session_t session); | |
| int gnutls_sign_algorithm_get_client(gnutls_session_t session); | | int gnutls_sign_algorithm_get_client(gnutls_session_t session); | |
| | | | |
| int gnutls_sign_algorithm_get_requested(gnutls_session_t session, | | int gnutls_sign_algorithm_get_requested(gnutls_session_t session, | |
| size_t indx, | | size_t indx, | |
| gnutls_sign_algorithm_t * algo); | | gnutls_sign_algorithm_t * algo); | |
| | | | |
| /* the name of the specified algorithms */ | | /* the name of the specified algorithms */ | |
|
| const char *gnutls_cipher_get_name(gnutls_cipher_algorithm_t algorithm); | | const char * | |
| const char *gnutls_mac_get_name(gnutls_mac_algorithm_t algorithm); | | gnutls_cipher_get_name(gnutls_cipher_algorithm_t algorithm) __GNUTLS | |
| | | _CONST__; | |
| | | const char * | |
| | | gnutls_mac_get_name(gnutls_mac_algorithm_t algorithm) __GNUTLS_CONST | |
| | | __; | |
| | | | |
|
| const char *gnutls_digest_get_name(gnutls_digest_algorithm_t algorithm); | | const char * | |
| const char *gnutls_digest_get_oid(gnutls_digest_algorithm_t algorithm); | | gnutls_digest_get_name(gnutls_digest_algorithm_t algorithm) __GNUTLS | |
| | | _CONST__; | |
| | | const char * | |
| | | gnutls_digest_get_oid(gnutls_digest_algorithm_t algorithm) __GNUTLS_ | |
| | | CONST__; | |
| | | | |
|
| const char *gnutls_compression_get_name(gnutls_compression_method_t | | const char * | |
| algorithm); | | gnutls_compression_get_name(gnutls_compression_method_t | |
| const char *gnutls_kx_get_name(gnutls_kx_algorithm_t algorithm); | | algorithm) __GNUTLS_CONST__; | |
| const char *gnutls_certificate_type_get_name(gnutls_certificate_type_t | | const char * | |
| type); | | gnutls_kx_get_name(gnutls_kx_algorithm_t algorithm) __GNUTLS_CONST__ | |
| const char *gnutls_pk_get_name(gnutls_pk_algorithm_t algorithm); | | ; | |
| const char *gnutls_pk_get_oid(gnutls_pk_algorithm_t algorithm); | | const char * | |
| | | gnutls_certificate_type_get_name(gnutls_certificate_type_t | |
| | | type) __GNUTLS_CONST__; | |
| | | const char * | |
| | | gnutls_pk_get_name(gnutls_pk_algorithm_t algorithm) __GNUTLS_CONST__ | |
| | | ; | |
| | | const char * | |
| | | gnutls_pk_get_oid(gnutls_pk_algorithm_t algorithm) __GNUTLS_CONST__; | |
| | | | |
|
| const char *gnutls_sign_get_name(gnutls_sign_algorithm_t algorithm); | | const char * | |
| const char *gnutls_sign_get_oid(gnutls_sign_algorithm_t algorithm); | | gnutls_sign_get_name(gnutls_sign_algorithm_t algorithm) __GNUTLS_CON | |
| | | ST__; | |
| | | const char * | |
| | | gnutls_sign_get_oid(gnutls_sign_algorithm_t algorithm) __GNUTLS_CONS | |
| | | T__; | |
| | | | |
|
| size_t gnutls_cipher_get_key_size(gnutls_cipher_algorithm_t algorithm); | | size_t | |
| size_t gnutls_mac_get_key_size(gnutls_mac_algorithm_t algorithm); | | gnutls_cipher_get_key_size(gnutls_cipher_algorithm_t algorithm) __GN | |
| | | UTLS_CONST__; | |
| | | size_t | |
| | | gnutls_mac_get_key_size(gnutls_mac_algorithm_t algorithm) __GNUTLS_C | |
| | | ONST__; | |
| | | | |
| | | int gnutls_sign_is_secure(gnutls_sign_algorithm_t algorithm) __GNUTLS_CONST | |
| | | __; | |
| | | | |
|
| int gnutls_sign_is_secure(gnutls_sign_algorithm_t algorithm); | | | |
| gnutls_digest_algorithm_t | | gnutls_digest_algorithm_t | |
|
| gnutls_sign_get_hash_algorithm(gnutls_sign_algorithm_t sign); | | gnutls_sign_get_hash_algorithm(gnutls_sign_algorithm_t sign) __GNUTL
S_CONST__; | |
| gnutls_pk_algorithm_t | | gnutls_pk_algorithm_t | |
|
| gnutls_sign_get_pk_algorithm(gnutls_sign_algorithm_t sign); | | gnutls_sign_get_pk_algorithm(gnutls_sign_algorithm_t sign) __GNUTLS_
CONST__; | |
| gnutls_sign_algorithm_t | | gnutls_sign_algorithm_t | |
|
| gnutls_pk_to_sign(gnutls_pk_algorithm_t pk, | | gnutls_pk_to_sign(gnutls_pk_algorithm_t pk, | |
| gnutls_digest_algorithm_t hash); | | gnutls_digest_algorithm_t hash) __GNUTLS_CONST__; | |
| | | | |
| #define gnutls_sign_algorithm_get_name gnutls_sign_get_name | | #define gnutls_sign_algorithm_get_name gnutls_sign_get_name | |
| | | | |
|
| gnutls_mac_algorithm_t gnutls_mac_get_id(const char *name); | | gnutls_mac_algorithm_t gnutls_mac_get_id(const char *name) __GNUTLS_CONST__ | |
| gnutls_digest_algorithm_t gnutls_digest_get_id(const char *name); | | ; | |
| | | gnutls_digest_algorithm_t gnutls_digest_get_id(const char *name) __GNUTLS_C | |
| | | ONST__; | |
| | | | |
|
| gnutls_compression_method_t gnutls_compression_get_id(const char *name); | | gnutls_compression_method_t | |
| gnutls_cipher_algorithm_t gnutls_cipher_get_id(const char *name); | | gnutls_compression_get_id(const char *name) __GNUTLS_CONST__; | |
| gnutls_kx_algorithm_t gnutls_kx_get_id(const char *name); | | gnutls_cipher_algorithm_t | |
| gnutls_protocol_t gnutls_protocol_get_id(const char *name); | | gnutls_cipher_get_id(const char *name) __GNUTLS_CONST__; | |
| gnutls_certificate_type_t gnutls_certificate_type_get_id(const char *name); | | | |
| gnutls_pk_algorithm_t gnutls_pk_get_id(const char *name); | | | |
| gnutls_sign_algorithm_t gnutls_sign_get_id(const char *name); | | | |
| gnutls_ecc_curve_t gnutls_ecc_curve_get_id(const char *name); | | | |
| | | | |
|
| gnutls_digest_algorithm_t gnutls_oid_to_digest(const char *oid); | | gnutls_kx_algorithm_t | |
| gnutls_pk_algorithm_t gnutls_oid_to_pk(const char *oid); | | gnutls_kx_get_id(const char *name) __GNUTLS_CONST__; | |
| gnutls_sign_algorithm_t gnutls_oid_to_sign(const char *oid); | | gnutls_protocol_t | |
| gnutls_ecc_curve_t gnutls_oid_to_ecc_curve(const char *oid); | | gnutls_protocol_get_id(const char *name) __GNUTLS_CONST__; | |
| | | gnutls_certificate_type_t | |
| | | gnutls_certificate_type_get_id(const char *name) __GNUTLS_CONST__; | |
| | | gnutls_pk_algorithm_t | |
| | | gnutls_pk_get_id(const char *name) __GNUTLS_CONST__; | |
| | | gnutls_sign_algorithm_t | |
| | | gnutls_sign_get_id(const char *name) __GNUTLS_CONST__; | |
| | | gnutls_ecc_curve_t gnutls_ecc_curve_get_id(const char *name) __GNUTLS_CONS | |
| | | T__; | |
| | | | |
| | | gnutls_digest_algorithm_t | |
| | | gnutls_oid_to_digest(const char *oid) __GNUTLS_CONST__; | |
| | | gnutls_pk_algorithm_t | |
| | | gnutls_oid_to_pk(const char *oid) __GNUTLS_CONST__; | |
| | | gnutls_sign_algorithm_t | |
| | | gnutls_oid_to_sign(const char *oid) __GNUTLS_CONST__; | |
| | | gnutls_ecc_curve_t | |
| | | gnutls_oid_to_ecc_curve(const char *oid) __GNUTLS_CONST__; | |
| | | | |
| /* list supported algorithms */ | | /* list supported algorithms */ | |
|
| const gnutls_ecc_curve_t *gnutls_ecc_curve_list(void); | | const gnutls_ecc_curve_t * | |
| const gnutls_cipher_algorithm_t *gnutls_cipher_list(void); | | gnutls_ecc_curve_list(void) __GNUTLS_PURE__; | |
| const gnutls_mac_algorithm_t *gnutls_mac_list(void); | | const gnutls_cipher_algorithm_t * | |
| const gnutls_digest_algorithm_t *gnutls_digest_list(void); | | gnutls_cipher_list(void) __GNUTLS_PURE__; | |
| const gnutls_compression_method_t *gnutls_compression_list(void); | | const gnutls_mac_algorithm_t * | |
| const gnutls_protocol_t *gnutls_protocol_list(void); | | gnutls_mac_list(void) __GNUTLS_PURE__; | |
| const gnutls_certificate_type_t *gnutls_certificate_type_list(void); | | const gnutls_digest_algorithm_t * | |
| const gnutls_kx_algorithm_t *gnutls_kx_list(void); | | gnutls_digest_list(void) __GNUTLS_PURE__; | |
| const gnutls_pk_algorithm_t *gnutls_pk_list(void); | | const gnutls_compression_method_t * | |
| const gnutls_sign_algorithm_t *gnutls_sign_list(void); | | gnutls_compression_list(void) __GNUTLS_PURE__; | |
| const char *gnutls_cipher_suite_info(size_t idx, | | const gnutls_protocol_t * | |
| unsigned char *cs_id, | | gnutls_protocol_list(void) __GNUTLS_PURE__; | |
| gnutls_kx_algorithm_t * kx, | | const gnutls_certificate_type_t * | |
| gnutls_cipher_algorithm_t * cipher, | | gnutls_certificate_type_list(void) __GNUTLS_PURE__; | |
| gnutls_mac_algorithm_t * mac, | | const gnutls_kx_algorithm_t * | |
| gnutls_protocol_t * min_version); | | gnutls_kx_list(void) __GNUTLS_PURE__; | |
| | | const gnutls_pk_algorithm_t * | |
| | | gnutls_pk_list(void) __GNUTLS_PURE__; | |
| | | const gnutls_sign_algorithm_t * | |
| | | gnutls_sign_list(void) __GNUTLS_PURE__; | |
| | | const char * | |
| | | gnutls_cipher_suite_info(size_t idx, | |
| | | unsigned char *cs_id, | |
| | | gnutls_kx_algorithm_t * kx, | |
| | | gnutls_cipher_algorithm_t * cipher, | |
| | | gnutls_mac_algorithm_t * mac, | |
| | | gnutls_protocol_t * min_version); | |
| | | | |
| /* error functions */ | | /* error functions */ | |
|
| int gnutls_error_is_fatal(int error); | | int gnutls_error_is_fatal(int error) __GNUTLS_CONST__; | |
| int gnutls_error_to_alert(int err, int *level); | | int gnutls_error_to_alert(int err, int *level); | |
| | | | |
| void gnutls_perror(int error); | | void gnutls_perror(int error); | |
|
| const char *gnutls_strerror(int error); | | const char * gnutls_strerror(int error) __GNUTLS_CONST__; | |
| const char *gnutls_strerror_name(int error); | | const char * gnutls_strerror_name(int error) __GNUTLS_CONST__; | |
| | | | |
| /* Semi-internal functions. | | /* Semi-internal functions. | |
| */ | | */ | |
| void gnutls_handshake_set_private_extensions(gnutls_session_t session, | | void gnutls_handshake_set_private_extensions(gnutls_session_t session, | |
| int allow); | | int allow); | |
| int gnutls_handshake_set_random(gnutls_session_t session, | | int gnutls_handshake_set_random(gnutls_session_t session, | |
| const gnutls_datum_t * random); | | const gnutls_datum_t * random); | |
| | | | |
| gnutls_handshake_description_t | | gnutls_handshake_description_t | |
| gnutls_handshake_get_last_out(gnutls_session_t session); | | gnutls_handshake_get_last_out(gnutls_session_t session); | |
| | | | |
| skipping to change at line 1012 | | skipping to change at line 1073 | |
| void gnutls_packet_get(gnutls_packet_t packet, gnutls_datum_t *data, unsign
ed char *sequence); | | void gnutls_packet_get(gnutls_packet_t packet, gnutls_datum_t *data, unsign
ed char *sequence); | |
| void gnutls_packet_deinit(gnutls_packet_t packet); | | void gnutls_packet_deinit(gnutls_packet_t packet); | |
| | | | |
| #define gnutls_read gnutls_record_recv | | #define gnutls_read gnutls_record_recv | |
| #define gnutls_write gnutls_record_send | | #define gnutls_write gnutls_record_send | |
| ssize_t gnutls_record_recv_seq(gnutls_session_t session, void *data, | | ssize_t gnutls_record_recv_seq(gnutls_session_t session, void *data, | |
| size_t data_size, unsigned char *seq); | | size_t data_size, unsigned char *seq); | |
| | | | |
| size_t gnutls_record_overhead_size(gnutls_session_t session); | | size_t gnutls_record_overhead_size(gnutls_session_t session); | |
| | | | |
|
| size_t gnutls_est_record_overhead_size(gnutls_protocol_t version, | | size_t | |
| gnutls_cipher_algorithm_t cipher, | | gnutls_est_record_overhead_size(gnutls_protocol_t version, | |
| gnutls_mac_algorithm_t mac, | | gnutls_cipher_algorithm_t cipher, | |
| gnutls_compression_method_t comp, | | gnutls_mac_algorithm_t mac, | |
| unsigned int flags); | | gnutls_compression_method_t comp, | |
| | | unsigned int flags) __GNUTLS_CONST__ | |
| | | ; | |
| | | | |
| void gnutls_session_enable_compatibility_mode(gnutls_session_t session); | | void gnutls_session_enable_compatibility_mode(gnutls_session_t session); | |
| #define gnutls_record_set_max_empty_records(session, x) | | #define gnutls_record_set_max_empty_records(session, x) | |
| | | | |
| int gnutls_record_can_use_length_hiding(gnutls_session_t session); | | int gnutls_record_can_use_length_hiding(gnutls_session_t session); | |
| | | | |
| int gnutls_record_get_direction(gnutls_session_t session); | | int gnutls_record_get_direction(gnutls_session_t session); | |
| | | | |
| size_t gnutls_record_get_max_size(gnutls_session_t session); | | size_t gnutls_record_get_max_size(gnutls_session_t session); | |
| ssize_t gnutls_record_set_max_size(gnutls_session_t session, size_t size); | | ssize_t gnutls_record_set_max_size(gnutls_session_t session, size_t size); | |
| | | | |
| skipping to change at line 1199 | | skipping to change at line 1261 | |
| int gnutls_priority_cipher_list(gnutls_priority_t pcache, | | int gnutls_priority_cipher_list(gnutls_priority_t pcache, | |
| const unsigned int **list); | | const unsigned int **list); | |
| int gnutls_priority_mac_list(gnutls_priority_t pcache, | | int gnutls_priority_mac_list(gnutls_priority_t pcache, | |
| const unsigned int **list); | | const unsigned int **list); | |
| | | | |
| /* for compatibility | | /* for compatibility | |
| */ | | */ | |
| int gnutls_set_default_priority(gnutls_session_t session); | | int gnutls_set_default_priority(gnutls_session_t session); | |
| | | | |
| /* Returns the name of a cipher suite */ | | /* Returns the name of a cipher suite */ | |
|
| const char *gnutls_cipher_suite_get_name(gnutls_kx_algorithm_t | | const char * | |
| kx_algorithm, | | gnutls_cipher_suite_get_name(gnutls_kx_algorithm_t kx_algorithm, | |
| gnutls_cipher_algorithm_t | | gnutls_cipher_algorithm_t cipher_algori | |
| cipher_algorithm, | | thm, | |
| gnutls_mac_algorithm_t | | gnutls_mac_algorithm_t mac_algorithm) _ | |
| mac_algorithm); | | _GNUTLS_CONST__; | |
| | | | |
| /* get the currently used protocol version */ | | /* get the currently used protocol version */ | |
| gnutls_protocol_t gnutls_protocol_get_version(gnutls_session_t session); | | gnutls_protocol_t gnutls_protocol_get_version(gnutls_session_t session); | |
| | | | |
|
| const char *gnutls_protocol_get_name(gnutls_protocol_t version); | | const char * | |
| | | gnutls_protocol_get_name(gnutls_protocol_t version) __GNUTLS_CONST__ | |
| | | ; | |
| | | | |
| /* get/set session | | /* get/set session | |
| */ | | */ | |
| int gnutls_session_set_data(gnutls_session_t session, | | int gnutls_session_set_data(gnutls_session_t session, | |
| const void *session_data, | | const void *session_data, | |
| size_t session_data_size); | | size_t session_data_size); | |
| int gnutls_session_get_data(gnutls_session_t session, void *session_data, | | int gnutls_session_get_data(gnutls_session_t session, void *session_data, | |
| size_t * session_data_size); | | size_t * session_data_size); | |
| int gnutls_session_get_data2(gnutls_session_t session, | | int gnutls_session_get_data2(gnutls_session_t session, | |
| gnutls_datum_t * data); | | gnutls_datum_t * data); | |
| | | | |
| skipping to change at line 1354 | | skipping to change at line 1415 | |
| void | | void | |
| gnutls_handshake_set_post_client_hello_function(gnutls_session_t session, | | gnutls_handshake_set_post_client_hello_function(gnutls_session_t session, | |
| gnutls_handshake_post_client
_hello_func | | gnutls_handshake_post_client
_hello_func | |
| func); | | func); | |
| | | | |
| void gnutls_handshake_set_max_packet_length(gnutls_session_t session, | | void gnutls_handshake_set_max_packet_length(gnutls_session_t session, | |
| size_t max); | | size_t max); | |
| | | | |
| /* returns libgnutls version (call it with a NULL argument) | | /* returns libgnutls version (call it with a NULL argument) | |
| */ | | */ | |
|
| const char *gnutls_check_version(const char *req_version); | | const char * gnutls_check_version(const char *req_version) __GNUTLS_CONST__ | |
| | | ; | |
| | | | |
| | | /* A macro which will allow optimizing out calls to gnutls_check_version() | |
| | | * when the version being compiled with is sufficient. | |
| | | * Used as: | |
| | | * if (gnutls_check_version_numerc(3,3,16)) { | |
| | | */ | |
| | | #define gnutls_check_version_numeric(a,b,c) \ | |
| | | ((GNUTLS_VERSION_MAJOR >= (a)) && \ | |
| | | ((GNUTLS_VERSION_NUMBER >= ( ((a) << 16) + ((b) << 8) + (c) )) || \ | |
| | | gnutls_check_version(#a "." #b "." #c))) | |
| | | | |
| /* Functions for setting/clearing credentials | | /* Functions for setting/clearing credentials | |
| */ | | */ | |
| void gnutls_credentials_clear(gnutls_session_t session); | | void gnutls_credentials_clear(gnutls_session_t session); | |
| | | | |
| /* cred is a structure defined by the kx algorithm | | /* cred is a structure defined by the kx algorithm | |
| */ | | */ | |
| int gnutls_credentials_set(gnutls_session_t session, | | int gnutls_credentials_set(gnutls_session_t session, | |
| gnutls_credentials_type_t type, void *cred); | | gnutls_credentials_type_t type, void *cred); | |
| int gnutls_credentials_get(gnutls_session_t session, | | int gnutls_credentials_get(gnutls_session_t session, | |
| | | | |
| skipping to change at line 2559 | | skipping to change at line 2630 | |
| | | | |
| #define GNUTLS_E_NO_CERTIFICATE_STATUS -340 | | #define GNUTLS_E_NO_CERTIFICATE_STATUS -340 | |
| #define GNUTLS_E_OCSP_RESPONSE_ERROR -341 | | #define GNUTLS_E_OCSP_RESPONSE_ERROR -341 | |
| #define GNUTLS_E_RANDOM_DEVICE_ERROR -342 | | #define GNUTLS_E_RANDOM_DEVICE_ERROR -342 | |
| #define GNUTLS_E_AUTH_ERROR -343 | | #define GNUTLS_E_AUTH_ERROR -343 | |
| #define GNUTLS_E_NO_APPLICATION_PROTOCOL -344 | | #define GNUTLS_E_NO_APPLICATION_PROTOCOL -344 | |
| #define GNUTLS_E_SOCKETS_INIT_ERROR -345 | | #define GNUTLS_E_SOCKETS_INIT_ERROR -345 | |
| #define GNUTLS_E_KEY_IMPORT_FAILED -346 | | #define GNUTLS_E_KEY_IMPORT_FAILED -346 | |
| #define GNUTLS_E_INAPPROPRIATE_FALLBACK -347 /*GNUTLS_A_INAPPROPRIATE_FALLB
ACK*/ | | #define GNUTLS_E_INAPPROPRIATE_FALLBACK -347 /*GNUTLS_A_INAPPROPRIATE_FALLB
ACK*/ | |
| #define GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR -348 | | #define GNUTLS_E_CERTIFICATE_VERIFICATION_ERROR -348 | |
|
| | | #define GNUTLS_E_PRIVKEY_VERIFICATION_ERROR -349 | |
| | | #define GNUTLS_E_UNEXPECTED_EXTENSIONS_LENGTH -350 /*GNUTLS_A_DECODE_ERROR* | |
| | | / | |
| | | | |
| #define GNUTLS_E_SELF_TEST_ERROR -400 | | #define GNUTLS_E_SELF_TEST_ERROR -400 | |
| #define GNUTLS_E_NO_SELF_TEST -401 | | #define GNUTLS_E_NO_SELF_TEST -401 | |
| #define GNUTLS_E_LIB_IN_ERROR_STATE -402 | | #define GNUTLS_E_LIB_IN_ERROR_STATE -402 | |
| #define GNUTLS_E_PK_GENERATION_ERROR -403 | | #define GNUTLS_E_PK_GENERATION_ERROR -403 | |
| #define GNUTLS_E_IDNA_ERROR -404 | | #define GNUTLS_E_IDNA_ERROR -404 | |
| | | | |
| #define GNUTLS_E_NEED_FALLBACK -405 | | #define GNUTLS_E_NEED_FALLBACK -405 | |
| | | | |
| #define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 | | #define GNUTLS_E_UNIMPLEMENTED_FEATURE -1250 | |
| | | | |
End of changes. 34 change blocks. |
| 97 lines changed or deleted | | 183 lines changed or added | |
|