mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8286024: PKCS12 keystore shows "DES/CBC" as the algorithm of a DES SecretKeyEntry
Reviewed-by: valeriep
This commit is contained in:
parent
f973b78383
commit
50a4df87c8
2 changed files with 53 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2022, 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
|
||||
|
@ -405,6 +405,9 @@ public final class PKCS12KeyStore extends KeyStoreSpi {
|
|||
// decode secret key
|
||||
} else {
|
||||
byte[] keyBytes = in.getOctetString();
|
||||
if (keyAlgo.equals(KnownOIDs.OIW_DES_CBC.stdName())) {
|
||||
keyAlgo = "DES";
|
||||
}
|
||||
SecretKeySpec secretKeySpec =
|
||||
new SecretKeySpec(keyBytes, keyAlgo);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue