Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8240997: Remove more "hack" word in security codes
Reviewed-by: xuelei
  • Loading branch information
Jack Hartstein authored and Jamil Nimeh committed Jun 9, 2021
1 parent 1c3932f commit 58a59e3
Show file tree
Hide file tree
Showing 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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -368,7 +368,7 @@ protected void engineUpdate(ByteBuffer b) {
try {
ensureInit();
} catch (SignatureException se) {
// hack for working around API bug
// workaround for API bug
throw new RuntimeException(se.getMessage());
}
this.md.update(b);
Expand Down
Expand Up @@ -110,7 +110,7 @@ static Plaintext decode(TransportContext context,
plaintexts =
context.inputRecord.decode(srcs, srcsOffset, srcsLength);
} 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()) {
context.outputRecord.encodeV2NoCipher();
if (SSLLogger.isOn && SSLLogger.isOn("ssl")) {
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/sun/security/util/CurveDB.java
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -80,7 +80,7 @@ public static NamedCurve lookup(ECParameterSpec 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.
// This can go away once we decide how to expose curve names in the
// public API.
Expand Down
@@ -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.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -584,14 +584,14 @@ protected void engineUpdate(ByteBuffer input) {
try {
ensureInit();
} catch (SignatureException se) {
// hack for working around API bug
// workaround for API bug
throw new RuntimeException(se.getMessage());
}
if (fallbackSignature != null) {
try {
fallbackSignature.update(input);
} catch (SignatureException se) {
// hack for working around API bug
// workaround for API bug
throw new RuntimeException(se.getMessage());
}
} else {
Expand Down

1 comment on commit 58a59e3

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.