Пример #1
0
 def handshake_callback(self, sock):
     """Verify callback. If we get here then the certificate is ok.
     """
     channel = sock.get_ssl_channel_info()
     suite = ssl.get_cipher_suite_info(channel.cipher_suite)
     self.log.debug("handshake complete, peer = %s", sock.get_peer_name())
     self.log.debug('Protocol: %s' % channel.protocol_version_str.upper())
     self.log.debug('Cipher: %s' % suite.cipher_suite_name)
Пример #2
0
 def handshake_callback(self, sock):
     """
     Verify callback. If we get here then the certificate is ok.
     """
     channel = sock.get_ssl_channel_info()
     suite = ssl.get_cipher_suite_info(channel.cipher_suite)
     root_logger.debug("handshake complete, peer = %s", sock.get_peer_name())
     root_logger.debug('Protocol: %s' % channel.protocol_version_str.upper())
     root_logger.debug('Cipher: %s' % suite.cipher_suite_name)
Пример #3
0
def handshake_callback(sock):

    print("handshake complete, peer = %s, negotiated host = %s" %
          (sock.get_peer_name(), sock.get_negotiated_host()))
    print("Connection Info:")
    print(sock.connection_info_str())
    print()

    channel = sock.get_ssl_channel_info()
    print_channel_info(channel)
    print()

    suite = ssl.get_cipher_suite_info(channel.cipher_suite)
    print_suite_info(suite)
Пример #4
0
    port=443,
    enumerate_cipher_suites=True,
    ssl_connect=True,
    use_properties=False,
)

options = parser.parse_args()

# Perform basic configuration and setup
try:
    nss.nss_init(options.db_name)
    ssl.set_domestic_policy()

except Exception as e:
    print(str(e), file=sys.stderr)
    sys.exit(1)

if options.enumerate_cipher_suites:
    suite_info = ssl.get_cipher_suite_info(ssl.ssl_implemented_ciphers[0])

    print("There are %d implemented ciphers" %
          (len(ssl.ssl_implemented_ciphers)))

    for cipher in ssl.ssl_implemented_ciphers:
        suite_info = ssl.get_cipher_suite_info(cipher)
        print(suite_info)
        print()

if options.ssl_connect:
    ssl_connect()