cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Endpoint "/api/v1.0/onpremise/sslCertificate/store" of Cluster not working properly

Romanenkov_Alex
Advisor

Hello.

I trying to add SSL certificate by Cluster API /sslCertificate/store/{entityType}/{entityId}

objects are in a single line as wrote in documentation.

But I got this:

"certificateStoreStatus": "PRIVATE_KEY_IS_INVALID",
  "detailedError": "IllegalArgumentException: Cannot decode private key. Error: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=111, too big."

 

I can`t manually change SSL certificate from UI (blocked)

I can`t manually change SSL certificate on machine instead API\UI

If delete this "-----BEGIN CERTIFICATE-----" I got this:

 

{
  "certificateStoreStatus": "PRIVATE_KEY_IS_INVALID",
  "detailedError": "IllegalArgumentException: Cannot decode private key. Error: java.security.spec.InvalidKeySpecException: java.security.InvalidKeyException: IOException : DerInputStream.getLength(): lengthTag=66, too big."
}

 

Can anybody SHARE example - WHAT exactly I need provide to "body" json.

 

Examples and varius combination not working. 

 

 

"publicKeyCertificateEncoded": "-----BEGIN CERTIFICATE-----\nMIIDKT...XbTK+M\n-----END CERTIFICATE-----",
"certificateChainEncoded": "-----BEGIN CERTIFICATE-----\nMIIDKT...XbTK+M\n-----END CERTIFICATE-----\n-----BEGIN CERTIFICATE-----\nMIIDKT...bXTK+M\n-----END CERTIFICATE-----"

 

curl -X POST "https://myManaged.cluster.com/api/v1.0/onpremise/sslCertificate/store/SERVER/32" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"privateKeyEncoded\":\"-----BEGIN RSA PRIVATE KEY-----\MIIEow...aHzMvp\-----END RSA PRIVATE KEY-----\",\"publicKeyCertificateEncoded\":\"-----BEGIN CERTIFICATE-----\MIIDKT...XbTK+M\-----END CERTIFICATE-----\",\"certificateChainEncoded\":\"-----BEGIN CERTIFICATE-----\MIIDKT...XbTK+M\-----END CERTIFICATE-----\-----BEGIN CERTIFICATE-----\MIIDKT...bXTK+M\-----END CERTIFICATE-----\"}

 

 

 

Regards,

Alexander

 

0 REPLIES 0