From 89218f6b2ff3461350ca586163456767776686ac Mon Sep 17 00:00:00 2001 From: Git Date: Mon, 20 Mar 2023 17:05:35 -0700 Subject: [PATCH] Version 0.02. See CHANGELOG.md --- CHANGELOG.md | 4 ++++ README.md | 2 +- getCertChain.py | 10 +++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17bee13..7970d3c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 2023-03-20 +## Version 0.02 +* Fixing bug [deprecation warning](https://github.com/TheScriptGuy/getCertificateChain/issues/1) + # 2023-03-12 ## Version 0.01 * First release. diff --git a/README.md b/README.md index 0b350c2..e7f96dc 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ To get the arguments available `python3 getCertChain.py --help`. Should present $ python3 getCertChain.py --help usage: getCertChain.py [-h] [--hostname HOSTNAME] [--removeCertificateFiles] [--getCAcertPEM] -Get Certificate Chain v0.01 +Get Certificate Chain v0.02 optional arguments: -h, --help show this help message and exit diff --git a/getCertChain.py b/getCertChain.py index 48dcb2c..52deff5 100644 --- a/getCertChain.py +++ b/getCertChain.py @@ -1,7 +1,7 @@ # Description: Get the certificate chain from a website. # Author: TheScriptGuy -# Last modified: 2023-03-11 -# Version: 0.01 +# Last modified: 2023-03-20 +# Version: 0.02 import ssl from cryptography import x509 @@ -15,7 +15,7 @@ import glob import re -scriptVersion = "0.01" +scriptVersion = "0.02" maxDepth = 4 certChain = [] @@ -135,8 +135,8 @@ def getCertificate(__hostname, __port): # Create the SSL connection sslConnection = ssl.create_connection((__hostname, __port)) - # Create teh SSL context - sslContext = ssl.SSLContext() + # Create the SSL context + sslContext = ssl.SSLContext(ssl.PROTOCOL_TLS) # Create the SSL socket within the sslConnection sslSocket = sslContext.wrap_socket(sslConnection, server_hostname=__hostname)