I try to make extensions as Basic Constrains and Key Usage, who are
necessary for a pki...
With using String.toByteArray() and OCTET_STRING(byte[]), if I test
it with string "a" I get "61 a"; with String "A", I get "41 A", with
"aA", "61 31 1a" when I use ie to see my certificate.
I don't know how to convert a string value for my extensions (like
"Certificate Signing , Off-line CRL Signing" for the Extension
keyUsage) to an OCTET_STRING...
Is there any method to do this, or must I write byte per byte my
OCTET_STRING? :-)
Matthieu
Jamie Nicolson <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> Beben wrote:
>
> >Hi,
> >
> >
> >I'm trying to add extensions to my certificate, I use:
> >CertificateInfo.addExtension(org.mozilla.jss.Certs.Extension)
> >and
> >Extension(OBJECT_IDENTIFIER extnId, boolean critical, OCTET_STRING
> >extnValue)
> >but I don't know how to create my OCTET_STRING
> >
> What kind of extension are you trying to encode? extnValue should be the
> DER-encoding of the extension value.
>
> >I've try to use a String.getBytes() method and OCTET_STRING(Bytes[])
> >constructor, but it doesn't work...
> >
> Why not? What happens?