From 65db8c39dd57e691c89b491afb6aa22f6bc05eff Mon Sep 17 00:00:00 2001 From: "bear (Mike Taylor)" Date: Sat, 2 Sep 2017 13:51:42 -0400 Subject: [PATCH 1/3] Remove two-digit-year variants from certificate validity date decoding. Fixes Issue #461 --- sleekxmpp/xmlstream/cert.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/sleekxmpp/xmlstream/cert.py b/sleekxmpp/xmlstream/cert.py index d357b326c..ae82cac83 100644 --- a/sleekxmpp/xmlstream/cert.py +++ b/sleekxmpp/xmlstream/cert.py @@ -108,19 +108,11 @@ def extract_dates(raw_cert): not_before = validity.getComponentByName('notBefore') not_before = str(not_before.getComponent()) + not_before = datetime.strptime(not_before, '%Y%m%d%H%M%SZ') not_after = validity.getComponentByName('notAfter') not_after = str(not_after.getComponent()) - - if isinstance(not_before, GeneralizedTime): - not_before = datetime.strptime(not_before, '%Y%m%d%H%M%SZ') - else: - not_before = datetime.strptime(not_before, '%y%m%d%H%M%SZ') - - if isinstance(not_after, GeneralizedTime): - not_after = datetime.strptime(not_after, '%Y%m%d%H%M%SZ') - else: - not_after = datetime.strptime(not_after, '%y%m%d%H%M%SZ') + not_after = datetime.strptime(not_after, '%Y%m%d%H%M%SZ') return not_before, not_after From d88f186a4e009e0bf26e222111073f08da8c2921 Mon Sep 17 00:00:00 2001 From: "bear (Mike Taylor)" Date: Sat, 2 Sep 2017 14:07:33 -0400 Subject: [PATCH 2/3] set version to 1.3.3 --- sleekxmpp/version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleekxmpp/version.py b/sleekxmpp/version.py index 396566df9..dc77888ae 100644 --- a/sleekxmpp/version.py +++ b/sleekxmpp/version.py @@ -9,5 +9,5 @@ # We don't want to have to import the entire library # just to get the version info for setup.py -__version__ = '1.3.2' -__version_info__ = (1, 3, 2, '', 0) +__version__ = '1.3.3' +__version_info__ = (1, 3, 3, '', 0) From bad317f0a0d7db648e89773296fc44f451e22030 Mon Sep 17 00:00:00 2001 From: "bear (Mike Taylor)" Date: Sat, 2 Sep 2017 14:22:49 -0400 Subject: [PATCH 3/3] fix author email, PyPI is now rejecting it --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 1cd245aa7..e6b99194b 100755 --- a/setup.py +++ b/setup.py @@ -148,7 +148,7 @@ description = DESCRIPTION, long_description = LONG_DESCRIPTION, author = 'Nathanael Fritz', - author_email = 'fritzy [at] netflint.net', + author_email = 'fritzy@netflint.net', url = 'http://github.com/fritzy/SleekXMPP', license = 'MIT', platforms = [ 'any' ],