How to extract the private key of SSL Certificate using API call.
search cancel

How to extract the private key of SSL Certificate using API call.

book

Article ID: 382397

calendar_today

Updated On:

Products

VMware Avi Load Balancer

Issue/Introduction

How to extract the private key of SSL Certificate using API call.

Resolution

This API call will export the private key:

https://<controller-ip>/api/sslkeyandcertificate/sslkeyandcertificate-f578fc3c-f059-4743-9b77-65d5421a2ba9?export_key=True

Note: First get the SSL Cert UUID from CLI.

Login to Controller shell and execute this command:

[admin:]: > show sslkeyandcertificate  <name of SSL cert> | grep -C 1 uuid
+-----------------------------------+----------------------------------------------------------------------------------+
| uuid                              | sslkeyandcertificate-f578fc3c-f059-4743-9b77-65d5421a2ba9                        |
| name                              | AppCert