Skip to content

Commit

Permalink
8278080: Add --with-cacerts-src='user cacerts folder' to enable deter…
Browse files Browse the repository at this point in the history
…ministic cacerts generation

Reviewed-by: erikj
  • Loading branch information
Andrew Leonard committed Dec 2, 2021
1 parent 8d9cb2e commit dc2abc9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions make/autoconf/jdk-options.m4
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,23 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
fi
AC_SUBST(CACERTS_FILE)
# Choose cacerts source folder for user provided PEM files
AC_ARG_WITH(cacerts-src, [AS_HELP_STRING([--with-cacerts-src],
[specify alternative cacerts source folder containing certificates])])
CACERTS_SRC=""
AC_MSG_CHECKING([for cacerts source])
if test "x$with_cacerts_src" == x; then
AC_MSG_RESULT([default])
else
CACERTS_SRC=$with_cacerts_src
if test ! -d "$CACERTS_SRC"; then
AC_MSG_RESULT([fail])
AC_MSG_ERROR([Specified cacerts source folder "$CACERTS_SRC" does not exist])
fi
AC_MSG_RESULT([$CACERTS_SRC])
fi
AC_SUBST(CACERTS_SRC)
# Enable or disable unlimited crypto
UTIL_ARG_ENABLE(NAME: unlimited-crypto, DEFAULT: true, RESULT: UNLIMITED_CRYPTO,
DESC: [enable unlimited crypto policy])
Expand Down
2 changes: 2 additions & 0 deletions make/autoconf/spec.gmk.in
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ GTEST_FRAMEWORK_SRC := @GTEST_FRAMEWORK_SRC@

# Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@
# Source folder for user provided cacerts PEM files
CACERTS_SRC=@CACERTS_SRC@

# Enable unlimited crypto policy
UNLIMITED_CRYPTO=@UNLIMITED_CRYPTO@
Expand Down
3 changes: 3 additions & 0 deletions make/modules/java.base/Gendata.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ $(GENDATA_CACERTS): $(BUILD_TOOLS_JDK) $(wildcard $(GENDATA_CACERTS_SRC)/*)
ifeq ($(CACERTS_FILE), )
TARGETS += $(GENDATA_CACERTS)
endif
ifneq ($(CACERTS_SRC), )
GENDATA_CACERTS_SRC := $(CACERTS_SRC)
endif

################################################################################

Expand Down

3 comments on commit dc2abc9

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@andrew-m-leonard
Copy link

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on dc2abc9 Feb 15, 2022

Choose a reason for hiding this comment

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

@andrew-m-leonard the backport was successfully created on the branch andrew-m-leonard-backport-dc2abc9f in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit dc2abc9f from the openjdk/jdk repository.

The commit being backported was authored by Andrew Leonard on 2 Dec 2021 and was reviewed by Erik Joelsson.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev andrew-m-leonard-backport-dc2abc9f:andrew-m-leonard-backport-dc2abc9f
$ git checkout andrew-m-leonard-backport-dc2abc9f
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev andrew-m-leonard-backport-dc2abc9f

Please sign in to comment.