mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8217835: Remove the experimental SunJSSE FIPS compliant mode
Reviewed-by: mullan
This commit is contained in:
parent
5d0ff15a58
commit
fca0af0487
46 changed files with 364 additions and 2350 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2019, 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
|
||||
|
@ -257,7 +257,7 @@ final class Finished {
|
|||
TlsPrfParameterSpec spec = new TlsPrfParameterSpec(
|
||||
masterSecretKey, tlsLabel, seed, 12,
|
||||
hashAlg.name, hashAlg.hashLength, hashAlg.blockSize);
|
||||
KeyGenerator kg = JsseJce.getKeyGenerator(prfAlg);
|
||||
KeyGenerator kg = KeyGenerator.getInstance(prfAlg);
|
||||
kg.init(spec);
|
||||
SecretKey prfKey = kg.generateKey();
|
||||
if (!"RAW".equals(prfKey.getFormat())) {
|
||||
|
@ -309,7 +309,7 @@ final class Finished {
|
|||
TlsPrfParameterSpec spec = new TlsPrfParameterSpec(
|
||||
masterSecretKey, tlsLabel, seed, 12,
|
||||
hashAlg.name, hashAlg.hashLength, hashAlg.blockSize);
|
||||
KeyGenerator kg = JsseJce.getKeyGenerator(prfAlg);
|
||||
KeyGenerator kg = KeyGenerator.getInstance(prfAlg);
|
||||
kg.init(spec);
|
||||
SecretKey prfKey = kg.generateKey();
|
||||
if (!"RAW".equals(prfKey.getFormat())) {
|
||||
|
@ -350,7 +350,7 @@ final class Finished {
|
|||
String hmacAlg =
|
||||
"Hmac" + hashAlg.name.replace("-", "");
|
||||
try {
|
||||
Mac hmac = JsseJce.getMac(hmacAlg);
|
||||
Mac hmac = Mac.getInstance(hmacAlg);
|
||||
hmac.init(finishedSecret);
|
||||
return hmac.doFinal(context.handshakeHash.digest());
|
||||
} catch (NoSuchAlgorithmException |InvalidKeyException ex) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue