mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8231139: Improved keystore support
Reviewed-by: mullan, ahgross
This commit is contained in:
parent
af20c6b9c4
commit
f3815c85a1
10 changed files with 64 additions and 124 deletions
|
@ -598,7 +598,7 @@ public class CodeSource implements java.io.Serializable {
|
|||
cfs.put(certType, cf);
|
||||
}
|
||||
// parse the certificate
|
||||
byte[] encoded = IOUtils.readNBytes(ois, ois.readInt());
|
||||
byte[] encoded = IOUtils.readExactlyNBytes(ois, ois.readInt());
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
|
||||
try {
|
||||
certList.add(cf.generateCertificate(bais));
|
||||
|
|
|
@ -594,7 +594,7 @@ implements java.io.Serializable
|
|||
cfs.put(certType, cf);
|
||||
}
|
||||
// parse the certificate
|
||||
byte[] encoded = IOUtils.readNBytes(ois, ois.readInt());
|
||||
byte[] encoded = IOUtils.readExactlyNBytes(ois, ois.readInt());
|
||||
ByteArrayInputStream bais = new ByteArrayInputStream(encoded);
|
||||
try {
|
||||
certList.add(cf.generateCertificate(bais));
|
||||
|
|
|
@ -244,7 +244,7 @@ public class CertificateRevokedException extends CertificateException {
|
|||
for (int i = 0; i < size; i++) {
|
||||
String oid = (String) ois.readObject();
|
||||
boolean critical = ois.readBoolean();
|
||||
byte[] extVal = IOUtils.readNBytes(ois, ois.readInt());
|
||||
byte[] extVal = IOUtils.readExactlyNBytes(ois, ois.readInt());
|
||||
Extension ext = sun.security.x509.Extension.newExtension
|
||||
(new ObjectIdentifier(oid), critical, extVal);
|
||||
extensions.put(oid, ext);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue