Search in sources :

Example 1 with TppSshCertRequestResponse

use of com.venafi.vcert.sdk.connectors.tpp.endpoint.ssh.TppSshCertRequestResponse in project vcert-java by Venafi.

the class AbstractTppConnector method requestTppSshCertificate.

protected TppSshCertRequestResponse requestTppSshCertificate(SshCertificateRequest sshCertificateRequest) throws VCertException {
    TppSshCertRequest tppSshCertRequest = TppConnectorUtils.convertToTppSshCertReq(sshCertificateRequest);
    TppSshCertRequestResponse requestResponse;
    try {
        requestResponse = tppAPI.requestSshCertificate(tppSshCertRequest);
    } catch (Exception e) {
        throw new VCertException(e);
    }
    if (!requestResponse.response().success())
        throw new RequestCertificateException(requestResponse.response().errorCode(), requestResponse.response().errorMessage());
    return requestResponse;
}
Also used : TppSshCertRequestResponse(com.venafi.vcert.sdk.connectors.tpp.endpoint.ssh.TppSshCertRequestResponse) VCertException(com.venafi.vcert.sdk.VCertException) TppSshCertRequest(com.venafi.vcert.sdk.connectors.tpp.endpoint.ssh.TppSshCertRequest) VCertException(com.venafi.vcert.sdk.VCertException) ConnectorException(com.venafi.vcert.sdk.connectors.ConnectorException)

Aggregations

VCertException (com.venafi.vcert.sdk.VCertException)1 ConnectorException (com.venafi.vcert.sdk.connectors.ConnectorException)1 TppSshCertRequest (com.venafi.vcert.sdk.connectors.tpp.endpoint.ssh.TppSshCertRequest)1 TppSshCertRequestResponse (com.venafi.vcert.sdk.connectors.tpp.endpoint.ssh.TppSshCertRequestResponse)1