mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8202598: keytool -certreq output contains inconsistent line separators
Reviewed-by: hchao, mullan
This commit is contained in:
parent
62b7c5eaed
commit
45a9ade337
3 changed files with 109 additions and 12 deletions
|
@ -1610,9 +1610,12 @@ public final class Main {
|
|||
new X509CRLImpl.TBSCertList(owner, firstDate, lastDate, badCerts),
|
||||
privateKey, sigAlgName);
|
||||
if (rfc) {
|
||||
out.println("-----BEGIN X509 CRL-----");
|
||||
out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(crl.getEncodedInternal()));
|
||||
out.println("-----END X509 CRL-----");
|
||||
out.print("-----BEGIN X509 CRL-----");
|
||||
out.print("\r\n");
|
||||
out.print(Base64.getMimeEncoder(64, CRLF).encodeToString(crl.getEncodedInternal()));
|
||||
out.print("\r\n");
|
||||
out.print("-----END X509 CRL-----");
|
||||
out.print("\r\n");
|
||||
} else {
|
||||
out.write(crl.getEncodedInternal());
|
||||
}
|
||||
|
@ -2784,9 +2787,12 @@ public final class Main {
|
|||
throws Exception {
|
||||
X509CRL xcrl = (X509CRL)crl;
|
||||
if (rfc) {
|
||||
out.println("-----BEGIN X509 CRL-----");
|
||||
out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(xcrl.getEncoded()));
|
||||
out.println("-----END X509 CRL-----");
|
||||
out.print("-----BEGIN X509 CRL-----");
|
||||
out.print("\r\n");
|
||||
out.print(Base64.getMimeEncoder(64, CRLF).encodeToString(xcrl.getEncoded()));
|
||||
out.print("\r\n");
|
||||
out.print("-----END X509 CRL-----");
|
||||
out.print("\r\n");
|
||||
} else {
|
||||
String s;
|
||||
if (crl instanceof X509CRLImpl x509crl) {
|
||||
|
@ -3800,9 +3806,12 @@ public final class Main {
|
|||
throws IOException, CertificateException
|
||||
{
|
||||
if (rfc) {
|
||||
out.println(X509Factory.BEGIN_CERT);
|
||||
out.println(Base64.getMimeEncoder(64, CRLF).encodeToString(cert.getEncoded()));
|
||||
out.println(X509Factory.END_CERT);
|
||||
out.print(X509Factory.BEGIN_CERT);
|
||||
out.print("\r\n");
|
||||
out.print(Base64.getMimeEncoder(64, CRLF).encodeToString(cert.getEncoded()));
|
||||
out.print("\r\n");
|
||||
out.print(X509Factory.END_CERT);
|
||||
out.print("\r\n");
|
||||
} else {
|
||||
out.write(cert.getEncoded()); // binary
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue