diff options
author | k clair <kclair@riseup.net> | 2012-10-09 12:17:28 -0700 |
---|---|---|
committer | k clair <kclair@riseup.net> | 2012-10-09 12:17:28 -0700 |
commit | fe02e8d334630b111d9eaad8f11877557784398d (patch) | |
tree | 1ac411b4bff10c47fd046de8928681957674353c /python-gnutls-1.1.9/examples/client.py | |
parent | 115994cef3e454c2a197a28e02b19bf343aafc16 (diff) |
remove unused directory python-gnutls-1.1.9
Diffstat (limited to 'python-gnutls-1.1.9/examples/client.py')
-rwxr-xr-x | python-gnutls-1.1.9/examples/client.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/python-gnutls-1.1.9/examples/client.py b/python-gnutls-1.1.9/examples/client.py deleted file mode 100755 index c6e4208..0000000 --- a/python-gnutls-1.1.9/examples/client.py +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env python - -"""Synchronous client using python-gnutls""" - -import sys -import os -import socket - -from gnutls.crypto import * -from gnutls.connection import * - -script_path = os.path.realpath(os.path.dirname(sys.argv[0])) -certs_path = os.path.join(script_path, 'certs') - -cert = X509Certificate(open(certs_path + '/valid.crt').read()) -key = X509PrivateKey(open(certs_path + '/valid.key').read()) -ca = X509Certificate(open(certs_path + '/ca.pem').read()) -crl = X509CRL(open(certs_path + '/crl.pem').read()) -cred = X509Credentials(cert, key) - -sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) -session = ClientSession(sock, cred) - -session.connect(('localhost', 10000)) -session.handshake() -session.send("test\r\n") -buf = session.recv(1024) -print 'Received: ', buf.rstrip() -session.bye() -session.shutdown() -session.close() - |