Re: Add Private Keys in System Store MY
From: Michel Gallant (neutron_at_istar.ca)
Date: 10/18/05
- Next message: Alun Jones: "Re: Access Control to LDAP on AD?"
- Previous message: Sam Hobbs: "Re: To detect weak or blank password?"
- Maybe in reply to: sunit: "Add Private Keys in System Store MY"
- Next in thread: Michel Gallant: "Re: Add Private Keys in System Store MY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 18 Oct 2005 13:01:17 -0400
Whoops, I should correct myself now (since you didn't ;-)
The format you originally refer to in your post:
--- BEGIN RSA PRIVATE KEY
is NOT pkcs#8 format (as you would see from that pemformats.txt link) but is
in OpenSSL's "Traditional SSLeay RSAPrivateKey format".
You can use Openssl to convert that format *to PKCS#8 format which is THEN suitable for
the PvkConvert utility I refer to below.
See this recent thread for a similar issue:
http://groups.google.com/group/microsoft.public.dotnet.security/browse_thread/thread/83c34588d92dcbc8/4179820bd894a69e
Sorry for "mal-information" :)
- Mitch
"sunit" <sunit@newsgroup.nospam> wrote in message news:Od2IdO%230FHA.1032@TK2MSFTNGP12.phx.gbl...
["Michel Gallant"]
Pardon me for my ignorance as I have never worked in Java
After going through ur code http://www.jensign.com/JavaScience/PvkConvert
private static byte[ ] privatekeyinfoToPrivatekeyblob(byte[ ] encodedPrivkey, int keyspec)
this class returned value will give me the PRIVATEKEYBLOB.
but u have mentioned in http://www.jensign.com/JavaScience/PEM/pemformats.txt that PvkConvert.java
is a simply utility Java class which reads a PKCS#8 encoded PrivateKeyInfo file whereas my private
keys is in PKCS#8 unencrypted private key format. Will it work in my case
secondly I stored the server.key (the File name in which my Private key is present) and PvkConvert.Java
in the location C:\jdk1.2.4\bin
Now i am executing the following command,
C:\jdk1.2.4\bin\javac PvkConvert.java
C:\jdk1.2.4\bin\java PvkConvert server.key
I output shown on my screen is :-
keyspec 1
java.security.spec.InvalidKeySpecException: Unknown key spec.
KeySize: 0 bits
java.lang.NullPointerException
Pls tell what is wrong in above process.
Thanking you.
- Next message: Alun Jones: "Re: Access Control to LDAP on AD?"
- Previous message: Sam Hobbs: "Re: To detect weak or blank password?"
- Maybe in reply to: sunit: "Add Private Keys in System Store MY"
- Next in thread: Michel Gallant: "Re: Add Private Keys in System Store MY"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|