diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-07-15 15:29:29 +0000 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2002-07-15 15:29:29 +0000 |
commit | 3e0c6e040456fa12e2039526ecc666ac318ffed6 (patch) | |
tree | 8946a9ca46bacd6ecc9d06726291c26812a6cc29 /libextra | |
parent | 099900892bc87e627c01285e75a0c8185eef112b (diff) | |
download | gnutls-3e0c6e040456fa12e2039526ecc666ac318ffed6.tar.gz |
Fixes in zlib compression code. gnutls_global_init_extra() in libgnutls-extra fails if library versions do not match. Semantic changes in gnutls_record_set_max_size(). The requested size is now immediately enforced at the output buffers.
Diffstat (limited to 'libextra')
-rw-r--r-- | libextra/gnutls_extra.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libextra/gnutls_extra.c b/libextra/gnutls_extra.c index 24edbf3714..65216adcff 100644 --- a/libextra/gnutls_extra.c +++ b/libextra/gnutls_extra.c @@ -99,6 +99,8 @@ static void _gnutls_add_openpgp_functions(void) { static int _gnutls_init_extra = 0; +const char* _gnutls_return_version( void); + /** * gnutls_global_init_extra - This function initializes the global state of gnutls-extra * @@ -112,6 +114,14 @@ static int _gnutls_init_extra = 0; **/ int gnutls_global_init_extra(void) { int ret; + + /* If the version of libgnutls != version of + * libextra, then do not initialize the library. + * This is because it may break things. + */ + if (strcmp( _gnutls_return_version(), VERSION)!=0) { + return GNUTLS_E_LIBRARY_VERSION_MISMATCH; + } _gnutls_init_extra++; |