mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8240997: Remove more "hack" word in security codes
Reviewed-by: xuelei
This commit is contained in:
parent
1c3932f3d5
commit
58a59e3dcb
4 changed files with 8 additions and 8 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -368,7 +368,7 @@ public class RSAPSSSignature extends SignatureSpi {
|
||||||
try {
|
try {
|
||||||
ensureInit();
|
ensureInit();
|
||||||
} catch (SignatureException se) {
|
} catch (SignatureException se) {
|
||||||
// hack for working around API bug
|
// workaround for API bug
|
||||||
throw new RuntimeException(se.getMessage());
|
throw new RuntimeException(se.getMessage());
|
||||||
}
|
}
|
||||||
this.md.update(b);
|
this.md.update(b);
|
||||||
|
|
|
@ -110,7 +110,7 @@ interface SSLTransport {
|
||||||
plaintexts =
|
plaintexts =
|
||||||
context.inputRecord.decode(srcs, srcsOffset, srcsLength);
|
context.inputRecord.decode(srcs, srcsOffset, srcsLength);
|
||||||
} catch (UnsupportedOperationException unsoe) { // SSLv2Hello
|
} catch (UnsupportedOperationException unsoe) { // SSLv2Hello
|
||||||
// Hack code to deliver SSLv2 error message for SSL/TLS connections.
|
// Code to deliver SSLv2 error message for SSL/TLS connections.
|
||||||
if (!context.sslContext.isDTLS()) {
|
if (!context.sslContext.isDTLS()) {
|
||||||
context.outputRecord.encodeV2NoCipher();
|
context.outputRecord.encodeV2NoCipher();
|
||||||
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
|
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2006, 2020, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2006, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -80,7 +80,7 @@ public class CurveDB {
|
||||||
return (NamedCurve)params;
|
return (NamedCurve)params;
|
||||||
}
|
}
|
||||||
|
|
||||||
// This is a hack to allow SunJSSE to work with 3rd party crypto
|
// This code allows SunJSSE to work with 3rd party crypto
|
||||||
// providers for ECC and not just SunPKCS11.
|
// providers for ECC and not just SunPKCS11.
|
||||||
// This can go away once we decide how to expose curve names in the
|
// This can go away once we decide how to expose curve names in the
|
||||||
// public API.
|
// public API.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
|
@ -584,14 +584,14 @@ abstract class CSignature extends SignatureSpi {
|
||||||
try {
|
try {
|
||||||
ensureInit();
|
ensureInit();
|
||||||
} catch (SignatureException se) {
|
} catch (SignatureException se) {
|
||||||
// hack for working around API bug
|
// workaround for API bug
|
||||||
throw new RuntimeException(se.getMessage());
|
throw new RuntimeException(se.getMessage());
|
||||||
}
|
}
|
||||||
if (fallbackSignature != null) {
|
if (fallbackSignature != null) {
|
||||||
try {
|
try {
|
||||||
fallbackSignature.update(input);
|
fallbackSignature.update(input);
|
||||||
} catch (SignatureException se) {
|
} catch (SignatureException se) {
|
||||||
// hack for working around API bug
|
// workaround for API bug
|
||||||
throw new RuntimeException(se.getMessage());
|
throw new RuntimeException(se.getMessage());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue