8272120: Avoid looking for standard encodings in "java." modules

Reviewed-by: alanb, dfuchs, naoto
This commit is contained in:
Sergey Bylokhov 2021-08-12 05:46:00 +00:00
parent bd27bb9cbe
commit ec2fc384e5
15 changed files with 74 additions and 103 deletions

View file

@ -55,6 +55,8 @@ import sun.security.x509.PKIXExtensions;
import sun.security.x509.URIName;
import sun.security.x509.X509CertImpl;
import static java.nio.charset.StandardCharsets.UTF_8;
/**
* This is a class that checks the revocation status of a certificate(s) using
* OCSP. It is not a PKIXCertPathChecker and therefore can be used outside of
@ -176,7 +178,7 @@ public final class OCSP {
try {
String encodedGetReq = responderURI.toString() + "/" +
URLEncoder.encode(Base64.getEncoder().encodeToString(bytes),
"UTF-8");
UTF_8);
if (encodedGetReq.length() <= 255) {
url = new URL(encodedGetReq);