mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-15 10:23:28 +00:00
8279043: Some Security Exception Messages Miss Spaces
Reviewed-by: weijun
This commit is contained in:
parent
f7309060de
commit
f31dead6c5
@ -1304,7 +1304,7 @@ abstract class GaloisCounterMode extends CipherSpi {
|
||||
// 'len' includes ibuffer data
|
||||
checkDataLength(len, tagLenBytes);
|
||||
if (dst.remaining() < len + tagLenBytes) {
|
||||
throw new ShortBufferException("Output buffer too small, must" +
|
||||
throw new ShortBufferException("Output buffer too small, must " +
|
||||
"be at least " + (len + tagLenBytes) + " bytes long");
|
||||
}
|
||||
|
||||
@ -1472,7 +1472,7 @@ abstract class GaloisCounterMode extends CipherSpi {
|
||||
}
|
||||
|
||||
if (len - tagLenBytes > out.length - outOfs) {
|
||||
throw new ShortBufferException("Output buffer too small, must" +
|
||||
throw new ShortBufferException("Output buffer too small, must " +
|
||||
"be at least " + (len - tagLenBytes) + " bytes long");
|
||||
}
|
||||
|
||||
|
||||
@ -213,7 +213,7 @@ public final class TlsKeyMaterialGenerator extends KeyGeneratorSpi {
|
||||
if (protocolVersion >= 0x0302) {
|
||||
// TLS 1.1+
|
||||
throw new RuntimeException(
|
||||
"Internal Error: TLS 1.1+ should not be negotiating" +
|
||||
"Internal Error: TLS 1.1+ should not be negotiating " +
|
||||
"exportable ciphersuites");
|
||||
} else if (protocolVersion == 0x0301) {
|
||||
// TLS 1.0
|
||||
|
||||
@ -340,7 +340,7 @@ public class Cipher {
|
||||
"format:" + transformation);
|
||||
}
|
||||
if ((parts[0] == null) || (parts[0].isEmpty())) {
|
||||
throw new NoSuchAlgorithmException("Invalid transformation:" +
|
||||
throw new NoSuchAlgorithmException("Invalid transformation: " +
|
||||
"algorithm not specified-"
|
||||
+ transformation);
|
||||
}
|
||||
|
||||
@ -481,12 +481,12 @@ public class PKCS9Attribute implements DerEncoder {
|
||||
"attribute not supported.");
|
||||
// break unnecessary
|
||||
case 10: // issuerAndserialNumber attribute -- not supported
|
||||
throw new IOException("PKCS9 IssuerAndSerialNumber" +
|
||||
throw new IOException("PKCS9 IssuerAndSerialNumber " +
|
||||
"attribute not supported.");
|
||||
// break unnecessary
|
||||
case 11: // RSA DSI proprietary
|
||||
case 12: // RSA DSI proprietary
|
||||
throw new IOException("PKCS9 RSA DSI attributes" +
|
||||
throw new IOException("PKCS9 RSA DSI attributes " +
|
||||
"11 and 12, not supported.");
|
||||
// break unnecessary
|
||||
case 13: // S/MIME unused attribute
|
||||
@ -604,12 +604,12 @@ public class PKCS9Attribute implements DerEncoder {
|
||||
"attribute not supported.");
|
||||
// break unnecessary
|
||||
case 10: // issuerAndserialNumber attribute -- not supported
|
||||
throw new IOException("PKCS9 IssuerAndSerialNumber" +
|
||||
throw new IOException("PKCS9 IssuerAndSerialNumber " +
|
||||
"attribute not supported.");
|
||||
// break unnecessary
|
||||
case 11: // RSA DSI proprietary
|
||||
case 12: // RSA DSI proprietary
|
||||
throw new IOException("PKCS9 RSA DSI attributes" +
|
||||
throw new IOException("PKCS9 RSA DSI attributes " +
|
||||
"11 and 12, not supported.");
|
||||
// break unnecessary
|
||||
case 13: // S/MIME unused attribute
|
||||
|
||||
@ -635,7 +635,7 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
throw new KeyStoreException("Private key is not encoded" +
|
||||
throw new KeyStoreException("Private key is not encoded " +
|
||||
"as PKCS#8");
|
||||
}
|
||||
|
||||
|
||||
@ -270,7 +270,7 @@ public final class RSAPadding {
|
||||
*/
|
||||
public byte[] unpad(byte[] padded) throws BadPaddingException {
|
||||
if (padded.length != paddedSize) {
|
||||
throw new BadPaddingException("Decryption error." +
|
||||
throw new BadPaddingException("Decryption error. " +
|
||||
"The padded array length (" + padded.length +
|
||||
") is not the specified padded size (" + paddedSize + ")");
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ final class CertificateAuthoritiesExtension {
|
||||
if (encodedCAs.isEmpty()) {
|
||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl,handshake")) {
|
||||
SSLLogger.warning(
|
||||
"The number of CAs exceeds the maximum size" +
|
||||
"The number of CAs exceeds the maximum size " +
|
||||
"of the certificate_authorities extension");
|
||||
}
|
||||
|
||||
|
||||
@ -451,7 +451,7 @@ public class DisabledAlgorithmConstraints extends AbstractAlgorithmConstraints {
|
||||
for (Constraint constraint : list) {
|
||||
if (!constraint.permits(key)) {
|
||||
if (debug != null) {
|
||||
debug.println("Constraints: failed key size" +
|
||||
debug.println("Constraints: failed key size " +
|
||||
"constraint check " + KeyUtil.getKeySize(key));
|
||||
}
|
||||
return false;
|
||||
|
||||
@ -154,7 +154,7 @@ implements CertAttrSet<String> {
|
||||
|
||||
if (next.isContextSpecific(TAG_REQUIRE) && !next.isConstructed()) {
|
||||
if (this.require != -1)
|
||||
throw new IOException("Duplicate requireExplicitPolicy" +
|
||||
throw new IOException("Duplicate requireExplicitPolicy " +
|
||||
"found in the PolicyConstraintsExtension");
|
||||
next.resetTag(DerValue.tag_Integer);
|
||||
this.require = next.getInteger();
|
||||
@ -162,7 +162,7 @@ implements CertAttrSet<String> {
|
||||
} else if (next.isContextSpecific(TAG_INHIBIT) &&
|
||||
!next.isConstructed()) {
|
||||
if (this.inhibit != -1)
|
||||
throw new IOException("Duplicate inhibitPolicyMapping" +
|
||||
throw new IOException("Duplicate inhibitPolicyMapping " +
|
||||
"found in the PolicyConstraintsExtension");
|
||||
next.resetTag(DerValue.tag_Integer);
|
||||
this.inhibit = next.getInteger();
|
||||
|
||||
@ -202,7 +202,7 @@ public class PolicyInformation {
|
||||
if (obj instanceof Set) {
|
||||
for (Object obj1 : (Set<?>) obj) {
|
||||
if (!(obj1 instanceof PolicyQualifierInfo)) {
|
||||
throw new IOException("Attribute value must be a" +
|
||||
throw new IOException("Attribute value must be a " +
|
||||
"Set of PolicyQualifierInfo objects.");
|
||||
}
|
||||
}
|
||||
|
||||
@ -154,7 +154,7 @@ public final class Krb5MechFactory implements MechanismFactory {
|
||||
sm.checkPermission(perm);
|
||||
} catch (SecurityException e) {
|
||||
if (DEBUG) {
|
||||
System.out.println("Permission to initiate" +
|
||||
System.out.println("Permission to initiate " +
|
||||
"kerberos init credential" + e.getMessage());
|
||||
}
|
||||
throw e;
|
||||
|
||||
@ -258,7 +258,7 @@ public class GCMBufferTest implements Cloneable {
|
||||
// If incrementalSegments is enabled, run through that test only
|
||||
if (incremental) {
|
||||
if (ops.size() < 2) {
|
||||
throw new Exception("To do incrementalSegments you must" +
|
||||
throw new Exception("To do incrementalSegments you must " +
|
||||
"have more that 1 dtype in the list");
|
||||
}
|
||||
sizes = new int[ops.size()];
|
||||
|
||||
@ -57,7 +57,7 @@ public class GCMShortBuffer {
|
||||
int r = c.doFinal(cipherText, 1, len, pt, 0);
|
||||
if (r != pt.length) {
|
||||
System.out.println(
|
||||
"doFinal() return ( " + r + ") is not the same" +
|
||||
"doFinal() return ( " + r + ") is not the same " +
|
||||
"as getOutputSize returned" + pt.length);
|
||||
error = true;
|
||||
}
|
||||
|
||||
@ -110,7 +110,7 @@ public class PrincipalExpansionError {
|
||||
("PrincipalExpansionError test failed (file not found)");
|
||||
java.io.FileNotFoundException fnfe =
|
||||
(java.io.FileNotFoundException)e;
|
||||
throw new SecurityException("PrincipalExpansionError" +
|
||||
throw new SecurityException("PrincipalExpansionError " +
|
||||
"test failed (file not found)");
|
||||
} else {
|
||||
// i don't know???
|
||||
|
||||
@ -69,7 +69,7 @@ public class CacertsLimit {
|
||||
throw new Exception(
|
||||
"There are too many trusted CAs in cacerts. The " +
|
||||
"certificate_authorities extension cannot be used " +
|
||||
"for TLS connections. Please rethink about the size" +
|
||||
"for TLS connections. Please rethink about the size " +
|
||||
"of the cacerts, or have a release note for the " +
|
||||
"impacted behaviors");
|
||||
} else if (sizeAccount > 0x4000) {
|
||||
|
||||
@ -71,7 +71,7 @@ public final class ECKeyPairGenerator extends KeyPairGeneratorSpi {
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("SunEC ECKeyPairGenerator" +
|
||||
"has been patched. Key size " + keySize +
|
||||
" has been patched. Key size " + keySize +
|
||||
" is not supported");
|
||||
}
|
||||
ECParameterSpec ecParams = ECUtil.getECParameterSpec(null, keySize);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user