---
docs/schema.sql | 2 ++
koji/__init__.py | 14 +++++++++-----
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/schema.sql b/docs/schema.sql
index 1212a94..d8ce975 100644
--- a/docs/schema.sql
+++ b/docs/schema.sql
@@ -819,6 +819,8 @@ insert into archivetypes (name, description, extensions) values ('json', 'JSON d
insert into archivetypes (name, description, extensions) values ('key', 'Key file', 'key');
insert into archivetypes (name, description, extensions) values ('dot', 'DOT graph description', 'dot gv');
insert into archivetypes (name, description, extensions) values ('groovy', 'Groovy script file', 'groovy gvy');
+insert into archivetypes (name, description, extensions) values ('batch', 'Batch file', 'bat');
+insert into archivetypes (name, description, extensions) values ('shell', 'Shell script', 'sh');
-- Do we want to enforce a constraint that a build can only generate one
diff --git a/koji/__init__.py b/koji/__init__.py
index 8e297dc..82dbd05 100644
--- a/koji/__init__.py
+++ b/koji/__init__.py
@@ -44,7 +44,8 @@ import rpm
import shutil
import signal
import socket
-import ssl.SSLCommon
+import koji.ssl.SSLCommon
+import ssl
import struct
import tempfile
import time
@@ -1608,12 +1609,15 @@ class ClientSession(object):
self._path = uri[2]
default_port = 80
if self.opts.get('certs'):
- ctx = ssl.SSLCommon.CreateSSLContext(self.opts['certs'])
+ ctx = koji.ssl.SSLCommon.CreateSSLContext(self.opts['certs'])
cnxOpts = {'ssl_context' : ctx}
- cnxClass = ssl.SSLCommon.PlgHTTPSConnection
+ cnxClass = koji.ssl.SSLCommon.PlgHTTPSConnection
default_port = 443
elif scheme == 'https':
cnxOpts = {}
+ if sys.version_info[:3] >= (2, 7, 9):
+ ctx = ssl.SSLContext()
+ cnxOpts['ssl_context'] = ctx
cnxClass = httplib.HTTPSConnection
default_port = 443
elif scheme == 'http':
@@ -1748,13 +1752,13 @@ class ClientSession(object):
certs['ca_cert'] = ca
certs['peer_ca_cert'] = serverca
- ctx = ssl.SSLCommon.CreateSSLContext(certs)
+ ctx = koji.ssl.SSLCommon.CreateSSLContext(certs)
self._cnxOpts = {'ssl_context' : ctx}
# 60 second timeout during login
old_timeout = self._cnxOpts.get('timeout')
self._cnxOpts['timeout'] = 60
try:
- self._cnxClass = ssl.SSLCommon.PlgHTTPSConnection
+ self._cnxClass = koji.ssl.SSLCommon.PlgHTTPSConnection
if self._port == 80 and not self.explicit_port:
self._port = 443
sinfo = self.callMethod('sslLogin', proxyuser)
--
2.4.3