Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions getCertChain.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -15,7 +15,7 @@
import glob
import re

scriptVersion = "0.01"
scriptVersion = "0.02"
maxDepth = 4
certChain = []

Expand Down Expand Up @@ -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)
Expand Down