dcsimg
how will i convert a string (which has the cretificate data) in to a valid p12 certificate
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   karthik_srini
Posted On:   Wednesday, November 24, 2004 02:10 AM

hai, i read the the .p12 file using KeyStore ks = KeyStore.getInstance ( "PKCS12" ); char[] password = passwd.toCharArray(); ks.load( new FileInputStream( file ), password ); Certificate c = ks.getCertificate(alias); then store c.toString() in a database.. data like [ [ Version: V3 Subject: EMAILADDRESS=askarthik150@gmail.com, CN=karthik as, OU=Terms of use at www.safescrypt.com/rpa (c) 02, OU=Class 1 Consumer Individual Subscriber, O=Safescrypt Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4 Key: SunJSSE RSA public key: public exponent: 010001 modulus: c2f3b879 ecb5b612 5063dc45 dcfd   More>>

hai,

i read the the .p12 file using

KeyStore ks = KeyStore.getInstance ( "PKCS12" );
char[] password = passwd.toCharArray();
ks.load( new FileInputStream( file ), password );
Certificate c = ks.getCertificate(alias);

then store c.toString() in a database..
data like

[
[
Version: V3
Subject: EMAILADDRESS=askarthik150@gmail.com, CN=karthik as, OU=Terms of use at www.safescrypt.com/rpa (c) 02, OU=Class 1 Consumer Individual Subscriber, O=Safescrypt
Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4

Key: SunJSSE RSA public key:
public exponent:
010001
modulus:
c2f3b879 ecb5b612 5063dc45 dcfd0bfd 89742ff3 91c887d4 453759cc eedc038b
36a1af7f d9aaa7f6 c518d23b f3a97c4b 4943a7d0 0161b65d 57fde304 5b33134d

.........and so on

then i recover it from database in to a string
then how do i convert the data (in string) into a valid .p12
certificate file

thankz
karthik

   <<Less
About | Sitemap | Contact