Date: Monday, December 23, 2013 @ 16:39:31
  Author: spupykin
Revision: 102896

upgpkg: python2-gnutls 1.2.5-3

upd

Added:
  python2-gnutls/trunk/libraryfunctions.patch
  python2-gnutls/trunk/libraryinit.patch
Modified:
  python2-gnutls/trunk/PKGBUILD
Deleted:
  python2-gnutls/trunk/gnutls3.patch

------------------------+
 PKGBUILD               |   15 +-
 gnutls3.patch          |  275 -----------------------------------------------
 libraryfunctions.patch |  224 ++++++++++++++++++++++++++++++++++++++
 libraryinit.patch      |   40 ++++++
 4 files changed, 273 insertions(+), 281 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2013-12-23 15:16:31 UTC (rev 102895)
+++ PKGBUILD    2013-12-23 15:39:31 UTC (rev 102896)
@@ -5,20 +5,23 @@
 
 pkgname=python2-gnutls
 pkgver=1.2.5
-pkgrel=2
+pkgrel=3
 pkgdesc="Python wrapper for the GNUTLS library"
 arch=('i686' 'x86_64')
 url="http://cheeseshop.python.org/pypi/python-gnutls";
-depends=('python2' 'gnutls')
+depends=('python2' 'gnutls' 'libgcrypt')
 license=('LGPL')
 
source=(http://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-${pkgver}.tar.gz
-       gnutls3.patch)
+       libraryinit.patch
+        libraryfunctions.patch)
 md5sums=('a398a75b1f366857cf2628cf4d62dd34'
-         'e3df8fb19cf4cc96b8cf9fa69bd532e0')
+         '28227b8626e8a7df81cf3b7dae88bd80'
+         '9907d3a446fdc3b33a70e57925d67298')
 
-prepare() {
+build() {
   cd ${srcdir}/python-gnutls-${pkgver}
-  patch -Np1 <$srcdir/gnutls3.patch
+  patch -Np0 <$srcdir/libraryinit.patch
+  patch -Np0 <$srcdir/libraryfunctions.patch
 }
 
 package() {

Deleted: gnutls3.patch
===================================================================
--- gnutls3.patch       2013-12-23 15:16:31 UTC (rev 102895)
+++ gnutls3.patch       2013-12-23 15:39:31 UTC (rev 102896)
@@ -1,275 +0,0 @@
-diff -wbBur python-gnutls-1.2.5/gnutls/library/functions.py 
python-gnutls-1.2.5.my/gnutls/library/functions.py
---- python-gnutls-1.2.5/gnutls/library/functions.py    2011-08-19 
07:48:14.000000000 +0400
-+++ python-gnutls-1.2.5.my/gnutls/library/functions.py 2013-12-17 
19:57:57.393043074 +0400
-@@ -4,7 +4,7 @@
- import sys
- from ctypes import *
- 
--from gnutls.library import libgnutls, libgnutls_extra
-+from gnutls.library import libgnutls
- from gnutls.library.types import *
- 
- 
-@@ -121,14 +121,6 @@
- gnutls_certificate_get_peers.argtypes = [gnutls_session_t, POINTER(c_uint)]
- gnutls_certificate_get_peers.restype = POINTER(gnutls_datum_t)
- 
--gnutls_certificate_get_x509_cas = libgnutls.gnutls_certificate_get_x509_cas
--gnutls_certificate_get_x509_cas.argtypes = [gnutls_certificate_credentials_t, 
POINTER(POINTER(gnutls_x509_crt_t)), POINTER(c_uint)]
--gnutls_certificate_get_x509_cas.restype = None
--
--gnutls_certificate_get_x509_crls = libgnutls.gnutls_certificate_get_x509_crls
--gnutls_certificate_get_x509_crls.argtypes = 
[gnutls_certificate_credentials_t, POINTER(POINTER(gnutls_x509_crl_t)), 
POINTER(c_uint)]
--gnutls_certificate_get_x509_crls.restype = None
--
- gnutls_certificate_send_x509_rdn_sequence = 
libgnutls.gnutls_certificate_send_x509_rdn_sequence
- gnutls_certificate_send_x509_rdn_sequence.argtypes = [gnutls_session_t, c_int]
- gnutls_certificate_send_x509_rdn_sequence.restype = None
-@@ -221,10 +213,6 @@
- gnutls_certificate_type_set_priority.argtypes = [gnutls_session_t, 
POINTER(c_int)]
- gnutls_certificate_type_set_priority.restype = c_int
- 
--gnutls_certificate_verify_peers = libgnutls.gnutls_certificate_verify_peers
--gnutls_certificate_verify_peers.argtypes = [gnutls_session_t]
--gnutls_certificate_verify_peers.restype = c_int
--
- gnutls_certificate_verify_peers2 = libgnutls.gnutls_certificate_verify_peers2
- gnutls_certificate_verify_peers2.argtypes = [gnutls_session_t, 
POINTER(c_uint)]
- gnutls_certificate_verify_peers2.restype = c_int
-@@ -393,10 +381,6 @@
- gnutls_error_to_alert.argtypes = [c_int, POINTER(c_int)]
- gnutls_error_to_alert.restype = c_int
- 
--gnutls_extra_check_version = libgnutls_extra.gnutls_extra_check_version
--gnutls_extra_check_version.argtypes = [c_char_p]
--gnutls_extra_check_version.restype = c_char_p
--
- gnutls_fingerprint = libgnutls.gnutls_fingerprint
- gnutls_fingerprint.argtypes = [gnutls_digest_algorithm_t, 
POINTER(gnutls_datum_t), c_void_p, POINTER(size_t)]
- gnutls_fingerprint.restype = c_int
-@@ -409,10 +393,6 @@
- gnutls_global_init.argtypes = []
- gnutls_global_init.restype = c_int
- 
--gnutls_global_init_extra = libgnutls_extra.gnutls_global_init_extra
--gnutls_global_init_extra.argtypes = []
--gnutls_global_init_extra.restype = c_int
--
- gnutls_global_set_log_function = libgnutls.gnutls_global_set_log_function
- gnutls_global_set_log_function.argtypes = [gnutls_log_func]
- gnutls_global_set_log_function.restype = None
-@@ -461,86 +441,6 @@
- gnutls_hex_encode.argtypes = [POINTER(gnutls_datum_t), c_char_p, 
POINTER(size_t)]
- gnutls_hex_encode.restype = c_int
- 
--gnutls_ia_allocate_client_credentials = 
libgnutls_extra.gnutls_ia_allocate_client_credentials
--gnutls_ia_allocate_client_credentials.argtypes = 
[POINTER(gnutls_ia_client_credentials_t)]
--gnutls_ia_allocate_client_credentials.restype = c_int
--
--gnutls_ia_allocate_server_credentials = 
libgnutls_extra.gnutls_ia_allocate_server_credentials
--gnutls_ia_allocate_server_credentials.argtypes = 
[POINTER(gnutls_ia_server_credentials_t)]
--gnutls_ia_allocate_server_credentials.restype = c_int
--
--gnutls_ia_enable = libgnutls_extra.gnutls_ia_enable
--gnutls_ia_enable.argtypes = [gnutls_session_t, c_int]
--gnutls_ia_enable.restype = None
--
--gnutls_ia_endphase_send = libgnutls_extra.gnutls_ia_endphase_send
--gnutls_ia_endphase_send.argtypes = [gnutls_session_t, c_int]
--gnutls_ia_endphase_send.restype = c_int
--
--gnutls_ia_extract_inner_secret = 
libgnutls_extra.gnutls_ia_extract_inner_secret
--gnutls_ia_extract_inner_secret.argtypes = [gnutls_session_t, c_char_p]
--gnutls_ia_extract_inner_secret.restype = None
--
--gnutls_ia_free_client_credentials = 
libgnutls_extra.gnutls_ia_free_client_credentials
--gnutls_ia_free_client_credentials.argtypes = [gnutls_ia_client_credentials_t]
--gnutls_ia_free_client_credentials.restype = None
--
--gnutls_ia_free_server_credentials = 
libgnutls_extra.gnutls_ia_free_server_credentials
--gnutls_ia_free_server_credentials.argtypes = [gnutls_ia_server_credentials_t]
--gnutls_ia_free_server_credentials.restype = None
--
--gnutls_ia_generate_challenge = libgnutls_extra.gnutls_ia_generate_challenge
--gnutls_ia_generate_challenge.argtypes = [gnutls_session_t, size_t, c_char_p]
--gnutls_ia_generate_challenge.restype = c_int
--
--gnutls_ia_get_client_avp_ptr = libgnutls_extra.gnutls_ia_get_client_avp_ptr
--gnutls_ia_get_client_avp_ptr.argtypes = [gnutls_ia_client_credentials_t]
--gnutls_ia_get_client_avp_ptr.restype = c_void_p
--
--gnutls_ia_get_server_avp_ptr = libgnutls_extra.gnutls_ia_get_server_avp_ptr
--gnutls_ia_get_server_avp_ptr.argtypes = [gnutls_ia_server_credentials_t]
--gnutls_ia_get_server_avp_ptr.restype = c_void_p
--
--gnutls_ia_handshake = libgnutls_extra.gnutls_ia_handshake
--gnutls_ia_handshake.argtypes = [gnutls_session_t]
--gnutls_ia_handshake.restype = c_int
--
--gnutls_ia_handshake_p = libgnutls_extra.gnutls_ia_handshake_p
--gnutls_ia_handshake_p.argtypes = [gnutls_session_t]
--gnutls_ia_handshake_p.restype = c_int
--
--gnutls_ia_permute_inner_secret = 
libgnutls_extra.gnutls_ia_permute_inner_secret
--gnutls_ia_permute_inner_secret.argtypes = [gnutls_session_t, size_t, c_char_p]
--gnutls_ia_permute_inner_secret.restype = c_int
--
--gnutls_ia_recv = libgnutls_extra.gnutls_ia_recv
--gnutls_ia_recv.argtypes = [gnutls_session_t, c_char_p, size_t]
--gnutls_ia_recv.restype = ssize_t
--
--gnutls_ia_send = libgnutls_extra.gnutls_ia_send
--gnutls_ia_send.argtypes = [gnutls_session_t, c_char_p, size_t]
--gnutls_ia_send.restype = ssize_t
--
--gnutls_ia_set_client_avp_function = 
libgnutls_extra.gnutls_ia_set_client_avp_function
--gnutls_ia_set_client_avp_function.argtypes = [gnutls_ia_client_credentials_t, 
gnutls_ia_avp_func]
--gnutls_ia_set_client_avp_function.restype = None
--
--gnutls_ia_set_client_avp_ptr = libgnutls_extra.gnutls_ia_set_client_avp_ptr
--gnutls_ia_set_client_avp_ptr.argtypes = [gnutls_ia_client_credentials_t, 
c_void_p]
--gnutls_ia_set_client_avp_ptr.restype = None
--
--gnutls_ia_set_server_avp_function = 
libgnutls_extra.gnutls_ia_set_server_avp_function
--gnutls_ia_set_server_avp_function.argtypes = [gnutls_ia_server_credentials_t, 
gnutls_ia_avp_func]
--gnutls_ia_set_server_avp_function.restype = None
--
--gnutls_ia_set_server_avp_ptr = libgnutls_extra.gnutls_ia_set_server_avp_ptr
--gnutls_ia_set_server_avp_ptr.argtypes = [gnutls_ia_server_credentials_t, 
c_void_p]
--gnutls_ia_set_server_avp_ptr.restype = None
--
--gnutls_ia_verify_endphase = libgnutls_extra.gnutls_ia_verify_endphase
--gnutls_ia_verify_endphase.argtypes = [gnutls_session_t, c_char_p]
--gnutls_ia_verify_endphase.restype = c_int
--
- gnutls_init = libgnutls.gnutls_init
- gnutls_init.argtypes = [POINTER(gnutls_session_t), gnutls_connection_end_t]
- gnutls_init.restype = c_int
-@@ -733,10 +633,6 @@
- gnutls_psk_free_server_credentials.argtypes = 
[gnutls_psk_server_credentials_t]
- gnutls_psk_free_server_credentials.restype = None
- 
--gnutls_psk_netconf_derive_key = libgnutls.gnutls_psk_netconf_derive_key
--gnutls_psk_netconf_derive_key.argtypes = [c_char_p, c_char_p, c_char_p, 
POINTER(gnutls_datum_t)]
--gnutls_psk_netconf_derive_key.restype = c_int
--
- gnutls_psk_server_get_username = libgnutls.gnutls_psk_server_get_username
- gnutls_psk_server_get_username.argtypes = [gnutls_session_t]
- gnutls_psk_server_get_username.restype = c_char_p
-@@ -857,10 +753,6 @@
- gnutls_session_enable_compatibility_mode.argtypes = [gnutls_session_t]
- gnutls_session_enable_compatibility_mode.restype = None
- 
--gnutls_session_get_client_random = libgnutls.gnutls_session_get_client_random
--gnutls_session_get_client_random.argtypes = [gnutls_session_t]
--gnutls_session_get_client_random.restype = c_void_p
--
- gnutls_session_get_data = libgnutls.gnutls_session_get_data
- gnutls_session_get_data.argtypes = [gnutls_session_t, c_void_p, 
POINTER(size_t)]
- gnutls_session_get_data.restype = c_int
-@@ -873,18 +765,10 @@
- gnutls_session_get_id.argtypes = [gnutls_session_t, c_void_p, POINTER(size_t)]
- gnutls_session_get_id.restype = c_int
- 
--gnutls_session_get_master_secret = libgnutls.gnutls_session_get_master_secret
--gnutls_session_get_master_secret.argtypes = [gnutls_session_t]
--gnutls_session_get_master_secret.restype = c_void_p
--
- gnutls_session_get_ptr = libgnutls.gnutls_session_get_ptr
- gnutls_session_get_ptr.argtypes = [gnutls_session_t]
- gnutls_session_get_ptr.restype = c_void_p
- 
--gnutls_session_get_server_random = libgnutls.gnutls_session_get_server_random
--gnutls_session_get_server_random.argtypes = [gnutls_session_t]
--gnutls_session_get_server_random.restype = c_void_p
--
- gnutls_session_is_resumed = libgnutls.gnutls_session_is_resumed
- gnutls_session_is_resumed.argtypes = [gnutls_session_t]
- gnutls_session_is_resumed.restype = c_int
-@@ -905,10 +789,6 @@
- gnutls_set_default_priority.argtypes = [gnutls_session_t]
- gnutls_set_default_priority.restype = c_int
- 
--gnutls_sign_algorithm_get_name = libgnutls.gnutls_sign_algorithm_get_name
--gnutls_sign_algorithm_get_name.argtypes = [gnutls_sign_algorithm_t]
--gnutls_sign_algorithm_get_name.restype = c_char_p
--
- gnutls_sign_callback_get = libgnutls.gnutls_sign_callback_get
- gnutls_sign_callback_get.argtypes = [gnutls_session_t, POINTER(c_void_p)]
- gnutls_sign_callback_get.restype = gnutls_sign_func
-@@ -937,14 +817,6 @@
- gnutls_transport_set_errno.argtypes = [gnutls_session_t, c_int]
- gnutls_transport_set_errno.restype = None
- 
--gnutls_transport_set_global_errno = 
libgnutls.gnutls_transport_set_global_errno
--gnutls_transport_set_global_errno.argtypes = [c_int]
--gnutls_transport_set_global_errno.restype = None
--
--gnutls_transport_set_lowat = libgnutls.gnutls_transport_set_lowat
--gnutls_transport_set_lowat.argtypes = [gnutls_session_t, c_int]
--gnutls_transport_set_lowat.restype = None
--
- gnutls_transport_set_ptr = libgnutls.gnutls_transport_set_ptr
- gnutls_transport_set_ptr.argtypes = [gnutls_session_t, gnutls_transport_ptr_t]
- gnutls_transport_set_ptr.restype = None
-@@ -1501,10 +1373,6 @@
- gnutls_x509_privkey_sign_hash.argtypes = [gnutls_x509_privkey_t, 
POINTER(gnutls_datum_t), POINTER(gnutls_datum_t)]
- gnutls_x509_privkey_sign_hash.restype = c_int
- 
--gnutls_x509_privkey_verify_data = libgnutls.gnutls_x509_privkey_verify_data
--gnutls_x509_privkey_verify_data.argtypes = [gnutls_x509_privkey_t, c_uint, 
POINTER(gnutls_datum_t), POINTER(gnutls_datum_t)]
--gnutls_x509_privkey_verify_data.restype = c_int
--
- gnutls_x509_rdn_get = libgnutls.gnutls_x509_rdn_get
- gnutls_x509_rdn_get.argtypes = [POINTER(gnutls_datum_t), c_char_p, 
POINTER(size_t)]
- gnutls_x509_rdn_get.restype = c_int
-diff -wbBur python-gnutls-1.2.5/gnutls/library/__init__.py 
python-gnutls-1.2.5.my/gnutls/library/__init__.py
---- python-gnutls-1.2.5/gnutls/library/__init__.py     2013-12-12 
20:29:45.000000000 +0400
-+++ python-gnutls-1.2.5.my/gnutls/library/__init__.py  2013-12-17 
19:58:10.393043366 +0400
-@@ -53,6 +53,9 @@
-     else:
-         raise RuntimeError('cannot find lib%s on this system' % name)
- 
-+def do_nothing(*args, **kwargs):
-+    pass
-+
- 
- def initialize_gcrypt():
-     from ctypes import c_void_p
-@@ -104,10 +107,10 @@
-         libgcrypt = load_library(name='gcrypt', version=11)
-         gcry_control = libgcrypt.gcry_control
-     else:
--        gcry_control = libgnutls.gcry_control
-+        gcry_control = do_nothing
- 
-     gcry_control(GCRYCTL_SET_THREAD_CBS, 
c_void_p(gcrypt_thread_callbacks_ptr))
--    libgnutls.gcry_check_version('1.2.4')    # GNUTLS_MIN_LIBGCRYPT_VERSION
-+#    libgnutls.gcry_check_version('1.2.4')    # GNUTLS_MIN_LIBGCRYPT_VERSION
-     if system == 'cygwin':
-         gcry_control(GCRYCTL_DISABLE_SECMEM, 0)
-     else:
-@@ -118,12 +121,10 @@
- 
- 
- 
--libgnutls = load_library(name='gnutls', version=26)
--libgnutls_extra = load_library(name='gnutls-extra', version=26)
-+libgnutls = load_library(name='gnutls', version=28)
- 
- initialize_gcrypt()
- libgnutls.gnutls_global_init()
--libgnutls_extra.gnutls_global_init_extra()
- 
- 
- from gnutls.library import constants
-@@ -137,9 +138,6 @@
- if functions.gnutls_check_version(__need_version__) is None:
-     version = functions.gnutls_check_version(None)
-     raise RuntimeError("Found GNUTLS library version %s, but at least version 
%s is required" % (version, __need_version__))
--if functions.gnutls_extra_check_version(__need_version__) is None:
--    version = functions.gnutls_extra_check_version(None)
--    raise RuntimeError("Found GNUTLS extra library version %s, but at least 
version %s is required" % (version, __need_version__))
- 
- 
- del get_system_name, library_locations, load_library, initialize_gcrypt

Added: libraryfunctions.patch
===================================================================
--- libraryfunctions.patch                              (rev 0)
+++ libraryfunctions.patch      2013-12-23 15:39:31 UTC (rev 102896)
@@ -0,0 +1,224 @@
+--- gnutls/library/functions.py        2011-08-19 07:48:14.000000000 +0400
++++ gnutls.fixed/library/functions.py  2013-12-17 21:08:35.512682514 +0400
+@@ -4,7 +4,7 @@
+ import sys
+ from ctypes import *
+ 
+-from gnutls.library import libgnutls, libgnutls_extra
++from gnutls.library import libgnutls
+ from gnutls.library.types import *
+ 
+ 
+@@ -121,14 +121,6 @@
+ gnutls_certificate_get_peers.argtypes = [gnutls_session_t, POINTER(c_uint)]
+ gnutls_certificate_get_peers.restype = POINTER(gnutls_datum_t)
+ 
+-gnutls_certificate_get_x509_cas = libgnutls.gnutls_certificate_get_x509_cas
+-gnutls_certificate_get_x509_cas.argtypes = [gnutls_certificate_credentials_t, 
POINTER(POINTER(gnutls_x509_crt_t)), POINTER(c_uint)]
+-gnutls_certificate_get_x509_cas.restype = None
+-
+-gnutls_certificate_get_x509_crls = libgnutls.gnutls_certificate_get_x509_crls
+-gnutls_certificate_get_x509_crls.argtypes = 
[gnutls_certificate_credentials_t, POINTER(POINTER(gnutls_x509_crl_t)), 
POINTER(c_uint)]
+-gnutls_certificate_get_x509_crls.restype = None
+-
+ gnutls_certificate_send_x509_rdn_sequence = 
libgnutls.gnutls_certificate_send_x509_rdn_sequence
+ gnutls_certificate_send_x509_rdn_sequence.argtypes = [gnutls_session_t, c_int]
+ gnutls_certificate_send_x509_rdn_sequence.restype = None
+@@ -221,10 +213,6 @@
+ gnutls_certificate_type_set_priority.argtypes = [gnutls_session_t, 
POINTER(c_int)]
+ gnutls_certificate_type_set_priority.restype = c_int
+ 
+-gnutls_certificate_verify_peers = libgnutls.gnutls_certificate_verify_peers
+-gnutls_certificate_verify_peers.argtypes = [gnutls_session_t]
+-gnutls_certificate_verify_peers.restype = c_int
+-
+ gnutls_certificate_verify_peers2 = libgnutls.gnutls_certificate_verify_peers2
+ gnutls_certificate_verify_peers2.argtypes = [gnutls_session_t, 
POINTER(c_uint)]
+ gnutls_certificate_verify_peers2.restype = c_int
+@@ -393,10 +381,6 @@
+ gnutls_error_to_alert.argtypes = [c_int, POINTER(c_int)]
+ gnutls_error_to_alert.restype = c_int
+ 
+-gnutls_extra_check_version = libgnutls_extra.gnutls_extra_check_version
+-gnutls_extra_check_version.argtypes = [c_char_p]
+-gnutls_extra_check_version.restype = c_char_p
+-
+ gnutls_fingerprint = libgnutls.gnutls_fingerprint
+ gnutls_fingerprint.argtypes = [gnutls_digest_algorithm_t, 
POINTER(gnutls_datum_t), c_void_p, POINTER(size_t)]
+ gnutls_fingerprint.restype = c_int
+@@ -409,10 +393,6 @@
+ gnutls_global_init.argtypes = []
+ gnutls_global_init.restype = c_int
+ 
+-gnutls_global_init_extra = libgnutls_extra.gnutls_global_init_extra
+-gnutls_global_init_extra.argtypes = []
+-gnutls_global_init_extra.restype = c_int
+-
+ gnutls_global_set_log_function = libgnutls.gnutls_global_set_log_function
+ gnutls_global_set_log_function.argtypes = [gnutls_log_func]
+ gnutls_global_set_log_function.restype = None
+@@ -461,86 +441,6 @@
+ gnutls_hex_encode.argtypes = [POINTER(gnutls_datum_t), c_char_p, 
POINTER(size_t)]
+ gnutls_hex_encode.restype = c_int
+ 
+-gnutls_ia_allocate_client_credentials = 
libgnutls_extra.gnutls_ia_allocate_client_credentials
+-gnutls_ia_allocate_client_credentials.argtypes = 
[POINTER(gnutls_ia_client_credentials_t)]
+-gnutls_ia_allocate_client_credentials.restype = c_int
+-
+-gnutls_ia_allocate_server_credentials = 
libgnutls_extra.gnutls_ia_allocate_server_credentials
+-gnutls_ia_allocate_server_credentials.argtypes = 
[POINTER(gnutls_ia_server_credentials_t)]
+-gnutls_ia_allocate_server_credentials.restype = c_int
+-
+-gnutls_ia_enable = libgnutls_extra.gnutls_ia_enable
+-gnutls_ia_enable.argtypes = [gnutls_session_t, c_int]
+-gnutls_ia_enable.restype = None
+-
+-gnutls_ia_endphase_send = libgnutls_extra.gnutls_ia_endphase_send
+-gnutls_ia_endphase_send.argtypes = [gnutls_session_t, c_int]
+-gnutls_ia_endphase_send.restype = c_int
+-
+-gnutls_ia_extract_inner_secret = 
libgnutls_extra.gnutls_ia_extract_inner_secret
+-gnutls_ia_extract_inner_secret.argtypes = [gnutls_session_t, c_char_p]
+-gnutls_ia_extract_inner_secret.restype = None
+-
+-gnutls_ia_free_client_credentials = 
libgnutls_extra.gnutls_ia_free_client_credentials
+-gnutls_ia_free_client_credentials.argtypes = [gnutls_ia_client_credentials_t]
+-gnutls_ia_free_client_credentials.restype = None
+-
+-gnutls_ia_free_server_credentials = 
libgnutls_extra.gnutls_ia_free_server_credentials
+-gnutls_ia_free_server_credentials.argtypes = [gnutls_ia_server_credentials_t]
+-gnutls_ia_free_server_credentials.restype = None
+-
+-gnutls_ia_generate_challenge = libgnutls_extra.gnutls_ia_generate_challenge
+-gnutls_ia_generate_challenge.argtypes = [gnutls_session_t, size_t, c_char_p]
+-gnutls_ia_generate_challenge.restype = c_int
+-
+-gnutls_ia_get_client_avp_ptr = libgnutls_extra.gnutls_ia_get_client_avp_ptr
+-gnutls_ia_get_client_avp_ptr.argtypes = [gnutls_ia_client_credentials_t]
+-gnutls_ia_get_client_avp_ptr.restype = c_void_p
+-
+-gnutls_ia_get_server_avp_ptr = libgnutls_extra.gnutls_ia_get_server_avp_ptr
+-gnutls_ia_get_server_avp_ptr.argtypes = [gnutls_ia_server_credentials_t]
+-gnutls_ia_get_server_avp_ptr.restype = c_void_p
+-
+-gnutls_ia_handshake = libgnutls_extra.gnutls_ia_handshake
+-gnutls_ia_handshake.argtypes = [gnutls_session_t]
+-gnutls_ia_handshake.restype = c_int
+-
+-gnutls_ia_handshake_p = libgnutls_extra.gnutls_ia_handshake_p
+-gnutls_ia_handshake_p.argtypes = [gnutls_session_t]
+-gnutls_ia_handshake_p.restype = c_int
+-
+-gnutls_ia_permute_inner_secret = 
libgnutls_extra.gnutls_ia_permute_inner_secret
+-gnutls_ia_permute_inner_secret.argtypes = [gnutls_session_t, size_t, c_char_p]
+-gnutls_ia_permute_inner_secret.restype = c_int
+-
+-gnutls_ia_recv = libgnutls_extra.gnutls_ia_recv
+-gnutls_ia_recv.argtypes = [gnutls_session_t, c_char_p, size_t]
+-gnutls_ia_recv.restype = ssize_t
+-
+-gnutls_ia_send = libgnutls_extra.gnutls_ia_send
+-gnutls_ia_send.argtypes = [gnutls_session_t, c_char_p, size_t]
+-gnutls_ia_send.restype = ssize_t
+-
+-gnutls_ia_set_client_avp_function = 
libgnutls_extra.gnutls_ia_set_client_avp_function
+-gnutls_ia_set_client_avp_function.argtypes = [gnutls_ia_client_credentials_t, 
gnutls_ia_avp_func]
+-gnutls_ia_set_client_avp_function.restype = None
+-
+-gnutls_ia_set_client_avp_ptr = libgnutls_extra.gnutls_ia_set_client_avp_ptr
+-gnutls_ia_set_client_avp_ptr.argtypes = [gnutls_ia_client_credentials_t, 
c_void_p]
+-gnutls_ia_set_client_avp_ptr.restype = None
+-
+-gnutls_ia_set_server_avp_function = 
libgnutls_extra.gnutls_ia_set_server_avp_function
+-gnutls_ia_set_server_avp_function.argtypes = [gnutls_ia_server_credentials_t, 
gnutls_ia_avp_func]
+-gnutls_ia_set_server_avp_function.restype = None
+-
+-gnutls_ia_set_server_avp_ptr = libgnutls_extra.gnutls_ia_set_server_avp_ptr
+-gnutls_ia_set_server_avp_ptr.argtypes = [gnutls_ia_server_credentials_t, 
c_void_p]
+-gnutls_ia_set_server_avp_ptr.restype = None
+-
+-gnutls_ia_verify_endphase = libgnutls_extra.gnutls_ia_verify_endphase
+-gnutls_ia_verify_endphase.argtypes = [gnutls_session_t, c_char_p]
+-gnutls_ia_verify_endphase.restype = c_int
+-
+ gnutls_init = libgnutls.gnutls_init
+ gnutls_init.argtypes = [POINTER(gnutls_session_t), gnutls_connection_end_t]
+ gnutls_init.restype = c_int
+@@ -733,10 +633,6 @@
+ gnutls_psk_free_server_credentials.argtypes = 
[gnutls_psk_server_credentials_t]
+ gnutls_psk_free_server_credentials.restype = None
+ 
+-gnutls_psk_netconf_derive_key = libgnutls.gnutls_psk_netconf_derive_key
+-gnutls_psk_netconf_derive_key.argtypes = [c_char_p, c_char_p, c_char_p, 
POINTER(gnutls_datum_t)]
+-gnutls_psk_netconf_derive_key.restype = c_int
+-
+ gnutls_psk_server_get_username = libgnutls.gnutls_psk_server_get_username
+ gnutls_psk_server_get_username.argtypes = [gnutls_session_t]
+ gnutls_psk_server_get_username.restype = c_char_p
+@@ -857,10 +753,6 @@
+ gnutls_session_enable_compatibility_mode.argtypes = [gnutls_session_t]
+ gnutls_session_enable_compatibility_mode.restype = None
+ 
+-gnutls_session_get_client_random = libgnutls.gnutls_session_get_client_random
+-gnutls_session_get_client_random.argtypes = [gnutls_session_t]
+-gnutls_session_get_client_random.restype = c_void_p
+-
+ gnutls_session_get_data = libgnutls.gnutls_session_get_data
+ gnutls_session_get_data.argtypes = [gnutls_session_t, c_void_p, 
POINTER(size_t)]
+ gnutls_session_get_data.restype = c_int
+@@ -873,18 +765,10 @@
+ gnutls_session_get_id.argtypes = [gnutls_session_t, c_void_p, POINTER(size_t)]
+ gnutls_session_get_id.restype = c_int
+ 
+-gnutls_session_get_master_secret = libgnutls.gnutls_session_get_master_secret
+-gnutls_session_get_master_secret.argtypes = [gnutls_session_t]
+-gnutls_session_get_master_secret.restype = c_void_p
+-
+ gnutls_session_get_ptr = libgnutls.gnutls_session_get_ptr
+ gnutls_session_get_ptr.argtypes = [gnutls_session_t]
+ gnutls_session_get_ptr.restype = c_void_p
+ 
+-gnutls_session_get_server_random = libgnutls.gnutls_session_get_server_random
+-gnutls_session_get_server_random.argtypes = [gnutls_session_t]
+-gnutls_session_get_server_random.restype = c_void_p
+-
+ gnutls_session_is_resumed = libgnutls.gnutls_session_is_resumed
+ gnutls_session_is_resumed.argtypes = [gnutls_session_t]
+ gnutls_session_is_resumed.restype = c_int
+@@ -905,10 +789,6 @@
+ gnutls_set_default_priority.argtypes = [gnutls_session_t]
+ gnutls_set_default_priority.restype = c_int
+ 
+-gnutls_sign_algorithm_get_name = libgnutls.gnutls_sign_algorithm_get_name
+-gnutls_sign_algorithm_get_name.argtypes = [gnutls_sign_algorithm_t]
+-gnutls_sign_algorithm_get_name.restype = c_char_p
+-
+ gnutls_sign_callback_get = libgnutls.gnutls_sign_callback_get
+ gnutls_sign_callback_get.argtypes = [gnutls_session_t, POINTER(c_void_p)]
+ gnutls_sign_callback_get.restype = gnutls_sign_func
+@@ -937,14 +817,6 @@
+ gnutls_transport_set_errno.argtypes = [gnutls_session_t, c_int]
+ gnutls_transport_set_errno.restype = None
+ 
+-gnutls_transport_set_global_errno = 
libgnutls.gnutls_transport_set_global_errno
+-gnutls_transport_set_global_errno.argtypes = [c_int]
+-gnutls_transport_set_global_errno.restype = None
+-
+-gnutls_transport_set_lowat = libgnutls.gnutls_transport_set_lowat
+-gnutls_transport_set_lowat.argtypes = [gnutls_session_t, c_int]
+-gnutls_transport_set_lowat.restype = None
+-
+ gnutls_transport_set_ptr = libgnutls.gnutls_transport_set_ptr
+ gnutls_transport_set_ptr.argtypes = [gnutls_session_t, gnutls_transport_ptr_t]
+ gnutls_transport_set_ptr.restype = None
+@@ -1501,10 +1373,6 @@
+ gnutls_x509_privkey_sign_hash.argtypes = [gnutls_x509_privkey_t, 
POINTER(gnutls_datum_t), POINTER(gnutls_datum_t)]
+ gnutls_x509_privkey_sign_hash.restype = c_int
+ 
+-gnutls_x509_privkey_verify_data = libgnutls.gnutls_x509_privkey_verify_data
+-gnutls_x509_privkey_verify_data.argtypes = [gnutls_x509_privkey_t, c_uint, 
POINTER(gnutls_datum_t), POINTER(gnutls_datum_t)]
+-gnutls_x509_privkey_verify_data.restype = c_int
+-
+ gnutls_x509_rdn_get = libgnutls.gnutls_x509_rdn_get
+ gnutls_x509_rdn_get.argtypes = [POINTER(gnutls_datum_t), c_char_p, 
POINTER(size_t)]
+ gnutls_x509_rdn_get.restype = c_int

Added: libraryinit.patch
===================================================================
--- libraryinit.patch                           (rev 0)
+++ libraryinit.patch   2013-12-23 15:39:31 UTC (rev 102896)
@@ -0,0 +1,40 @@
+--- gnutls/library/__init__.py 2013-12-12 20:29:45.000000000 +0400
++++ gnutls.fixed/library/__init__.py   2013-12-17 20:56:48.637256402 +0400
+@@ -104,10 +104,11 @@
+         libgcrypt = load_library(name='gcrypt', version=11)
+         gcry_control = libgcrypt.gcry_control
+     else:
+-        gcry_control = libgnutls.gcry_control
++        libgcrypt = load_library(name='gcrypt', version=11)
++        gcry_control = libgcrypt.gcry_control
+ 
+     gcry_control(GCRYCTL_SET_THREAD_CBS, 
c_void_p(gcrypt_thread_callbacks_ptr))
+-    libgnutls.gcry_check_version('1.2.4')    # GNUTLS_MIN_LIBGCRYPT_VERSION
++    libgcrypt.gcry_check_version('1.2.4')    # GNUTLS_MIN_LIBGCRYPT_VERSION
+     if system == 'cygwin':
+         gcry_control(GCRYCTL_DISABLE_SECMEM, 0)
+     else:
+@@ -118,12 +119,10 @@
+ 
+ 
+ 
+-libgnutls = load_library(name='gnutls', version=26)
+-libgnutls_extra = load_library(name='gnutls-extra', version=26)
++libgnutls = load_library(name='gnutls', version=28)
+ 
+ initialize_gcrypt()
+ libgnutls.gnutls_global_init()
+-libgnutls_extra.gnutls_global_init_extra()
+ 
+ 
+ from gnutls.library import constants
+@@ -137,9 +136,6 @@
+ if functions.gnutls_check_version(__need_version__) is None:
+     version = functions.gnutls_check_version(None)
+     raise RuntimeError("Found GNUTLS library version %s, but at least version 
%s is required" % (version, __need_version__))
+-if functions.gnutls_extra_check_version(__need_version__) is None:
+-    version = functions.gnutls_extra_check_version(None)
+-    raise RuntimeError("Found GNUTLS extra library version %s, but at least 
version %s is required" % (version, __need_version__))
+ 
+ 
+ del get_system_name, library_locations, load_library, initialize_gcrypt

Reply via email to