99
1010
1111def GetCert (SiteName , Port ):
12- '''Connect to the specified host and get the certificate file'''
12+ """
13+ Connect to the specified host and get the certificate file
14+ """
1315 Client = socket .socket ()
1416 Client .settimeout (None )
1517 try :
@@ -51,7 +53,9 @@ def GetCertFile(FileName):
5153
5254
5355def ParseCert (CertRaw ):
54- '''Parse the available data from the certificate file'''
56+ """
57+ Parse the available data from the certificate file
58+ """
5559 Cert = OpenSSL .crypto .load_certificate (
5660 OpenSSL .crypto .FILETYPE_PEM , CertRaw )
5761
@@ -73,7 +77,9 @@ def ParseCert(CertRaw):
7377
7478
7579def ParseCertExtension (CertRaw ):
76- '''Parse the available extension data from the certificate file'''
80+ """
81+ Parse the available extension data from the certificate file
82+ """
7783 Cert = OpenSSL .crypto .load_certificate (
7884 OpenSSL .crypto .FILETYPE_PEM , CertRaw )
7985
@@ -95,7 +101,9 @@ def ParseCertExtension(CertRaw):
95101
96102
97103def PrintOutData (* args ):
98- '''Print out the results of ParseCert() function'''
104+ """
105+ Print out the results of ParseCert() function
106+ """
99107 if len (args ) == 1 :
100108 FileName = args [0 ]
101109 CertRaw = GetCertFile (FileName )
@@ -123,7 +131,9 @@ def PrintOutData(*args):
123131
124132
125133def PrintOutExtData (* args ):
126- '''Print out the results of ParseCertExtension() function'''
134+ """
135+ Print out the results of ParseCertExtension() function
136+ """
127137 if len (args ) == 1 :
128138 FileName = args [0 ]
129139 CertRaw = GetCertFile (FileName )
@@ -139,7 +149,9 @@ def PrintOutExtData(*args):
139149
140150
141151def PrintOutDataTerse (* args ):
142- '''Print out the results of ParseCert() function'''
152+ """
153+ Print out the results of ParseCert() function
154+ """
143155 if len (args ) == 1 :
144156 FileName = args [0 ]
145157 CertRaw = GetCertFile (FileName )
0 commit comments