68
62
print('The rabbitmq-server is running on %s' % server_address)
70
64
###############################################################################
72
66
###############################################################################
73
67
# Get the port for ssl_port instance.
74
68
server_port = rabbitmq_configuration['ssl_port']
79
70
print('Testing ssl connection to rabbitmq-server.')
81
72
# Create a normal socket.
82
73
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
83
74
# Require a certificate from the server, since a self-signed certificate
84
75
# was used, the ca_certs must be the server certificate file itself.
86
77
cert_reqs=ssl.CERT_REQUIRED)
87
78
# Connect to the rabbitmq server using ssl.
88
79
ssl_sock.connect((server_address, server_port))