8231139: Improved keystore support

Reviewed-by: mullan, ahgross
This commit is contained in:
Weijun Wang 2019-10-09 17:42:38 +08:00
parent af20c6b9c4
commit f3815c85a1
10 changed files with 64 additions and 124 deletions

View file

@ -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));