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

Re: [iaik-ssl] Request for server certificate



Hi Praveen

Netscape requires CertificateRequest to possess some attributes no matter
what they are. It just expects a certain additional ASN1 sequence.

Here is the snippet that solves the problem

attributes = new Attribute[1];
attributes[0] = new Attribute(buildASN1().toASN1Object());

cr = new CertificateRequest(..);
cr.setAttributes(attributes);

// then print out the certificate request in base64 encoded format

 ASN1 buildASN1() {
    try {
        String test = "This is a test";
        byte data[] = test.getBytes();
 
        SEQUENCE ASN1TestType = new SEQUENCE();
        SET testset = new SET();
        ASN1TestType.addComponent(ObjectID.friendlyName);
        testset.addComponent(new BIT_STRING(data, 2));
        ASN1TestType.addComponent(testset);
        byte[] array = DerCoder.encode(ASN1TestType);
        ASN1 asn1 = new ASN1(array);
        return asn1;
     } catch (iaik.asn1.CodingException ex) {
        ex.printStackTrace();
     }
        return null;
    }

I recollect Wolfgang mentioning it to me sometime last year.

_srilekha

Srilekha Mudumbai			WORK# (510) 486 6297
Staff Scientist				FAX#  (510) 486 6363
Lawrence Berkeley National Laboratory   Email: SSMudumbai@lbl.gov
Berkeley, CA 94704

On Thu, 24 Jun 1999, ptsheeth wrote:

> 
>  Hello,
> 
>   I am using Jigsaw SSL 2.0.1 beta version as my web server. The
> certificate manager produces the server certificate request in .pem
> format. But the Nestscape only takes PKCS#10 format. When I tried to copy
> the contents of the request into the netscape certificate server's
> server Certificate request column, I got an error saying that the request
> is not a PKCS#10 request and to check the software used to formulate the
> request. Also it said Invalid DER encoding.
> 
>  Could you please suggest a way to get around this. I need to get a
>  server certificate from our own CA which is a Netscape certificate
> server.
> 
>  Praveen
> 
> 
> 
> --
> Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-ssl/maillist.html
> 
> To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-ssl
>  
> 

--
Mailinglist-archive at http://jcewww.iaik.tu-graz.ac.at/mailarchive/iaik-ssl/maillist.html

To unsubscribe send an email to listserv@iaik.tu-graz.ac.at with the folowing content: UNSUBSCRIBE iaik-ssl