Policy >
Infra
>
Sites
Returns the certificate of the listener
Connects to the given IP and port, and, if an SSL listener is present, returns
the certificate of the listener.
Intent of this API is "Do you trust this certificate?".
Request:
Method:
GET
URI Path(s):
/policy/api/v1/infra/sites/listener_certificate
/policy/api/v1/global-infra/sites/listener_certificate
Request Headers:
n/a
Query Parameters:
TlsListenerEndpointAddressRequestParameters
+
TlsListenerEndpointAddressRequestParameters
(
schema
)
Name
Description
Type
Notes
address
Host name or IP address of TLS listener
Host name or IP address of TLS listener.
string
Required
port
TCP port number of the TLS listener
TCP port number of the TLS listener
int
Required
Minimum: 0
Maximum: 65535
Request Body:
n/a
Example Request:
POST https://<policy-mgr>/global-policy/api/v1/infra/sites/listener_certificate?address=10.22.122.7&port=443
Successful Response:
Response Code:
200 OK
Response Headers:
Content-type: application/json
Response Body:
TlsListenerCertificate
+
TlsListenerCertificate
(
schema
)
Name
Description
Type
Notes
certificate
The certificate of the TLS listener
The certificate of the TLS listener.
X509Certificate
Readonly
result
Result of get certificate operation
Result of get certificate operation.
string
Enum: SUCCESS, CONNECTION_TIMEOUT, NO_ROUTE_TO_HOST, CONNECTION_REFUSED
thumbprint
The SHA-256 thumbprint of the TLS listener
The SHA-256 thumbprint of the TLS listener.
string
Readonly
Example Response:
{ "result": "SUCCESS", "certificate": { "issuer_cn": "vSM Test Certificate", "public_key_length": 1024, "signature": "4e cf ff 36 ac a1", "not_before": 1323772715000, "subject": "1.2.840.113549.1.9.1=#16076140622e636f6d,CN=vSM Test Certificate,OU=vShield,O=VMware,L=Pune,ST=Maharashtra,C=IN", "serial_number": "ca55f5e21a0b2dd2", "public_key_algo": "RSA", "version": "1", "issuer": "1.2.840.113549.1.9.1=#16076140622e636f6d,CN=vSM Test Certificate,OU=vShield,O=VMware,L=Pune,ST=Maharashtra,C=IN", "is_ca": false, "subject_cn": "vSM Test Certificate", "not_after": 1355308715000, "is_valid": false, "rsa_public_key_exponent": "10001", "signature_algorithm": "SHA1WITHRSA", "rsa_public_key_modulus": "00 b7 8f 79 e4" }, "thumbprint": "f53d7052535613b3032a41d555631228cb4d0d8b584a8225b94fbf0ba83eb9a4" }
Required Permissions:
read
Feature:
site_admin
Additional Errors:
301 Moved Permanently
307 Temporary Redirect
400 Bad Request
403 Forbidden
409 Conflict
500 Internal Server Error
503 Service Unavailable