summaryrefslogtreecommitdiff
path: root/lib/algorithms.h
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-05 10:15:55 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2011-06-05 10:17:46 +0200
commit841490a5dc7725c62111ee30c090517999a68ce8 (patch)
treeedfee2b5c2b015a5183bb1d730f9861cbef560bc /lib/algorithms.h
parent28784bdca2d34ecd4b45478a0f7ef456e3897994 (diff)
downloadgnutls-841490a5dc7725c62111ee30c090517999a68ce8.tar.gz
Avoid memory allocations when requesting the supported ciphersuites.
Diffstat (limited to 'lib/algorithms.h')
-rw-r--r--lib/algorithms.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/algorithms.h b/lib/algorithms.h
index 7a436daca8..507581d407 100644
--- a/lib/algorithms.h
+++ b/lib/algorithms.h
@@ -31,6 +31,9 @@
#define GNUTLS_RENEGO_PROTECTION_REQUEST_MAJOR 0x00
#define GNUTLS_RENEGO_PROTECTION_REQUEST_MINOR 0xFF
+/* would allow for 256 ciphersuites */
+#define MAX_CIPHERSUITE_SIZE 512
+
/* Functions for version handling. */
gnutls_protocol_t _gnutls_version_lowest (gnutls_session_t session);
gnutls_protocol_t _gnutls_version_max (gnutls_session_t session);
@@ -55,9 +58,9 @@ const char *_gnutls_x509_mac_to_oid (gnutls_mac_algorithm_t mac);
/* Functions for cipher suites. */
int _gnutls_supported_ciphersuites (gnutls_session_t session,
- cipher_suite_st ** ciphers);
+ uint8_t* cipher_suites, int max_cipher_suite_size);
int _gnutls_supported_ciphersuites_sorted (gnutls_session_t session,
- cipher_suite_st ** ciphers);
+ uint8_t* cipher_suites, int max_cipher_suite_size);
const char *_gnutls_cipher_suite_get_name (cipher_suite_st * algorithm);
gnutls_mac_algorithm_t _gnutls_cipher_suite_get_prf (const cipher_suite_st * suite);
gnutls_cipher_algorithm_t _gnutls_cipher_suite_get_cipher_algo (const