@@ -1746,28 +1746,68 @@ void outputCipher(struct sslCheckOptions *options, SSL *ssl, const char *cleanSs
1746
1746
1747
1747
printf_xml (" bits=\"%d\" cipher=\"%s\" id=\"%s\"" , cipherbits , ciphername , hexCipherId );
1748
1748
if (strstr (ciphername , "NULL" )) {
1749
- printf ("%s%-45s%s" , COL_RED_BG , ciphername , RESET );
1749
+ if (options -> ianaNames ) {
1750
+ printf ("%s%-45s%s" , COL_RED_BG , ciphername , RESET );
1751
+ }
1752
+ else {
1753
+ printf ("%s%-29s%s" , COL_RED_BG , ciphername , RESET );
1754
+ }
1750
1755
strength = "null" ;
1751
1756
} else if (strstr (ciphername , "ADH" ) || strstr (ciphername , "AECDH" ) || strstr (ciphername , "_anon_" )) {
1752
- printf ("%s%-45s%s" , COL_PURPLE , ciphername , RESET );
1757
+ if (options -> ianaNames ) {
1758
+ printf ("%s%-45s%s" , COL_PURPLE , ciphername , RESET );
1759
+ }
1760
+ else {
1761
+ printf ("%s%-29s%s" , COL_PURPLE , ciphername , RESET );
1762
+ }
1753
1763
strength = "anonymous" ;
1754
1764
} else if (strstr (ciphername , "EXP" )) {
1755
- printf ("%s%-45s%s" , COL_RED , ciphername , RESET );
1765
+ if (options -> ianaNames ) {
1766
+ printf ("%s%-45s%s" , COL_RED , ciphername , RESET );
1767
+ }
1768
+ else {
1769
+ printf ("%s%-29s%s" , COL_RED , ciphername , RESET );
1770
+ }
1756
1771
strength = "weak" ;
1757
1772
} else if (strstr (ciphername , "RC4" ) || strstr (ciphername , "DES" )) {
1758
- printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1773
+ if (options -> ianaNames ) {
1774
+ printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1775
+ }
1776
+ else {
1777
+ printf ("%s%-29s%s" , COL_YELLOW , ciphername , RESET );
1778
+ }
1759
1779
strength = "medium" ;
1760
1780
} else if (strstr (ciphername , "_SM4_" )) { /* Developed by Chinese government */
1761
- printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1781
+ if (options -> ianaNames ) {
1782
+ printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1783
+ }
1784
+ else {
1785
+ printf ("%s%-29s%s" , COL_YELLOW , ciphername , RESET );
1786
+ }
1762
1787
strength = "medium" ;
1763
1788
} else if (strstr (ciphername , "_GOSTR341112_" )) { /* Developed by Russian government */
1764
- printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1789
+ if (options -> ianaNames ) {
1790
+ printf ("%s%-45s%s" , COL_YELLOW , ciphername , RESET );
1791
+ }
1792
+ else {
1793
+ printf ("%s%-29s%s" , COL_YELLOW , ciphername , RESET );
1794
+ }
1765
1795
strength = "medium" ;
1766
1796
} else if ((strstr (ciphername , "CHACHA20" ) || (strstr (ciphername , "GCM" ))) && strstr (ciphername , "DHE" )) {
1767
- printf ("%s%-45s%s" , COL_GREEN , ciphername , RESET );
1797
+ if (options -> ianaNames ) {
1798
+ printf ("%s%-45s%s" , COL_GREEN , ciphername , RESET );
1799
+ }
1800
+ else {
1801
+ printf ("%s%-29s%s" , COL_GREEN , ciphername , RESET );
1802
+ }
1768
1803
strength = "strong" ;
1769
1804
} else {
1770
- printf ("%-45s" , ciphername );
1805
+ if (options -> ianaNames ) {
1806
+ printf ("%-45s" , ciphername );
1807
+ }
1808
+ else {
1809
+ printf ("%-29s" , ciphername );
1810
+ }
1771
1811
strength = "acceptable" ;
1772
1812
}
1773
1813
printf_xml (" strength=\"%s\"" , strength );
@@ -1848,7 +1888,7 @@ int testCipher(struct sslCheckOptions *options, const SSL_METHOD *sslMethod)
1848
1888
cipherid = SSL_CIPHER_get_id (sslCipherPointer );
1849
1889
cipherid = cipherid & 0x00ffffff ; // remove first byte which is the version (0x03 for TLSv1/SSLv3)
1850
1890
1851
- if (options -> rfcNames )
1891
+ if (options -> ianaNames )
1852
1892
{
1853
1893
ciphername = SSL_CIPHER_standard_name (sslCipherPointer );
1854
1894
}
@@ -3930,9 +3970,9 @@ int main(int argc, char *argv[])
3930
3970
else if (strcmp ("--show-sigs" , argv [argLoop ]) == 0 )
3931
3971
options -> signature_algorithms = true;
3932
3972
3933
- // Show RFC algorithms names in output
3934
- else if (strcmp ("--show-rfc -names" , argv [argLoop ]) == 0 )
3935
- options -> rfcNames = true;
3973
+ // Show IANA/ RFC cipher names in output
3974
+ else if (strcmp ("--iana -names" , argv [argLoop ]) == 0 )
3975
+ options -> ianaNames = true;
3936
3976
3937
3977
// StartTLS... FTP
3938
3978
else if (strcmp ("--starttls-ftp" , argv [argLoop ]) == 0 )
@@ -4197,7 +4237,6 @@ int main(int argc, char *argv[])
4197
4237
printf ("\n" );
4198
4238
printf (" %s--show-certificate%s Show full certificate information\n" , COL_GREEN , RESET );
4199
4239
printf (" %s--show-client-cas%s Show trusted CAs for TLS client auth\n" , COL_GREEN , RESET );
4200
- printf (" %s--show-rfc-names%s Show RFC cipher names instead of OpenSSL\n" , COL_GREEN , RESET );
4201
4240
printf (" %s--no-check-certificate%s Don't warn about weak certificate algorithm or keys\n" , COL_GREEN , RESET );
4202
4241
printf (" %s--ocsp%s Request OCSP response from server\n" , COL_GREEN , RESET );
4203
4242
printf (" %s--pk=<file>%s A file containing the private key or a PKCS#12 file\n" , COL_GREEN , RESET );
@@ -4216,6 +4255,7 @@ int main(int argc, char *argv[])
4216
4255
printf (" %s--tlsall%s Only check TLS ciphers (all versions)\n" , COL_GREEN , RESET );
4217
4256
printf (" %s--show-ciphers%s Show supported client ciphers\n" , COL_GREEN , RESET );
4218
4257
printf (" %s--show-cipher-ids%s Show cipher ids\n" , COL_GREEN , RESET );
4258
+ printf (" %s--iana-names%s Use IANA/RFC cipher names rather than OpenSSL ones\n" , COL_GREEN , RESET );
4219
4259
printf (" %s--show-times%s Show handhake times in milliseconds\n" , COL_GREEN , RESET );
4220
4260
printf ("\n" );
4221
4261
#if OPENSSL_VERSION_NUMBER >= 0x10002000L
0 commit comments