Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

pls check the private key  RSS feed

 
ge wing
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, there
I created a private key by openssl without encryption, then I tried to import to my keystore by keytool, but I always got errors: "Input is not X.509 certificate". Could you explain it ?
│-----BEGIN RSA PRIVATE KEY-----
│MIICXQIBAAKBgQCfCWa8DjFX76wRzOgAMC8xGxa8cfFHo/fNOzGy//iv6FafmV7C
│hyxN8g5bJl5AxKLrBtIGcVhOMJnIWz6aTbj9i3s/TC4K1KSfcgKwJDqHRUzMlhNh
│OfzW5BGyerQt8rKZWL23mauz0dWPFBvCHAPdA3dOzbbmzIIO1nzh6K5XaQIDAQAB
│AoGAQwlqdbCh2ghcBrDRxmqJKfDaN5rr8p/KL4dZHrPJNxT/lozGpcbmxQBYTtGw
│fyqj5d/dHfwfFe5klFDp5Y8Hf6Z07KG/8p9BBDtFqsHDoTXGQtcl7PwUIVWAxXVx
│9pVHc/yFwzBbjQOy8xbk1wkpDkC2++Juyjs/BhCoaq6hQYECQQDK2PagdF9mqfjJ
│ef/9Hs4hI1UpQtP/Au/1iMM3Uga4lI+ljZ3uMkZacBnQkOHQ1/UhmRRxdZxaDcRP
│oVySUJTZAkEAyLWazDW7fMXE6Y1LI4l0IFuwEftkQtVgi6yFJ4hCPOzFsJ0vNuOW
│J8P+C7Wr8czN6LuSvq66QLKST8npE8r9EQJAJ4ZzN/y1Aiooggm1qbqw66AY3ftZ
│l50Y6L0HXOYszRaVjuqzVVCSiNjDDvLMLYeHCk7rvtft6VY5ZFLK2O++sQJBAKi3
│2Hd/V6rMSPoXNymZW0/0Iy8Khz6TRgRDsu8HYL78PjZ3+3+Fkuy8marYPcEWa6UP
│QI0gLhtCwTFnRpHH2jECQQCbTAyDJK5vItUbmZaXTZ6VG9a/yc1giZZu9ksgmYKL
│WwwApVa9A4K8L7RngXP42XtKP8B10REs0nYehHpDYFNc
│-----END RSA PRIVATE KEY-----

Thanks
George
[ January 10, 2003: Message edited by: ge wing ]
 
Rob Chung
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I understand, signed certificates can come in varies formats. The standard format is X.509. It sounds as if the certificate you tried to import was not in X.509 format.
 
Lewin Chan
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The file you have pasted is a private key / certificate in what they call PEM format.
Keytool (at least for jdk1.3.1) only understands DER format private keys, so you need to convert from PEM to DER using some tool like openssl...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!