java.security.cert.CertificateParsingException: invalid DER-encoded certificate data

Atlassian JIRA | Matthew Hunter | 2 years ago
  1. 0

    From version 1.6.14.0 onwards of the Amazon EC2 CLI tools, the private key (-K, --private-key) and X.509 certificate (-C, --cert) options are not supported. This means that custom bamboo EC2 instances will shut down within minutes of starting up if they are using those variables. You may see the following stack trace on your EC2 instance before it is shut down: {noformat} ==> setupEbsSnapshot.log <== Unexpected error: org.codehaus.xfire.fault.XFireFault: General security error; nested exception is: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:83) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) at org.codehaus.xfire.client.Client.invoke(Client.java:336) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) at com.sun.proxy.$Proxy12.createVolume(Unknown Source) at com.amazon.aes.webservices.client.Jec2Impl.createVolume(Jec2Impl.java:2732) at com.amazon.aes.webservices.client.cmd.CreateVolume.invokeOnline(CreateVolume.java:88) at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:1071) at com.amazon.aes.webservices.client.cmd.CreateVolume.main(CreateVolume.java:98) Caused by: org.apache.ws.security.WSSecurityException: General security error; nested exception is: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:76) at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:291) at com.amazon.aes.webservices.client.Jec2Impl.signRequest(Jec2Impl.java:301) at com.amazon.aes.webservices.client.Jec2Impl.access$000(Jec2Impl.java:97) at com.amazon.aes.webservices.client.Jec2Impl$1.invoke(Jec2Impl.java:204) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) ... 9 more Caused by: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1703) at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:301) at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:104) at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:305) at com.amazon.aes.webservices.client.CryptoProxy.getCertByName(CryptoProxy.java:116) at com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:74) ... 15 more ec2-create-volume failed (exit code 0). Output: {noformat} To work around this problem you'll need to use your access key ID (-O, --aws-access-key) and secret access key (-W, --aws-secret-key) in scripts and environment variables instead.

    Atlassian JIRA | 2 years ago | Matthew Hunter
    java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
  2. 0

    From version 1.6.14.0 onwards of the Amazon EC2 CLI tools, the private key (-K, --private-key) and X.509 certificate (-C, --cert) options are not supported. This means that custom bamboo EC2 instances will shut down within minutes of starting up if they are using those variables. You may see the following stack trace on your EC2 instance before it is shut down: {noformat} ==> setupEbsSnapshot.log <== Unexpected error: org.codehaus.xfire.fault.XFireFault: General security error; nested exception is: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:83) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114) at org.codehaus.xfire.client.Client.invoke(Client.java:336) at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77) at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57) at com.sun.proxy.$Proxy12.createVolume(Unknown Source) at com.amazon.aes.webservices.client.Jec2Impl.createVolume(Jec2Impl.java:2732) at com.amazon.aes.webservices.client.cmd.CreateVolume.invokeOnline(CreateVolume.java:88) at com.amazon.aes.webservices.client.cmd.BaseCmd.invoke(BaseCmd.java:1071) at com.amazon.aes.webservices.client.cmd.CreateVolume.main(CreateVolume.java:98) Caused by: org.apache.ws.security.WSSecurityException: General security error; nested exception is: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:76) at org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:291) at com.amazon.aes.webservices.client.Jec2Impl.signRequest(Jec2Impl.java:301) at com.amazon.aes.webservices.client.Jec2Impl.access$000(Jec2Impl.java:97) at com.amazon.aes.webservices.client.Jec2Impl$1.invoke(Jec2Impl.java:204) at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131) at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79) ... 9 more Caused by: java.security.cert.CertificateParsingException: invalid DER-encoded certificate data at sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1703) at sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:301) at sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:104) at java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:305) at com.amazon.aes.webservices.client.CryptoProxy.getCertByName(CryptoProxy.java:116) at com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:74) ... 15 more ec2-create-volume failed (exit code 0). Output: {noformat} To work around this problem you'll need to use your access key ID (-O, --aws-access-key) and secret access key (-W, --aws-secret-key) in scripts and environment variables instead.

    Atlassian JIRA | 2 years ago | Matthew Hunter
    java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
  3. 0

    [SOLVED] Schedule Ec2 snapshots

    ubuntuforums.org | 11 months ago
    java.security.cert.CertificateParsingException: signed overrun, bytes = 918
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    The Easy configuration for GILDA throws an exception

    Eclipse Bugzilla | 8 years ago | sgirtel
    eu.geclipse.core.reporting.ProblemException: Unable to load certificate
  6. 0

    Invalid RSA modulus size

    Oracle Community | 1 decade ago | 843811
    javax.net.ssl.SSLProtocolException: java.io.IOException: subject key, Unknown key spec: Invalid RSA modulus size.

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.security.cert.CertificateParsingException

      invalid DER-encoded certificate data

      at sun.security.x509.X509CertImpl.parse()
    2. Java RT
      CertificateFactory.generateCertificate
      1. sun.security.x509.X509CertImpl.parse(X509CertImpl.java:1703)
      2. sun.security.x509.X509CertImpl.<init>(X509CertImpl.java:301)
      3. sun.security.provider.X509Factory.engineGenerateCertificate(X509Factory.java:104)
      4. java.security.cert.CertificateFactory.generateCertificate(CertificateFactory.java:305)
      4 frames
    3. Amazon EC2 Library in Java
      CryptoProxy.getCertificates
      1. com.amazon.aes.webservices.client.CryptoProxy.getCertByName(CryptoProxy.java:116)
      2. com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:74)
      3. com.amazon.aes.webservices.client.CryptoProxy.getCertificates(CryptoProxy.java:76)
      3 frames
    4. Apache WSS4J
      WSSecSignature.prepare
      1. org.apache.ws.security.message.WSSecSignature.prepare(WSSecSignature.java:291)
      1 frame
    5. Amazon EC2 Library in Java
      Jec2Impl$1.invoke
      1. com.amazon.aes.webservices.client.Jec2Impl.signRequest(Jec2Impl.java:301)
      2. com.amazon.aes.webservices.client.Jec2Impl.access$000(Jec2Impl.java:97)
      3. com.amazon.aes.webservices.client.Jec2Impl$1.invoke(Jec2Impl.java:204)
      3 frames
    6. XFire
      Invocation.invoke
      1. org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
      2. org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
      2 frames