diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 444fe384cc6..a65d562b620 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -241,7 +241,7 @@ jobs:
with:
platform: macos-aarch64
runs-on: 'macos-14'
- xcode-toolset-version: '14.3.1'
+ xcode-toolset-version: '15.4'
configure-arguments: ${{ github.event.inputs.configure-arguments }}
make-arguments: ${{ github.event.inputs.make-arguments }}
if: needs.select.outputs.macos-aarch64 == 'true'
@@ -311,6 +311,7 @@ jobs:
platform: macos-x64
bootjdk-platform: macos-x64
runs-on: macos-13
+ xcode-toolset-version: '14.3.1'
test-macos-aarch64:
name: macos-aarch64
@@ -321,6 +322,7 @@ jobs:
platform: macos-aarch64
bootjdk-platform: macos-aarch64
runs-on: macos-14
+ xcode-toolset-version: '15.4'
test-windows-x64:
name: windows-x64
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a8885866c12..3517fa53941 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -37,6 +37,9 @@ on:
runs-on:
required: true
type: string
+ xcode-toolset-version:
+ required: false
+ type: string
env:
# These are needed to make the MSYS2 bash work properly
@@ -147,7 +150,7 @@ jobs:
run: |
# On macOS we need to install some dependencies for testing
brew install make
- sudo xcode-select --switch /Applications/Xcode_14.3.1.app/Contents/Developer
+ sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
# This will make GNU make available as 'make' and not only as 'gmake'
echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
if: runner.os == 'macOS'
diff --git a/README.md b/README.md
index e16457144a8..f1183e4dce5 100644
--- a/README.md
+++ b/README.md
@@ -23,14 +23,23 @@ _develop_
### OpenJDK Readme
```
-Welcome to the JDK!
-===================
+# Welcome to OpenJDK 21 Updates!
-For build instructions, please see either of these files:
+The JDK 21 Updates project uses two GitHub repositories.
+Updates are continuously developed in the repository [jdk21u-dev](https://github.com/openjdk/jdk21u-dev). This is the repository usually targeted by contributors.
+The [jdk21u](https://github.com/openjdk/jdk21u) repository is used for rampdown of the update releases of jdk21u and only accepts critical changes that must make the next release during rampdown. (You probably do not want to target jdk21u).
- * doc/building.html (html version)
- * doc/building.md (markdown version)
+For more OpenJDK 21 updates specific information such as timelines and contribution guidelines see the [project wiki page](https://wiki.openjdk.org/display/JDKUpdates/JDK+21u/).
+
+
+For build instructions please see the
+[online documentation](https://openjdk.org/groups/build/doc/building.html),
+or either of these files:
+
+- [doc/building.html](doc/building.html) (html version)
+- [doc/building.md](doc/building.md) (markdown version)
See for more information about the OpenJDK
Community and the JDK and see for JDK issue
tracking.
+
diff --git a/make/RunTests.gmk b/make/RunTests.gmk
index b82d2b2b601..bab0a146644 100644
--- a/make/RunTests.gmk
+++ b/make/RunTests.gmk
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2024, 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
@@ -743,8 +743,6 @@ define SetupRunJtregTestBody
# we may end up with a lot of JVM's
$1_JTREG_MAX_RAM_PERCENTAGE := $$(shell $(AWK) 'BEGIN { print 25 / $$($1_JTREG_JOBS); }')
- JTREG_TIMEOUT_FACTOR ?= 4
-
JTREG_VERBOSE ?= fail,error,summary
JTREG_RETAIN ?= fail,error
JTREG_TEST_THREAD_FACTORY ?=
@@ -832,6 +830,24 @@ define SetupRunJtregTestBody
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$($1_JTREG_PROBLEM_LIST))
endif
+ JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
+
+ JTREG_AUTO_PROBLEM_LISTS :=
+ JTREG_AUTO_TIMEOUT_FACTOR := 4
+
+ ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
+ JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
+ JTREG_AUTO_TIMEOUT_FACTOR := 10
+ endif
+
+ ifneq ($$(findstring -XX:+UseZGC, $$(JTREG_ALL_OPTIONS)), )
+ ifneq ($$(findstring -XX:-ZGenerational, $$(JTREG_ALL_OPTIONS)), )
+ JTREG_AUTO_PROBLEM_LISTS += ProblemList-zgc.txt
+ else
+ JTREG_AUTO_PROBLEM_LISTS += ProblemList-generational-zgc.txt
+ endif
+ endif
+
ifneq ($$(JTREG_EXTRA_PROBLEM_LISTS), )
# Accept both absolute paths as well as relative to the current test root.
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
@@ -863,6 +879,18 @@ define SetupRunJtregTestBody
$$(eval $$(call SetupRunJtregTestCustom, $1))
+ # SetupRunJtregTestCustom might also adjust JTREG_AUTO_ variables
+ # so set the final results after setting values from custom setup
+ ifneq ($$(JTREG_AUTO_PROBLEM_LISTS), )
+ # Accept both absolute paths as well as relative to the current test root.
+ $1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
+ $$(JTREG_AUTO_PROBLEM_LISTS) \
+ $$(addprefix $$($1_TEST_ROOT)/, $$(JTREG_AUTO_PROBLEM_LISTS)) \
+ ))
+ endif
+
+ JTREG_TIMEOUT_FACTOR ?= $$(JTREG_AUTO_TIMEOUT_FACTOR)
+
clean-outputdirs-$1:
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
$$(RM) -r $$($1_TEST_RESULTS_DIR)
diff --git a/src/hotspot/cpu/ppc/c2_init_ppc.cpp b/src/hotspot/cpu/ppc/c2_init_ppc.cpp
index d15f880e413..e517cdf7de1 100644
--- a/src/hotspot/cpu/ppc/c2_init_ppc.cpp
+++ b/src/hotspot/cpu/ppc/c2_init_ppc.cpp
@@ -34,21 +34,5 @@
// Processor dependent initialization of C2 compiler for ppc.
void Compile::pd_compiler2_init() {
-
- // Power7 and later.
- if (PowerArchitecturePPC64 > 6) {
- if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
- FLAG_SET_ERGO(UsePopCountInstruction, true);
- }
- }
-
- if (!VM_Version::has_isel() && FLAG_IS_DEFAULT(ConditionalMoveLimit)) {
- FLAG_SET_ERGO(ConditionalMoveLimit, 0);
- }
-
- if (OptimizeFill) {
- warning("OptimizeFill is not supported on this CPU.");
- FLAG_SET_DEFAULT(OptimizeFill, false);
- }
-
+ guarantee(CodeEntryAlignment >= InteriorEntryAlignment, "");
}
diff --git a/src/hotspot/cpu/ppc/vm_version_ppc.cpp b/src/hotspot/cpu/ppc/vm_version_ppc.cpp
index fbb99fd68d8..5c066b76047 100644
--- a/src/hotspot/cpu/ppc/vm_version_ppc.cpp
+++ b/src/hotspot/cpu/ppc/vm_version_ppc.cpp
@@ -118,6 +118,17 @@ void VM_Version::initialize() {
FLAG_SET_ERGO(TrapBasedRangeChecks, false);
}
+ // Power7 and later.
+ if (PowerArchitecturePPC64 > 6) {
+ if (FLAG_IS_DEFAULT(UsePopCountInstruction)) {
+ FLAG_SET_ERGO(UsePopCountInstruction, true);
+ }
+ }
+
+ if (!VM_Version::has_isel() && FLAG_IS_DEFAULT(ConditionalMoveLimit)) {
+ FLAG_SET_ERGO(ConditionalMoveLimit, 0);
+ }
+
if (PowerArchitecturePPC64 >= 8) {
if (FLAG_IS_DEFAULT(SuperwordUseVSX)) {
FLAG_SET_ERGO(SuperwordUseVSX, true);
@@ -177,6 +188,17 @@ void VM_Version::initialize() {
FLAG_SET_DEFAULT(UseByteReverseInstructions, false);
}
}
+
+ if (OptimizeFill) {
+ warning("OptimizeFill is not supported on this CPU.");
+ FLAG_SET_DEFAULT(OptimizeFill, false);
+ }
+
+ if (OptoScheduling) {
+ // The OptoScheduling information is not maintained in ppd.ad.
+ warning("OptoScheduling is not supported on this CPU.");
+ FLAG_SET_DEFAULT(OptoScheduling, false);
+ }
#endif
// Create and print feature-string.
diff --git a/src/hotspot/cpu/s390/s390.ad b/src/hotspot/cpu/s390/s390.ad
index 32e5323b6b2..89c2d538092 100644
--- a/src/hotspot/cpu/s390/s390.ad
+++ b/src/hotspot/cpu/s390/s390.ad
@@ -2641,7 +2641,7 @@ operand uimmI5() %{
// operand type int
// Unsigned Integer Immediate: 9-bit
operand SSlenDW() %{
- predicate(Immediate::is_uimm8(n->get_long()-1));
+ predicate(Immediate::is_uimm8((julong)n->get_long()-1));
match(ConL);
op_cost(1);
format %{ %}
diff --git a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
index 6cee67a867e..130219e2131 100644
--- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
+++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
@@ -539,6 +539,21 @@ void os::print_context(outputStream *st, const void *context) {
st->print(", ERR=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.gregs[REG_ERR]);
st->cr();
st->print(" TRAPNO=" INTPTR_FORMAT, (intptr_t)uc->uc_mcontext.gregs[REG_TRAPNO]);
+ // Add XMM registers + MXCSR. Note that C2 uses XMM to spill GPR values including pointers.
+ st->cr();
+ st->cr();
+ // Sanity check: fpregs should point into the context.
+ if ((address)uc->uc_mcontext.fpregs < (address)uc ||
+ pointer_delta(uc->uc_mcontext.fpregs, uc, 1) >= sizeof(ucontext_t)) {
+ st->print_cr("bad uc->uc_mcontext.fpregs: " INTPTR_FORMAT " (uc: " INTPTR_FORMAT ")",
+ p2i(uc->uc_mcontext.fpregs), p2i(uc));
+ } else {
+ for (int i = 0; i < 16; ++i) {
+ const int64_t* xmm_val_addr = (int64_t*)&(uc->uc_mcontext.fpregs->_xmm[i]);
+ st->print_cr("XMM[%d]=" INTPTR_FORMAT " " INTPTR_FORMAT, i, xmm_val_addr[1], xmm_val_addr[0]);
+ }
+ st->print(" MXCSR=" UINT32_FORMAT_X_0, uc->uc_mcontext.fpregs->mxcsr);
+ }
#else
st->print( "EAX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EAX]);
st->print(", EBX=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EBX]);
diff --git a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp
index abd1a22ea2d..5bb0f956ad6 100644
--- a/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp
+++ b/src/hotspot/os_cpu/windows_x86/os_windows_x86.cpp
@@ -433,6 +433,15 @@ void os::print_context(outputStream *st, const void *context) {
st->cr();
st->print( "RIP=" INTPTR_FORMAT, uc->Rip);
st->print(", EFLAGS=" INTPTR_FORMAT, uc->EFlags);
+ // Add XMM registers + MXCSR. Note that C2 uses XMM to spill GPR values including pointers.
+ st->cr();
+ st->cr();
+ for (int i = 0; i < 16; ++i) {
+ const uint64_t *xmm = ((const uint64_t*)&(uc->Xmm0)) + 2 * i;
+ st->print_cr("XMM[%d]=" INTPTR_FORMAT " " INTPTR_FORMAT,
+ i, xmm[1], xmm[0]);
+ }
+ st->print(" MXCSR=" UINT32_FORMAT_X_0, uc->MxCsr);
#else
st->print( "EAX=" INTPTR_FORMAT, uc->Eax);
st->print(", EBX=" INTPTR_FORMAT, uc->Ebx);
diff --git a/src/hotspot/share/ci/ciEnv.cpp b/src/hotspot/share/ci/ciEnv.cpp
index c3eaec2ea97..6112b46ac62 100644
--- a/src/hotspot/share/ci/ciEnv.cpp
+++ b/src/hotspot/share/ci/ciEnv.cpp
@@ -1655,6 +1655,8 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {
NoSafepointVerifier no_safepoint;
ResourceMark rm;
+ assert(this->task() != nullptr, "task must not be null");
+
dump_replay_data_version(out);
#if INCLUDE_JVMTI
out->print_cr("JvmtiExport can_access_local_variables %d", _jvmti_can_access_local_variables);
@@ -1675,9 +1677,7 @@ void ciEnv::dump_replay_data_helper(outputStream* out) {
objects->at(i)->dump_replay_data(out);
}
- if (this->task() != nullptr) {
- dump_compile_data(out);
- }
+ dump_compile_data(out);
out->flush();
}
diff --git a/src/hotspot/share/gc/z/zDirector.cpp b/src/hotspot/share/gc/z/zDirector.cpp
index c67d3eb07c1..2b0e70a0016 100644
--- a/src/hotspot/share/gc/z/zDirector.cpp
+++ b/src/hotspot/share/gc/z/zDirector.cpp
@@ -535,6 +535,19 @@ static double calculate_young_to_old_worker_ratio(const ZDirectorStats& stats) {
const size_t reclaimed_per_old_gc = stats._old_stats._stat_heap._reclaimed_avg;
const double current_young_bytes_freed_per_gc_time = double(reclaimed_per_young_gc) / double(young_gc_time);
const double current_old_bytes_freed_per_gc_time = double(reclaimed_per_old_gc) / double(old_gc_time);
+
+ if (current_young_bytes_freed_per_gc_time == 0.0) {
+ if (current_old_bytes_freed_per_gc_time == 0.0) {
+ // Neither young nor old collections have reclaimed any memory.
+ // Give them equal priority.
+ return 1.0;
+ }
+
+ // Only old collections have reclaimed memory.
+ // Prioritize old.
+ return ZOldGCThreads;
+ }
+
const double old_vs_young_efficiency_ratio = current_old_bytes_freed_per_gc_time / current_young_bytes_freed_per_gc_time;
return old_vs_young_efficiency_ratio;
diff --git a/src/hotspot/share/runtime/sharedRuntimeTrans.cpp b/src/hotspot/share/runtime/sharedRuntimeTrans.cpp
index 40baf4fc768..6a698bfe9c3 100644
--- a/src/hotspot/share/runtime/sharedRuntimeTrans.cpp
+++ b/src/hotspot/share/runtime/sharedRuntimeTrans.cpp
@@ -26,6 +26,9 @@
#include "jni.h"
#include "runtime/interfaceSupport.inline.hpp"
#include "runtime/sharedRuntime.hpp"
+#include "sanitizers/ub.hpp"
+
+#include
// This file contains copies of the fdlibm routines used by
// StrictMath. It turns out that it is almost always required to use
@@ -110,11 +113,14 @@ ln2_hi = 6.93147180369123816490e-01, /* 3fe62e42 fee00000 */
static double zero = 0.0;
+ATTRIBUTE_NO_UBSAN
static double __ieee754_log(double x) {
double hfsq,f,s,z,R,w,t1,t2,dk;
int k,hx,i,j;
unsigned lx;
+ static_assert(std::numeric_limits::is_iec559, "IEEE 754 required");
+
hx = high(x); /* high word of x */
lx = low(x); /* low word of x */
@@ -204,11 +210,14 @@ ivln10 = 4.34294481903251816668e-01, /* 0x3FDBCB7B, 0x1526E50E */
log10_2hi = 3.01029995663611771306e-01, /* 0x3FD34413, 0x509F6000 */
log10_2lo = 3.69423907715893078616e-13; /* 0x3D59FEF3, 0x11F12B36 */
+ATTRIBUTE_NO_UBSAN
static double __ieee754_log10(double x) {
double y,z;
int i,k,hx;
unsigned lx;
+ static_assert(std::numeric_limits::is_iec559, "IEEE 754 required");
+
hx = high(x); /* high word of x */
lx = low(x); /* low word of x */
@@ -440,13 +449,16 @@ bp[] = {1.0, 1.5,},
ivln2_h = 1.44269502162933349609e+00, /* 0x3FF71547, 0x60000000 =24b 1/ln2*/
ivln2_l = 1.92596299112661746887e-08; /* 0x3E54AE0B, 0xF85DDF44 =1/ln2 tail*/
-double __ieee754_pow(double x, double y) {
+ATTRIBUTE_NO_UBSAN
+static double __ieee754_pow(double x, double y) {
double z,ax,z_h,z_l,p_h,p_l;
double y1,t1,t2,r,s,t,u,v,w;
int i0,i1,i,j,k,yisint,n;
int hx,hy,ix,iy;
unsigned lx,ly;
+ static_assert(std::numeric_limits::is_iec559, "IEEE 754 required");
+
i0 = ((*(int*)&one)>>29)^1; i1=1-i0;
hx = high(x); lx = low(x);
hy = high(y); ly = low(y);
diff --git a/src/hotspot/share/utilities/debug.cpp b/src/hotspot/share/utilities/debug.cpp
index f0047396512..051fdb3f559 100644
--- a/src/hotspot/share/utilities/debug.cpp
+++ b/src/hotspot/share/utilities/debug.cpp
@@ -726,10 +726,22 @@ void disarm_assert_poison() {
static void store_context(const void* context) {
memcpy(&g_stored_assertion_context, context, sizeof(ucontext_t));
-#if defined(LINUX) && defined(PPC64)
+#if defined(LINUX)
// on Linux ppc64, ucontext_t contains pointers into itself which have to be patched up
// after copying the context (see comment in sys/ucontext.h):
+#if defined(PPC64)
*((void**) &g_stored_assertion_context.uc_mcontext.regs) = &(g_stored_assertion_context.uc_mcontext.gp_regs);
+#elif defined(AMD64)
+ // In the copied version, fpregs should point to the copied contents.
+ // Sanity check: fpregs should point into the context.
+ if ((address)((const ucontext_t*)context)->uc_mcontext.fpregs > (address)context) {
+ size_t fpregs_offset = pointer_delta(((const ucontext_t*)context)->uc_mcontext.fpregs, context, 1);
+ if (fpregs_offset < sizeof(ucontext_t)) {
+ // Preserve the offset.
+ *((void**) &g_stored_assertion_context.uc_mcontext.fpregs) = (void*)((address)(void*)&g_stored_assertion_context + fpregs_offset);
+ }
+ }
+#endif
#endif
}
diff --git a/src/hotspot/share/utilities/vmError.cpp b/src/hotspot/share/utilities/vmError.cpp
index 741ede5d41e..851ce3df516 100644
--- a/src/hotspot/share/utilities/vmError.cpp
+++ b/src/hotspot/share/utilities/vmError.cpp
@@ -1838,7 +1838,7 @@ void VMError::report_and_die(int id, const char* message, const char* detail_fmt
if (DumpReplayDataOnError && _thread && _thread->is_Compiler_thread() && !skip_replay) {
skip_replay = true;
ciEnv* env = ciEnv::current();
- if (env != nullptr) {
+ if (env != nullptr && env->task() != nullptr) {
const bool overwrite = false; // We do not overwrite an existing replay file.
int fd = prepare_log_file(ReplayDataFile, "replay_pid%p.log", overwrite, buffer, sizeof(buffer));
if (fd != -1) {
diff --git a/src/java.base/share/native/libjava/ub.h b/src/java.base/share/native/libjava/ub.h
new file mode 100644
index 00000000000..cf7f491ca45
--- /dev/null
+++ b/src/java.base/share/native/libjava/ub.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2024 SAP SE. 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#ifndef _UB_H_
+#define _UB_H_
+
+/* ATTRIBUTE_NO_UBSAN - Function attribute which informs the compiler to disable UBSan checks in the
+ * following function or method.
+ */
+#ifdef UNDEFINED_BEHAVIOR_SANITIZER
+#if defined(__clang__) || defined(__GNUC__)
+#define ATTRIBUTE_NO_UBSAN __attribute__((no_sanitize("undefined")))
+#endif
+#endif
+
+#ifndef ATTRIBUTE_NO_UBSAN
+#define ATTRIBUTE_NO_UBSAN
+#endif
+
+#endif
diff --git a/src/java.desktop/share/native/libawt/java2d/loops/IntRgb.c b/src/java.desktop/share/native/libawt/java2d/loops/IntRgb.c
index 7155f70b472..aec11d17c89 100644
--- a/src/java.desktop/share/native/libawt/java2d/loops/IntRgb.c
+++ b/src/java.desktop/share/native/libawt/java2d/loops/IntRgb.c
@@ -34,6 +34,8 @@
#include "ByteGray.h"
#include "Index12Gray.h"
+#include "ub.h"
+
/*
* This file declares, registers, and defines the various graphics
* primitive loops to manipulate surfaces of type "IntRgb".
@@ -166,6 +168,7 @@ DEFINE_ALPHA_MASKBLIT(IntArgbPre, IntRgb, 4ByteArgb)
DEFINE_ALPHA_MASKBLIT(IntRgb, IntRgb, 4ByteArgb)
+ATTRIBUTE_NO_UBSAN
DEFINE_SOLID_DRAWGLYPHLISTAA(IntRgb, 3ByteRgb)
DEFINE_SOLID_DRAWGLYPHLISTLCD(IntRgb, 3ByteRgb)
diff --git a/src/jdk.jfr/share/classes/jdk/jfr/internal/StringPool.java b/src/jdk.jfr/share/classes/jdk/jfr/internal/StringPool.java
index 6513895069e..ecd8d7aad24 100644
--- a/src/jdk.jfr/share/classes/jdk/jfr/internal/StringPool.java
+++ b/src/jdk.jfr/share/classes/jdk/jfr/internal/StringPool.java
@@ -29,8 +29,8 @@
public final class StringPool {
public static final int MIN_LIMIT = 16;
- public static final int MAX_LIMIT = 128; /* 0 MAX means disabled */
-
+ public static final int MAX_LIMIT = 131072; /* 0 MAX means disabled */
+ private static final int PRECACHE_THRESHOLD = 128;
private static final long DO_NOT_POOL = -1;
/* max size */
private static final int MAX_SIZE = 32 * 1024;
@@ -114,7 +114,7 @@ public static long addString(String s) {
if (lsid != null) {
return ensureCurrentGeneration(s, lsid);
}
- if (!preCache(s)) {
+ if (s.length() <= PRECACHE_THRESHOLD && !preCache(s)) {
/* we should not pool this string */
return DO_NOT_POOL;
}
diff --git a/test/hotspot/jtreg/ProblemList.txt b/test/hotspot/jtreg/ProblemList.txt
index c0f68e67f0c..5213d98286b 100644
--- a/test/hotspot/jtreg/ProblemList.txt
+++ b/test/hotspot/jtreg/ProblemList.txt
@@ -111,6 +111,7 @@ runtime/CompressedOops/CompressedClassPointers.java 8305765 generic-all
runtime/StackGuardPages/TestStackGuardPagesNative.java 8303612 linux-all
runtime/ErrorHandling/TestDwarf.java#checkDecoder 8305489 linux-all
runtime/ErrorHandling/MachCodeFramesInErrorFile.java 8313315 linux-ppc64le
+runtime/NMT/VirtualAllocCommitMerge.java 8309698 linux-s390x
applications/jcstress/copy.java 8229852 linux-all
diff --git a/test/jdk/com/sun/crypto/provider/CICO/CICOSkipTest.java b/test/jdk/com/sun/crypto/provider/CICO/CICOSkipTest.java
index 6ccf4c1eedf..d0af93ff646 100644
--- a/test/jdk/com/sun/crypto/provider/CICO/CICOSkipTest.java
+++ b/test/jdk/com/sun/crypto/provider/CICO/CICOSkipTest.java
@@ -75,7 +75,7 @@ public class CICOSkipTest {
"OFB", "OFB64", "PCBC"};
private static final String[] PADDINGS = {"NoPadding", "Pkcs5Padding"};
private static final String[] PBE_ALGOS = {"PBEWithMD5AndDES",
- "PBEWithMD5AndDES/CBC/PKCS5Padding"};
+ "PBEWithMD5AndDES/CBC/PKCS5Padding", "PBEWithSHA1AndDESede"};
public static void main(String[] args) throws Exception {
// how many kinds of padding mode such as PKCS5padding and NoPadding
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/DES/KeyWrapping.java b/test/jdk/com/sun/crypto/provider/Cipher/DES/KeyWrapping.java
index 6939dd27974..a71390b504e 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/DES/KeyWrapping.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/DES/KeyWrapping.java
@@ -24,11 +24,13 @@
/*
* @test
* @bug 0000000
+ * @library /test/lib
* @summary KeyWrapping
* @author Jan Luehe
*/
import javax.crypto.*;
import java.security.*;
+import jdk.test.lib.security.SecurityUtils;
public class KeyWrapping {
@@ -71,8 +73,9 @@ public static void main(String[] args) throws Exception {
if (!msg.equals(new String(clearText)))
throw new Exception("The unwrapped session key is corrupted.");
- KeyPairGenerator kpairGen = KeyPairGenerator.getInstance("DSA");
- kpairGen.initialize(1024);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator kpairGen = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpairGen.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kpair = kpairGen.genKeyPair();
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/DES/Sealtest.java b/test/jdk/com/sun/crypto/provider/Cipher/DES/Sealtest.java
index abc536f14e2..d4b2173358c 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/DES/Sealtest.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/DES/Sealtest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, 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
@@ -24,20 +24,23 @@
/*
* @test
* @bug 0000000 7055362
+ * @library /test/lib
* @summary Sealtest
* @author Jan Luehe
*/
import java.io.*;
import java.security.*;
import javax.crypto.*;
+import jdk.test.lib.security.SecurityUtils;
public class Sealtest {
public static void main(String[] args) throws Exception {
// create DSA keypair
- KeyPairGenerator kpgen = KeyPairGenerator.getInstance("DSA");
- kpgen.initialize(512);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator kpgen = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpgen.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpgen.generateKeyPair();
// create DES key
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java b/test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java
index 01659f56826..2ae0d91d592 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/KeyWrap/TestCipherKeyWrapperTest.java
@@ -50,10 +50,12 @@
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
+import jdk.test.lib.security.SecurityUtils;
/*
* @test
* @bug 8048599 8248268 8288050
+ * @library /test/lib
* @summary Tests for key wrap and unwrap operations
*/
@@ -165,7 +167,8 @@ public static void main(String[] args) throws Exception {
test.wrapperPBEKeyTest(provider);
// Public and private key wrap test
- test.wrapperPublicPriviteKeyTest(provider, publicPrivateAlgos);
+ test.wrapperPublicPriviteKeyTest(provider, publicPrivateAlgos, "DES");
+ test.wrapperPublicPriviteKeyTest(provider, publicPrivateAlgos, "AES");
}
private void wrapperAesDESedeKeyTest(String algo, String wrapAlgo,
@@ -261,7 +264,7 @@ private void wrapperPBEKeyTest(Provider p) throws InvalidKeySpecException,
}
}
- private void wrapperPublicPriviteKeyTest(Provider p, String[] algorithms)
+ private void wrapperPublicPriviteKeyTest(Provider p, String[] algorithms, String algoWrap)
throws NoSuchAlgorithmException, InvalidKeyException,
NoSuchPaddingException, IllegalBlockSizeException,
InvalidAlgorithmParameterException {
@@ -270,10 +273,9 @@ private void wrapperPublicPriviteKeyTest(Provider p, String[] algorithms)
System.out.println("Generate key pair (algorithm: " + algo
+ ", provider: " + p.getName() + ")");
KeyPairGenerator kpg = KeyPairGenerator.getInstance(algo);
- kpg.initialize(512);
+ kpg.initialize(SecurityUtils.getTestKeySize(algo));
KeyPair kp = kpg.genKeyPair();
// key generated
- String algoWrap = "DES";
KeyGenerator kg = KeyGenerator.getInstance(algoWrap, p);
Key key = kg.generateKey();
wrapTest(algo, algoWrap, key, kp.getPrivate(), Cipher.PRIVATE_KEY,
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeyCleanupTest.java b/test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeyCleanupTest.java
index 5bdc8f0fc3c..77cf745fb3b 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeyCleanupTest.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/PBE/PBEKeyCleanupTest.java
@@ -23,6 +23,7 @@
/*
* @test
+ * @library /test/lib
* @modules java.base/com.sun.crypto.provider:+open
* @run main/othervm PBEKeyCleanupTest
* @summary Verify that key storage is cleared
@@ -38,6 +39,7 @@
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.PBEKeySpec;
+import jdk.test.lib.security.SecurityUtils;
/**
* Test that the array holding the key bytes is cleared when it is
@@ -67,7 +69,7 @@ private static void testPBESecret(String algorithm) throws Exception {
}
private static void testPBKSecret(String algorithm) throws Exception {
- byte[] salt = new byte[8];
+ byte[] salt = new byte[SecurityUtils.getTestSaltSize()];
new Random().nextBytes(salt);
char[] password = new char[] {'f', 'o', 'o'};
PBEKeySpec pbeKeySpec = new PBEKeySpec(PASS_PHRASE.toCharArray(), salt,
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/PBE/TestCipherPBECons.java b/test/jdk/com/sun/crypto/provider/Cipher/PBE/TestCipherPBECons.java
index 788f27bcb47..a3432c1ba93 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/PBE/TestCipherPBECons.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/PBE/TestCipherPBECons.java
@@ -40,7 +40,7 @@
public class TestCipherPBECons {
private static final String[] PBEAlgorithms = {"pbeWithMD5ANDdes",
- "PBEWithMD5AndTripleDES"};
+ "PBEWithMD5AndTripleDES", "PBEWithSHA1AndDESede"};
private static final String[] cipherModes = {"ECb", "cbC", "cFB", "Cfb32",
"OfB", "oFb64", "pCbC"};
private static final String[] cipherPaddings = {"Pkcs5Padding", "NoPaDDing"};
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java
index cbc64bebd50..3bacff7617d 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPPadding.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 8020081 8022669
+ * @library /test/lib
* @summary encryption/decryption test for using OAEPPadding with
* OAEPParameterSpec specified and not specified during a Cipher.init().
* @author Anthony Scarpino
@@ -43,7 +44,7 @@
import javax.crypto.spec.OAEPParameterSpec;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.spec.PSource;
-
+import jdk.test.lib.security.SecurityUtils;
public class TestOAEPPadding {
private static RSAPrivateKey privateKey;
@@ -57,8 +58,9 @@ public static void main(String args[]) throws Exception {
System.out.println("Testing provider " + cp.getName() + "...");
Provider kfp = Security.getProvider(
System.getProperty("test.provider.name", "SunRsaSign"));
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", kfp);
- kpg.initialize(2048);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, kfp);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
privateKey = (RSAPrivateKey)kp.getPrivate();
publicKey = (RSAPublicKey)kp.getPublic();
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPWithParams.java b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPWithParams.java
index 85a8a70ea83..6cf66178da7 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPWithParams.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestOAEPWithParams.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 4923484 8146293
+ * @library /test/lib
* @summary encryption/decryption test for using OAEPParameterSpec.
* @author Valerie Peng
*/
@@ -35,6 +36,7 @@
import javax.crypto.*;
import javax.crypto.spec.PSource;
import javax.crypto.spec.OAEPParameterSpec;
+import jdk.test.lib.security.SecurityUtils;
public class TestOAEPWithParams {
@@ -59,8 +61,9 @@ public static void main(String[] args) throws Exception {
System.out.println("Testing provider " + cp.getName() + "...");
Provider kfp = Security.getProvider(
System.getProperty("test.provider.name", "SunRsaSign"));
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", kfp);
- kpg.initialize(768);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, kfp);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
privateKey = kp.getPrivate();
publicKey = kp.getPublic();
diff --git a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestRSA.java b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
index 576fc5fcd60..610890a5247 100644
--- a/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
+++ b/test/jdk/com/sun/crypto/provider/Cipher/RSA/TestRSA.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2024, 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
@@ -101,20 +101,28 @@ private static int nextNibble(StringReader r) throws IOException {
}
private final static BigInteger N = new BigInteger
- ("116231208661367609700141079576488663663527180869991078124978203037949869"
- +"312762870627991319537001781149083155962615105864954367253799351549459177"
- +"839995715202060014346744789001273681801687605044315560723525700773069112"
- +"214443196787519930666193675297582113726306864236010438506452172563580739"
- +"994193451997175316921");
+ ("188266606413163647033284152746165049309898453322378171182320013745371408"
+ +"184225151227340555539225381200565037956400694325061098310480360339435446"
+ +"755336872372614880713694669514510970895097323213784523223711244354375506"
+ +"545371740274561954822416119304686041493350049135717091225288845575963270"
+ +"990119098295690603875646206002898855577388327774594330896529948536446408"
+ +"529165060686851725546480612209956477350581924733034990053737541249952501"
+ +"521769091148873248215142518797910690254486909784694829645856181407041627"
+ +"170373444275842961547787746324163594572697634605250977434548015081503826"
+ +"85269006571608614747965903308253511034583");
private final static BigInteger E = BigInteger.valueOf(65537);
private final static BigInteger D = new BigInteger
- ("528278531576995741358027120152717979850387435582102361125581844437708890"
- +"736418759997555187916546691958396015481089485084669078137376029510618510"
- +"203389286674134146181629472813419906337170366867244770096128371742241254"
- +"843638089774095747779777512895029847721754360216404183209801002443859648"
- +"26168432372077852785");
+ ("559658959270449023652159986632594861346314765962941829914811303419116045"
+ +"486272857832294696380057096672262714220410818939360476461317579410769250"
+ +"330981320689411092912185059149606517928125605236733543203155054153225543"
+ +"370812803235323701309554652228655108862291812277980776744407549833834128"
+ +"186640306349843950814414209051640048163781518404082259622597528271617305"
+ +"214590875955949331568915021275293633454662841999317653268823194135508673"
+ +"577887397954709453731172900970199673444683653554380810128925964066225098"
+ +"009484055412274405773246950554037029408478181447349886871279557912030178"
+ +"079306593910311097342934485929224862873");
private final static Random RANDOM = new Random();
@@ -154,16 +162,16 @@ public static void testKat(String alg, int mode, Key key, String in, String out,
}
private final static String in2 = "0f:7d:6c:20:75:99:a5:bc:c1:53:b0:4e:8d:ef:98:fb:cf:2d:e5:1d:d4:bf:71:56:12:b7:a3:c3:e4:53:1b:07:d3:bb:94:a7:a7:28:75:1e:83:46:c9:80:4e:3f:ac:b2:47:06:9f:1b:68:38:73:b8:69:9e:6b:8b:8b:23:60:31:ae:ea:36:24:6f:85:af:de:a5:2a:88:7d:6a:9f:8a:9f:61:f6:59:3f:a8:ce:91:75:49:e9:34:b8:9f:b6:21:8c";
- private final static String out2 = "7d:84:d1:3a:dc:ac:46:09:3a:0c:e5:4b:85:5d:fa:bb:52:f1:0f:de:d9:87:ef:b3:f7:c8:e3:9a:29:be:e9:b5:51:57:fd:07:5b:3c:1c:1c:56:aa:0c:a6:3f:79:40:16:ee:2c:2c:2e:fe:b8:3e:fd:45:90:1c:e7:87:1d:0a:0a:c5:de:9d:2b:a9:dd:77:d2:89:ba:98:fe:78:5b:a3:91:b4:ac:b5:ae:ce:45:21:f7:74:97:3e:a9:58:59:bc:14:13:02:3f:09:7b:97:90:b3:bd:53:cb:15:c0:6e:36:ea:d4:a3:3e:fc:94:85:a9:66:7f:57:b4:2a:ae:70:2e:fb";
+ private final static String out2 = "4d:17:15:23:d9:f6:97:4d:4b:5b:9b:37:bd:a7:c5:33:b9:40:1f:c4:63:fa:7c:2a:fb:19:0b:d8:c4:3a:bd:e7:46:6b:1b:09:20:93:39:7c:e5:5f:7b:83:a7:a6:f6:f5:42:20:e7:7f:d3:14:9a:14:25:f9:31:9e:3c:c9:04:20:be:31:ac:77:45:37:4d:76:1b:10:3a:aa:42:c7:df:4c:61:a4:35:4d:28:41:c2:f9:b7:ce:00:94:42:06:c7:35:06:ca:f2:9e:96:c3:89:54:10:82:d8:de:f3:6c:23:8c:47:41:5a:13:fa:33:e0:a5:7f:ec:43:5d:b0:ea:c9:43:17:72:73:ce:11:48:fb:19:ee:13:6a:92:13:06:5c:55:dc:9e:86:b9:fb:44:62:44:9e:a9:e8:bd:6a:c0:c1:64:4b:fd:a9:5d:ef:59:1e:16:fe:64:c1:07:31:9e:9f:4d:4e:28:34:ea:39:e0:65:68:d4:8b:02:0b:8b:ed:bb:a6:a6:4a:29:b9:b5:08:f3:7a:a8:fd:03:3e:0d:d0:9e:25:47:2c:45:f2:40:39:58:e8:95:64:04:2b:50:1e:a5:ff:00:a4:cf:a9:13:4b:17:3a:e8:d1:2c:c1:4a:ab:1c:07:b4:b5:f6:c9:3f:38:48:89:55:59:00:c1:25:c9:d7:68";
private final static String in1 = "17:a3:a7:b1:86:29:06:c5:81:33:cd:2f:da:32:7c:0e:26:a8:18:aa:37:9b:dd:4a:b0:b0:a7:1c:14:82:6c:d9:c9:14:9f:55:19:91:02:0d:d9:d7:95:c2:2b:a6:fa:ba:a3:51:00:83:6b:ec:97:27:40:a3:8f:ba:b1:09:15:11:44:33:c6:3c:47:95:50:71:50:5a:f4:aa:00:4e:b9:48:6a:b1:34:e9:d0:c8:b8:92:bf:95:f3:3d:91:66:93:2b";
- private final static String out1 = "28:b7:b4:73:f2:16:11:c0:67:70:96:ee:dc:3e:23:87:9f:30:a7:e5:f0:db:aa:67:33:27:0e:75:79:af:29:f5:88:3d:93:22:14:d2:59:b4:eb:ce:95:7f:24:74:df:f2:aa:4d:e6:65:5a:63:6d:64:30:ef:31:f1:a6:df:17:42:b6:d1:ed:22:1f:b0:96:69:9d:f8:ce:ff:3a:47:96:51:ba:d9:8d:57:39:40:dc:fc:d3:03:92:39:f4:dd:4b:1b:07:8b:33:60:27:2d:5f:c6:cf:17:92:c6:12:69:a3:54:2e:b8:0f:ca:d9:46:0f:da:95:34:d0:84:35:9c:f6:44";
+ private final static String out1 = "18:6d:d2:89:43:cb:ec:5c:ff:3d:fd:d5:23:2d:aa:fc:db:a7:63:5f:c7:2d:6f:81:c2:9f:aa:47:ed:fc:79:39:8a:6d:8f:c3:d0:f9:64:c3:e1:5f:1a:b3:20:03:1e:8a:3a:c5:58:ef:78:6b:fc:50:98:0a:11:d3:30:d9:68:44:9b:93:a6:b3:92:8f:09:0c:7a:d0:64:ac:e2:c7:b5:6a:37:35:00:3b:4e:d7:64:fb:54:c2:54:90:b9:71:6a:48:c4:6c:1e:e4:e6:4c:3f:fc:34:69:16:b9:53:8c:9f:30:4e:2e:7e:9c:fb:5f:26:18:c0:6e:69:32:18:30:40:59:8c:d1:c2:7a:41:75:06:9d:1c:0f:14:74:a9:f0:47:3a:97:0d:c4:c6:3f:24:ee:ed:c5:f8:2c:b6:ae:1d:e5:64:33:cd:e1:e0:21:d6:10:c0:8b:59:06:59:81:73:28:b4:f4:ef:fa:e8:67:a8:65:a5:e4:3c:c3:7e:99:f8:55:7a:e9:0d:41:3a:bf:c1:8c:41:f3:71:32:b6:c0:05:8b:91:8a:90:35:60:95:52:78:8e:a7:e5:a9:a1:bf:a3:de:55:c6:02:03:d5:98:01:59:fb:91:da:37:9e:3f:39:85:e1:3f:79:23:6c:0e:68:25:4c:13:3a:52:a2:f8:d9:4c:ce";
- private final static String rin1 = "09:01:06:53:a7:96:09:63:ef:e1:3f:e9:8d:95:22:d1:0e:1b:87:c1:a2:41:b2:09:97:a3:5e:e0:a4:1d:59:91:21:e4:ca:87:bf:77:4a:7e:a2:22:ff:59:1e:bd:a4:80:aa:93:4a:41:56:95:5b:f4:57:df:fc:52:2f:46:9b:45:d7:03:ae:22:8e:67:9e:6c:b9:95:4f:bd:8e:e8:67:90:5b:fe:de:2f:11:22:2e:9d:30:93:6d:c0:48:00:cb:08:b9:c4:36:e9:03:7c:08:2d:68:42:cb:71:d0:7d:47:22:c1:58:c5:b8:2f:28:3e:98:78:11:6d:71:5b:3b:36:3c";
- private final static String rout1 = "4a:21:64:20:56:5f:27:0c:90:1d:f3:1b:64:8e:16:d3:af:79:ca:c6:65:56:19:77:8f:25:35:70:be:f3:15:b3:e3:d8:8f:04:ec:c3:60:59:d0:9a:66:be:1c:ad:f7:09:46:a9:09:46:12:5f:28:b6:28:b1:53:fb:fe:07:73:b8:8b:f8:83:64:8e:2d:45:ca:1a:fd:85:4a:2c:fa:fc:e6:58:f7:e4:83:68:8c:38:49:2b:f3:5c:c1:2d:24:6a:cd:22:6d:cb:f4:f1:8c:9e:1a:94:a7:4b:6f:d1:b4:b4:ab:56:8b:a3:a9:89:88:c3:5d:a8:47:2a:67:50:32:71:19";
+ private final static String rin1 = "09:01:06:53:a7:96:09:63:ef:e1:3f:e9:8d:95:22:d1:0e:1b:87:c1:a2:41:b2:09:97:a3:5e:e0:a4:1d:59:91:21:e4:ca:87:bf:77:4a:7e:a2:22:ff:59:1e:bd:a4:80:aa:93:4a:41:56:95:5b:f4:57:df:fc:52:2f:46:9b:45:d7:03:ae:22:8e:67:9e:6c:b9:95:4f:bd:8e:e8:67:90:5b:fe:de:2f:11:22:2e:9d:30:93:6d:c0:48:00:cb:08:b9:c4:36:e9:03:7c:08:2d:68:42:cb:71:d0:7d:47:22:c1:58:c5:b8:2f:28:3e:98:78:11:6d:71:5b:3b:36:3c:09:01:06:53:a7:96:09:63:ef:e1:3f:e9:8d:95:22:d1:0e:1b:87:c1:a2:41:b2:09:97:a3:5e:e0:a4:1d:59:91:21:e4:ca:87:bf:77:4a:7e:a2:22:ff:59:1e:bd:a4:80:aa:93:4a:41:56:95:5b:f4:57:df:fc:52:2f:46:9b:45:d7:03:ae:22:8e:67:9e:6c:b9:95:4f:bd:8e:e8:67:90:5b:fe:de:2f:11:22:2e:9d:30:93:6d:c0:48:00:cb:08:b9:c4:36:e9:03:7c:08:2d:68:42:cb:71:d0:7d:47:22:c1:58:c5:b8:2f:28:3e:98:78:11:6d:71:5b:3b:36:3c";
+ private final static String rout1 = "19:dd:a2:f9:57:d4:6b:60:85:ec:2d:5d:f9:64:f8:a0:c0:33:36:a2:8c:59:0f:74:9b:62:a8:ad:42:ed:be:34:0e:dc:13:db:d5:b9:aa:64:38:35:18:d7:6c:1d:da:5b:ff:f2:98:f5:fc:67:36:fb:9f:84:df:84:a3:af:ce:02:e5:05:ca:a7:e4:29:c0:5c:55:6a:8d:dc:8f:f7:6e:d4:ee:2e:6c:5b:ea:f8:bf:4c:7d:5f:af:6a:c3:77:02:80:33:be:13:4c:98:cf:dc:aa:e8:7d:73:69:6e:30:2c:35:c5:90:83:45:0d:64:04:af:b6:94:c3:a8:e2:d4:08:98:1d:b1:73:e3:fc:10:1f:71:0f:d0:13:f3:58:80:c4:a3:a9:02:52:cf:aa:41:b6:9b:69:33:9d:2a:d6:f6:02:07:ec:ce:19:01:f1:2f:90:27:fe:00:a5:d7:8d:01:97:36:fd:88:34:2f:f3:ab:38:ed:9d:69:91:af:b2:0d:ca:92:ca:9e:e7:24:37:d6:e3:c7:02:30:69:5b:ea:b4:b2:68:5f:4e:8c:cc:fd:bb:2e:96:2f:a3:c6:f7:71:93:24:5c:ca:8f:bc:f9:d8:bd:d3:b9:d1:16:ba:5a:ac:62:41:b4:d8:56:45:74:55:c2:a5:ef:23:f5:e3:27:ce:99:97:e9";
- private final static String rin2 = "1b:49:a6:7a:83:1c:b6:28:47:16:2f:be:6a:d3:28:a6:83:07:4f:50:be:5c:99:26:2a:15:b8:21:a8:cc:8a:45:93:07:ff:32:67:3c:a4:92:d2:cd:43:eb:f5:2e:09:79:c8:32:3a:9d:00:4c:f5:6e:65:b2:ca:9c:c2:d5:35:8e:fe:6c:ba:1a:7b:65:c1:4f:e9:6c:cb:5d:9f:13:5d:5f:be:32:cd:91:ed:8b:d7:d7:e9:d6:5c:cc:11:7b:d9:ff:7a:93:de:e4:81:92:56:0c:52:47:75:56:a8:e0:9a:55:16:0c:43:df:ae:be:a1:6a:9d:5a:be:fc:51:ea:52:0c";
- private final static String rout2 = "65:28:b9:48:8d:68:3f:5e:9a:85:e7:09:78:4c:0c:0e:60:6c:89:43:3c:d3:72:b9:2f:5a:eb:4f:15:77:93:9d:47:05:a6:52:48:72:ee:ce:e8:5a:6d:28:b0:06:5a:a1:93:58:a1:61:3f:9b:42:0d:c1:ec:32:0a:7a:1e:38:45:47:87:52:16:62:c9:44:c6:04:4d:82:64:01:f4:b1:26:dc:7f:61:82:52:7a:f6:6b:ab:22:98:87:93:63:4c:3f:92:c7:5b:cc:e5:2b:15:db:f7:d3:c7:b5:38:6f:15:3b:1e:88:3d:31:0c:b4:f9:6d:66:41:b7:1b:a0:4a:b8:16";
+ private final static String rin2 = "1b:49:a6:7a:83:1c:b6:28:47:16:2f:be:6a:d3:28:a6:83:07:4f:50:be:5c:99:26:2a:15:b8:21:a8:cc:8a:45:93:07:ff:32:67:3c:a4:92:d2:cd:43:eb:f5:2e:09:79:c8:32:3a:9d:00:4c:f5:6e:65:b2:ca:9c:c2:d5:35:8e:fe:6c:ba:1a:7b:65:c1:4f:e9:6c:cb:5d:9f:13:5d:5f:be:32:cd:91:ed:8b:d7:d7:e9:d6:5c:cc:11:7b:d9:ff:7a:93:de:e4:81:92:56:0c:52:47:75:56:a8:e0:9a:55:16:0c:43:df:ae:be:a1:6a:9d:5a:be:fc:51:ea:52:0c:1b:49:a6:7a:83:1c:b6:28:47:16:2f:be:6a:d3:28:a6:83:07:4f:50:be:5c:99:26:2a:15:b8:21:a8:cc:8a:45:93:07:ff:32:67:3c:a4:92:d2:cd:43:eb:f5:2e:09:79:c8:32:3a:9d:00:4c:f5:6e:65:b2:ca:9c:c2:d5:35:8e:fe:6c:ba:1a:7b:65:c1:4f:e9:6c:cb:5d:9f:13:5d:5f:be:32:cd:91:ed:8b:d7:d7:e9:d6:5c:cc:11:7b:d9:ff:7a:93:de:e4:81:92:56:0c:52:47:75:56:a8:e0:9a:55:16:0c:43:df:ae:be:a1:6a:9d:5a:be:fc:51:ea:52:0c";
+ private final static String rout2 = "7a:11:19:cf:76:97:4b:29:48:66:69:e7:f0:db:18:53:d4:50:71:a4:9d:90:47:9f:e6:8a:f3:ba:2e:96:fd:c8:4b:02:7e:06:a9:2b:47:0d:68:3c:6a:f9:21:62:77:0d:4e:e1:1b:82:97:66:13:01:c2:3b:b2:d3:f8:9e:cc:c9:2a:1a:76:05:3f:d4:f7:fb:9d:9b:bf:a8:2d:fd:81:e5:f4:bb:ca:3b:5f:93:ea:ef:88:1c:c1:18:52:38:be:50:42:29:08:d9:65:43:5f:01:7d:50:22:7a:2f:f1:29:14:95:30:c1:b8:fd:eb:da:c1:4e:8a:ef:97:84:f9:cf:34:ab:89:a6:3c:4a:ff:a4:98:a8:7c:c6:2c:c3:e3:10:a9:8b:67:32:47:35:37:15:03:3b:d0:f3:23:fc:bb:42:64:a2:ba:63:3e:94:6e:7a:e6:94:05:79:29:28:d5:99:5b:f9:67:fd:ea:d3:5f:b5:7b:f4:10:9b:0a:1c:20:6b:0c:59:56:76:45:07:56:cb:d0:ab:08:fc:19:8e:f1:27:03:22:f1:e9:23:d3:01:b1:4d:cf:96:f7:a6:44:59:de:2a:52:fd:bb:14:ae:39:c4:e4:0f:4e:10:f7:c6:61:79:0a:a6:4c:ed:ee:d7:40:fe:ef:f3:85:ae:3e:f3:bb:6e:de";
public static void main(String[] args) throws Exception {
long start = System.currentTimeMillis();
@@ -190,8 +198,8 @@ public static void main(String[] args) throws Exception {
// blocktype 1
testEncDec("RSA/ECB/PKCS1Padding", 96, privateKey, publicKey);
- testEncDec("RSA/ECB/NoPadding", 128, publicKey, privateKey);
- testEncDec("RSA/ECB/NoPadding", 128, privateKey, publicKey);
+ testEncDec("RSA/ECB/NoPadding", 256, publicKey, privateKey);
+ testEncDec("RSA/ECB/NoPadding", 256, privateKey, publicKey);
// expected failure, blocktype 2 random padding bytes are different
testKat("RSA/ECB/PKCS1Padding", Cipher.ENCRYPT_MODE, publicKey, in2, out2, false);
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java
index 34e87030636..9fe96d967dc 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHGenSharedSecret.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 0000000
+ * @library /test/lib
* @summary DHGenSharedSecret
* @author Jan Luehe
*/
@@ -33,40 +34,11 @@
import javax.crypto.*;
import javax.crypto.spec.*;
import java.math.BigInteger;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
public class DHGenSharedSecret {
- static byte[] DHPrime = {
-(byte)0x00, (byte)0x8D, (byte)0x8A, (byte)0x6C, (byte)0x7F, (byte)0xCC,
-(byte)0xA5, (byte)0xBF, (byte)0x9C, (byte)0xE1, (byte)0xFA, (byte)0x3C,
-(byte)0xCA, (byte)0x98, (byte)0xB7, (byte)0x99, (byte)0xD1, (byte)0xE5,
-(byte)0x2C, (byte)0xC0, (byte)0x26, (byte)0x97, (byte)0x12, (byte)0x80,
-(byte)0x12, (byte)0xEF, (byte)0x0B, (byte)0xDE, (byte)0x71, (byte)0x76,
-(byte)0xAA, (byte)0x2D, (byte)0x86, (byte)0x41, (byte)0x0E, (byte)0x6A,
-(byte)0xC2, (byte)0x12, (byte)0xAA, (byte)0xAA, (byte)0xE4, (byte)0x84,
-(byte)0x80, (byte)0x13, (byte)0x95, (byte)0x06, (byte)0xC4, (byte)0x83,
-(byte)0xB9, (byte)0xD3, (byte)0x72, (byte)0xC5, (byte)0xC8, (byte)0x85,
-(byte)0x96, (byte)0x59, (byte)0x08, (byte)0xFA, (byte)0x9E, (byte)0x3C,
-(byte)0xDC, (byte)0x92, (byte)0x28, (byte)0xC3, (byte)0x1D, (byte)0x6F,
-(byte)0x44, (byte)0x36, (byte)0x70, (byte)0x40, (byte)0x80, (byte)0xF1,
-(byte)0x35
- };
-
- static byte[] DHBase = {
-(byte)0x72, (byte)0x21, (byte)0xB3, (byte)0xA8, (byte)0x83, (byte)0xDD,
-(byte)0x76, (byte)0xF5, (byte)0x0D, (byte)0x9B, (byte)0x81, (byte)0x11,
-(byte)0x15, (byte)0x03, (byte)0x6D, (byte)0x4D, (byte)0x46, (byte)0x65,
-(byte)0x30, (byte)0xB0, (byte)0xFA, (byte)0xFE, (byte)0xBE, (byte)0xA8,
-(byte)0xD9, (byte)0x83, (byte)0x33, (byte)0x54, (byte)0xC7, (byte)0xF6,
-(byte)0x81, (byte)0xAC, (byte)0xCC, (byte)0xA3, (byte)0xAE, (byte)0xAA,
-(byte)0xC8, (byte)0x11, (byte)0x38, (byte)0xD4, (byte)0x4F, (byte)0xC4,
-(byte)0x89, (byte)0xD3, (byte)0x72, (byte)0xEE, (byte)0x22, (byte)0x5A,
-(byte)0x68, (byte)0xF7, (byte)0xAC, (byte)0x24, (byte)0x01, (byte)0x9B,
-(byte)0xE9, (byte)0x08, (byte)0xFE, (byte)0x58, (byte)0x0A, (byte)0xCF,
-(byte)0xB9, (byte)0x52, (byte)0xB4, (byte)0x02, (byte)0x73, (byte)0xA4,
-(byte)0xA6, (byte)0xB9, (byte)0x0C, (byte)0x8D, (byte)0xA7, (byte)0xFB,
- };
-
public static void main(String[] args) throws Exception {
DHGenSharedSecret test = new DHGenSharedSecret();
test.run();
@@ -75,8 +47,9 @@ public static void main(String[] args) throws Exception {
public void run() throws Exception {
long start, end;
- BigInteger p = new BigInteger(1, DHPrime);
- BigInteger g = new BigInteger(1, DHBase);
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
+ BigInteger p = dhGroup.getPrime();
+ BigInteger g = new BigInteger(1, dhGroup.getBase().toByteArray());
int l = 512;
DHParameterSpec spec =
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java
index c7a0c4aeb33..da583c9dc29 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement2.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 7146728
+ * @library /test/lib
* @summary DHKeyAgreement2
* @author Jan Luehe
* @run main/othervm -Djdk.crypto.KeyAgreement.legacyKDF=true DHKeyAgreement2
@@ -38,13 +39,14 @@
import javax.crypto.*;
import javax.crypto.spec.*;
import javax.crypto.interfaces.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
/**
* This test utility executes the Diffie-Hellman key agreement protocol
* between 2 parties: Alice and Bob.
*
- * By default, preconfigured parameters (1024 bit prime modulus and base
- * generator used by SKIP) are used.
+ * By default, preconfigured parameters are used.
* If this program is called with the "-gen" option, a new set of parameters
* are created.
*/
@@ -59,7 +61,7 @@ public class DHKeyAgreement2 {
private DHKeyAgreement2() {}
public static void main(String argv[]) throws Exception {
- String mode = "USE_SKIP_DH_PARAMS";
+ String mode = "USE_PRECONFIGURED_DH_PARAMS";
DHKeyAgreement2 keyAgree = new DHKeyAgreement2();
@@ -80,22 +82,25 @@ public static void main(String argv[]) throws Exception {
private void run(String mode) throws Exception {
- DHParameterSpec dhSkipParamSpec;
+ DHParameterSpec dhParameterSpec;
+ String algorithm = "DH";
+ int primeSize = SecurityUtils.getTestKeySize(algorithm);
if (mode.equals("GENERATE_DH_PARAMS")) {
// Some central authority creates new DH parameters
System.err.println("Creating Diffie-Hellman parameters ...");
AlgorithmParameterGenerator paramGen
= AlgorithmParameterGenerator.getInstance("DH", SUNJCE);
- paramGen.init(512);
+ paramGen.init(primeSize);
AlgorithmParameters params = paramGen.generateParameters();
- dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
+ dhParameterSpec = (DHParameterSpec)params.getParameterSpec
(DHParameterSpec.class);
} else {
- // use some pre-generated, default DH parameters
- System.err.println("Using SKIP Diffie-Hellman parameters");
- dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
- skip1024Base);
+ // use some pre-generated, test default DH parameters
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup(primeSize);
+ System.err.println("Using " + dhGroup.name() + " Diffie-Hellman parameters");
+ dhParameterSpec = new DHParameterSpec(dhGroup.getPrime(),
+ dhGroup.getBase());
}
/*
@@ -104,7 +109,7 @@ private void run(String mode) throws Exception {
*/
System.err.println("ALICE: Generate DH keypair ...");
KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", SUNJCE);
- aliceKpairGen.initialize(dhSkipParamSpec);
+ aliceKpairGen.initialize(dhParameterSpec);
KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
System.out.println("Alice DH public key:\n" +
aliceKpair.getPublic().toString());
@@ -227,20 +232,26 @@ private void run(String mode) throws Exception {
}
System.err.println("Shared secrets are the same");
+ testSecretKey(bobKeyAgree, alicePubKey, "DES");
+ testSecretKey(bobKeyAgree, alicePubKey, "AES");
+ }
+
+ private static void testSecretKey(KeyAgreement bobKeyAgree, PublicKey alicePubKey, String algo)
+ throws Exception {
// Now let's return the shared secret as a SecretKey object
// and use it for encryption
- System.out.println("Return shared secret as SecretKey object ...");
+ System.out.println("Return shared secret as SecretKey object with algorithm: " + algo);
bobKeyAgree.doPhase(alicePubKey, true);
- SecretKey desKey = bobKeyAgree.generateSecret("DES");
+ SecretKey key = bobKeyAgree.generateSecret(algo);
- Cipher desCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
- desCipher.init(Cipher.ENCRYPT_MODE, desKey);
+ Cipher cipher = Cipher.getInstance(algo + "/ECB/PKCS5Padding");
+ cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] cleartext = "This is just an example".getBytes();
- byte[] ciphertext = desCipher.doFinal(cleartext);
+ byte[] ciphertext = cipher.doFinal(cleartext);
- desCipher.init(Cipher.DECRYPT_MODE, desKey);
- byte[] cleartext1 = desCipher.doFinal(ciphertext);
+ cipher.init(Cipher.DECRYPT_MODE, key);
+ byte[] cleartext1 = cipher.doFinal(ciphertext);
int clearLen = cleartext.length;
int clear1Len = cleartext1.length;
@@ -274,47 +285,4 @@ private void usage() {
System.err.print("DHKeyAgreement usage: ");
System.err.println("[-gen]");
}
-
- // The 1024 bit Diffie-Hellman modulus values used by SKIP
- private static final byte skip1024ModulusBytes[] = {
- (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
- (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
- (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
- (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
- (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
- (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
- (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
- (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
- (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
- (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
- (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
- (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
- (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
- (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
- (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
- (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
- (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
- (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
- (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
- (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
- (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
- (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
- (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
- (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
- (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
- (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
- (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
- (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
- (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
- (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
- (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
- (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
- };
-
- // The SKIP 1024 bit modulus
- private static final BigInteger skip1024Modulus
- = new BigInteger(1, skip1024ModulusBytes);
-
- // The base used with the SKIP 1024 bit modulus
- private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java
index 6cdcf1dad2e..d4f70ea2563 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreement3.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 0000000
+ * @library /test/lib
* @summary DHKeyAgreement3
* @author Jan Luehe
*/
@@ -37,13 +38,14 @@
import javax.crypto.*;
import javax.crypto.spec.*;
import javax.crypto.interfaces.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
/**
* This test utility executes the Diffie-Hellman key agreement protocol
* between 3 parties: Alice, Bob, and Carol.
*
- * We use the same 1024 bit prime modulus and base generator that are used by
- * SKIP.
+ * By default, preconfigured parameters are used.
*/
public class DHKeyAgreement3 {
@@ -61,27 +63,27 @@ public static void main(String argv[]) throws Exception {
private void run() throws Exception {
- DHParameterSpec dhSkipParamSpec;
-
- System.err.println("Using SKIP Diffie-Hellman parameters");
- dhSkipParamSpec = new DHParameterSpec(skip1024Modulus, skip1024Base);
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
+ DHParameterSpec dhParamSpec;
+ System.err.println("Using " + dhGroup.name() + " Diffie-Hellman parameters");
+ dhParamSpec = new DHParameterSpec(dhGroup.getPrime(), dhGroup.getBase());
// Alice creates her own DH key pair
System.err.println("ALICE: Generate DH keypair ...");
KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
- aliceKpairGen.initialize(dhSkipParamSpec);
+ aliceKpairGen.initialize(dhParamSpec);
KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
// Bob creates his own DH key pair
System.err.println("BOB: Generate DH keypair ...");
KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
- bobKpairGen.initialize(dhSkipParamSpec);
+ bobKpairGen.initialize(dhParamSpec);
KeyPair bobKpair = bobKpairGen.generateKeyPair();
// Carol creates her own DH key pair
System.err.println("CAROL: Generate DH keypair ...");
KeyPairGenerator carolKpairGen = KeyPairGenerator.getInstance("DH", "SunJCE");
- carolKpairGen.initialize(dhSkipParamSpec);
+ carolKpairGen.initialize(dhParamSpec);
KeyPair carolKpair = carolKpairGen.generateKeyPair();
@@ -178,47 +180,4 @@ private void usage() {
System.err.print("DHKeyAgreement usage: ");
System.err.println("[-gen]");
}
-
- // The 1024 bit Diffie-Hellman modulus values used by SKIP
- private static final byte skip1024ModulusBytes[] = {
- (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
- (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
- (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
- (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
- (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
- (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
- (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
- (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
- (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
- (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
- (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
- (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
- (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
- (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
- (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
- (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
- (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
- (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
- (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
- (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
- (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
- (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
- (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
- (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
- (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
- (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
- (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
- (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
- (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
- (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
- (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
- (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
- };
-
- // The SKIP 1024 bit modulus
- private static final BigInteger skip1024Modulus
- = new BigInteger(1, skip1024ModulusBytes);
-
- // The base used with the SKIP 1024 bit modulus
- private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreementPadding.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreementPadding.java
index dc963bf6267..c863da6b4b4 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreementPadding.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyAgreementPadding.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, 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
@@ -34,21 +34,22 @@
import java.security.KeyPairGenerator;
import java.util.Arrays;
import java.util.HexFormat;
+import jdk.test.lib.security.SecurityUtils;
public class DHKeyAgreementPadding {
public static void main(String[] args) throws Exception {
-
- byte[] aliceSecret = new byte[80];
- byte[] bobSecret = new byte[80];
-
- KeyAgreement alice = KeyAgreement.getInstance("DiffieHellman");
- KeyAgreement bob = KeyAgreement.getInstance("DiffieHellman");
+ String kpgAlgorithm = "DiffieHellman";
+ KeyAgreement alice = KeyAgreement.getInstance(kpgAlgorithm);
+ KeyAgreement bob = KeyAgreement.getInstance(kpgAlgorithm);
+ int keySizeBits = SecurityUtils.getTestKeySize(kpgAlgorithm);
+ byte[] aliceSecret = new byte[keySizeBits / 8];
+ byte[] bobSecret = new byte[keySizeBits / 8];
// The probability of an error is 0.2% or 1/500. Try more times.
for (int i = 0; i < 5000; i++) {
- KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance("DiffieHellman");
- keyPairGen.initialize(512);
+ KeyPairGenerator keyPairGen = KeyPairGenerator.getInstance(kpgAlgorithm);
+ keyPairGen.initialize(keySizeBits);
KeyPair aliceKeyPair = keyPairGen.generateKeyPair();
KeyPair bobKeyPair = keyPairGen.generateKeyPair();
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java
index 753e7e1e197..356cfc4b20a 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyFactory.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 0000000
+ * @library /test/lib
* @summary DHKeyFactory
* @author Jan Luehe
*/
@@ -36,6 +37,8 @@
import javax.crypto.*;
import javax.crypto.spec.*;
import javax.crypto.interfaces.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
/**
* This test creates a DH keypair, retrieves the encodings of the DH public and
@@ -55,16 +58,13 @@ public static void main(String argv[]) throws Exception {
private void run() throws Exception {
- DHParameterSpec dhSkipParamSpec;
-
- // use some pre-generated, default DH parameters
- System.err.println("Using SKIP Diffie-Hellman parameters");
- dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
- skip1024Base);
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
+ DHParameterSpec dhParamSpec = new DHParameterSpec(dhGroup.getPrime(), dhGroup.getBase());
+ System.out.println("Using " + dhGroup.name() + " Diffie-Hellman parameters");
KeyPairGenerator kpgen = KeyPairGenerator.getInstance("DH",
System.getProperty("test.provider.name", "SunJCE"));
- kpgen.initialize(dhSkipParamSpec);
+ kpgen.initialize(dhParamSpec);
KeyPair kp = kpgen.generateKeyPair();
// get the public key encoding
@@ -82,47 +82,4 @@ private void run() throws Exception {
PKCS8EncodedKeySpec pkcsKeySpec = new PKCS8EncodedKeySpec(privKeyEnc);
PrivateKey privKey = kfac.generatePrivate(pkcsKeySpec);
}
-
- // The 1024 bit Diffie-Hellman modulus values used by SKIP
- private static final byte skip1024ModulusBytes[] = {
- (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
- (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
- (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
- (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
- (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
- (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
- (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
- (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
- (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
- (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
- (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
- (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
- (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
- (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
- (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
- (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
- (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
- (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
- (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
- (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
- (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
- (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
- (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
- (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
- (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
- (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
- (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
- (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
- (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
- (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
- (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
- (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
- };
-
- // The SKIP 1024 bit modulus
- private static final BigInteger skip1024Modulus
- = new BigInteger(1, skip1024ModulusBytes);
-
- // The base used with the SKIP 1024 bit modulus
- private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java
index c74161e20e3..723ce11760b 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/DHKeyGenSpeed.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 0000000
+ * @library /test/lib
* @summary DHKeyGenSpeed
* @author Jan Luehe
*/
@@ -33,42 +34,11 @@
import javax.crypto.*;
import javax.crypto.spec.*;
import java.math.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
public class DHKeyGenSpeed {
- static byte[] DHPrime = {
-(byte)0x00, (byte)0x91, (byte)0x18, (byte)0x26, (byte)0x9A, (byte)0x26,
-(byte)0x43, (byte)0xA6, (byte)0x1E, (byte)0x11, (byte)0x02, (byte)0xA0,
-(byte)0x88, (byte)0xFE, (byte)0x12, (byte)0xEA, (byte)0x63, (byte)0x20,
-(byte)0x6D, (byte)0x4F, (byte)0x40, (byte)0x3C, (byte)0x4F, (byte)0x13,
-(byte)0x10, (byte)0x97, (byte)0xEC, (byte)0x3A, (byte)0x38, (byte)0x87,
-(byte)0x9B, (byte)0x08, (byte)0x66, (byte)0x0C, (byte)0x82, (byte)0xD0,
-(byte)0x57, (byte)0xE0, (byte)0x37, (byte)0x16, (byte)0x8E, (byte)0xB4,
-(byte)0xEA, (byte)0xB7, (byte)0xE6, (byte)0xAF, (byte)0x4C, (byte)0xE0,
-(byte)0x40, (byte)0x07, (byte)0xF4, (byte)0x81, (byte)0xDD, (byte)0x36,
-(byte)0x33, (byte)0xAD, (byte)0x92, (byte)0xC6, (byte)0x0F, (byte)0xB5,
-(byte)0xE4, (byte)0x0F, (byte)0x0E, (byte)0xEA, (byte)0x91, (byte)0x35,
-(byte)0xFB, (byte)0x55, (byte)0x7A, (byte)0x39, (byte)0xD1, (byte)0xF0,
-(byte)0x6B, (byte)0x9A, (byte)0xB9, (byte)0xFA, (byte)0x19, (byte)0xBE,
-(byte)0x1B, (byte)0xFD, (byte)0x77
- };
- static byte[] DHBase = {
-(byte)0x29, (byte)0xF2, (byte)0x29, (byte)0xC8, (byte)0x42, (byte)0x25,
-(byte)0x29, (byte)0xC3, (byte)0xF2, (byte)0xAA, (byte)0xF2, (byte)0x6A,
-(byte)0x3C, (byte)0xD2, (byte)0xD2, (byte)0xDE, (byte)0xD3, (byte)0x6B,
-(byte)0x85, (byte)0xA5, (byte)0xE1, (byte)0x43, (byte)0x90, (byte)0xA2,
-(byte)0xB6, (byte)0xA5, (byte)0x0C, (byte)0xBA, (byte)0xB9, (byte)0x4C,
-(byte)0x25, (byte)0xE0, (byte)0xC8, (byte)0xEA, (byte)0xA1, (byte)0x7B,
-(byte)0xB9, (byte)0xF8, (byte)0xFF, (byte)0x15, (byte)0x66, (byte)0x5B,
-(byte)0xB0, (byte)0x00, (byte)0x18, (byte)0xE2, (byte)0xF4, (byte)0xF1,
-(byte)0xB4, (byte)0x7A, (byte)0xC2, (byte)0xCF, (byte)0x9C, (byte)0x61,
-(byte)0x36, (byte)0xED, (byte)0x14, (byte)0x72, (byte)0xD7, (byte)0xD4,
-(byte)0x94, (byte)0x20, (byte)0x5E, (byte)0x1E, (byte)0xE4, (byte)0xB1,
-(byte)0x60, (byte)0xC8, (byte)0x10, (byte)0x85, (byte)0xBD, (byte)0x74,
-(byte)0x34, (byte)0x8C, (byte)0x3C, (byte)0x2A, (byte)0xBD, (byte)0x3C,
-(byte)0xFF, (byte)0x14
- };
-
public static void main(String[] args) throws Exception {
DHKeyGenSpeed test = new DHKeyGenSpeed();
test.run();
@@ -78,8 +48,9 @@ public static void main(String[] args) throws Exception {
public void run() throws Exception {
long start, end;
- BigInteger p = new BigInteger(1, DHPrime);
- BigInteger g = new BigInteger(1, DHBase);
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
+ BigInteger p = dhGroup.getPrime();
+ BigInteger g = new BigInteger(1, dhGroup.getBase().toByteArray());
int l = 576;
DHParameterSpec spec =
@@ -95,7 +66,7 @@ public void run() throws Exception {
end = System.currentTimeMillis();
System.out.println("PrimeBits\tExponentBits");
- System.out.println(DHPrime.length*8 + "\t\t" + l);
+ System.out.println(dhGroup.getPrime().bitLength() + "\t\t" + l);
System.out.println("keyGen(millisecond): " + (end - start));
System.out.println("Test Passed!");
}
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java
index 96a5754cfa6..efc85999b3e 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGens.java
@@ -24,6 +24,7 @@
/**
* @test
* @bug 8072452 8163498
+ * @library /test/lib
* @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits
* This test has been split based on lower/higher key sizes in order to
* reduce individual execution times and run in parallel
@@ -33,14 +34,16 @@
* @run main/timeout=300 SupportedDHParamGens 832
* @run main/timeout=300 SupportedDHParamGens 1024
* @run main/timeout=600 SupportedDHParamGens 2048
+ * @run main/timeout=600 SupportedDHParamGens 3072
+ * @run main/timeout=600 SupportedDHParamGens 4096
*/
-
import java.math.BigInteger;
import java.security.*;
-import javax.crypto.*;
import javax.crypto.interfaces.*;
import javax.crypto.spec.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
public class SupportedDHParamGens {
@@ -48,12 +51,18 @@ public static void main(String[] args) throws Exception {
int primeSize = Integer.valueOf(args[0]).intValue();
System.out.println("Checking " + primeSize + " ...");
- AlgorithmParameterGenerator apg =
- AlgorithmParameterGenerator.getInstance("DH",
- System.getProperty("test.provider.name", "SunJCE"));
- apg.init(primeSize);
- AlgorithmParameters ap = apg.generateParameters();
- DHParameterSpec spec = ap.getParameterSpec(DHParameterSpec.class);
+ DHParameterSpec spec = null;
+ switch (primeSize) {
+ case 2048, 3072, 4096 -> spec = getDHParameterSpec(primeSize);
+ default -> {
+ AlgorithmParameterGenerator apg =
+ AlgorithmParameterGenerator.getInstance("DH",
+ System.getProperty("test.provider.name", "SunJCE"));
+ apg.init(primeSize);
+ AlgorithmParameters ap = apg.generateParameters();
+ spec = ap.getParameterSpec(DHParameterSpec.class);
+ }
+ }
KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH",
System.getProperty("test.provider.name", "SunJCE"));
@@ -62,6 +71,11 @@ public static void main(String[] args) throws Exception {
checkKeyPair(kp, primeSize);
}
+ private static DHParameterSpec getDHParameterSpec(int primeSize) {
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup(primeSize);
+ return new DHParameterSpec(dhGroup.getPrime(), dhGroup.getBase());
+ }
+
private static void checkKeyPair(KeyPair kp, int pSize) throws Exception {
DHPrivateKey privateKey = (DHPrivateKey)kp.getPrivate();
diff --git a/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGensLongKey.java b/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGensLongKey.java
index 740486e06cf..7d2570991d5 100644
--- a/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGensLongKey.java
+++ b/test/jdk/com/sun/crypto/provider/KeyAgreement/SupportedDHParamGensLongKey.java
@@ -24,6 +24,7 @@
/**
* @test
* @bug 8072452 8163498
+ * @library /test/lib
* @summary Support DHE sizes up to 8192-bits and DSA sizes up to 3072-bits
* This test has been split based on lower/higher key sizes in order to
* reduce individual execution times and run in parallel
diff --git a/test/jdk/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java b/test/jdk/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java
index 29707bae52c..b2122d5691b 100644
--- a/test/jdk/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java
+++ b/test/jdk/com/sun/crypto/provider/KeyFactory/TestProviderLeak.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6578538 8027624
+ * @library /test/lib
* @summary com.sun.crypto.provider.SunJCE instance leak using KRB5 and
* LoginContext
* @author Brad Wetmore
@@ -45,6 +46,7 @@
import java.util.*;
import java.util.concurrent.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestProviderLeak {
private static final int MB = 1024 * 1024;
@@ -109,7 +111,7 @@ public static void main(String [] args) throws Exception {
SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1",
System.getProperty("test.provider.name", "SunJCE"));
final PBEKeySpec pbeKS = new PBEKeySpec(
- "passPhrase".toCharArray(), new byte [] { 0 }, 5, 512);
+ "passPhrase".toCharArray(), new byte [SecurityUtils.getTestSaltSize()], 1000, 512);
ExecutorService executor = Executors.newSingleThreadExecutor();
Callable task = new Callable() {
diff --git a/test/jdk/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java b/test/jdk/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java
index 6a0c2419fcc..a1226b89d34 100644
--- a/test/jdk/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java
+++ b/test/jdk/com/sun/crypto/provider/KeyGenerator/TestExplicitKeyLength.java
@@ -35,10 +35,10 @@
public class TestExplicitKeyLength {
- private static final String ALGOS[] = { "RC2", "ARCFOUR" };
+ private static final String ALGOS[] = { "RC2", "ARCFOUR", "AES", "AES", "AES" };
private static final int KEY_SIZES[] =
- { 64, 80 }; // in bits
+ { 64, 80, 128, 192, 256 }; // in bits
public static void runTest(String algo, int keysize) throws Exception {
KeyGenerator kg = KeyGenerator.getInstance(algo,
diff --git a/test/jdk/com/sun/crypto/provider/KeyProtector/IterationCount.java b/test/jdk/com/sun/crypto/provider/KeyProtector/IterationCount.java
index e61f8b45f77..70c6cad411a 100644
--- a/test/jdk/com/sun/crypto/provider/KeyProtector/IterationCount.java
+++ b/test/jdk/com/sun/crypto/provider/KeyProtector/IterationCount.java
@@ -52,9 +52,6 @@
public class IterationCount {
private static final String clientStr = "CLIENT";
- private static final String javaBinPath =
- System.getProperty("java.home", ".") + File.separator + "bin" +
- File.separator + "java";
public static void main(String[] args) throws Throwable {
if (args[0].equals("HOST")) {
@@ -78,22 +75,14 @@ public static void main(String[] args) throws Throwable {
System.out.println("TEST PASS - OK");
}
- private static List getBasicCommand() {
- List cmd = new ArrayList<>();
- cmd.add(javaBinPath);
- cmd.add("-cp");
- cmd.add(System.getProperty("test.classes", "."));
- return cmd;
- }
-
private static void executeCommand(List cmd, String expectedCount)
throws Throwable {
cmd.add("--add-opens=java.base/com.sun.crypto.provider=ALL-UNNAMED");
cmd.add(IterationCount.class.getName());
cmd.add(clientStr);
cmd.add(expectedCount);
- OutputAnalyzer out = ProcessTools.executeCommand(
- cmd.toArray(new String[cmd.size()]));
+ ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(cmd);
+ OutputAnalyzer out = ProcessTools.executeCommand(pb);
out.shouldHaveExitValue(0);
}
@@ -102,7 +91,7 @@ private static void testSystem(String expectedCount, String setValue)
System.out.println("Test setting " +
(setValue != null ? setValue : "nothing") +
" as a System property");
- List cmd = getBasicCommand();
+ List cmd = new ArrayList<>();
if (setValue != null) {
cmd.add("-Djdk.jceks.iterationCount=" + setValue);
}
@@ -112,7 +101,7 @@ private static void testSystem(String expectedCount, String setValue)
private static void testSecurity(String expectedCount, String setValue)
throws Throwable {
- testSecurity(expectedCount, setValue, getBasicCommand());
+ testSecurity(expectedCount, setValue, new ArrayList<>());
}
private static void testSecurity(String expectedCount, String setValue,
@@ -140,15 +129,14 @@ private static void testSystemOverridesSecurity() throws Throwable {
" the Security one");
String systemValue = Integer.toString(30000);
System.out.println("System value: " + systemValue);
- List cmd = getBasicCommand();
+ List cmd = new ArrayList<>();
cmd.add("-Djdk.jceks.iterationCount=" + systemValue);
testSecurity(systemValue, Integer.toString(40000), cmd);
}
private static void writeJavaSecurityProp(String javaSecurityPath,
String setValue) throws IOException {
- try (FileOutputStream fos = new FileOutputStream(
- new File(javaSecurityPath))) {
+ try (FileOutputStream fos = new FileOutputStream(javaSecurityPath)) {
fos.write(("jdk.jceks.iterationCount=" + setValue).getBytes());
}
}
diff --git a/test/jdk/com/sun/crypto/provider/Mac/HmacSaltLengths.java b/test/jdk/com/sun/crypto/provider/Mac/HmacSaltLengths.java
index aa2ef2ae7de..d1c8383e6a1 100644
--- a/test/jdk/com/sun/crypto/provider/Mac/HmacSaltLengths.java
+++ b/test/jdk/com/sun/crypto/provider/Mac/HmacSaltLengths.java
@@ -41,6 +41,10 @@ public class HmacSaltLengths {
private static final String[] ALGOS = {
"HmacPBESHA1",
+ "HmacPBESHA224",
+ "HmacPBESHA256",
+ "HmacPBESHA384",
+ "HmacPBESHA512",
"PBEWithHmacSHA1",
"PBEWithHmacSHA224",
"PBEWithHmacSHA256",
diff --git a/test/jdk/com/sun/crypto/provider/Mac/MacClone.java b/test/jdk/com/sun/crypto/provider/Mac/MacClone.java
index e66b71ec1a3..5d491ded324 100644
--- a/test/jdk/com/sun/crypto/provider/Mac/MacClone.java
+++ b/test/jdk/com/sun/crypto/provider/Mac/MacClone.java
@@ -26,6 +26,8 @@
* @bug 7087021 8013069 8288050
* @summary Clone tests for all MAC algorithms.
* @author Jan Luehe
+ * @run main MacClone DES
+ * @run main MacClone AES
*/
import java.security.spec.AlgorithmParameterSpec;
import javax.crypto.*;
@@ -39,7 +41,8 @@ public static void main(String[] args) throws Exception {
"HmacSHA384", "HmacSHA512", "HmacSHA512/224",
"HmacSHA512/256",
};
- KeyGenerator kgen = KeyGenerator.getInstance("DES");
+ String keyAlgo = args[0];
+ KeyGenerator kgen = KeyGenerator.getInstance(keyAlgo);
SecretKey skey = kgen.generateKey();
for (String algo : algos) {
doTest(algo, skey, null);
diff --git a/test/jdk/com/sun/crypto/provider/TLS/TestLeadingZeroes.java b/test/jdk/com/sun/crypto/provider/TLS/TestLeadingZeroes.java
index fec6d24c0ef..9dc22c77fd0 100644
--- a/test/jdk/com/sun/crypto/provider/TLS/TestLeadingZeroes.java
+++ b/test/jdk/com/sun/crypto/provider/TLS/TestLeadingZeroes.java
@@ -81,7 +81,7 @@ private void run() throws Exception {
System.out.println("shared secret:\n" + HEX_FORMATTER.formatHex(sharedSecret));
// verify that leading zero is present
- if (sharedSecret.length != 128) {
+ if (sharedSecret.length != 256) {
throw new Exception("Unexpected shared secret length");
}
if (sharedSecret[0] != 0) {
@@ -97,7 +97,7 @@ private void run() throws Exception {
"tls premaster secret:\n" + HEX_FORMATTER.formatHex(tlsPremasterSecret));
// check that leading zero has been stripped
- if (tlsPremasterSecret.length != 127) {
+ if (tlsPremasterSecret.length != 255) {
throw new Exception("Unexpected TLS premaster secret length");
}
if (tlsPremasterSecret[0] == 0) {
@@ -112,279 +112,455 @@ private void run() throws Exception {
}
private static final byte alicePubKeyEnc[] = {
- (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x24,
- (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06,
- (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48,
- (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01,
- (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81,
- (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81,
- (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD,
- (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB,
- (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D,
- (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36,
- (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38,
- (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F,
- (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C,
- (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E,
- (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23,
- (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5,
- (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E,
- (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8,
- (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34,
- (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57,
- (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18,
- (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21,
- (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF,
- (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29,
- (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D,
- (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A,
- (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4,
- (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07,
- (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95,
- (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F,
- (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50,
- (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3,
- (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4,
- (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C,
- (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B,
- (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA,
- (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3,
- (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78,
- (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02,
- (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00,
- (byte)0x03, (byte)0x81, (byte)0x85, (byte)0x00,
- (byte)0x02, (byte)0x81, (byte)0x81, (byte)0x00,
- (byte)0xEE, (byte)0xD6, (byte)0xB1, (byte)0xA3,
- (byte)0xB4, (byte)0x78, (byte)0x2B, (byte)0x35,
- (byte)0xEF, (byte)0xCD, (byte)0x17, (byte)0x86,
- (byte)0x63, (byte)0x2B, (byte)0x97, (byte)0x0E,
- (byte)0x7A, (byte)0xD1, (byte)0xFF, (byte)0x7A,
- (byte)0xEB, (byte)0x57, (byte)0x61, (byte)0xA1,
- (byte)0xF7, (byte)0x90, (byte)0x11, (byte)0xA7,
- (byte)0x79, (byte)0x28, (byte)0x69, (byte)0xBA,
- (byte)0xA7, (byte)0xB2, (byte)0x37, (byte)0x17,
- (byte)0xAE, (byte)0x3C, (byte)0x92, (byte)0x89,
- (byte)0x88, (byte)0xE5, (byte)0x7E, (byte)0x8E,
- (byte)0xF0, (byte)0x24, (byte)0xD0, (byte)0xE1,
- (byte)0xC4, (byte)0xB0, (byte)0x26, (byte)0x5A,
- (byte)0x1E, (byte)0xBD, (byte)0xA0, (byte)0xCF,
- (byte)0x3E, (byte)0x97, (byte)0x2A, (byte)0x13,
- (byte)0x92, (byte)0x3B, (byte)0x39, (byte)0xD0,
- (byte)0x1D, (byte)0xA3, (byte)0x6B, (byte)0x3E,
- (byte)0xC2, (byte)0xBB, (byte)0x14, (byte)0xB6,
- (byte)0xE2, (byte)0x4C, (byte)0x0E, (byte)0x5B,
- (byte)0x4B, (byte)0xA4, (byte)0x9D, (byte)0xA6,
- (byte)0x21, (byte)0xB0, (byte)0xF9, (byte)0xDE,
- (byte)0x55, (byte)0xAE, (byte)0x5C, (byte)0x29,
- (byte)0x0E, (byte)0xC1, (byte)0xFC, (byte)0xBA,
- (byte)0x51, (byte)0xD3, (byte)0xB6, (byte)0x6D,
- (byte)0x75, (byte)0x72, (byte)0xDF, (byte)0x43,
- (byte)0xAB, (byte)0x94, (byte)0x21, (byte)0x6E,
- (byte)0x0C, (byte)0xD1, (byte)0x93, (byte)0x54,
- (byte)0x56, (byte)0x7D, (byte)0x4B, (byte)0x90,
- (byte)0xF1, (byte)0x94, (byte)0x45, (byte)0xD4,
- (byte)0x2A, (byte)0x71, (byte)0xA1, (byte)0xB8,
- (byte)0xDD, (byte)0xAA, (byte)0x05, (byte)0xF0,
- (byte)0x27, (byte)0x37, (byte)0xBD, (byte)0x44
+ (byte)0x30, (byte)0x82, (byte)0x02, (byte)0x25,
+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x17,
+ (byte)0x06, (byte)0x09, (byte)0x2a, (byte)0x86,
+ (byte)0x48, (byte)0x86, (byte)0xf7, (byte)0x0d,
+ (byte)0x01, (byte)0x03, (byte)0x01, (byte)0x30,
+ (byte)0x82, (byte)0x01, (byte)0x08, (byte)0x02,
+ (byte)0x82, (byte)0x01, (byte)0x01, (byte)0x00,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xad, (byte)0xf8, (byte)0x54, (byte)0x58,
+ (byte)0xa2, (byte)0xbb, (byte)0x4a, (byte)0x9a,
+ (byte)0xaf, (byte)0xdc, (byte)0x56, (byte)0x20,
+ (byte)0x27, (byte)0x3d, (byte)0x3c, (byte)0xf1,
+ (byte)0xd8, (byte)0xb9, (byte)0xc5, (byte)0x83,
+ (byte)0xce, (byte)0x2d, (byte)0x36, (byte)0x95,
+ (byte)0xa9, (byte)0xe1, (byte)0x36, (byte)0x41,
+ (byte)0x14, (byte)0x64, (byte)0x33, (byte)0xfb,
+ (byte)0xcc, (byte)0x93, (byte)0x9d, (byte)0xce,
+ (byte)0x24, (byte)0x9b, (byte)0x3e, (byte)0xf9,
+ (byte)0x7d, (byte)0x2f, (byte)0xe3, (byte)0x63,
+ (byte)0x63, (byte)0x0c, (byte)0x75, (byte)0xd8,
+ (byte)0xf6, (byte)0x81, (byte)0xb2, (byte)0x02,
+ (byte)0xae, (byte)0xc4, (byte)0x61, (byte)0x7a,
+ (byte)0xd3, (byte)0xdf, (byte)0x1e, (byte)0xd5,
+ (byte)0xd5, (byte)0xfd, (byte)0x65, (byte)0x61,
+ (byte)0x24, (byte)0x33, (byte)0xf5, (byte)0x1f,
+ (byte)0x5f, (byte)0x06, (byte)0x6e, (byte)0xd0,
+ (byte)0x85, (byte)0x63, (byte)0x65, (byte)0x55,
+ (byte)0x3d, (byte)0xed, (byte)0x1a, (byte)0xf3,
+ (byte)0xb5, (byte)0x57, (byte)0x13, (byte)0x5e,
+ (byte)0x7f, (byte)0x57, (byte)0xc9, (byte)0x35,
+ (byte)0x98, (byte)0x4f, (byte)0x0c, (byte)0x70,
+ (byte)0xe0, (byte)0xe6, (byte)0x8b, (byte)0x77,
+ (byte)0xe2, (byte)0xa6, (byte)0x89, (byte)0xda,
+ (byte)0xf3, (byte)0xef, (byte)0xe8, (byte)0x72,
+ (byte)0x1d, (byte)0xf1, (byte)0x58, (byte)0xa1,
+ (byte)0x36, (byte)0xad, (byte)0xe7, (byte)0x35,
+ (byte)0x30, (byte)0xac, (byte)0xca, (byte)0x4f,
+ (byte)0x48, (byte)0x3a, (byte)0x79, (byte)0x7a,
+ (byte)0xbc, (byte)0x0a, (byte)0xb1, (byte)0x82,
+ (byte)0xb3, (byte)0x24, (byte)0xfb, (byte)0x61,
+ (byte)0xd1, (byte)0x08, (byte)0xa9, (byte)0x4b,
+ (byte)0xb2, (byte)0xc8, (byte)0xe3, (byte)0xfb,
+ (byte)0xb9, (byte)0x6a, (byte)0xda, (byte)0xb7,
+ (byte)0x60, (byte)0xd7, (byte)0xf4, (byte)0x68,
+ (byte)0x1d, (byte)0x4f, (byte)0x42, (byte)0xa3,
+ (byte)0xde, (byte)0x39, (byte)0x4d, (byte)0xf4,
+ (byte)0xae, (byte)0x56, (byte)0xed, (byte)0xe7,
+ (byte)0x63, (byte)0x72, (byte)0xbb, (byte)0x19,
+ (byte)0x0b, (byte)0x07, (byte)0xa7, (byte)0xc8,
+ (byte)0xee, (byte)0x0a, (byte)0x6d, (byte)0x70,
+ (byte)0x9e, (byte)0x02, (byte)0xfc, (byte)0xe1,
+ (byte)0xcd, (byte)0xf7, (byte)0xe2, (byte)0xec,
+ (byte)0xc0, (byte)0x34, (byte)0x04, (byte)0xcd,
+ (byte)0x28, (byte)0x34, (byte)0x2f, (byte)0x61,
+ (byte)0x91, (byte)0x72, (byte)0xfe, (byte)0x9c,
+ (byte)0xe9, (byte)0x85, (byte)0x83, (byte)0xff,
+ (byte)0x8e, (byte)0x4f, (byte)0x12, (byte)0x32,
+ (byte)0xee, (byte)0xf2, (byte)0x81, (byte)0x83,
+ (byte)0xc3, (byte)0xfe, (byte)0x3b, (byte)0x1b,
+ (byte)0x4c, (byte)0x6f, (byte)0xad, (byte)0x73,
+ (byte)0x3b, (byte)0xb5, (byte)0xfc, (byte)0xbc,
+ (byte)0x2e, (byte)0xc2, (byte)0x20, (byte)0x05,
+ (byte)0xc5, (byte)0x8e, (byte)0xf1, (byte)0x83,
+ (byte)0x7d, (byte)0x16, (byte)0x83, (byte)0xb2,
+ (byte)0xc6, (byte)0xf3, (byte)0x4a, (byte)0x26,
+ (byte)0xc1, (byte)0xb2, (byte)0xef, (byte)0xfa,
+ (byte)0x88, (byte)0x6b, (byte)0x42, (byte)0x38,
+ (byte)0x61, (byte)0x28, (byte)0x5c, (byte)0x97,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x03,
+ (byte)0x82, (byte)0x01, (byte)0x06, (byte)0x00,
+ (byte)0x02, (byte)0x82, (byte)0x01, (byte)0x01,
+ (byte)0x00, (byte)0xb0, (byte)0x6e, (byte)0x76,
+ (byte)0x73, (byte)0x32, (byte)0xd4, (byte)0xcf,
+ (byte)0xb8, (byte)0x16, (byte)0x46, (byte)0x76,
+ (byte)0x8b, (byte)0x2b, (byte)0x2b, (byte)0xda,
+ (byte)0x6e, (byte)0x25, (byte)0x52, (byte)0x87,
+ (byte)0x9e, (byte)0x0c, (byte)0x97, (byte)0xc7,
+ (byte)0x16, (byte)0x42, (byte)0xb6, (byte)0x30,
+ (byte)0xc6, (byte)0x30, (byte)0xce, (byte)0xc5,
+ (byte)0xf4, (byte)0x8e, (byte)0x28, (byte)0xe0,
+ (byte)0x8d, (byte)0x5b, (byte)0x44, (byte)0x59,
+ (byte)0xae, (byte)0x5e, (byte)0xb6, (byte)0x5f,
+ (byte)0x48, (byte)0x8e, (byte)0x13, (byte)0x91,
+ (byte)0x00, (byte)0x72, (byte)0x9b, (byte)0x1b,
+ (byte)0xd8, (byte)0x69, (byte)0xe4, (byte)0xdf,
+ (byte)0x10, (byte)0x50, (byte)0x53, (byte)0x0f,
+ (byte)0x3d, (byte)0xba, (byte)0x82, (byte)0x02,
+ (byte)0x1c, (byte)0x78, (byte)0xf3, (byte)0xf3,
+ (byte)0x9a, (byte)0x01, (byte)0x3d, (byte)0xb6,
+ (byte)0x65, (byte)0xc2, (byte)0x6f, (byte)0x70,
+ (byte)0xec, (byte)0x67, (byte)0x14, (byte)0x56,
+ (byte)0xa0, (byte)0x98, (byte)0xef, (byte)0xc8,
+ (byte)0x63, (byte)0xbe, (byte)0x14, (byte)0x78,
+ (byte)0x1d, (byte)0xff, (byte)0xf8, (byte)0xf9,
+ (byte)0xd9, (byte)0x53, (byte)0xb2, (byte)0xc4,
+ (byte)0x40, (byte)0x3e, (byte)0x90, (byte)0x5c,
+ (byte)0x10, (byte)0xf8, (byte)0xa4, (byte)0xd3,
+ (byte)0xa2, (byte)0x39, (byte)0xc6, (byte)0xeb,
+ (byte)0xcd, (byte)0x3d, (byte)0xd1, (byte)0x27,
+ (byte)0x51, (byte)0xc8, (byte)0x4f, (byte)0x9b,
+ (byte)0x86, (byte)0xce, (byte)0xcf, (byte)0x80,
+ (byte)0x96, (byte)0x3d, (byte)0xb9, (byte)0x25,
+ (byte)0x05, (byte)0x54, (byte)0x15, (byte)0x8d,
+ (byte)0x02, (byte)0xd2, (byte)0x6f, (byte)0xed,
+ (byte)0xaf, (byte)0x49, (byte)0x0d, (byte)0x3e,
+ (byte)0xda, (byte)0xe6, (byte)0x3d, (byte)0x1a,
+ (byte)0x91, (byte)0x8f, (byte)0xca, (byte)0x6d,
+ (byte)0x88, (byte)0xff, (byte)0x0f, (byte)0x75,
+ (byte)0xf5, (byte)0x4e, (byte)0x08, (byte)0x42,
+ (byte)0xf0, (byte)0xa3, (byte)0x4a, (byte)0x95,
+ (byte)0xca, (byte)0x18, (byte)0xc1, (byte)0x3d,
+ (byte)0x9a, (byte)0x12, (byte)0x3e, (byte)0x09,
+ (byte)0x29, (byte)0x82, (byte)0x8e, (byte)0xe5,
+ (byte)0x3a, (byte)0x4c, (byte)0xcc, (byte)0x8f,
+ (byte)0x94, (byte)0x14, (byte)0xe3, (byte)0xc7,
+ (byte)0x63, (byte)0x8a, (byte)0x23, (byte)0x11,
+ (byte)0x03, (byte)0x77, (byte)0x7d, (byte)0xe8,
+ (byte)0x03, (byte)0x15, (byte)0x37, (byte)0xa9,
+ (byte)0xe5, (byte)0xd7, (byte)0x38, (byte)0x8f,
+ (byte)0xa8, (byte)0x49, (byte)0x5d, (byte)0xe4,
+ (byte)0x0d, (byte)0xed, (byte)0xb9, (byte)0x92,
+ (byte)0xc4, (byte)0xd7, (byte)0x72, (byte)0xf2,
+ (byte)0x29, (byte)0x26, (byte)0x99, (byte)0x11,
+ (byte)0xac, (byte)0xa8, (byte)0x45, (byte)0xb1,
+ (byte)0x6b, (byte)0x5a, (byte)0x01, (byte)0xc4,
+ (byte)0xe0, (byte)0x08, (byte)0xbf, (byte)0xa1,
+ (byte)0x49, (byte)0x2a, (byte)0x9c, (byte)0x8c,
+ (byte)0x89, (byte)0x31, (byte)0x07, (byte)0x36,
+ (byte)0x7d, (byte)0xec, (byte)0xa3, (byte)0x9a,
+ (byte)0x1e, (byte)0xd6, (byte)0xc6, (byte)0x01,
+ (byte)0x0e, (byte)0xc8, (byte)0x85, (byte)0x55,
+ (byte)0x42, (byte)0xa4, (byte)0x87, (byte)0x58,
+ (byte)0xfa, (byte)0xec, (byte)0x71, (byte)0x2e,
+ (byte)0x4c, (byte)0x46, (byte)0xd2, (byte)0x19,
+ (byte)0x23, (byte)0x0a, (byte)0x59, (byte)0x1a,
+ (byte)0x56
};
private static final byte alicePrivKeyEnc[] = {
- (byte)0x30, (byte)0x81, (byte)0xE3, (byte)0x02,
- (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81,
- (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A,
- (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7,
- (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01,
- (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02,
- (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4,
- (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E,
- (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20,
- (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91,
- (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33,
- (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45,
- (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88,
- (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B,
- (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3,
- (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43,
- (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18,
- (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55,
- (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38,
- (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C,
- (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3,
- (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE,
- (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5,
- (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1,
- (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18,
- (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84,
- (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6,
- (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19,
- (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A,
- (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9,
- (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0,
- (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02,
- (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D,
- (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41,
- (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD,
- (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19,
- (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2,
- (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9,
- (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02,
- (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02,
- (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x42,
- (byte)0x02, (byte)0x40, (byte)0x36, (byte)0x4D,
- (byte)0xD0, (byte)0x58, (byte)0x64, (byte)0x91,
- (byte)0x78, (byte)0xA2, (byte)0x4B, (byte)0x79,
- (byte)0x46, (byte)0xFE, (byte)0xC9, (byte)0xD9,
- (byte)0xCA, (byte)0x5C, (byte)0xF9, (byte)0xFD,
- (byte)0x6C, (byte)0x5D, (byte)0x76, (byte)0x3A,
- (byte)0x41, (byte)0x6D, (byte)0x44, (byte)0x62,
- (byte)0x75, (byte)0x93, (byte)0x81, (byte)0x93,
- (byte)0x00, (byte)0x4C, (byte)0xB1, (byte)0xD8,
- (byte)0x7D, (byte)0x9D, (byte)0xF3, (byte)0x16,
- (byte)0x2C, (byte)0x6C, (byte)0x9F, (byte)0x7A,
- (byte)0x84, (byte)0xA3, (byte)0x7A, (byte)0xC1,
- (byte)0x4F, (byte)0x60, (byte)0xE3, (byte)0xB5,
- (byte)0x86, (byte)0x28, (byte)0x08, (byte)0x4D,
- (byte)0x94, (byte)0xB6, (byte)0x04, (byte)0x0D,
- (byte)0xAC, (byte)0xBD, (byte)0x1F, (byte)0x42,
- (byte)0x8F, (byte)0x1B
+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x3f,
+ (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x30,
+ (byte)0x82, (byte)0x01, (byte)0x17, (byte)0x06,
+ (byte)0x09, (byte)0x2a, (byte)0x86, (byte)0x48,
+ (byte)0x86, (byte)0xf7, (byte)0x0d, (byte)0x01,
+ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x82,
+ (byte)0x01, (byte)0x08, (byte)0x02, (byte)0x82,
+ (byte)0x01, (byte)0x01, (byte)0x00, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xad,
+ (byte)0xf8, (byte)0x54, (byte)0x58, (byte)0xa2,
+ (byte)0xbb, (byte)0x4a, (byte)0x9a, (byte)0xaf,
+ (byte)0xdc, (byte)0x56, (byte)0x20, (byte)0x27,
+ (byte)0x3d, (byte)0x3c, (byte)0xf1, (byte)0xd8,
+ (byte)0xb9, (byte)0xc5, (byte)0x83, (byte)0xce,
+ (byte)0x2d, (byte)0x36, (byte)0x95, (byte)0xa9,
+ (byte)0xe1, (byte)0x36, (byte)0x41, (byte)0x14,
+ (byte)0x64, (byte)0x33, (byte)0xfb, (byte)0xcc,
+ (byte)0x93, (byte)0x9d, (byte)0xce, (byte)0x24,
+ (byte)0x9b, (byte)0x3e, (byte)0xf9, (byte)0x7d,
+ (byte)0x2f, (byte)0xe3, (byte)0x63, (byte)0x63,
+ (byte)0x0c, (byte)0x75, (byte)0xd8, (byte)0xf6,
+ (byte)0x81, (byte)0xb2, (byte)0x02, (byte)0xae,
+ (byte)0xc4, (byte)0x61, (byte)0x7a, (byte)0xd3,
+ (byte)0xdf, (byte)0x1e, (byte)0xd5, (byte)0xd5,
+ (byte)0xfd, (byte)0x65, (byte)0x61, (byte)0x24,
+ (byte)0x33, (byte)0xf5, (byte)0x1f, (byte)0x5f,
+ (byte)0x06, (byte)0x6e, (byte)0xd0, (byte)0x85,
+ (byte)0x63, (byte)0x65, (byte)0x55, (byte)0x3d,
+ (byte)0xed, (byte)0x1a, (byte)0xf3, (byte)0xb5,
+ (byte)0x57, (byte)0x13, (byte)0x5e, (byte)0x7f,
+ (byte)0x57, (byte)0xc9, (byte)0x35, (byte)0x98,
+ (byte)0x4f, (byte)0x0c, (byte)0x70, (byte)0xe0,
+ (byte)0xe6, (byte)0x8b, (byte)0x77, (byte)0xe2,
+ (byte)0xa6, (byte)0x89, (byte)0xda, (byte)0xf3,
+ (byte)0xef, (byte)0xe8, (byte)0x72, (byte)0x1d,
+ (byte)0xf1, (byte)0x58, (byte)0xa1, (byte)0x36,
+ (byte)0xad, (byte)0xe7, (byte)0x35, (byte)0x30,
+ (byte)0xac, (byte)0xca, (byte)0x4f, (byte)0x48,
+ (byte)0x3a, (byte)0x79, (byte)0x7a, (byte)0xbc,
+ (byte)0x0a, (byte)0xb1, (byte)0x82, (byte)0xb3,
+ (byte)0x24, (byte)0xfb, (byte)0x61, (byte)0xd1,
+ (byte)0x08, (byte)0xa9, (byte)0x4b, (byte)0xb2,
+ (byte)0xc8, (byte)0xe3, (byte)0xfb, (byte)0xb9,
+ (byte)0x6a, (byte)0xda, (byte)0xb7, (byte)0x60,
+ (byte)0xd7, (byte)0xf4, (byte)0x68, (byte)0x1d,
+ (byte)0x4f, (byte)0x42, (byte)0xa3, (byte)0xde,
+ (byte)0x39, (byte)0x4d, (byte)0xf4, (byte)0xae,
+ (byte)0x56, (byte)0xed, (byte)0xe7, (byte)0x63,
+ (byte)0x72, (byte)0xbb, (byte)0x19, (byte)0x0b,
+ (byte)0x07, (byte)0xa7, (byte)0xc8, (byte)0xee,
+ (byte)0x0a, (byte)0x6d, (byte)0x70, (byte)0x9e,
+ (byte)0x02, (byte)0xfc, (byte)0xe1, (byte)0xcd,
+ (byte)0xf7, (byte)0xe2, (byte)0xec, (byte)0xc0,
+ (byte)0x34, (byte)0x04, (byte)0xcd, (byte)0x28,
+ (byte)0x34, (byte)0x2f, (byte)0x61, (byte)0x91,
+ (byte)0x72, (byte)0xfe, (byte)0x9c, (byte)0xe9,
+ (byte)0x85, (byte)0x83, (byte)0xff, (byte)0x8e,
+ (byte)0x4f, (byte)0x12, (byte)0x32, (byte)0xee,
+ (byte)0xf2, (byte)0x81, (byte)0x83, (byte)0xc3,
+ (byte)0xfe, (byte)0x3b, (byte)0x1b, (byte)0x4c,
+ (byte)0x6f, (byte)0xad, (byte)0x73, (byte)0x3b,
+ (byte)0xb5, (byte)0xfc, (byte)0xbc, (byte)0x2e,
+ (byte)0xc2, (byte)0x20, (byte)0x05, (byte)0xc5,
+ (byte)0x8e, (byte)0xf1, (byte)0x83, (byte)0x7d,
+ (byte)0x16, (byte)0x83, (byte)0xb2, (byte)0xc6,
+ (byte)0xf3, (byte)0x4a, (byte)0x26, (byte)0xc1,
+ (byte)0xb2, (byte)0xef, (byte)0xfa, (byte)0x88,
+ (byte)0x6b, (byte)0x42, (byte)0x38, (byte)0x61,
+ (byte)0x28, (byte)0x5c, (byte)0x97, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x02,
+ (byte)0x01, (byte)0x02, (byte)0x04, (byte)0x1f,
+ (byte)0x02, (byte)0x1d, (byte)0x00, (byte)0xc7,
+ (byte)0x06, (byte)0xe9, (byte)0x24, (byte)0xf8,
+ (byte)0xb1, (byte)0xdf, (byte)0x98, (byte)0x61,
+ (byte)0x34, (byte)0x7f, (byte)0xcf, (byte)0xf1,
+ (byte)0xcc, (byte)0xcd, (byte)0xc8, (byte)0xcc,
+ (byte)0xd9, (byte)0x6a, (byte)0xb8, (byte)0x7d,
+ (byte)0x72, (byte)0x4c, (byte)0x58, (byte)0x5a,
+ (byte)0x97, (byte)0x39, (byte)0x69
};
private static final byte bobPubKeyEnc[] = {
- (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x23,
- (byte)0x30, (byte)0x81, (byte)0x99, (byte)0x06,
- (byte)0x09, (byte)0x2A, (byte)0x86, (byte)0x48,
- (byte)0x86, (byte)0xF7, (byte)0x0D, (byte)0x01,
- (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x81,
- (byte)0x8B, (byte)0x02, (byte)0x81, (byte)0x81,
- (byte)0x00, (byte)0xF4, (byte)0x88, (byte)0xFD,
- (byte)0x58, (byte)0x4E, (byte)0x49, (byte)0xDB,
- (byte)0xCD, (byte)0x20, (byte)0xB4, (byte)0x9D,
- (byte)0xE4, (byte)0x91, (byte)0x07, (byte)0x36,
- (byte)0x6B, (byte)0x33, (byte)0x6C, (byte)0x38,
- (byte)0x0D, (byte)0x45, (byte)0x1D, (byte)0x0F,
- (byte)0x7C, (byte)0x88, (byte)0xB3, (byte)0x1C,
- (byte)0x7C, (byte)0x5B, (byte)0x2D, (byte)0x8E,
- (byte)0xF6, (byte)0xF3, (byte)0xC9, (byte)0x23,
- (byte)0xC0, (byte)0x43, (byte)0xF0, (byte)0xA5,
- (byte)0x5B, (byte)0x18, (byte)0x8D, (byte)0x8E,
- (byte)0xBB, (byte)0x55, (byte)0x8C, (byte)0xB8,
- (byte)0x5D, (byte)0x38, (byte)0xD3, (byte)0x34,
- (byte)0xFD, (byte)0x7C, (byte)0x17, (byte)0x57,
- (byte)0x43, (byte)0xA3, (byte)0x1D, (byte)0x18,
- (byte)0x6C, (byte)0xDE, (byte)0x33, (byte)0x21,
- (byte)0x2C, (byte)0xB5, (byte)0x2A, (byte)0xFF,
- (byte)0x3C, (byte)0xE1, (byte)0xB1, (byte)0x29,
- (byte)0x40, (byte)0x18, (byte)0x11, (byte)0x8D,
- (byte)0x7C, (byte)0x84, (byte)0xA7, (byte)0x0A,
- (byte)0x72, (byte)0xD6, (byte)0x86, (byte)0xC4,
- (byte)0x03, (byte)0x19, (byte)0xC8, (byte)0x07,
- (byte)0x29, (byte)0x7A, (byte)0xCA, (byte)0x95,
- (byte)0x0C, (byte)0xD9, (byte)0x96, (byte)0x9F,
- (byte)0xAB, (byte)0xD0, (byte)0x0A, (byte)0x50,
- (byte)0x9B, (byte)0x02, (byte)0x46, (byte)0xD3,
- (byte)0x08, (byte)0x3D, (byte)0x66, (byte)0xA4,
- (byte)0x5D, (byte)0x41, (byte)0x9F, (byte)0x9C,
- (byte)0x7C, (byte)0xBD, (byte)0x89, (byte)0x4B,
- (byte)0x22, (byte)0x19, (byte)0x26, (byte)0xBA,
- (byte)0xAB, (byte)0xA2, (byte)0x5E, (byte)0xC3,
- (byte)0x55, (byte)0xE9, (byte)0x2F, (byte)0x78,
- (byte)0xC7, (byte)0x02, (byte)0x01, (byte)0x02,
- (byte)0x02, (byte)0x02, (byte)0x02, (byte)0x00,
- (byte)0x03, (byte)0x81, (byte)0x84, (byte)0x00,
- (byte)0x02, (byte)0x81, (byte)0x80, (byte)0x2C,
- (byte)0x40, (byte)0xFA, (byte)0xF6, (byte)0xA6,
- (byte)0xF8, (byte)0xAC, (byte)0xC2, (byte)0x4F,
- (byte)0xCD, (byte)0xC7, (byte)0x37, (byte)0x93,
- (byte)0xE5, (byte)0xE4, (byte)0x5E, (byte)0x18,
- (byte)0x14, (byte)0xE6, (byte)0x50, (byte)0xDA,
- (byte)0x55, (byte)0x38, (byte)0x5D, (byte)0x24,
- (byte)0xF5, (byte)0x42, (byte)0x68, (byte)0x5F,
- (byte)0xF5, (byte)0x15, (byte)0xC8, (byte)0x9B,
- (byte)0x5D, (byte)0x06, (byte)0x3D, (byte)0xE1,
- (byte)0x52, (byte)0x2F, (byte)0x98, (byte)0xFF,
- (byte)0x37, (byte)0xBB, (byte)0x75, (byte)0x48,
- (byte)0x48, (byte)0xE9, (byte)0x65, (byte)0x84,
- (byte)0x37, (byte)0xBB, (byte)0xB3, (byte)0xE9,
- (byte)0x36, (byte)0x01, (byte)0xB4, (byte)0x6A,
- (byte)0x1C, (byte)0xB2, (byte)0x11, (byte)0x82,
- (byte)0xCE, (byte)0x3D, (byte)0x65, (byte)0xE5,
- (byte)0x3C, (byte)0x89, (byte)0xE9, (byte)0x52,
- (byte)0x19, (byte)0xBD, (byte)0x58, (byte)0xF6,
- (byte)0xA2, (byte)0x03, (byte)0xA8, (byte)0xB2,
- (byte)0xA5, (byte)0xDB, (byte)0xEB, (byte)0xF5,
- (byte)0x94, (byte)0xF9, (byte)0x46, (byte)0xBE,
- (byte)0x45, (byte)0x4C, (byte)0x65, (byte)0xD2,
- (byte)0xD1, (byte)0xCF, (byte)0xFF, (byte)0xFF,
- (byte)0xFA, (byte)0x38, (byte)0xF1, (byte)0x72,
- (byte)0xAB, (byte)0xB9, (byte)0x14, (byte)0x4E,
- (byte)0xF5, (byte)0xF0, (byte)0x7A, (byte)0x8E,
- (byte)0x45, (byte)0xFD, (byte)0x5B, (byte)0xF9,
- (byte)0xA2, (byte)0x97, (byte)0x1B, (byte)0xAE,
- (byte)0x2C, (byte)0x7B, (byte)0x6B, (byte)0x7C,
- (byte)0x98, (byte)0xFE, (byte)0x58, (byte)0xDD,
- (byte)0xBE, (byte)0xF6, (byte)0x1C, (byte)0x8E,
- (byte)0xD0, (byte)0xA1, (byte)0x72
+ (byte)0x30, (byte)0x82, (byte)0x02, (byte)0x25,
+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x17,
+ (byte)0x06, (byte)0x09, (byte)0x2a, (byte)0x86,
+ (byte)0x48, (byte)0x86, (byte)0xf7, (byte)0x0d,
+ (byte)0x01, (byte)0x03, (byte)0x01, (byte)0x30,
+ (byte)0x82, (byte)0x01, (byte)0x08, (byte)0x02,
+ (byte)0x82, (byte)0x01, (byte)0x01, (byte)0x00,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xad, (byte)0xf8, (byte)0x54, (byte)0x58,
+ (byte)0xa2, (byte)0xbb, (byte)0x4a, (byte)0x9a,
+ (byte)0xaf, (byte)0xdc, (byte)0x56, (byte)0x20,
+ (byte)0x27, (byte)0x3d, (byte)0x3c, (byte)0xf1,
+ (byte)0xd8, (byte)0xb9, (byte)0xc5, (byte)0x83,
+ (byte)0xce, (byte)0x2d, (byte)0x36, (byte)0x95,
+ (byte)0xa9, (byte)0xe1, (byte)0x36, (byte)0x41,
+ (byte)0x14, (byte)0x64, (byte)0x33, (byte)0xfb,
+ (byte)0xcc, (byte)0x93, (byte)0x9d, (byte)0xce,
+ (byte)0x24, (byte)0x9b, (byte)0x3e, (byte)0xf9,
+ (byte)0x7d, (byte)0x2f, (byte)0xe3, (byte)0x63,
+ (byte)0x63, (byte)0x0c, (byte)0x75, (byte)0xd8,
+ (byte)0xf6, (byte)0x81, (byte)0xb2, (byte)0x02,
+ (byte)0xae, (byte)0xc4, (byte)0x61, (byte)0x7a,
+ (byte)0xd3, (byte)0xdf, (byte)0x1e, (byte)0xd5,
+ (byte)0xd5, (byte)0xfd, (byte)0x65, (byte)0x61,
+ (byte)0x24, (byte)0x33, (byte)0xf5, (byte)0x1f,
+ (byte)0x5f, (byte)0x06, (byte)0x6e, (byte)0xd0,
+ (byte)0x85, (byte)0x63, (byte)0x65, (byte)0x55,
+ (byte)0x3d, (byte)0xed, (byte)0x1a, (byte)0xf3,
+ (byte)0xb5, (byte)0x57, (byte)0x13, (byte)0x5e,
+ (byte)0x7f, (byte)0x57, (byte)0xc9, (byte)0x35,
+ (byte)0x98, (byte)0x4f, (byte)0x0c, (byte)0x70,
+ (byte)0xe0, (byte)0xe6, (byte)0x8b, (byte)0x77,
+ (byte)0xe2, (byte)0xa6, (byte)0x89, (byte)0xda,
+ (byte)0xf3, (byte)0xef, (byte)0xe8, (byte)0x72,
+ (byte)0x1d, (byte)0xf1, (byte)0x58, (byte)0xa1,
+ (byte)0x36, (byte)0xad, (byte)0xe7, (byte)0x35,
+ (byte)0x30, (byte)0xac, (byte)0xca, (byte)0x4f,
+ (byte)0x48, (byte)0x3a, (byte)0x79, (byte)0x7a,
+ (byte)0xbc, (byte)0x0a, (byte)0xb1, (byte)0x82,
+ (byte)0xb3, (byte)0x24, (byte)0xfb, (byte)0x61,
+ (byte)0xd1, (byte)0x08, (byte)0xa9, (byte)0x4b,
+ (byte)0xb2, (byte)0xc8, (byte)0xe3, (byte)0xfb,
+ (byte)0xb9, (byte)0x6a, (byte)0xda, (byte)0xb7,
+ (byte)0x60, (byte)0xd7, (byte)0xf4, (byte)0x68,
+ (byte)0x1d, (byte)0x4f, (byte)0x42, (byte)0xa3,
+ (byte)0xde, (byte)0x39, (byte)0x4d, (byte)0xf4,
+ (byte)0xae, (byte)0x56, (byte)0xed, (byte)0xe7,
+ (byte)0x63, (byte)0x72, (byte)0xbb, (byte)0x19,
+ (byte)0x0b, (byte)0x07, (byte)0xa7, (byte)0xc8,
+ (byte)0xee, (byte)0x0a, (byte)0x6d, (byte)0x70,
+ (byte)0x9e, (byte)0x02, (byte)0xfc, (byte)0xe1,
+ (byte)0xcd, (byte)0xf7, (byte)0xe2, (byte)0xec,
+ (byte)0xc0, (byte)0x34, (byte)0x04, (byte)0xcd,
+ (byte)0x28, (byte)0x34, (byte)0x2f, (byte)0x61,
+ (byte)0x91, (byte)0x72, (byte)0xfe, (byte)0x9c,
+ (byte)0xe9, (byte)0x85, (byte)0x83, (byte)0xff,
+ (byte)0x8e, (byte)0x4f, (byte)0x12, (byte)0x32,
+ (byte)0xee, (byte)0xf2, (byte)0x81, (byte)0x83,
+ (byte)0xc3, (byte)0xfe, (byte)0x3b, (byte)0x1b,
+ (byte)0x4c, (byte)0x6f, (byte)0xad, (byte)0x73,
+ (byte)0x3b, (byte)0xb5, (byte)0xfc, (byte)0xbc,
+ (byte)0x2e, (byte)0xc2, (byte)0x20, (byte)0x05,
+ (byte)0xc5, (byte)0x8e, (byte)0xf1, (byte)0x83,
+ (byte)0x7d, (byte)0x16, (byte)0x83, (byte)0xb2,
+ (byte)0xc6, (byte)0xf3, (byte)0x4a, (byte)0x26,
+ (byte)0xc1, (byte)0xb2, (byte)0xef, (byte)0xfa,
+ (byte)0x88, (byte)0x6b, (byte)0x42, (byte)0x38,
+ (byte)0x61, (byte)0x28, (byte)0x5c, (byte)0x97,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0x02, (byte)0x01, (byte)0x02, (byte)0x03,
+ (byte)0x82, (byte)0x01, (byte)0x06, (byte)0x00,
+ (byte)0x02, (byte)0x82, (byte)0x01, (byte)0x01,
+ (byte)0x00, (byte)0x8d, (byte)0xb4, (byte)0x1c,
+ (byte)0xfc, (byte)0xc0, (byte)0x5f, (byte)0x38,
+ (byte)0x4c, (byte)0x7f, (byte)0x31, (byte)0xaa,
+ (byte)0x03, (byte)0x06, (byte)0xf0, (byte)0xec,
+ (byte)0xfd, (byte)0x45, (byte)0x8d, (byte)0x69,
+ (byte)0x8a, (byte)0xb6, (byte)0x60, (byte)0x2f,
+ (byte)0xa2, (byte)0xb4, (byte)0xda, (byte)0xc0,
+ (byte)0x2e, (byte)0xe1, (byte)0x31, (byte)0x12,
+ (byte)0x5a, (byte)0x49, (byte)0xef, (byte)0xf7,
+ (byte)0x17, (byte)0x77, (byte)0x26, (byte)0xa8,
+ (byte)0x91, (byte)0x0b, (byte)0xbc, (byte)0x84,
+ (byte)0x5c, (byte)0x20, (byte)0x84, (byte)0xd3,
+ (byte)0x38, (byte)0xc9, (byte)0xa1, (byte)0x5b,
+ (byte)0xad, (byte)0x84, (byte)0x83, (byte)0xb9,
+ (byte)0xe1, (byte)0x59, (byte)0x87, (byte)0xd9,
+ (byte)0x9b, (byte)0x36, (byte)0x6b, (byte)0x3c,
+ (byte)0xb6, (byte)0x3c, (byte)0x3a, (byte)0x0c,
+ (byte)0xf4, (byte)0x0b, (byte)0xad, (byte)0x23,
+ (byte)0x8d, (byte)0x5f, (byte)0x80, (byte)0x16,
+ (byte)0xa3, (byte)0x96, (byte)0xbd, (byte)0x28,
+ (byte)0x2f, (byte)0x9f, (byte)0xd1, (byte)0x7e,
+ (byte)0x13, (byte)0x86, (byte)0x6a, (byte)0x22,
+ (byte)0x26, (byte)0xdb, (byte)0x3b, (byte)0x42,
+ (byte)0xf0, (byte)0x21, (byte)0x7a, (byte)0x6c,
+ (byte)0xe3, (byte)0xb0, (byte)0x8d, (byte)0x9c,
+ (byte)0x3b, (byte)0xfb, (byte)0x17, (byte)0x27,
+ (byte)0xde, (byte)0xe4, (byte)0x82, (byte)0x2e,
+ (byte)0x6d, (byte)0x08, (byte)0xeb, (byte)0x2b,
+ (byte)0xb9, (byte)0xb0, (byte)0x94, (byte)0x0e,
+ (byte)0x56, (byte)0xc1, (byte)0xf2, (byte)0x54,
+ (byte)0xd8, (byte)0x94, (byte)0x21, (byte)0xc2,
+ (byte)0x2d, (byte)0x4d, (byte)0x28, (byte)0xf2,
+ (byte)0xc3, (byte)0x96, (byte)0x5b, (byte)0x24,
+ (byte)0xb6, (byte)0xee, (byte)0xa4, (byte)0xbf,
+ (byte)0x20, (byte)0x19, (byte)0x29, (byte)0x1a,
+ (byte)0x55, (byte)0x46, (byte)0x7a, (byte)0x2a,
+ (byte)0x14, (byte)0x12, (byte)0x4d, (byte)0xf4,
+ (byte)0xee, (byte)0xf5, (byte)0x6f, (byte)0x4f,
+ (byte)0xf7, (byte)0x99, (byte)0x1c, (byte)0xa3,
+ (byte)0x72, (byte)0x33, (byte)0x7d, (byte)0xfe,
+ (byte)0xae, (byte)0x0b, (byte)0xda, (byte)0x2c,
+ (byte)0xc7, (byte)0xf3, (byte)0xba, (byte)0xb7,
+ (byte)0x83, (byte)0x58, (byte)0x4c, (byte)0x93,
+ (byte)0x5d, (byte)0x90, (byte)0x65, (byte)0xc9,
+ (byte)0xb8, (byte)0x6d, (byte)0x2d, (byte)0xda,
+ (byte)0x10, (byte)0x55, (byte)0xe6, (byte)0x27,
+ (byte)0xb9, (byte)0x4b, (byte)0x75, (byte)0x30,
+ (byte)0xfa, (byte)0xe4, (byte)0xa3, (byte)0xff,
+ (byte)0xae, (byte)0xf9, (byte)0xfb, (byte)0xe4,
+ (byte)0x62, (byte)0x89, (byte)0x7c, (byte)0x7d,
+ (byte)0x20, (byte)0x50, (byte)0xf9, (byte)0xd1,
+ (byte)0xe2, (byte)0x0e, (byte)0x56, (byte)0xf6,
+ (byte)0x3c, (byte)0x8b, (byte)0x24, (byte)0x8a,
+ (byte)0x6d, (byte)0x92, (byte)0x3f, (byte)0x85,
+ (byte)0x7b, (byte)0x3b, (byte)0x49, (byte)0x21,
+ (byte)0x9d, (byte)0x26, (byte)0x1b, (byte)0x58,
+ (byte)0x08, (byte)0x9e, (byte)0x5f, (byte)0xea,
+ (byte)0x23, (byte)0x20, (byte)0xc2, (byte)0x3d,
+ (byte)0x87, (byte)0xbe, (byte)0x1a, (byte)0x17,
+ (byte)0x34, (byte)0xd8, (byte)0x10, (byte)0x0f,
+ (byte)0x81, (byte)0xb6, (byte)0xc7, (byte)0xa5,
+ (byte)0xe9, (byte)0x8b, (byte)0x21, (byte)0xab,
+ (byte)0x09, (byte)0x88, (byte)0x5e, (byte)0xbd,
+ (byte)0xa2, (byte)0x8a, (byte)0xc4, (byte)0xa8,
+ (byte)0x83
};
private static final byte bobPrivKeyEnc[] = {
- (byte)0x30, (byte)0x81, (byte)0xE4, (byte)0x02,
- (byte)0x01, (byte)0x00, (byte)0x30, (byte)0x81,
- (byte)0x99, (byte)0x06, (byte)0x09, (byte)0x2A,
- (byte)0x86, (byte)0x48, (byte)0x86, (byte)0xF7,
- (byte)0x0D, (byte)0x01, (byte)0x03, (byte)0x01,
- (byte)0x30, (byte)0x81, (byte)0x8B, (byte)0x02,
- (byte)0x81, (byte)0x81, (byte)0x00, (byte)0xF4,
- (byte)0x88, (byte)0xFD, (byte)0x58, (byte)0x4E,
- (byte)0x49, (byte)0xDB, (byte)0xCD, (byte)0x20,
- (byte)0xB4, (byte)0x9D, (byte)0xE4, (byte)0x91,
- (byte)0x07, (byte)0x36, (byte)0x6B, (byte)0x33,
- (byte)0x6C, (byte)0x38, (byte)0x0D, (byte)0x45,
- (byte)0x1D, (byte)0x0F, (byte)0x7C, (byte)0x88,
- (byte)0xB3, (byte)0x1C, (byte)0x7C, (byte)0x5B,
- (byte)0x2D, (byte)0x8E, (byte)0xF6, (byte)0xF3,
- (byte)0xC9, (byte)0x23, (byte)0xC0, (byte)0x43,
- (byte)0xF0, (byte)0xA5, (byte)0x5B, (byte)0x18,
- (byte)0x8D, (byte)0x8E, (byte)0xBB, (byte)0x55,
- (byte)0x8C, (byte)0xB8, (byte)0x5D, (byte)0x38,
- (byte)0xD3, (byte)0x34, (byte)0xFD, (byte)0x7C,
- (byte)0x17, (byte)0x57, (byte)0x43, (byte)0xA3,
- (byte)0x1D, (byte)0x18, (byte)0x6C, (byte)0xDE,
- (byte)0x33, (byte)0x21, (byte)0x2C, (byte)0xB5,
- (byte)0x2A, (byte)0xFF, (byte)0x3C, (byte)0xE1,
- (byte)0xB1, (byte)0x29, (byte)0x40, (byte)0x18,
- (byte)0x11, (byte)0x8D, (byte)0x7C, (byte)0x84,
- (byte)0xA7, (byte)0x0A, (byte)0x72, (byte)0xD6,
- (byte)0x86, (byte)0xC4, (byte)0x03, (byte)0x19,
- (byte)0xC8, (byte)0x07, (byte)0x29, (byte)0x7A,
- (byte)0xCA, (byte)0x95, (byte)0x0C, (byte)0xD9,
- (byte)0x96, (byte)0x9F, (byte)0xAB, (byte)0xD0,
- (byte)0x0A, (byte)0x50, (byte)0x9B, (byte)0x02,
- (byte)0x46, (byte)0xD3, (byte)0x08, (byte)0x3D,
- (byte)0x66, (byte)0xA4, (byte)0x5D, (byte)0x41,
- (byte)0x9F, (byte)0x9C, (byte)0x7C, (byte)0xBD,
- (byte)0x89, (byte)0x4B, (byte)0x22, (byte)0x19,
- (byte)0x26, (byte)0xBA, (byte)0xAB, (byte)0xA2,
- (byte)0x5E, (byte)0xC3, (byte)0x55, (byte)0xE9,
- (byte)0x2F, (byte)0x78, (byte)0xC7, (byte)0x02,
- (byte)0x01, (byte)0x02, (byte)0x02, (byte)0x02,
- (byte)0x02, (byte)0x00, (byte)0x04, (byte)0x43,
- (byte)0x02, (byte)0x41, (byte)0x00, (byte)0xE0,
- (byte)0x31, (byte)0xE7, (byte)0x77, (byte)0xB8,
- (byte)0xD0, (byte)0x7E, (byte)0x0A, (byte)0x9B,
- (byte)0x94, (byte)0xD5, (byte)0x3D, (byte)0x33,
- (byte)0x62, (byte)0x32, (byte)0x51, (byte)0xCE,
- (byte)0x74, (byte)0x5C, (byte)0xA5, (byte)0x72,
- (byte)0xD9, (byte)0x36, (byte)0xF3, (byte)0x8A,
- (byte)0x3F, (byte)0x8B, (byte)0xC6, (byte)0xFE,
- (byte)0xEF, (byte)0x94, (byte)0x8B, (byte)0x50,
- (byte)0x41, (byte)0x9B, (byte)0x14, (byte)0xC8,
- (byte)0xE9, (byte)0x1F, (byte)0x24, (byte)0x1F,
- (byte)0x65, (byte)0x8E, (byte)0xD3, (byte)0x85,
- (byte)0xD0, (byte)0x68, (byte)0x6C, (byte)0xF1,
- (byte)0x79, (byte)0x45, (byte)0xD0, (byte)0x06,
- (byte)0xA4, (byte)0xB8, (byte)0xE0, (byte)0x64,
- (byte)0xF5, (byte)0x38, (byte)0x72, (byte)0x97,
- (byte)0x00, (byte)0x23, (byte)0x5F
+ (byte)0x30, (byte)0x82, (byte)0x01, (byte)0x3f,
+ (byte)0x02, (byte)0x01, (byte)0x00, (byte)0x30,
+ (byte)0x82, (byte)0x01, (byte)0x17, (byte)0x06,
+ (byte)0x09, (byte)0x2a, (byte)0x86, (byte)0x48,
+ (byte)0x86, (byte)0xf7, (byte)0x0d, (byte)0x01,
+ (byte)0x03, (byte)0x01, (byte)0x30, (byte)0x82,
+ (byte)0x01, (byte)0x08, (byte)0x02, (byte)0x82,
+ (byte)0x01, (byte)0x01, (byte)0x00, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xad,
+ (byte)0xf8, (byte)0x54, (byte)0x58, (byte)0xa2,
+ (byte)0xbb, (byte)0x4a, (byte)0x9a, (byte)0xaf,
+ (byte)0xdc, (byte)0x56, (byte)0x20, (byte)0x27,
+ (byte)0x3d, (byte)0x3c, (byte)0xf1, (byte)0xd8,
+ (byte)0xb9, (byte)0xc5, (byte)0x83, (byte)0xce,
+ (byte)0x2d, (byte)0x36, (byte)0x95, (byte)0xa9,
+ (byte)0xe1, (byte)0x36, (byte)0x41, (byte)0x14,
+ (byte)0x64, (byte)0x33, (byte)0xfb, (byte)0xcc,
+ (byte)0x93, (byte)0x9d, (byte)0xce, (byte)0x24,
+ (byte)0x9b, (byte)0x3e, (byte)0xf9, (byte)0x7d,
+ (byte)0x2f, (byte)0xe3, (byte)0x63, (byte)0x63,
+ (byte)0x0c, (byte)0x75, (byte)0xd8, (byte)0xf6,
+ (byte)0x81, (byte)0xb2, (byte)0x02, (byte)0xae,
+ (byte)0xc4, (byte)0x61, (byte)0x7a, (byte)0xd3,
+ (byte)0xdf, (byte)0x1e, (byte)0xd5, (byte)0xd5,
+ (byte)0xfd, (byte)0x65, (byte)0x61, (byte)0x24,
+ (byte)0x33, (byte)0xf5, (byte)0x1f, (byte)0x5f,
+ (byte)0x06, (byte)0x6e, (byte)0xd0, (byte)0x85,
+ (byte)0x63, (byte)0x65, (byte)0x55, (byte)0x3d,
+ (byte)0xed, (byte)0x1a, (byte)0xf3, (byte)0xb5,
+ (byte)0x57, (byte)0x13, (byte)0x5e, (byte)0x7f,
+ (byte)0x57, (byte)0xc9, (byte)0x35, (byte)0x98,
+ (byte)0x4f, (byte)0x0c, (byte)0x70, (byte)0xe0,
+ (byte)0xe6, (byte)0x8b, (byte)0x77, (byte)0xe2,
+ (byte)0xa6, (byte)0x89, (byte)0xda, (byte)0xf3,
+ (byte)0xef, (byte)0xe8, (byte)0x72, (byte)0x1d,
+ (byte)0xf1, (byte)0x58, (byte)0xa1, (byte)0x36,
+ (byte)0xad, (byte)0xe7, (byte)0x35, (byte)0x30,
+ (byte)0xac, (byte)0xca, (byte)0x4f, (byte)0x48,
+ (byte)0x3a, (byte)0x79, (byte)0x7a, (byte)0xbc,
+ (byte)0x0a, (byte)0xb1, (byte)0x82, (byte)0xb3,
+ (byte)0x24, (byte)0xfb, (byte)0x61, (byte)0xd1,
+ (byte)0x08, (byte)0xa9, (byte)0x4b, (byte)0xb2,
+ (byte)0xc8, (byte)0xe3, (byte)0xfb, (byte)0xb9,
+ (byte)0x6a, (byte)0xda, (byte)0xb7, (byte)0x60,
+ (byte)0xd7, (byte)0xf4, (byte)0x68, (byte)0x1d,
+ (byte)0x4f, (byte)0x42, (byte)0xa3, (byte)0xde,
+ (byte)0x39, (byte)0x4d, (byte)0xf4, (byte)0xae,
+ (byte)0x56, (byte)0xed, (byte)0xe7, (byte)0x63,
+ (byte)0x72, (byte)0xbb, (byte)0x19, (byte)0x0b,
+ (byte)0x07, (byte)0xa7, (byte)0xc8, (byte)0xee,
+ (byte)0x0a, (byte)0x6d, (byte)0x70, (byte)0x9e,
+ (byte)0x02, (byte)0xfc, (byte)0xe1, (byte)0xcd,
+ (byte)0xf7, (byte)0xe2, (byte)0xec, (byte)0xc0,
+ (byte)0x34, (byte)0x04, (byte)0xcd, (byte)0x28,
+ (byte)0x34, (byte)0x2f, (byte)0x61, (byte)0x91,
+ (byte)0x72, (byte)0xfe, (byte)0x9c, (byte)0xe9,
+ (byte)0x85, (byte)0x83, (byte)0xff, (byte)0x8e,
+ (byte)0x4f, (byte)0x12, (byte)0x32, (byte)0xee,
+ (byte)0xf2, (byte)0x81, (byte)0x83, (byte)0xc3,
+ (byte)0xfe, (byte)0x3b, (byte)0x1b, (byte)0x4c,
+ (byte)0x6f, (byte)0xad, (byte)0x73, (byte)0x3b,
+ (byte)0xb5, (byte)0xfc, (byte)0xbc, (byte)0x2e,
+ (byte)0xc2, (byte)0x20, (byte)0x05, (byte)0xc5,
+ (byte)0x8e, (byte)0xf1, (byte)0x83, (byte)0x7d,
+ (byte)0x16, (byte)0x83, (byte)0xb2, (byte)0xc6,
+ (byte)0xf3, (byte)0x4a, (byte)0x26, (byte)0xc1,
+ (byte)0xb2, (byte)0xef, (byte)0xfa, (byte)0x88,
+ (byte)0x6b, (byte)0x42, (byte)0x38, (byte)0x61,
+ (byte)0x28, (byte)0x5c, (byte)0x97, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0xff,
+ (byte)0xff, (byte)0xff, (byte)0xff, (byte)0x02,
+ (byte)0x01, (byte)0x02, (byte)0x04, (byte)0x1f,
+ (byte)0x02, (byte)0x1d, (byte)0x01, (byte)0x62,
+ (byte)0x8e, (byte)0xfc, (byte)0xf3, (byte)0x25,
+ (byte)0xf3, (byte)0x2a, (byte)0xf4, (byte)0x49,
+ (byte)0x20, (byte)0x83, (byte)0x61, (byte)0x7f,
+ (byte)0x97, (byte)0x8f, (byte)0x48, (byte)0xac,
+ (byte)0xf9, (byte)0xc3, (byte)0xad, (byte)0x3c,
+ (byte)0x56, (byte)0x95, (byte)0x1c, (byte)0x85,
+ (byte)0xd3, (byte)0x85, (byte)0xd6
};
}
diff --git a/test/jdk/com/sun/org/apache/xml/internal/security/SignatureKeyInfo.java b/test/jdk/com/sun/org/apache/xml/internal/security/SignatureKeyInfo.java
index d1de2030c24..793232654b6 100644
--- a/test/jdk/com/sun/org/apache/xml/internal/security/SignatureKeyInfo.java
+++ b/test/jdk/com/sun/org/apache/xml/internal/security/SignatureKeyInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024, 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
@@ -62,6 +62,7 @@
import java.io.File;
import java.math.BigInteger;
import java.security.*;
+import jdk.test.lib.security.SecurityUtils;
import static jdk.test.lib.Asserts.assertEquals;
@@ -160,7 +161,7 @@ private static void addKeyInfoData(KeyInfo keyInfo, String algorithm) throws Exc
private static KeyPair getKeyPair(String algorithm) throws NoSuchAlgorithmException {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance(algorithm);
- keyGen.initialize(2048);
+ keyGen.initialize(SecurityUtils.getTestKeySize(algorithm));
return keyGen.genKeyPair();
}
diff --git a/test/jdk/java/net/httpclient/ManyRequests2.java b/test/jdk/java/net/httpclient/ManyRequests2.java
index b0d17fe9bca..69ce475eca2 100644
--- a/test/jdk/java/net/httpclient/ManyRequests2.java
+++ b/test/jdk/java/net/httpclient/ManyRequests2.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2017, 2024, 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
@@ -33,16 +33,16 @@
* @compile ../../../com/sun/net/httpserver/EchoHandler.java
* @compile ../../../com/sun/net/httpserver/FileServerHandler.java
* @build ManyRequests ManyRequests2
- * @run main/othervm/timeout=40 -Dtest.XFixed=true
+ * @run main/othervm/timeout=400 -Dsun.net.httpserver.idleInterval=400 -Dtest.XFixed=true
* -Djdk.tracePinnedThreads=full
* -Djdk.httpclient.HttpClient.log=channel ManyRequests2
- * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.insertDelay=true
+ * @run main/othervm/timeout=400 -Dsun.net.httpserver.idleInterval=400 -Dtest.XFixed=true -Dtest.insertDelay=true
* -Djdk.tracePinnedThreads=full
* -Djdk.httpclient.HttpClient.log=channel ManyRequests2
- * @run main/othervm/timeout=40 -Dtest.XFixed=true -Dtest.chunkSize=64
+ * @run main/othervm/timeout=400 -Dsun.net.httpserver.idleInterval=400 -Dtest.XFixed=true -Dtest.chunkSize=64
* -Djdk.tracePinnedThreads=full
* -Djdk.httpclient.HttpClient.log=channel ManyRequests2
- * @run main/othervm/timeout=400 -Djdk.internal.httpclient.debug=true
+ * @run main/othervm/timeout=400 -Dsun.net.httpserver.idleInterval=400 -Djdk.internal.httpclient.debug=true
* -Djdk.tracePinnedThreads=full
* -Djdk.httpclient.HttpClient.log=channel
* -Dtest.XFixed=true -Dtest.insertDelay=true
diff --git a/test/jdk/java/security/KeyAgreement/KeySpecTest.java b/test/jdk/java/security/KeyAgreement/KeySpecTest.java
index 3554ba5073d..f5974738a12 100644
--- a/test/jdk/java/security/KeyAgreement/KeySpecTest.java
+++ b/test/jdk/java/security/KeyAgreement/KeySpecTest.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 8184359
+ * @library /test/lib
* @summary Standard tests on KeySpec, KeyFactory, KeyPairs and Keys.
* Arguments order
* @run main KeySpecTest DiffieHellman SunJCE DiffieHellman
@@ -55,6 +56,7 @@
import javax.crypto.KeyAgreement;
import javax.crypto.spec.DHPrivateKeySpec;
import javax.crypto.spec.DHPublicKeySpec;
+import jdk.test.lib.security.SecurityUtils;
public class KeySpecTest {
@@ -78,7 +80,7 @@ private static KeyPair genKeyPair(String provider, String kpgAlgo,
KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgo, provider);
switch (kpgInit) {
case "DiffieHellman":
- kpg.initialize(512);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgInit));
break;
case "EC":
kpg.initialize(256);
diff --git a/test/jdk/java/security/KeyAgreement/MultiThreadTest.java b/test/jdk/java/security/KeyAgreement/MultiThreadTest.java
index 0b01f4821ab..743e874a7de 100644
--- a/test/jdk/java/security/KeyAgreement/MultiThreadTest.java
+++ b/test/jdk/java/security/KeyAgreement/MultiThreadTest.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 8184359
+ * @library /test/lib
* @summary KeyPairGenerator Test with multiple threads.
* Arguments order
* @run main MultiThreadTest DiffieHellman SunJCE DiffieHellman
@@ -39,6 +40,7 @@
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import javax.crypto.KeyAgreement;
+import jdk.test.lib.security.SecurityUtils;
/**
* This test targets KeyPairGenerator API related issue in a multi threaded
@@ -68,7 +70,7 @@ private static KeyPairGenerator genKeyGenerator(String provider,
KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgo, provider);
switch (kpgInit) {
case "DiffieHellman":
- kpg.initialize(512);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgInit));
break;
case "EC":
kpg.initialize(256);
diff --git a/test/jdk/java/security/KeyAgreement/NegativeTest.java b/test/jdk/java/security/KeyAgreement/NegativeTest.java
index 2ec52b12a40..3ccb614ffc3 100644
--- a/test/jdk/java/security/KeyAgreement/NegativeTest.java
+++ b/test/jdk/java/security/KeyAgreement/NegativeTest.java
@@ -35,7 +35,7 @@
* Arguments order
*
* @library /test/lib
- * @run main NegativeTest DiffieHellman SunJCE DiffieHellman 1024
+ * @run main NegativeTest DiffieHellman SunJCE DiffieHellman 2048
* @run main NegativeTest ECDH SunEC EC 256
* @run main NegativeTest XDH SunEC XDH 255 X25519
* @run main NegativeTest XDH SunEC XDH 448 X448
@@ -59,6 +59,7 @@
import java.util.Arrays;
import java.util.HexFormat;
import javax.crypto.KeyAgreement;
+import jdk.test.lib.security.SecurityUtils;
public class NegativeTest {
@@ -93,7 +94,7 @@ private static KeyPair genKeyPair(String provider, String kpgAlgo,
Security.getProvider(provider));
switch (kpgInit) {
case "DiffieHellman":
- kpg.initialize(512);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgInit));
break;
case "EC":
kpg.initialize(256);
diff --git a/test/jdk/java/security/KeyFactory/Failover.java b/test/jdk/java/security/KeyFactory/Failover.java
index 6242758a9cf..7107ef1ad02 100644
--- a/test/jdk/java/security/KeyFactory/Failover.java
+++ b/test/jdk/java/security/KeyFactory/Failover.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2024, 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
@@ -24,7 +24,7 @@
/**
* @test
* @bug 4894125 7054918 8130181
- * @library ../testlibrary
+ * @library ../testlibrary /test/lib
* @summary test that failover for KeyFactory works
* @author Andreas Sterbenz
*/
@@ -34,6 +34,7 @@
import java.security.*;
import java.security.interfaces.*;
import java.security.spec.*;
+import jdk.test.lib.security.SecurityUtils;
public class Failover {
@@ -72,8 +73,9 @@ public static void main0(String[] args) throws Exception {
// somewhat more real tests using DSA
System.out.println("DSA tests...");
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
- kpg.initialize(512);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
kf = KeyFactory.getInstance("DSA");
diff --git a/test/jdk/java/security/KeyPairGenerator/GenerateKeypair.java b/test/jdk/java/security/KeyPairGenerator/GenerateKeypair.java
index 2c68e5954fa..b2c87b1c38a 100644
--- a/test/jdk/java/security/KeyPairGenerator/GenerateKeypair.java
+++ b/test/jdk/java/security/KeyPairGenerator/GenerateKeypair.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2024, 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
@@ -24,18 +24,21 @@
/*
* @test
* @bug 4221800
+ * @library /test/lib
* @summary Test restored generateKeyPair method
*/
import java.security.KeyPairGenerator;
import java.security.KeyPair;
+import jdk.test.lib.security.SecurityUtils;
public class GenerateKeypair {
public static void main(String[] args) throws Exception {
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
- kpg.initialize(512);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
// test generateKeyPair
KeyPair kpair = kpg.generateKeyPair();
diff --git a/test/jdk/java/security/KeyPairGenerator/GenerateRSAKeyPair.java b/test/jdk/java/security/KeyPairGenerator/GenerateRSAKeyPair.java
index c995bb17bed..1b9ace546dc 100644
--- a/test/jdk/java/security/KeyPairGenerator/GenerateRSAKeyPair.java
+++ b/test/jdk/java/security/KeyPairGenerator/GenerateRSAKeyPair.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 4297026
+ * @library /test/lib
* @summary Make sure that RSA Keypair generation using
* java.security.spec.RSAKeyGenParameterSpec passes
*/
@@ -31,14 +32,17 @@
import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.spec.RSAKeyGenParameterSpec;
+import jdk.test.lib.security.SecurityUtils;
public class GenerateRSAKeyPair {
public static void main(String[] args) throws Exception {
+ String kpgAlgorithm = "RSA";
RSAKeyGenParameterSpec rsaSpec =
- new RSAKeyGenParameterSpec (1024, RSAKeyGenParameterSpec.F4);
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA",
+ new RSAKeyGenParameterSpec (SecurityUtils.getTestKeySize(kpgAlgorithm),
+ RSAKeyGenParameterSpec.F4);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm,
System.getProperty("test.provider.name", "SunRsaSign"));
kpg.initialize(rsaSpec);
diff --git a/test/jdk/java/security/KeyRep/Serial.java b/test/jdk/java/security/KeyRep/Serial.java
index e61de5c2be6..88c91a091e7 100644
--- a/test/jdk/java/security/KeyRep/Serial.java
+++ b/test/jdk/java/security/KeyRep/Serial.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 4532506 4999599
+ * @library /test/lib
* @summary Serializing KeyPair on one VM (Sun),
* and Deserializing on another (IBM) fails
* @run main/othervm/java.security.policy=Serial.policy Serial
@@ -34,6 +35,8 @@
import java.security.*;
import javax.crypto.*;
import javax.crypto.spec.*;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
public class Serial {
@@ -45,8 +48,9 @@ public class Serial {
public static void main(String[] args) throws Exception {
// generate DSA key pair
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA", SUN);
- kpg.initialize(512);
+ String kpgAlgorithmDsa = "DSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithmDsa, SUN);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithmDsa));
KeyPair dsaKp = kpg.genKeyPair();
// serialize DSA key pair
@@ -67,8 +71,9 @@ public static void main(String[] args) throws Exception {
}
// generate RSA key pair
- kpg = KeyPairGenerator.getInstance("RSA", RSA);
- kpg.initialize(512);
+ String kpgAlgorithmRsa = "RSA";
+ kpg = KeyPairGenerator.getInstance(kpgAlgorithmRsa, RSA);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithmRsa));
KeyPair rsaKp = kpg.genKeyPair();
// serialize RSA key pair
@@ -89,8 +94,9 @@ public static void main(String[] args) throws Exception {
}
// generate DH key pair
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
kpg = KeyPairGenerator.getInstance("DiffieHellman", JCE);
- kpg.initialize(new DHParameterSpec(skip1024Modulus, skip1024Base));
+ kpg.initialize(new DHParameterSpec(dhGroup.getPrime(), dhGroup.getBase()));
KeyPair dhKp = kpg.genKeyPair();
// serialize DH key pair
@@ -197,47 +203,4 @@ private static void checkKey(String algorithm, int size) throws Exception {
throw new SecurityException(algorithm + " test failed");
}
}
-
- // The 1024 bit Diffie-Hellman modulus values used by SKIP
- private static final byte skip1024ModulusBytes[] = {
- (byte)0xF4, (byte)0x88, (byte)0xFD, (byte)0x58,
- (byte)0x4E, (byte)0x49, (byte)0xDB, (byte)0xCD,
- (byte)0x20, (byte)0xB4, (byte)0x9D, (byte)0xE4,
- (byte)0x91, (byte)0x07, (byte)0x36, (byte)0x6B,
- (byte)0x33, (byte)0x6C, (byte)0x38, (byte)0x0D,
- (byte)0x45, (byte)0x1D, (byte)0x0F, (byte)0x7C,
- (byte)0x88, (byte)0xB3, (byte)0x1C, (byte)0x7C,
- (byte)0x5B, (byte)0x2D, (byte)0x8E, (byte)0xF6,
- (byte)0xF3, (byte)0xC9, (byte)0x23, (byte)0xC0,
- (byte)0x43, (byte)0xF0, (byte)0xA5, (byte)0x5B,
- (byte)0x18, (byte)0x8D, (byte)0x8E, (byte)0xBB,
- (byte)0x55, (byte)0x8C, (byte)0xB8, (byte)0x5D,
- (byte)0x38, (byte)0xD3, (byte)0x34, (byte)0xFD,
- (byte)0x7C, (byte)0x17, (byte)0x57, (byte)0x43,
- (byte)0xA3, (byte)0x1D, (byte)0x18, (byte)0x6C,
- (byte)0xDE, (byte)0x33, (byte)0x21, (byte)0x2C,
- (byte)0xB5, (byte)0x2A, (byte)0xFF, (byte)0x3C,
- (byte)0xE1, (byte)0xB1, (byte)0x29, (byte)0x40,
- (byte)0x18, (byte)0x11, (byte)0x8D, (byte)0x7C,
- (byte)0x84, (byte)0xA7, (byte)0x0A, (byte)0x72,
- (byte)0xD6, (byte)0x86, (byte)0xC4, (byte)0x03,
- (byte)0x19, (byte)0xC8, (byte)0x07, (byte)0x29,
- (byte)0x7A, (byte)0xCA, (byte)0x95, (byte)0x0C,
- (byte)0xD9, (byte)0x96, (byte)0x9F, (byte)0xAB,
- (byte)0xD0, (byte)0x0A, (byte)0x50, (byte)0x9B,
- (byte)0x02, (byte)0x46, (byte)0xD3, (byte)0x08,
- (byte)0x3D, (byte)0x66, (byte)0xA4, (byte)0x5D,
- (byte)0x41, (byte)0x9F, (byte)0x9C, (byte)0x7C,
- (byte)0xBD, (byte)0x89, (byte)0x4B, (byte)0x22,
- (byte)0x19, (byte)0x26, (byte)0xBA, (byte)0xAB,
- (byte)0xA2, (byte)0x5E, (byte)0xC3, (byte)0x55,
- (byte)0xE9, (byte)0x2F, (byte)0x78, (byte)0xC7
- };
-
- // The SKIP 1024 bit modulus
- private static final BigInteger skip1024Modulus
- = new BigInteger(1, skip1024ModulusBytes);
-
- // The base used with the SKIP 1024 bit modulus
- private static final BigInteger skip1024Base = BigInteger.valueOf(2);
}
diff --git a/test/jdk/java/security/KeyStore/TestKeyStoreEntry.java b/test/jdk/java/security/KeyStore/TestKeyStoreEntry.java
index d0aa21f8144..fde58a1cf33 100644
--- a/test/jdk/java/security/KeyStore/TestKeyStoreEntry.java
+++ b/test/jdk/java/security/KeyStore/TestKeyStoreEntry.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2024, 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
@@ -47,7 +47,7 @@ public class TestKeyStoreEntry {
private static final char[] PASSWDF = new String("guardian Angel")
.toCharArray();
private static final String[] KS_ALGOS = {
- "DES", "DESede", "Blowfish"
+ "DES", "DESede", "Blowfish", "AES"
};
private static final int NUM_ALGOS = KS_ALGOS.length;
diff --git a/test/jdk/java/security/MessageDigest/ByteBuffers.java b/test/jdk/java/security/MessageDigest/ByteBuffers.java
index f21a51e1c10..fc25b596d86 100644
--- a/test/jdk/java/security/MessageDigest/ByteBuffers.java
+++ b/test/jdk/java/security/MessageDigest/ByteBuffers.java
@@ -27,6 +27,8 @@
* @summary Test the MessageDigest.update(ByteBuffer) method
* @author Andreas Sterbenz
* @key randomness
+ * @run main ByteBuffers MD5
+ * @run main ByteBuffers SHA-1
*/
import java.util.*;
@@ -43,7 +45,8 @@ public static void main(String[] args) throws Exception {
byte[] t = new byte[n];
random.nextBytes(t);
- MessageDigest md = MessageDigest.getInstance("MD5", p);
+ String digestAlgo = args[0];
+ MessageDigest md = MessageDigest.getInstance(digestAlgo, p);
byte[] d1 = md.digest(t);
// test 1: ByteBuffer with an accessible backing array
diff --git a/test/jdk/java/security/Provider/SupportsParameter.java b/test/jdk/java/security/Provider/SupportsParameter.java
index bc3cb031791..039fb3d0797 100644
--- a/test/jdk/java/security/Provider/SupportsParameter.java
+++ b/test/jdk/java/security/Provider/SupportsParameter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2024, 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
@@ -24,6 +24,7 @@
/**
* @test
* @bug 4911081 8130181
+ * @library /test/lib
* @summary verify that Provider.Service.supportsParameter() works
* @author Andreas Sterbenz
*/
@@ -33,12 +34,14 @@
import javax.crypto.*;
import javax.crypto.spec.SecretKeySpec;
+import jdk.test.lib.security.SecurityUtils;
public class SupportsParameter {
public static void main(String[] args) throws Exception {
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA");
- kpg.initialize(512);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
PublicKey dsaPublicKey = kp.getPublic();
PrivateKey dsaPrivateKey = kp.getPrivate();
diff --git a/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh b/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
index f1eda924120..e2e57392853 100644
--- a/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
+++ b/test/jdk/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2004, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2004, 2024, 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
@@ -91,7 +91,7 @@ ${COMPILEJAVA}${FILESEP}bin${FILESEP}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
${TESTSRC}${FILESEP}provider${FILESEP}HashProvider.java
# run the test
-${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
+${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-classpath "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" \
-Djava.awt.headless=true \
ClassLoaderDeadlock
diff --git a/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh b/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh
index 230a0fec7ca..7013c4cc33a 100644
--- a/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh
+++ b/test/jdk/java/security/Security/ClassLoaderDeadlock/Deadlock.sh
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2003, 2024, 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
@@ -62,5 +62,5 @@ esac
JAVA="${TESTJAVA}${FILESEP}bin${FILESEP}java"
-${JAVA} ${TESTVMOPTS} -cp "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" Deadlock
+${JAVA} ${TESTVMOPTS} ${TESTJAVAOPTS} -cp "${TESTCLASSES}${PATHSEP}${TESTSRC}${FILESEP}Deadlock.jar" Deadlock
diff --git a/test/jdk/java/security/Security/ConfigFileTest.java b/test/jdk/java/security/Security/ConfigFileTest.java
index fe022fc45ce..e4044943e82 100644
--- a/test/jdk/java/security/Security/ConfigFileTest.java
+++ b/test/jdk/java/security/Security/ConfigFileTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2022, 2024, 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
@@ -21,6 +21,7 @@
* questions.
*/
+import jdk.test.lib.Utils;
import jdk.test.lib.process.OutputAnalyzer;
import jdk.test.lib.process.ProcessTools;
@@ -30,7 +31,9 @@
import java.security.Provider;
import java.security.Security;
+import java.util.ArrayList;
import java.util.Arrays;
+import java.util.Collections;
import java.util.Optional;
/*
@@ -50,6 +53,9 @@ public class ConfigFileTest {
private static boolean overrideDetected = false;
+ private static Path COPY_JDK_DIR = Path.of("./jdk-8155246-tmpdir");
+ private static Path COPIED_JAVA = COPY_JDK_DIR.resolve("bin").resolve("java");
+
public static void main(String[] args) throws Exception {
Path copyJdkDir = Path.of("./jdk-8155246-tmpdir");
Path copiedJava = Optional.of(
@@ -72,29 +78,29 @@ public static void main(String[] args) throws Exception {
String extraPropsFile = Path.of(System.getProperty("test.src"), "override.props").toString();
// sanity test -XshowSettings:security option
- exerciseShowSettingsSecurity(copiedJava.toString(), "-cp", System.getProperty("test.classes"),
- "-Djava.security.debug=all", "-XshowSettings:security", "ConfigFileTest", "runner");
+ exerciseShowSettingsSecurity(buildCommand("-cp", System.getProperty("test.classes"),
+ "-Djava.security.debug=all", "-XshowSettings:security", "ConfigFileTest", "runner"));
// exercise some debug flags while we're here
// regular JDK install - should expect success
exerciseSecurity(0, "java",
- copiedJava.toString(), "-cp", System.getProperty("test.classes"),
- "-Djava.security.debug=all", "-Djavax.net.debug=all", "ConfigFileTest", "runner");
+ buildCommand("-cp", System.getProperty("test.classes"),
+ "-Djava.security.debug=all", "-Djavax.net.debug=all", "ConfigFileTest", "runner"));
// given an overriding security conf file that doesn't exist, we shouldn't
// overwrite the properties from original/master security conf file
exerciseSecurity(0, "SUN version",
- copiedJava.toString(), "-cp", System.getProperty("test.classes"),
+ buildCommand("-cp", System.getProperty("test.classes"),
"-Djava.security.debug=all", "-Djavax.net.debug=all",
"-Djava.security.properties==file:///" + extraPropsFile + "badFileName",
- "ConfigFileTest", "runner");
+ "ConfigFileTest", "runner"));
// test JDK launch with customized properties file
exerciseSecurity(0, "NumProviders: 6",
- copiedJava.toString(), "-cp", System.getProperty("test.classes"),
+ buildCommand("-cp", System.getProperty("test.classes"),
"-Djava.security.debug=all", "-Djavax.net.debug=all",
"-Djava.security.properties==file:///" + extraPropsFile,
- "ConfigFileTest", "runner");
+ "ConfigFileTest", "runner"));
// delete the master conf file
Files.delete(Path.of(copyJdkDir.toString(), "conf",
@@ -102,16 +108,16 @@ public static void main(String[] args) throws Exception {
// launch JDK without java.security file being present or specified
exerciseSecurity(1, "Error loading java.security file",
- copiedJava.toString(), "-cp", System.getProperty("test.classes"),
+ buildCommand("-cp", System.getProperty("test.classes"),
"-Djava.security.debug=all", "-Djavax.net.debug=all",
- "ConfigFileTest", "runner");
+ "ConfigFileTest", "runner"));
// test the override functionality also. Should not be allowed since
// "security.overridePropertiesFile=true" Security property is missing.
exerciseSecurity(1, "Error loading java.security file",
- copiedJava.toString(), "-cp", System.getProperty("test.classes"),
+ buildCommand("-cp", System.getProperty("test.classes"),
"-Djava.security.debug=all", "-Djavax.net.debug=all",
- "-Djava.security.properties==file:///" + extraPropsFile, "ConfigFileTest", "runner");
+ "-Djava.security.properties==file:///" + extraPropsFile, "ConfigFileTest", "runner"));
if (!overrideDetected) {
throw new RuntimeException("Override scenario not seen");
@@ -119,8 +125,14 @@ public static void main(String[] args) throws Exception {
}
}
- private static void exerciseSecurity(int exitCode, String output, String... args) throws Exception {
- ProcessBuilder process = new ProcessBuilder(args);
+ private static ProcessBuilder buildCommand(String... command) {
+ ArrayList args = new ArrayList<>();
+ args.add(COPIED_JAVA.toString());
+ Collections.addAll(args, Utils.prependTestJavaOpts(command));
+ return new ProcessBuilder(args);
+ }
+
+ private static void exerciseSecurity(int exitCode, String output, ProcessBuilder process) throws Exception {
OutputAnalyzer oa = ProcessTools.executeProcess(process);
oa.shouldHaveExitValue(exitCode)
.shouldContain(output);
@@ -141,8 +153,7 @@ private static void exerciseSecurity(int exitCode, String output, String... args
}
// exercise the -XshowSettings:security launcher
- private static void exerciseShowSettingsSecurity(String... args) throws Exception {
- ProcessBuilder process = new ProcessBuilder(args);
+ private static void exerciseShowSettingsSecurity(ProcessBuilder process) throws Exception {
OutputAnalyzer oa = ProcessTools.executeProcess(process);
oa.shouldHaveExitValue(0)
.shouldContain("Security properties:")
diff --git a/test/jdk/java/security/Signature/ByteBuffers.java b/test/jdk/java/security/Signature/ByteBuffers.java
index d9866204244..9f03a9923ec 100644
--- a/test/jdk/java/security/Signature/ByteBuffers.java
+++ b/test/jdk/java/security/Signature/ByteBuffers.java
@@ -27,6 +27,8 @@
* @summary Test the Signature.update(ByteBuffer) method
* @author Andreas Sterbenz
* @key randomness
+ * @run main ByteBuffers DSA 512
+ * @run main ByteBuffers SHA256withDSA 2048
*/
import java.util.*;
@@ -44,11 +46,14 @@ public static void main(String[] args) throws Exception {
byte[] t = new byte[n];
random.nextBytes(t);
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA", p);
- kpg.initialize(512);
+ String kpgAlgorithm = "DSA";
+ int keySize = Integer.parseInt(args[1]);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p);
+ kpg.initialize(keySize);
KeyPair kp = kpg.generateKeyPair();
- Signature sig = Signature.getInstance("DSA", p);
+ String signAlgo = args[0];
+ Signature sig = Signature.getInstance(signAlgo, p);
sig.initSign(kp.getPrivate());
sig.update(t);
byte[] signature = sig.sign();
diff --git a/test/jdk/java/security/Signature/NONEwithRSA.java b/test/jdk/java/security/Signature/NONEwithRSA.java
index ff3645058d6..c7b08528e7e 100644
--- a/test/jdk/java/security/Signature/NONEwithRSA.java
+++ b/test/jdk/java/security/Signature/NONEwithRSA.java
@@ -24,6 +24,7 @@
/**
* @test
* @bug 4955844
+ * @library /test/lib
* @summary ensure that the NONEwithRSA adapter works correctly
* @author Andreas Sterbenz
* @key randomness
@@ -34,6 +35,7 @@
import java.security.*;
import javax.crypto.*;
+import jdk.test.lib.security.SecurityUtils;
public class NONEwithRSA {
@@ -43,8 +45,9 @@ public static void main(String[] args) throws Exception {
byte[] b = new byte[16];
random.nextBytes(b);
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
- kpg.initialize(512);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
Signature sig = Signature.getInstance("NONEwithRSA");
diff --git a/test/jdk/java/security/Signature/ResetAfterException.java b/test/jdk/java/security/Signature/ResetAfterException.java
index 62d5c190bec..39c766ac63d 100644
--- a/test/jdk/java/security/Signature/ResetAfterException.java
+++ b/test/jdk/java/security/Signature/ResetAfterException.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2024, 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
@@ -24,10 +24,12 @@
/**
* @test
* @bug 8149802
+ * @library /test/lib
* @summary Ensure that Signature objects are reset after verification errored out.
*/
import java.util.Arrays;
import java.security.*;
+import jdk.test.lib.security.SecurityUtils;
public class ResetAfterException {
@@ -51,18 +53,19 @@ public static void main(String[] args) throws Exception {
boolean res = true;
System.out.println("Testing Provider: " + p.getName());
KeyPairGenerator keyGen = null;
+ String kpgAlgorithm = "RSA";
try {
// It's possible that some provider, e.g. SunMSCAPI,
// doesn't work well with keys from other providers
// so we use the same provider to generate key first
- keyGen = KeyPairGenerator.getInstance("RSA", p);
+ keyGen = KeyPairGenerator.getInstance(kpgAlgorithm, p);
} catch (NoSuchAlgorithmException nsae) {
- keyGen = KeyPairGenerator.getInstance("RSA");
+ keyGen = KeyPairGenerator.getInstance(kpgAlgorithm);
}
if (keyGen == null) {
throw new RuntimeException("Error: No support for RSA KeyPairGenerator");
}
- keyGen.initialize(1024);
+ keyGen.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair keyPair = keyGen.generateKeyPair();
sig.initSign(keyPair.getPrivate());
diff --git a/test/jdk/java/security/Signature/SignWithOutputBuffer.java b/test/jdk/java/security/Signature/SignWithOutputBuffer.java
index 5f4716391a7..0fcc0405f7c 100644
--- a/test/jdk/java/security/Signature/SignWithOutputBuffer.java
+++ b/test/jdk/java/security/Signature/SignWithOutputBuffer.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2024, 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
@@ -26,6 +26,8 @@
* @bug 4114896
* @summary Signature should support a sign() method that places the signature
* in an already existing array.
+ * @run main SignWithOutputBuffer DSS 512
+ * @run main SignWithOutputBuffer SHA256withDSA 2048
*/
import java.security.*;
@@ -36,11 +38,14 @@ public static void main(String[] args) throws Exception {
int numBytes;
- KeyPairGenerator kpGen = KeyPairGenerator.getInstance("DSA");
- kpGen.initialize(512);
+ String kpgAlgorithm = "DSA";
+ int keySize = Integer.parseInt(args[1]);
+ KeyPairGenerator kpGen = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpGen.initialize(keySize);
KeyPair kp = kpGen.genKeyPair();
- Signature sig = Signature.getInstance("DSS");
+ String signAlgo = args[0];
+ Signature sig = Signature.getInstance(signAlgo);
sig.initSign(kp.getPrivate());
sig.update((byte)0xff);
@@ -55,10 +60,10 @@ public static void main(String[] args) throws Exception {
}
// Now repeat the same with a buffer that's big enough
- sig = Signature.getInstance("DSS");
+ sig = Signature.getInstance(signAlgo);
sig.initSign(kp.getPrivate());
sig.update((byte)0xff);
- out = new byte[48];
+ out = new byte[64];
numBytes = sig.sign(out, 0, out.length);
System.out.println("Signature len="+numBytes);
diff --git a/test/jdk/java/security/Signature/SignatureGetInstance.java b/test/jdk/java/security/Signature/SignatureGetInstance.java
index e36d253dbc8..821c20602a7 100644
--- a/test/jdk/java/security/Signature/SignatureGetInstance.java
+++ b/test/jdk/java/security/Signature/SignatureGetInstance.java
@@ -27,7 +27,8 @@
* @summary Ensure the BC provider-reselection workaround in Signature class
* functions correctly
* @modules java.base/sun.security.util
- * @run main/othervm SignatureGetInstance
+ * @run main/othervm SignatureGetInstance default
+ * @run main/othervm SignatureGetInstance SHA-256
*/
import java.security.*;
import java.security.interfaces.*;
@@ -37,8 +38,12 @@
public class SignatureGetInstance {
private static final String SIGALG = "RSASSA-PSS";
+ private static PSSParameterSpec pssParamSpec;
public static void main(String[] args) throws Exception {
+ String mdName = args[0];
+ pssParamSpec = "default".equals(mdName) ? PSSParameterSpec.DEFAULT :
+ new PSSParameterSpec(mdName, "MGF1", new MGF1ParameterSpec(mdName), 20, 1);
Provider testProvider = new TestProvider();
// put test provider before SunRsaSign provider
Security.insertProviderAt(testProvider, 1);
@@ -85,7 +90,7 @@ private static void checkName(Signature s, String name) {
private static void testDblInit(PrivateKey key1, PublicKey key2,
boolean shouldPass, String expectedProvName) throws Exception {
Signature sig = Signature.getInstance(SIGALG);
- SignatureUtil.initSignWithParam(sig, key1, PSSParameterSpec.DEFAULT, null);
+ SignatureUtil.initSignWithParam(sig, key1, pssParamSpec, null);
try {
sig.initVerify(key2);
if (!shouldPass) {
@@ -108,7 +113,7 @@ private static void testSetAndInit(String provName, Key key,
} else {
sig = Signature.getInstance(SIGALG, provName);
}
- AlgorithmParameterSpec params = PSSParameterSpec.DEFAULT;
+ AlgorithmParameterSpec params = pssParamSpec;
boolean doSign = (key instanceof PrivateKey);
try {
if (doSign) {
diff --git a/test/jdk/java/security/Signature/TestInitSignWithMyOwnRandom.java b/test/jdk/java/security/Signature/TestInitSignWithMyOwnRandom.java
index a59ea9a9355..ac4199ec771 100644
--- a/test/jdk/java/security/Signature/TestInitSignWithMyOwnRandom.java
+++ b/test/jdk/java/security/Signature/TestInitSignWithMyOwnRandom.java
@@ -24,23 +24,30 @@
/**
* @test
* @bug 4716321
+ * @library /test/lib
* @summary Ensure the random source supplied in
* Signature.initSign(PrivateKey, SecureRandom) is used.
+ * @run main TestInitSignWithMyOwnRandom DSA 512
+ * @run main TestInitSignWithMyOwnRandom SHA256withDSA 2048
*/
import java.security.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestInitSignWithMyOwnRandom {
- public static void main(String[] argv) throws Exception {
+ public static void main(String[] args) throws Exception {
// any signature implementation will do as long as
// it needs a random source
Provider p = Security.getProvider(
- System.getProperty("test.provider.name", "SUN"));
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DSA", p);
- kpg.initialize(512);
+ System.getProperty("test.provider.name", "SUN"));
+ String kpgAlgorithm = "DSA";
+ int keySize = Integer.parseInt(args[1]);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p);
+ kpg.initialize(keySize);
KeyPair kp = kpg.generateKeyPair();
TestRandomSource rand = new TestRandomSource();
- Signature sig = Signature.getInstance("DSA", p);
+ String signAlgo = args[0];
+ Signature sig = Signature.getInstance(signAlgo, p);
sig.initSign(kp.getPrivate(), rand);
sig.update(new byte[20]);
sig.sign();
diff --git a/test/jdk/java/security/Signature/VerifyRangeCheckOverflow.java b/test/jdk/java/security/Signature/VerifyRangeCheckOverflow.java
index b68d8ca9be7..397d7933274 100644
--- a/test/jdk/java/security/Signature/VerifyRangeCheckOverflow.java
+++ b/test/jdk/java/security/Signature/VerifyRangeCheckOverflow.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024, 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
@@ -27,6 +27,7 @@
/* @test
* @bug 7172149
+ * @library /test/lib
* @summary AIOOBE from Signature.verify after integer overflow
* @author Jonathan Lu
*/
@@ -35,17 +36,19 @@
import java.security.KeyPairGenerator;
import java.security.PublicKey;
import java.security.Signature;
+import jdk.test.lib.security.SecurityUtils;
public class VerifyRangeCheckOverflow {
public static void main(String[] args) throws Exception {
- KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("DSA");
- keyPairGenerator.initialize(1024);
+ String kpgAlgorithm = "DSA";
+ KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(kpgAlgorithm);
+ keyPairGenerator.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair keys = keyPairGenerator.generateKeyPair();
PublicKey publicKey = keys.getPublic();
byte[] sigBytes = new byte[100];
- Signature signature = Signature.getInstance("SHA1withDSA");
+ Signature signature = Signature.getInstance("SHA256withDSA");
signature.initVerify(publicKey);
try {
signature.verify(sigBytes, Integer.MAX_VALUE, 1);
diff --git a/test/jdk/java/security/SignedObject/Chain.java b/test/jdk/java/security/SignedObject/Chain.java
index 0fb5cf3c53f..883ac13890d 100644
--- a/test/jdk/java/security/SignedObject/Chain.java
+++ b/test/jdk/java/security/SignedObject/Chain.java
@@ -165,6 +165,8 @@ public String toString() {
new Test(SigAlg.SHA1withDSA, KeyAlg.DSA, Provider.Default, 1024),
new Test(SigAlg.MD2withRSA, KeyAlg.RSA, Provider.Default),
new Test(SigAlg.MD5withRSA, KeyAlg.RSA, Provider.Default),
+ new Test(SigAlg.SHA224withRSA, KeyAlg.RSA, Provider.Default),
+ new Test(SigAlg.SHA256withRSA, KeyAlg.RSA, Provider.Default),
new Test(SigAlg.SHA3_224withRSA, KeyAlg.RSA, Provider.Default),
new Test(SigAlg.SHA3_256withRSA, KeyAlg.RSA, Provider.Default),
new Test(SigAlg.SHA3_384withRSA, KeyAlg.RSA, Provider.Default),
diff --git a/test/jdk/java/security/SignedObject/Copy.java b/test/jdk/java/security/SignedObject/Copy.java
index 16267ee534d..3e36891173a 100644
--- a/test/jdk/java/security/SignedObject/Copy.java
+++ b/test/jdk/java/security/SignedObject/Copy.java
@@ -31,31 +31,35 @@
* @test
* @bug 8050374
* @summary Checks if a signed object is a copy of an original object
+ * @run main Copy DSA 512
+ * @run main Copy SHA256withDSA 2048
*/
public class Copy {
private static final String DSA = "DSA";
- private static final int KEY_SIZE = 512;
private static final int MAGIC = 123;
public static void main(String args[]) throws Exception {
+ int keySize = Integer.parseInt(args[1]);
KeyPairGenerator kg = KeyPairGenerator.getInstance(DSA);
- kg.initialize(KEY_SIZE);
+ kg.initialize(keySize);
KeyPair kp = kg.genKeyPair();
- Signature signature = Signature.getInstance(DSA);
+ String signAlgo = args[0];
+ Signature signature = Signature.getInstance(signAlgo);
Test original = new Test();
SignedObject so = new SignedObject(original, kp.getPrivate(),
signature);
System.out.println("Signature algorithm: " + so.getAlgorithm());
- signature = Signature.getInstance(DSA, System.getProperty("test.provider.name", "SUN"));
+ signature = Signature.getInstance(signAlgo,
+ System.getProperty("test.provider.name", "SUN"));
if (!so.verify(kp.getPublic(), signature)) {
throw new RuntimeException("Verification failed");
}
kg = KeyPairGenerator.getInstance(DSA);
- kg.initialize(KEY_SIZE);
+ kg.initialize(keySize);
kp = kg.genKeyPair();
if (so.verify(kp.getPublic(), signature)) {
diff --git a/test/jdk/java/security/cert/CertificateFactory/slowstream.sh b/test/jdk/java/security/cert/CertificateFactory/slowstream.sh
index 7f26b1b4e30..8c1cbfed125 100644
--- a/test/jdk/java/security/cert/CertificateFactory/slowstream.sh
+++ b/test/jdk/java/security/cert/CertificateFactory/slowstream.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2024, 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
@@ -50,5 +50,5 @@ esac
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . \
${TESTSRC}${FS}SlowStream.java
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} -Dtest.src=${TESTSRC} SlowStreamWriter | \
- ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} SlowStreamReader
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} -Dtest.src=${TESTSRC} SlowStreamWriter | \
+ ${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} SlowStreamReader
diff --git a/test/jdk/java/security/cert/X509Certificate/GetSigAlgParams.java b/test/jdk/java/security/cert/X509Certificate/GetSigAlgParams.java
index 6d7a8345617..4867058c4c2 100644
--- a/test/jdk/java/security/cert/X509Certificate/GetSigAlgParams.java
+++ b/test/jdk/java/security/cert/X509Certificate/GetSigAlgParams.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2021, 2024, 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
@@ -24,12 +24,14 @@
/*
* @test
* @bug 8259428
+ * @library /test/lib
* @summary Verify X509Certificate.getSigAlgParams() returns new array each
* time it is called
* @modules java.base/sun.security.tools.keytool java.base/sun.security.x509
*/
import java.security.cert.X509Certificate;
+import jdk.test.lib.security.SecurityUtils;
import sun.security.tools.keytool.CertAndKeyGen;
import sun.security.x509.X500Name;
@@ -38,7 +40,7 @@ public class GetSigAlgParams {
public static void main(String[] args) throws Exception {
CertAndKeyGen cakg = new CertAndKeyGen("RSASSA-PSS", "RSASSA-PSS");
- cakg.generate(1024);
+ cakg.generate(SecurityUtils.getTestKeySize("RSA"));
X509Certificate c = cakg.getSelfCertificate(new X500Name("CN=Me"), 100);
if (c.getSigAlgParams() == c.getSigAlgParams()) {
throw new Exception("Encoded params are the same byte array");
diff --git a/test/jdk/javax/crypto/Cipher/ByteBuffers.java b/test/jdk/javax/crypto/Cipher/ByteBuffers.java
index 141f1c10781..4dd6d86b476 100644
--- a/test/jdk/javax/crypto/Cipher/ByteBuffers.java
+++ b/test/jdk/javax/crypto/Cipher/ByteBuffers.java
@@ -27,6 +27,8 @@
* @summary Test the Cipher.update/doFinal(ByteBuffer, ByteBuffer) methods
* @author Andreas Sterbenz
* @key randomness
+ * @run main ByteBuffers DES 8
+ * @run main ByteBuffers AES 16
*/
import java.util.*;
@@ -47,11 +49,13 @@ public static void main(String[] args) throws Exception {
byte[] t = new byte[n];
random.nextBytes(t);
- byte[] keyBytes = new byte[8];
+ int keyInt = Integer.parseInt(args[1]);
+ byte[] keyBytes = new byte[keyInt];
random.nextBytes(keyBytes);
- SecretKey key = new SecretKeySpec(keyBytes, "DES");
+ String algo = args[0];
+ SecretKey key = new SecretKeySpec(keyBytes, algo);
- Cipher cipher = Cipher.getInstance("DES/ECB/NoPadding");
+ Cipher cipher = Cipher.getInstance(algo + "/ECB/NoPadding");
cipher.init(Cipher.ENCRYPT_MODE, key);
byte[] outBytes = cipher.doFinal(t);
diff --git a/test/jdk/javax/crypto/Cipher/TestGetInstance.java b/test/jdk/javax/crypto/Cipher/TestGetInstance.java
index 07ad131c736..8d261657498 100644
--- a/test/jdk/javax/crypto/Cipher/TestGetInstance.java
+++ b/test/jdk/javax/crypto/Cipher/TestGetInstance.java
@@ -26,10 +26,13 @@
* @bug 4898428
* @summary test that the new getInstance() implementation works correctly
* @author Andreas Sterbenz
+ * @run main TestGetInstance DES PBEWithMD5AndTripleDES
+ * @run main TestGetInstance AES PBEWithHmacSHA1AndAES_128
*/
import java.security.*;
import java.security.spec.*;
+import java.util.Locale;
import javax.crypto.*;
@@ -42,61 +45,64 @@ private static void same(Provider p1, Provider p2) throws Exception {
}
public static void main(String[] args) throws Exception {
+ String algo = args[0];
+ String algoLC = algo.toLowerCase(Locale.ROOT);
+ String pbeAlgo = args[1];
Provider p = Security.getProvider(
System.getProperty("test.provider.name", "SunJCE"));
Cipher c;
- c = Cipher.getInstance("PBEWithMD5AndTripleDES");
+ c = Cipher.getInstance(pbeAlgo);
same(p, c.getProvider());
- c = Cipher.getInstance("des",
+ c = Cipher.getInstance(algoLC,
System.getProperty("test.provider.name", "SunJCE"));
same(p, c.getProvider());
- c = Cipher.getInstance("des/cbc/pkcs5padding",
+ c = Cipher.getInstance(algoLC + "/cbc/pkcs5padding",
System.getProperty("test.provider.name", "SunJCE"));
same(p, c.getProvider());
- c = Cipher.getInstance("des", p);
+ c = Cipher.getInstance(algoLC, p);
same(p, c.getProvider());
- c = Cipher.getInstance("des/cbc/pkcs5padding", p);
+ c = Cipher.getInstance(algoLC + "/cbc/pkcs5padding", p);
same(p, c.getProvider());
try {
- c = Cipher.getInstance("DES/XYZ/PKCS5Padding");
+ c = Cipher.getInstance(algo + "/XYZ/PKCS5Padding");
throw new AssertionError();
} catch (NoSuchAlgorithmException e) {
System.out.println(e);
}
try {
- c = Cipher.getInstance("DES/XYZ/PKCS5Padding",
+ c = Cipher.getInstance(algo + "/XYZ/PKCS5Padding",
System.getProperty("test.provider.name", "SunJCE"));
throw new AssertionError();
} catch (NoSuchAlgorithmException e) {
System.out.println(e);
}
try {
- c = Cipher.getInstance("DES/XYZ/PKCS5Padding", p);
+ c = Cipher.getInstance(algo + "/XYZ/PKCS5Padding", p);
throw new AssertionError();
} catch (NoSuchAlgorithmException e) {
System.out.println(e);
}
try {
- c = Cipher.getInstance("DES/CBC/XYZPadding");
+ c = Cipher.getInstance(algo + "/CBC/XYZPadding");
throw new AssertionError();
} catch (NoSuchAlgorithmException e) {
System.out.println(e);
}
try {
- c = Cipher.getInstance("DES/CBC/XYZPadding",
+ c = Cipher.getInstance(algo + "/CBC/XYZPadding",
System.getProperty("test.provider.name", "SunJCE"));
throw new AssertionError();
} catch (NoSuchPaddingException e) {
System.out.println(e);
}
try {
- c = Cipher.getInstance("DES/CBC/XYZPadding", p);
+ c = Cipher.getInstance(algo + "/CBC/XYZPadding", p);
throw new AssertionError();
} catch (NoSuchPaddingException e) {
System.out.println(e);
diff --git a/test/jdk/javax/crypto/CipherSpi/DirectBBRemaining.java b/test/jdk/javax/crypto/CipherSpi/DirectBBRemaining.java
index 5a383ded6dc..9487792df08 100644
--- a/test/jdk/javax/crypto/CipherSpi/DirectBBRemaining.java
+++ b/test/jdk/javax/crypto/CipherSpi/DirectBBRemaining.java
@@ -27,6 +27,8 @@
* @summary Cipher.doFinal(ByteBuffer,ByteBuffer) fails to
* process when in.remaining() == 0
* @key randomness
+ * @run main DirectBBRemaining DES 8
+ * @run main DirectBBRemaining AES 16
*/
import java.nio.ByteBuffer;
@@ -53,11 +55,13 @@ public static void main(String args[]) throws Exception {
boolean failedOnce = false;
Exception failedReason = null;
- byte[] keyBytes = new byte[8];
+ int keyInt = Integer.parseInt(args[1]);
+ byte[] keyBytes = new byte[keyInt];
random.nextBytes(keyBytes);
- SecretKey key = new SecretKeySpec(keyBytes, "DES");
+ String algo = args[0];
+ SecretKey key = new SecretKeySpec(keyBytes, algo);
- Cipher cipher = Cipher.getInstance("DES/CBC/PKCS5Padding",
+ Cipher cipher = Cipher.getInstance(algo + "/CBC/PKCS5Padding",
System.getProperty("test.provider.name", "SunJCE"));
cipher.init(Cipher.ENCRYPT_MODE, key);
diff --git a/test/jdk/javax/crypto/CryptoPermission/AllPermCheck.java b/test/jdk/javax/crypto/CryptoPermission/AllPermCheck.java
index ea0ae4ab925..c2fef8785e1 100644
--- a/test/jdk/javax/crypto/CryptoPermission/AllPermCheck.java
+++ b/test/jdk/javax/crypto/CryptoPermission/AllPermCheck.java
@@ -29,6 +29,8 @@
* crypto permssion checks failed.
* @author Valerie Peng
* @key randomness
+ * @run main AllPermCheck DES
+ * @run main AllPermCheck AES
*/
import java.io.*;
@@ -86,7 +88,8 @@ public static void runTest(Cipher c, Key key) throws Exception {
public static void main(String[] args) throws Exception {
Provider p = Security.getProvider(System.getProperty("test.provider.name", "SunJCE"));
System.out.println("Testing provider " + p.getName() + "...");
- if (Cipher.getMaxAllowedKeyLength("DES") == Integer.MAX_VALUE) {
+ String transformation = args[0];
+ if (Cipher.getMaxAllowedKeyLength(transformation) == Integer.MAX_VALUE) {
// skip this test for unlimited jurisdiction policy files
System.out.println("Skip this test due to unlimited version");
return;
diff --git a/test/jdk/javax/crypto/CryptoPermission/LowercasePermCheck.java b/test/jdk/javax/crypto/CryptoPermission/LowercasePermCheck.java
index a8eca5f6830..97f6f4fd103 100644
--- a/test/jdk/javax/crypto/CryptoPermission/LowercasePermCheck.java
+++ b/test/jdk/javax/crypto/CryptoPermission/LowercasePermCheck.java
@@ -48,7 +48,7 @@ public class LowercasePermCheck {
public static void main(String[] args) throws Exception {
Provider p = Security.getProvider(System.getProperty("test.provider.name", "SunJCE"));
System.out.println("Testing provider " + p.getName() + "...");
- if (Cipher.getMaxAllowedKeyLength("DES") == Integer.MAX_VALUE) {
+ if (Cipher.getMaxAllowedKeyLength("AES") == Integer.MAX_VALUE) {
// skip this test for unlimited jurisdiction policy files
System.out.println("Skip this test due to unlimited version");
return;
diff --git a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpec.java b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpec.java
index 6be4ef9bbdf..cc0adc18e56 100644
--- a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpec.java
+++ b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpec.java
@@ -26,6 +26,8 @@
* @bug 4508341
* @summary Test the EncryptedPrivateKeyInfo.getKeySpec(...) methods.
* @author Valerie Peng
+ * @run main/othervm -DcipherAlg=PBEWithMD5AndDES GetKeySpec
+ * @run main/othervm -DcipherAlg=PBEWithSHA1AndDESede GetKeySpec
*/
import java.util.*;
import java.nio.*;
@@ -37,12 +39,13 @@
import javax.crypto.spec.*;
public class GetKeySpec {
- private static final String cipherAlg = "PBEWithMD5AndDES";
+ private static String cipherAlg;
private static final char[] passwd = { 'p','a','s','s','w','d' };
private static AlgorithmParameters GOOD_PARAMS;
static {
try {
+ cipherAlg = System.getProperty("cipherAlg");
PBEParameterSpec goodParamSpec =
new PBEParameterSpec(new byte[8], 1024);
GOOD_PARAMS = AlgorithmParameters.getInstance
@@ -55,7 +58,8 @@ public class GetKeySpec {
}
private static String pkcs8Encoded = "30:82:01:53:02:01:00:30:0D:06:09:2A:86:48:86:F7:0D:01:01:01:05:00:04:82:01:3D:30:82:01:39:02:01:00:02:40:6E:A4:13:65:97:A2:C2:47:5E:F2:23:6B:94:D8:D7:25:13:BB:A4:AE:8A:AA:A7:27:A4:9A:04:DC:15:F7:9B:E4:39:18:99:9E:27:EA:92:BB:D0:0E:F3:26:F4:95:89:33:02:65:6D:84:69:2C:CE:B7:FA:68:8E:FE:8D:63:44:6B:02:03:01:00:01:02:40:59:6E:1C:13:98:FE:C1:04:89:75:35:36:27:29:22:B5:E0:7E:62:BD:86:6E:2C:10:7A:16:D8:68:C1:04:D4:A7:10:41:F7:B9:B4:84:05:03:A5:C0:28:73:24:A7:24:F1:1B:C3:4F:BF:05:20:D0:D9:00:08:7F:C3:29:64:1B:29:02:21:00:C4:63:4D:0C:32:51:44:AE:DD:90:A9:B7:B6:C2:6B:11:BE:D2:07:E7:B5:C2:4A:9F:4D:0F:2F:30:5F:E6:1C:6D:02:21:00:90:39:A4:2D:93:0B:08:AF:2F:6F:18:CC:1A:EF:B6:E6:01:E7:21:3A:7F:45:C7:3F:39:12:B8:CC:DF:44:2D:37:02:21:00:B3:9B:61:9E:B2:F2:12:4F:9E:C1:2C:06:A1:B5:A3:38:62:7D:31:CF:9F:32:67:0E:D3:E9:FC:2D:50:B7:61:ED:02:20:5B:FD:77:FB:5D:A3:97:09:6E:1E:D5:59:32:01:1D:CE:7C:FE:38:12:80:A5:38:1D:DA:40:57:C0:CC:D3:46:67:02:20:52:EC:61:05:0D:EC:8A:ED:F7:1E:95:67:D0:7C:8B:D9:AA:A5:33:B8:26:26:2E:8F:D7:A7:18:16:2A:83:63:5C";
- private static String encryptedPKCS8 = "AE:20:81:4F:4D:38:73:C0:51:70:42:DA:C2:EF:61:49:07:E9:B5:D5:55:6D:D1:50:54:B2:0B:41:3E:2F:B6:00:BC:30:89:7B:32:A5:5F:B6:86:92:9E:06:6E:E2:40:8E:3E:E8:0B:CA:97:DB:3E:72:3E:03:22:34:35:EA:5F:B0:71:B2:07:BC:0D:97:94:0A:E6:12:9B:60:7A:77:D4:6C:99:60:2E:68:D6:55:BE:83:B8:A9:0F:19:8A:BE:91:30:D0:FE:52:94:5A:4C:D7:24:07:B3:61:EB:B5:4A:C6:6F:96:8A:C0:20:E9:73:40:FA:A2:56:04:F2:43:35:90:EA:35:C9:8C:08:9D:0B:BC:37:F0:01:D5:DF:BE:E4:4A:57:E0:13:0C:D5:F0:E8:5C:3B:B3:CD:7E:B5:E8:A5:84:63:F6:DA:3E:F2:CF:53:1F:A2:86:44:61:DD:AF:C1:78:70:3A:E6:06:41:77:6C:5B:8D:FA:C4:39:D7:4D:2F:87:D8:31:F4:B6:2B:94:D9:87:17:0E:C8:E3:FA:54:C8:B2:44:56:E0:37:5F:4C:5D:B2:21:DD:15:9E:94:63:89:CF:07:8C:79:F8:65:B2:22:45:D5:F0:2A:70:19:61:16:1D:52:5E:0C:35:3B:20:88:17:7E:FD:05:CC:08:09:2F:05:61:F7:A8:F5:EA:DE:77:DE:5D:55:4E:A0:36:A1:13:FF:2D:57:E8:4E:06:CE:C9:C1:B1:AE:C6:52:A6:EB:35:4C:81:91:DE:71:BA:34:DA:8A:99:1A:47:2E:66:52:AF:E3:2A:E4:0A:27:7F:72:C4:90:7E:8D:8F:64:8D:21:7E:00:DC:1C:62:0F:CC:96:80:C7:E5:5B:70:48:A5:E7:34:27:1A:7C:48:A7:9E:8B:2B:A6:E2";
+ private static String sha1EncryptedPKCS8 = "0D:CA:00:8F:64:91:9C:60:36:F5:9B:BD:DD:C5:A9:A2:27:9E:6B:AE:CB:23:0E:2F:DA:76:03:A5:B7:C0:D5:3E:B9:03:60:62:41:2C:D6:51:37:F0:D9:ED:B2:CC:E7:99:28:03:CD:20:5D:EC:56:77:FC:61:57:D7:8C:F3:F6:10:F7:E5:BA:88:04:FE:1A:17:B3:8C:36:BF:70:2D:CD:6F:BF:83:ED:03:41:22:95:68:E3:08:90:76:B5:97:CB:FF:CE:51:27:14:F6:38:00:22:E9:0F:86:9F:64:D2:47:34:F6:50:DA:A9:80:F5:67:BF:C7:51:B3:38:AF:CD:15:96:50:8F:33:F3:8B:43:4C:AF:ED:DD:37:03:EC:B1:CC:57:53:0A:AF:0D:53:CD:D7:2B:A2:20:C5:37:AF:09:78:8E:3F:A0:E4:EC:22:C6:71:EC:D1:42:15:9D:1D:E9:E3:9D:8F:D6:0B:2A:99:C9:C8:90:B1:CD:AB:17:DD:A3:6F:64:43:23:26:25:7B:A5:E0:1F:2E:AF:18:89:C8:D6:97:28:32:A1:01:22:6F:14:B6:6C:4E:8A:83:47:16:99:51:B4:8D:85:9E:AB:00:B5:18:BB:49:97:47:59:F8:A7:A8:64:76:3F:41:5F:71:1A:F3:4A:96:F2:B4:44:38:42:4B:AE:0F:08:83:5C:33:F8:6A:8F:B9:6A:3D:1C:06:02:4E:07:48:46:E0:6D:6D:ED:E8:19:CB:3F:B0:6F:10:68:3A:5E:F5:8F:94:EF:B4:8B:58:5F:50:0A:E5:F2:13:54:59:14:99:C5:74:02:A2:B1:73:16:7F:F2:D4:DE:E0:12:86:55:46:9C:57:D1:7A:5C:8B:46:E1:7E:C3:32:14:31:52:64:07:52:9D:65:04:9D:54:89";
+ private static String md5EncryptedPKCS8 = "AE:20:81:4F:4D:38:73:C0:51:70:42:DA:C2:EF:61:49:07:E9:B5:D5:55:6D:D1:50:54:B2:0B:41:3E:2F:B6:00:BC:30:89:7B:32:A5:5F:B6:86:92:9E:06:6E:E2:40:8E:3E:E8:0B:CA:97:DB:3E:72:3E:03:22:34:35:EA:5F:B0:71:B2:07:BC:0D:97:94:0A:E6:12:9B:60:7A:77:D4:6C:99:60:2E:68:D6:55:BE:83:B8:A9:0F:19:8A:BE:91:30:D0:FE:52:94:5A:4C:D7:24:07:B3:61:EB:B5:4A:C6:6F:96:8A:C0:20:E9:73:40:FA:A2:56:04:F2:43:35:90:EA:35:C9:8C:08:9D:0B:BC:37:F0:01:D5:DF:BE:E4:4A:57:E0:13:0C:D5:F0:E8:5C:3B:B3:CD:7E:B5:E8:A5:84:63:F6:DA:3E:F2:CF:53:1F:A2:86:44:61:DD:AF:C1:78:70:3A:E6:06:41:77:6C:5B:8D:FA:C4:39:D7:4D:2F:87:D8:31:F4:B6:2B:94:D9:87:17:0E:C8:E3:FA:54:C8:B2:44:56:E0:37:5F:4C:5D:B2:21:DD:15:9E:94:63:89:CF:07:8C:79:F8:65:B2:22:45:D5:F0:2A:70:19:61:16:1D:52:5E:0C:35:3B:20:88:17:7E:FD:05:CC:08:09:2F:05:61:F7:A8:F5:EA:DE:77:DE:5D:55:4E:A0:36:A1:13:FF:2D:57:E8:4E:06:CE:C9:C1:B1:AE:C6:52:A6:EB:35:4C:81:91:DE:71:BA:34:DA:8A:99:1A:47:2E:66:52:AF:E3:2A:E4:0A:27:7F:72:C4:90:7E:8D:8F:64:8D:21:7E:00:DC:1C:62:0F:CC:96:80:C7:E5:5B:70:48:A5:E7:34:27:1A:7C:48:A7:9E:8B:2B:A6:E2";
private static byte[] parse(String s) {
try {
@@ -99,7 +103,7 @@ public static void main(String[] argv) throws Exception {
throw new Exception("Static parameter generation failed");
}
byte[] encodedKey = parse(pkcs8Encoded);
- byte[] encryptedData = parse(encryptedPKCS8);
+ byte[] encryptedData = parse(cipherAlg.contains("MD5") ? md5EncryptedPKCS8 : sha1EncryptedPKCS8);
boolean result = true;
Provider p = Security.getProvider(System.getProperty("test.provider.name", "SunJCE"));
diff --git a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java
index 7be1023aafe..f55f1eea42c 100644
--- a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java
+++ b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException.java
@@ -28,6 +28,8 @@
* @summary Test the error conditions of
* EncryptedPrivateKeyInfo.getKeySpec(...) methods.
* @author Valerie Peng
+ * @run main/othervm -DcipherAlg=PBEWithMD5AndDES GetKeySpecException
+ * @run main/othervm -DcipherAlg=PBEWithSHA1AndDESede GetKeySpecException
*/
import java.security.*;
import java.util.Arrays;
@@ -37,7 +39,7 @@
import javax.crypto.spec.*;
public class GetKeySpecException {
- private static final String cipherAlg = "PBEWithMD5AndDES";
+ private static String cipherAlg;
private static final char[] passwd = { 'p','a','s','s','w','d' };
private static SecretKey cipherKey;
private static Cipher cipher = null;
@@ -50,6 +52,7 @@ public class GetKeySpecException {
static {
try {
+ cipherAlg = System.getProperty("cipherAlg");
sunjce = Security.getProvider(System.getProperty("test.provider.name", "SunJCE"));
PBEParameterSpec badParamSpec =
new PBEParameterSpec(new byte[10], 10);
diff --git a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException2.java b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException2.java
index ef2d6acdef7..1fad8b70071 100644
--- a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException2.java
+++ b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecException2.java
@@ -28,6 +28,8 @@
* with wrong mode with EncryptedPrivateKeyInfo.getKeySpec
* (Cipher) method.
* @author Valerie Peng
+ * @run main GetKeySpecException2 PBEWithMD5AndDES
+ * @run main GetKeySpecException2 PBEWithSHA1AndDESede
*/
import java.security.*;
import java.util.Arrays;
@@ -38,11 +40,10 @@
import javax.crypto.spec.*;
public class GetKeySpecException2 {
- private static final String cipherAlg = "PBEWithMD5AndDES";
private static final char[] passwd = { 'p','a','s','s','w','d' };
- public static void main(String[] argv) throws Exception {
-
+ public static void main(String[] args) throws Exception {
+ String cipherAlg = args[0];
// use random data
byte[] encryptedData = new byte[30];
encryptedData[20] = (byte) 8;
diff --git a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecInvalidEncoding.java b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecInvalidEncoding.java
index a6aa3c86222..40c112b42ee 100644
--- a/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecInvalidEncoding.java
+++ b/test/jdk/javax/crypto/EncryptedPrivateKeyInfo/GetKeySpecInvalidEncoding.java
@@ -28,6 +28,8 @@
* methods with scenarios where the decrypted bytes are not
* encoded correctly per PKCS#8 standard.
* @author Valerie Peng
+ * @run main/othervm -DcipherAlg=PBEWithMD5AndDES GetKeySpecInvalidEncoding
+ * @run main/othervm -DcipherAlg=PBEWithSHA1AndDESede GetKeySpecInvalidEncoding
*/
import java.util.*;
import java.nio.*;
@@ -39,12 +41,13 @@
import javax.crypto.spec.*;
public class GetKeySpecInvalidEncoding {
- private static final String cipherAlg = "PBEWithMD5AndDES";
+ private static String cipherAlg;
private static final char[] passwd = { 'p','a','s','s', 'w', 'd' };
private static AlgorithmParameters GOOD_PARAMS;
static {
try {
+ cipherAlg = System.getProperty("cipherAlg");
PBEParameterSpec goodParamSpec =
new PBEParameterSpec(new byte[8], 6);
GOOD_PARAMS = AlgorithmParameters.getInstance
diff --git a/test/jdk/javax/crypto/KeyGenerator/TestGetInstance.java b/test/jdk/javax/crypto/KeyGenerator/TestGetInstance.java
index 3863fc98154..96e8f794d9b 100644
--- a/test/jdk/javax/crypto/KeyGenerator/TestGetInstance.java
+++ b/test/jdk/javax/crypto/KeyGenerator/TestGetInstance.java
@@ -26,6 +26,8 @@
* @bug 4898428
* @summary test that the new getInstance() implementation works correctly
* @author Andreas Sterbenz
+ * @run main TestGetInstance des
+ * @run main TestGetInstance aes
*/
import java.security.*;
@@ -47,12 +49,13 @@ public static void main(String[] args) throws Exception {
KeyGenerator kg;
- kg = KeyGenerator.getInstance("des");
+ String algo = args[0];
+ kg = KeyGenerator.getInstance(algo);
System.out.println("Default: " + kg.getProvider().getName());
- kg = KeyGenerator.getInstance("des",
+ kg = KeyGenerator.getInstance(algo,
System.getProperty("test.provider.name", "SunJCE"));
same(p, kg.getProvider());
- kg = KeyGenerator.getInstance("des", p);
+ kg = KeyGenerator.getInstance(algo, p);
same(p, kg.getProvider());
try {
diff --git a/test/jdk/javax/crypto/Mac/ByteBuffers.java b/test/jdk/javax/crypto/Mac/ByteBuffers.java
index 39efee91798..eafd2b89e1a 100644
--- a/test/jdk/javax/crypto/Mac/ByteBuffers.java
+++ b/test/jdk/javax/crypto/Mac/ByteBuffers.java
@@ -27,6 +27,8 @@
* @summary Test the Mac.update(ByteBuffer) method
* @author Andreas Sterbenz
* @key randomness
+ * @run main ByteBuffers HmacMD5
+ * @run main ByteBuffers HmacSha256
*/
import java.util.*;
@@ -46,11 +48,12 @@ public static void main(String[] args) throws Exception {
byte[] t = new byte[n];
random.nextBytes(t);
+ String algo = args[0];
byte[] keyBytes = new byte[16];
random.nextBytes(keyBytes);
- SecretKey key = new SecretKeySpec(keyBytes, "HmacMD5");
+ SecretKey key = new SecretKeySpec(keyBytes, algo);
- Mac mac = Mac.getInstance("HmacMD5");
+ Mac mac = Mac.getInstance(algo);
mac.init(key);
byte[] macValue = mac.doFinal(t);
diff --git a/test/jdk/javax/crypto/Mac/TestGetInstance.java b/test/jdk/javax/crypto/Mac/TestGetInstance.java
index 0361bc0b8d0..85982799bd0 100644
--- a/test/jdk/javax/crypto/Mac/TestGetInstance.java
+++ b/test/jdk/javax/crypto/Mac/TestGetInstance.java
@@ -26,6 +26,8 @@
* @bug 4898428
* @summary test that the new getInstance() implementation works correctly
* @author Andreas Sterbenz
+ * @run main TestGetInstance hmacmd5
+ * @run main TestGetInstance hmacsha256
*/
import java.security.*;
@@ -47,11 +49,12 @@ public static void main(String[] args) throws Exception {
Mac mac;
- mac = Mac.getInstance("hmacmd5");
+ String algo = args[0];
+ mac = Mac.getInstance(algo);
System.out.println("Default: " + mac.getProvider().getName());
- mac = Mac.getInstance("hmacmd5", System.getProperty("test.provider.name", "SunJCE"));
+ mac = Mac.getInstance(algo, System.getProperty("test.provider.name", "SunJCE"));
same(p, mac.getProvider());
- mac = Mac.getInstance("hmacmd5", p);
+ mac = Mac.getInstance(algo, p);
same(p, mac.getProvider());
try {
diff --git a/test/jdk/javax/crypto/SecretKeyFactory/SecKeyFacSunJCEPrf.java b/test/jdk/javax/crypto/SecretKeyFactory/SecKeyFacSunJCEPrf.java
index a8819b04457..8501f888e0f 100644
--- a/test/jdk/javax/crypto/SecretKeyFactory/SecKeyFacSunJCEPrf.java
+++ b/test/jdk/javax/crypto/SecretKeyFactory/SecKeyFacSunJCEPrf.java
@@ -42,11 +42,11 @@
public class SecKeyFacSunJCEPrf {
// One of the PBKDF2 HMAC-SHA1 test vectors from RFC 6070
- private static final byte[] SALT = "salt".getBytes();
+ private static final byte[] SALT = "16-byte salt val".getBytes();
private static final char[] PASS = "password".toCharArray();
private static final int ITER = 4096;
private static final byte[] EXP_OUT =
- HexFormat.of().parseHex("4B007901B765489ABEAD49D926F721D065A429C1");
+ HexFormat.of().parseHex("D2CACD3F1D44AF293C704F0B1005338D903C688C");
public static void main(String[] args) throws Exception {
// Instantiate the Evil Provider and insert it in the
diff --git a/test/jdk/javax/security/auth/Destroyable/KeyDestructionTest.java b/test/jdk/javax/security/auth/Destroyable/KeyDestructionTest.java
index 71570807e4a..6a664cebf7e 100644
--- a/test/jdk/javax/security/auth/Destroyable/KeyDestructionTest.java
+++ b/test/jdk/javax/security/auth/Destroyable/KeyDestructionTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 6263419
+ * @library /test/lib
* @summary No way to clean the memory for a java.security.Key
*/
@@ -32,10 +33,12 @@
import javax.crypto.*;
import javax.security.auth.Destroyable;
import javax.security.auth.DestroyFailedException;
+import jdk.test.lib.security.SecurityUtils;
public class KeyDestructionTest {
public static void main(String[] args) throws Exception {
- KeyPair keypair = generateKeyPair("RSA", 1024);
+ String kpgAlgorithm = "RSA";
+ KeyPair keypair = generateKeyPair(kpgAlgorithm, SecurityUtils.getTestKeySize(kpgAlgorithm));
// Check keys that support and have implemented key destruction
testKeyDestruction(new MyDestroyableSecretKey());
diff --git a/test/jdk/jdk/jfr/jvm/TestLongStringsInPool.java b/test/jdk/jdk/jfr/jvm/TestLongStringsInPool.java
new file mode 100644
index 00000000000..8ce3fd3859f
--- /dev/null
+++ b/test/jdk/jdk/jfr/jvm/TestLongStringsInPool.java
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2024, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.jfr.jvm;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+
+import jdk.jfr.Event;
+import jdk.jfr.Recording;
+import jdk.jfr.consumer.RecordingFile;
+import jdk.test.lib.Asserts;
+import jdk.test.lib.jfr.EventNames;
+
+/**
+ * @test
+ * @summary Verify that duplicate longer strings doesn't take up unneccessary space
+ * @key jfr
+ * @requires vm.hasJFR
+ * @library /test/lib
+ * @run main/othervm jdk.jfr.jvm.TestLongStringsInPool
+ */
+public class TestLongStringsInPool {
+ private static class StringEvent extends Event {
+ String message;
+ }
+
+ public static void main(String[] args) throws Exception {
+ // Create two recordings; first has only one large
+ // string, second has several occurences of the same
+ // string. With long strings (>128 chars) being pooled,
+ // the two recording should be roughly the same size.
+ final int numEvents = 10;
+ final String longString = generateString();
+ final int strLen = longString.length();
+ final StringEvent event = new StringEvent();
+ event.message = longString;
+
+ Recording firstRec = new Recording();
+ firstRec.start();
+ // commit events with empty message (both recordings
+ // will have the same number of events)
+ for (int i = 0; i < numEvents - 1; i++) {
+ event.message = "";
+ event.commit();
+ }
+ // commit 1 event with a long string
+ event.message = longString;
+ event.commit();
+
+ firstRec.stop();
+ Path rec1 = Paths.get(".", "rec1.jfr");
+ firstRec.dump(rec1);
+ firstRec.close();
+
+
+ Recording secondRec = new Recording();
+ secondRec.start();
+ // commit events with the same long string
+ for (int i = 0; i < numEvents - 1; i++) {
+ event.message = longString;
+ event.commit();
+ }
+ // commit 1 event with a long string
+ event.message = longString;
+ event.commit();
+
+ secondRec.stop();
+ Path rec2 = Paths.get(".", "rec2.jfr");
+ secondRec.dump(rec2);
+ secondRec.close();
+
+ // the files aren't exactly the same size, but rec2 should
+ // not take up space for all strings if they're pooled correctly
+ long maxAllowedDiff = (numEvents - 1) * strLen;
+ long diff = Math.abs(Files.size(rec2) - Files.size(rec1));
+
+ Asserts.assertTrue(diff <= maxAllowedDiff, "Size difference between recordings is too large: "+ diff +" > " + maxAllowedDiff);
+ Asserts.assertFalse(RecordingFile.readAllEvents(rec1).isEmpty(), "No events found in recording 1");
+ Asserts.assertFalse(RecordingFile.readAllEvents(rec2).isEmpty(), "No events found in recording 2");
+ Asserts.assertEquals(RecordingFile.readAllEvents(rec1).size(), RecordingFile.readAllEvents(rec2).size(), "The recordings don't have the same number of events");
+ }
+
+ /**
+ * Generate a string of 256 chars length.
+ * @return
+ */
+ private static String generateString() {
+ final StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < 32; i++) {
+ builder.append("abcdefgh");
+ }
+ return builder.toString();
+ }
+}
diff --git a/test/jdk/jdk/security/jarsigner/Spec.java b/test/jdk/jdk/security/jarsigner/Spec.java
index 0e189babb8b..5ca3b11cd96 100644
--- a/test/jdk/jdk/security/jarsigner/Spec.java
+++ b/test/jdk/jdk/security/jarsigner/Spec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -36,6 +36,7 @@
import jdk.security.jarsigner.JarSigner;
import jdk.test.lib.util.JarUtils;
+import jdk.test.lib.security.SecurityUtils;
import sun.security.provider.certpath.X509CertPath;
import java.io.File;
@@ -175,14 +176,16 @@ public static void main(String[] args) throws Exception {
.equals("SHA-384"));
// Calculating large DSA and RSA keys are too slow.
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
- kpg.initialize(1024);
+ String kpgRSA = "RSA";
+ String kpgDSA = "DSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgRSA);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgRSA));
assertTrue(JarSigner.Builder
.getDefaultSignatureAlgorithm(kpg.generateKeyPair().getPrivate())
.equals("SHA384withRSA"));
- kpg = KeyPairGenerator.getInstance("DSA");
- kpg.initialize(1024);
+ kpg = KeyPairGenerator.getInstance(kpgDSA);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgDSA));
assertTrue(JarSigner.Builder
.getDefaultSignatureAlgorithm(kpg.generateKeyPair().getPrivate())
.equals("SHA256withDSA"));
diff --git a/test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java b/test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java
index 13a4f7bea73..3d125325449 100644
--- a/test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java
+++ b/test/jdk/sun/management/jmxremote/startstop/JMXStartStopTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024, 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
@@ -72,7 +72,7 @@ public class JMXStartStopTest {
private static final boolean verbose = false;
- private static ManagementAgentJcmd jcmd = new ManagementAgentJcmd(TEST_APP_NAME, verbose);
+ private static ManagementAgentJcmd jcmd;
private static void dbg_print(String msg) {
if (verbose) {
@@ -347,6 +347,7 @@ public synchronized void start() throws InterruptedException, IOException, Timeo
"the requested port not being available");
}
pid = p.pid();
+ jcmd = new ManagementAgentJcmd(p, verbose);
} catch (TimeoutException e) {
if (p != null) {
p.destroy();
diff --git a/test/jdk/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java b/test/jdk/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java
index fc7a0de2d06..e3703ba8dbc 100644
--- a/test/jdk/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java
+++ b/test/jdk/sun/management/jmxremote/startstop/JMXStatusPerfCountersTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -67,7 +67,6 @@ public static void setupClass() throws Exception {
@BeforeTest
public void setup() {
- jcmd = new ManagementAgentJcmd(TEST_APP_NAME, false);
}
@BeforeMethod
@@ -76,6 +75,7 @@ public void startTestApp() throws Exception {
TEST_APP_NAME, testAppPb,
(Predicate)l->l.trim().equals("main enter")
);
+ jcmd = new ManagementAgentJcmd(testApp, false);
}
@AfterMethod
diff --git a/test/jdk/sun/management/jmxremote/startstop/JMXStatusTest.java b/test/jdk/sun/management/jmxremote/startstop/JMXStatusTest.java
index 1e6259ef0d7..fc1b4883220 100644
--- a/test/jdk/sun/management/jmxremote/startstop/JMXStatusTest.java
+++ b/test/jdk/sun/management/jmxremote/startstop/JMXStatusTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -88,8 +88,6 @@ public final void setup() throws Exception {
args.addAll(getCustomVmArgs());
args.add(TEST_APP_NAME);
testAppPb = ProcessTools.createTestJavaProcessBuilder(args);
-
- jcmd = new ManagementAgentJcmd(TEST_APP_NAME, false);
}
@BeforeMethod
@@ -98,6 +96,7 @@ public final void startTestApp() throws Exception {
TEST_APP_NAME, testAppPb,
(Predicate)l->l.trim().equals("main enter")
);
+ jcmd = new ManagementAgentJcmd(testApp, false);
}
@AfterMethod
diff --git a/test/jdk/sun/management/jmxremote/startstop/ManagementAgentJcmd.java b/test/jdk/sun/management/jmxremote/startstop/ManagementAgentJcmd.java
index 0781bc941fd..7135f6ea2db 100644
--- a/test/jdk/sun/management/jmxremote/startstop/ManagementAgentJcmd.java
+++ b/test/jdk/sun/management/jmxremote/startstop/ManagementAgentJcmd.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -47,11 +47,11 @@ final class ManagementAgentJcmd {
private static final String CMD_STATUS = "ManagementAgent.status";
private static final String CMD_PRINTPERF = "PerfCounter.print";
- private final String id;
+ private final long pid;
private final boolean verbose;
- public ManagementAgentJcmd(String targetApp, boolean verbose) {
- this.id = targetApp;
+ public ManagementAgentJcmd(Process targetApp, boolean verbose) {
+ this.pid = targetApp.pid();
this.verbose = verbose;
}
@@ -174,7 +174,7 @@ private String jcmd(String ... command) throws IOException, InterruptedException
* @throws InterruptedException
*/
private String jcmd(Consumer c, String ... command) throws IOException, InterruptedException {
- return jcmd(id, c, command);
+ return jcmd(Long.toString(pid), c, command);
}
/**
diff --git a/test/jdk/sun/security/krb5/runNameEquals.sh b/test/jdk/sun/security/krb5/runNameEquals.sh
index 302e1bb8c57..ecfd65a2fe4 100644
--- a/test/jdk/sun/security/krb5/runNameEquals.sh
+++ b/test/jdk/sun/security/krb5/runNameEquals.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2009, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2024, 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
@@ -94,7 +94,7 @@ EXIT_STATUS=0
if [ "${NATIVE}" = "true" ] ; then
echo "Testing native provider"
- ${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
+ ${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-classpath ${TESTCLASSES} \
-Dsun.security.jgss.native=true \
${TEST}
@@ -114,7 +114,7 @@ if [ "${NATIVE}" = "true" ] ; then
fi
echo "Testing java provider"
-${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
+${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-classpath ${TESTCLASSES} \
-Djava.security.krb5.realm=R \
-Djava.security.krb5.kdc=127.0.0.1 \
diff --git a/test/jdk/sun/security/pkcs/pkcs10/PKCS10AttrEncoding.java b/test/jdk/sun/security/pkcs/pkcs10/PKCS10AttrEncoding.java
index 1e389eb613f..9f3d72f8983 100644
--- a/test/jdk/sun/security/pkcs/pkcs10/PKCS10AttrEncoding.java
+++ b/test/jdk/sun/security/pkcs/pkcs10/PKCS10AttrEncoding.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -30,7 +30,8 @@
* java.base/sun.security.util
* java.base/sun.security.x509
* @compile -XDignore.symbol.file PKCS10AttrEncoding.java
- * @run main PKCS10AttrEncoding
+ * @run main PKCS10AttrEncoding DSA 512
+ * @run main PKCS10AttrEncoding Sha256withDSA 2048
*/
import java.security.KeyPair;
import java.security.KeyPairGenerator;
@@ -69,11 +70,13 @@ public static void main(String[] args) throws Exception {
constructedMap.put(ids[j], values[j]);
}
+ String kpgAlgorithm = "DSA";
X500Name subject = new X500Name("cn=Test");
- KeyPairGenerator keyGen = KeyPairGenerator.getInstance("DSA");
- String sigAlg = "DSA";
+ KeyPairGenerator keyGen = KeyPairGenerator.getInstance(kpgAlgorithm);
+ String sigAlg = args[0];
+ int keySize = Integer.parseInt(args[1]);
- keyGen.initialize(512);
+ keyGen.initialize(keySize);
KeyPair pair = keyGen.generateKeyPair();
X509Key publicKey = (X509Key) pair.getPublic();
diff --git a/test/jdk/sun/security/pkcs/pkcs7/SignerOrder.java b/test/jdk/sun/security/pkcs/pkcs7/SignerOrder.java
index 705ad88c131..ade60964bd3 100644
--- a/test/jdk/sun/security/pkcs/pkcs7/SignerOrder.java
+++ b/test/jdk/sun/security/pkcs/pkcs7/SignerOrder.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2024, 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
@@ -29,7 +29,8 @@
* @modules java.base/sun.security.pkcs
* java.base/sun.security.util
* java.base/sun.security.x509
- * @run main SignerOrder
+ * @run main SignerOrder default 1024
+ * @run main SignerOrder Sha256 2048
*/
import java.io.IOException;
import java.math.BigInteger;
@@ -62,20 +63,21 @@ public class SignerOrder {
static final byte[] data1 = "12345".getBytes();
static final byte[] data2 = "abcde".getBytes();
- public static void main(String[] argv) throws Exception {
-
+ public static void main(String[] args) throws Exception {
+ String digestAlg = "default".equals(args[0]) ? null : args[0];
+ int keySize = Integer.parseInt(args[1]);
SignerInfo[] signerInfos = new SignerInfo[9];
- SimpleSigner signer1 = new SimpleSigner(null, null, null, null);
+ SimpleSigner signer1 = new SimpleSigner(digestAlg, null, null, null, keySize);
signerInfos[8] = signer1.genSignerInfo(data1);
signerInfos[7] = signer1.genSignerInfo(new byte[]{});
signerInfos[6] = signer1.genSignerInfo(data2);
- SimpleSigner signer2 = new SimpleSigner(null, null, null, null);
+ SimpleSigner signer2 = new SimpleSigner(digestAlg, null, null, null, keySize);
signerInfos[5] = signer2.genSignerInfo(data1);
signerInfos[4] = signer2.genSignerInfo(new byte[]{});
signerInfos[3] = signer2.genSignerInfo(data2);
- SimpleSigner signer3 = new SimpleSigner(null, null, null, null);
+ SimpleSigner signer3 = new SimpleSigner(digestAlg, null, null, null, keySize);
signerInfos[2] = signer3.genSignerInfo(data1);
signerInfos[1] = signer3.genSignerInfo(new byte[]{});
signerInfos[0] = signer3.genSignerInfo(data2);
@@ -156,28 +158,33 @@ class SimpleSigner {
public SimpleSigner(String digestAlg,
String encryptionAlg,
KeyPair keyPair,
- X500Name agent) throws Exception {
+ X500Name agent,
+ int keySize) throws Exception {
+ String signAlgoDigest;
if (agent == null) {
agent = new X500Name("cn=test");
}
- if (digestAlg == null) {
- digestAlg = "SHA";
- }
if (encryptionAlg == null) {
encryptionAlg = "DSA";
}
+ if (digestAlg == null) {
+ digestAlg = "SHA";
+ signAlgoDigest = encryptionAlg;
+ } else {
+ signAlgoDigest = digestAlg + "with" + encryptionAlg;
+ }
if (keyPair == null) {
KeyPairGenerator keyGen =
KeyPairGenerator.getInstance(encryptionAlg);
- keyGen.initialize(1024);
+ keyGen.initialize(keySize);
keyPair = keyGen.generateKeyPair();
}
publicKey = (X509Key) keyPair.getPublic();
privateKey = keyPair.getPrivate();
if ("DSA".equals(encryptionAlg)) {
- this.sig = Signature.getInstance(encryptionAlg);
+ this.sig = Signature.getInstance(signAlgoDigest);
} else { // RSA
this.sig = Signature.getInstance(digestAlg + "/" + encryptionAlg);
}
diff --git a/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java b/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java
index 8156decacc8..6799b19d3e7 100644
--- a/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java
+++ b/test/jdk/sun/security/pkcs11/Cipher/TestRSACipher.java
@@ -44,6 +44,7 @@
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
+import jdk.test.lib.security.SecurityUtils;
public class TestRSACipher extends PKCS11Test {
@@ -58,8 +59,10 @@ public void main(Provider p) throws Exception {
System.out.println("Not supported by provider, skipping");
return;
}
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p);
- kpg.initialize(1024);
+ String kpgAlgorithm = "RSA";
+ int keySize = SecurityUtils.getTestKeySize(kpgAlgorithm);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p);
+ kpg.initialize(keySize);
KeyPair kp = kpg.generateKeyPair();
PublicKey publicKey = kp.getPublic();
PrivateKey privateKey = kp.getPrivate();
@@ -113,7 +116,8 @@ public void main(Provider p) throws Exception {
c1.update(b);
e = c1.doFinal();
- c1.update(new byte[256]);
+ // Longer buffer size to verify IllegalBlockSizeException is thrown
+ c1.update(new byte[keySize / 4]);
try {
e = c1.doFinal();
throw new Exception("completed call");
diff --git a/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java b/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java
index 632f5f48e66..0be916ebf9e 100644
--- a/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java
+++ b/test/jdk/sun/security/pkcs11/Cipher/TestRSACipherWrap.java
@@ -43,6 +43,7 @@
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
import javax.crypto.spec.SecretKeySpec;
+import jdk.test.lib.security.SecurityUtils;
public class TestRSACipherWrap extends PKCS11Test {
@@ -57,8 +58,9 @@ public void main(Provider p) throws Exception {
System.out.println(RSA_ALGOS[0] + " unsupported, skipping");
return;
}
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", p);
- kpg.initialize(1024);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
for (String rsaAlgo: RSA_ALGOS) {
diff --git a/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java b/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java
index 32319f9f3cf..fe6433d096e 100644
--- a/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java
+++ b/test/jdk/sun/security/pkcs11/Cipher/TestRawRSACipher.java
@@ -41,6 +41,7 @@
import java.util.HexFormat;
import java.util.Random;
import javax.crypto.Cipher;
+import jdk.test.lib.security.SecurityUtils;
public class TestRawRSACipher extends PKCS11Test {
@@ -53,8 +54,9 @@ public void main(Provider p) throws Exception {
return;
}
- final int KEY_LEN = 1024;
- KeyPairGenerator kpGen = KeyPairGenerator.getInstance("RSA", p);
+ String kpgAlgorithm = "RSA";
+ final int KEY_LEN = SecurityUtils.getTestKeySize(kpgAlgorithm);
+ KeyPairGenerator kpGen = KeyPairGenerator.getInstance(kpgAlgorithm, p);
kpGen.initialize(KEY_LEN);
KeyPair kp = kpGen.generateKeyPair();
Random random = new Random();
diff --git a/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java b/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java
index dc25754c717..13b09d16dcf 100644
--- a/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java
+++ b/test/jdk/sun/security/pkcs11/KeyAgreement/TestDH.java
@@ -38,6 +38,7 @@
import java.util.Arrays;
import javax.crypto.KeyAgreement;
import javax.crypto.SecretKey;
+import jdk.test.lib.security.SecurityUtils;
public class TestDH extends PKCS11Test {
@@ -47,8 +48,9 @@ public void main(Provider p) throws Exception {
System.out.println("DH not supported, skipping");
return;
}
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("DH", p);
- kpg.initialize(512);
+ String kpgAlgorithm = "DH";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, p);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp1 = kpg.generateKeyPair();
KeyPair kp2 = kpg.generateKeyPair();
diff --git a/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java b/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java
index 9172b2a4941..7f6f79e767b 100644
--- a/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java
+++ b/test/jdk/sun/security/pkcs11/KeyAgreement/TestInterop.java
@@ -39,43 +39,40 @@
import javax.crypto.KeyAgreement;
import javax.crypto.spec.DHPrivateKeySpec;
import javax.crypto.spec.DHPublicKeySpec;
+import jdk.test.lib.security.DiffieHellmanGroup;
+import jdk.test.lib.security.SecurityUtils;
public class TestInterop extends PKCS11Test {
- private final static BigInteger p = new BigInteger
- ("171718397966129586011229151993178480901904202533705695869569760169920539"
- + "80807543778874708672297590042574075430109846864794139516459381007417046"
- + "27996080624930219892858374168155487210358743785481212360509485282294161"
- + "39585571568998066586304075565145536350296006867635076744949977849997684"
- + "222020336013226588207303");
-
- private final static BigInteger g = new BigInteger("2");
-
private final static BigInteger ya = new BigInteger
- ("687709211571508809414670982463565909269384277848448625781941269577397703"
- + "73675199968849153119146758339814638228795348558483510369322822476757204"
- + "22158455966026517829008713407587339322132253724742557954802911059639161"
- + "24827916158465757962384625410294483756242900146397201260757102085985457"
- + "09397033481077351036224");
+ ("22272412859242949963897309866268099957623364986192222381531147912319" +
+ "23153170556019072276127184001075566033823724518300406542189341984" +
+ "14728033901164887842157675409022004721268960808255834930605035809" +
+ "96449867261598768663006346373969582073599358922631400907241847771" +
+ "58539394502794451638884093173505103869438428833148912071609829581" +
+ "89477284513896649100113024962862016311693389603523142235630316916" +
+ "51727812401021776761600004971782662420311224757086651213529674905" +
+ "34921437167341469749945865459714558842881915928697452568830704027" +
+ "08840053484115995358953663434943150292283157101600109003253293611" +
+ "67575903571371898272633920086");
private final static BigInteger xa = new BigInteger
- ("104917367119952955556289227181599819745346393858545449202252025137706135"
- + "98100778613457655440586438263591136003106529323555991109623536177695714"
- + "66884181531401472902830508361532232717792847436112280721439936797741371"
- + "245140912614191507");
+ ("20959988947516815975588968321965141642005944293655257916834342975849");
private final static BigInteger yb = new BigInteger
- ("163887874871842952463100699681506173424091615364591742415764095471629919"
- + "08421025296419917755446931473037086355546823601999684501737493240373415"
- + "65608293667837249198973539289354492348897732633852665609611113031379864"
- + "58514616034107537409230452318065341748503347627733368519091332060477528"
- + "173423377887175351037810");
+ ("1788841814501653834923092375117807364896992833810838802030127811094" +
+ "8450381275318704655838368105000403140578033341448162321874634765" +
+ "6870663019881556386613144025875613921737258766185138415793010195" +
+ "3802511267742963370821568963965936108932734114202964873644126233" +
+ "6937947954023458790417933403303562491144788202839815534782475160" +
+ "7813094179390506418017926774832227342290968359943612529948409558" +
+ "4647213355501260440663649115694263879691520265343063263385211121" +
+ "3396751542827391711077192604441343359832896902306354119121777576" +
+ "6479255602858536672821464920683781338851326155035757018336622673" +
+ "39973666608754923308482789421630138499");
private final static BigInteger xb = new BigInteger
- ("127757517533485947079959908591028646859165238853082197617179368337276371"
- + "51601819447716934542027725311863797141734616730248519214531856941516613"
- + "30313414180008978013330410484011186019824874948204261839391153650949864"
- + "429505597086564709");
+ ("37339373137107550077381337769340105015086522284791968753218309293526");
@Override
public void main(Provider prov) throws Exception {
@@ -92,13 +89,18 @@ public void main(Provider prov) throws Exception {
KeyAgreement ka = KeyAgreement.getInstance("DH", prov);
KeyAgreement kbSunJCE = KeyAgreement.getInstance("DH",
System.getProperty("test.provider.name", "SunJCE"));
- DHPrivateKeySpec privSpecA = new DHPrivateKeySpec(xa, p, g);
- DHPublicKeySpec pubSpecA = new DHPublicKeySpec(ya, p, g);
+ DiffieHellmanGroup dhGroup = SecurityUtils.getTestDHGroup();
+ DHPrivateKeySpec privSpecA = new DHPrivateKeySpec(xa, dhGroup.getPrime(),
+ dhGroup.getBase());
+ DHPublicKeySpec pubSpecA = new DHPublicKeySpec(ya, dhGroup.getPrime(),
+ dhGroup.getBase());
PrivateKey privA = kf.generatePrivate(privSpecA);
PublicKey pubA = kf.generatePublic(pubSpecA);
- DHPrivateKeySpec privSpecB = new DHPrivateKeySpec(xb, p, g);
- DHPublicKeySpec pubSpecB = new DHPublicKeySpec(yb, p, g);
+ DHPrivateKeySpec privSpecB = new DHPrivateKeySpec(xb, dhGroup.getPrime(),
+ dhGroup.getBase());
+ DHPublicKeySpec pubSpecB = new DHPublicKeySpec(yb, dhGroup.getPrime(),
+ dhGroup.getBase());
PrivateKey privB = kf.generatePrivate(privSpecB);
PublicKey pubB = kf.generatePublic(pubSpecB);
@@ -110,6 +112,10 @@ public void main(Provider prov) throws Exception {
kbSunJCE.doPhase(pubA, true);
byte[] n2 = kbSunJCE.generateSecret();
+ // verify that a leading zero is present in secrets
+ if (n1[0] != 0 || n2[0] != 0) {
+ throw new Exception("First byte is not zero as expected");
+ }
if (Arrays.equals(n1, n2) == false) {
throw new Exception("values mismatch!");
} else {
diff --git a/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh b/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
index 56a4fd6b806..2d7744ec9d5 100644
--- a/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
+++ b/test/jdk/sun/security/pkcs11/Provider/MultipleLogins.sh
@@ -122,7 +122,7 @@ ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} \
${TESTSRC}${FS}MultipleLogins.java \
${TESTSRC}${FS}..${FS}PKCS11Test.java
-TEST_ARGS="${TESTVMOPTS} -classpath ${TESTCLASSPATH} \
+TEST_ARGS="${TESTVMOPTS} ${TESTJAVAOPTS} -classpath ${TESTCLASSPATH} \
--add-modules jdk.crypto.cryptoki \
--add-exports jdk.crypto.cryptoki/sun.security.pkcs11=ALL-UNNAMED \
-DCUSTOM_DB_DIR=${TESTCLASSES} \
diff --git a/test/jdk/sun/security/provider/KeyStore/CaseSensitiveAliases.java b/test/jdk/sun/security/provider/KeyStore/CaseSensitiveAliases.java
index e11a8ac87dc..fd47d0ac60f 100644
--- a/test/jdk/sun/security/provider/KeyStore/CaseSensitiveAliases.java
+++ b/test/jdk/sun/security/provider/KeyStore/CaseSensitiveAliases.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 5091374 5100603
+ * @library /test/lib
* @summary make sure the JKS case sensitivity works correctly
* @author Andreas Sterbenz
*/
@@ -34,6 +35,7 @@
import java.security.*;
import java.security.cert.*;
import java.security.cert.Certificate;
+import jdk.test.lib.security.SecurityUtils;
public class CaseSensitiveAliases {
@@ -90,8 +92,9 @@ private static void main(String jks, boolean caseInsensitive) throws Exception {
X509Certificate[] a1 = {c1};
X509Certificate[] a2 = {c2};
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
- kpg.initialize(512);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
PrivateKey p1 = kpg.generateKeyPair().getPrivate();
PrivateKey p2 = kpg.generateKeyPair().getPrivate();
diff --git a/test/jdk/sun/security/provider/KeyStore/DKSTest.java b/test/jdk/sun/security/provider/KeyStore/DKSTest.java
index 1d1943ec729..9c35a1c1dd9 100644
--- a/test/jdk/sun/security/provider/KeyStore/DKSTest.java
+++ b/test/jdk/sun/security/provider/KeyStore/DKSTest.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2024, 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
@@ -80,7 +80,7 @@ public class DKSTest {
public static void main(String[] args) throws Exception {
if (args.length == 0) {
// Environment variable and system properties referred in domains.cfg used by this Test.
- ProcessBuilder pb = ProcessTools.createLimitedTestJavaProcessBuilder(List.of(
+ ProcessBuilder pb = ProcessTools.createTestJavaProcessBuilder(List.of(
"-Dtest.src=" + TEST_SRC , "-Duser.dir=" + USER_DIR, "DKSTest", "run"));
pb.environment().putAll(System.getenv());
pb.environment().put("KEYSTORE_PWD", "test12");
diff --git a/test/jdk/sun/security/provider/NSASuiteB/TestSHAwithDSASignatureOids.java b/test/jdk/sun/security/provider/NSASuiteB/TestSHAwithDSASignatureOids.java
index e76ca9a1386..c7f1ce75ca4 100644
--- a/test/jdk/sun/security/provider/NSASuiteB/TestSHAwithDSASignatureOids.java
+++ b/test/jdk/sun/security/provider/NSASuiteB/TestSHAwithDSASignatureOids.java
@@ -23,10 +23,12 @@
import java.util.Arrays;
import java.util.List;
+import jdk.test.lib.security.SecurityUtils;
/*
* @test
* @bug 8075286
+ * @library /test/lib
* @summary Test the SHAwithDSA signature algorithm OIDs in JDK.
* OID and algorithm transformation string should match.
* Both could be able to be used to generate the algorithm instance.
@@ -40,8 +42,10 @@ public class TestSHAwithDSASignatureOids {
new OidAlgorithmPair("2.16.840.1.101.3.4.3.2", "SHA256withDSA"));
public static void main(String[] args) throws Exception {
- TestSignatureOidHelper helper = new TestSignatureOidHelper("DSA",
- System.getProperty("test.provider.name", "SUN"), 1024, DATA);
+ String kpgAlgorithm = "DSA";
+ TestSignatureOidHelper helper = new TestSignatureOidHelper(kpgAlgorithm,
+ System.getProperty("test.provider.name", "SUN"),
+ SecurityUtils.getTestKeySize(kpgAlgorithm), DATA);
helper.execute();
}
}
diff --git a/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh b/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh
index c293a067afe..cc2c9940a46 100644
--- a/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh
+++ b/test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh
@@ -1,7 +1,7 @@
#! /bin/sh
#
-# Copyright (c) 2001, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2001, 2024, 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
@@ -96,7 +96,7 @@ ${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLA
${COMPILEJAVA}${FS}bin${FS}javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d ${TESTCLASSES}${FS}app \
${TESTSRC}${FS}GetInstance.java
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-Xbootclasspath/a:"${TESTCLASSES}${FS}boot" \
-classpath "${TESTCLASSES}${FS}app" -Djava.security.manager \
-Djava.security.policy=GetInstance.policy \
@@ -110,7 +110,7 @@ if [ $status1 -ne 0 ]; then
echo "Failed on first test"
fi
-${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} \
+${TESTJAVA}${FS}bin${FS}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-classpath "${TESTCLASSES}${FS}boot${PS}${TESTCLASSES}${FS}app" \
-Djava.security.manager \
-Djava.security.policy=GetInstance.policy \
diff --git a/test/jdk/sun/security/rsa/BrokenRSAPrivateCrtKey.java b/test/jdk/sun/security/rsa/BrokenRSAPrivateCrtKey.java
index 787011782fa..aef92647396 100644
--- a/test/jdk/sun/security/rsa/BrokenRSAPrivateCrtKey.java
+++ b/test/jdk/sun/security/rsa/BrokenRSAPrivateCrtKey.java
@@ -24,6 +24,7 @@
/*
* @test
* @bug 4503229 8220016
+ * @library /test/lib
* @summary default RSA KeyFactory can return broken RSAPrivateCrtKey objects
* This test was taken directly from the bug report, which
* was fixed in the crippled JSAFE provider, and needed
@@ -35,13 +36,15 @@
import java.security.interfaces.*;
import java.security.spec.*;
import java.math.BigInteger;
+import jdk.test.lib.security.SecurityUtils;
public class BrokenRSAPrivateCrtKey {
public static void main(String[] args) throws Exception {
+ String kpgAlgorithm = "RSA";
KeyPairGenerator generator =
- KeyPairGenerator.getInstance("RSA",
+ KeyPairGenerator.getInstance(kpgAlgorithm,
System.getProperty("test.provider.name", "SunRsaSign"));
- generator.initialize(2048);
+ generator.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair pair = generator.generateKeyPair();
diff --git a/test/jdk/sun/security/rsa/TestKeyPairGenerator.java b/test/jdk/sun/security/rsa/TestKeyPairGenerator.java
index ff142c712fe..f5bd6c47f3b 100644
--- a/test/jdk/sun/security/rsa/TestKeyPairGenerator.java
+++ b/test/jdk/sun/security/rsa/TestKeyPairGenerator.java
@@ -40,6 +40,7 @@
import java.security.interfaces.*;
import java.security.spec.*;
+import jdk.test.lib.security.SecurityUtils;
import jdk.test.lib.SigTestUtil;
import static jdk.test.lib.SigTestUtil.SignatureType;
@@ -85,9 +86,10 @@ private static void test(PrivateKey privateKey, PublicKey publicKey) throws Exce
}
// regression test for 4865198
- private static void testInvalidSignature(KeyPair kp1, KeyPair kp2) throws Exception {
+ private static void testInvalidSignature(KeyPair kp1, KeyPair kp2, String signAlgo)
+ throws Exception {
System.out.println("Testing signature with incorrect key...");
- Signature sig = Signature.getInstance("MD5withRSA", provider);
+ Signature sig = Signature.getInstance(signAlgo, provider);
sig.initSign(kp1.getPrivate());
byte[] data = new byte[100];
sig.update(data);
@@ -114,12 +116,13 @@ public static void main(String[] args) throws Exception {
provider = Security.getProvider(
System.getProperty("test.provider.name", "SunRsaSign"));
data = new byte[2048];
- // keypair generation is very slow, test only a few short keys
- int[] keyLengths = {512, 512, 1024};
+ String kpgAlgorithm = "RSA";
+ int keySize = SecurityUtils.getTestKeySize(kpgAlgorithm);
+ int[] keyLengths = {keySize, keySize, keySize + 1024};
BigInteger[] pubExps = {null, BigInteger.valueOf(3), null};
KeyPair[] keyPairs = new KeyPair[3];
new Random().nextBytes(data);
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA", provider);
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm, provider);
for (int i = 0; i < keyLengths.length; i++) {
int len = keyLengths[i];
BigInteger exp = pubExps[i];
@@ -151,9 +154,14 @@ public static void main(String[] args) throws Exception {
}
test(privateKey, publicKey);
}
- testInvalidSignature(keyPairs[0], keyPairs[1]);
- testInvalidSignature(keyPairs[0], keyPairs[2]);
- testInvalidSignature(keyPairs[2], keyPairs[0]);
+ String md5Algo = "MD5withRSA";
+ String sha256Algo = "Sha256withRSA";
+ testInvalidSignature(keyPairs[0], keyPairs[1], md5Algo);
+ testInvalidSignature(keyPairs[0], keyPairs[2], md5Algo);
+ testInvalidSignature(keyPairs[2], keyPairs[0], md5Algo);
+ testInvalidSignature(keyPairs[0], keyPairs[1], sha256Algo);
+ testInvalidSignature(keyPairs[0], keyPairs[2], sha256Algo);
+ testInvalidSignature(keyPairs[2], keyPairs[0], sha256Algo);
long stop = System.currentTimeMillis();
System.out.println("All tests passed (" + (stop - start) + " ms).");
}
diff --git a/test/jdk/sun/security/rsa/TestKeyPairGeneratorExponent.java b/test/jdk/sun/security/rsa/TestKeyPairGeneratorExponent.java
index 6d77683e04e..2c60d66664e 100644
--- a/test/jdk/sun/security/rsa/TestKeyPairGeneratorExponent.java
+++ b/test/jdk/sun/security/rsa/TestKeyPairGeneratorExponent.java
@@ -24,6 +24,7 @@
/**
* @test
* @bug 8216012
+ * @library /test/lib
* @summary Tests the RSA public key exponent for KeyPairGenerator
* @run main/timeout=60 TestKeyPairGeneratorExponent
*/
@@ -33,14 +34,16 @@
import java.security.*;
import java.security.interfaces.*;
import java.security.spec.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestKeyPairGeneratorExponent {
- private static int keyLen = 512;
+ private static final String KPG_ALGORITHM = "RSA";
+ private static final int KEY_LENGTH = SecurityUtils.getTestKeySize(KPG_ALGORITHM);
private static BigInteger[] validExponents = new BigInteger[] {
RSAKeyGenParameterSpec.F0,
RSAKeyGenParameterSpec.F4,
- BigInteger.ONE.shiftLeft(keyLen - 1).subtract(BigInteger.ONE)
+ BigInteger.ONE.shiftLeft(KEY_LENGTH - 1).subtract(BigInteger.ONE)
};
private static BigInteger[] invalidExponents = new BigInteger[] {
@@ -55,7 +58,7 @@ public static void testValidExponents(KeyPairGenerator kpg,
BigInteger exponent) {
System.out.println("Testing exponent = " + exponent.toString(16));
try {
- kpg.initialize(new RSAKeyGenParameterSpec(keyLen, exponent));
+ kpg.initialize(new RSAKeyGenParameterSpec(KEY_LENGTH, exponent));
kpg.generateKeyPair();
System.out.println("OK, key pair generated");
} catch(InvalidAlgorithmParameterException iape){
@@ -67,7 +70,7 @@ public static void testInvalidExponents(KeyPairGenerator kpg,
BigInteger exponent) {
System.out.println("Testing exponent = " + exponent.toString(16));
try {
- kpg.initialize(new RSAKeyGenParameterSpec(keyLen, exponent));
+ kpg.initialize(new RSAKeyGenParameterSpec(KEY_LENGTH, exponent));
kpg.generateKeyPair();
throw new RuntimeException("Error: Expected IAPE not thrown.");
} catch(InvalidAlgorithmParameterException iape){
@@ -81,7 +84,7 @@ public static void testInvalidExponents(KeyPairGenerator kpg,
public static void main(String[] args) throws Exception {
KeyPairGenerator kpg =
- KeyPairGenerator.getInstance("RSA",
+ KeyPairGenerator.getInstance(KPG_ALGORITHM,
System.getProperty("test.provider.name", "SunRsaSign"));
for(BigInteger validExponent : validExponents) {
diff --git a/test/jdk/sun/security/rsa/TestKeyPairGeneratorInit.java b/test/jdk/sun/security/rsa/TestKeyPairGeneratorInit.java
index e72474fda24..7d85c56e684 100644
--- a/test/jdk/sun/security/rsa/TestKeyPairGeneratorInit.java
+++ b/test/jdk/sun/security/rsa/TestKeyPairGeneratorInit.java
@@ -24,11 +24,13 @@
/**
* @test
* @bug 8211049
+ * @library /test/lib
* @summary make sure the supplied SecureRandom object is used
*/
import java.security.*;
import java.security.interfaces.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestKeyPairGeneratorInit {
@@ -45,11 +47,12 @@ public void nextBytes(byte[] bytes) {
}
public static void main(String[] args) throws Exception {
+ String kpgAlgorithm = "RSA";
KeyPairGenerator kpg =
- KeyPairGenerator.getInstance("RSA",
+ KeyPairGenerator.getInstance(kpgAlgorithm,
System.getProperty("test.provider.name", "SunRsaSign"));
MySecureRandom rnd = new MySecureRandom();
- kpg.initialize(2048, rnd);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm), rnd);
System.out.println("Generate keypair then check");
KeyPair kp = kpg.generateKeyPair();
if (!rnd.isUsed) {
diff --git a/test/jdk/sun/security/rsa/TestKeyPairGeneratorLength.java b/test/jdk/sun/security/rsa/TestKeyPairGeneratorLength.java
index 5b05af007f2..765ca485bbc 100644
--- a/test/jdk/sun/security/rsa/TestKeyPairGeneratorLength.java
+++ b/test/jdk/sun/security/rsa/TestKeyPairGeneratorLength.java
@@ -24,23 +24,27 @@
/**
* @test
* @bug 5078280
+ * @library /test/lib
* @summary make sure generated key pairs are exactly the requested length
* @author Andreas Sterbenz
*/
import java.security.*;
import java.security.interfaces.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestKeyPairGeneratorLength {
+ private static final String KPG_ALGORITHM = "RSA";
+ private static final int KEY_LENGTH = SecurityUtils.getTestKeySize(KPG_ALGORITHM);
public static void main(String[] args) throws Exception {
- test(512);
- test(513);
+ test(KEY_LENGTH);
+ test(KEY_LENGTH + 1);
System.out.println("Done.");
}
private static void test(int len) throws Exception {
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA",
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(KPG_ALGORITHM,
System.getProperty("test.provider.name", "SunRsaSign"));
kpg.initialize(len);
for (int i = 0; i < 6; i++) {
diff --git a/test/jdk/sun/security/rsa/pss/DefaultParamSpec.java b/test/jdk/sun/security/rsa/pss/DefaultParamSpec.java
index 6f121c75fd2..782fbe510b7 100644
--- a/test/jdk/sun/security/rsa/pss/DefaultParamSpec.java
+++ b/test/jdk/sun/security/rsa/pss/DefaultParamSpec.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2020, 2024, 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
@@ -30,10 +30,12 @@
import java.security.spec.PSSParameterSpec;
import java.security.spec.RSAKeyGenParameterSpec;
import java.util.Date;
+import jdk.test.lib.security.SecurityUtils;
/**
* @test
* @bug 8242811
+ * @library /test/lib
* @modules java.base/sun.security.x509
* @summary AlgorithmId::getDefaultAlgorithmParameterSpec returns incompatible
* PSSParameterSpec for an RSASSA-PSS key
@@ -42,7 +44,7 @@ public class DefaultParamSpec {
public static void main(String[] args) throws Exception {
KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSASSA-PSS");
KeyFactory kf = KeyFactory.getInstance("RSASSA-PSS");
- kpg.initialize(new RSAKeyGenParameterSpec(2048,
+ kpg.initialize(new RSAKeyGenParameterSpec(SecurityUtils.getTestKeySize("RSA"),
RSAKeyGenParameterSpec.F4,
new PSSParameterSpec(
"SHA-384", "MGF1",
diff --git a/test/jdk/sun/security/rsa/pss/InitAgain.java b/test/jdk/sun/security/rsa/pss/InitAgain.java
index 209d5f46178..9fe8d1a0131 100644
--- a/test/jdk/sun/security/rsa/pss/InitAgain.java
+++ b/test/jdk/sun/security/rsa/pss/InitAgain.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, 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
@@ -22,26 +22,34 @@
*/
import java.security.*;
import java.security.spec.*;
+import jdk.test.lib.security.SecurityUtils;
/**
* @test
* @bug 8205445
+ * @library /test/lib
* @summary Make sure old state is cleared when init is called again
+ * @run main InitAgain default
+ * @run main InitAgain SHA-256
*/
public class InitAgain {
public static void main(String[] args) throws Exception {
+ String mdName = args[0];
+ PSSParameterSpec pssParamSpec = "default".equals(mdName) ? PSSParameterSpec.DEFAULT :
+ new PSSParameterSpec(mdName, "MGF1", new MGF1ParameterSpec(mdName), 20, 1);
byte[] msg = "hello".getBytes();
Signature s1 = Signature.getInstance("RSASSA-PSS");
Signature s2 = Signature.getInstance("RSASSA-PSS");
- s1.setParameter(PSSParameterSpec.DEFAULT);
- s2.setParameter(PSSParameterSpec.DEFAULT);
+ s1.setParameter(pssParamSpec);
+ s2.setParameter(pssParamSpec);
- KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
- kpg.initialize(1024);
+ String kpgAlgorithm = "RSA";
+ KeyPairGenerator kpg = KeyPairGenerator.getInstance(kpgAlgorithm);
+ kpg.initialize(SecurityUtils.getTestKeySize(kpgAlgorithm));
KeyPair kp = kpg.generateKeyPair();
s1.initSign(kp.getPrivate());
diff --git a/test/jdk/sun/security/rsa/pss/SerializedPSSKey.java b/test/jdk/sun/security/rsa/pss/SerializedPSSKey.java
index 0c4578653c5..f946427092c 100644
--- a/test/jdk/sun/security/rsa/pss/SerializedPSSKey.java
+++ b/test/jdk/sun/security/rsa/pss/SerializedPSSKey.java
@@ -50,9 +50,11 @@
import java.security.spec.RSAPublicKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.Arrays;
+import jdk.test.lib.security.SecurityUtils;
/**
* @test @bug 8242335
+ * @library /test/lib
* @summary Test RSASSA-PSS serialized keys
* @run main SerializedPSSKey
*/
@@ -62,7 +64,7 @@ public class SerializedPSSKey {
private static final String OID = "1.2.840.113549.1.1.10";
private static final String PROVIDER =
System.getProperty("test.provider.name", "SunRsaSign");
- private static final int KEY_SIZE = 2048;
+ private static final int KEY_SIZE = SecurityUtils.getTestKeySize("RSA");
private static final byte[] DATA = "Test".getBytes();
/**
* Digest algorithms to test w/ RSASSA-PSS signature algorithms
diff --git a/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java b/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java
index 6b117a4b5fe..44d1324b00e 100644
--- a/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java
+++ b/test/jdk/sun/security/rsa/pss/TestPSSKeySupport.java
@@ -24,6 +24,7 @@
/**
* @test
* @bug 8146293 8242556 8172366 8254717
+ * @library /test/lib
* @summary Test RSASSA-PSS Key related support such as KeyPairGenerator
* and KeyFactory of the SunRsaSign provider
*/
@@ -35,6 +36,7 @@
import java.security.*;
import java.security.interfaces.*;
import java.security.spec.*;
+import jdk.test.lib.security.SecurityUtils;
public class TestPSSKeySupport {
@@ -130,12 +132,13 @@ private static void checkKeyPair(KeyPair kp) throws Exception {
}
public static void main(String[] args) throws Exception {
+ int keySize = SecurityUtils.getTestKeySize("RSA");
KeyPairGenerator kpg =
KeyPairGenerator.getInstance(ALGO,
System.getProperty("test.provider.name", "SunRsaSign"));
// Algorithm-Independent Initialization
- kpg.initialize(2048);
+ kpg.initialize(keySize);
KeyPair kp = kpg.generateKeyPair();
checkKeyPair(kp);
BigInteger pubExp = ((RSAPublicKey)kp.getPublic()).getPublicExponent();
@@ -143,13 +146,13 @@ public static void main(String[] args) throws Exception {
// Algorithm-specific Initialization
PSSParameterSpec params = new PSSParameterSpec("SHA-256", "MGF1",
MGF1ParameterSpec.SHA256, 32, 1);
- kpg.initialize(new RSAKeyGenParameterSpec(2048, pubExp, params));
+ kpg.initialize(new RSAKeyGenParameterSpec(keySize, pubExp, params));
KeyPair kp2 = kpg.generateKeyPair();
checkKeyPair(kp2);
params = new PSSParameterSpec("SHA3-256", "MGF1",
new MGF1ParameterSpec("SHA3-256"), 32, 1);
- kpg.initialize(new RSAKeyGenParameterSpec(2048, pubExp, params));
+ kpg.initialize(new RSAKeyGenParameterSpec(keySize, pubExp, params));
KeyPair kp3 = kpg.generateKeyPair();
checkKeyPair(kp3);
diff --git a/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh b/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh
index 259059ff762..85479b00824 100644
--- a/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh
+++ b/test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2002, 2020, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2002, 2024, 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
@@ -86,7 +86,7 @@ rm -rf com edu
# This is the only thing we really care about as far as
# test status goes.
#
-${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} \
+${TESTJAVA}${FILESEP}bin${FILESEP}java ${TESTVMOPTS} ${TESTJAVAOPTS} \
-Dtest.src=${TESTSRC} \
-classpath "com.jar${PATHSEP}edu.jar" \
-Djava.security.manager \
diff --git a/test/jdk/sun/security/ssl/X509TrustManagerImpl/PKIXExtendedTM.java b/test/jdk/sun/security/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
index 1cf22f04293..e2e5e066f9c 100644
--- a/test/jdk/sun/security/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
+++ b/test/jdk/sun/security/ssl/X509TrustManagerImpl/PKIXExtendedTM.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024, 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
@@ -56,354 +56,495 @@
*
* TLS server certificate:
* server private key:
- * -----BEGIN RSA PRIVATE KEY-----
- * Proc-Type: 4,ENCRYPTED
- * DEK-Info: DES-EDE3-CBC,D9AE407F6D0E389A
*
- * WPrA7TFol/cQCcp9oHnXWNpYlvRbbIcQj0m+RKT2Iuzfus+DHt3Zadf8nJpKfX2e
- * h2rnhlzCN9M7djRDooZKDOPCsdBn51Au7HlZF3S3Opgo7D8XFM1a8t1Je4ke14oI
- * nw6QKYsBblRziPnP2PZ0zvX24nOv7bbY8beynlJHGs00VWSFdoH2DS0aE1p6D+3n
- * ptJuJ75dVfZFK4X7162APlNXevX8D6PEQpSiRw1rjjGGcnvQ4HdWk3BxDVDcCNJb
- * Y1aGNRxsjTDvPi3R9Qx2M+W03QzEPx4SR3ZHVskeSJHaetM0TM/w/45Paq4GokXP
- * ZeTnbEx1xmjkA7h+t4doLL4watx5F6yLsJzu8xB3lt/1EtmkYtLz1t7X4BetPAXz
- * zS69X/VwhKfsOI3qXBWuL2oHPyhDmT1gcaUQwEPSV6ogHEEQEDXdiUS8heNK13KF
- * TCQYFkETvV2BLxUhV1hypPzRQ6tUpJiAbD5KmoK2lD9slshG2QtvKQq0/bgkDY5J
- * LhDHV2dtcZ3kDPkkZXpbcJQvoeH3d09C5sIsuTFo2zgNR6oETHUc5TzP6FY2YYRa
- * QcK5HcmtsRRiXFm01ac+aMejJUIujjFt84SiKWT/73vC8AmY4tYcJBLjCg4XIxSH
- * fdDFLL1YZENNO5ivlp8mdiHqcawx+36L7DrEZQ8RZt6cqST5t/+XTdM74s6k81GT
- * pNsa82P2K2zmIUZ/DL2mKjW1vfRByw1NQFEBkN3vdyZxYfM/JyUzX4hbjXBEkh9Q
- * QYrcwLKLjis2QzSvK04B3bvRzRb+4ocWiso8ZPAXAIxZFBWDpTMM2A==
- * -----END RSA PRIVATE KEY-----
- *
- * -----BEGIN RSA PRIVATE KEY-----
- * MIICXAIBAAKBgQClrFscN6LdmYktsnm4j9VIpecchBeNaZzGrG358h0fORna03Ie
- * buxEzHCk3LoAMPagTz1UemFqzFfQCn+VKBg/mtmU8hvIJIh+/p0PPftXUwizIDPU
- * PxdHFNHN6gjYDnVOr77M0uyvqXpJ38LZrLgkQJCmA1Yq0DAFQCxPq9l0iQIDAQAB
- * AoGAbqcbg1E1mkR99uOJoNeQYKFOJyGiiXTMnXV1TseC4+PDfQBU7Dax35GcesBi
- * CtapIpFKKS5D+ozY6b7ZT8ojxuQ/uHLPAvz0WDR3ds4iRF8tyu71Q1ZHcQsJa17y
- * yO7UbkSSKn/Mp9Rb+/dKqftUGNXVFLqgHBOzN2s3We3bbbECQQDYBPKOg3hkaGHo
- * OhpHKqtQ6EVkldihG/3i4WejRonelXN+HRh1KrB2HBx0M8D/qAzP1i3rNSlSHer4
- * 59YRTJnHAkEAxFX/sVYSn07BHv9Zhn6XXct/Cj43z/tKNbzlNbcxqQwQerw3IH51
- * 8UH2YOA+GD3lXbKp+MytoFLWv8zg4YT/LwJAfqan75Z1R6lLffRS49bIiq8jwE16
- * rTrUJ+kv8jKxMqc9B3vXkxpsS1M/+4E8bqgAmvpgAb8xcsvHsBd9ErdukQJBAKs2
- * j67W75BrPjBI34pQ1LEfp56IGWXOrq1kF8IbCjxv3+MYRT6Z6UJFkpRymNPNDjsC
- * dgUYgITiGJHUGXuw3lMCQHEHqo9ZtXz92yFT+VhsNc29B8m/sqUJdtCcMd/jGpAF
- * u6GHufjqIZBpQsk63wbwESAPZZ+kk1O1kS5GIRLX608=
- * -----END RSA PRIVATE KEY-----
- *
- * Private-Key: (1024 bit)
+ * Private-Key: (2048 bit, 2 primes)
* modulus:
- * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f:
- * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2:
- * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc:
- * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a:
- * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe:
- * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14:
- * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9:
- * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0:
- * 30:05:40:2c:4f:ab:d9:74:89
+ * 00:9a:0c:e0:8f:a8:02:7e:5a:ef:ed:b2:42:ad:08:
+ * 4e:91:ba:c2:ad:9b:79:d7:9b:0f:fd:d2:f8:15:2f:
+ * 19:89:80:10:00:02:19:6d:27:c2:90:d7:a5:23:53:
+ * 74:6e:64:28:7c:24:aa:ed:ea:21:59:dc:a3:5c:b5:
+ * c9:42:31:4f:a2:de:fb:09:7c:73:ed:88:04:34:f1:
+ * 15:ad:3d:60:cd:ca:c5:13:99:d3:9f:9b:b2:92:70:
+ * cb:ba:4b:3d:20:96:ad:be:92:53:ed:54:3b:c5:14:
+ * bd:cf:d4:0f:cb:05:4f:fd:2b:9e:e0:50:bb:65:13:
+ * 92:c0:d6:bd:4d:02:0c:70:b6:65:d4:7d:b4:4d:c3:
+ * df:2c:08:9e:d2:3e:69:32:46:6f:6f:ca:d1:73:a4:
+ * 94:07:ef:14:e3:da:9e:2f:c0:ac:0e:10:33:4c:68:
+ * 79:f3:79:40:d6:e9:3c:c2:e6:70:e0:89:ce:a0:7a:
+ * a8:84:28:85:32:37:08:b0:cf:b1:7f:5f:bc:1f:a5:
+ * 3d:ef:d6:68:a8:17:21:5f:87:d5:4b:b5:cc:ee:78:
+ * 8d:dd:b1:28:6a:c0:fb:64:bd:b7:70:02:33:03:0b:
+ * b8:b8:bb:08:82:f6:8e:05:27:d1:3b:e6:c5:ac:4d:
+ * 85:5b:a1:1d:a3:48:5d:03:15:76:63:6c:71:21:3e:
+ * 98:cd
* publicExponent: 65537 (0x10001)
* privateExponent:
- * 6e:a7:1b:83:51:35:9a:44:7d:f6:e3:89:a0:d7:90:
- * 60:a1:4e:27:21:a2:89:74:cc:9d:75:75:4e:c7:82:
- * e3:e3:c3:7d:00:54:ec:36:b1:df:91:9c:7a:c0:62:
- * 0a:d6:a9:22:91:4a:29:2e:43:fa:8c:d8:e9:be:d9:
- * 4f:ca:23:c6:e4:3f:b8:72:cf:02:fc:f4:58:34:77:
- * 76:ce:22:44:5f:2d:ca:ee:f5:43:56:47:71:0b:09:
- * 6b:5e:f2:c8:ee:d4:6e:44:92:2a:7f:cc:a7:d4:5b:
- * fb:f7:4a:a9:fb:54:18:d5:d5:14:ba:a0:1c:13:b3:
- * 37:6b:37:59:ed:db:6d:b1
+ * 68:87:36:54:a3:c6:d5:5f:f5:0f:4f:76:c8:9c:2b:
+ * 5b:dc:e2:be:14:12:2f:c7:0a:a9:cb:5e:04:59:ca:
+ * 35:2f:8d:2b:c4:40:e6:7d:25:1b:4d:07:c3:99:9c:
+ * 16:4f:a5:dc:de:b0:90:f0:de:22:70:80:f4:a6:70:
+ * e2:96:3d:18:21:bf:2b:27:a4:2d:d7:ae:2b:12:2f:
+ * 08:36:ee:99:94:ed:f6:a7:d9:1d:a2:f3:1f:44:a4:
+ * 28:4b:67:35:d6:a8:1b:f8:84:34:34:84:bd:ec:9e:
+ * 03:08:3c:93:20:8e:af:15:cb:1f:20:08:97:c4:19:
+ * 3e:fa:36:c6:ab:0e:2f:e7:b3:c0:a7:bc:e4:e0:a6:
+ * 08:1c:69:20:4d:78:bd:7a:e5:25:48:60:9e:2e:50:
+ * 8d:36:1e:07:e9:d5:0d:39:67:41:42:24:db:87:e5:
+ * 77:76:fd:5e:d5:c6:e5:d3:b0:98:71:48:69:47:4f:
+ * 46:05:0c:9e:58:45:2e:e2:27:d0:f6:11:05:78:ad:
+ * 83:5a:5b:ec:d7:2e:26:5a:a5:4f:9e:52:84:2c:1f:
+ * 59:1a:78:56:0a:44:54:c6:37:64:01:ca:e4:a8:01:
+ * c7:86:c1:b4:d6:6c:7a:15:9a:65:69:46:9e:fd:f6:
+ * 08:17:0c:6c:ac:38:bd:c2:cd:da:ef:54:7a:48:92:
+ * 4d
* prime1:
- * 00:d8:04:f2:8e:83:78:64:68:61:e8:3a:1a:47:2a:
- * ab:50:e8:45:64:95:d8:a1:1b:fd:e2:e1:67:a3:46:
- * 89:de:95:73:7e:1d:18:75:2a:b0:76:1c:1c:74:33:
- * c0:ff:a8:0c:cf:d6:2d:eb:35:29:52:1d:ea:f8:e7:
- * d6:11:4c:99:c7
+ * 00:e4:43:cc:51:25:aa:1d:90:41:95:2c:e8:9f:aa:
+ * 1c:9b:ea:bd:fd:29:e5:68:6b:28:00:ec:31:31:36:
+ * d0:3d:84:db:c5:5d:32:f6:38:b9:04:4f:45:cb:19:
+ * f5:88:cd:a8:fc:70:b8:6d:98:68:a6:b4:9e:c1:da:
+ * fd:db:eb:1a:53:3c:3b:e6:85:d2:6f:03:45:7a:ad:
+ * 49:8c:c3:96:a7:46:a4:bb:3b:48:d3:d7:1c:b4:3c:
+ * f7:04:0a:a3:85:9d:94:3e:bd:35:f5:34:21:3d:08:
+ * 89:df:c5:54:af:cf:90:f7:d8:5c:57:c5:77:5a:c8:
+ * d1:b3:8f:ee:01:5c:07:13:3f
* prime2:
- * 00:c4:55:ff:b1:56:12:9f:4e:c1:1e:ff:59:86:7e:
- * 97:5d:cb:7f:0a:3e:37:cf:fb:4a:35:bc:e5:35:b7:
- * 31:a9:0c:10:7a:bc:37:20:7e:75:f1:41:f6:60:e0:
- * 3e:18:3d:e5:5d:b2:a9:f8:cc:ad:a0:52:d6:bf:cc:
- * e0:e1:84:ff:2f
+ * 00:ac:c4:a0:cc:7c:51:db:65:0a:02:da:bc:d8:77:
+ * 21:8c:d3:30:ae:ec:50:60:4b:b9:39:c7:2d:bd:98:
+ * aa:4f:9b:44:74:ab:f8:86:de:e2:44:15:73:7a:cd:
+ * d5:46:f2:03:62:c5:87:9c:6d:91:d5:7a:9a:17:c2:
+ * c6:2f:29:0e:8a:a4:a9:f4:c2:63:a2:77:97:bf:c6:
+ * 90:e8:39:70:87:cc:fd:62:4f:d2:3d:e7:47:70:fb:
+ * f3:bd:bd:5c:9c:77:fe:23:33:7d:83:ef:cb:0e:4e:
+ * f1:dd:05:47:40:97:f4:da:b6:1f:b9:8d:e2:92:04:
+ * 09:be:fb:6a:97:29:27:ac:f3
* exponent1:
- * 7e:a6:a7:ef:96:75:47:a9:4b:7d:f4:52:e3:d6:c8:
- * 8a:af:23:c0:4d:7a:ad:3a:d4:27:e9:2f:f2:32:b1:
- * 32:a7:3d:07:7b:d7:93:1a:6c:4b:53:3f:fb:81:3c:
- * 6e:a8:00:9a:fa:60:01:bf:31:72:cb:c7:b0:17:7d:
- * 12:b7:6e:91
+ * 3f:08:1d:b6:56:b1:38:02:aa:a9:77:c2:30:bc:b7:
+ * b3:b2:49:8e:4b:f0:66:3a:18:cc:d0:6b:f1:0c:12:
+ * ca:ba:12:39:d8:b7:86:d8:38:f6:e0:b1:04:19:81:
+ * fc:a9:d5:bd:07:9f:55:dc:1d:21:d3:84:77:41:72:
+ * 92:34:c4:8b:31:79:d4:f9:25:17:b4:8e:8e:06:a5:
+ * e5:b1:e8:ba:fe:3d:e4:d9:c5:0d:82:3c:11:e5:37:
+ * cc:ac:e7:64:b1:13:cb:93:52:00:08:ca:18:e1:6f:
+ * b9:13:f3:83:ac:cc:7a:34:0b:a3:cd:0a:5d:4e:50:
+ * e1:c5:9f:d2:4e:48:41:df
* exponent2:
- * 00:ab:36:8f:ae:d6:ef:90:6b:3e:30:48:df:8a:50:
- * d4:b1:1f:a7:9e:88:19:65:ce:ae:ad:64:17:c2:1b:
- * 0a:3c:6f:df:e3:18:45:3e:99:e9:42:45:92:94:72:
- * 98:d3:cd:0e:3b:02:76:05:18:80:84:e2:18:91:d4:
- * 19:7b:b0:de:53
+ * 02:c7:fb:8a:af:29:a6:2d:7f:36:c2:8c:ad:b3:65:
+ * 3f:de:1a:77:86:68:58:d4:7f:3b:d5:df:ff:a0:58:
+ * 85:85:8b:59:91:77:23:bc:ac:c9:c9:ca:9d:1c:79:
+ * 25:76:39:e5:ba:26:4f:b7:57:d4:a6:ef:9a:18:51:
+ * 96:6a:c3:c8:29:94:6e:d3:3e:45:5c:45:7e:19:d5:
+ * 35:57:cf:5e:f0:46:d7:f1:4f:02:1e:1a:01:50:9d:
+ * 00:dd:ee:82:ba:4f:c6:03:4b:2e:f7:8a:3e:45:b9:
+ * 11:04:c7:bb:db:76:5e:9a:f5:f1:c7:bd:f0:f9:cd:
+ * aa:5c:63:bf:e1:32:b9:4f
* coefficient:
- * 71:07:aa:8f:59:b5:7c:fd:db:21:53:f9:58:6c:35:
- * cd:bd:07:c9:bf:b2:a5:09:76:d0:9c:31:df:e3:1a:
- * 90:05:bb:a1:87:b9:f8:ea:21:90:69:42:c9:3a:df:
- * 06:f0:11:20:0f:65:9f:a4:93:53:b5:91:2e:46:21:
- * 12:d7:eb:4f
- *
+ * 50:4c:e6:1e:23:f3:e2:2b:d6:3f:87:53:fb:19:53:
+ * 4b:84:21:0b:77:31:ed:8d:c3:0c:ea:31:b0:a6:38:
+ * a9:e6:44:6e:18:05:53:8f:4a:5f:75:e5:3e:b5:26:
+ * 9b:46:3d:73:e7:c1:2a:a6:3e:c3:cd:41:b1:a6:55:
+ * 57:84:11:13:ec:44:92:59:7f:dd:0d:67:30:d3:b7:
+ * 13:ee:9e:2d:ea:be:b3:ca:4a:f0:6e:4f:22:e8:be:
+ * 8b:8d:9b:2c:30:a5:ed:2c:2b:13:4c:f7:61:19:64:
+ * 35:9d:b0:c8:10:85:01:e7:2a:70:13:00:39:c5:73:
+ * 63:34:fd:28:2d:7f:8d:20
+ * -----BEGIN PRIVATE KEY-----
+ * MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCaDOCPqAJ+Wu/t
+ * skKtCE6RusKtm3nXmw/90vgVLxmJgBAA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bZWsTgCqql3wjC8t7OySY5L8GY6GMzQa/EMEsq6EjnYt4bY
+ * OPbgsQQZgfyp1b0Hn1XcHSHThHdBcpI0xIsxedT5JRe0jo4GpeWx6Lr+PeTZxQ2C
+ * PBHlN8ys52SxE8uTUgAIyhjhb7kT84OszHo0C6PNCl1OUOHFn9JOSEHfAoGAAsf7
+ * iq8ppi1/NsKMrbNlP94ad4ZoWNR/O9Xf/6BYhYWLWZF3I7ysycnKnRx5JXY55bom
+ * T7dX1KbvmhhRlmrDyCmUbtM+RVxFfhnVNVfPXvBG1/FPAh4aAVCdAN3ugrpPxgNL
+ * LveKPkW5EQTHu9t2Xpr18ce98PnNqlxjv+EyuU8CgYBQTOYeI/PiK9Y/h1P7GVNL
+ * hCELdzHtjcMM6jGwpjip5kRuGAVTj0pfdeU+tSabRj1z58Eqpj7DzUGxplVXhBET
+ * 7ESSWX/dDWcw07cT7p4t6r6zykrwbk8i6L6LjZssMKXtLCsTTPdhGWQ1nbDIEIUB
+ * 5ypwEwA5xXNjNP0oLX+NIA==
+ * -----END PRIVATE KEY-----
*
* server certificate:
- * Data:
- * Version: 3 (0x2)
- * Serial Number: 8 (0x8)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 03:43:04 2008 GMT
- * Not After : Aug 25 03:43:04 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Server, CN=localhost
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f:
- * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2:
- * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc:
- * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a:
- * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe:
- * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14:
- * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9:
- * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0:
- * 30:05:40:2c:4f:ab:d9:74:89
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Basic Constraints:
- * CA:FALSE
- * X509v3 Key Usage:
- * Digital Signature, Non Repudiation, Key Encipherment
- * X509v3 Subject Key Identifier:
- * ED:6E:DB:F4:B5:56:C8:FB:1A:06:61:3F:0F:08:BB:A6:04:D8:16:54
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- *
- * X509v3 Subject Alternative Name: critical
- * DNS:localhost
- * Signature Algorithm: md5WithRSAEncryption0
- *
+ * Data:
+ * Version: 3 (0x2)
+ * Serial Number: 106315679 (0x6563f9f)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:55 2024 GMT
+ * Not After : Jul 2 04:16:55 2034 GMT
+ * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, CN=localhost ou=SSL-Server
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:9a:0c:e0:8f:a8:02:7e:5a:ef:ed:b2:42:ad:08:
+ * 4e:91:ba:c2:ad:9b:79:d7:9b:0f:fd:d2:f8:15:2f:
+ * 19:89:80:10:00:02:19:6d:27:c2:90:d7:a5:23:53:
+ * 74:6e:64:28:7c:24:aa:ed:ea:21:59:dc:a3:5c:b5:
+ * c9:42:31:4f:a2:de:fb:09:7c:73:ed:88:04:34:f1:
+ * 15:ad:3d:60:cd:ca:c5:13:99:d3:9f:9b:b2:92:70:
+ * cb:ba:4b:3d:20:96:ad:be:92:53:ed:54:3b:c5:14:
+ * bd:cf:d4:0f:cb:05:4f:fd:2b:9e:e0:50:bb:65:13:
+ * 92:c0:d6:bd:4d:02:0c:70:b6:65:d4:7d:b4:4d:c3:
+ * df:2c:08:9e:d2:3e:69:32:46:6f:6f:ca:d1:73:a4:
+ * 94:07:ef:14:e3:da:9e:2f:c0:ac:0e:10:33:4c:68:
+ * 79:f3:79:40:d6:e9:3c:c2:e6:70:e0:89:ce:a0:7a:
+ * a8:84:28:85:32:37:08:b0:cf:b1:7f:5f:bc:1f:a5:
+ * 3d:ef:d6:68:a8:17:21:5f:87:d5:4b:b5:cc:ee:78:
+ * 8d:dd:b1:28:6a:c0:fb:64:bd:b7:70:02:33:03:0b:
+ * b8:b8:bb:08:82:f6:8e:05:27:d1:3b:e6:c5:ac:4d:
+ * 85:5b:a1:1d:a3:48:5d:03:15:76:63:6c:71:21:3e:
+ * 98:cd
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * 5C:AF:44:B1:48:B8:59:9A:64:53:9D:2E:A6:B2:09:D3:0A:92:04:83
+ * X509v3 Key Usage:
+ * Digital Signature, Non Repudiation, Key Encipherment
+ * X509v3 Subject Alternative Name: critical
+ * DNS:localhost
+ * X509v3 Basic Constraints:
+ * CA:FALSE
+ * X509v3 Authority Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 9d:22:49:5f:56:23:e6:80:35:cc:ab:44:1c:27:bd:c9:8d:89:
+ * 93:49:58:e8:c1:7a:68:dd:cf:bd:e0:12:76:06:54:cd:2f:62:
+ * 9b:54:84:f2:bb:90:a0:bb:37:e2:13:1d:f3:df:41:aa:e0:fe:
+ * c0:ef:46:78:8d:aa:f4:1b:70:ad:a9:16:24:fa:15:4a:c6:0a:
+ * 8d:e1:99:93:00:a9:d4:b6:08:5d:8e:65:03:dc:d0:95:fc:95:
+ * 61:a6:ad:b5:ab:4d:a6:e0:05:48:8c:db:42:42:8a:d6:5e:c0:
+ * 2a:a0:11:15:b8:07:69:5c:3f:99:a0:bd:53:65:db:4e:cf:46:
+ * 61:93:09:7b:81:40:ff:5c:fe:4c:eb:f4:ac:de:1f:38:ad:b2:
+ * 60:28:f6:0e:9f:46:e7:07:8f:20:9a:a4:e1:8f:ab:54:99:76:
+ * 82:d8:9e:70:c4:da:98:85:71:af:3b:54:e4:01:b4:9e:83:d0:
+ * 7b:c6:8d:1f:ed:25:08:89:05:e9:87:97:76:5a:a3:85:c3:f8:
+ * 59:d7:bb:3b:5a:db:cb:ed:5d:ff:ac:21:b9:9a:e2:65:0a:bc:
+ * de:d1:dc:53:94:98:44:97:91:b3:1b:6b:80:0b:9b:57:b3:ae:
+ * 5c:7c:35:ca:39:71:f7:4e:8f:4a:d7:eb:0b:25:da:b2:1e:17:
+ * 48:b8:eb:09
* -----BEGIN CERTIFICATE-----
- * MIICpDCCAg2gAwIBAgIBCDANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET
- * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK
- * EwhTb21lLU9yZzAeFw0wODEyMDgwMzQzMDRaFw0yODA4MjUwMzQzMDRaMHIxCzAJ
- * BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp
- * dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtU2VydmVyMRIwEAYD
- * VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWsWxw3
- * ot2ZiS2yebiP1Uil5xyEF41pnMasbfnyHR85GdrTch5u7ETMcKTcugAw9qBPPVR6
- * YWrMV9AKf5UoGD+a2ZTyG8gkiH7+nQ89+1dTCLMgM9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M0xoefN5QNbpPMLmcOCJzqB6qIQohTI3CLDPsX9fvB+lPe/W
+ * aKgXIV+H1Uu1zO54jd2xKGrA+2S9t3ACMwMLuLi7CIL2jgUn0TvmxaxNhVuhHaNI
+ * XQMVdmNscSE+mM0CAwEAAaNzMHEwHQYDVR0OBBYEFFyvRLFIuFmaZFOdLqayCdMK
+ * kgSDMAsGA1UdDwQEAwIF4DAXBgNVHREBAf8EDTALgglsb2NhbGhvc3QwCQYDVR0T
+ * BAIwADAfBgNVHSMEGDAWgBTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B
+ * AQUFAAOCAQEAnSJJX1Yj5oA1zKtEHCe9yY2Jk0lY6MF6aN3PveASdgZUzS9im1SE
+ * 8ruQoLs34hMd899BquD+wO9GeI2q9BtwrakWJPoVSsYKjeGZkwCp1LYIXY5lA9zQ
+ * lfyVYaattatNpuAFSIzbQkKK1l7AKqARFbgHaVw/maC9U2XbTs9GYZMJe4FA/1z+
+ * TOv0rN4fOK2yYCj2Dp9G5wePIJqk4Y+rVJl2gtiecMTamIVxrztU5AG0noPQe8aN
+ * H+0lCIkF6YeXdlqjhcP4Wde7O1rby+1d/6whuZriZQq83tHcU5SYRJeRsxtrgAub
+ * V7OuXHw1yjlx906PStfrCyXash4XSLjrCQ==
* -----END CERTIFICATE-----
*
*
* TLS client certificate:
* client private key:
- * ----BEGIN RSA PRIVATE KEY-----
- * Proc-Type: 4,ENCRYPTED
- * DEK-Info: DES-EDE3-CBC,FA2A435CD35A9390
- *
- * Z+Y2uaETbsUWIyJUyVu1UV2G4rgFYJyACZT6Tp1KjRtxflSh2kXkJ9MpuXMXA0V4
- * Yy3fDzPqCL9NJmQAYRlAx/W/+j4F5EyMWDIx8fUxzONRZyoiwF7jLm+KscAfv6Pf
- * q7ItWOdj3z7IYrwlB8YIGd3F2cDKT3S+lYRk7rKb/qT7itbuHnY4Ardh3yl+MZak
- * jBp+ELUlRsUqSr1V0LoM+0rCCykarpyfhpxEcqsrl0v9Cyi5uhU50/oKv5zql3SH
- * l2ImgDjp3batAs8+Bd4NF2aqi0a7Hy44JUHxRm4caZryU/i/D9N1MbuM6882HLat
- * 5N0G+NaIUfywa8mjwq2D5aiit18HqKA6XeRRYeJ5Dvu9DCO4GeFSwcUFIBMI0L46
- * 7s114+oDodg57pMgITi+04vmUxvqlN9aiyd7f5Fgd7PeHGeOdbMz1NaJLJaPI9++
- * NakK8eK9iwT/Gdq0Uap5/CHW7vCT5PO+h3HY0STH0lWStXhdWnFO04zTdywsbSp+
- * DLpHeFT66shfeUlxR0PsCbG9vPRt/QmGLeYQZITppWo/ylSq4j+pRIuXvuWHdBRN
- * rTZ8QF4Y7AxQUXVz1j1++s6ZMHTzaK2i9HrhmDs1MbJl+QwWre3Xpv3LvTVz3k5U
- * wX8kuY1m3STt71QCaRWENq5sRaMImLxZbxc/ivFl9RAzUqo4NCxLod/QgA4iLqtO
- * ztnlpzwlC/F8HbQ1oqYWwnZAPhzU/cULtstl+Yrws2c2atO323LbPXZqbASySgig
- * sNpFXQMObdfP6LN23bY+1SvtK7V4NUTNhpdIc6INQAQ=
- * -----END RSA PRIVATE KEY-----
- *
- * -----BEGIN RSA PRIVATE KEY-----
- * MIICWwIBAAKBgQC78EA2rCZUTvSjWgAvaSFvuXo6k+yi9uGOx2PYLxIwmS6w8o/4
- * Jy0keCiE9wG/jUR53TvSVfPOPLJbIX3v/TNKsaP/xsibuQ98QTWX+ds6BWAFFa9Z
- * F5KjEK0WHOQHU6+odqJWKpLT+SjgeM9eH0irXBnd4WdDunWN9YKsQ5JEGwIDAQAB
- * AoGAEbdqNj0wN85hnWyEi/ObJU8UyKTdL9eaF72QGfcF/fLSxfd3vurihIeXOkGW
- * tpn4lIxYcVGM9CognhqgJpl11jFTQzn1KqZ+NEJRKkCHA4hDabKJbSC9fXHvRwrf
- * BsFpZqgiNxp3HseUTiwnaUVeyPgMt/jAj5nB5Sib+UyUxrECQQDnNQBiF2aifEg6
- * zbJOOC7he5CHAdkFxSxWVFVHL6EfXfqdLVkUohMbgZv+XxyIeU2biOExSg49Kds3
- * FOKgTau1AkEA0Bd1haj6QuCo8I0AXm2WO+MMTZMTvtHD/bGjKNM+fT4I8rKYnQRX
- * 1acHdqS9Xx2rNJqZgkMmpESIdPR2fc4yjwJALFeM6EMmqvj8/VIf5UJ/Mz14fXwM
- * PEARfckUxd9LnnFutCBTWlKvKXJVEZb6KO5ixPaegc57Jp3Vbh3yTN44lQJADD/1
- * SSMDaIB1MYP7a5Oj7m6VQNPRq8AJe5vDcRnOae0G9dKRrVyeFxO4GsHj6/+BHp2j
- * P8nYMn9eURQ7DXjf/QJAAQzMlWnKGSO8pyTDtnQx3hRMoUkOEhmNq4bQhLkYqtnY
- * FcqpUQ2qMjW+NiNWk5HnTrMS3L9EdJobMUzaNZLy4w==
- * -----END RSA PRIVATE KEY-----
*
- * Private-Key: (1024 bit)
+ * Private-Key: (2048 bit, 2 primes)
* modulus:
- * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69:
- * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f:
- * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7:
- * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21:
- * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41:
- * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10:
- * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9:
- * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba:
- * 75:8d:f5:82:ac:43:92:44:1b
+ * 00:cc:bf:92:3c:a6:57:74:1f:58:ad:c7:69:88:6f:
+ * 59:32:47:50:60:22:e4:98:49:0e:3e:1d:b8:ba:e2:
+ * 3b:b6:71:5b:fd:64:02:6d:0d:50:77:72:6e:a8:3d:
+ * 5d:d4:bd:1f:76:51:dc:9a:d0:d6:3e:d0:31:a5:24:
+ * 5a:2c:be:77:fa:88:a1:fa:06:41:c8:0f:47:70:47:
+ * 24:99:50:52:44:5b:30:62:5b:65:35:c4:28:b0:5c:
+ * ee:d0:1b:eb:39:2b:0b:a1:ac:96:48:da:56:6c:e0:
+ * e3:e6:e3:dd:45:cb:51:33:8d:40:43:d7:f0:a4:31:
+ * aa:b5:c0:df:4b:df:2b:0a:ed:7e:10:0c:ae:1f:96:
+ * a2:10:1e:6b:d0:f9:37:8b:df:0d:0e:02:35:f8:58:
+ * bc:6e:b5:57:0e:2f:ea:20:e6:73:9a:e5:6b:82:70:
+ * 25:bb:51:9a:7c:9d:e2:50:3d:cf:1e:24:3e:92:55:
+ * cf:2a:ad:0d:84:8f:a8:43:24:cd:ad:50:64:74:c2:
+ * 73:b6:e1:92:1c:b2:2b:8c:2d:7b:96:a6:41:61:5c:
+ * 1b:8f:78:28:51:40:ed:41:90:ce:1d:b8:26:81:47:
+ * 6b:e3:57:41:74:4e:20:f0:5a:1b:97:37:91:86:19:
+ * c5:f2:6d:04:c9:78:2b:5a:16:bc:fc:2b:71:5b:d0:
+ * 00:4f
* publicExponent: 65537 (0x10001)
* privateExponent:
- * 11:b7:6a:36:3d:30:37:ce:61:9d:6c:84:8b:f3:9b:
- * 25:4f:14:c8:a4:dd:2f:d7:9a:17:bd:90:19:f7:05:
- * fd:f2:d2:c5:f7:77:be:ea:e2:84:87:97:3a:41:96:
- * b6:99:f8:94:8c:58:71:51:8c:f4:2a:20:9e:1a:a0:
- * 26:99:75:d6:31:53:43:39:f5:2a:a6:7e:34:42:51:
- * 2a:40:87:03:88:43:69:b2:89:6d:20:bd:7d:71:ef:
- * 47:0a:df:06:c1:69:66:a8:22:37:1a:77:1e:c7:94:
- * 4e:2c:27:69:45:5e:c8:f8:0c:b7:f8:c0:8f:99:c1:
- * e5:28:9b:f9:4c:94:c6:b1
+ * 62:b2:d6:63:b6:2b:e2:26:5a:31:2b:37:8c:35:60:
+ * e2:03:ce:93:09:3e:f8:c9:fe:bb:a2:c8:32:0e:6c:
+ * 8a:7e:0a:c2:13:3b:b8:25:fa:ec:19:95:8e:34:46:
+ * cf:0e:7b:e4:25:82:1a:7f:21:48:16:44:58:3f:35:
+ * d8:eb:d8:1a:45:53:0f:9b:84:8a:54:13:33:e4:97:
+ * 97:f0:48:37:fb:5d:4f:8c:8f:35:63:e1:d9:62:73:
+ * 1c:8e:d8:cd:2e:1a:e5:4c:b5:05:59:7a:df:f1:68:
+ * eb:1c:5c:c6:10:44:8c:7d:42:c5:71:8a:e7:1b:aa:
+ * 17:03:6a:a0:c0:6b:97:50:17:ad:6e:5e:d9:db:6f:
+ * 3e:e9:3f:35:c3:45:bc:e8:3d:5a:b4:b9:3f:53:80:
+ * 64:dc:12:24:35:35:bd:98:bb:8d:fa:19:a3:5e:9e:
+ * ac:70:4a:fc:8d:ae:55:8b:71:81:0e:4d:c8:2f:87:
+ * b0:44:f7:4f:dc:a8:c8:50:b5:95:24:63:74:13:54:
+ * 58:de:fc:e0:75:eb:f4:06:58:83:12:4c:56:c4:c4:
+ * 18:0c:ea:a3:e7:25:a3:de:19:23:a2:5a:2a:b6:56:
+ * 04:bc:65:ba:7c:0a:f4:91:10:22:88:3f:9d:be:58:
+ * 43:4c:2e:ad:db:d6:32:cf:8e:b5:05:55:39:8b:e1:
+ * 01
* prime1:
- * 00:e7:35:00:62:17:66:a2:7c:48:3a:cd:b2:4e:38:
- * 2e:e1:7b:90:87:01:d9:05:c5:2c:56:54:55:47:2f:
- * a1:1f:5d:fa:9d:2d:59:14:a2:13:1b:81:9b:fe:5f:
- * 1c:88:79:4d:9b:88:e1:31:4a:0e:3d:29:db:37:14:
- * e2:a0:4d:ab:b5
+ * 00:f1:da:c2:8a:e5:66:45:8a:14:fc:08:6e:fb:aa:
+ * 50:d2:8c:b1:c4:f4:88:26:d4:b8:c4:63:30:ca:e3:
+ * 0c:6c:50:d4:93:5c:1c:13:37:60:21:11:3b:d1:f1:
+ * 9f:4c:0d:7b:0e:53:3d:c9:a4:fb:fa:6b:9e:b4:0a:
+ * 5d:d3:50:88:d7:be:c3:88:b2:b1:8a:6e:7b:d6:70:
+ * 88:96:a4:fe:90:ef:d1:84:ad:a8:9e:9f:3a:68:3f:
+ * 3f:82:07:be:c2:44:1e:d5:a1:a9:1a:db:39:d7:7f:
+ * 0c:6e:35:5b:1d:33:1b:a9:cd:38:2a:64:d1:70:2a:
+ * fe:b9:c2:b6:ed:59:19:73:b1
* prime2:
- * 00:d0:17:75:85:a8:fa:42:e0:a8:f0:8d:00:5e:6d:
- * 96:3b:e3:0c:4d:93:13:be:d1:c3:fd:b1:a3:28:d3:
- * 3e:7d:3e:08:f2:b2:98:9d:04:57:d5:a7:07:76:a4:
- * bd:5f:1d:ab:34:9a:99:82:43:26:a4:44:88:74:f4:
- * 76:7d:ce:32:8f
+ * 00:d8:b9:3a:38:6c:79:cd:0b:1f:2b:34:74:bf:7a:
+ * 3d:0c:21:5a:a6:ea:f2:9e:de:68:42:05:7f:ea:a5:
+ * 00:c9:10:f8:fd:c5:05:8d:03:45:5d:4f:6f:fa:6e:
+ * 9d:ef:ad:8a:ec:83:d4:ed:57:f3:86:73:15:2f:d2:
+ * 67:70:d1:62:ef:1d:25:08:59:47:20:62:47:16:35:
+ * e1:57:38:bf:39:dd:fc:b9:c8:d8:23:53:e2:02:7d:
+ * 22:31:4c:66:72:96:df:d8:7c:01:2c:71:00:89:18:
+ * e9:8c:08:44:8c:64:1f:93:9b:7a:97:26:c9:50:d0:
+ * 87:b2:48:a8:19:71:e1:b3:ff
* exponent1:
- * 2c:57:8c:e8:43:26:aa:f8:fc:fd:52:1f:e5:42:7f:
- * 33:3d:78:7d:7c:0c:3c:40:11:7d:c9:14:c5:df:4b:
- * 9e:71:6e:b4:20:53:5a:52:af:29:72:55:11:96:fa:
- * 28:ee:62:c4:f6:9e:81:ce:7b:26:9d:d5:6e:1d:f2:
- * 4c:de:38:95
+ * 23:98:dd:35:70:5a:43:35:f5:ac:ba:d9:0a:f5:a0:
+ * 7b:bc:f5:95:55:a0:8c:86:96:c3:61:0e:17:6e:9f:
+ * af:79:9e:30:2a:48:7f:93:90:f4:8d:02:ce:fd:cf:
+ * 42:74:61:7e:54:46:2d:dd:b8:b0:bd:12:58:d1:85:
+ * c9:ca:7a:b9:b6:7c:35:2c:87:f1:26:1d:d8:0c:2c:
+ * 2e:70:0e:7f:ea:ac:5d:e8:e9:7e:9f:55:0b:6e:f3:
+ * bc:01:c3:d3:f8:0e:c9:c6:c7:8b:0a:65:53:10:82:
+ * 15:de:88:90:9d:ab:1e:ac:f3:ed:59:75:72:1b:01:
+ * ee:f9:77:cf:2b:64:11:a1
* exponent2:
- * 0c:3f:f5:49:23:03:68:80:75:31:83:fb:6b:93:a3:
- * ee:6e:95:40:d3:d1:ab:c0:09:7b:9b:c3:71:19:ce:
- * 69:ed:06:f5:d2:91:ad:5c:9e:17:13:b8:1a:c1:e3:
- * eb:ff:81:1e:9d:a3:3f:c9:d8:32:7f:5e:51:14:3b:
- * 0d:78:df:fd
+ * 00:9e:29:6f:87:c6:02:8d:d5:54:05:df:de:63:ee:
+ * fd:a6:60:a1:1b:b7:d3:20:86:07:68:47:43:37:26:
+ * fc:0f:c0:c7:35:cc:17:64:f5:c2:25:7a:d7:a9:d8:
+ * 18:82:d6:0f:d0:d3:d5:0c:f1:66:d3:f4:20:be:29:
+ * bb:3b:e6:53:61:55:cf:b4:ec:12:b0:5b:88:ad:78:
+ * dc:df:1e:96:cf:d0:65:a3:e0:23:7c:84:b7:28:41:
+ * d2:36:50:1f:63:f9:1f:9b:89:c4:01:7e:e6:79:27:
+ * 29:29:fc:ce:a9:f6:57:e5:0d:4e:c6:08:94:5a:da:
+ * 14:6d:d4:00:79:b1:56:9a:59
* coefficient:
- * 01:0c:cc:95:69:ca:19:23:bc:a7:24:c3:b6:74:31:
- * de:14:4c:a1:49:0e:12:19:8d:ab:86:d0:84:b9:18:
- * aa:d9:d8:15:ca:a9:51:0d:aa:32:35:be:36:23:56:
- * 93:91:e7:4e:b3:12:dc:bf:44:74:9a:1b:31:4c:da:
- * 35:92:f2:e3
+ * 6c:73:0d:fe:c7:22:15:5d:8c:a1:91:2b:d1:88:e8:
+ * 91:f9:d0:3e:d0:ba:c4:74:88:ce:14:20:4e:1e:4b:
+ * c5:91:8f:c1:56:e9:74:e0:f6:cf:71:91:ed:2c:f5:
+ * 90:9d:d6:c8:cd:f5:79:dc:6e:b3:83:3e:fa:d6:b4:
+ * 60:d9:3a:52:12:76:9d:92:fb:db:26:ee:43:33:c4:
+ * 0b:84:74:1b:91:e0:41:8b:cc:cc:24:da:52:af:2d:
+ * 42:e7:11:57:0d:aa:66:af:1a:ba:c2:8e:6a:ee:8f:
+ * 2c:e6:5b:76:38:96:bb:7a:2f:59:fe:de:a1:02:fc:
+ * 12:3a:aa:9f:3c:0e:a4:78
+ * writing RSA key
+ * -----BEGIN PRIVATE KEY-----
+ * MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDMv5I8pld0H1it
+ * x2mIb1kyR1BgIuSYSQ4+Hbi64ju2cVv9ZAJtDVB3cm6oPV3UvR92Udya0NY+0DGl
+ * JFosvnf6iKH6BkHID0dwRySZUFJEWzBiW2U1xCiwXO7QG+s5KwuhrJZI2lZs4OPm
+ * 491Fy1EzjUBD1/CkMaq1wN9L3ysK7X4QDK4flqIQHmvQ+TeL3w0OAjX4WLxutVcO
+ * L+og5nOa5WuCcCW7UZp8neJQPc8eJD6SVc8qrQ2Ej6hDJM2tUGR0wnO24ZIcsiuM
+ * LXuWpkFhXBuPeChRQO1BkM4duCaBR2vjV0F0TiDwWhuXN5GGGcXybQTJeCtaFrz8
+ * K3Fb0ABPAgMBAAECggEAYrLWY7Yr4iZaMSs3jDVg4gPOkwk++Mn+u6LIMg5sin4K
+ * whM7uCX67BmVjjRGzw575CWCGn8hSBZEWD812OvYGkVTD5uEilQTM+SXl/BIN/td
+ * T4yPNWPh2WJzHI7YzS4a5Uy1BVl63/Fo6x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R0G5HgQYvMzCTaUq8tQucRVw2qZq8ausKOau6PLOZbdjiW
+ * u3ovWf7eoQL8EjqqnzwOpHg=
+ * -----END PRIVATE KEY-----
*
* client certificate:
- * Data:
- * Version: 3 (0x2)
- * Serial Number: 9 (0x9)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 03:43:24 2008 GMT
- * Not After : Aug 25 03:43:24 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Client, CN=localhost
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69:
- * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f:
- * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7:
- * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21:
- * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41:
- * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10:
- * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9:
- * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba:
- * 75:8d:f5:82:ac:43:92:44:1b
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Basic Constraints:
- * CA:FALSE
- * X509v3 Key Usage:
- * Digital Signature, Non Repudiation, Key Encipherment
- * X509v3 Subject Key Identifier:
- * CD:BB:C8:85:AA:91:BD:FD:1D:BE:CD:67:7C:FF:B3:E9:4C:A8:22:E6
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- *
- * X509v3 Subject Alternative Name: critical
- * DNS:localhost
- * Signature Algorithm: md5WithRSAEncryption
- *
+ * Data:
+ * Version: 3 (0x2)
+ * Serial Number: 1500699355 (0x5972dadb)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:52 2024 GMT
+ * Not After : Jul 2 04:16:52 2034 GMT
+ * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, CN=localhost ou=SSL-Client
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:cc:bf:92:3c:a6:57:74:1f:58:ad:c7:69:88:6f:
+ * 59:32:47:50:60:22:e4:98:49:0e:3e:1d:b8:ba:e2:
+ * 3b:b6:71:5b:fd:64:02:6d:0d:50:77:72:6e:a8:3d:
+ * 5d:d4:bd:1f:76:51:dc:9a:d0:d6:3e:d0:31:a5:24:
+ * 5a:2c:be:77:fa:88:a1:fa:06:41:c8:0f:47:70:47:
+ * 24:99:50:52:44:5b:30:62:5b:65:35:c4:28:b0:5c:
+ * ee:d0:1b:eb:39:2b:0b:a1:ac:96:48:da:56:6c:e0:
+ * e3:e6:e3:dd:45:cb:51:33:8d:40:43:d7:f0:a4:31:
+ * aa:b5:c0:df:4b:df:2b:0a:ed:7e:10:0c:ae:1f:96:
+ * a2:10:1e:6b:d0:f9:37:8b:df:0d:0e:02:35:f8:58:
+ * bc:6e:b5:57:0e:2f:ea:20:e6:73:9a:e5:6b:82:70:
+ * 25:bb:51:9a:7c:9d:e2:50:3d:cf:1e:24:3e:92:55:
+ * cf:2a:ad:0d:84:8f:a8:43:24:cd:ad:50:64:74:c2:
+ * 73:b6:e1:92:1c:b2:2b:8c:2d:7b:96:a6:41:61:5c:
+ * 1b:8f:78:28:51:40:ed:41:90:ce:1d:b8:26:81:47:
+ * 6b:e3:57:41:74:4e:20:f0:5a:1b:97:37:91:86:19:
+ * c5:f2:6d:04:c9:78:2b:5a:16:bc:fc:2b:71:5b:d0:
+ * 00:4f
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * CD:45:E2:05:92:88:A3:C7:49:28:E7:D3:37:B7:13:92:FB:B1:36:C4
+ * X509v3 Key Usage:
+ * Digital Signature, Non Repudiation, Key Encipherment
+ * X509v3 Subject Alternative Name: critical
+ * DNS:localhost
+ * X509v3 Basic Constraints:
+ * CA:FALSE
+ * X509v3 Authority Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 23:6e:e9:5d:80:0d:b3:86:c9:cd:17:81:33:bd:5b:aa:c0:65:
+ * 4c:6b:9f:fa:ee:32:e9:89:e1:d0:c7:1d:5c:43:7e:94:ac:83:
+ * af:91:90:4c:26:61:8d:fe:6b:1a:aa:6e:61:39:b3:24:4a:dc:
+ * 92:c8:ca:f2:80:b0:05:41:0c:b3:dd:ed:b7:81:42:9a:1e:4e:
+ * f2:80:6c:72:62:8b:bd:d4:cd:23:7d:7c:e8:6f:e3:67:89:6a:
+ * 79:19:dd:f6:57:62:12:fa:eb:cd:66:c3:d2:d8:40:5a:1c:dd:
+ * 7f:9f:b2:34:e9:2a:d6:14:52:ba:6e:a8:9b:0d:a9:a1:03:bf:
+ * c4:0d:92:3d:59:e4:a9:8e:20:41:39:99:81:70:9d:d0:68:98:
+ * fc:5f:49:4a:92:e5:a2:c1:51:61:f6:1e:49:56:0b:b6:8c:57:
+ * db:08:2a:f0:a3:04:dc:a1:04:a2:5c:d0:90:4f:13:8d:1c:e6:
+ * 2e:7a:63:9c:32:40:65:59:04:5d:71:90:5a:a8:db:6a:30:42:
+ * 57:5b:0b:df:ce:a1:1f:fa:23:71:f3:57:12:c4:1c:66:3b:37:
+ * 77:32:28:a7:fb:ad:ee:86:51:4c:80:2f:dd:c8:5b:9f:a7:15:
+ * 07:fa:2b:5a:ee:93:00:5f:a6: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NOkq1hRSum6omw2poQO/xA2SPVnkqY4g
+ * QTmZgXCd0GiY/F9JSpLlosFRYfYeSVYLtoxX2wgq8KME3KEEolzQkE8TjRzmLnpj
+ * nDJAZVkEXXGQWqjbajBCV1sL386hH/ojcfNXEsQcZjs3dzIop/ut7oZRTIAv3chb
+ * n6cVB/orWu6TAF+mQyIbQFIVZgGEMp5xIQ==
* -----END CERTIFICATE-----
*
*
- *
* Trusted CA certificate:
* Certificate:
* Data:
- * Version: 3 (0x2)
- * Serial Number: 0 (0x0)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 02:43:36 2008 GMT
- * Not After : Aug 25 02:43:36 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:cb:c4:38:20:07:be:88:a7:93:b0:a1:43:51:2d:
- * d7:8e:85:af:54:dd:ad:a2:7b:23:5b:cf:99:13:53:
- * 99:45:7d:ee:6d:ba:2d:bf:e3:ad:6e:3d:9f:1a:f9:
- * 03:97:e0:17:55:ae:11:26:57:de:01:29:8e:05:3f:
- * 21:f7:e7:36:e8:2e:37:d7:48:ac:53:d6:60:0e:c7:
- * 50:6d:f6:c5:85:f7:8b:a6:c5:91:35:72:3c:94:ee:
- * f1:17:f0:71:e3:ec:1b:ce:ca:4e:40:42:b0:6d:ee:
- * 6a:0e:d6:e5:ad:3c:0f:c9:ba:82:4f:78:f8:89:97:
- * 89:2a:95:12:4c:d8:09:2a:e9
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Subject Key Identifier:
- * FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- * DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org
- * serial:00
- *
- * X509v3 Basic Constraints:
- * CA:TRUE
- * Signature Algorithm: md5WithRSAEncryption
- *
+ * Version: 3 (0x2)
+ * Serial Number: 1539881479 (0x5bc8ba07)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:50 2024 GMT
+ * Not After : Jul 2 04:16:50 2034 GMT
+ * Subject: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:bc:a6:55:60:3f:17:74:39:ba:71:8c:ef:11:3f:
+ * 9d:36:47:d5:02:d1:4d:9d:7e:b8:fe:59:b1:2b:f1:
+ * b7:b0:0c:31:57:eb:9c:9d:13:f5:4c:5f:fc:c4:9e:
+ * f9:75:09:0f:96:8f:05:77:30:a8:35:48:71:96:e4:
+ * a5:7d:1a:81:fb:e6:bf:90:80:60:5d:11:20:54:16:
+ * 0b:6d:df:64:de:18:d5:98:51:38:9d:c9:d6:5f:de:
+ * 9d:de:fe:a8:5f:d3:25:3d:ad:f3:2b:45:c8:4a:80:
+ * 97:14:7b:85:9d:cf:59:08:bb:c7:67:ac:8b:29:f3:
+ * 1e:93:bf:fb:82:53:c5:ae:b4:bc:55:30:15:a8:7e:
+ * 3f:82:22:59:43:cc:d2:62:e7:65:67:72:ec:10:8a:
+ * fc:05:90:91:72:dd:e9:6f:e2:9f:0c:ab:a1:83:55:
+ * 02:23:b7:a3:c3:50:ab:be:0b:bb:51:75:50:d1:a8:
+ * c9:e5:f5:06:fe:00:09:a6:1b:8a:16:29:0d:ab:00:
+ * 3e:bc:d2:73:d9:37:d7:d9:9a:58:6e:2d:2a:f6:76:
+ * ae:f4:ea:6d:70:de:7f:e3:04:43:c0:4f:91:3f:78:
+ * 58:d7:c2:ad:74:eb:04:9d:d0:7e:82:b8:7a:97:44:
+ * 61:fa:41:45:a6:ca:7d:a5:2e:fc:f9:a6:cf:61:cd:
+ * 75:bf
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * X509v3 Basic Constraints: critical
+ * CA:TRUE
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 1f:89:34:e3:ee:05:33:3b:18:ca:96:13:3d:ad:cd:5a:e6:24:
+ * 46:94:36:ad:37:a5:36:a9:92:37:f9:ed:07:dd:44:5b:c9:2e:
+ * 68:f7:82:f3:58:1c:64:ed:64:d0:ad:eb:30:15:e0:04:3a:d7:
+ * c8:c7:9d:65:76:ae:84:e4:2e:2d:0d:68:09:0d:e5:ae:cc:a7:
+ * 54:86:ad:ff:00:95:85:01:49:db:5b:8e:c2:6f:e7:19:10:17:
+ * f7:03:b9:a8:97:21:a2:fc:7f:c0:e0:7a:12:64:b8:70:f5:e8:
+ * b6:e1:25:f7:eb:32:3e:46:ce:43:55:fc:0b:62:59:90:61:63:
+ * f9:94:6c:95:63:31:1b:00:59:1f:72:9d:d0:0b:4f:cd:02:eb:
+ * de:20:4e:60:48:4e:ea:ad:3c:0f:1d:bf:1a:69:3d:a8:3d:8b:
+ * f5:a2:ae:8c:4f:d7:0e:b3:e1:9b:b3:2c:89:19:18:da:db:e1:
+ * 6d:d5:ab:c8:b8:48:57:d8:8b:33:01:d4:97:91:d9:da:34:a1:
+ * ef:36:00:e1:38:19:34:8f:0d:47:af:57:cf:59:d6:8b:0d:9e:
+ * 89:05:82:3d:3c:f3:45:1d:4a:3f:0e:0f:5a:28:6f:5c:e1:e9:
+ * 60:72:87:28:b6:97:44:8b:d7:c6:cd:cb:dc:5a:5d:60:f1:b4:
+ * 37:ee:44:db
* -----BEGIN CERTIFICATE-----
- * MIICrDCCAhWgAwIBAgI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HKLaXRIvXxs3L3FpdYPG0N+5E2w==
+ *
*/
@@ -427,201 +568,342 @@ public class PKIXExtendedTM {
*/
static String trusedCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
- "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
- "EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ\n" +
- "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
- "dHkxETAPBgNVBAoTCFNvbWUtT3JnMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKB\n" +
- "gQDLxDggB76Ip5OwoUNRLdeOha9U3a2ieyNbz5kTU5lFfe5tui2/461uPZ8a+QOX\n" +
- "4BdVrhEmV94BKY4FPyH35zboLjfXSKxT1mAOx1Bt9sWF94umxZE1cjyU7vEX8HHj\n" +
- "7BvOyk5AQrBt7moO1uWtPA/JuoJPePiJl4kqlRJM2Akq6QIDAQABo4GjMIGgMB0G\n" +
- "A1UdDgQWBBT6uVG/TOfZhpgz+efLHvEzSfeoFDBxBgNVHSMEajBogBT6uVG/TOfZ\n" +
- "hpgz+efLHvEzSfeoFKFNpEswSTELMAkGA1UEBhMCVVMxEzARBgNVBAgTClNvbWUt\n" +
- "U3RhdGUxEjAQBgNVBAcTCVNvbWUtQ2l0eTERMA8GA1UEChMIU29tZS1PcmeCAQAw\n" +
- "DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQBcIm534U123Hz+rtyYO5uA\n" +
- "ofd81G6FnTfEAV8Kw9fGyyEbQZclBv34A9JsFKeMvU4OFIaixD7nLZ/NZ+IWbhmZ\n" +
- "LovmJXyCkOufea73pNiZ+f/4/ScZaIlM/PRycQSq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+ "XQMVdmNscSE+mM0CAwEAAaNzMHEwHQYDVR0OBBYEFFyvRLFIuFmaZFOdLqayCdMK\n" +
+ "kgSDMAsGA1UdDwQEAwIF4DAXBgNVHREBAf8EDTALgglsb2NhbGhvc3QwCQYDVR0T\n" +
+ "BAIwADAfBgNVHSMEGDAWgBTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B\n" +
+ "AQUFAAOCAQEAnSJJX1Yj5oA1zKtEHCe9yY2Jk0lY6MF6aN3PveASdgZUzS9im1SE\n" +
+ "8ruQoLs34hMd899BquD+wO9GeI2q9BtwrakWJPoVSsYKjeGZkwCp1LYIXY5lA9zQ\n" +
+ "lfyVYaattatNpuAFSIzbQkKK1l7AKqARFbgHaVw/maC9U2XbTs9GYZMJe4FA/1z+\n" +
+ "TOv0rN4fOK2yYCj2Dp9G5wePIJqk4Y+rVJl2gtiecMTamIVxrztU5AG0noPQe8aN\n" +
+ "H+0lCIkF6YeXdlqjhcP4Wde7O1rby+1d/6whuZriZQq83tHcU5SYRJeRsxtrgAub\n" +
+ "V7OuXHw1yjlx906PStfrCyXash4XSLjrCQ==\n" +
"-----END CERTIFICATE-----";
static String clientCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICpDCCAg2gAwIBAgIBCTANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
- "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
- "EwhTb21lLU9yZzAeFw0wODEyMDgwMzQzMjRaFw0yODA4MjUwMzQzMjRaMHIxCzAJ\n" +
- "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
- "dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtQ2xpZW50MRIwEAYD\n" +
- "VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQ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UGAi5JhJDj4duLriO7ZxW/1kAm0NUHdybqg9XdS9H3ZR3JrQ\n" +
+ "1j7QMaUkWiy+d/qIofoGQcgPR3BHJJlQUkRbMGJbZTXEKLBc7tAb6zkrC6Gslkja\n" +
+ "Vmzg4+bj3UXLUTONQEPX8KQxqrXA30vfKwrtfhAMrh+WohAea9D5N4vfDQ4CNfhY\n" +
+ "vG61Vw4v6iDmc5rla4JwJbtRmnyd4lA9zx4kPpJVzyqtDYSPqEMkza1QZHTCc7bh\n" +
+ "khyyK4wte5amQWFcG494KFFA7UGQzh24JoFHa+NXQXROIPBaG5c3kYYZxfJtBMl4\n" +
+ "K1oWvPwrcVvQAE8CAwEAAaNzMHEwHQYDVR0OBBYEFM1F4gWSiKPHSSjn0ze3E5L7\n" +
+ "sTbEMAsGA1UdDwQEAwIF4DAXBgNVHREBAf8EDTALgglsb2NhbGhvc3QwCQYDVR0T\n" +
+ "BAIwADAfBgNVHSMEGDAWgBTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B\n" +
+ "AQUFAAOCAQEAI27pXYANs4bJzReBM71bqsBlTGuf+u4y6Ynh0McdXEN+lKyDr5GQ\n" +
+ "TCZhjf5rGqpuYTmzJErcksjK8oCwBUEMs93tt4FCmh5O8oBscmKLvdTNI3186G/j\n" +
+ "Z4lqeRnd9ldiEvrrzWbD0thAWhzdf5+yNOkq1hRSum6omw2poQO/xA2SPVnkqY4g\n" +
+ "QTmZgXCd0GiY/F9JSpLlosFRYfYeSVYLtoxX2wgq8KME3KEEolzQkE8TjRzmLnpj\n" +
+ "nDJAZVkEXXGQWqjbajBCV1sL386hH/ojcfNXEsQcZjs3dzIop/ut7oZRTIAv3chb\n" +
+ "n6cVB/orWu6TAF+mQyIbQFIVZgGEMp5xIQ==\n" +
"-----END CERTIFICATE-----";
static byte serverPrivateExponent[] = {
- (byte)0x6e, (byte)0xa7, (byte)0x1b, (byte)0x83,
- (byte)0x51, (byte)0x35, (byte)0x9a, (byte)0x44,
- (byte)0x7d, (byte)0xf6, (byte)0xe3, (byte)0x89,
- (byte)0xa0, (byte)0xd7, (byte)0x90, (byte)0x60,
- (byte)0xa1, (byte)0x4e, (byte)0x27, (byte)0x21,
- (byte)0xa2, (byte)0x89, (byte)0x74, (byte)0xcc,
- (byte)0x9d, (byte)0x75, (byte)0x75, (byte)0x4e,
- (byte)0xc7, (byte)0x82, (byte)0xe3, (byte)0xe3,
- (byte)0xc3, (byte)0x7d, (byte)0x00, (byte)0x54,
- (byte)0xec, (byte)0x36, (byte)0xb1, (byte)0xdf,
- (byte)0x91, (byte)0x9c, (byte)0x7a, (byte)0xc0,
- (byte)0x62, (byte)0x0a, (byte)0xd6, (byte)0xa9,
- (byte)0x22, (byte)0x91, (byte)0x4a, (byte)0x29,
- (byte)0x2e, (byte)0x43, (byte)0xfa, (byte)0x8c,
- (byte)0xd8, (byte)0xe9, (byte)0xbe, (byte)0xd9,
- (byte)0x4f, (byte)0xca, (byte)0x23, (byte)0xc6,
- (byte)0xe4, (byte)0x3f, (byte)0xb8, (byte)0x72,
- (byte)0xcf, (byte)0x02, (byte)0xfc, (byte)0xf4,
- (byte)0x58, (byte)0x34, (byte)0x77, (byte)0x76,
- (byte)0xce, (byte)0x22, (byte)0x44, (byte)0x5f,
- (byte)0x2d, (byte)0xca, (byte)0xee, (byte)0xf5,
- (byte)0x43, (byte)0x56, (byte)0x47, (byte)0x71,
- (byte)0x0b, (byte)0x09, (byte)0x6b, (byte)0x5e,
- (byte)0xf2, (byte)0xc8, (byte)0xee, (byte)0xd4,
- (byte)0x6e, (byte)0x44, (byte)0x92, (byte)0x2a,
- (byte)0x7f, (byte)0xcc, (byte)0xa7, (byte)0xd4,
- (byte)0x5b, (byte)0xfb, (byte)0xf7, (byte)0x4a,
- (byte)0xa9, (byte)0xfb, (byte)0x54, (byte)0x18,
- (byte)0xd5, (byte)0xd5, (byte)0x14, (byte)0xba,
- (byte)0xa0, (byte)0x1c, (byte)0x13, (byte)0xb3,
- (byte)0x37, (byte)0x6b, (byte)0x37, (byte)0x59,
- (byte)0xed, (byte)0xdb, (byte)0x6d, (byte)0xb1
+ (byte)0x68, (byte)0x87, (byte)0x36, (byte)0x54,
+ (byte)0xa3, (byte)0xc6, (byte)0xd5, (byte)0x5f,
+ (byte)0xf5, (byte)0x0f, (byte)0x4f, (byte)0x76,
+ (byte)0xc8, (byte)0x9c, (byte)0x2b, (byte)0x5b,
+ (byte)0xdc, (byte)0xe2, (byte)0xbe, (byte)0x14,
+ (byte)0x12, (byte)0x2f, (byte)0xc7, (byte)0x0a,
+ (byte)0xa9, (byte)0xcb, (byte)0x5e, (byte)0x04,
+ (byte)0x59, (byte)0xca, (byte)0x35, (byte)0x2f,
+ (byte)0x8d, (byte)0x2b, (byte)0xc4, (byte)0x40,
+ (byte)0xe6, (byte)0x7d, (byte)0x25, (byte)0x1b,
+ (byte)0x4d, (byte)0x07, (byte)0xc3, (byte)0x99,
+ (byte)0x9c, (byte)0x16, (byte)0x4f, (byte)0xa5,
+ (byte)0xdc, (byte)0xde, (byte)0xb0, (byte)0x90,
+ (byte)0xf0, (byte)0xde, (byte)0x22, (byte)0x70,
+ (byte)0x80, (byte)0xf4, (byte)0xa6, (byte)0x70,
+ (byte)0xe2, (byte)0x96, (byte)0x3d, (byte)0x18,
+ (byte)0x21, (byte)0xbf, (byte)0x2b, (byte)0x27,
+ (byte)0xa4, (byte)0x2d, (byte)0xd7, (byte)0xae,
+ (byte)0x2b, (byte)0x12, (byte)0x2f, (byte)0x08,
+ (byte)0x36, (byte)0xee, (byte)0x99, (byte)0x94,
+ (byte)0xed, (byte)0xf6, (byte)0xa7, (byte)0xd9,
+ (byte)0x1d, (byte)0xa2, (byte)0xf3, (byte)0x1f,
+ (byte)0x44, (byte)0xa4, (byte)0x28, (byte)0x4b,
+ (byte)0x67, (byte)0x35, (byte)0xd6, (byte)0xa8,
+ (byte)0x1b, (byte)0xf8, (byte)0x84, (byte)0x34,
+ (byte)0x34, (byte)0x84, (byte)0xbd, (byte)0xec,
+ (byte)0x9e, (byte)0x03, (byte)0x08, (byte)0x3c,
+ (byte)0x93, (byte)0x20, (byte)0x8e, (byte)0xaf,
+ (byte)0x15, (byte)0xcb, (byte)0x1f, (byte)0x20,
+ (byte)0x08, (byte)0x97, (byte)0xc4, (byte)0x19,
+ (byte)0x3e, (byte)0xfa, (byte)0x36, (byte)0xc6,
+ (byte)0xab, (byte)0x0e, (byte)0x2f, (byte)0xe7,
+ (byte)0xb3, (byte)0xc0, (byte)0xa7, (byte)0xbc,
+ (byte)0xe4, (byte)0xe0, (byte)0xa6, (byte)0x08,
+ (byte)0x1c, (byte)0x69, (byte)0x20, (byte)0x4d,
+ (byte)0x78, (byte)0xbd, (byte)0x7a, (byte)0xe5,
+ (byte)0x25, (byte)0x48, (byte)0x60, (byte)0x9e,
+ (byte)0x2e, (byte)0x50, (byte)0x8d, (byte)0x36,
+ (byte)0x1e, (byte)0x07, (byte)0xe9, (byte)0xd5,
+ (byte)0x0d, (byte)0x39, (byte)0x67, (byte)0x41,
+ (byte)0x42, (byte)0x24, (byte)0xdb, (byte)0x87,
+ (byte)0xe5, (byte)0x77, (byte)0x76, (byte)0xfd,
+ (byte)0x5e, (byte)0xd5, (byte)0xc6, (byte)0xe5,
+ (byte)0xd3, (byte)0xb0, (byte)0x98, (byte)0x71,
+ (byte)0x48, (byte)0x69, (byte)0x47, (byte)0x4f,
+ (byte)0x46, (byte)0x05, (byte)0x0c, (byte)0x9e,
+ (byte)0x58, (byte)0x45, (byte)0x2e, (byte)0xe2,
+ (byte)0x27, (byte)0xd0, (byte)0xf6, (byte)0x11,
+ (byte)0x05, (byte)0x78, (byte)0xad, (byte)0x83,
+ (byte)0x5a, (byte)0x5b, (byte)0xec, (byte)0xd7,
+ (byte)0x2e, (byte)0x26, (byte)0x5a, (byte)0xa5,
+ (byte)0x4f, (byte)0x9e, (byte)0x52, (byte)0x84,
+ (byte)0x2c, (byte)0x1f, (byte)0x59, (byte)0x1a,
+ (byte)0x78, (byte)0x56, (byte)0x0a, (byte)0x44,
+ (byte)0x54, (byte)0xc6, (byte)0x37, (byte)0x64,
+ (byte)0x01, (byte)0xca, (byte)0xe4, (byte)0xa8,
+ (byte)0x01, (byte)0xc7, (byte)0x86, (byte)0xc1,
+ (byte)0xb4, (byte)0xd6, (byte)0x6c, (byte)0x7a,
+ (byte)0x15, (byte)0x9a, (byte)0x65, (byte)0x69,
+ (byte)0x46, (byte)0x9e, (byte)0xfd, (byte)0xf6,
+ (byte)0x08, (byte)0x17, (byte)0x0c, (byte)0x6c,
+ (byte)0xac, (byte)0x38, (byte)0xbd, (byte)0xc2,
+ (byte)0xcd, (byte)0xda, (byte)0xef, (byte)0x54,
+ (byte)0x7a, (byte)0x48, (byte)0x92, (byte)0x4d
};
static byte serverModulus[] = {
- (byte)0x00,
- (byte)0xa5, (byte)0xac, (byte)0x5b, (byte)0x1c,
- (byte)0x37, (byte)0xa2, (byte)0xdd, (byte)0x99,
- (byte)0x89, (byte)0x2d, (byte)0xb2, (byte)0x79,
- (byte)0xb8, (byte)0x8f, (byte)0xd5, (byte)0x48,
- (byte)0xa5, (byte)0xe7, (byte)0x1c, (byte)0x84,
- (byte)0x17, (byte)0x8d, (byte)0x69, (byte)0x9c,
- (byte)0xc6, (byte)0xac, (byte)0x6d, (byte)0xf9,
- (byte)0xf2, (byte)0x1d, (byte)0x1f, (byte)0x39,
- (byte)0x19, (byte)0xda, (byte)0xd3, (byte)0x72,
- (byte)0x1e, (byte)0x6e, (byte)0xec, (byte)0x44,
- (byte)0xcc, (byte)0x70, (byte)0xa4, (byte)0xdc,
- (byte)0xba, (byte)0x00, (byte)0x30, (byte)0xf6,
- (byte)0xa0, (byte)0x4f, (byte)0x3d, (byte)0x54,
- (byte)0x7a, (byte)0x61, (byte)0x6a, (byte)0xcc,
- (byte)0x57, (byte)0xd0, (byte)0x0a, (byte)0x7f,
- (byte)0x95, (byte)0x28, (byte)0x18, (byte)0x3f,
- (byte)0x9a, (byte)0xd9, (byte)0x94, (byte)0xf2,
- (byte)0x1b, (byte)0xc8, (byte)0x24, (byte)0x88,
- (byte)0x7e, (byte)0xfe, (byte)0x9d, (byte)0x0f,
- (byte)0x3d, (byte)0xfb, (byte)0x57, (byte)0x53,
- (byte)0x08, (byte)0xb3, (byte)0x20, (byte)0x33,
- (byte)0xd4, (byte)0x3f, (byte)0x17, (byte)0x47,
- (byte)0x14, (byte)0xd1, (byte)0xcd, (byte)0xea,
- (byte)0x08, (byte)0xd8, (byte)0x0e, (byte)0x75,
- (byte)0x4e, (byte)0xaf, (byte)0xbe, (byte)0xcc,
- (byte)0xd2, (byte)0xec, (byte)0xaf, (byte)0xa9,
- (byte)0x7a, (byte)0x49, (byte)0xdf, (byte)0xc2,
- (byte)0xd9, (byte)0xac, (byte)0xb8, (byte)0x24,
- (byte)0x40, (byte)0x90, (byte)0xa6, (byte)0x03,
- (byte)0x56, (byte)0x2a, (byte)0xd0, (byte)0x30,
- (byte)0x05, (byte)0x40, (byte)0x2c, (byte)0x4f,
- (byte)0xab, (byte)0xd9, (byte)0x74, (byte)0x89
+ (byte)0x00, (byte)0x9a, (byte)0x0c, (byte)0xe0,
+ (byte)0x8f, (byte)0xa8, (byte)0x02, (byte)0x7e,
+ (byte)0x5a, (byte)0xef, (byte)0xed, (byte)0xb2,
+ (byte)0x42, (byte)0xad, (byte)0x08, (byte)0x4e,
+ (byte)0x91, (byte)0xba, (byte)0xc2, (byte)0xad,
+ (byte)0x9b, (byte)0x79, (byte)0xd7, (byte)0x9b,
+ (byte)0x0f, (byte)0xfd, (byte)0xd2, (byte)0xf8,
+ (byte)0x15, (byte)0x2f, (byte)0x19, (byte)0x89,
+ (byte)0x80, (byte)0x10, (byte)0x00, (byte)0x02,
+ (byte)0x19, (byte)0x6d, (byte)0x27, (byte)0xc2,
+ (byte)0x90, (byte)0xd7, (byte)0xa5, (byte)0x23,
+ (byte)0x53, (byte)0x74, (byte)0x6e, (byte)0x64,
+ (byte)0x28, (byte)0x7c, (byte)0x24, (byte)0xaa,
+ (byte)0xed, (byte)0xea, (byte)0x21, (byte)0x59,
+ (byte)0xdc, (byte)0xa3, (byte)0x5c, (byte)0xb5,
+ (byte)0xc9, (byte)0x42, (byte)0x31, (byte)0x4f,
+ (byte)0xa2, (byte)0xde, (byte)0xfb, (byte)0x09,
+ (byte)0x7c, (byte)0x73, (byte)0xed, (byte)0x88,
+ (byte)0x04, (byte)0x34, (byte)0xf1, (byte)0x15,
+ (byte)0xad, (byte)0x3d, (byte)0x60, (byte)0xcd,
+ (byte)0xca, (byte)0xc5, (byte)0x13, (byte)0x99,
+ (byte)0xd3, (byte)0x9f, (byte)0x9b, (byte)0xb2,
+ (byte)0x92, (byte)0x70, (byte)0xcb, (byte)0xba,
+ (byte)0x4b, (byte)0x3d, (byte)0x20, (byte)0x96,
+ (byte)0xad, (byte)0xbe, (byte)0x92, (byte)0x53,
+ (byte)0xed, (byte)0x54, (byte)0x3b, (byte)0xc5,
+ (byte)0x14, (byte)0xbd, (byte)0xcf, (byte)0xd4,
+ (byte)0x0f, (byte)0xcb, (byte)0x05, (byte)0x4f,
+ (byte)0xfd, (byte)0x2b, (byte)0x9e, (byte)0xe0,
+ (byte)0x50, (byte)0xbb, (byte)0x65, (byte)0x13,
+ (byte)0x92, (byte)0xc0, (byte)0xd6, (byte)0xbd,
+ (byte)0x4d, (byte)0x02, (byte)0x0c, (byte)0x70,
+ (byte)0xb6, (byte)0x65, (byte)0xd4, (byte)0x7d,
+ (byte)0xb4, (byte)0x4d, (byte)0xc3, (byte)0xdf,
+ (byte)0x2c, (byte)0x08, (byte)0x9e, (byte)0xd2,
+ (byte)0x3e, (byte)0x69, (byte)0x32, (byte)0x46,
+ (byte)0x6f, (byte)0x6f, (byte)0xca, (byte)0xd1,
+ (byte)0x73, (byte)0xa4, (byte)0x94, (byte)0x07,
+ (byte)0xef, (byte)0x14, (byte)0xe3, (byte)0xda,
+ (byte)0x9e, (byte)0x2f, (byte)0xc0, (byte)0xac,
+ (byte)0x0e, (byte)0x10, (byte)0x33, (byte)0x4c,
+ (byte)0x68, (byte)0x79, (byte)0xf3, (byte)0x79,
+ (byte)0x40, (byte)0xd6, (byte)0xe9, (byte)0x3c,
+ (byte)0xc2, (byte)0xe6, (byte)0x70, (byte)0xe0,
+ (byte)0x89, (byte)0xce, (byte)0xa0, (byte)0x7a,
+ (byte)0xa8, (byte)0x84, (byte)0x28, (byte)0x85,
+ (byte)0x32, (byte)0x37, (byte)0x08, (byte)0xb0,
+ (byte)0xcf, (byte)0xb1, (byte)0x7f, (byte)0x5f,
+ (byte)0xbc, (byte)0x1f, (byte)0xa5, (byte)0x3d,
+ (byte)0xef, (byte)0xd6, (byte)0x68, (byte)0xa8,
+ (byte)0x17, (byte)0x21, (byte)0x5f, (byte)0x87,
+ (byte)0xd5, (byte)0x4b, (byte)0xb5, (byte)0xcc,
+ (byte)0xee, (byte)0x78, (byte)0x8d, (byte)0xdd,
+ (byte)0xb1, (byte)0x28, (byte)0x6a, (byte)0xc0,
+ (byte)0xfb, (byte)0x64, (byte)0xbd, (byte)0xb7,
+ (byte)0x70, (byte)0x02, (byte)0x33, (byte)0x03,
+ (byte)0x0b, (byte)0xb8, (byte)0xb8, (byte)0xbb,
+ (byte)0x08, (byte)0x82, (byte)0xf6, (byte)0x8e,
+ (byte)0x05, (byte)0x27, (byte)0xd1, (byte)0x3b,
+ (byte)0xe6, (byte)0xc5, (byte)0xac, (byte)0x4d,
+ (byte)0x85, (byte)0x5b, (byte)0xa1, (byte)0x1d,
+ (byte)0xa3, (byte)0x48, (byte)0x5d, (byte)0x03,
+ (byte)0x15, (byte)0x76, (byte)0x63, (byte)0x6c,
+ (byte)0x71, (byte)0x21, (byte)0x3e, (byte)0x98,
+ (byte)0xcd
};
static byte clientPrivateExponent[] = {
- (byte)0x11, (byte)0xb7, (byte)0x6a, (byte)0x36,
- (byte)0x3d, (byte)0x30, (byte)0x37, (byte)0xce,
- (byte)0x61, (byte)0x9d, (byte)0x6c, (byte)0x84,
- (byte)0x8b, (byte)0xf3, (byte)0x9b, (byte)0x25,
- (byte)0x4f, (byte)0x14, (byte)0xc8, (byte)0xa4,
- (byte)0xdd, (byte)0x2f, (byte)0xd7, (byte)0x9a,
- (byte)0x17, (byte)0xbd, (byte)0x90, (byte)0x19,
- (byte)0xf7, (byte)0x05, (byte)0xfd, (byte)0xf2,
- (byte)0xd2, (byte)0xc5, (byte)0xf7, (byte)0x77,
- (byte)0xbe, (byte)0xea, (byte)0xe2, (byte)0x84,
- (byte)0x87, (byte)0x97, (byte)0x3a, (byte)0x41,
- (byte)0x96, (byte)0xb6, (byte)0x99, (byte)0xf8,
- (byte)0x94, (byte)0x8c, (byte)0x58, (byte)0x71,
- (byte)0x51, (byte)0x8c, (byte)0xf4, (byte)0x2a,
- (byte)0x20, (byte)0x9e, (byte)0x1a, (byte)0xa0,
- (byte)0x26, (byte)0x99, (byte)0x75, (byte)0xd6,
- (byte)0x31, (byte)0x53, (byte)0x43, (byte)0x39,
- (byte)0xf5, (byte)0x2a, (byte)0xa6, (byte)0x7e,
- (byte)0x34, (byte)0x42, (byte)0x51, (byte)0x2a,
- (byte)0x40, (byte)0x87, (byte)0x03, (byte)0x88,
- (byte)0x43, (byte)0x69, (byte)0xb2, (byte)0x89,
- (byte)0x6d, (byte)0x20, (byte)0xbd, (byte)0x7d,
- (byte)0x71, (byte)0xef, (byte)0x47, (byte)0x0a,
- (byte)0xdf, (byte)0x06, (byte)0xc1, (byte)0x69,
- (byte)0x66, (byte)0xa8, (byte)0x22, (byte)0x37,
- (byte)0x1a, (byte)0x77, (byte)0x1e, (byte)0xc7,
- (byte)0x94, (byte)0x4e, (byte)0x2c, (byte)0x27,
- (byte)0x69, (byte)0x45, (byte)0x5e, (byte)0xc8,
- (byte)0xf8, (byte)0x0c, (byte)0xb7, (byte)0xf8,
- (byte)0xc0, (byte)0x8f, (byte)0x99, (byte)0xc1,
- (byte)0xe5, (byte)0x28, (byte)0x9b, (byte)0xf9,
- (byte)0x4c, (byte)0x94, (byte)0xc6, (byte)0xb1
+ (byte)0x62, (byte)0xb2, (byte)0xd6, (byte)0x63,
+ (byte)0xb6, (byte)0x2b, (byte)0xe2, (byte)0x26,
+ (byte)0x5a, (byte)0x31, (byte)0x2b, (byte)0x37,
+ (byte)0x8c, (byte)0x35, (byte)0x60, (byte)0xe2,
+ (byte)0x03, (byte)0xce, (byte)0x93, (byte)0x09,
+ (byte)0x3e, (byte)0xf8, (byte)0xc9, (byte)0xfe,
+ (byte)0xbb, (byte)0xa2, (byte)0xc8, (byte)0x32,
+ (byte)0x0e, (byte)0x6c, (byte)0x8a, (byte)0x7e,
+ (byte)0x0a, (byte)0xc2, (byte)0x13, (byte)0x3b,
+ (byte)0xb8, (byte)0x25, (byte)0xfa, (byte)0xec,
+ (byte)0x19, (byte)0x95, (byte)0x8e, (byte)0x34,
+ (byte)0x46, (byte)0xcf, (byte)0x0e, (byte)0x7b,
+ (byte)0xe4, (byte)0x25, (byte)0x82, (byte)0x1a,
+ (byte)0x7f, (byte)0x21, (byte)0x48, (byte)0x16,
+ (byte)0x44, (byte)0x58, (byte)0x3f, (byte)0x35,
+ (byte)0xd8, (byte)0xeb, (byte)0xd8, (byte)0x1a,
+ (byte)0x45, (byte)0x53, (byte)0x0f, (byte)0x9b,
+ (byte)0x84, (byte)0x8a, (byte)0x54, (byte)0x13,
+ (byte)0x33, (byte)0xe4, (byte)0x97, (byte)0x97,
+ (byte)0xf0, (byte)0x48, (byte)0x37, (byte)0xfb,
+ (byte)0x5d, (byte)0x4f, (byte)0x8c, (byte)0x8f,
+ (byte)0x35, (byte)0x63, (byte)0xe1, (byte)0xd9,
+ (byte)0x62, (byte)0x73, (byte)0x1c, (byte)0x8e,
+ (byte)0xd8, (byte)0xcd, (byte)0x2e, (byte)0x1a,
+ (byte)0xe5, (byte)0x4c, (byte)0xb5, (byte)0x05,
+ (byte)0x59, (byte)0x7a, (byte)0xdf, (byte)0xf1,
+ (byte)0x68, (byte)0xeb, (byte)0x1c, (byte)0x5c,
+ (byte)0xc6, (byte)0x10, (byte)0x44, (byte)0x8c,
+ (byte)0x7d, (byte)0x42, (byte)0xc5, (byte)0x71,
+ (byte)0x8a, (byte)0xe7, (byte)0x1b, (byte)0xaa,
+ (byte)0x17, (byte)0x03, (byte)0x6a, (byte)0xa0,
+ (byte)0xc0, (byte)0x6b, (byte)0x97, (byte)0x50,
+ (byte)0x17, (byte)0xad, (byte)0x6e, (byte)0x5e,
+ (byte)0xd9, (byte)0xdb, (byte)0x6f, (byte)0x3e,
+ (byte)0xe9, (byte)0x3f, (byte)0x35, (byte)0xc3,
+ (byte)0x45, (byte)0xbc, (byte)0xe8, (byte)0x3d,
+ (byte)0x5a, (byte)0xb4, (byte)0xb9, (byte)0x3f,
+ (byte)0x53, (byte)0x80, (byte)0x64, (byte)0xdc,
+ (byte)0x12, (byte)0x24, (byte)0x35, (byte)0x35,
+ (byte)0xbd, (byte)0x98, (byte)0xbb, (byte)0x8d,
+ (byte)0xfa, (byte)0x19, (byte)0xa3, (byte)0x5e,
+ (byte)0x9e, (byte)0xac, (byte)0x70, (byte)0x4a,
+ (byte)0xfc, (byte)0x8d, (byte)0xae, (byte)0x55,
+ (byte)0x8b, (byte)0x71, (byte)0x81, (byte)0x0e,
+ (byte)0x4d, (byte)0xc8, (byte)0x2f, (byte)0x87,
+ (byte)0xb0, (byte)0x44, (byte)0xf7, (byte)0x4f,
+ (byte)0xdc, (byte)0xa8, (byte)0xc8, (byte)0x50,
+ (byte)0xb5, (byte)0x95, (byte)0x24, (byte)0x63,
+ (byte)0x74, (byte)0x13, (byte)0x54, (byte)0x58,
+ (byte)0xde, (byte)0xfc, (byte)0xe0, (byte)0x75,
+ (byte)0xeb, (byte)0xf4, (byte)0x06, (byte)0x58,
+ (byte)0x83, (byte)0x12, (byte)0x4c, (byte)0x56,
+ (byte)0xc4, (byte)0xc4, (byte)0x18, (byte)0x0c,
+ (byte)0xea, (byte)0xa3, (byte)0xe7, (byte)0x25,
+ (byte)0xa3, (byte)0xde, (byte)0x19, (byte)0x23,
+ (byte)0xa2, (byte)0x5a, (byte)0x2a, (byte)0xb6,
+ (byte)0x56, (byte)0x04, (byte)0xbc, (byte)0x65,
+ (byte)0xba, (byte)0x7c, (byte)0x0a, (byte)0xf4,
+ (byte)0x91, (byte)0x10, (byte)0x22, (byte)0x88,
+ (byte)0x3f, (byte)0x9d, (byte)0xbe, (byte)0x58,
+ (byte)0x43, (byte)0x4c, (byte)0x2e, (byte)0xad,
+ (byte)0xdb, (byte)0xd6, (byte)0x32, (byte)0xcf,
+ (byte)0x8e, (byte)0xb5, (byte)0x05, (byte)0x55,
+ (byte)0x39, (byte)0x8b, (byte)0xe1, (byte)0x01
};
static byte clientModulus[] = {
- (byte)0x00,
- (byte)0xbb, (byte)0xf0, (byte)0x40, (byte)0x36,
- (byte)0xac, (byte)0x26, (byte)0x54, (byte)0x4e,
- (byte)0xf4, (byte)0xa3, (byte)0x5a, (byte)0x00,
- (byte)0x2f, (byte)0x69, (byte)0x21, (byte)0x6f,
- (byte)0xb9, (byte)0x7a, (byte)0x3a, (byte)0x93,
- (byte)0xec, (byte)0xa2, (byte)0xf6, (byte)0xe1,
- (byte)0x8e, (byte)0xc7, (byte)0x63, (byte)0xd8,
- (byte)0x2f, (byte)0x12, (byte)0x30, (byte)0x99,
- (byte)0x2e, (byte)0xb0, (byte)0xf2, (byte)0x8f,
- (byte)0xf8, (byte)0x27, (byte)0x2d, (byte)0x24,
- (byte)0x78, (byte)0x28, (byte)0x84, (byte)0xf7,
- (byte)0x01, (byte)0xbf, (byte)0x8d, (byte)0x44,
- (byte)0x79, (byte)0xdd, (byte)0x3b, (byte)0xd2,
- (byte)0x55, (byte)0xf3, (byte)0xce, (byte)0x3c,
- (byte)0xb2, (byte)0x5b, (byte)0x21, (byte)0x7d,
- (byte)0xef, (byte)0xfd, (byte)0x33, (byte)0x4a,
- (byte)0xb1, (byte)0xa3, (byte)0xff, (byte)0xc6,
- (byte)0xc8, (byte)0x9b, (byte)0xb9, (byte)0x0f,
- (byte)0x7c, (byte)0x41, (byte)0x35, (byte)0x97,
- (byte)0xf9, (byte)0xdb, (byte)0x3a, (byte)0x05,
- (byte)0x60, (byte)0x05, (byte)0x15, (byte)0xaf,
- (byte)0x59, (byte)0x17, (byte)0x92, (byte)0xa3,
- (byte)0x10, (byte)0xad, (byte)0x16, (byte)0x1c,
- (byte)0xe4, (byte)0x07, (byte)0x53, (byte)0xaf,
- (byte)0xa8, (byte)0x76, (byte)0xa2, (byte)0x56,
- (byte)0x2a, (byte)0x92, (byte)0xd3, (byte)0xf9,
- (byte)0x28, (byte)0xe0, (byte)0x78, (byte)0xcf,
- (byte)0x5e, (byte)0x1f, (byte)0x48, (byte)0xab,
- (byte)0x5c, (byte)0x19, (byte)0xdd, (byte)0xe1,
- (byte)0x67, (byte)0x43, (byte)0xba, (byte)0x75,
- (byte)0x8d, (byte)0xf5, (byte)0x82, (byte)0xac,
- (byte)0x43, (byte)0x92, (byte)0x44, (byte)0x1b
+ (byte)0x00, (byte)0xcc, (byte)0xbf, (byte)0x92,
+ (byte)0x3c, (byte)0xa6, (byte)0x57, (byte)0x74,
+ (byte)0x1f, (byte)0x58, (byte)0xad, (byte)0xc7,
+ (byte)0x69, (byte)0x88, (byte)0x6f, (byte)0x59,
+ (byte)0x32, (byte)0x47, (byte)0x50, (byte)0x60,
+ (byte)0x22, (byte)0xe4, (byte)0x98, (byte)0x49,
+ (byte)0x0e, (byte)0x3e, (byte)0x1d, (byte)0xb8,
+ (byte)0xba, (byte)0xe2, (byte)0x3b, (byte)0xb6,
+ (byte)0x71, (byte)0x5b, (byte)0xfd, (byte)0x64,
+ (byte)0x02, (byte)0x6d, (byte)0x0d, (byte)0x50,
+ (byte)0x77, (byte)0x72, (byte)0x6e, (byte)0xa8,
+ (byte)0x3d, (byte)0x5d, (byte)0xd4, (byte)0xbd,
+ (byte)0x1f, (byte)0x76, (byte)0x51, (byte)0xdc,
+ (byte)0x9a, (byte)0xd0, (byte)0xd6, (byte)0x3e,
+ (byte)0xd0, (byte)0x31, (byte)0xa5, (byte)0x24,
+ (byte)0x5a, (byte)0x2c, (byte)0xbe, (byte)0x77,
+ (byte)0xfa, (byte)0x88, (byte)0xa1, (byte)0xfa,
+ (byte)0x06, (byte)0x41, (byte)0xc8, (byte)0x0f,
+ (byte)0x47, (byte)0x70, (byte)0x47, (byte)0x24,
+ (byte)0x99, (byte)0x50, (byte)0x52, (byte)0x44,
+ (byte)0x5b, (byte)0x30, (byte)0x62, (byte)0x5b,
+ (byte)0x65, (byte)0x35, (byte)0xc4, (byte)0x28,
+ (byte)0xb0, (byte)0x5c, (byte)0xee, (byte)0xd0,
+ (byte)0x1b, (byte)0xeb, (byte)0x39, (byte)0x2b,
+ (byte)0x0b, (byte)0xa1, (byte)0xac, (byte)0x96,
+ (byte)0x48, (byte)0xda, (byte)0x56, (byte)0x6c,
+ (byte)0xe0, (byte)0xe3, (byte)0xe6, (byte)0xe3,
+ (byte)0xdd, (byte)0x45, (byte)0xcb, (byte)0x51,
+ (byte)0x33, (byte)0x8d, (byte)0x40, (byte)0x43,
+ (byte)0xd7, (byte)0xf0, (byte)0xa4, (byte)0x31,
+ (byte)0xaa, (byte)0xb5, (byte)0xc0, (byte)0xdf,
+ (byte)0x4b, (byte)0xdf, (byte)0x2b, (byte)0x0a,
+ (byte)0xed, (byte)0x7e, (byte)0x10, (byte)0x0c,
+ (byte)0xae, (byte)0x1f, (byte)0x96, (byte)0xa2,
+ (byte)0x10, (byte)0x1e, (byte)0x6b, (byte)0xd0,
+ (byte)0xf9, (byte)0x37, (byte)0x8b, (byte)0xdf,
+ (byte)0x0d, (byte)0x0e, (byte)0x02, (byte)0x35,
+ (byte)0xf8, (byte)0x58, (byte)0xbc, (byte)0x6e,
+ (byte)0xb5, (byte)0x57, (byte)0x0e, (byte)0x2f,
+ (byte)0xea, (byte)0x20, (byte)0xe6, (byte)0x73,
+ (byte)0x9a, (byte)0xe5, (byte)0x6b, (byte)0x82,
+ (byte)0x70, (byte)0x25, (byte)0xbb, (byte)0x51,
+ (byte)0x9a, (byte)0x7c, (byte)0x9d, (byte)0xe2,
+ (byte)0x50, (byte)0x3d, (byte)0xcf, (byte)0x1e,
+ (byte)0x24, (byte)0x3e, (byte)0x92, (byte)0x55,
+ (byte)0xcf, (byte)0x2a, (byte)0xad, (byte)0x0d,
+ (byte)0x84, (byte)0x8f, (byte)0xa8, (byte)0x43,
+ (byte)0x24, (byte)0xcd, (byte)0xad, (byte)0x50,
+ (byte)0x64, (byte)0x74, (byte)0xc2, (byte)0x73,
+ (byte)0xb6, (byte)0xe1, (byte)0x92, (byte)0x1c,
+ (byte)0xb2, (byte)0x2b, (byte)0x8c, (byte)0x2d,
+ (byte)0x7b, (byte)0x96, (byte)0xa6, (byte)0x41,
+ (byte)0x61, (byte)0x5c, (byte)0x1b, (byte)0x8f,
+ (byte)0x78, (byte)0x28, (byte)0x51, (byte)0x40,
+ (byte)0xed, (byte)0x41, (byte)0x90, (byte)0xce,
+ (byte)0x1d, (byte)0xb8, (byte)0x26, (byte)0x81,
+ (byte)0x47, (byte)0x6b, (byte)0xe3, (byte)0x57,
+ (byte)0x41, (byte)0x74, (byte)0x4e, (byte)0x20,
+ (byte)0xf0, (byte)0x5a, (byte)0x1b, (byte)0x97,
+ (byte)0x37, (byte)0x91, (byte)0x86, (byte)0x19,
+ (byte)0xc5, (byte)0xf2, (byte)0x6d, (byte)0x04,
+ (byte)0xc9, (byte)0x78, (byte)0x2b, (byte)0x5a,
+ (byte)0x16, (byte)0xbc, (byte)0xfc, (byte)0x2b,
+ (byte)0x71, (byte)0x5b, (byte)0xd0, (byte)0x00,
+ (byte)0x4f
};
static char passphrase[] = "passphrase".toCharArray();
@@ -808,26 +1090,26 @@ static class Test {
}
static Test[] tests = {
- // MD5 is used in this test case, don't disable MD5 algorithm.
+ // SHA1 is used in this test case, don't disable SHA1 algorithm.
new Test(
"SSLv3, RC4, DH keySize < 768",
"MD2, RSA keySize < 1024",
false),
- // Disable MD5 but only if cert chains back to public root CA, should
- // pass because the MD5 cert in this test case is issued by test CA
+ // Disable SHA1 but only if cert chains back to public root CA, should
+ // pass because the SHA1 cert in this test case is issued by test CA
new Test(
"SSLv3, RC4, DH keySize < 768",
- "MD2, MD5 jdkCA, RSA keySize < 1024",
+ "MD2, SHA1 jdkCA, RSA keySize < 1024",
false),
- // Disable MD5 alg via TLS property and expect failure
+ // Disable SHA1 alg via TLS property and expect failure
new Test(
- "SSLv3, MD5, RC4, DH keySize < 768",
+ "SSLv3, SHA1, RC4, DH keySize < 768",
"MD2, RSA keySize < 1024",
true),
- // Disable MD5 alg via certpath property and expect failure
+ // Disable SHA1 alg via certpath property and expect failure
new Test(
"SSLv3, RC4, DH keySize < 768",
- "MD2, MD5, RSA keySize < 1024",
+ "MD2, SHA1, RSA keySize < 1024",
true),
};
@@ -850,7 +1132,7 @@ public static void main(String args[]) throws Exception {
try {
new PKIXExtendedTM();
if (test.fail) {
- throw new Exception("Expected MD5 certificate to be blocked");
+ throw new Exception("Expected SHA1 certificate to be blocked");
}
} catch (Exception e) {
if (test.fail) {
diff --git a/test/jdk/sun/security/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java b/test/jdk/sun/security/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
index ec893f90703..f95aee76dab 100644
--- a/test/jdk/sun/security/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
+++ b/test/jdk/sun/security/ssl/X509TrustManagerImpl/SunX509ExtendedTM.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2024, 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
@@ -52,357 +52,497 @@
*
* TLS server certificate:
* server private key:
- * -----BEGIN RSA PRIVATE KEY-----
- * Proc-Type: 4,ENCRYPTED
- * DEK-Info: DES-EDE3-CBC,D9AE407F6D0E389A
*
- * WPrA7TFol/cQCcp9oHnXWNpYlvRbbIcQj0m+RKT2Iuzfus+DHt3Zadf8nJpKfX2e
- * h2rnhlzCN9M7djRDooZKDOPCsdBn51Au7HlZF3S3Opgo7D8XFM1a8t1Je4ke14oI
- * nw6QKYsBblRziPnP2PZ0zvX24nOv7bbY8beynlJHGs00VWSFdoH2DS0aE1p6D+3n
- * ptJuJ75dVfZFK4X7162APlNXevX8D6PEQpSiRw1rjjGGcnvQ4HdWk3BxDVDcCNJb
- * Y1aGNRxsjTDvPi3R9Qx2M+W03QzEPx4SR3ZHVskeSJHaetM0TM/w/45Paq4GokXP
- * ZeTnbEx1xmjkA7h+t4doLL4watx5F6yLsJzu8xB3lt/1EtmkYtLz1t7X4BetPAXz
- * zS69X/VwhKfsOI3qXBWuL2oHPyhDmT1gcaUQwEPSV6ogHEEQEDXdiUS8heNK13KF
- * TCQYFkETvV2BLxUhV1hypPzRQ6tUpJiAbD5KmoK2lD9slshG2QtvKQq0/bgkDY5J
- * LhDHV2dtcZ3kDPkkZXpbcJQvoeH3d09C5sIsuTFo2zgNR6oETHUc5TzP6FY2YYRa
- * QcK5HcmtsRRiXFm01ac+aMejJUIujjFt84SiKWT/73vC8AmY4tYcJBLjCg4XIxSH
- * fdDFLL1YZENNO5ivlp8mdiHqcawx+36L7DrEZQ8RZt6cqST5t/+XTdM74s6k81GT
- * pNsa82P2K2zmIUZ/DL2mKjW1vfRByw1NQFEBkN3vdyZxYfM/JyUzX4hbjXBEkh9Q
- * QYrcwLKLjis2QzSvK04B3bvRzRb+4ocWiso8ZPAXAIxZFBWDpTMM2A==
- * -----END RSA PRIVATE KEY-----
- *
- * -----BEGIN RSA PRIVATE KEY-----
- * MIICXAIBAAKBgQClrFscN6LdmYktsnm4j9VIpecchBeNaZzGrG358h0fORna03Ie
- * buxEzHCk3LoAMPagTz1UemFqzFfQCn+VKBg/mtmU8hvIJIh+/p0PPftXUwizIDPU
- * PxdHFNHN6gjYDnVOr77M0uyvqXpJ38LZrLgkQJCmA1Yq0DAFQCxPq9l0iQIDAQAB
- * AoGAbqcbg1E1mkR99uOJoNeQYKFOJyGiiXTMnXV1TseC4+PDfQBU7Dax35GcesBi
- * CtapIpFKKS5D+ozY6b7ZT8ojxuQ/uHLPAvz0WDR3ds4iRF8tyu71Q1ZHcQsJa17y
- * yO7UbkSSKn/Mp9Rb+/dKqftUGNXVFLqgHBOzN2s3We3bbbECQQDYBPKOg3hkaGHo
- * OhpHKqtQ6EVkldihG/3i4WejRonelXN+HRh1KrB2HBx0M8D/qAzP1i3rNSlSHer4
- * 59YRTJnHAkEAxFX/sVYSn07BHv9Zhn6XXct/Cj43z/tKNbzlNbcxqQwQerw3IH51
- * 8UH2YOA+GD3lXbKp+MytoFLWv8zg4YT/LwJAfqan75Z1R6lLffRS49bIiq8jwE16
- * rTrUJ+kv8jKxMqc9B3vXkxpsS1M/+4E8bqgAmvpgAb8xcsvHsBd9ErdukQJBAKs2
- * j67W75BrPjBI34pQ1LEfp56IGWXOrq1kF8IbCjxv3+MYRT6Z6UJFkpRymNPNDjsC
- * dgUYgITiGJHUGXuw3lMCQHEHqo9ZtXz92yFT+VhsNc29B8m/sqUJdtCcMd/jGpAF
- * u6GHufjqIZBpQsk63wbwESAPZZ+kk1O1kS5GIRLX608=
- * -----END RSA PRIVATE KEY-----
- *
- * Private-Key: (1024 bit)
+ * Private-Key: (2048 bit, 2 primes)
* modulus:
- * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f:
- * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2:
- * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc:
- * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a:
- * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe:
- * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14:
- * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9:
- * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0:
- * 30:05:40:2c:4f:ab:d9:74:89
+ * 00:9a:0c:e0:8f:a8:02:7e:5a:ef:ed:b2:42:ad:08:
+ * 4e:91:ba:c2:ad:9b:79:d7:9b:0f:fd:d2:f8:15:2f:
+ * 19:89:80:10:00:02:19:6d:27:c2:90:d7:a5:23:53:
+ * 74:6e:64:28:7c:24:aa:ed:ea:21:59:dc:a3:5c:b5:
+ * c9:42:31:4f:a2:de:fb:09:7c:73:ed:88:04:34:f1:
+ * 15:ad:3d:60:cd:ca:c5:13:99:d3:9f:9b:b2:92:70:
+ * cb:ba:4b:3d:20:96:ad:be:92:53:ed:54:3b:c5:14:
+ * bd:cf:d4:0f:cb:05:4f:fd:2b:9e:e0:50:bb:65:13:
+ * 92:c0:d6:bd:4d:02:0c:70:b6:65:d4:7d:b4:4d:c3:
+ * df:2c:08:9e:d2:3e:69:32:46:6f:6f:ca:d1:73:a4:
+ * 94:07:ef:14:e3:da:9e:2f:c0:ac:0e:10:33:4c:68:
+ * 79:f3:79:40:d6:e9:3c:c2:e6:70:e0:89:ce:a0:7a:
+ * a8:84:28:85:32:37:08:b0:cf:b1:7f:5f:bc:1f:a5:
+ * 3d:ef:d6:68:a8:17:21:5f:87:d5:4b:b5:cc:ee:78:
+ * 8d:dd:b1:28:6a:c0:fb:64:bd:b7:70:02:33:03:0b:
+ * b8:b8:bb:08:82:f6:8e:05:27:d1:3b:e6:c5:ac:4d:
+ * 85:5b:a1:1d:a3:48:5d:03:15:76:63:6c:71:21:3e:
+ * 98:cd
* publicExponent: 65537 (0x10001)
* privateExponent:
- * 6e:a7:1b:83:51:35:9a:44:7d:f6:e3:89:a0:d7:90:
- * 60:a1:4e:27:21:a2:89:74:cc:9d:75:75:4e:c7:82:
- * e3:e3:c3:7d:00:54:ec:36:b1:df:91:9c:7a:c0:62:
- * 0a:d6:a9:22:91:4a:29:2e:43:fa:8c:d8:e9:be:d9:
- * 4f:ca:23:c6:e4:3f:b8:72:cf:02:fc:f4:58:34:77:
- * 76:ce:22:44:5f:2d:ca:ee:f5:43:56:47:71:0b:09:
- * 6b:5e:f2:c8:ee:d4:6e:44:92:2a:7f:cc:a7:d4:5b:
- * fb:f7:4a:a9:fb:54:18:d5:d5:14:ba:a0:1c:13:b3:
- * 37:6b:37:59:ed:db:6d:b1
+ * 68:87:36:54:a3:c6:d5:5f:f5:0f:4f:76:c8:9c:2b:
+ * 5b:dc:e2:be:14:12:2f:c7:0a:a9:cb:5e:04:59:ca:
+ * 35:2f:8d:2b:c4:40:e6:7d:25:1b:4d:07:c3:99:9c:
+ * 16:4f:a5:dc:de:b0:90:f0:de:22:70:80:f4:a6:70:
+ * e2:96:3d:18:21:bf:2b:27:a4:2d:d7:ae:2b:12:2f:
+ * 08:36:ee:99:94:ed:f6:a7:d9:1d:a2:f3:1f:44:a4:
+ * 28:4b:67:35:d6:a8:1b:f8:84:34:34:84:bd:ec:9e:
+ * 03:08:3c:93:20:8e:af:15:cb:1f:20:08:97:c4:19:
+ * 3e:fa:36:c6:ab:0e:2f:e7:b3:c0:a7:bc:e4:e0:a6:
+ * 08:1c:69:20:4d:78:bd:7a:e5:25:48:60:9e:2e:50:
+ * 8d:36:1e:07:e9:d5:0d:39:67:41:42:24:db:87:e5:
+ * 77:76:fd:5e:d5:c6:e5:d3:b0:98:71:48:69:47:4f:
+ * 46:05:0c:9e:58:45:2e:e2:27:d0:f6:11:05:78:ad:
+ * 83:5a:5b:ec:d7:2e:26:5a:a5:4f:9e:52:84:2c:1f:
+ * 59:1a:78:56:0a:44:54:c6:37:64:01:ca:e4:a8:01:
+ * c7:86:c1:b4:d6:6c:7a:15:9a:65:69:46:9e:fd:f6:
+ * 08:17:0c:6c:ac:38:bd:c2:cd:da:ef:54:7a:48:92:
+ * 4d
* prime1:
- * 00:d8:04:f2:8e:83:78:64:68:61:e8:3a:1a:47:2a:
- * ab:50:e8:45:64:95:d8:a1:1b:fd:e2:e1:67:a3:46:
- * 89:de:95:73:7e:1d:18:75:2a:b0:76:1c:1c:74:33:
- * c0:ff:a8:0c:cf:d6:2d:eb:35:29:52:1d:ea:f8:e7:
- * d6:11:4c:99:c7
+ * 00:e4:43:cc:51:25:aa:1d:90:41:95:2c:e8:9f:aa:
+ * 1c:9b:ea:bd:fd:29:e5:68:6b:28:00:ec:31:31:36:
+ * d0:3d:84:db:c5:5d:32:f6:38:b9:04:4f:45:cb:19:
+ * f5:88:cd:a8:fc:70:b8:6d:98:68:a6:b4:9e:c1:da:
+ * fd:db:eb:1a:53:3c:3b:e6:85:d2:6f:03:45:7a:ad:
+ * 49:8c:c3:96:a7:46:a4:bb:3b:48:d3:d7:1c:b4:3c:
+ * f7:04:0a:a3:85:9d:94:3e:bd:35:f5:34:21:3d:08:
+ * 89:df:c5:54:af:cf:90:f7:d8:5c:57:c5:77:5a:c8:
+ * d1:b3:8f:ee:01:5c:07:13:3f
* prime2:
- * 00:c4:55:ff:b1:56:12:9f:4e:c1:1e:ff:59:86:7e:
- * 97:5d:cb:7f:0a:3e:37:cf:fb:4a:35:bc:e5:35:b7:
- * 31:a9:0c:10:7a:bc:37:20:7e:75:f1:41:f6:60:e0:
- * 3e:18:3d:e5:5d:b2:a9:f8:cc:ad:a0:52:d6:bf:cc:
- * e0:e1:84:ff:2f
+ * 00:ac:c4:a0:cc:7c:51:db:65:0a:02:da:bc:d8:77:
+ * 21:8c:d3:30:ae:ec:50:60:4b:b9:39:c7:2d:bd:98:
+ * aa:4f:9b:44:74:ab:f8:86:de:e2:44:15:73:7a:cd:
+ * d5:46:f2:03:62:c5:87:9c:6d:91:d5:7a:9a:17:c2:
+ * c6:2f:29:0e:8a:a4:a9:f4:c2:63:a2:77:97:bf:c6:
+ * 90:e8:39:70:87:cc:fd:62:4f:d2:3d:e7:47:70:fb:
+ * f3:bd:bd:5c:9c:77:fe:23:33:7d:83:ef:cb:0e:4e:
+ * f1:dd:05:47:40:97:f4:da:b6:1f:b9:8d:e2:92:04:
+ * 09:be:fb:6a:97:29:27:ac:f3
* exponent1:
- * 7e:a6:a7:ef:96:75:47:a9:4b:7d:f4:52:e3:d6:c8:
- * 8a:af:23:c0:4d:7a:ad:3a:d4:27:e9:2f:f2:32:b1:
- * 32:a7:3d:07:7b:d7:93:1a:6c:4b:53:3f:fb:81:3c:
- * 6e:a8:00:9a:fa:60:01:bf:31:72:cb:c7:b0:17:7d:
- * 12:b7:6e:91
+ * 3f:08:1d:b6:56:b1:38:02:aa:a9:77:c2:30:bc:b7:
+ * b3:b2:49:8e:4b:f0:66:3a:18:cc:d0:6b:f1:0c:12:
+ * ca:ba:12:39:d8:b7:86:d8:38:f6:e0:b1:04:19:81:
+ * fc:a9:d5:bd:07:9f:55:dc:1d:21:d3:84:77:41:72:
+ * 92:34:c4:8b:31:79:d4:f9:25:17:b4:8e:8e:06:a5:
+ * e5:b1:e8:ba:fe:3d:e4:d9:c5:0d:82:3c:11:e5:37:
+ * cc:ac:e7:64:b1:13:cb:93:52:00:08:ca:18:e1:6f:
+ * b9:13:f3:83:ac:cc:7a:34:0b:a3:cd:0a:5d:4e:50:
+ * e1:c5:9f:d2:4e:48:41:df
* exponent2:
- * 00:ab:36:8f:ae:d6:ef:90:6b:3e:30:48:df:8a:50:
- * d4:b1:1f:a7:9e:88:19:65:ce:ae:ad:64:17:c2:1b:
- * 0a:3c:6f:df:e3:18:45:3e:99:e9:42:45:92:94:72:
- * 98:d3:cd:0e:3b:02:76:05:18:80:84:e2:18:91:d4:
- * 19:7b:b0:de:53
+ * 02:c7:fb:8a:af:29:a6:2d:7f:36:c2:8c:ad:b3:65:
+ * 3f:de:1a:77:86:68:58:d4:7f:3b:d5:df:ff:a0:58:
+ * 85:85:8b:59:91:77:23:bc:ac:c9:c9:ca:9d:1c:79:
+ * 25:76:39:e5:ba:26:4f:b7:57:d4:a6:ef:9a:18:51:
+ * 96:6a:c3:c8:29:94:6e:d3:3e:45:5c:45:7e:19:d5:
+ * 35:57:cf:5e:f0:46:d7:f1:4f:02:1e:1a:01:50:9d:
+ * 00:dd:ee:82:ba:4f:c6:03:4b:2e:f7:8a:3e:45:b9:
+ * 11:04:c7:bb:db:76:5e:9a:f5:f1:c7:bd:f0:f9:cd:
+ * aa:5c:63:bf:e1:32:b9:4f
* coefficient:
- * 71:07:aa:8f:59:b5:7c:fd:db:21:53:f9:58:6c:35:
- * cd:bd:07:c9:bf:b2:a5:09:76:d0:9c:31:df:e3:1a:
- * 90:05:bb:a1:87:b9:f8:ea:21:90:69:42:c9:3a:df:
- * 06:f0:11:20:0f:65:9f:a4:93:53:b5:91:2e:46:21:
- * 12:d7:eb:4f
- *
+ * 50:4c:e6:1e:23:f3:e2:2b:d6:3f:87:53:fb:19:53:
+ * 4b:84:21:0b:77:31:ed:8d:c3:0c:ea:31:b0:a6:38:
+ * a9:e6:44:6e:18:05:53:8f:4a:5f:75:e5:3e:b5:26:
+ * 9b:46:3d:73:e7:c1:2a:a6:3e:c3:cd:41:b1:a6:55:
+ * 57:84:11:13:ec:44:92:59:7f:dd:0d:67:30:d3:b7:
+ * 13:ee:9e:2d:ea:be:b3:ca:4a:f0:6e:4f:22:e8:be:
+ * 8b:8d:9b:2c:30:a5:ed:2c:2b:13:4c:f7:61:19:64:
+ * 35:9d:b0:c8:10:85:01:e7:2a:70:13:00:39:c5:73:
+ * 63:34:fd:28:2d:7f:8d:20
+ * -----BEGIN PRIVATE KEY-----
+ * MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCaDOCPqAJ+Wu/t
+ * skKtCE6RusKtm3nXmw/90vgVLxmJgBAAAhltJ8KQ16UjU3RuZCh8JKrt6iFZ3KNc
+ * tclCMU+i3vsJfHPtiAQ08RWtPWDNysUTmdOfm7KScMu6Sz0glq2+klPtVDvFFL3P
+ * 1A/LBU/9K57gULtlE5LA1r1NAgxwtmXUfbRNw98sCJ7SPmkyRm9vytFzpJQH7xTj
+ * 2p4vwKwOED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7
+ * iq8ppi1/NsKMrbNlP94ad4ZoWNR/O9Xf/6BYhYWLWZF3I7ysycnKnRx5JXY55bom
+ * T7dX1KbvmhhRlmrDyCmUbtM+RVxFfhnVNVfPXvBG1/FPAh4aAVCdAN3ugrpPxgNL
+ * LveKPkW5EQTHu9t2Xpr18ce98PnNqlxjv+EyuU8CgYBQTOYeI/PiK9Y/h1P7GVNL
+ * hCELdzHtjcMM6jGwpjip5kRuGAVTj0pfdeU+tSabRj1z58Eqpj7DzUGxplVXhBET
+ * 7ESSWX/dDWcw07cT7p4t6r6zykrwbk8i6L6LjZssMKXtLCsTTPdhGWQ1nbDIEIUB
+ * 5ypwEwA5xXNjNP0oLX+NIA==
+ * -----END PRIVATE KEY-----
*
* server certificate:
- * Data:
- * Version: 3 (0x2)
- * Serial Number: 8 (0x8)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 03:43:04 2008 GMT
- * Not After : Aug 25 03:43:04 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Server, CN=localhost
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:a5:ac:5b:1c:37:a2:dd:99:89:2d:b2:79:b8:8f:
- * d5:48:a5:e7:1c:84:17:8d:69:9c:c6:ac:6d:f9:f2:
- * 1d:1f:39:19:da:d3:72:1e:6e:ec:44:cc:70:a4:dc:
- * ba:00:30:f6:a0:4f:3d:54:7a:61:6a:cc:57:d0:0a:
- * 7f:95:28:18:3f:9a:d9:94:f2:1b:c8:24:88:7e:fe:
- * 9d:0f:3d:fb:57:53:08:b3:20:33:d4:3f:17:47:14:
- * d1:cd:ea:08:d8:0e:75:4e:af:be:cc:d2:ec:af:a9:
- * 7a:49:df:c2:d9:ac:b8:24:40:90:a6:03:56:2a:d0:
- * 30:05:40:2c:4f:ab:d9:74:89
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Basic Constraints:
- * CA:FALSE
- * X509v3 Key Usage:
- * Digital Signature, Non Repudiation, Key Encipherment
- * X509v3 Subject Key Identifier:
- * ED:6E:DB:F4:B5:56:C8:FB:1A:06:61:3F:0F:08:BB:A6:04:D8:16:54
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- *
- * X509v3 Subject Alternative Name: critical
- * DNS:localhost
- * Signature Algorithm: md5WithRSAEncryption0
- *
+ * Data:
+ * Version: 3 (0x2)
+ * Serial Number: 106315679 (0x6563f9f)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:55 2024 GMT
+ * Not After : Jul 2 04:16:55 2034 GMT
+ * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, CN=localhost ou=SSL-Server
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:9a:0c:e0:8f:a8:02:7e:5a:ef:ed:b2:42:ad:08:
+ * 4e:91:ba:c2:ad:9b:79:d7:9b:0f:fd:d2:f8:15:2f:
+ * 19:89:80:10:00:02:19:6d:27:c2:90:d7:a5:23:53:
+ * 74:6e:64:28:7c:24:aa:ed:ea:21:59:dc:a3:5c:b5:
+ * c9:42:31:4f:a2:de:fb:09:7c:73:ed:88:04:34:f1:
+ * 15:ad:3d:60:cd:ca:c5:13:99:d3:9f:9b:b2:92:70:
+ * cb:ba:4b:3d:20:96:ad:be:92:53:ed:54:3b:c5:14:
+ * bd:cf:d4:0f:cb:05:4f:fd:2b:9e:e0:50:bb:65:13:
+ * 92:c0:d6:bd:4d:02:0c:70:b6:65:d4:7d:b4:4d:c3:
+ * df:2c:08:9e:d2:3e:69:32:46:6f:6f:ca:d1:73:a4:
+ * 94:07:ef:14:e3:da:9e:2f:c0:ac:0e:10:33:4c:68:
+ * 79:f3:79:40:d6:e9:3c:c2:e6:70:e0:89:ce:a0:7a:
+ * a8:84:28:85:32:37:08:b0:cf:b1:7f:5f:bc:1f:a5:
+ * 3d:ef:d6:68:a8:17:21:5f:87:d5:4b:b5:cc:ee:78:
+ * 8d:dd:b1:28:6a:c0:fb:64:bd:b7:70:02:33:03:0b:
+ * b8:b8:bb:08:82:f6:8e:05:27:d1:3b:e6:c5:ac:4d:
+ * 85:5b:a1:1d:a3:48:5d:03:15:76:63:6c:71:21:3e:
+ * 98:cd
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * 5C:AF:44:B1:48:B8:59:9A:64:53:9D:2E:A6:B2:09:D3:0A:92:04:83
+ * X509v3 Key Usage:
+ * Digital Signature, Non Repudiation, Key Encipherment
+ * X509v3 Subject Alternative Name: critical
+ * DNS:localhost
+ * X509v3 Basic Constraints:
+ * CA:FALSE
+ * X509v3 Authority Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 9d:22:49:5f:56:23:e6:80:35:cc:ab:44:1c:27:bd:c9:8d:89:
+ * 93:49:58:e8:c1:7a:68:dd:cf:bd:e0:12:76:06:54:cd:2f:62:
+ * 9b:54:84:f2:bb:90:a0:bb:37:e2:13:1d:f3:df:41:aa:e0:fe:
+ * c0:ef:46:78:8d:aa:f4:1b:70:ad:a9:16:24:fa:15:4a:c6:0a:
+ * 8d:e1:99:93:00:a9:d4:b6:08:5d:8e:65:03:dc:d0:95:fc:95:
+ * 61:a6:ad:b5:ab:4d:a6:e0:05:48:8c:db:42:42:8a:d6:5e:c0:
+ * 2a:a0:11:15:b8:07:69:5c:3f:99:a0:bd:53:65:db:4e:cf:46:
+ * 61:93:09:7b:81:40:ff:5c:fe:4c:eb:f4:ac:de:1f:38:ad:b2:
+ * 60:28:f6:0e:9f:46:e7:07:8f:20:9a:a4:e1:8f:ab:54:99:76:
+ * 82:d8:9e:70:c4:da:98:85:71:af:3b:54:e4:01:b4:9e:83:d0:
+ * 7b:c6:8d:1f:ed:25:08:89:05:e9:87:97:76:5a:a3:85:c3:f8:
+ * 59:d7:bb:3b:5a:db:cb:ed:5d:ff:ac:21:b9:9a:e2:65:0a:bc:
+ * de:d1:dc:53:94:98:44:97:91:b3:1b:6b:80:0b:9b:57:b3:ae:
+ * 5c:7c:35:ca:39:71:f7:4e:8f:4a:d7:eb:0b:25:da:b2:1e:17:
+ * 48:b8:eb:09
* -----BEGIN CERTIFICATE-----
- * MIICpDCCAg2gAwIBAgIBCDANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET
- * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK
- * EwhTb21lLU9yZzAeFw0wODEyMDgwMzQzMDRaFw0yODA4MjUwMzQzMDRaMHIxCzAJ
- * BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp
- * dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtU2VydmVyMRIwEAYD
- * VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWsWxw3
- * ot2ZiS2yebiP1Uil5xyEF41pnMasbfnyHR85GdrTch5u7ETMcKTcugAw9qBPPVR6
- * YWrMV9AKf5UoGD+a2ZTyG8gkiH7+nQ89+1dTCLMgM9Q/F0cU0c3qCNgOdU6vvszS
- * 7K+peknfwtmsuCRAkKYDVirQMAVALE+r2XSJAgMBAAGjczBxMAkGA1UdEwQCMAAw
- * CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTtbtv0tVbI+xoGYT8PCLumBNgWVDAfBgNV
- * HSMEGDAWgBT6uVG/TOfZhpgz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MK
+ * kgSDMAsGA1UdDwQEAwIF4DAXBgNVHREBAf8EDTALgglsb2NhbGhvc3QwCQYDVR0T
+ * BAIwADAfBgNVHSMEGDAWgBTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B
+ * AQUFAAOCAQEAnSJJX1Yj5oA1zKtEHCe9yY2Jk0lY6MF6aN3PveASdgZUzS9im1SE
+ * 8ruQoLs34hMd899BquD+wO9GeI2q9BtwrakWJPoVSsYKjeGZkwCp1LYIXY5lA9zQ
+ * lfyVYaattatNpuAFSIzbQkKK1l7AKqARFbgHaVw/maC9U2XbTs9GYZMJe4FA/1z+
+ * TOv0rN4fOK2yYCj2Dp9G5wePIJqk4Y+rVJl2gtiecMTamIVxrztU5AG0noPQe8aN
+ * H+0lCIkF6YeXdlqjhcP4Wde7O1rby+1d/6whuZriZQq83tHcU5SYRJeRsxtrgAub
+ * V7OuXHw1yjlx906PStfrCyXash4XSLjrCQ==
* -----END CERTIFICATE-----
*
*
* TLS client certificate:
* client private key:
- * ----BEGIN RSA PRIVATE KEY-----
- * Proc-Type: 4,ENCRYPTED
- * DEK-Info: DES-EDE3-CBC,FA2A435CD35A9390
- *
- * Z+Y2uaETbsUWIyJUyVu1UV2G4rgFYJyACZT6Tp1KjRtxflSh2kXkJ9MpuXMXA0V4
- * Yy3fDzPqCL9NJmQAYRlAx/W/+j4F5EyMWDIx8fUxzONRZyoiwF7jLm+KscAfv6Pf
- * q7ItWOdj3z7IYrwlB8YIGd3F2cDKT3S+lYRk7rKb/qT7itbuHnY4Ardh3yl+MZak
- * jBp+ELUlRsUqSr1V0LoM+0rCCykarpyfhpxEcqsrl0v9Cyi5uhU50/oKv5zql3SH
- * l2ImgDjp3batAs8+Bd4NF2aqi0a7Hy44JUHxRm4caZryU/i/D9N1MbuM6882HLat
- * 5N0G+NaIUfywa8mjwq2D5aiit18HqKA6XeRRYeJ5Dvu9DCO4GeFSwcUFIBMI0L46
- * 7s114+oDodg57pMgITi+04vmUxvql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wM
- * PEARfckUxd9LnnFutCBTWlKvKXJVEZb6KO5ixPaegc57Jp3Vbh3yTN44lQJADD/1
- * SSMDaIB1MYP7a5Oj7m6VQNPRq8AJe5vDcRnOae0G9dKRrVyeFxO4GsHj6/+BHp2j
- * P8nYMn9eURQ7DXjf/QJAAQzMlWnKGSO8pyTDtnQx3hRMoUkOEhmNq4bQhLkYqtnY
- * FcqpUQ2qMjW+NiNWk5HnTrMS3L9EdJobMUzaNZLy4w==
- * -----END RSA PRIVATE KEY-----
*
- * Private-Key: (1024 bit)
+ * Private-Key: (2048 bit, 2 primes)
* modulus:
- * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69:
- * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f:
- * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7:
- * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21:
- * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41:
- * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10:
- * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9:
- * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba:
- * 75:8d:f5:82:ac:43:92:44:1b
+ * 00:cc:bf:92:3c:a6:57:74:1f:58:ad:c7:69:88:6f:
+ * 59:32:47:50:60:22:e4:98:49:0e:3e:1d:b8:ba:e2:
+ * 3b:b6:71:5b:fd:64:02:6d:0d:50:77:72:6e:a8:3d:
+ * 5d:d4:bd:1f:76:51:dc:9a:d0:d6:3e:d0:31:a5:24:
+ * 5a:2c:be:77:fa:88:a1:fa:06:41:c8:0f:47:70:47:
+ * 24:99:50:52:44:5b:30:62:5b:65:35:c4:28:b0:5c:
+ * ee:d0:1b:eb:39:2b:0b:a1:ac:96:48:da:56:6c:e0:
+ * e3:e6:e3:dd:45:cb:51:33:8d:40:43:d7:f0:a4:31:
+ * aa:b5:c0:df:4b:df:2b:0a:ed:7e:10:0c:ae:1f:96:
+ * a2:10:1e:6b:d0:f9:37:8b:df:0d:0e:02:35:f8:58:
+ * bc:6e:b5:57:0e:2f:ea:20:e6:73:9a:e5:6b:82:70:
+ * 25:bb:51:9a:7c:9d:e2:50:3d:cf:1e:24:3e:92:55:
+ * cf:2a:ad:0d:84:8f:a8:43:24:cd:ad:50:64:74:c2:
+ * 73:b6:e1:92:1c:b2:2b:8c:2d:7b:96:a6:41:61:5c:
+ * 1b:8f:78:28:51:40:ed:41:90:ce:1d:b8:26:81:47:
+ * 6b:e3:57:41:74:4e:20:f0:5a:1b:97:37:91:86:19:
+ * c5:f2:6d:04:c9:78:2b:5a:16:bc:fc:2b:71:5b:d0:
+ * 00:4f
* publicExponent: 65537 (0x10001)
* privateExponent:
- * 11:b7:6a:36:3d:30:37:ce:61:9d:6c:84:8b:f3:9b:
- * 25:4f:14:c8:a4:dd:2f:d7:9a:17:bd:90:19:f7:05:
- * fd:f2:d2:c5:f7:77:be:ea:e2:84:87:97:3a:41:96:
- * b6:99:f8:94:8c:58:71:51:8c:f4:2a:20:9e:1a:a0:
- * 26:99:75:d6:31:53:43:39:f5:2a:a6:7e:34:42:51:
- * 2a:40:87:03:88:43:69:b2:89:6d:20:bd:7d:71:ef:
- * 47:0a:df:06:c1:69:66:a8:22:37:1a:77:1e:c7:94:
- * 4e:2c:27:69:45:5e:c8:f8:0c:b7:f8:c0:8f:99:c1:
- * e5:28:9b:f9:4c:94:c6:b1
+ * 62:b2:d6:63:b6:2b:e2:26:5a:31:2b:37:8c:35:60:
+ * e2:03:ce:93:09:3e:f8:c9:fe:bb:a2:c8:32:0e:6c:
+ * 8a:7e:0a:c2:13:3b:b8:25:fa:ec:19:95:8e:34:46:
+ * cf:0e:7b:e4:25:82:1a:7f:21:48:16:44:58:3f:35:
+ * d8:eb:d8:1a:45:53:0f:9b:84:8a:54:13:33:e4:97:
+ * 97:f0:48:37:fb:5d:4f:8c:8f:35:63:e1:d9:62:73:
+ * 1c:8e:d8:cd:2e:1a:e5:4c:b5:05:59:7a:df:f1:68:
+ * eb:1c:5c:c6:10:44:8c:7d:42:c5:71:8a:e7:1b:aa:
+ * 17:03:6a:a0:c0:6b:97:50:17:ad:6e:5e:d9:db:6f:
+ * 3e:e9:3f:35:c3:45:bc:e8:3d:5a:b4:b9:3f:53:80:
+ * 64:dc:12:24:35:35:bd:98:bb:8d:fa:19:a3:5e:9e:
+ * ac:70:4a:fc:8d:ae:55:8b:71:81:0e:4d:c8:2f:87:
+ * b0:44:f7:4f:dc:a8:c8:50:b5:95:24:63:74:13:54:
+ * 58:de:fc:e0:75:eb:f4:06:58:83:12:4c:56:c4:c4:
+ * 18:0c:ea:a3:e7:25:a3:de:19:23:a2:5a:2a:b6:56:
+ * 04:bc:65:ba:7c:0a:f4:91:10:22:88:3f:9d:be:58:
+ * 43:4c:2e:ad:db:d6:32:cf:8e:b5:05:55:39:8b:e1:
+ * 01
* prime1:
- * 00:e7:35:00:62:17:66:a2:7c:48:3a:cd:b2:4e:38:
- * 2e:e1:7b:90:87:01:d9:05:c5:2c:56:54:55:47:2f:
- * a1:1f:5d:fa:9d:2d:59:14:a2:13:1b:81:9b:fe:5f:
- * 1c:88:79:4d:9b:88:e1:31:4a:0e:3d:29:db:37:14:
- * e2:a0:4d:ab:b5
+ * 00:f1:da:c2:8a:e5:66:45:8a:14:fc:08:6e:fb:aa:
+ * 50:d2:8c:b1:c4:f4:88:26:d4:b8:c4:63:30:ca:e3:
+ * 0c:6c:50:d4:93:5c:1c:13:37:60:21:11:3b:d1:f1:
+ * 9f:4c:0d:7b:0e:53:3d:c9:a4:fb:fa:6b:9e:b4:0a:
+ * 5d:d3:50:88:d7:be:c3:88:b2:b1:8a:6e:7b:d6:70:
+ * 88:96:a4:fe:90:ef:d1:84:ad:a8:9e:9f:3a:68:3f:
+ * 3f:82:07:be:c2:44:1e:d5:a1:a9:1a:db:39:d7:7f:
+ * 0c:6e:35:5b:1d:33:1b:a9:cd:38:2a:64:d1:70:2a:
+ * fe:b9:c2:b6:ed:59:19:73:b1
* prime2:
- * 00:d0:17:75:85:a8:fa:42:e0:a8:f0:8d:00:5e:6d:
- * 96:3b:e3:0c:4d:93:13:be:d1:c3:fd:b1:a3:28:d3:
- * 3e:7d:3e:08:f2:b2:98:9d:04:57:d5:a7:07:76:a4:
- * bd:5f:1d:ab:34:9a:99:82:43:26:a4:44:88:74:f4:
- * 76:7d:ce:32:8f
+ * 00:d8:b9:3a:38:6c:79:cd:0b:1f:2b:34:74:bf:7a:
+ * 3d:0c:21:5a:a6:ea:f2:9e:de:68:42:05:7f:ea:a5:
+ * 00:c9:10:f8:fd:c5:05:8d:03:45:5d:4f:6f:fa:6e:
+ * 9d:ef:ad:8a:ec:83:d4:ed:57:f3:86:73:15:2f:d2:
+ * 67:70:d1:62:ef:1d:25:08:59:47:20:62:47:16:35:
+ * e1:57:38:bf:39:dd:fc:b9:c8:d8:23:53:e2:02:7d:
+ * 22:31:4c:66:72:96:df:d8:7c:01:2c:71:00:89:18:
+ * e9:8c:08:44:8c:64:1f:93:9b:7a:97:26:c9:50:d0:
+ * 87:b2:48:a8:19:71:e1:b3:ff
* exponent1:
- * 2c:57:8c:e8:43:26:aa:f8:fc:fd:52:1f:e5:42:7f:
- * 33:3d:78:7d:7c:0c:3c:40:11:7d:c9:14:c5:df:4b:
- * 9e:71:6e:b4:20:53:5a:52:af:29:72:55:11:96:fa:
- * 28:ee:62:c4:f6:9e:81:ce:7b:26:9d:d5:6e:1d:f2:
- * 4c:de:38:95
+ * 23:98:dd:35:70:5a:43:35:f5:ac:ba:d9:0a:f5:a0:
+ * 7b:bc:f5:95:55:a0:8c:86:96:c3:61:0e:17:6e:9f:
+ * af:79:9e:30:2a:48:7f:93:90:f4:8d:02:ce:fd:cf:
+ * 42:74:61:7e:54:46:2d:dd:b8:b0:bd:12:58:d1:85:
+ * c9:ca:7a:b9:b6:7c:35:2c:87:f1:26:1d:d8:0c:2c:
+ * 2e:70:0e:7f:ea:ac:5d:e8:e9:7e:9f:55:0b:6e:f3:
+ * bc:01:c3:d3:f8:0e:c9:c6:c7:8b:0a:65:53:10:82:
+ * 15:de:88:90:9d:ab:1e:ac:f3:ed:59:75:72:1b:01:
+ * ee:f9:77:cf:2b:64:11:a1
* exponent2:
- * 0c:3f:f5:49:23:03:68:80:75:31:83:fb:6b:93:a3:
- * ee:6e:95:40:d3:d1:ab:c0:09:7b:9b:c3:71:19:ce:
- * 69:ed:06:f5:d2:91:ad:5c:9e:17:13:b8:1a:c1:e3:
- * eb:ff:81:1e:9d:a3:3f:c9:d8:32:7f:5e:51:14:3b:
- * 0d:78:df:fd
+ * 00:9e:29:6f:87:c6:02:8d:d5:54:05:df:de:63:ee:
+ * fd:a6:60:a1:1b:b7:d3:20:86:07:68:47:43:37:26:
+ * fc:0f:c0:c7:35:cc:17:64:f5:c2:25:7a:d7:a9:d8:
+ * 18:82:d6:0f:d0:d3:d5:0c:f1:66:d3:f4:20:be:29:
+ * bb:3b:e6:53:61:55:cf:b4:ec:12:b0:5b:88:ad:78:
+ * dc:df:1e:96:cf:d0:65:a3:e0:23:7c:84:b7:28:41:
+ * d2:36:50:1f:63:f9:1f:9b:89:c4:01:7e:e6:79:27:
+ * 29:29:fc:ce:a9:f6:57:e5:0d:4e:c6:08:94:5a:da:
+ * 14:6d:d4:00:79:b1:56:9a:59
* coefficient:
- * 01:0c:cc:95:69:ca:19:23:bc:a7:24:c3:b6:74:31:
- * de:14:4c:a1:49:0e:12:19:8d:ab:86:d0:84:b9:18:
- * aa:d9:d8:15:ca:a9:51:0d:aa:32:35:be:36:23:56:
- * 93:91:e7:4e:b3:12:dc:bf:44:74:9a:1b:31:4c:da:
- * 35:92:f2:e3
+ * 6c:73:0d:fe:c7:22:15:5d:8c:a1:91:2b:d1:88:e8:
+ * 91:f9:d0:3e:d0:ba:c4:74:88:ce:14:20:4e:1e:4b:
+ * c5:91:8f:c1:56:e9:74:e0:f6:cf:71:91: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/nb5YQ0wurdvWMs+OtQVVOYvhAQKBgQDx2sKK5WZFihT8CG77
+ * qlDSjLHE9Igm1LjEYzDK4wxsUNSTXBwTN2AhETvR8Z9MDXsOUz3JpPv6a560Cl3T
+ * UIjXvsOIsrGKbnvWcIiWpP6Q79GEraienzpoPz+CB77CRB7Voaka2znXfwxuNVsd
+ * MxupzTgqZNFwKv65wrbtWRlzsQKBgQDYuTo4bHnNCx8rNHS/ej0MIVqm6vKe3mhC
+ * BX/qpQDJEPj9xQWNA0VdT2/6bp3vrYrsg9TtV/OGcxUv0mdw0WLvHSUIWUcgYkcW
+ * NeFXOL853fy5yNgjU+ICfSIxTGZylt/YfAEscQCJGOmMCESMZB+Tm3qXJslQ0Iey
+ * SKgZceGz/wKBgCOY3TVwWkM19ay62Qr1oHu89ZVVoIyGlsNhDhdun695njAqSH+T
+ * kPSNAs79z0J0YX5URi3duLC9EljRhcnKerm2fDUsh/EmHdgMLC5wDn/qrF3o6X6f
+ * VQtu87wBw9P4DsnGx4sKZVMQghXeiJCdqx6s8+1ZdXIbAe75d88rZBGhAoGBAJ4p
+ * b4fGAo3VVAXf3mPu/aZgoRu30yCGB2hHQzcm/A/AxzXMF2T1wiV616nYGILWD9DT
+ * 1QzxZtP0IL4puzvmU2FVz7TsErBbiK143N8els/QZaPgI3yEtyhB0jZQH2P5H5uJ
+ * xAF+5nknKSn8zqn2V+UNTsYIlFraFG3UAHmxVppZAoGAbHMN/sciFV2MoZEr0Yjo
+ * kfnQPtC6xHSIzhQgTh5LxZGPwVbpdOD2z3GR7Sz1kJ3WyM31edxus4M++ta0YNk6
+ * UhJ2nZL72ybuQzPEC4R0G5HgQYvMzCTaUq8tQucRVw2qZq8ausKOau6PLOZbdjiW
+ * u3ovWf7eoQL8EjqqnzwOpHg=
+ * -----END PRIVATE KEY-----
*
* client certificate:
- * Data:
- * Version: 3 (0x2)
- * Serial Number: 9 (0x9)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 03:43:24 2008 GMT
- * Not After : Aug 25 03:43:24 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, OU=SSL-Client, CN=localhost
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:bb:f0:40:36:ac:26:54:4e:f4:a3:5a:00:2f:69:
- * 21:6f:b9:7a:3a:93:ec:a2:f6:e1:8e:c7:63:d8:2f:
- * 12:30:99:2e:b0:f2:8f:f8:27:2d:24:78:28:84:f7:
- * 01:bf:8d:44:79:dd:3b:d2:55:f3:ce:3c:b2:5b:21:
- * 7d:ef:fd:33:4a:b1:a3:ff:c6:c8:9b:b9:0f:7c:41:
- * 35:97:f9:db:3a:05:60:05:15:af:59:17:92:a3:10:
- * ad:16:1c:e4:07:53:af:a8:76:a2:56:2a:92:d3:f9:
- * 28:e0:78:cf:5e:1f:48:ab:5c:19:dd:e1:67:43:ba:
- * 75:8d:f5:82:ac:43:92:44:1b
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Basic Constraints:
- * CA:FALSE
- * X509v3 Key Usage:
- * Digital Signature, Non Repudiation, Key Encipherment
- * X509v3 Subject Key Identifier:
- * CD:BB:C8:85:AA:91:BD:FD:1D:BE:CD:67:7C:FF:B3:E9:4C:A8:22:E6
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- *
- * X509v3 Subject Alternative Name: critical
- * DNS:localhost
- * Signature Algorithm: md5WithRSAEncryption
- *
+ * Data:
+ * Version: 3 (0x2)
+ * Serial Number: 1500699355 (0x5972dadb)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:52 2024 GMT
+ * Not After : Jul 2 04:16:52 2034 GMT
+ * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org, CN=localhost ou=SSL-Client
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:cc:bf:92:3c:a6:57:74:1f:58:ad:c7:69:88:6f:
+ * 59:32:47:50:60:22:e4:98:49:0e:3e:1d:b8:ba:e2:
+ * 3b:b6:71:5b:fd:64:02:6d:0d:50:77:72:6e:a8:3d:
+ * 5d:d4:bd:1f:76:51:dc:9a:d0:d6:3e:d0:31:a5:24:
+ * 5a:2c:be:77:fa:88:a1:fa:06:41:c8:0f:47:70:47:
+ * 24:99:50:52:44:5b:30:62:5b:65:35:c4:28:b0:5c:
+ * ee:d0:1b:eb:39:2b:0b:a1:ac:96:48:da:56:6c:e0:
+ * e3:e6:e3:dd:45:cb:51:33:8d:40:43:d7:f0:a4:31:
+ * aa:b5:c0:df:4b:df:2b:0a:ed:7e:10:0c:ae:1f:96:
+ * a2:10:1e:6b:d0:f9:37:8b:df:0d:0e:02:35:f8:58:
+ * bc:6e:b5:57:0e:2f:ea:20:e6:73:9a:e5:6b:82:70:
+ * 25:bb:51:9a:7c:9d:e2:50:3d:cf:1e:24:3e:92:55:
+ * cf:2a:ad:0d:84:8f:a8:43:24:cd:ad:50:64:74:c2:
+ * 73:b6:e1:92:1c:b2:2b:8c:2d:7b:96:a6:41:61:5c:
+ * 1b:8f:78:28:51:40:ed:41:90:ce:1d:b8:26:81:47:
+ * 6b:e3:57:41:74:4e:20:f0:5a:1b:97:37:91:86:19:
+ * c5:f2:6d:04:c9:78:2b:5a:16:bc:fc:2b:71:5b:d0:
+ * 00:4f
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * CD:45:E2:05:92:88:A3:C7:49:28:E7:D3:37:B7:13:92:FB:B1:36:C4
+ * X509v3 Key Usage:
+ * Digital Signature, Non Repudiation, Key Encipherment
+ * X509v3 Subject Alternative Name: critical
+ * DNS:localhost
+ * X509v3 Basic Constraints:
+ * CA:FALSE
+ * X509v3 Authority Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 23:6e:e9:5d:80:0d:b3:86:c9:cd:17:81:33:bd:5b:aa:c0:65:
+ * 4c:6b:9f:fa:ee:32:e9:89:e1:d0:c7:1d:5c:43:7e:94:ac:83:
+ * af:91:90:4c:26:61:8d:fe:6b:1a:aa:6e:61:39:b3:24:4a:dc:
+ * 92:c8:ca:f2:80:b0:05:41:0c:b3:dd:ed:b7:81:42:9a:1e:4e:
+ * f2:80:6c:72:62:8b:bd:d4:cd:23:7d:7c:e8:6f:e3:67:89:6a:
+ * 79:19:dd:f6:57:62:12:fa:eb:cd:66:c3:d2:d8:40:5a:1c:dd:
+ * 7f:9f:b2:34:e9:2a:d6:14:52:ba:6e:a8:9b:0d:a9:a1:03:bf:
+ * c4:0d:92:3d:59:e4:a9:8e:20:41:39:99:81:70:9d:d0:68:98:
+ * fc:5f:49:4a:92:e5:a2:c1:51:61:f6:1e:49:56:0b:b6:8c:57:
+ * db:08:2a:f0:a3:04:dc:a1:04:a2:5c:d0:90:4f:13:8d:1c:e6:
+ * 2e:7a:63:9c:32:40:65:59:04:5d:71:90:5a:a8:db:6a:30:42:
+ * 57:5b:0b:df:ce:a1:1f:fa:23:71:f3:57:12:c4:1c:66:3b:37:
+ * 77:32:28:a7:fb:ad:ee:86:51:4c:80:2f:dd:c8:5b:9f:a7:15:
+ * 07:fa:2b:5a:ee:93:00:5f:a6:43:22:1b:40:52:15:66:01:84:
+ * 32:9e:71:21
* -----BEGIN CERTIFICATE-----
- * MIICpDCCAg2gAwIBAgIBCTANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET
- * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK
-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IbQFIVZgGEMp5xIQ==
* -----END CERTIFICATE-----
*
*
- *
* Trusted CA certificate:
* Certificate:
* Data:
- * Version: 3 (0x2)
- * Serial Number: 0 (0x0)
- * Signature Algorithm: md5WithRSAEncryption
- * Issuer: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Validity
- * Not Before: Dec 8 02:43:36 2008 GMT
- * Not After : Aug 25 02:43:36 2028 GMT
- * Subject: C=US, ST=Some-State, L=Some-City, O=Some-Org
- * Subject Public Key Info:
- * Public Key Algorithm: rsaEncryption
- * RSA Public Key: (1024 bit)
- * Modulus (1024 bit):
- * 00:cb:c4:38:20:07:be:88:a7:93:b0:a1:43:51:2d:
- * d7:8e:85:af:54:dd:ad:a2:7b:23:5b:cf:99:13:53:
- * 99:45:7d:ee:6d:ba:2d:bf:e3:ad:6e:3d:9f:1a:f9:
- * 03:97:e0:17:55:ae:11:26:57:de:01:29:8e:05:3f:
- * 21:f7:e7:36:e8:2e:37:d7:48:ac:53:d6:60:0e:c7:
- * 50:6d:f6:c5:85:f7:8b:a6:c5:91:35:72:3c:94:ee:
- * f1:17:f0:71:e3:ec:1b:ce:ca:4e:40:42:b0:6d:ee:
- * 6a:0e:d6:e5:ad:3c:0f:c9:ba:82:4f:78:f8:89:97:
- * 89:2a:95:12:4c:d8:09:2a:e9
- * Exponent: 65537 (0x10001)
- * X509v3 extensions:
- * X509v3 Subject Key Identifier:
- * FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- * X509v3 Authority Key Identifier:
- * keyid:FA:B9:51:BF:4C:E7:D9:86:98:33:F9:E7:CB:1E:F1:33:49:F7:A8:14
- * DirName:/C=US/ST=Some-State/L=Some-City/O=Some-Org
- * serial:00
- *
- * X509v3 Basic Constraints:
- * CA:TRUE
- * Signature Algorithm: md5WithRSAEncryption
- *
+ * Version: 3 (0x2)
+ * Serial Number: 1539881479 (0x5bc8ba07)
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Issuer: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Validity
+ * Not Before: Jul 1 04:16:50 2024 GMT
+ * Not After : Jul 2 04:16:50 2034 GMT
+ * Subject: C=Us, ST=Some-State, L=Some-City, O=Some-Org
+ * Subject Public Key Info:
+ * Public Key Algorithm: rsaEncryption
+ * Public-Key: (2048 bit)
+ * Modulus:
+ * 00:bc:a6:55:60:3f:17:74:39:ba:71:8c:ef:11:3f:
+ * 9d:36:47:d5:02:d1:4d:9d:7e:b8:fe:59:b1:2b:f1:
+ * b7:b0:0c:31:57:eb:9c:9d:13:f5:4c:5f:fc:c4:9e:
+ * f9:75:09:0f:96:8f:05:77:30:a8:35:48:71:96:e4:
+ * a5:7d:1a:81:fb:e6:bf:90:80:60:5d:11:20:54:16:
+ * 0b:6d:df:64:de:18:d5:98:51:38:9d:c9:d6:5f:de:
+ * 9d:de:fe:a8:5f:d3:25:3d:ad:f3:2b:45:c8:4a:80:
+ * 97:14:7b:85:9d:cf:59:08:bb:c7:67:ac:8b:29:f3:
+ * 1e:93:bf:fb:82:53:c5:ae:b4:bc:55:30:15:a8:7e:
+ * 3f:82:22:59:43:cc:d2:62:e7:65:67:72:ec:10:8a:
+ * fc:05:90:91:72:dd:e9:6f:e2:9f:0c:ab:a1:83:55:
+ * 02:23:b7:a3:c3:50:ab:be:0b:bb:51:75:50:d1:a8:
+ * c9:e5:f5:06:fe:00:09:a6:1b:8a:16:29:0d:ab:00:
+ * 3e:bc:d2:73:d9:37:d7:d9:9a:58:6e:2d:2a:f6:76:
+ * ae:f4:ea:6d:70:de:7f:e3:04:43:c0:4f:91:3f:78:
+ * 58:d7:c2:ad:74:eb:04:9d:d0:7e:82:b8:7a:97:44:
+ * 61:fa:41:45:a6:ca:7d:a5:2e:fc:f9:a6:cf:61:cd:
+ * 75:bf
+ * Exponent: 65537 (0x10001)
+ * X509v3 extensions:
+ * X509v3 Subject Key Identifier:
+ * E0:03:90:F6:4F:BB:57:E6:7E:AF:5C:94:25:B3:85:DA:16:0A:51:40
+ * X509v3 Basic Constraints: critical
+ * CA:TRUE
+ * Signature Algorithm: sha1WithRSAEncryption
+ * Signature Value:
+ * 1f:89:34:e3:ee:05:33:3b:18:ca:96:13:3d:ad:cd:5a:e6:24:
+ * 46:94:36:ad:37:a5:36:a9:92:37:f9:ed:07:dd:44:5b:c9:2e:
+ * 68:f7:82:f3:58:1c:64:ed:64:d0:ad:eb:30:15:e0:04:3a:d7:
+ * c8:c7:9d:65:76:ae:84:e4:2e:2d:0d:68:09:0d:e5:ae:cc:a7:
+ * 54:86:ad:ff:00:95:85:01:49:db:5b:8e:c2:6f:e7:19:10:17:
+ * f7:03:b9:a8:97:21:a2:fc:7f:c0:e0:7a:12:64:b8:70:f5:e8:
+ * b6:e1:25:f7:eb:32:3e:46:ce:43:55:fc:0b:62:59:90:61:63:
+ * f9:94:6c:95:63:31:1b:00:59:1f:72:9d:d0:0b:4f:cd:02:eb:
+ * de:20:4e:60:48:4e:ea:ad:3c:0f:1d:bf:1a:69:3d:a8:3d:8b:
+ * f5:a2:ae:8c:4f:d7:0e:b3:e1:9b:b3:2c:89:19:18:da:db:e1:
+ * 6d:d5:ab:c8:b8:48:57:d8:8b:33:01:d4:97:91:d9:da:34:a1:
+ * ef:36:00:e1:38:19:34:8f:0d:47:af:57:cf:59:d6:8b:0d:9e:
+ * 89:05:82:3d:3c:f3:45:1d:4a:3f:0e:0f:5a:28:6f:5c:e1:e9:
+ * 60:72:87:28:b6:97:44:8b:d7:c6:cd:cb:dc:5a:5d:60:f1:b4:
+ * 37:ee:44:db
* -----BEGIN CERTIFICATE-----
- * MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET
- * MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK
- * EwhTb21lLU9yZzAeFw0wODEyMDgwMjQzMzZaFw0yODA4MjUwMjQzMzZaMEkxCzAJ
- * BgNVBAY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ANBgkqhkiG9w0BAQEFAAOCAQ8A
+ * MIIBCgKCAQEAvKZVYD8XdDm6cYzvET+dNkfVAtFNnX64/lmxK/G3sAwxV+ucnRP1
+ * TF/8xJ75dQkPlo8FdzCoNUhxluSlfRqB++a/kIBgXREgVBYLbd9k3hjVmFE4ncnW
+ * X96d3v6oX9MlPa3zK0XISoCXFHuFnc9ZCLvHZ6yLKfMek7/7glPFrrS8VTAVqH4/
+ * giJZQ8zSYudlZ3LsEIr8BZCRct3pb+KfDKuhg1UCI7ejw1Crvgu7UXVQ0ajJ5fUG
+ * /gAJphuKFikNqwA+vNJz2TfX2ZpYbi0q9nau9OptcN5/4wRDwE+RP3hY18KtdOsE
+ * ndB+grh6l0Rh+kFFpsp9pS78+abPYc11vwIDAQABozIwMDAdBgNVHQ4EFgQU4AOQ
+ * 9k+7V+Z+r1yUJbOF2hYKUUAwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQUF
+ * AAOCAQEAH4k04+4FMzsYypYTPa3NWuYkRpQ2rTelNqmSN/ntB91EW8kuaPeC81gc
+ * ZO1k0K3rMBXgBDrXyMedZXauhOQuLQ1oCQ3lrsynVIat/wCVhQFJ21uOwm/nGRAX
+ * 9wO5qJchovx/wOB6EmS4cPXotuEl9+syPkbOQ1X8C2JZkGFj+ZRslWMxGwBZH3Kd
+ * 0AtPzQLr3iBOYEhO6q08Dx2/Gmk9qD2L9aKujE/XDrPhm7MsiRkY2tvhbdWryLhI
+ * V9iLMwHUl5HZ2jSh7zYA4TgZNI8NR69Xz1nWiw2eiQWCPTzzRR1KPw4PWihvXOHp
+ * YHKHKLaXRIvXxs3L3FpdYPG0N+5E2w==
* -----END CERTIFICATE---
*/
-
public class SunX509ExtendedTM {
/*
@@ -423,201 +563,342 @@ public class SunX509ExtendedTM {
*/
static String trusedCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICrDCCAhWgAwIBAgIBADANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUz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Ul5HZ2jSh7zYA4TgZNI8NR69Xz1nWiw2eiQWCPTzzRR1KPw4PWihvXOHp\n" +
+ "YHKHKLaXRIvXxs3L3FpdYPG0N+5E2w==\n" +
"-----END CERTIFICATE-----";
static String serverCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICpDCCAg2gAwIBAgIBCDANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
- "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
- "EwhTb21lLU9yZzAeFw0wODEyMDgwMzQzMDRaFw0yODA4MjUwMzQzMDRaMHIxCzAJ\n" +
- "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
- "dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtU2VydmVyMRIwEAYD\n" +
- "VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKWsWxw3\n" +
- "ot2ZiS2yebiP1Uil5xyEF41pnMasbfnyHR85GdrTch5u7ETMcKTcugAw9qBPPVR6\n" +
- "YWrMV9AKf5UoGD+a2ZTyG8gkiH7+nQ89+1dTCLMgM9Q/F0cU0c3qCNgOdU6vvszS\n" +
- "7K+peknfwtmsuCRAkKYDVirQMAVALE+r2XSJAgMBAAGjczBxMAkGA1UdEwQCMAAw\n" +
- "CwYDVR0PBAQDAgXgMB0GA1UdDgQWBBTtbtv0tVbI+xoGYT8PCLumBNgWVDAfBgNV\n" +
- "HSMEGDAWgBT6uVG/TOfZhpgz+efLHvEzSfeoFDAXBgNVHREBAf8EDTALgglsb2Nh\n" +
- "bGhvc3QwDQYJKoZIhvcNAQEEBQADgYEAoqVTciHtcvsUj+YaTct8tUh3aTCsKsac\n" +
- "PHhfQ+ObjiXSgxsKYTX7ym/wk/wvlbUcbqLKxsu7qrcJitH+H9heV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BTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B\n" +
+ "AQUFAAOCAQEAnSJJX1Yj5oA1zKtEHCe9yY2Jk0lY6MF6aN3PveASdgZUzS9im1SE\n" +
+ "8ruQoLs34hMd899BquD+wO9GeI2q9BtwrakWJPoVSsYKjeGZkwCp1LYIXY5lA9zQ\n" +
+ "lfyVYaattatNpuAFSIzbQkKK1l7AKqARFbgHaVw/maC9U2XbTs9GYZMJe4FA/1z+\n" +
+ "TOv0rN4fOK2yYCj2Dp9G5wePIJqk4Y+rVJl2gtiecMTamIVxrztU5AG0noPQe8aN\n" +
+ "H+0lCIkF6YeXdlqjhcP4Wde7O1rby+1d/6whuZriZQq83tHcU5SYRJeRsxtrgAub\n" +
+ "V7OuXHw1yjlx906PStfrCyXash4XSLjrCQ==\n" +
"-----END CERTIFICATE-----";
static String clientCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICpDCCAg2gAwIBAgIBCTANBgkqhkiG9w0BAQQFADBJMQswCQYDVQQGEwJVUzET\n" +
- "MBEGA1UECBMKU29tZS1TdGF0ZTESMBAGA1UEBxMJU29tZS1DaXR5MREwDwYDVQQK\n" +
- "EwhTb21lLU9yZzAeFw0wODEyMDgwMzQzMjRaFw0yODA4MjUwMzQzMjRaMHIxCzAJ\n" +
- "BgNVBAYTAlVTMRMwEQYDVQQIEwpTb21lLVN0YXRlMRIwEAYDVQQHEwlTb21lLUNp\n" +
- "dHkxETAPBgNVBAoTCFNvbWUtT3JnMRMwEQYDVQQLEwpTU0wtQ2xpZW50MRIwEAYD\n" +
- "VQQDEwlsb2NhbGhvc3QwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBALvwQDas\n" +
- "JlRO9KNaAC9pIW+5ejqT7KL24Y7HY9gvEjCZLrDyj/gnLSR4KIT3Ab+NRHndO9JV\n" +
- "8848slshfe/9M0qxo//GyJu5D3xBNZf52zoFYAUVr1kXkqMQrRYc5AdTr6h2olYq\n" +
- "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hAMrh+WohAea9D5N4vfDQ4CNfhY\n" +
+ "vG61Vw4v6iDmc5rla4JwJbtRmnyd4lA9zx4kPpJVzyqtDYSPqEMkza1QZHTCc7bh\n" +
+ "khyyK4wte5amQWFcG494KFFA7UGQzh24JoFHa+NXQXROIPBaG5c3kYYZxfJtBMl4\n" +
+ "K1oWvPwrcVvQAE8CAwEAAaNzMHEwHQYDVR0OBBYEFM1F4gWSiKPHSSjn0ze3E5L7\n" +
+ "sTbEMAsGA1UdDwQEAwIF4DAXBgNVHREBAf8EDTALgglsb2NhbGhvc3QwCQYDVR0T\n" +
+ "BAIwADAfBgNVHSMEGDAWgBTgA5D2T7tX5n6vXJQls4XaFgpRQDANBgkqhkiG9w0B\n" +
+ "AQUFAAOCAQEAI27pXYANs4bJzReBM71bqsBlTGuf+u4y6Ynh0McdXEN+lKyDr5GQ\n" +
+ "TCZhjf5rGqpuYTmzJErcksjK8oCwBUEMs93tt4FCmh5O8oBscmKLvdTNI3186G/j\n" +
+ "Z4lqeRnd9ldiEvrrzWbD0thAWhzdf5+yNOkq1hRSum6omw2poQO/xA2SPVnkqY4g\n" +
+ "QTmZgXCd0GiY/F9JSpLlosFRYfYeSVYLtoxX2wgq8KME3KEEolzQkE8TjRzmLnpj\n" +
+ "nDJAZVkEXXGQWqjbajBCV1sL386hH/ojcfNXEsQcZjs3dzIop/ut7oZRTIAv3chb\n" +
+ "n6cVB/orWu6TAF+mQyIbQFIVZgGEMp5xIQ==\n" +
"-----END CERTIFICATE-----";
static byte serverPrivateExponent[] = {
- (byte)0x6e, (byte)0xa7, (byte)0x1b, (byte)0x83,
- (byte)0x51, (byte)0x35, (byte)0x9a, (byte)0x44,
- (byte)0x7d, (byte)0xf6, (byte)0xe3, (byte)0x89,
- (byte)0xa0, (byte)0xd7, (byte)0x90, (byte)0x60,
- (byte)0xa1, (byte)0x4e, (byte)0x27, (byte)0x21,
- (byte)0xa2, (byte)0x89, (byte)0x74, (byte)0xcc,
- (byte)0x9d, (byte)0x75, (byte)0x75, (byte)0x4e,
- (byte)0xc7, (byte)0x82, (byte)0xe3, (byte)0xe3,
- (byte)0xc3, (byte)0x7d, (byte)0x00, (byte)0x54,
- (byte)0xec, (byte)0x36, (byte)0xb1, (byte)0xdf,
- (byte)0x91, (byte)0x9c, (byte)0x7a, (byte)0xc0,
- (byte)0x62, (byte)0x0a, (byte)0xd6, (byte)0xa9,
- (byte)0x22, (byte)0x91, (byte)0x4a, (byte)0x29,
- (byte)0x2e, (byte)0x43, (byte)0xfa, (byte)0x8c,
- (byte)0xd8, (byte)0xe9, (byte)0xbe, (byte)0xd9,
- (byte)0x4f, (byte)0xca, (byte)0x23, (byte)0xc6,
- (byte)0xe4, (byte)0x3f, (byte)0xb8, (byte)0x72,
- (byte)0xcf, (byte)0x02, (byte)0xfc, (byte)0xf4,
- (byte)0x58, (byte)0x34, (byte)0x77, (byte)0x76,
- (byte)0xce, (byte)0x22, (byte)0x44, (byte)0x5f,
- (byte)0x2d, (byte)0xca, (byte)0xee, (byte)0xf5,
- (byte)0x43, (byte)0x56, (byte)0x47, (byte)0x71,
- (byte)0x0b, (byte)0x09, (byte)0x6b, (byte)0x5e,
- (byte)0xf2, (byte)0xc8, (byte)0xee, (byte)0xd4,
- (byte)0x6e, (byte)0x44, (byte)0x92, (byte)0x2a,
- (byte)0x7f, (byte)0xcc, (byte)0xa7, (byte)0xd4,
- (byte)0x5b, (byte)0xfb, (byte)0xf7, (byte)0x4a,
- (byte)0xa9, (byte)0xfb, (byte)0x54, (byte)0x18,
- (byte)0xd5, (byte)0xd5, (byte)0x14, (byte)0xba,
- (byte)0xa0, (byte)0x1c, (byte)0x13, (byte)0xb3,
- (byte)0x37, (byte)0x6b, (byte)0x37, (byte)0x59,
- (byte)0xed, (byte)0xdb, (byte)0x6d, (byte)0xb1
+ (byte)0x68, (byte)0x87, (byte)0x36, (byte)0x54,
+ (byte)0xa3, (byte)0xc6, (byte)0xd5, (byte)0x5f,
+ (byte)0xf5, (byte)0x0f, (byte)0x4f, (byte)0x76,
+ (byte)0xc8, (byte)0x9c, (byte)0x2b, (byte)0x5b,
+ (byte)0xdc, (byte)0xe2, (byte)0xbe, (byte)0x14,
+ (byte)0x12, (byte)0x2f, (byte)0xc7, (byte)0x0a,
+ (byte)0xa9, (byte)0xcb, (byte)0x5e, (byte)0x04,
+ (byte)0x59, (byte)0xca, (byte)0x35, (byte)0x2f,
+ (byte)0x8d, (byte)0x2b, (byte)0xc4, (byte)0x40,
+ (byte)0xe6, (byte)0x7d, (byte)0x25, (byte)0x1b,
+ (byte)0x4d, (byte)0x07, (byte)0xc3, (byte)0x99,
+ (byte)0x9c, (byte)0x16, (byte)0x4f, (byte)0xa5,
+ (byte)0xdc, (byte)0xde, (byte)0xb0, (byte)0x90,
+ (byte)0xf0, (byte)0xde, (byte)0x22, (byte)0x70,
+ (byte)0x80, (byte)0xf4, (byte)0xa6, (byte)0x70,
+ (byte)0xe2, (byte)0x96, (byte)0x3d, (byte)0x18,
+ (byte)0x21, (byte)0xbf, (byte)0x2b, (byte)0x27,
+ (byte)0xa4, (byte)0x2d, (byte)0xd7, (byte)0xae,
+ (byte)0x2b, (byte)0x12, (byte)0x2f, (byte)0x08,
+ (byte)0x36, (byte)0xee, (byte)0x99, (byte)0x94,
+ (byte)0xed, (byte)0xf6, (byte)0xa7, (byte)0xd9,
+ (byte)0x1d, (byte)0xa2, (byte)0xf3, (byte)0x1f,
+ (byte)0x44, (byte)0xa4, (byte)0x28, (byte)0x4b,
+ (byte)0x67, (byte)0x35, (byte)0xd6, (byte)0xa8,
+ (byte)0x1b, (byte)0xf8, (byte)0x84, (byte)0x34,
+ (byte)0x34, (byte)0x84, (byte)0xbd, (byte)0xec,
+ (byte)0x9e, (byte)0x03, (byte)0x08, (byte)0x3c,
+ (byte)0x93, (byte)0x20, (byte)0x8e, (byte)0xaf,
+ (byte)0x15, (byte)0xcb, (byte)0x1f, (byte)0x20,
+ (byte)0x08, (byte)0x97, (byte)0xc4, (byte)0x19,
+ (byte)0x3e, (byte)0xfa, (byte)0x36, (byte)0xc6,
+ (byte)0xab, (byte)0x0e, (byte)0x2f, (byte)0xe7,
+ (byte)0xb3, (byte)0xc0, (byte)0xa7, (byte)0xbc,
+ (byte)0xe4, (byte)0xe0, (byte)0xa6, (byte)0x08,
+ (byte)0x1c, (byte)0x69, (byte)0x20, (byte)0x4d,
+ (byte)0x78, (byte)0xbd, (byte)0x7a, (byte)0xe5,
+ (byte)0x25, (byte)0x48, (byte)0x60, (byte)0x9e,
+ (byte)0x2e, (byte)0x50, (byte)0x8d, (byte)0x36,
+ (byte)0x1e, (byte)0x07, (byte)0xe9, (byte)0xd5,
+ (byte)0x0d, (byte)0x39, (byte)0x67, (byte)0x41,
+ (byte)0x42, (byte)0x24, (byte)0xdb, (byte)0x87,
+ (byte)0xe5, (byte)0x77, (byte)0x76, (byte)0xfd,
+ (byte)0x5e, (byte)0xd5, (byte)0xc6, (byte)0xe5,
+ (byte)0xd3, (byte)0xb0, (byte)0x98, (byte)0x71,
+ (byte)0x48, (byte)0x69, (byte)0x47, (byte)0x4f,
+ (byte)0x46, (byte)0x05, (byte)0x0c, (byte)0x9e,
+ (byte)0x58, (byte)0x45, (byte)0x2e, (byte)0xe2,
+ (byte)0x27, (byte)0xd0, (byte)0xf6, (byte)0x11,
+ (byte)0x05, (byte)0x78, (byte)0xad, (byte)0x83,
+ (byte)0x5a, (byte)0x5b, (byte)0xec, (byte)0xd7,
+ (byte)0x2e, (byte)0x26, (byte)0x5a, (byte)0xa5,
+ (byte)0x4f, (byte)0x9e, (byte)0x52, (byte)0x84,
+ (byte)0x2c, (byte)0x1f, (byte)0x59, (byte)0x1a,
+ (byte)0x78, (byte)0x56, (byte)0x0a, (byte)0x44,
+ (byte)0x54, (byte)0xc6, (byte)0x37, (byte)0x64,
+ (byte)0x01, (byte)0xca, (byte)0xe4, (byte)0xa8,
+ (byte)0x01, (byte)0xc7, (byte)0x86, (byte)0xc1,
+ (byte)0xb4, (byte)0xd6, (byte)0x6c, (byte)0x7a,
+ (byte)0x15, (byte)0x9a, (byte)0x65, (byte)0x69,
+ (byte)0x46, (byte)0x9e, (byte)0xfd, (byte)0xf6,
+ (byte)0x08, (byte)0x17, (byte)0x0c, (byte)0x6c,
+ (byte)0xac, (byte)0x38, (byte)0xbd, (byte)0xc2,
+ (byte)0xcd, (byte)0xda, (byte)0xef, (byte)0x54,
+ (byte)0x7a, (byte)0x48, (byte)0x92, (byte)0x4d
};
static byte serverModulus[] = {
- (byte)0x00,
- (byte)0xa5, (byte)0xac, (byte)0x5b, (byte)0x1c,
- (byte)0x37, (byte)0xa2, (byte)0xdd, (byte)0x99,
- (byte)0x89, (byte)0x2d, (byte)0xb2, (byte)0x79,
- (byte)0xb8, (byte)0x8f, (byte)0xd5, (byte)0x48,
- (byte)0xa5, (byte)0xe7, (byte)0x1c, (byte)0x84,
- (byte)0x17, (byte)0x8d, (byte)0x69, (byte)0x9c,
- (byte)0xc6, (byte)0xac, (byte)0x6d, (byte)0xf9,
- (byte)0xf2, (byte)0x1d, (byte)0x1f, (byte)0x39,
- (byte)0x19, (byte)0xda, (byte)0xd3, (byte)0x72,
- (byte)0x1e, (byte)0x6e, (byte)0xec, (byte)0x44,
- (byte)0xcc, (byte)0x70, (byte)0xa4, (byte)0xdc,
- (byte)0xba, (byte)0x00, (byte)0x30, (byte)0xf6,
- (byte)0xa0, (byte)0x4f, (byte)0x3d, (byte)0x54,
- (byte)0x7a, (byte)0x61, (byte)0x6a, (byte)0xcc,
- (byte)0x57, (byte)0xd0, (byte)0x0a, (byte)0x7f,
- (byte)0x95, (byte)0x28, (byte)0x18, (byte)0x3f,
- (byte)0x9a, (byte)0xd9, (byte)0x94, (byte)0xf2,
- (byte)0x1b, (byte)0xc8, (byte)0x24, (byte)0x88,
- (byte)0x7e, (byte)0xfe, (byte)0x9d, (byte)0x0f,
- (byte)0x3d, (byte)0xfb, (byte)0x57, (byte)0x53,
- (byte)0x08, (byte)0xb3, (byte)0x20, (byte)0x33,
- (byte)0xd4, (byte)0x3f, (byte)0x17, (byte)0x47,
- (byte)0x14, (byte)0xd1, (byte)0xcd, (byte)0xea,
- (byte)0x08, (byte)0xd8, (byte)0x0e, (byte)0x75,
- (byte)0x4e, (byte)0xaf, (byte)0xbe, (byte)0xcc,
- (byte)0xd2, (byte)0xec, (byte)0xaf, (byte)0xa9,
- (byte)0x7a, (byte)0x49, (byte)0xdf, (byte)0xc2,
- (byte)0xd9, (byte)0xac, (byte)0xb8, (byte)0x24,
- (byte)0x40, (byte)0x90, (byte)0xa6, (byte)0x03,
- (byte)0x56, (byte)0x2a, (byte)0xd0, (byte)0x30,
- (byte)0x05, (byte)0x40, (byte)0x2c, (byte)0x4f,
- (byte)0xab, (byte)0xd9, (byte)0x74, (byte)0x89
+ (byte)0x00, (byte)0x9a, (byte)0x0c, (byte)0xe0,
+ (byte)0x8f, (byte)0xa8, (byte)0x02, (byte)0x7e,
+ (byte)0x5a, (byte)0xef, (byte)0xed, (byte)0xb2,
+ (byte)0x42, (byte)0xad, (byte)0x08, (byte)0x4e,
+ (byte)0x91, (byte)0xba, (byte)0xc2, (byte)0xad,
+ (byte)0x9b, (byte)0x79, (byte)0xd7, (byte)0x9b,
+ (byte)0x0f, (byte)0xfd, (byte)0xd2, (byte)0xf8,
+ (byte)0x15, (byte)0x2f, (byte)0x19, (byte)0x89,
+ (byte)0x80, (byte)0x10, (byte)0x00, (byte)0x02,
+ (byte)0x19, (byte)0x6d, (byte)0x27, (byte)0xc2,
+ (byte)0x90, (byte)0xd7, (byte)0xa5, (byte)0x23,
+ (byte)0x53, (byte)0x74, (byte)0x6e, (byte)0x64,
+ (byte)0x28, (byte)0x7c, (byte)0x24, (byte)0xaa,
+ (byte)0xed, (byte)0xea, (byte)0x21, (byte)0x59,
+ (byte)0xdc, (byte)0xa3, (byte)0x5c, (byte)0xb5,
+ (byte)0xc9, (byte)0x42, (byte)0x31, (byte)0x4f,
+ (byte)0xa2, (byte)0xde, (byte)0xfb, (byte)0x09,
+ (byte)0x7c, (byte)0x73, (byte)0xed, (byte)0x88,
+ (byte)0x04, (byte)0x34, (byte)0xf1, (byte)0x15,
+ (byte)0xad, (byte)0x3d, (byte)0x60, (byte)0xcd,
+ (byte)0xca, (byte)0xc5, (byte)0x13, (byte)0x99,
+ (byte)0xd3, (byte)0x9f, (byte)0x9b, (byte)0xb2,
+ (byte)0x92, (byte)0x70, (byte)0xcb, (byte)0xba,
+ (byte)0x4b, (byte)0x3d, (byte)0x20, (byte)0x96,
+ (byte)0xad, (byte)0xbe, (byte)0x92, (byte)0x53,
+ (byte)0xed, (byte)0x54, (byte)0x3b, (byte)0xc5,
+ (byte)0x14, (byte)0xbd, (byte)0xcf, (byte)0xd4,
+ (byte)0x0f, (byte)0xcb, (byte)0x05, (byte)0x4f,
+ (byte)0xfd, (byte)0x2b, (byte)0x9e, (byte)0xe0,
+ (byte)0x50, (byte)0xbb, (byte)0x65, (byte)0x13,
+ (byte)0x92, (byte)0xc0, (byte)0xd6, (byte)0xbd,
+ (byte)0x4d, (byte)0x02, (byte)0x0c, (byte)0x70,
+ (byte)0xb6, (byte)0x65, (byte)0xd4, (byte)0x7d,
+ (byte)0xb4, (byte)0x4d, (byte)0xc3, (byte)0xdf,
+ (byte)0x2c, (byte)0x08, (byte)0x9e, (byte)0xd2,
+ (byte)0x3e, (byte)0x69, (byte)0x32, (byte)0x46,
+ (byte)0x6f, (byte)0x6f, (byte)0xca, (byte)0xd1,
+ (byte)0x73, (byte)0xa4, (byte)0x94, (byte)0x07,
+ (byte)0xef, (byte)0x14, (byte)0xe3, (byte)0xda,
+ (byte)0x9e, (byte)0x2f, (byte)0xc0, (byte)0xac,
+ (byte)0x0e, (byte)0x10, (byte)0x33, (byte)0x4c,
+ (byte)0x68, (byte)0x79, (byte)0xf3, (byte)0x79,
+ (byte)0x40, (byte)0xd6, (byte)0xe9, (byte)0x3c,
+ (byte)0xc2, (byte)0xe6, (byte)0x70, (byte)0xe0,
+ (byte)0x89, (byte)0xce, (byte)0xa0, (byte)0x7a,
+ (byte)0xa8, (byte)0x84, (byte)0x28, (byte)0x85,
+ (byte)0x32, (byte)0x37, (byte)0x08, (byte)0xb0,
+ (byte)0xcf, (byte)0xb1, (byte)0x7f, (byte)0x5f,
+ (byte)0xbc, (byte)0x1f, (byte)0xa5, (byte)0x3d,
+ (byte)0xef, (byte)0xd6, (byte)0x68, (byte)0xa8,
+ (byte)0x17, (byte)0x21, (byte)0x5f, (byte)0x87,
+ (byte)0xd5, (byte)0x4b, (byte)0xb5, (byte)0xcc,
+ (byte)0xee, (byte)0x78, (byte)0x8d, (byte)0xdd,
+ (byte)0xb1, (byte)0x28, (byte)0x6a, (byte)0xc0,
+ (byte)0xfb, (byte)0x64, (byte)0xbd, (byte)0xb7,
+ (byte)0x70, (byte)0x02, (byte)0x33, (byte)0x03,
+ (byte)0x0b, (byte)0xb8, (byte)0xb8, (byte)0xbb,
+ (byte)0x08, (byte)0x82, (byte)0xf6, (byte)0x8e,
+ (byte)0x05, (byte)0x27, (byte)0xd1, (byte)0x3b,
+ (byte)0xe6, (byte)0xc5, (byte)0xac, (byte)0x4d,
+ (byte)0x85, (byte)0x5b, (byte)0xa1, (byte)0x1d,
+ (byte)0xa3, (byte)0x48, (byte)0x5d, (byte)0x03,
+ (byte)0x15, (byte)0x76, (byte)0x63, (byte)0x6c,
+ (byte)0x71, (byte)0x21, (byte)0x3e, (byte)0x98,
+ (byte)0xcd
};
static byte clientPrivateExponent[] = {
- (byte)0x11, (byte)0xb7, (byte)0x6a, (byte)0x36,
- (byte)0x3d, (byte)0x30, (byte)0x37, (byte)0xce,
- (byte)0x61, (byte)0x9d, (byte)0x6c, (byte)0x84,
- (byte)0x8b, (byte)0xf3, (byte)0x9b, (byte)0x25,
- (byte)0x4f, (byte)0x14, (byte)0xc8, (byte)0xa4,
- (byte)0xdd, (byte)0x2f, (byte)0xd7, (byte)0x9a,
- (byte)0x17, (byte)0xbd, (byte)0x90, (byte)0x19,
- (byte)0xf7, (byte)0x05, (byte)0xfd, (byte)0xf2,
- (byte)0xd2, (byte)0xc5, (byte)0xf7, (byte)0x77,
- (byte)0xbe, (byte)0xea, (byte)0xe2, (byte)0x84,
- (byte)0x87, (byte)0x97, (byte)0x3a, (byte)0x41,
- (byte)0x96, (byte)0xb6, (byte)0x99, (byte)0xf8,
- (byte)0x94, (byte)0x8c, (byte)0x58, (byte)0x71,
- (byte)0x51, (byte)0x8c, (byte)0xf4, (byte)0x2a,
- (byte)0x20, (byte)0x9e, (byte)0x1a, (byte)0xa0,
- (byte)0x26, (byte)0x99, (byte)0x75, (byte)0xd6,
- (byte)0x31, (byte)0x53, (byte)0x43, (byte)0x39,
- (byte)0xf5, (byte)0x2a, (byte)0xa6, (byte)0x7e,
- (byte)0x34, (byte)0x42, (byte)0x51, (byte)0x2a,
- (byte)0x40, (byte)0x87, (byte)0x03, (byte)0x88,
- (byte)0x43, (byte)0x69, (byte)0xb2, (byte)0x89,
- (byte)0x6d, (byte)0x20, (byte)0xbd, (byte)0x7d,
- (byte)0x71, (byte)0xef, (byte)0x47, (byte)0x0a,
- (byte)0xdf, (byte)0x06, (byte)0xc1, (byte)0x69,
- (byte)0x66, (byte)0xa8, (byte)0x22, (byte)0x37,
- (byte)0x1a, (byte)0x77, (byte)0x1e, (byte)0xc7,
- (byte)0x94, (byte)0x4e, (byte)0x2c, (byte)0x27,
- (byte)0x69, (byte)0x45, (byte)0x5e, (byte)0xc8,
- (byte)0xf8, (byte)0x0c, (byte)0xb7, (byte)0xf8,
- (byte)0xc0, (byte)0x8f, (byte)0x99, (byte)0xc1,
- (byte)0xe5, (byte)0x28, (byte)0x9b, (byte)0xf9,
- (byte)0x4c, (byte)0x94, (byte)0xc6, (byte)0xb1
+ (byte)0x62, (byte)0xb2, (byte)0xd6, (byte)0x63,
+ (byte)0xb6, (byte)0x2b, (byte)0xe2, (byte)0x26,
+ (byte)0x5a, (byte)0x31, (byte)0x2b, (byte)0x37,
+ (byte)0x8c, (byte)0x35, (byte)0x60, (byte)0xe2,
+ (byte)0x03, (byte)0xce, (byte)0x93, (byte)0x09,
+ (byte)0x3e, (byte)0xf8, (byte)0xc9, (byte)0xfe,
+ (byte)0xbb, (byte)0xa2, (byte)0xc8, (byte)0x32,
+ (byte)0x0e, (byte)0x6c, (byte)0x8a, (byte)0x7e,
+ (byte)0x0a, (byte)0xc2, (byte)0x13, (byte)0x3b,
+ (byte)0xb8, (byte)0x25, (byte)0xfa, (byte)0xec,
+ (byte)0x19, (byte)0x95, (byte)0x8e, (byte)0x34,
+ (byte)0x46, (byte)0xcf, (byte)0x0e, (byte)0x7b,
+ (byte)0xe4, (byte)0x25, (byte)0x82, (byte)0x1a,
+ (byte)0x7f, (byte)0x21, (byte)0x48, (byte)0x16,
+ (byte)0x44, (byte)0x58, (byte)0x3f, (byte)0x35,
+ (byte)0xd8, (byte)0xeb, (byte)0xd8, (byte)0x1a,
+ (byte)0x45, (byte)0x53, (byte)0x0f, (byte)0x9b,
+ (byte)0x84, (byte)0x8a, (byte)0x54, (byte)0x13,
+ (byte)0x33, (byte)0xe4, (byte)0x97, (byte)0x97,
+ (byte)0xf0, (byte)0x48, (byte)0x37, (byte)0xfb,
+ (byte)0x5d, (byte)0x4f, (byte)0x8c, (byte)0x8f,
+ (byte)0x35, (byte)0x63, (byte)0xe1, (byte)0xd9,
+ (byte)0x62, (byte)0x73, (byte)0x1c, (byte)0x8e,
+ (byte)0xd8, (byte)0xcd, (byte)0x2e, (byte)0x1a,
+ (byte)0xe5, (byte)0x4c, (byte)0xb5, (byte)0x05,
+ (byte)0x59, (byte)0x7a, (byte)0xdf, (byte)0xf1,
+ (byte)0x68, (byte)0xeb, (byte)0x1c, (byte)0x5c,
+ (byte)0xc6, (byte)0x10, (byte)0x44, (byte)0x8c,
+ (byte)0x7d, (byte)0x42, (byte)0xc5, (byte)0x71,
+ (byte)0x8a, (byte)0xe7, (byte)0x1b, (byte)0xaa,
+ (byte)0x17, (byte)0x03, (byte)0x6a, (byte)0xa0,
+ (byte)0xc0, (byte)0x6b, (byte)0x97, (byte)0x50,
+ (byte)0x17, (byte)0xad, (byte)0x6e, (byte)0x5e,
+ (byte)0xd9, (byte)0xdb, (byte)0x6f, (byte)0x3e,
+ (byte)0xe9, (byte)0x3f, (byte)0x35, (byte)0xc3,
+ (byte)0x45, (byte)0xbc, (byte)0xe8, (byte)0x3d,
+ (byte)0x5a, (byte)0xb4, (byte)0xb9, (byte)0x3f,
+ (byte)0x53, (byte)0x80, (byte)0x64, (byte)0xdc,
+ (byte)0x12, (byte)0x24, (byte)0x35, (byte)0x35,
+ (byte)0xbd, (byte)0x98, (byte)0xbb, (byte)0x8d,
+ (byte)0xfa, (byte)0x19, (byte)0xa3, (byte)0x5e,
+ (byte)0x9e, (byte)0xac, (byte)0x70, (byte)0x4a,
+ (byte)0xfc, (byte)0x8d, (byte)0xae, (byte)0x55,
+ (byte)0x8b, (byte)0x71, (byte)0x81, (byte)0x0e,
+ (byte)0x4d, (byte)0xc8, (byte)0x2f, (byte)0x87,
+ (byte)0xb0, (byte)0x44, (byte)0xf7, (byte)0x4f,
+ (byte)0xdc, (byte)0xa8, (byte)0xc8, (byte)0x50,
+ (byte)0xb5, (byte)0x95, (byte)0x24, (byte)0x63,
+ (byte)0x74, (byte)0x13, (byte)0x54, (byte)0x58,
+ (byte)0xde, (byte)0xfc, (byte)0xe0, (byte)0x75,
+ (byte)0xeb, (byte)0xf4, (byte)0x06, (byte)0x58,
+ (byte)0x83, (byte)0x12, (byte)0x4c, (byte)0x56,
+ (byte)0xc4, (byte)0xc4, (byte)0x18, (byte)0x0c,
+ (byte)0xea, (byte)0xa3, (byte)0xe7, (byte)0x25,
+ (byte)0xa3, (byte)0xde, (byte)0x19, (byte)0x23,
+ (byte)0xa2, (byte)0x5a, (byte)0x2a, (byte)0xb6,
+ (byte)0x56, (byte)0x04, (byte)0xbc, (byte)0x65,
+ (byte)0xba, (byte)0x7c, (byte)0x0a, (byte)0xf4,
+ (byte)0x91, (byte)0x10, (byte)0x22, (byte)0x88,
+ (byte)0x3f, (byte)0x9d, (byte)0xbe, (byte)0x58,
+ (byte)0x43, (byte)0x4c, (byte)0x2e, (byte)0xad,
+ (byte)0xdb, (byte)0xd6, (byte)0x32, (byte)0xcf,
+ (byte)0x8e, (byte)0xb5, (byte)0x05, (byte)0x55,
+ (byte)0x39, (byte)0x8b, (byte)0xe1, (byte)0x01
};
static byte clientModulus[] = {
- (byte)0x00,
- (byte)0xbb, (byte)0xf0, (byte)0x40, (byte)0x36,
- (byte)0xac, (byte)0x26, (byte)0x54, (byte)0x4e,
- (byte)0xf4, (byte)0xa3, (byte)0x5a, (byte)0x00,
- (byte)0x2f, (byte)0x69, (byte)0x21, (byte)0x6f,
- (byte)0xb9, (byte)0x7a, (byte)0x3a, (byte)0x93,
- (byte)0xec, (byte)0xa2, (byte)0xf6, (byte)0xe1,
- (byte)0x8e, (byte)0xc7, (byte)0x63, (byte)0xd8,
- (byte)0x2f, (byte)0x12, (byte)0x30, (byte)0x99,
- (byte)0x2e, (byte)0xb0, (byte)0xf2, (byte)0x8f,
- (byte)0xf8, (byte)0x27, (byte)0x2d, (byte)0x24,
- (byte)0x78, (byte)0x28, (byte)0x84, (byte)0xf7,
- (byte)0x01, (byte)0xbf, (byte)0x8d, (byte)0x44,
- (byte)0x79, (byte)0xdd, (byte)0x3b, (byte)0xd2,
- (byte)0x55, (byte)0xf3, (byte)0xce, (byte)0x3c,
- (byte)0xb2, (byte)0x5b, (byte)0x21, (byte)0x7d,
- (byte)0xef, (byte)0xfd, (byte)0x33, (byte)0x4a,
- (byte)0xb1, (byte)0xa3, (byte)0xff, (byte)0xc6,
- (byte)0xc8, (byte)0x9b, (byte)0xb9, (byte)0x0f,
- (byte)0x7c, (byte)0x41, (byte)0x35, (byte)0x97,
- (byte)0xf9, (byte)0xdb, (byte)0x3a, (byte)0x05,
- (byte)0x60, (byte)0x05, (byte)0x15, (byte)0xaf,
- (byte)0x59, (byte)0x17, (byte)0x92, (byte)0xa3,
- (byte)0x10, (byte)0xad, (byte)0x16, (byte)0x1c,
- (byte)0xe4, (byte)0x07, (byte)0x53, (byte)0xaf,
- (byte)0xa8, (byte)0x76, (byte)0xa2, (byte)0x56,
- (byte)0x2a, (byte)0x92, (byte)0xd3, (byte)0xf9,
- (byte)0x28, (byte)0xe0, (byte)0x78, (byte)0xcf,
- (byte)0x5e, (byte)0x1f, (byte)0x48, (byte)0xab,
- (byte)0x5c, (byte)0x19, (byte)0xdd, (byte)0xe1,
- (byte)0x67, (byte)0x43, (byte)0xba, (byte)0x75,
- (byte)0x8d, (byte)0xf5, (byte)0x82, (byte)0xac,
- (byte)0x43, (byte)0x92, (byte)0x44, (byte)0x1b
+ (byte)0x00, (byte)0xcc, (byte)0xbf, (byte)0x92,
+ (byte)0x3c, (byte)0xa6, (byte)0x57, (byte)0x74,
+ (byte)0x1f, (byte)0x58, (byte)0xad, (byte)0xc7,
+ (byte)0x69, (byte)0x88, (byte)0x6f, (byte)0x59,
+ (byte)0x32, (byte)0x47, (byte)0x50, (byte)0x60,
+ (byte)0x22, (byte)0xe4, (byte)0x98, (byte)0x49,
+ (byte)0x0e, (byte)0x3e, (byte)0x1d, (byte)0xb8,
+ (byte)0xba, (byte)0xe2, (byte)0x3b, (byte)0xb6,
+ (byte)0x71, (byte)0x5b, (byte)0xfd, (byte)0x64,
+ (byte)0x02, (byte)0x6d, (byte)0x0d, (byte)0x50,
+ (byte)0x77, (byte)0x72, (byte)0x6e, (byte)0xa8,
+ (byte)0x3d, (byte)0x5d, (byte)0xd4, (byte)0xbd,
+ (byte)0x1f, (byte)0x76, (byte)0x51, (byte)0xdc,
+ (byte)0x9a, (byte)0xd0, (byte)0xd6, (byte)0x3e,
+ (byte)0xd0, (byte)0x31, (byte)0xa5, (byte)0x24,
+ (byte)0x5a, (byte)0x2c, (byte)0xbe, (byte)0x77,
+ (byte)0xfa, (byte)0x88, (byte)0xa1, (byte)0xfa,
+ (byte)0x06, (byte)0x41, (byte)0xc8, (byte)0x0f,
+ (byte)0x47, (byte)0x70, (byte)0x47, (byte)0x24,
+ (byte)0x99, (byte)0x50, (byte)0x52, (byte)0x44,
+ (byte)0x5b, (byte)0x30, (byte)0x62, (byte)0x5b,
+ (byte)0x65, (byte)0x35, (byte)0xc4, (byte)0x28,
+ (byte)0xb0, (byte)0x5c, (byte)0xee, (byte)0xd0,
+ (byte)0x1b, (byte)0xeb, (byte)0x39, (byte)0x2b,
+ (byte)0x0b, (byte)0xa1, (byte)0xac, (byte)0x96,
+ (byte)0x48, (byte)0xda, (byte)0x56, (byte)0x6c,
+ (byte)0xe0, (byte)0xe3, (byte)0xe6, (byte)0xe3,
+ (byte)0xdd, (byte)0x45, (byte)0xcb, (byte)0x51,
+ (byte)0x33, (byte)0x8d, (byte)0x40, (byte)0x43,
+ (byte)0xd7, (byte)0xf0, (byte)0xa4, (byte)0x31,
+ (byte)0xaa, (byte)0xb5, (byte)0xc0, (byte)0xdf,
+ (byte)0x4b, (byte)0xdf, (byte)0x2b, (byte)0x0a,
+ (byte)0xed, (byte)0x7e, (byte)0x10, (byte)0x0c,
+ (byte)0xae, (byte)0x1f, (byte)0x96, (byte)0xa2,
+ (byte)0x10, (byte)0x1e, (byte)0x6b, (byte)0xd0,
+ (byte)0xf9, (byte)0x37, (byte)0x8b, (byte)0xdf,
+ (byte)0x0d, (byte)0x0e, (byte)0x02, (byte)0x35,
+ (byte)0xf8, (byte)0x58, (byte)0xbc, (byte)0x6e,
+ (byte)0xb5, (byte)0x57, (byte)0x0e, (byte)0x2f,
+ (byte)0xea, (byte)0x20, (byte)0xe6, (byte)0x73,
+ (byte)0x9a, (byte)0xe5, (byte)0x6b, (byte)0x82,
+ (byte)0x70, (byte)0x25, (byte)0xbb, (byte)0x51,
+ (byte)0x9a, (byte)0x7c, (byte)0x9d, (byte)0xe2,
+ (byte)0x50, (byte)0x3d, (byte)0xcf, (byte)0x1e,
+ (byte)0x24, (byte)0x3e, (byte)0x92, (byte)0x55,
+ (byte)0xcf, (byte)0x2a, (byte)0xad, (byte)0x0d,
+ (byte)0x84, (byte)0x8f, (byte)0xa8, (byte)0x43,
+ (byte)0x24, (byte)0xcd, (byte)0xad, (byte)0x50,
+ (byte)0x64, (byte)0x74, (byte)0xc2, (byte)0x73,
+ (byte)0xb6, (byte)0xe1, (byte)0x92, (byte)0x1c,
+ (byte)0xb2, (byte)0x2b, (byte)0x8c, (byte)0x2d,
+ (byte)0x7b, (byte)0x96, (byte)0xa6, (byte)0x41,
+ (byte)0x61, (byte)0x5c, (byte)0x1b, (byte)0x8f,
+ (byte)0x78, (byte)0x28, (byte)0x51, (byte)0x40,
+ (byte)0xed, (byte)0x41, (byte)0x90, (byte)0xce,
+ (byte)0x1d, (byte)0xb8, (byte)0x26, (byte)0x81,
+ (byte)0x47, (byte)0x6b, (byte)0xe3, (byte)0x57,
+ (byte)0x41, (byte)0x74, (byte)0x4e, (byte)0x20,
+ (byte)0xf0, (byte)0x5a, (byte)0x1b, (byte)0x97,
+ (byte)0x37, (byte)0x91, (byte)0x86, (byte)0x19,
+ (byte)0xc5, (byte)0xf2, (byte)0x6d, (byte)0x04,
+ (byte)0xc9, (byte)0x78, (byte)0x2b, (byte)0x5a,
+ (byte)0x16, (byte)0xbc, (byte)0xfc, (byte)0x2b,
+ (byte)0x71, (byte)0x5b, (byte)0xd0, (byte)0x00,
+ (byte)0x4f
};
static char passphrase[] = "passphrase".toCharArray();
@@ -795,11 +1076,11 @@ private static SSLContext getSSLContext(String trusedCertStr,
volatile Exception clientException = null;
public static void main(String args[]) throws Exception {
- // MD5 is used in this test case, don't disable MD5 algorithm.
+ // SHA1 is used in this test case, don't disable SHA1 algorithm.
Security.setProperty("jdk.certpath.disabledAlgorithms",
- "MD2, RSA keySize < 1024");
+ "MD2, MD5, RSA keySize < 1024");
Security.setProperty("jdk.tls.disabledAlgorithms",
- "SSLv3, RC4, DH keySize < 768");
+ "SSLv3, RC4, MD5withRSA, DH keySize < 768");
if (debug)
System.setProperty("javax.net.debug", "all");
diff --git a/test/jdk/sun/security/tools/keytool/KeyToolTest.java b/test/jdk/sun/security/tools/keytool/KeyToolTest.java
index 7b5f4d5556e..954951a1a78 100644
--- a/test/jdk/sun/security/tools/keytool/KeyToolTest.java
+++ b/test/jdk/sun/security/tools/keytool/KeyToolTest.java
@@ -68,6 +68,7 @@
import java.util.*;
import java.security.cert.X509Certificate;
import jdk.test.lib.util.FileUtils;
+import jdk.test.lib.security.SecurityUtils;
import sun.security.util.ObjectIdentifier;
@@ -103,6 +104,8 @@ public class KeyToolTest {
"-srcproviderName SunPKCS11-nzz " +
"-addprovider SunPKCS11 " +
"-providerArg p11-nzz.txt ";
+ private static final int KEY_LENGTH_DSA = SecurityUtils.getTestKeySize("DSA");
+ private static final int KEY_LENGTH_RSA = SecurityUtils.getTestKeySize("RSA");
String p11Arg, srcP11Arg;
@@ -192,7 +195,7 @@ void testOK(String input, String cmd) throws Exception {
// SunPKCS11-NSS does not support SHA256withDSA yet.
if (cmd.contains("p11-nss.txt") && cmd.contains("-genkey")
&& cmd.contains("DSA")) {
- cmd += " -sigalg SHA1withDSA -keysize 1024";
+ cmd += " -sigalg SHA256withDSA -keysize " + KEY_LENGTH_DSA;
}
test(input, cmd);
} catch(Exception e) {
@@ -955,6 +958,9 @@ void sqeSelfCertTest() throws Exception {
// sig not compatible
testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-keypass changeit -selfcert -sigalg MD5withRSA");
+ // sig not compatible
+ testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
+ "-keypass changeit -selfcert -sigalg SHA256withRSA");
// bad pass
testFail("", "-keystore x.jks -storetype JKS -storepass wrong " +
"-keypass changeit -selfcert");
@@ -1062,10 +1068,10 @@ void sqeGenkeyTest() throws Exception {
"-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 999 " +
"-alias n5");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 512 " +
+ "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 2048 " +
"-alias n6");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 1024 " +
+ "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 3072 " +
"-alias n7");
testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-keypass changeit -genkeypair -keyalg DSA -dname CN=olala " +
@@ -1076,6 +1082,9 @@ void sqeGenkeyTest() throws Exception {
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-keypass changeit -genkeypair -dname CN=olala -keyalg RSA " +
"-sigalg MD5withRSA -alias n10");
+ testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
+ "-keypass changeit -genkeypair -dname CN=olala -keyalg RSA " +
+ "-sigalg SHA256withRSA -alias n10-1");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-keypass changeit -genkeypair -dname CN=olala -keyalg RSA " +
"-sigalg SHA1withRSA -alias n11");
@@ -1152,16 +1161,20 @@ void sqeCsrTest() throws Exception {
remove("csr1");
// PrivateKeyEntry can do certreq
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize 1024");
+ "-keypass changeit -genkeypair -keyalg DSA -dname CN=olala -keysize " +
+ KEY_LENGTH_DSA);
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-certreq -file csr1 -alias mykey");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-certreq -file csr1");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-certreq -file csr1 -sigalg SHA1withDSA");
- // unmatched sigalg
+ "-certreq -file csr1 -sigalg SHA256withDSA");
+ // unmatched md5
testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-certreq -file csr1 -sigalg MD5withRSA");
+ // unmatched sha
+ testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
+ "-certreq -file csr1 -sigalg SHA256withRSA");
// misc test
// bad storepass
testFail("", "-keystore x.jks -storetype JKS -storepass badstorepass " +
@@ -1192,9 +1205,9 @@ void sqeCsrTest() throws Exception {
"-certreq -file csr1");
// unmatched sigalg
testFail("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-certreq -file csr1 -sigalg SHA1withDSA");
+ "-certreq -file csr1 -sigalg SHA256withDSA");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
- "-certreq -file csr1 -sigalg MD5withRSA");
+ "-certreq -file csr1 -sigalg SHA256withRSA");
// TrustedCertificateEntry cannot do certreq
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-exportcert -file x.jks.p1.cert");
@@ -1222,6 +1235,9 @@ void sqePrintcertTest() throws Exception {
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-keypass changeit -genkeypair -dname CN=weak -keyalg rsa " +
"-keysize 512 -sigalg MD5withRSA -alias myweakkey");
+ testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
+ "-keypass changeit -genkeypair -dname CN=weak -keyalg rsa -keysize " +
+ KEY_LENGTH_RSA + " -sigalg SHA256withRSA -alias myweakkey-sha");
testOK("", "-keystore x.jks -storetype JKS -storepass changeit " +
"-export -file myweakkey.cert -alias myweakkey");
testFail("", "-printcert -file badkeystore");
@@ -1673,31 +1689,32 @@ void i18nTest() throws Exception {
remove("x.jks");
testOK("", "-help");
- // 2. keytool -genkey -keyalg DSA -v -keysize 512 Enter "a" for the keystore
+ // 2. keytool -genkey -keyalg DSA -v -keysize Enter "a" for the keystore
// password. Check error (password too short). Enter "password" for
// the keystore password. Hit 'return' for "first and last name",
// "organizational unit", "City", "State", and "Country Code".
// Type "yes" when they ask you if everything is correct.
// Type 'return' for new key password.
testOK("a\npassword\npassword\nMe\nHere\nNow\nPlace\nPlace\nUS\nyes\n\n",
- "-genkey -keyalg DSA -v -keysize 512 -keystore x.jks -storetype JKS");
+ "-genkey -keyalg DSA -v -keysize " + KEY_LENGTH_DSA + " -keystore x.jks " +
+ "-storetype JKS");
// 3. keytool -list -v -storepass password
testOK("", "-list -v -storepass password -keystore x.jks -storetype JKS");
// 4. keytool -list -v Type "a" for the keystore password.
// Check error (wrong keystore password).
testFail("a\n", "-list -v -keystore x.jks -storetype JKS");
assertTrue(ex.indexOf("password was incorrect") != -1);
- // 5. keytool - -keyalg DSA -v -keysize 512 Enter "password" as the password.
+ // 5. keytool - -keyalg DSA -v -keysize Enter "password" as the password.
// Check error (alias 'mykey' already exists).
- testFail("password\n", "-genkey -keyalg DSA -v -keysize 512" +
+ testFail("password\n", "-genkey -keyalg DSA -v -keysize " + KEY_LENGTH_DSA +
" -keystore x.jks -storetype JKS");
assertTrue(ex.indexOf("alias already exists") != -1);
- // 6. keytool -genkey -keyalg DSA -v -keysize 512 -alias mykey2 -storepass password
+ // 6. keytool -genkey -keyalg DSA -v -keysize -alias mykey2 -storepass password
// Hit 'return' for "first and last name", "organizational unit", "City",
// "State", and "Country Code". Type "yes" when they ask you if
// everything is correct. Type 'return' for new key password.
- testOK("\n\n\n\n\n\nyes\n\n", "-genkey -keyalg DSA -v -keysize 512 -alias mykey2" +
- " -storepass password -keystore x.jks -storetype JKS");
+ testOK("\n\n\n\n\n\nyes\n\n", "-genkey -keyalg DSA -v -keysize " + KEY_LENGTH_DSA +
+ " -alias mykey2 -storepass password -keystore x.jks -storetype JKS");
// 7. keytool -list -v Type 'password' for the store password.
testOK("password\n", "-list -v -keystore x.jks -storetype JKS");
// 8. keytool -keypasswd -v -alias mykey2 -storepass password
@@ -1777,7 +1794,7 @@ void i18nPKCS11Test() throws Exception {
// 1. sccs edit cert8.db key3.db
//Runtime.getRuntime().exec("/usr/bin/sccs edit cert8.db key3.db");
testOK("", p11Arg + ("-storepass test12 -genkey -alias genkey" +
- " -dname cn=genkey -keysize 512 -keyalg rsa"));
+ " -dname cn=genkey -keysize " + KEY_LENGTH_RSA + " -keyalg rsa"));
testOK("", p11Arg + "-storepass test12 -list");
testOK("", p11Arg + "-storepass test12 -list -alias genkey");
testOK("", p11Arg +
diff --git a/test/jdk/sun/security/util/Pem/encoding.sh b/test/jdk/sun/security/util/Pem/encoding.sh
index 7f8b142caf8..ef670b3aee5 100644
--- a/test/jdk/sun/security/util/Pem/encoding.sh
+++ b/test/jdk/sun/security/util/Pem/encoding.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2016, 2024, 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
@@ -30,6 +30,6 @@
# jtreg does not like -Dfile.encoding=UTF-16 inside a @run main line,
# therefore a shell test is written.
-$TESTJAVA/bin/java $TESTVMOPTS -cp $TESTCLASSES \
+$TESTJAVA/bin/java $TESTVMOPTS $TESTJAVAOPTS -cp $TESTCLASSES \
-Dfile.encoding=UTF-16 \
PemEncoding $TESTSRC/../HostnameChecker/cert5.crt
diff --git a/test/jdk/sun/security/validator/certreplace.sh b/test/jdk/sun/security/validator/certreplace.sh
index 78b27e8f99f..79c97328092 100644
--- a/test/jdk/sun/security/validator/certreplace.sh
+++ b/test/jdk/sun/security/validator/certreplace.sh
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, 2024, 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
@@ -85,4 +85,4 @@ $KT -delete -alias user
EXTRAOPTS="--add-exports java.base/sun.security.validator=ALL-UNNAMED"
$JAVAC ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . ${TESTSRC}${FS}CertReplace.java
-$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace certreplace.jks certreplace.certs
+$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace certreplace.jks certreplace.certs
diff --git a/test/jdk/sun/security/validator/samedn.sh b/test/jdk/sun/security/validator/samedn.sh
index 6a30b147157..68298d2bae6 100644
--- a/test/jdk/sun/security/validator/samedn.sh
+++ b/test/jdk/sun/security/validator/samedn.sh
@@ -81,5 +81,5 @@ $KT -delete -alias user
EXTRAOPTS="--add-exports java.base/sun.security.validator=ALL-UNNAMED"
$JAVAC ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} ${EXTRAOPTS} -d . ${TESTSRC}${FS}CertReplace.java
-$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn1.certs || exit 1
-$JAVA ${TESTVMOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn2.certs || exit 2
+$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn1.certs || exit 1
+$JAVA ${TESTVMOPTS} ${TESTJAVAOPTS} ${EXTRAOPTS} CertReplace samedn.jks samedn2.certs || exit 2
diff --git a/test/jdk/sun/security/x509/AlgorithmId/NonStandardNames.java b/test/jdk/sun/security/x509/AlgorithmId/NonStandardNames.java
index 948cfa47064..81dc3639190 100644
--- a/test/jdk/sun/security/x509/AlgorithmId/NonStandardNames.java
+++ b/test/jdk/sun/security/x509/AlgorithmId/NonStandardNames.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2024, 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
@@ -24,6 +24,7 @@
/*
* @test
* @bug 7180907 8277224
+ * @library /test/lib
* @summary Jarsigner -verify fails if rsa file used sha-256 with authenticated attributes
* @modules java.base/sun.security.pkcs
* java.base/sun.security.tools.keytool
@@ -36,6 +37,7 @@
import java.security.MessageDigest;
import java.security.Signature;
import java.security.cert.X509Certificate;
+import jdk.test.lib.security.SecurityUtils;
import sun.security.pkcs.ContentInfo;
import sun.security.pkcs.PKCS7;
import sun.security.pkcs.PKCS9Attribute;
@@ -52,8 +54,9 @@ public static void main(String[] args) throws Exception {
byte[] data = "Hello".getBytes();
X500Name n = new X500Name("cn=Me");
- CertAndKeyGen cakg = new CertAndKeyGen("RSA", "SHA256withRSA");
- cakg.generate(1024);
+ String kpgAlgorithm = "RSA";
+ CertAndKeyGen cakg = new CertAndKeyGen(kpgAlgorithm, "SHA256withRSA");
+ cakg.generate(SecurityUtils.getTestKeySize(kpgAlgorithm));
X509Certificate cert = cakg.getSelfCertificate(n, 1000);
MessageDigest md = MessageDigest.getInstance("SHA-256");
diff --git a/test/jdk/sun/security/x509/X509CRLImpl/Verify.java b/test/jdk/sun/security/x509/X509CRLImpl/Verify.java
index 6a77224fab4..911f53f5120 100644
--- a/test/jdk/sun/security/x509/X509CRLImpl/Verify.java
+++ b/test/jdk/sun/security/x509/X509CRLImpl/Verify.java
@@ -35,45 +35,61 @@ public class Verify {
static String selfSignedCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
- "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzJaFw0zMDA0MDcwMjI0MzJa\n" +
- "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
- "AQUAA4GNADCBiQKBgQC4OTag24sTxL2tXTNuvpmUEtdxrYAZoFsslFQ60T+WD9wQ\n" +
- "Jeiw87FSPsR2vxRuv0j8DNm2a4h7LNNIFcLurfNldbz5pvgZ7VqdbbUMPE9qP85n\n" +
- "jgDl4woyRTSUeRI4A7O0CO6NpES21dtbdhroWQrEkHxpnrDPxsxrz5gf2m3gqwID\n" +
- "AQABo4GJMIGGMB0GA1Ud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OrJC7HR/hM5VhmY\n" +
- "CErChny6x9lBVg9s57tfD/P9PSzBLusCcHwHMAbMOEcTltVVKUWZnnbumpywlYyg\n" +
- "oKLrE9+yCOkYUOpiRlz43/3vkEL5hjIKMcDSZnPKBZi1h16Yj2hPe9GMibNip54=\n" +
+ "MIIBtjCBnwIBATANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQDDAJDQTELMAkGA1UE\n" +
+ "CAwCQ0ExCzAJBgNVBAYTAlVTMRAwDgYDVQQKDAdFeGFtcGxlFw0yNDA2MTkwNDQ3\n" +
+ "NThaFw0yNjA2MTgwNDQ3NThaMCIwIAIBAhcNMjQwNjE5MDQ0NzU4WjAMMAoGA1Ud\n" +
+ "FQQDCgEEoA4wDDAKBgNVHRQEAwIBATANBgkqhkiG9w0BAQUFAAOCAQEAkN0owWtq\n" +
+ "We0SznF9rAAADLMfB/2GKBQpqsJXXwE9FnCm8emSDtHpud+NZL+PAy9g050et8nl\n" +
+ "CNey/FBMJJMN3b3SZKkHA2MR4qJmHfeFnlE5mHnUHg7gH0a1u7H7wf0Z/L6eZNWy\n" +
+ "dB905II7Ej0GBuPnLsKNMDBtGtDuSPXCvmaBsKDe8awaEA1VchZKVLzg+8hEC0vt\n" +
+ "60jz9HrDpFun99IKTTCxBT+9GrW38GbPMxj0rLAL4n75SrfPdeFPj0t5fksOC7a7\n" +
+ "SLO9t+UC89SMTsoIwVjHIFIUxw5FHpuUfgOQ7PtjhpLd2Pm5u5Pe2gv4Q41xVgVW\n" +
+ "hVMagRPmAQAniQ==\n" +
"-----END X509 CRL-----";
private static X509CRL crl;
@@ -104,7 +120,7 @@ public static void main(String[] args) throws Exception {
/*
* Try to verify CRL with a provider that has a Signature implementation
- * but not of the right algorithm (MD5withRSA).
+ * but not of the right algorithm (SHA1withRSA).
* Should fail with NoSuchAlgorithmException.
*/
try {
diff --git a/test/jdk/sun/security/x509/X509CertImpl/Verify.java b/test/jdk/sun/security/x509/X509CertImpl/Verify.java
index 0fc94bc2802..0b98758ee4c 100644
--- a/test/jdk/sun/security/x509/X509CertImpl/Verify.java
+++ b/test/jdk/sun/security/x509/X509CertImpl/Verify.java
@@ -36,35 +36,47 @@ public class Verify {
static String selfSignedCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICPjCCAaegAwIBAgIBADANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
- "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzJaFw0zMDA0MDcwMjI0MzJa\n" +
- "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
- "AQUAA4GNADCBiQKBgQC4OTag24sTxL2tXTNuvpmUEtdxrYAZoFsslFQ60T+WD9wQ\n" +
- "Jeiw87FSPsR2vxRuv0j8DNm2a4h7LNNIFcLurfNldbz5pvgZ7VqdbbUMPE9qP85n\n" +
- "jgDl4woyRTSUeRI4A7O0CO6NpES21dtbdhroWQrEkHxpnrDPxsxrz5gf2m3gqwID\n" +
- "AQABo4GJMIGGMB0GA1UdDgQWBBSCJd0hpl5PdAD9IZS+Hzng4lXLGzBHBgNVHSME\n" +
- "QDA+gBSCJd0hpl5PdAD9IZS+Hzng4lXLG6EjpCEwHzELMAkGA1UEBhMCVVMxEDAO\n" +
- "BgNVBAoTB0V4YW1wbGWCAQAwDwYDVR0TAQH/BAUwAwEB/zALBgNVHQ8EBAMCAgQw\n" +
- "DQYJKoZIhvcNAQEEBQADgYEAluy6HIjWcq009lTLmhp+Np6dxU78pInBK8RZkza0\n" +
- "484qGaxFGD3UGyZkI5uWmsH2XuMbuox5khfIq6781gmkPBHXBIEtJN8eLusOHEye\n" +
- "iE8h7WI+N3qa6Pj56WionMrioqC/3X+b06o147bbhx8U0vkYv/HyPaITOFfMXTdz\n" +
- "Vjw=\n" +
+ "MIIDVzCCAj+gAwIBAgIUUM/RKxE2Rcc6zYLWLxNolpLnuiwwDQYJKoZIhvc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A1usgNhVXY/qhFiJ\n" +
+ "jhTU33iZgwiKxpY+zj/Gmk5sdOCEk7e1P06IB3eIopdRTMGJCeCBKyFyXND38kNC\n" +
+ "bTIPnuOdE73M2AW0LWuPv6UQZVBv5A82WMT9f8Hq9H2cHbuhgL/ozyFSWw==\n" +
"-----END CERTIFICATE-----";
static String crlIssuerCertStr =
"-----BEGIN CERTIFICATE-----\n" +
- "MIICKzCCAZSgAwIBAgIBAjANBgkqhkiG9w0BAQQFADAfMQswCQYDVQQGEwJVUzEQ\n" +
- "MA4GA1UEChMHRXhhbXBsZTAeFw0wOTA0MjcwMjI0MzNaFw0yOTAxMTIwMjI0MzNa\n" +
- "MB8xCzAJBgNVBAYTAlVTMRAwDgYDVQQKEwdFeGFtcGxlMIGfMA0GCSqGSIb3DQEB\n" +
- "AQUAA4GNADCBiQKBgQDMJeBMBybHykI/YpwUJ4O9euqDSLb1kpWpceBS8TVqvgBC\n" +
- "SgUJWtFZL0i6bdvF6mMdlbuBkGzhXqHiVAi96/zRLbUC9F8SMEJ6MuD+YhQ0ZFTQ\n" +
- "atKy8zf8O9XzztelLJ26Gqb7QPV133WY3haAqHtCXOhEKkCN16NOYNC37DTaJwID\n" +
- "AQABo3cwdTAdBgNVHQ4EFgQULXSWzXzUOIpOJpzbSCpW42IJUugwRwYDVR0jBEAw\n" +
- "PoAUgiXdIaZeT3QA/SGUvh854OJVyxuhI6QhMB8xCzAJBgNVBAYTAlVTMRAwDgYD\n" +
- "VQQKEwdFeGFtcGxlggEAMAsGA1UdDwQEAwIBAjANBgkqhkiG9w0BAQQFAAOBgQAY\n" +
- "eMnf5AHSNlyUlzXk8o2S0h4gCuvKX6C3kFfKuZcWvFAbx4yQOWLS2s15/nzR4+AP\n" +
- "FGX3lgJjROyAh7fGedTQK+NFWwkM2ag1g3hXktnlnT1qHohi0w31nVBJxXEDO/Ck\n" +
- "uJTpJGt8XxxbFaw5v7cHy7XuTAeU/sekvjEiNHW00Q==\n" +
+ "MIIDeTCC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zqr\n" +
+ "qsIj/y5Xzmd2XpQ52V3KtDy4t7YQJ+nRKUrqLzSKHvOXOQgScK2RL4FZx0gah/bJ\n" +
+ "YCKq6zonC59lZ6ftJ2j9Ny9wNulHBlgS0p8q+Z42IfdfVgrLmbXoHNmKjVKdrs1Z\n" +
+ "HCva3WKMOkVFdejOuvPSnSw4Iob479nC3V12YtFAgeYMoBMPgZHcuWce4IC9Ts7z\n" +
+ "w8Xo1Fv3aNOygWdXdVDL79jkOJo2wO8yIe+J6Ig=\n" +
"-----END CERTIFICATE-----";
private static X509Certificate cert;
@@ -96,7 +108,7 @@ public static void main(String[] args) throws Exception {
/*
* Try to verify certificate with a provider that has a Signature
- * implementation but not of the right algorithm (MD5withRSA).
+ * implementation but not of the right algorithm (SHA1withRSA).
* Should fail with NoSuchAlgorithmException.
*/
try {
diff --git a/test/lib/jdk/test/lib/security/DiffieHellmanGroup.java b/test/lib/jdk/test/lib/security/DiffieHellmanGroup.java
new file mode 100644
index 00000000000..b8f7c0c34be
--- /dev/null
+++ b/test/lib/jdk/test/lib/security/DiffieHellmanGroup.java
@@ -0,0 +1,109 @@
+/*
+ * Copyright (c) 2024, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package jdk.test.lib.security;
+
+import java.math.BigInteger;
+
+/**
+ * An enumeration of DH groups for tests.
+ */
+public enum DiffieHellmanGroup {
+
+ /**
+ * RFC 7919 - ffdhe2048.
+ */
+ ffdhe2048(new BigInteger("FFFFFFFFFFFFFFFFADF85458A2BB4A9AAFDC5620273D3CF1" +
+ "D8B9C583CE2D3695A9E13641146433FBCC939DCE249B3EF9" +
+ "7D2FE363630C75D8F681B202AEC4617AD3DF1ED5D5FD6561" +
+ "2433F51F5F066ED0856365553DED1AF3B557135E7F57C935" +
+ "984F0C70E0E68B77E2A689DAF3EFE8721DF158A136ADE735" +
+ "30ACCA4F483A797ABC0AB182B324FB61D108A94BB2C8E3FB" +
+ "B96ADAB760D7F4681D4F42A3DE394DF4AE56EDE76372BB19" +
+ "0B07A7C8EE0A6D709E02FCE1CDF7E2ECC03404CD28342F61" +
+ "9172FE9CE98583FF8E4F1232EEF28183C3FE3B1B4C6FAD73" +
+ "3BB5FCBC2EC22005C58EF1837D1683B2C6F34A26C1B2EFFA" +
+ "886B423861285C97FFFFFFFFFFFFFFFF", 16), 2),
+ /**
+ * RFC 7919 - ffdhe3072.
+ */
+ ffdhe3072(new BigInteger("FFFFFFFFFFFFFFFFADF85458A2BB4A9AAFDC5620273D3CF1" +
+ "D8B9C583CE2D3695A9E13641146433FBCC939DCE249B3EF9" +
+ "7D2FE363630C75D8F681B202AEC4617AD3DF1ED5D5FD6561" +
+ "2433F51F5F066ED0856365553DED1AF3B557135E7F57C935" +
+ "984F0C70E0E68B77E2A689DAF3EFE8721DF158A136ADE735" +
+ "30ACCA4F483A797ABC0AB182B324FB61D108A94BB2C8E3FB" +
+ "B96ADAB760D7F4681D4F42A3DE394DF4AE56EDE76372BB19" +
+ "0B07A7C8EE0A6D709E02FCE1CDF7E2ECC03404CD28342F61" +
+ "9172FE9CE98583FF8E4F1232EEF28183C3FE3B1B4C6FAD73" +
+ "3BB5FCBC2EC22005C58EF1837D1683B2C6F34A26C1B2EFFA" +
+ "886B4238611FCFDCDE355B3B6519035BBC34F4DEF99C0238" +
+ "61B46FC9D6E6C9077AD91D2691F7F7EE598CB0FAC186D91C" +
+ "AEFE130985139270B4130C93BC437944F4FD4452E2D74DD3" +
+ "64F2E21E71F54BFF5CAE82AB9C9DF69EE86D2BC522363A0D" +
+ "ABC521979B0DEADA1DBF9A42D5C4484E0ABCD06BFA53DDEF" +
+ "3C1B20EE3FD59D7C25E41D2B66C62E37FFFFFFFFFFFFFFFF", 16), 2),
+ /**
+ * RFC 7919 - ffdhe4096.
+ */
+ ffdhe4096(new BigInteger("FFFFFFFFFFFFFFFFADF85458A2BB4A9AAFDC5620273D3CF1" +
+ "D8B9C583CE2D3695A9E13641146433FBCC939DCE249B3EF9" +
+ "7D2FE363630C75D8F681B202AEC4617AD3DF1ED5D5FD6561" +
+ "2433F51F5F066ED0856365553DED1AF3B557135E7F57C935" +
+ "984F0C70E0E68B77E2A689DAF3EFE8721DF158A136ADE735" +
+ "30ACCA4F483A797ABC0AB182B324FB61D108A94BB2C8E3FB" +
+ "B96ADAB760D7F4681D4F42A3DE394DF4AE56EDE76372BB19" +
+ "0B07A7C8EE0A6D709E02FCE1CDF7E2ECC03404CD28342F61" +
+ "9172FE9CE98583FF8E4F1232EEF28183C3FE3B1B4C6FAD73" +
+ "3BB5FCBC2EC22005C58EF1837D1683B2C6F34A26C1B2EFFA" +
+ "886B4238611FCFDCDE355B3B6519035BBC34F4DEF99C0238" +
+ "61B46FC9D6E6C9077AD91D2691F7F7EE598CB0FAC186D91C" +
+ "AEFE130985139270B4130C93BC437944F4FD4452E2D74DD3" +
+ "64F2E21E71F54BFF5CAE82AB9C9DF69EE86D2BC522363A0D" +
+ "ABC521979B0DEADA1DBF9A42D5C4484E0ABCD06BFA53DDEF" +
+ "3C1B20EE3FD59D7C25E41D2B669E1EF16E6F52C3164DF4FB" +
+ "7930E9E4E58857B6AC7D5F42D69F6D187763CF1D55034004" +
+ "87F55BA57E31CC7A7135C886EFB4318AED6A1E012D9E6832" +
+ "A907600A918130C46DC778F971AD0038092999A333CB8B7A" +
+ "1A1DB93D7140003C2A4ECEA9F98D0ACC0A8291CDCEC97DCF" +
+ "8EC9B55A7F88A46B4DB5A851F44182E1C68A007E5E655F6A" +
+ "FFFFFFFFFFFFFFFF", 16), 2);
+
+
+ public BigInteger getPrime() {
+ return prime;
+ }
+
+ private final BigInteger prime;
+
+ public BigInteger getBase() {
+ return base;
+ }
+
+ private final BigInteger base;
+
+ DiffieHellmanGroup(BigInteger prime, int base) {
+ this.prime = prime;
+ this.base = BigInteger.valueOf(base);
+ }
+}
diff --git a/test/lib/jdk/test/lib/security/SecurityUtils.java b/test/lib/jdk/test/lib/security/SecurityUtils.java
index 319416a466c..2885440e2a2 100644
--- a/test/lib/jdk/test/lib/security/SecurityUtils.java
+++ b/test/lib/jdk/test/lib/security/SecurityUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018, 2023, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2018, 2024, 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
@@ -30,12 +30,34 @@
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
+import jdk.test.lib.security.DiffieHellmanGroup;
/**
* Common library for various security test helper functions.
*/
public final class SecurityUtils {
+ /*
+ * Key Sizes for various algorithms.
+ */
+ private enum KeySize{
+ RSA(2048),
+ DSA(2048),
+ DH(2048);
+
+ private final int keySize;
+ KeySize(int keySize) {
+ this.keySize = keySize;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(keySize);
+ }
+ }
+
+ private final static int DEFAULT_SALTSIZE = 16;
+
private static String getCacerts() {
String sep = File.separator;
return System.getProperty("java.home") + sep
@@ -107,6 +129,44 @@ public static void removeAlgsFromDSigPolicy(String... algs) {
removeFromDSigPolicy("disallowAlg", List.of(algs));
}
+ /**
+ * Returns a salt size for tests
+ */
+ public static int getTestSaltSize() {
+ return DEFAULT_SALTSIZE;
+ }
+
+ /**
+ * Returns a key size in bits for tests, depending on the specified algorithm
+ */
+ public static int getTestKeySize(String algo) {
+ return switch (algo) {
+ case "RSA" -> KeySize.RSA.keySize;
+ case "DSA" -> KeySize.DSA.keySize;
+ case "DH", "DiffieHellman" -> KeySize.DH.keySize;
+ default -> throw new RuntimeException("Test key size not defined for " + algo);
+ };
+ }
+
+ /**
+ * Returns a DH predefined group for tests
+ */
+ public static DiffieHellmanGroup getTestDHGroup() {
+ return getTestDHGroup(2048);
+ }
+
+ /**
+ * Returns a DH predefined group for tests, depending on the specified prime size
+ */
+ public static DiffieHellmanGroup getTestDHGroup(int primeSize) {
+ return switch(primeSize) {
+ case 2048 -> DiffieHellmanGroup.ffdhe2048;
+ case 3072 -> DiffieHellmanGroup.ffdhe3072;
+ case 4096 -> DiffieHellmanGroup.ffdhe4096;
+ default -> throw new RuntimeException("Test DH group not defined for " + primeSize);
+ };
+ }
+
private static void removeFromDSigPolicy(String rule, List algs) {
String value = Security.getProperty("jdk.xml.dsig.secureValidationPolicy");
value = Arrays.stream(value.split(","))