Commit graph

26 commits

Author SHA1 Message Date
Tomas Kopecek
d6a5cdf987 python-modernize -f lib2to3.fixes.fix_except . -w 2017-10-31 16:05:16 +01:00
Tomas Kopecek
70224c42c1 remove obsoleted StandardError 2017-03-17 11:35:53 -04:00
Tomas Kopecek
1494301465 use new exception syntax 2017-03-02 10:52:30 -05:00
Tomas Kopecek
c143d0b88f print statement -> print function 2017-02-28 10:55:56 -05:00
Mike McLean
9af4c393f5 move is_cert_error(); require python-requests 2016-11-22 16:41:31 -05:00
Mike McLean
a1c8808544 ImportErrors are uncovered 2016-10-25 17:16:12 -04:00
Tomas Kopecek
c37effcbd7 remove unused variables/methods 2016-10-04 15:48:54 +02:00
Tomas Kopecek
921258749a removed unused imports 2016-10-04 15:48:54 +02:00
Mohan Boddu
dd82e9cea2 Remove all bad-whitespaces
Signed-off-by: Mohan Boddu <mboddu@redhat.com>
2016-08-29 14:26:32 -04:00
Mike McLean
33cf1ab6f2 avoid masking exceptions in retry code 2016-01-05 17:56:40 -05:00
Mike McLean
7e56b133a0 handle Unexpected EOF exceptions on reads 2016-01-05 17:56:40 -05:00
Mike McLean
cdf8c2497d fix using https url with non-ssl auth in python 2.7.9+
In python 2.7.9, a context option was added to httplib.HTTPSConnection and
changed its behavior to performs certificate and hostname checks by default.

While this is definitely an improvement, we were relying on the old behavior.
This change restores that (until we can switch to proper verification).
2015-12-11 16:39:14 -05:00
Mike McLean
9453272a50 remove additional dead ssl code
I've been meaning to do this for a while. No part of Koji uses the
removed code anymore (some of it was never used by Koji)
2015-12-11 16:34:44 -05:00
Till Maas
ffcf1a30eb Remove dead client CA code
The client CA is only needed to for authentication on the server side,
not for authentication on the client side. Therefore remove it from all
client login code.
2015-12-10 18:51:10 -05:00
Till Maas
3a13307598 Increase default SSL timeout to 600
60 is not enough to process a full release like Rawhide and last I
checked the code to use a different timeout than the default timeout
does not work. Therefore use a working default value.

Signed-off-by: Till Maas <opensource@till.name>
2015-11-27 18:39:13 +01:00
Pavol Babincak
9e89ebb9a4 Ran reindent.py from cpython tools on all python scripts
Citing from reindent docs:

    Change Python (.py) files to use 4-space indents and no hard tab
    characters. Also trim excess spaces and tabs from ends of lines, and
    remove empty lines at the end of files.  Also ensure the last line
    ends with a newline.

Citing from PEP 8:

    Use 4 spaces per indentation level.

    Python 2 code indented with a mixture of tabs and spaces should be
    converted to using spaces exclusively.

    Don't write string literals that rely on significant trailing
    whitespace. Such trailing whitespace is visually indistinguishable
    and some editors (or more recently, reindent.py) will trim them.

Also PyLint recommends not to have trailing whitespace on any line.
2015-05-13 16:39:53 -04:00
Dennis Gilmore
5b5b7d95ea ssl: use the best possible connection method.
tell pyOpenSSL to use the best possible connection method,
disable SSLv2 and SSLv3

Signed-off-by: Dennis Gilmore <dennis@ausil.us>
2015-01-23 16:11:22 -06:00
Mike McLean
07d1eb8109 use TLSv1. https://bugzilla.redhat.com/show_bug.cgi?id=1152823 2014-10-16 14:53:14 -04:00
Dennis Gilmore
582a0679e7 change default ssl timeout to 60 seconds 2013-03-06 12:41:47 -06:00
Mike McLean
a87e1f2c5a cleanup debug output 2012-11-06 20:42:56 -05:00
Mike McLean
9e9549d994 new "fast upload" mechanism 2012-11-06 14:39:49 -05:00
Dennis Gilmore
5534ec370c remove shebang SSLConnection.py is not a standalone script
bugzilla #529250
2012-08-16 20:01:44 -05:00
Mike McLean
7876bc06fe fix ssl connections for python 2.7 (rhbz#619276)
(without breaking earlier python versions)
2010-12-08 14:57:07 -05:00
Mike Bonnet
3632182163 package up the files in koji/ssl as well 2007-03-20 16:59:58 -04:00
Michael Bonnet
20ca1a8f84 - don't try to guess what kind of authentication we want to use in ClientSession.login() - allow clients to call login() (for user/password), krb_login() (for Kerberos), or ssl_login() (for client certificates)
- update all clients to call ssl_login() directly when appropriate
- rename references to NotAllowed -> ActionNotAllowed, because NotAllowed had already been renamed
- raise an error in CreateSSLContext instead of immediately exiting
2007-03-16 21:39:02 -04:00
Michael Bonnet
95db5c1f63 enable authentication from the cli via SSL client certificates 2007-03-16 21:39:01 -04:00