This repository was archived by the owner on Jun 5, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
src/main/java/com/venafi/vcert/sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -438,5 +438,14 @@ public PickupIdOrThumbprintNotSetToGetCertIdException() {
438438 + "in the CertificateRequest to determine the certificate Id." );
439439 }
440440 }
441+
442+ public static class ClientIdentifierException extends ConnectorException {
443+
444+ private static final long serialVersionUID = 1L ;
445+
446+ public ClientIdentifierException (Exception e ) {
447+ super ("It wasn't possible to determine the Client Identifier" , e );
448+ }
449+ }
441450
442451}
Original file line number Diff line number Diff line change @@ -397,7 +397,6 @@ private PEMCollection retrieveCertificateAsPemCollectionFromCSRProvided(Certific
397397 try {
398398 TimeUnit .SECONDS .sleep (2 );
399399 } catch (InterruptedException e ) {
400- e .printStackTrace ();
401400 throw new AttemptToRetryException (e );
402401 }
403402 }
Original file line number Diff line number Diff line change @@ -172,7 +172,6 @@ protected SshCertRetrieveDetails retrieveTppSshCertificate(SshCertificateRequest
172172 try {
173173 TimeUnit .SECONDS .sleep (2 );
174174 } catch (InterruptedException e ) {
175- e .printStackTrace ();
176175 throw new AttemptToRetryException (e );
177176 }
178177 }
Original file line number Diff line number Diff line change @@ -345,7 +345,6 @@ public PEMCollection retrieveCertificate(CertificateRequest request) throws VCer
345345 try {
346346 TimeUnit .SECONDS .sleep (2 );
347347 } catch (InterruptedException e ) {
348- e .printStackTrace ();
349348 throw new AttemptToRetryException (e );
350349 }
351350 }
Original file line number Diff line number Diff line change @@ -410,7 +410,6 @@ public PEMCollection retrieveCertificate(CertificateRequest request) throws VCer
410410 try {
411411 TimeUnit .SECONDS .sleep (2 );
412412 } catch (InterruptedException e ) {
413- e .printStackTrace ();
414413 throw new AttemptToRetryException (e );
415414 }
416415 }
Original file line number Diff line number Diff line change 1212import com .venafi .vcert .sdk .certificate .CertificateRequest ;
1313import com .venafi .vcert .sdk .connectors .tpp .AbstractTppConnector .CertificateRequestsPayload ;
1414import com .venafi .vcert .sdk .connectors .tpp .AbstractTppConnector .NameValuePair ;
15+ import com .venafi .vcert .sdk .connectors .ConnectorException .ClientIdentifierException ;
1516import com .venafi .vcert .sdk .connectors .cloud .CloudConnector .ApiClientInformation ;
1617import com .venafi .vcert .sdk .connectors .tpp .CustomFieldRequest ;
1718
@@ -125,15 +126,15 @@ public static String getIpAddress() throws UnknownHostException {
125126
126127 }
127128
128- public static void addApiClientInformation (com .venafi .vcert .sdk .connectors .cloud .CloudConnector .CertificateRequestsPayload payload ) {
129+ public static void addApiClientInformation (com .venafi .vcert .sdk .connectors .cloud .CloudConnector .CertificateRequestsPayload payload ) throws ClientIdentifierException {
129130 //add client information
130131 ApiClientInformation clientInfo = new ApiClientInformation ();
131132 clientInfo .type (VCertConstants .DEFAULT_VENDOR_AND_PRODUCT_NAME );
132133
133134 try {
134135 clientInfo .identifier (VCertUtils .getIpAddress ());
135136 } catch (UnknownHostException e ) {
136- e . printStackTrace ( );
137+ throw new ClientIdentifierException ( e );
137138 }
138139
139140 payload .apiClientInformation (clientInfo );
You can’t perform that action at this time.
0 commit comments