[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iaik-jce] Help: Creating CSR Error



Marius,

Assuming that you're trying to get one of the Verisign Sample Server
Certificates, I believe that Verisign has a requirement for the 
common name to be a fully qualified domain name, like the
"www.aaaa.com.ar"
that Jeronimo is using.

Good Luck!

Jeronimo Ginzburg wrote:
> 
> I  have use the following and it worked fine:
> 
>    KeyPair key_pair=null;
>    key_pair = generateKeyPair("RSA", "RSA", 1024);
>    RSAPrivateKey rsa_private_key = (RSAPrivateKey)
> key_pair.getPrivate();
>    RSAPublicKey rsa_public_key = (RSAPublicKey) key_pair.getPublic();
> 
>    try{
>         FileOutputStream foP = new
> FileOutputStream("rsa_private_key.key");
>         rsa_private_key.writeTo(foP);
>         foP.close();
>    } catch(Exception e){
>        System.out.println("Error creating file!");
>        e.printStackTrace();
>    }
> 
>    Name subject = new Name();
>    subject.addRDN(ObjectID.country, "AR");
>    subject.addRDN(ObjectID.locality, "Rosario");
>    subject.addRDN(ObjectID.organization ,"Orga");
>    subject.addRDN(ObjectID.organizationalUnit ,"Sistemas");
>    subject.addRDN(ObjectID.commonName ,"www.aaaa.com.ar");
>    subject.addRDN(ObjectID.emailAddress ,"info@aaaa.com.ar");
>    subject.addRDN(ObjectID.stateOrProvince ,"Santa Fe");
[snip]
--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce