forked from eclipse-ee4j/eclipselink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JCEEncryptor default encryption algorithm upgrade (eclipse-ee4j#2004)
JCEEncryptor default encryption algorithm upgrade from AES/CBC/PKCS5Padding to AES/GCM/NoPadding . Plus extended unit test. - for AES/GCM/NoPadding random initialization vector (IV) instead of static one. - shell scripts added, resource strings moved to localization bundle DBWS builder test fix Signed-off-by: Radek Felcman <[email protected]>
- Loading branch information
Showing
11 changed files
with
428 additions
and
120 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
bundles/eclipselink/src/main/scripts/utils/security/passwordUpdate.cmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
@REM | ||
@REM Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
@REM | ||
@REM This program and the accompanying materials are made available under the | ||
@REM terms of the Eclipse Public License v. 2.0 which is available at | ||
@REM http://www.eclipse.org/legal/epl-2.0, | ||
@REM or the Eclipse Distribution License v. 1.0 which is available at | ||
@REM http://www.eclipse.org/org/documents/edl-v10.php. | ||
@REM | ||
@REM SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
@REM | ||
|
||
@REM Usage is `passwordUpdate.sh|.cmd -ip <old encrypted password>` | ||
@REM This application internally decrypt old encrypted password used by some previous version EclipseLink and encrypt it by latest algorithm. | ||
|
||
@echo off | ||
setlocal | ||
call "%~dp0../../bin/setenv.cmd" | ||
|
||
@REM User may increase Java memory setting(s) if desired: | ||
set JVM_ARGS=-Xmx256m | ||
|
||
REM Please do not change any of the following lines: | ||
set _FIXPATH= | ||
call :fixpath "%~dp0" | ||
set THIS=%_FIXPATH:~1% | ||
|
||
set CLASSPATH=%CLASSPATH%;%THIS%..\..\jlib\eclipselink.jar | ||
|
||
set PASSWORD_UPDATE_ARGS=%* | ||
|
||
%JAVA_HOME%\bin\java.exe %JVM_ARGS% -cp %CLASSPATH% org.eclipse.persistence.tools.security.JCEEncryptorCmd %PASSWORD_UPDATE_ARGS% | ||
|
||
endlocal | ||
goto :EOF | ||
|
||
:fixpath | ||
if not %1.==. ( | ||
for /f "tokens=1* delims=;" %%a in (%1) do ( | ||
call :shortfilename "%%a" & call :fixpath "%%b" | ||
) | ||
) | ||
goto :EOF | ||
|
||
:shortfilename | ||
for %%i in (%1) do set _FIXPATH=%_FIXPATH%;%%~fsi | ||
goto :EOF |
28 changes: 28 additions & 0 deletions
28
bundles/eclipselink/src/main/scripts/utils/security/passwordUpdate.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/sh | ||
# | ||
# Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License v. 2.0 which is available at | ||
# http://www.eclipse.org/legal/epl-2.0, | ||
# or the Eclipse Distribution License v. 1.0 which is available at | ||
# http://www.eclipse.org/org/documents/edl-v10.php. | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
# | ||
|
||
#Usage is `passwordUpdate.sh|.cmd -ip <old encrypted password>` | ||
#This application internally decrypt old encrypted password used by some previous version EclipseLink and encrypt it by latest algorithm. | ||
|
||
. `dirname $0`/../../bin/setenv.sh | ||
|
||
# User may increase Java memory setting(s) if desired: | ||
JVM_ARGS=-Xmx256m | ||
|
||
# Please do not change any of the following lines: | ||
CLASSPATH=`dirname $0`/../../jlib/eclipselink.jar: | ||
|
||
PASSWORD_UPDATE_ARGS="$@" | ||
|
||
${JAVA_HOME}/bin/java ${JVM_ARGS} -cp ${CLASSPATH} \ | ||
org.eclipse.persistence.tools.security.JCEEncryptorCmd ${PASSWORD_UPDATE_ARGS} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.