You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

API sample cannot load private key

edited Oct 10, 2017 7:00AM in OCI - General 3 comments

Summary

API sample cannot load private key

Content

I try to use https://docs.us-phoenix-1.oraclecloud.com/Content/Resources/Assets/signing_sample_java.txt to call an api. But it failed to load my pem private key that is currently used in my account. The error is:

  1. Exception in thread "main" java.lang.IllegalArgumentException: java.io.IOException: Invalid DER: length field too big (186)
  2.         at org.tomitribe.auth.signatures.RSA.privateKeyFromPKCS1(RSA.java:63)
  3.         at org.tomitribe.auth.signatures.PEM.readPrivateKey(PEM.java:71)
  4.         at com.oracle.lian.Signing.loadPrivateKey(Signing.java:118)
  5.         at com.oracle.lian.Signing.main(Signing.java:76)
  6. Caused by: java

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!