|
|
CertificateException DerInputStream.getLength lengthTag=127 too big
Hi All,
I am getting a valid PEM encoded cert issued by a CA and then use IE
Xenroll to install it into the browser. All these work well.
Now in between, I try to get the serial number out of the cert which
is where it fails.
1. I first convert the PEM encoded String to a byte array and then PEM
decode the byte array. Then I pass this byte array to X509Certificate
getInstance method which throws the Certificate exception saying
DerInputStream.getLength lengthTag=127 too big
Has anybody faced this problem?
2. I am pretty sure the PEM encoded certificate is alright because I
can install it on the browser after wrapping it with BEGIN CERTIFICATE
and END CERTIFICATE. Is there any other way I can programmatically get
the certificate serial number from teh PEM encoded Certificate String.
Thanks in advance for your help.
-Yash
|
|
0
|
|
|
|
Reply
|
iamr00t1974
|
1/14/2004 4:32:01 AM |
|
> 1. I first convert the PEM encoded String to a byte array and then PEM
> decode the byte array. Then I pass this byte array to X509Certificate
> getInstance method which throws the Certificate exception saying
> DerInputStream.getLength lengthTag=127 too big
> Has anybody faced this problem?
Seems you're using an old javax.security.cert.Certificate class. Use
java.security.cert.CertifcateFactory instead and see if you get the
same error.
-Hans
|
|
0
|
|
|
|
Reply
|
hgranqvistx
|
1/14/2004 10:35:42 PM
|
|
Thanks, Hans.
I suspect that the certificate is in base64 CMC encoded certificate.
None of the OpenSSL utilites was able to parse this certificate as it
seems to be a propriety Microsoft format. Do you have any idea if
there are any tools or utilites which can be used to programmatically
extract the serial number from such certificates.?
hgranqvistx-google@yahoo.com (Hans Granqvist) wrote in message news:<f2c05086.0401141435.35f3b137@posting.google.com>...
> > 1. I first convert the PEM encoded String to a byte array and then PEM
> > decode the byte array. Then I pass this byte array to X509Certificate
> > getInstance method which throws the Certificate exception saying
> > DerInputStream.getLength lengthTag=127 too big
> > Has anybody faced this problem?
>
> Seems you're using an old javax.security.cert.Certificate class. Use
> java.security.cert.CertifcateFactory instead and see if you get the
> same error.
>
> -Hans
|
|
0
|
|
|
|
Reply
|
iamr00t1974
|
1/15/2004 5:24:56 PM
|
|
|
2 Replies
1976 Views
(page loaded in 0.092 seconds)
Similiar Articles: CertificateException DerInputStream.getLength lengthTag=127 too ...CertificateException DerInputStream.getLength lengthTag=127 too big CertificateException DerInputStream.getLength lengthTag=127 too big - Java . DerInputStream.getLength(): lengthTag=127, too big ...CertificateException DerInputStream.getLength lengthTag=127 too ... Then I pass this byte ... Certificate exception saying DerInputStream.getLength lengthTag=127 too big ... lengthTag=109, too big. - comp.lang.java.securityCertificateException DerInputStream.getLength lengthTag=127 too ... IO Exception - comp.lang.java.security lengthTag=109, too big. - comp.lang.java.security java.io ... java.io.IOException: DER input, Integer tag error - comp.lang.java ...CertificateException DerInputStream.getLength lengthTag=127 too ... Now in between, I try to get the serial number ... 109, too big. - comp.lang.java.security java.io ... Getting some serial numbers in java - comp.lang.java.help ...... 109, too big. - comp.lang.java.security Getting some serial numbers in java - comp.lang.java.help ... CertificateException DerInputStream.getLength lengthTag=127 too ... DER decoding from x.509 v3 certificate - comp.lang.java.security ...CertificateException DerInputStream.getLength lengthTag=127 too ... DER decoding from x.509 v3 ... DerInputStream.getLength(): lengthTag=127, too big ... means that there ... Need help to decode snmp string - comp.lang.rubyCertificateException DerInputStream.getLength lengthTag=127 too ... Need help to decode snmp string - comp.lang.ruby Need help to decode snmp string - comp.lang.ruby ... convert DER encoded cert to PEM encoded cert - comp.lang.java ...CertificateException DerInputStream.getLength lengthTag=127 too ... Hi All, I am getting a valid PEM encoded cert ... I first convert the PEM encoded String to a byte array ... convert a ssl cert in .pem format to pkcs12 - comp.unix.solaris ...CertificateException DerInputStream.getLength lengthTag=127 too ... convert a ssl cert in .pem format to pkcs12 - comp.unix.solaris ... help! cutting a VERY long and ... CertificateException DerInputStream.getLength lengthTag=127 too bigCertificateException DerInputStream.getLength lengthTag=127 too big - Java . This is a discussion on CertificateException DerInputStream.getLength lengthTag=127 too ... DerInputStream.getLength(): lengthTag=127, too big ...import java.security.cert.CertificateException; import java.security ... ERROR --> DerInputStream.getLength(): lengthTag=127, too big. means that there is some ASN.1 decoding ... 7/21/2012 3:45:46 AM
|
|
|
|
|
|
|
|
|