Exporting SSL Cert | Nutanix Community
Skip to main content
Solved

Exporting SSL Cert

  • September 25, 2017
  • 5 replies
  • 2432 views

Forum|alt.badge.img+7
Hi All,

i need to export the *.nutanix.local cert in a text format, does anyone have the commands to do this?

Best answer by levtech1

Hi Angelo,

thank you for the reply back but that didnt work, i found the solution by doing the below from any CVM:

python
import sslprint ssl.get_server_certificate(('PrismVIP', 9440), ssl_version=ssl.PROTOCOL_TLSv1)
View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

5 replies

aluciani
Forum|alt.badge.img+34
  • Chevalier
  • 348 replies
  • September 28, 2017
Hi levtech1

Does this help -- if you just save it from the browser, you can open the file with notepad

Let me know, Thanks

Forum|alt.badge.img+7
  • Author
  • Voyager
  • 2 replies
  • Answer
  • September 28, 2017
Hi Angelo,

thank you for the reply back but that didnt work, i found the solution by doing the below from any CVM:

python
import sslprint ssl.get_server_certificate(('PrismVIP', 9440), ssl_version=ssl.PROTOCOL_TLSv1)

Forum|alt.badge.img+2

Just as a quick heads up to anyone else that finds this, as of writing this reply the above command doesn’t work. I get a syntax error:

>>> import sslprint ssl.get_server_certificate(('PrismVIP',9440),ssl_version=ssl.PROTOCOL_TLSv1)
  File "<stdin>", line 1
    import sslprint ssl.get_server_certificate(('PrismVIP',9440),ssl_version=ssl.PROTOCOL_TLSv1)
                      ^
SyntaxError: invalid syntax

I’m not sure how to solve the  problem, I just wanted to let others know that this solution no longer is valid.


UPX
Forum|alt.badge.img+4
  • Outrider
  • 74 replies
  • December 21, 2020

Hi Martin Edelius

try changing PROTOCOL_TLSv1 to PROTOCOL_TLSv1_2

Let me know


  • Voyager
  • 1 reply
  • May 10, 2021

What you are missing is the import ssl library before  running the import sslprint. The steps would be - 

  1. Log on to one of the CVMs (Controller VMs) in the cluster with SSH.
  2. Get the virtual IP address of the cluster.
  3. Enter into the Python prompt.
  4. Import SSL library.

>>> import ssl

  1. Print the SSL certificate.

 

>>> print ssl.get_server_certificate(('cluster-VIP',9440),ssl_version=ssl.PROTOCOL_TLSv1_2)