Merge ~vpa1977/ubuntu/+source/openjdk-17:sr-20230117 into ubuntu/+source/openjdk-17:ubuntu/devel

Proposed by Vladimir Petko
Status: Merged
Merge reported by: Vladimir Petko
Merged at revision: e9458f0fead6001eaacd0669408647a18fb5e7f8
Proposed branch: ~vpa1977/ubuntu/+source/openjdk-17:sr-20230117
Merge into: ubuntu/+source/openjdk-17:ubuntu/devel
Diff against target: 160501 lines (+130227/-5313)
729 files modified
.gitattributes (+1/-0)
.github/actions/config/action.yml (+46/-0)
.github/actions/do-build/action.yml (+80/-0)
.github/actions/get-bootjdk/action.yml (+109/-0)
.github/actions/get-bundles/action.yml (+109/-0)
.github/actions/get-gtest/action.yml (+54/-0)
.github/actions/get-jtreg/action.yml (+72/-0)
.github/actions/get-msys2/action.yml (+44/-0)
.github/actions/upload-bundles/action.yml (+77/-0)
.github/scripts/gen-build-failure-report.sh (+51/-0)
.github/scripts/gen-test-results.sh (+92/-0)
.github/scripts/gen-test-summary.sh (+70/-0)
.github/workflows/build-cross-compile.yml (+154/-0)
.github/workflows/build-linux.yml (+132/-0)
.github/workflows/build-macos.yml (+114/-0)
.github/workflows/build-windows.yml (+131/-0)
.github/workflows/main.yml (+331/-0)
.github/workflows/test.yml (+205/-0)
.gitignore (+2/-0)
.jcheck/conf (+1/-1)
debian/changelog (+12/-0)
debian/control (+2/-1)
debian/control.in (+2/-1)
debian/patches/adlc-parser.diff (+14/-3)
debian/patches/default-jvm-cfg.diff (+2/-2)
debian/patches/generated-headers.patch (+2/-2)
debian/patches/hotspot-disable-exec-shield-workaround.diff (+1/-1)
debian/patches/jaw-classpath.diff (+1/-1)
debian/patches/multiple-pkcs11-library-init.diff (+3/-3)
debian/patches/reproducible-build-jmod.diff (+2/-2)
debian/patches/riscv64.diff (+4/-4)
debian/patches/s390x-opt.diff (+1/-1)
debian/patches/series (+0/-6)
debian/patches/system-pcsclite.diff (+9/-9)
debian/patches/workaround_expand_exec_shield_cs_limit.diff (+1/-1)
debian/rules (+1/-1)
dev/null (+0/-215)
doc/building.html (+11/-2)
doc/building.md (+39/-3)
make/Bundles.gmk (+1/-10)
make/autoconf/basic_tools.m4 (+17/-56)
make/autoconf/compare.sh.in (+1/-0)
make/autoconf/configure.ac (+1/-0)
make/autoconf/jdk-options.m4 (+102/-0)
make/autoconf/spec.gmk.in (+2/-1)
make/autoconf/util.m4 (+351/-3)
make/common/NativeCompilation.gmk (+15/-5)
make/common/modules/LauncherCommon.gmk (+0/-1)
make/conf/jib-profiles.js (+1/-1)
make/conf/version-numbers.conf (+2/-2)
make/data/autoheaders/assemblyprefix.h (+3/-1)
make/data/cldr/common/bcp47/timezone.xml (+2/-1)
make/data/cldr/common/main/es_419.xml (+0/-3)
make/data/cldr/common/main/es_MX.xml (+0/-3)
make/data/cldr/common/main/root.xml (+12/-0)
make/data/cldr/common/supplemental/metaZones.xml (+11/-4)
make/data/currency/CurrencyData.properties (+2/-2)
make/data/macosxsigning/default-debug.plist (+18/-0)
make/data/macosxsigning/java-debug.plist (+20/-0)
make/data/tzdata/VERSION (+1/-1)
make/data/tzdata/africa (+54/-155)
make/data/tzdata/antarctica (+1/-1)
make/data/tzdata/asia (+70/-67)
make/data/tzdata/australasia (+21/-37)
make/data/tzdata/backward (+233/-57)
make/data/tzdata/etcetera (+7/-10)
make/data/tzdata/europe (+107/-183)
make/data/tzdata/iso3166.tab (+3/-3)
make/data/tzdata/northamerica (+164/-244)
make/data/tzdata/southamerica (+15/-19)
make/data/tzdata/zone.tab (+13/-18)
make/devkit/createJMHBundle.sh (+1/-1)
make/modules/java.desktop/lib/Awt2dLibraries.gmk (+4/-3)
make/modules/java.security.jgss/Lib.gmk (+14/-12)
make/scripts/compare.sh (+12/-3)
src/hotspot/cpu/aarch64/aarch64.ad (+214/-11)
src/hotspot/cpu/aarch64/aarch64_ad.m4 (+25/-0)
src/hotspot/cpu/aarch64/aarch64_neon.ad (+35/-40)
src/hotspot/cpu/aarch64/aarch64_neon_ad.m4 (+52/-53)
src/hotspot/cpu/aarch64/assembler_aarch64.cpp (+48/-1)
src/hotspot/cpu/aarch64/assembler_aarch64.hpp (+11/-9)
src/hotspot/cpu/aarch64/assembler_aarch64.inline.hpp (+7/-1)
src/hotspot/cpu/aarch64/c1_LIRAssembler_aarch64.cpp (+9/-11)
src/hotspot/cpu/aarch64/c1_LIRGenerator_aarch64.cpp (+9/-26)
src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.cpp (+18/-46)
src/hotspot/cpu/aarch64/c1_MacroAssembler_aarch64.hpp (+3/-3)
src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp (+8/-8)
src/hotspot/cpu/aarch64/globals_aarch64.hpp (+1/-1)
src/hotspot/cpu/aarch64/icBuffer_aarch64.cpp (+8/-2)
src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp (+123/-146)
src/hotspot/cpu/aarch64/macroAssembler_aarch64.hpp (+10/-6)
src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp (+9/-11)
src/hotspot/cpu/aarch64/vm_version_aarch64.cpp (+1/-1)
src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp (+3/-0)
src/hotspot/cpu/arm/stubGenerator_arm.cpp (+12/-12)
src/hotspot/cpu/arm/templateTable_arm.cpp (+12/-11)
src/hotspot/cpu/ppc/ppc.ad (+3/-0)
src/hotspot/cpu/ppc/stubGenerator_ppc.cpp (+1/-0)
src/hotspot/cpu/s390/assembler_s390.cpp (+1/-1)
src/hotspot/cpu/s390/interp_masm_s390.hpp (+1/-1)
src/hotspot/cpu/x86/assembler_x86.cpp (+75/-0)
src/hotspot/cpu/x86/assembler_x86.hpp (+11/-0)
src/hotspot/cpu/x86/macroAssembler_x86.cpp (+35/-20)
src/hotspot/cpu/x86/macroAssembler_x86.hpp (+2/-0)
src/hotspot/cpu/x86/macroAssembler_x86_adler.cpp (+2/-2)
src/hotspot/cpu/x86/macroAssembler_x86_aes.cpp (+4/-1)
src/hotspot/cpu/x86/matcher_x86.hpp (+1/-5)
src/hotspot/cpu/x86/stubGenerator_x86_32.cpp (+3/-3)
src/hotspot/cpu/x86/stubGenerator_x86_64.cpp (+1089/-343)
src/hotspot/cpu/x86/stubRoutines_x86.cpp (+31/-7)
src/hotspot/cpu/x86/stubRoutines_x86.hpp (+30/-14)
src/hotspot/cpu/x86/templateInterpreterGenerator_x86.cpp (+5/-5)
src/hotspot/cpu/x86/x86_32.ad (+20/-20)
src/hotspot/cpu/x86/x86_64.ad (+20/-20)
src/hotspot/cpu/zero/frame_zero.cpp (+59/-5)
src/hotspot/cpu/zero/globalDefinitions_zero.hpp (+4/-0)
src/hotspot/cpu/zero/vm_version_zero.cpp (+65/-0)
src/hotspot/os/linux/cgroupSubsystem_linux.cpp (+57/-35)
src/hotspot/os/linux/cgroupSubsystem_linux.hpp (+8/-0)
src/hotspot/os/linux/cgroupV1Subsystem_linux.cpp (+41/-6)
src/hotspot/os/linux/cgroupV1Subsystem_linux.hpp (+7/-3)
src/hotspot/os/linux/cgroupV2Subsystem_linux.cpp (+21/-0)
src/hotspot/os/linux/cgroupV2Subsystem_linux.hpp (+5/-1)
src/hotspot/os/linux/osContainer_linux.cpp (+19/-10)
src/hotspot/os/linux/osContainer_linux.hpp (+4/-0)
src/hotspot/os/linux/os_linux.cpp (+18/-26)
src/hotspot/os/linux/os_linux.hpp (+3/-2)
src/hotspot/os/posix/signals_posix.cpp (+26/-17)
src/hotspot/os/posix/vmError_posix.cpp (+11/-9)
src/hotspot/os/windows/os_windows.cpp (+11/-1)
src/hotspot/os_cpu/aix_ppc/thread_aix_ppc.cpp (+78/-11)
src/hotspot/os_cpu/bsd_zero/os_bsd_zero.cpp (+6/-0)
src/hotspot/os_cpu/linux_arm/os_linux_arm.cpp (+1/-2)
src/hotspot/os_cpu/linux_ppc/thread_linux_ppc.cpp (+9/-2)
src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp (+19/-3)
src/hotspot/os_cpu/linux_zero/thread_linux_zero.cpp (+39/-2)
src/hotspot/os_cpu/linux_zero/thread_linux_zero.hpp (+4/-10)
src/hotspot/share/c1/c1_Canonicalizer.cpp (+1/-1)
src/hotspot/share/c1/c1_GraphBuilder.cpp (+5/-10)
src/hotspot/share/c1/c1_Runtime1.cpp (+37/-4)
src/hotspot/share/ci/ciInstanceKlass.cpp (+1/-3)
src/hotspot/share/ci/ciKlass.cpp (+1/-0)
src/hotspot/share/ci/ciStreams.cpp (+17/-1)
src/hotspot/share/ci/ciStreams.hpp (+1/-0)
src/hotspot/share/classfile/javaClasses.cpp (+1/-0)
src/hotspot/share/classfile/vmIntrinsics.hpp (+1/-1)
src/hotspot/share/code/codeCache.cpp (+24/-5)
src/hotspot/share/code/codeCache.hpp (+3/-0)
src/hotspot/share/gc/shared/barrierSet.hpp (+0/-4)
src/hotspot/share/gc/shared/collectedHeap.hpp (+2/-2)
src/hotspot/share/gc/shenandoah/c2/shenandoahBarrierSetC2.cpp (+2/-1)
src/hotspot/share/gc/shenandoah/mode/shenandoahIUMode.cpp (+12/-13)
src/hotspot/share/gc/shenandoah/mode/shenandoahPassiveMode.cpp (+4/-4)
src/hotspot/share/gc/shenandoah/mode/shenandoahSATBMode.cpp (+12/-13)
src/hotspot/share/gc/shenandoah/shenandoahBarrierSet.inline.hpp (+2/-7)
src/hotspot/share/gc/shenandoah/shenandoahFullGC.cpp (+4/-0)
src/hotspot/share/gc/shenandoah/shenandoahFullGC.hpp (+1/-0)
src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp (+1/-1)
src/hotspot/share/gc/z/zDriver.cpp (+5/-0)
src/hotspot/share/interpreter/bytecode.hpp (+4/-2)
src/hotspot/share/interpreter/interpreter.hpp (+3/-3)
src/hotspot/share/interpreter/templateInterpreter.cpp (+6/-2)
src/hotspot/share/jfr/metadata/metadata.xml (+6/-0)
src/hotspot/share/jfr/recorder/checkpoint/jfrCheckpointManager.cpp (+6/-3)
src/hotspot/share/jfr/recorder/repository/jfrChunk.cpp (+2/-0)
src/hotspot/share/jfr/recorder/storage/jfrBuffer.cpp (+5/-3)
src/hotspot/share/jfr/recorder/storage/jfrBuffer.hpp (+3/-2)
src/hotspot/share/jfr/recorder/storage/jfrMemorySpace.inline.hpp (+9/-1)
src/hotspot/share/jfr/writers/jfrWriterHost.inline.hpp (+4/-2)
src/hotspot/share/jvmci/jvmciCompilerToVM.cpp (+11/-6)
src/hotspot/share/oops/access.hpp (+0/-1)
src/hotspot/share/oops/access.inline.hpp (+0/-14)
src/hotspot/share/oops/accessBackend.hpp (+1/-22)
src/hotspot/share/oops/generateOopMap.cpp (+7/-1)
src/hotspot/share/opto/library_call.cpp (+10/-2)
src/hotspot/share/opto/loopTransform.cpp (+47/-25)
src/hotspot/share/opto/loopnode.hpp (+2/-0)
src/hotspot/share/opto/loopopts.cpp (+11/-4)
src/hotspot/share/opto/parse.hpp (+2/-3)
src/hotspot/share/opto/parse2.cpp (+5/-8)
src/hotspot/share/opto/phaseX.cpp (+21/-0)
src/hotspot/share/opto/phaseX.hpp (+1/-0)
src/hotspot/share/opto/runtime.cpp (+2/-1)
src/hotspot/share/opto/split_if.cpp (+1/-1)
src/hotspot/share/opto/stringopts.cpp (+20/-3)
src/hotspot/share/opto/subnode.cpp (+4/-3)
src/hotspot/share/prims/forte.cpp (+49/-6)
src/hotspot/share/prims/jvmtiEnvBase.cpp (+26/-28)
src/hotspot/share/prims/jvmtiEnvBase.hpp (+1/-3)
src/hotspot/share/prims/jvmtiEventController.cpp (+4/-4)
src/hotspot/share/prims/jvmtiExport.cpp (+14/-4)
src/hotspot/share/prims/jvmtiExport.hpp (+1/-1)
src/hotspot/share/prims/jvmtiTagMap.cpp (+122/-74)
src/hotspot/share/prims/jvmtiTagMap.hpp (+10/-9)
src/hotspot/share/prims/jvmtiTagMapTable.cpp (+9/-9)
src/hotspot/share/prims/jvmtiTagMapTable.hpp (+3/-3)
src/hotspot/share/prims/methodHandles.cpp (+6/-2)
src/hotspot/share/runtime/abstract_vm_version.cpp (+4/-0)
src/hotspot/share/runtime/fieldDescriptor.hpp (+1/-1)
src/hotspot/share/runtime/globals.hpp (+1/-1)
src/hotspot/share/runtime/os.cpp (+0/-2)
src/hotspot/share/runtime/sweeper.cpp (+9/-5)
src/hotspot/share/runtime/synchronizer.cpp (+6/-5)
src/hotspot/share/runtime/synchronizer.hpp (+1/-1)
src/hotspot/share/services/mallocTracker.cpp (+9/-0)
src/hotspot/share/services/mallocTracker.hpp (+2/-0)
src/hotspot/share/services/memReporter.cpp (+14/-5)
src/hotspot/share/services/threadService.cpp (+6/-10)
src/hotspot/share/utilities/powerOfTwo.hpp (+3/-2)
src/java.base/linux/classes/jdk/internal/platform/CgroupMetrics.java (+8/-1)
src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java (+19/-25)
src/java.base/linux/native/libjava/CgroupMetrics.c (+8/-0)
src/java.base/share/classes/com/sun/crypto/provider/DHKeyPairGenerator.java (+22/-41)
src/java.base/share/classes/com/sun/crypto/provider/DHParameterGenerator.java (+16/-15)
src/java.base/share/classes/java/lang/String.java (+2/-4)
src/java.base/share/classes/java/lang/StringConcatHelper.java (+5/-2)
src/java.base/share/classes/java/net/InetAddress.java (+12/-7)
src/java.base/share/classes/java/util/Base64.java (+9/-8)
src/java.base/share/classes/java/util/Optional.java (+1/-1)
src/java.base/share/classes/java/util/OptionalDouble.java (+1/-1)
src/java.base/share/classes/java/util/OptionalInt.java (+1/-1)
src/java.base/share/classes/java/util/OptionalLong.java (+1/-1)
src/java.base/share/classes/javax/security/auth/Subject.java (+4/-4)
src/java.base/share/classes/javax/security/auth/login/LoginContext.java (+8/-8)
src/java.base/share/classes/javax/security/auth/spi/LoginModule.java (+20/-14)
src/java.base/share/classes/jdk/internal/loader/NativeLibraries.java (+15/-1)
src/java.base/share/classes/sun/net/util/IPAddressUtil.java (+1/-1)
src/java.base/share/classes/sun/security/pkcs12/PKCS12KeyStore.java (+0/-5)
src/java.base/share/classes/sun/security/provider/ParameterCache.java (+42/-13)
src/java.base/share/classes/sun/security/ssl/ClientHello.java (+30/-25)
src/java.base/share/classes/sun/security/ssl/PredefinedDHParameterSpecs.java (+5/-4)
src/java.base/share/classes/sun/security/ssl/SSLConfiguration.java (+4/-1)
src/java.base/share/classes/sun/security/ssl/SSLEngineImpl.java (+10/-10)
src/java.base/share/classes/sun/security/ssl/SSLSocketImpl.java (+10/-5)
src/java.base/share/classes/sun/security/ssl/SSLSocketInputRecord.java (+6/-0)
src/java.base/share/classes/sun/security/ssl/Utilities.java (+8/-3)
src/java.base/share/classes/sun/security/ssl/X509TrustManagerImpl.java (+6/-0)
src/java.base/share/classes/sun/security/tools/keytool/CertAndKeyGen.java (+4/-4)
src/java.base/share/classes/sun/security/tools/keytool/Main.java (+418/-88)
src/java.base/share/classes/sun/security/tools/keytool/Resources.java (+7/-2)
src/java.base/share/classes/sun/security/util/DisabledAlgorithmConstraints.java (+21/-31)
src/java.base/share/classes/sun/security/util/SafeDHParameterSpec.java (+45/-0)
src/java.base/share/classes/sun/security/util/SecurityProviderConstants.java (+37/-0)
src/java.base/share/classes/sun/util/calendar/ZoneInfoFile.java (+2/-7)
src/java.base/share/classes/sun/util/resources/TimeZoneNames.java (+4/-3)
src/java.base/share/native/libjava/jni_util.c (+8/-1)
src/java.base/share/native/libverify/check_code.c (+30/-21)
src/java.base/share/native/libzip/zlib/ChangeLog (+1515/-0)
src/java.base/share/native/libzip/zlib/README (+115/-0)
src/java.base/share/native/libzip/zlib/compress.c (+110/-0)
src/java.base/share/native/libzip/zlib/crc32.h (+465/-0)
src/java.base/share/native/libzip/zlib/deflate.c (+2222/-0)
src/java.base/share/native/libzip/zlib/deflate.h (+370/-0)
src/java.base/share/native/libzip/zlib/gzclose.c (+49/-0)
src/java.base/share/native/libzip/zlib/gzguts.h (+242/-0)
src/java.base/share/native/libzip/zlib/gzlib.c (+661/-0)
src/java.base/share/native/libzip/zlib/gzread.c (+678/-0)
src/java.base/share/native/libzip/zlib/gzwrite.c (+689/-0)
src/java.base/share/native/libzip/zlib/infback.c (+664/-0)
src/java.base/share/native/libzip/zlib/inffast.c (+347/-0)
src/java.base/share/native/libzip/zlib/inffast.h (+35/-0)
src/java.base/share/native/libzip/zlib/inffixed.h (+118/-0)
src/java.base/share/native/libzip/zlib/inflate.c (+1585/-0)
src/java.base/share/native/libzip/zlib/inflate.h (+149/-0)
src/java.base/share/native/libzip/zlib/inftrees.c (+328/-0)
src/java.base/share/native/libzip/zlib/inftrees.h (+86/-0)
src/java.base/share/native/libzip/zlib/patches/ChangeLog_java (+98/-0)
src/java.base/share/native/libzip/zlib/trees.c (+1205/-0)
src/java.base/share/native/libzip/zlib/trees.h (+152/-0)
src/java.base/share/native/libzip/zlib/uncompr.c (+117/-0)
src/java.base/share/native/libzip/zlib/zadler32.c (+210/-0)
src/java.base/share/native/libzip/zlib/zconf.h (+566/-0)
src/java.base/share/native/libzip/zlib/zcrc32.c (+466/-0)
src/java.base/share/native/libzip/zlib/zlib.h (+1936/-0)
src/java.base/share/native/libzip/zlib/zutil.c (+350/-0)
src/java.base/share/native/libzip/zlib/zutil.h (+295/-0)
src/java.base/unix/native/libjava/TimeZone_md.c (+36/-45)
src/java.base/windows/native/libjava/java_props_md.c (+1/-1)
src/java.base/windows/native/libnet/NTLMAuthSequence.c (+7/-18)
src/java.desktop/macosx/classes/sun/lwawt/macosx/CAccessibleText.java (+4/-2)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ButtonAccessibility.m (+12/-1)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/CommonComponentAccessibility.m (+8/-4)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/ImageAccessibility.m (+6/-1)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/MenuAccessibility.m (+6/-1)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/MenuItemAccessibility.m (+2/-2)
src/java.desktop/macosx/native/libawt_lwawt/awt/a11y/TableRowAccessibility.m (+8/-1)
src/java.desktop/macosx/native/libawt_lwawt/font/AWTFont.m (+3/-0)
src/java.desktop/macosx/native/libosxapp/AWT_debug.h (+1/-1)
src/java.desktop/share/classes/com/sun/imageio/plugins/bmp/BMPImageReader.java (+18/-76)
src/java.desktop/share/classes/com/sun/media/sound/JARSoundbankReader.java (+12/-2)
src/java.desktop/share/classes/java/awt/SystemTray.java (+10/-16)
src/java.desktop/share/classes/javax/swing/text/html/ObjectView.java (+8/-6)
src/java.desktop/share/legal/freetype.md (+82/-41)
src/java.desktop/share/legal/harfbuzz.md (+16/-8)
src/java.desktop/share/native/common/awt/utility/sizecalc.h (+8/-12)
src/java.desktop/share/native/libjavajpeg/README (+385/-0)
src/java.desktop/share/native/libjavajpeg/jcapimin.c (+284/-0)
src/java.desktop/share/native/libjavajpeg/jcapistd.c (+165/-0)
src/java.desktop/share/native/libjavajpeg/jccoefct.c (+453/-0)
src/java.desktop/share/native/libjavajpeg/jccolor.c (+462/-0)
src/java.desktop/share/native/libjavajpeg/jcdctmgr.c (+391/-0)
src/java.desktop/share/native/libjavajpeg/jchuff.c (+916/-0)
src/java.desktop/share/native/libjavajpeg/jchuff.h (+51/-0)
src/java.desktop/share/native/libjavajpeg/jcinit.c (+76/-0)
src/java.desktop/share/native/libjavajpeg/jcmainct.c (+297/-0)
src/java.desktop/share/native/libjavajpeg/jcmarker.c (+682/-0)
src/java.desktop/share/native/libjavajpeg/jcmaster.c (+594/-0)
src/java.desktop/share/native/libjavajpeg/jcomapi.c (+110/-0)
src/java.desktop/share/native/libjavajpeg/jconfig.h (+43/-0)
src/java.desktop/share/native/libjavajpeg/jcparam.c (+614/-0)
src/java.desktop/share/native/libjavajpeg/jcphuff.c (+837/-0)
src/java.desktop/share/native/libjavajpeg/jcprepct.c (+358/-0)
src/java.desktop/share/native/libjavajpeg/jcsample.c (+523/-0)
src/java.desktop/share/native/libjavajpeg/jctrans.c (+392/-0)
src/java.desktop/share/native/libjavajpeg/jdapimin.c (+399/-0)
src/java.desktop/share/native/libjavajpeg/jdapistd.c (+279/-0)
src/java.desktop/share/native/libjavajpeg/jdcoefct.c (+740/-0)
src/java.desktop/share/native/libjavajpeg/jdcolor.c (+398/-0)
src/java.desktop/share/native/libjavajpeg/jdct.h (+180/-0)
src/java.desktop/share/native/libjavajpeg/jddctmgr.c (+273/-0)
src/java.desktop/share/native/libjavajpeg/jdhuff.c (+660/-0)
src/java.desktop/share/native/libjavajpeg/jdhuff.h (+205/-0)
src/java.desktop/share/native/libjavajpeg/jdinput.c (+385/-0)
src/java.desktop/share/native/libjavajpeg/jdmainct.c (+516/-0)
src/java.desktop/share/native/libjavajpeg/jdmarker.c (+1390/-0)
src/java.desktop/share/native/libjavajpeg/jdmaster.c (+561/-0)
src/java.desktop/share/native/libjavajpeg/jdmerge.c (+404/-0)
src/java.desktop/share/native/libjavajpeg/jdphuff.c (+677/-0)
src/java.desktop/share/native/libjavajpeg/jdpostct.c (+294/-0)
src/java.desktop/share/native/libjavajpeg/jdsample.c (+482/-0)
src/java.desktop/share/native/libjavajpeg/jdtrans.c (+147/-0)
src/java.desktop/share/native/libjavajpeg/jerror.c (+272/-0)
src/java.desktop/share/native/libjavajpeg/jerror.h (+295/-0)
src/java.desktop/share/native/libjavajpeg/jfdctflt.c (+172/-0)
src/java.desktop/share/native/libjavajpeg/jfdctfst.c (+228/-0)
src/java.desktop/share/native/libjavajpeg/jfdctint.c (+287/-0)
src/java.desktop/share/native/libjavajpeg/jidctflt.c (+246/-0)
src/java.desktop/share/native/libjavajpeg/jidctfst.c (+372/-0)
src/java.desktop/share/native/libjavajpeg/jidctint.c (+393/-0)
src/java.desktop/share/native/libjavajpeg/jidctred.c (+402/-0)
src/java.desktop/share/native/libjavajpeg/jmemmgr.c (+1131/-0)
src/java.desktop/share/native/libjavajpeg/jmemnobs.c (+116/-0)
src/java.desktop/share/native/libjavajpeg/jmemsys.h (+202/-0)
src/java.desktop/share/native/libjavajpeg/jmorecfg.h (+378/-0)
src/java.desktop/share/native/libjavajpeg/jpegint.h (+396/-0)
src/java.desktop/share/native/libjavajpeg/jpeglib.h (+1100/-0)
src/java.desktop/share/native/libjavajpeg/jquant1.c (+860/-0)
src/java.desktop/share/native/libjavajpeg/jquant2.c (+1314/-0)
src/java.desktop/share/native/libjavajpeg/jutils.c (+183/-0)
src/java.desktop/share/native/libjavajpeg/jversion.h (+18/-0)
src/java.desktop/share/native/libsplashscreen/giflib/COPYING (+19/-0)
src/java.desktop/share/native/libsplashscreen/giflib/dgif_lib.c (+1265/-0)
src/java.desktop/share/native/libsplashscreen/giflib/gif_err.c (+123/-0)
src/java.desktop/share/native/libsplashscreen/giflib/gif_hash.h (+69/-0)
src/java.desktop/share/native/libsplashscreen/giflib/gif_lib.h (+335/-0)
src/java.desktop/share/native/libsplashscreen/giflib/gif_lib_private.h (+94/-0)
src/java.desktop/share/native/libsplashscreen/giflib/gifalloc.c (+444/-0)
src/java.desktop/share/native/libsplashscreen/giflib/openbsd-reallocarray.c (+99/-0)
src/java.desktop/share/native/libsplashscreen/libpng/CHANGES (+6109/-0)
src/java.desktop/share/native/libsplashscreen/libpng/LICENSE (+134/-0)
src/java.desktop/share/native/libsplashscreen/libpng/README (+183/-0)
src/java.desktop/share/native/libsplashscreen/libpng/UPDATING.txt (+49/-0)
src/java.desktop/share/native/libsplashscreen/libpng/png.c (+4635/-0)
src/java.desktop/share/native/libsplashscreen/libpng/png.h (+3275/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngconf.h (+651/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngdebug.h (+181/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngerror.c (+991/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngget.c (+1277/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pnginfo.h (+295/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pnglibconf.h (+250/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngmem.c (+312/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngpread.c (+1124/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngpriv.h (+2180/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngread.c (+4253/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngrio.c (+148/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngrtran.c (+5072/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngrutil.c (+4709/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngset.c (+1830/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngstruct.h (+517/-0)
src/java.desktop/share/native/libsplashscreen/libpng/pngtrans.c (+892/-0)
src/java.desktop/windows/classes/sun/awt/windows/WTrayIconPeer.java (+9/-9)
src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp (+9/-2)
src/java.desktop/windows/native/libawt/windows/awt_Font.cpp (+10/-10)
src/java.desktop/windows/native/libawt/windows/awt_PrintJob.cpp (+2/-1)
src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.cpp (+38/-11)
src/java.desktop/windows/native/libawt/windows/awt_TrayIcon.h (+20/-2)
src/java.desktop/windows/native/libfontmanager/fontpath.c (+9/-8)
src/java.desktop/windows/native/libfontmanager/lcdglyph.c (+2/-1)
src/java.instrument/windows/native/libinstrument/EncodingSupport_md.c (+2/-2)
src/java.management/share/classes/com/sun/jmx/remote/security/FileLoginModule.java (+4/-2)
src/java.naming/share/classes/com/sun/jndi/ldap/LdapCtxFactory.java (+8/-0)
src/java.smartcardio/unix/native/libj2pcsc/MUSCLE/COPYING (+95/-0)
src/java.smartcardio/unix/native/libj2pcsc/MUSCLE/pcsclite.h (+309/-0)
src/java.smartcardio/unix/native/libj2pcsc/MUSCLE/winscard.h (+122/-0)
src/java.smartcardio/unix/native/libj2pcsc/MUSCLE/wintypes.h (+115/-0)
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/AttributeMap.java (+5/-5)
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/DOMNormalizer.java (+5/-8)
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/dom/NamedNodeMapImpl.java (+5/-5)
src/java.xml/share/legal/dom.md (+15/-0)
src/java.xml/share/legal/jcup.md (+9/-2)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java (+3/-3)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java (+1/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java (+3/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java (+2/-3)
src/jdk.compiler/share/classes/com/sun/tools/javac/parser/ReferenceParser.java (+19/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties (+3/-0)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac.properties (+2/-2)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_ja.properties (+1/-1)
src/jdk.compiler/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java (+13/-5)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11AEADCipher.java (+2/-2)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Cipher.java (+23/-7)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyPairGenerator.java (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11KeyStore.java (+1/-1)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11PSSSignature.java (+5/-5)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/P11Signature.java (+2/-2)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SessionManager.java (+7/-2)
src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11Exception.java (+25/-2)
src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp (+25/-5)
src/jdk.hotspot.agent/doc/clhsdb.html (+1/-1)
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/CommandProcessor.java (+12/-0)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/CompilerToVM.java (+8/-0)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotConstantPool.java (+77/-32)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJDKReflection.java (+2/-2)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java (+35/-1)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotProfilingInfo.java (+4/-1)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldImpl.java (+16/-9)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedJavaMethodImpl.java (+6/-2)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java (+35/-1)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfig.java (+1/-0)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ConstantPool.java (+18/-0)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaField.java (+15/-0)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java (+16/-18)
src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java (+20/-0)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_ja.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/resources/doclets_zh_CN.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_ja.properties (+1/-1)
src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/resources/javadoc_zh_CN.properties (+1/-1)
src/jdk.jdeps/share/classes/com/sun/tools/jdeps/InverseDepsAnalyzer.java (+7/-4)
src/jdk.jdwp.agent/share/native/libjdwp/classTrack.c (+4/-96)
src/jdk.jdwp.agent/share/native/libjdwp/debugInit.c (+0/-1)
src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.c (+5/-43)
src/jdk.jdwp.agent/share/native/libjdwp/eventHandler.h (+1/-0)
src/jdk.jfr/share/classes/jdk/jfr/internal/MetadataRepository.java (+7/-26)
src/jdk.jfr/share/classes/jdk/jfr/internal/PlatformRecorder.java (+3/-3)
src/jdk.jfr/share/classes/jdk/jfr/internal/Utils.java (+28/-1)
src/jdk.jfr/share/classes/jdk/jfr/internal/instrument/RandomAccessFileInstrumentor.java (+1/-1)
src/jdk.jfr/share/conf/jfr/default.jfc (+4/-0)
src/jdk.jfr/share/conf/jfr/profile.jfc (+4/-0)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink.properties (+1/-1)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_ja.properties (+1/-1)
src/jdk.jlink/share/classes/jdk/tools/jlink/resources/jlink_zh_CN.properties (+1/-1)
src/jdk.localedata/share/classes/sun/util/resources/ext/CurrencyNames_hr_HR.properties (+2/-1)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_de.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_es.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_fr.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_it.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ja.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_ko.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_pt_BR.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_sv.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_CN.java (+4/-3)
src/jdk.localedata/share/classes/sun/util/resources/ext/TimeZoneNames_zh_TW.java (+4/-3)
src/jdk.management.agent/share/classes/sun/management/jmxremote/ConnectorBootstrap.java (+7/-11)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/JndiLoginModule.java (+13/-6)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/KeyStoreLoginModule.java (+19/-17)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/Krb5LoginModule.java (+4/-2)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/LdapLoginModule.java (+7/-3)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/NTLoginModule.java (+11/-10)
src/jdk.security.auth/share/classes/com/sun/security/auth/module/UnixLoginModule.java (+13/-6)
test/hotspot/gtest/metaspace/test_metaspacearena.cpp (+47/-0)
test/hotspot/jtreg/ProblemList-Xcomp.txt (+0/-2)
test/hotspot/jtreg/ProblemList.txt (+24/-16)
test/hotspot/jtreg/compiler/c1/BadStateAtLongCmp.jasm (+69/-0)
test/hotspot/jtreg/compiler/c1/KlassAccessCheck.jasm (+86/-0)
test/hotspot/jtreg/compiler/c1/KlassAccessCheckPackagePrivate.jasm (+29/-0)
test/hotspot/jtreg/compiler/c1/KlassAccessCheckTest.java (+61/-0)
test/hotspot/jtreg/compiler/c1/TestBadStateAtLongCmp.java (+43/-0)
test/hotspot/jtreg/compiler/c1/TestPinnedIntrinsics.java (+1/-15)
test/hotspot/jtreg/compiler/c2/Test7179138_1.java (+3/-0)
test/hotspot/jtreg/compiler/c2/TestUnsignedCompareIntoEqualityNotCanonical.java (+46/-0)
test/hotspot/jtreg/compiler/c2/aarch64/TestFarJump.java (+137/-0)
test/hotspot/jtreg/compiler/c2/cr6865031/Test.java (+2/-0)
test/hotspot/jtreg/compiler/c2/irTests/CmpUWithZero.java (+62/-0)
test/hotspot/jtreg/compiler/c2/irTests/TestFewIterationsCountedLoop.java (+139/-0)
test/hotspot/jtreg/compiler/ccp/TestInfiniteIGVNAfterCCP.java (+90/-0)
test/hotspot/jtreg/compiler/codegen/ShiftByZero.java (+73/-0)
test/hotspot/jtreg/compiler/codegen/ShiftTest.java (+132/-2)
test/hotspot/jtreg/compiler/codegen/TestCharVect2.java (+9/-1)
test/hotspot/jtreg/compiler/codegen/aes/Test8292158.java (+95/-0)
test/hotspot/jtreg/compiler/intrinsics/base64/TestBase64.java (+8/-4)
test/hotspot/jtreg/compiler/intrinsics/bmi/verifycode/BzhiTestI2L.java (+1/-0)
test/hotspot/jtreg/compiler/jvmci/common/patches/jdk.internal.vm.ci/jdk/vm/ci/hotspot/HotSpotResolvedJavaFieldHelper.java (+37/-0)
test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/HotSpotResolvedJavaFieldTest.java (+153/-0)
test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.hotspot.test/src/jdk/vm/ci/hotspot/test/TestHotSpotResolvedJavaField.java (+66/-0)
test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaField.java (+120/-6)
test/hotspot/jtreg/compiler/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaMethod.java (+63/-51)
test/hotspot/jtreg/compiler/lib/ir_framework/IRNode.java (+2/-0)
test/hotspot/jtreg/compiler/loopopts/TestPhiInSkeletonPredicateExpression.java (+108/-0)
test/hotspot/jtreg/compiler/loopstripmining/TestLSMBadControlOverride.java (+68/-0)
test/hotspot/jtreg/compiler/runtime/Test6826736.java (+2/-1)
test/hotspot/jtreg/compiler/stringopts/SideEffectBeforeConstructor.jasm (+58/-0)
test/hotspot/jtreg/compiler/stringopts/TestSideEffectBeforeConstructor.java (+49/-0)
test/hotspot/jtreg/compiler/vectorapi/VectorReplicateLongSpecialImmTest.java (+315/-0)
test/hotspot/jtreg/containers/cgroup/CgroupSubsystemFactory.java (+62/-9)
test/hotspot/jtreg/containers/docker/DockerBasicTest.java (+14/-0)
test/hotspot/jtreg/containers/docker/TestCPUAwareness.java (+10/-5)
test/hotspot/jtreg/containers/docker/TestMemoryAwareness.java (+72/-5)
test/hotspot/jtreg/containers/docker/TestMemoryWithCgroupV1.java (+10/-1)
test/hotspot/jtreg/containers/docker/TestMisc.java (+13/-0)
test/hotspot/jtreg/gc/epsilon/TestMemoryMXBeans.java (+1/-1)
test/hotspot/jtreg/gc/g1/TestShrinkAuxiliaryData27.java (+5/-5)
test/hotspot/jtreg/gc/g1/mixedgc/TestOldGenCollectionUsage.java (+0/-3)
test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java (+47/-6)
test/hotspot/jtreg/gtest/GTestWrapper.java (+1/-1)
test/hotspot/jtreg/resourcehogs/serviceability/sa/ClhsdbRegionDetailsScanOopsForG1.java (+1/-2)
test/hotspot/jtreg/resourcehogs/serviceability/sa/LingeredAppWithLargeStringArray.java (+4/-1)
test/hotspot/jtreg/runtime/GenerateOopMap/TestGenerateOopMapCrash.java (+56/-0)
test/hotspot/jtreg/runtime/GenerateOopMap/if_icmpleIsLastOpcode.jasm (+52/-0)
test/hotspot/jtreg/runtime/Metaspace/elastic/MetaspaceTestContext.java (+3/-2)
test/hotspot/jtreg/runtime/Metaspace/elastic/MetaspaceTestManyArenasManyThreads.java (+13/-0)
test/hotspot/jtreg/runtime/Thread/TestBreakSignalThreadDump.java (+91/-0)
test/hotspot/jtreg/runtime/cds/SharedBaseAddress.java (+64/-24)
test/hotspot/jtreg/runtime/cds/appcds/customLoader/test-classes/HelloUnload.java (+2/-13)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/CDSMHTest_generate.sh (+4/-10)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesAsCollectorTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesCastFailureTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesGeneralTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesInvokersTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesPermuteArgumentsTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/methodHandles/MethodHandlesSpreadArgumentsTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/CDSMHTest_generate.sh (+4/-10)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesAsCollectorTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesCastFailureTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesGeneralTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesInvokersTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesPermuteArgumentsTest.java (+3/-9)
test/hotspot/jtreg/runtime/cds/appcds/methodHandles/MethodHandlesSpreadArgumentsTest.java (+3/-9)
test/hotspot/jtreg/serviceability/sa/ClhsdbFindPC.java (+9/-0)
test/hotspot/jtreg/serviceability/sa/ClhsdbScanOops.java (+38/-18)
test/hotspot/jtreg/serviceability/sa/LingeredAppWithLock.java (+14/-1)
test/hotspot/jtreg/serviceability/sa/TestClassDump.java (+6/-1)
test/hotspot/jtreg/serviceability/sa/TestObjectMonitorIterate.java (+7/-3)
test/hotspot/jtreg/vmTestbase/gc/gctests/LoadUnloadGC2/LoadUnloadGC2.java (+18/-6)
test/hotspot/jtreg/vmTestbase/nsk/stress/except/except010.java (+2/-1)
test/hotspot/jtreg/vmTestbase/vm/mlvm/meth/stress/jni/nativeAndMH/nativeAndMH.cpp (+2/-1)
test/jaxp/javax/xml/jaxp/unittest/dom/DocumentTest.java (+54/-2)
test/jdk/ProblemList.txt (+13/-17)
test/jdk/TEST.ROOT (+5/-1)
test/jdk/com/apple/eawt/DefaultMenuBar/DefaultMenuBarTest.java (+16/-22)
test/jdk/com/sun/jdi/ClassUnloadEventTest.java (+215/-0)
test/jdk/java/awt/Dialog/SiblingChildOrder/SiblingChildOrderTest.java (+1/-1)
test/jdk/java/awt/Focus/SimpleWindowActivationTest/SimpleWindowActivationTest.java (+20/-9)
test/jdk/java/awt/Graphics/LCDTextAndGraphicsState.java (+86/-24)
test/jdk/java/awt/Graphics/TextAAHintsTest.java (+110/-22)
test/jdk/java/awt/Graphics2D/CopyAreaOOB.java (+21/-45)
test/jdk/java/awt/Paint/PaintNativeOnUpdate.java (+1/-1)
test/jdk/java/awt/Robot/RobotWheelTest/RobotWheelTest.java (+37/-10)
test/jdk/java/awt/Toolkit/ScreenInsetsTest/ScreenInsetsTest.java (+8/-3)
test/jdk/java/awt/TrayIcon/TrayIconScalingTest.java (+128/-0)
test/jdk/java/awt/Window/BackgroundIsNotUpdated/BackgroundIsNotUpdated.java (+1/-1)
test/jdk/java/awt/Window/MultiWindowApp/ChildAlwaysOnTopTest.java (+189/-95)
test/jdk/java/awt/Window/ShapedAndTranslucentWindows/Common.java (+2/-2)
test/jdk/java/awt/Window/TranslucentJAppletTest/TranslucentJAppletTest.java (+1/-1)
test/jdk/java/awt/Window/WindowOwnedByEmbeddedFrameTest/WindowOwnedByEmbeddedFrameTest.java (+1/-1)
test/jdk/java/awt/a11y/AccessibleActionsTest.java (+96/-7)
test/jdk/java/awt/a11y/AccessibleJPopupMenuTest.java (+1/-1)
test/jdk/java/awt/dnd/DropTargetInInternalFrameTest.java (+380/-0)
test/jdk/java/awt/event/ComponentEvent/TextAreaTextEventTest.java (+141/-0)
test/jdk/java/awt/event/KeyEvent/KeyEventLocationTest.java (+212/-0)
test/jdk/java/awt/image/multiresolution/MultiresolutionIconTest.java (+6/-2)
test/jdk/java/awt/print/Dialog/DialogCopies.java (+56/-23)
test/jdk/java/awt/print/Dialog/DialogOrient.java (+1/-1)
test/jdk/java/awt/print/PrinterJob/ImagePrinting/ClippedImages.java (+115/-103)
test/jdk/java/awt/print/PrinterJob/ImagePrinting/ImageTypes.java (+114/-75)
test/jdk/java/awt/print/PrinterJob/PageDialogTest.java (+91/-137)
test/jdk/java/awt/print/PrinterJob/PageRangesDlgTest.java (+46/-30)
test/jdk/java/io/File/GetXSpace.java (+5/-6)
test/jdk/java/lang/String/concat/ImplicitStringConcatOOME.java (+136/-0)
test/jdk/java/lang/reflect/PublicMethods/PublicMethodsTest.java (+2/-2)
test/jdk/java/net/httpclient/http2/TLSConnection.java (+3/-2)
test/jdk/java/security/SignedJar/CustomClassLoader.java (+43/-0)
test/jdk/java/security/SignedJar/SignedJarWithCustomClassLoader.java (+94/-0)
test/jdk/java/security/cert/CertPathBuilder/targetConstraints/BuildEEBasicConstraints.java (+9/-1)
test/jdk/java/security/cert/pkix/policyChanges/TestPolicy.java (+6/-1)
test/jdk/java/text/Format/NumberFormat/CurrencySymbols.properties (+3/-3)
test/jdk/java/util/Currency/ValidateISO4217.java (+2/-2)
test/jdk/java/util/Currency/tablea1.txt (+4/-4)
test/jdk/java/util/TimeZone/CustomTzIDCheckDST.java (+77/-0)
test/jdk/java/util/TimeZone/TimeZoneData/VERSION (+1/-1)
test/jdk/java/util/TimeZone/TimeZoneData/aliases.txt (+176/-164)
test/jdk/java/util/TimeZone/TimeZoneData/displaynames.txt (+3/-10)
test/jdk/java/util/zip/CloseInflaterDeflaterTest.java (+3/-2)
test/jdk/javax/accessibility/4702233/AccessibleActionConstants.java (+44/-0)
test/jdk/javax/accessibility/4702233/AccessibleContextConstants.java (+71/-0)
test/jdk/javax/accessibility/4702233/AccessiblePropertiesTest.java (+96/-0)
test/jdk/javax/accessibility/4702233/AccessibleRelationConstants.java (+65/-0)
test/jdk/javax/accessibility/4702233/AccessibleRoleConstants.java (+75/-0)
test/jdk/javax/accessibility/4702233/AccessibleStateConstants.java (+62/-0)
test/jdk/javax/accessibility/AccessibleJTableSelectionTest.java (+173/-0)
test/jdk/javax/accessibility/JFileChooserAccessibleDescriptionTest.java (+102/-0)
test/jdk/javax/accessibility/JScrollPaneAccessibleRelationsTest.java (+118/-0)
test/jdk/javax/net/ssl/SSLSession/ResumeTLS13withSNI.java (+5/-2)
test/jdk/javax/net/ssl/ServerName/EndingDotHostname.java (+251/-0)
test/jdk/javax/net/ssl/templates/SSLExampleCert.java (+414/-0)
test/jdk/javax/security/auth/login/modules/SafeLogout.java (+118/-0)
test/jdk/javax/sound/midi/Devices/ClosedReceiver.java (+1/-0)
test/jdk/javax/sound/midi/Devices/InitializationHang.java (+1/-0)
test/jdk/javax/sound/midi/Devices/MidiDeviceGetReceivers.java (+1/-0)
test/jdk/javax/sound/midi/Devices/MidiIO.java (+1/-0)
test/jdk/javax/sound/midi/Devices/MidiOutGetMicrosecondPositionBug.java (+1/-0)
test/jdk/javax/sound/midi/Devices/OpenClose.java (+1/-0)
test/jdk/javax/sound/midi/Devices/ReceiverTransmitterAvailable.java (+1/-0)
test/jdk/javax/sound/midi/Devices/Reopen.java (+1/-0)
test/jdk/javax/sound/midi/MidiSystem/DefaultDevices.java (+1/-0)
test/jdk/javax/sound/midi/MidiSystem/GetSequencer.java (+1/-0)
test/jdk/javax/sound/midi/Sequence/GetMicrosecondLength.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/LoopIAE.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/MetaCallback.java (+28/-6)
test/jdk/javax/sound/midi/Sequencer/Recording.java (+1/-1)
test/jdk/javax/sound/midi/Sequencer/SeqRecordDoesNotCopy.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SeqRecordsRealTimeEvents.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SeqStartRecording.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SequencerCacheValues.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SequencerImplicitSynthOpen.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SequencerSetMuteSolo.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SequencerState.java (+1/-0)
test/jdk/javax/sound/midi/Sequencer/SetTickPosition.java (+2/-1)
test/jdk/javax/sound/midi/Sequencer/TickLength.java (+1/-0)
test/jdk/javax/sound/midi/Soundbanks/ExtraCharInSoundbank.java (+1/-0)
test/jdk/javax/sound/midi/Synthesizer/Receiver/bug6186488.java (+160/-29)
test/jdk/javax/sound/sampled/AudioSystem/DefaultMixers.java (+1/-0)
test/jdk/javax/sound/sampled/Clip/ClipCloseLoss.java (+1/-0)
test/jdk/javax/sound/sampled/Clip/ClipFlushCrash.java (+1/-0)
test/jdk/javax/sound/sampled/Clip/Drain/ClipDrain.java (+1/-0)
test/jdk/javax/sound/sampled/Clip/Duration/ClipDuration.java (+1/-0)
test/jdk/javax/sound/sampled/Clip/Endpoint/ClipSetEndPoint.java (+1/-0)
test/jdk/javax/sound/sampled/Controls/FloatControl/FloatControlBug.java (+1/-0)
test/jdk/javax/sound/sampled/DataLine/DataLineInfoNegBufferSize.java (+1/-0)
test/jdk/javax/sound/sampled/DataLine/DataLine_ArrayIndexOutOfBounds.java (+1/-0)
test/jdk/javax/sound/sampled/DataLine/LineDefFormat.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/16and32KHz/Has16and32KHz.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/BufferSizeCheck.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/ChangingBuffer.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/ClickInPlay/Test4218609.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/ClipOpenException.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/FrameSize/FrameSizeTest.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/SDLwrite.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/SourceDataLineDefaultBufferSizeCrash.java (+1/-0)
test/jdk/javax/sound/sampled/Lines/StopStart.java (+1/-0)
test/jdk/javax/sound/sampled/LinuxBlock/PlaySine.java (+1/-0)
test/jdk/javax/sound/sampled/LinuxCrash/ClipLinuxCrash.java (+1/-0)
test/jdk/javax/sound/sampled/LinuxCrash/ClipLinuxCrash2.java (+1/-0)
test/jdk/javax/sound/sampled/LinuxCrash/SDLLinuxCrash.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/BogusMixers.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/BothEndiansAndSigns.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/DirectSoundRepeatingBuffer/Test4997635.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/DirectSoundUnderrunSilence/Test5032020.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/NoSimpleInputDevice.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/PhantomMixers.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/PlugHwMonoAnd8bitAvailable.java (+1/-0)
test/jdk/javax/sound/sampled/Mixers/UnexpectedIAE.java (+1/-0)
test/jdk/javax/sound/sampled/Recording/TargetDataLineFlush.java (+1/-0)
test/jdk/javax/sound/sampled/spi/MixerProvider/ExpectedNPEOnNull.java (+1/-0)
test/jdk/javax/swing/JButton/4659800/EnterKeyActivatesButton.java (+124/-0)
test/jdk/javax/swing/JEditorPane/4666101/JEditorPaneNavigationTest.java (+197/-0)
test/jdk/javax/swing/JMenu/4515762/bug4515762.java (+31/-18)
test/jdk/javax/swing/JPopupMenu/JPopupMenuFocusStealTest.java (+179/-0)
test/jdk/javax/swing/JSpinner/4515999/JSpinnerMouseAndKeyPressTest.java (+201/-0)
test/jdk/javax/swing/JSpinner/JSpinnerFocusTest.java (+121/-0)
test/jdk/javax/swing/JTabbedPane/TestBackgroundScrollPolicy.java (+1/-1)
test/jdk/javax/swing/JTree/6263446/bug6263446.java (+24/-4)
test/jdk/javax/swing/plaf/nimbus/NimbusJTreeSelTextColor.java (+91/-101)
test/jdk/javax/swing/plaf/synth/SynthButtonUI/6276188/bug6276188.java (+1/-1)
test/jdk/jdk/internal/platform/cgroup/TestCgroupSubsystemFactory.java (+24/-13)
test/jdk/jdk/internal/platform/docker/TestDockerBasic.java (+73/-0)
test/jdk/jdk/internal/platform/docker/TestDockerCpuMetrics.java (+18/-0)
test/jdk/jdk/internal/platform/docker/TestDockerMemoryMetrics.java (+10/-0)
test/jdk/jdk/jfr/api/consumer/streaming/TestLatestEvent.java (+21/-3)
test/jdk/jdk/jfr/event/compiler/TestCodeCacheFull.java (+1/-0)
test/jdk/jdk/jfr/event/compiler/TestJitRestart.java (+121/-0)
test/jdk/jdk/jfr/event/oldobject/TestClassLoaderLeak.java (+2/-3)
test/jdk/jdk/nio/zipfs/ZipFSOutputStreamTest.java (+14/-9)
test/jdk/security/infra/java/security/cert/CertPathValidator/certification/QuoVadisCA.java (+191/-170)
test/jdk/sun/java2d/DirectX/OnScreenRenderingResizeTest/OnScreenRenderingResizeTest.java (+131/-109)
test/jdk/sun/java2d/GdiRendering/ClipShapeRendering.java (+518/-0)
test/jdk/sun/java2d/SunGraphics2D/CoordinateTruncationBug.java (+271/-0)
test/jdk/sun/java2d/cmm/ColorConvertOp/UnexpectedSourceImageSize.java (+1/-0)
test/jdk/sun/management/jmxremote/bootstrap/management_ssltest07_ok.properties.in (+2/-2)
test/jdk/sun/net/www/http/KeepAliveCache/KeepAliveProperty.java (+2/-1)
test/jdk/sun/security/pkcs11/Cipher/TestPaddingOOB.java (+101/-0)
test/jdk/sun/security/pkcs11/Signature/TestDSAKeyLength.java (+2/-2)
test/jdk/sun/security/ssl/SSLSessionImpl/NoInvalidateSocketException.java (+2/-2)
test/jdk/sun/security/ssl/SSLSocketImpl/SSLSocketSSLEngineCloseInbound.java (+491/-0)
test/jdk/sun/security/ssl/X509TrustManagerImpl/BasicConstraints12.java (+73/-0)
test/jdk/sun/security/tools/jarsigner/TimestampCheck.java (+0/-45)
test/jdk/sun/security/tools/keytool/ReadJar.java (+98/-2)
test/jdk/sun/security/tools/keytool/TestSha1Usage.java (+60/-0)
test/jdk/sun/text/resources/LocaleData.cldr (+4/-0)
test/jdk/sun/text/resources/LocaleDataTest.java (+1/-1)
test/jdk/sun/util/calendar/zi/TestZoneInfo310.java (+4/-1)
test/jdk/sun/util/resources/cldr/TimeZoneNamesTest.java (+19/-1)
test/langtools/jdk/javadoc/doclet/testJavaFX/TestJavaFxMode.java (+8/-5)
test/langtools/tools/doclint/CrashInAnnotateTest.java (+31/-0)
test/langtools/tools/doclint/CrashInAnnotateTest.out (+11/-0)
test/langtools/tools/javac/diags/examples/NoAnnotationsInLink.java (+32/-0)
test/langtools/tools/javac/lambda/methodReference/MethodRefNewInnerRawTest.java (+24/-0)
test/langtools/tools/javac/lambda/methodReference/MethodRefNewInnerRawTest.out (+5/-0)
test/langtools/tools/javac/lvti/ConstantTypes.java (+99/-0)
test/langtools/tools/javac/patterns/NullSwitch.java (+15/-1)
test/langtools/tools/jdeps/optionalDependency/OptionalDependencyTest.java (+98/-0)
test/langtools/tools/jdeps/optionalDependency/src/m1/module-info.java (+27/-0)
test/langtools/tools/jdeps/optionalDependency/src/m1/p1/P.java (+27/-0)
test/langtools/tools/jdeps/optionalDependency/src/m2/module-info.java (+27/-0)
test/langtools/tools/jdeps/optionalDependency/src/m2/p2/Q.java (+28/-0)
test/langtools/tools/jdeps/optionalDependency/src/m3/module-info.java (+26/-0)
test/langtools/tools/jdeps/optionalDependency/src/m3/p3/R.java (+29/-0)
test/lib-test/jdk/test/whitebox/vm_flags/BooleanTest.java (+1/-1)
test/lib-test/jdk/test/whitebox/vm_flags/DoubleTest.java (+1/-1)
test/lib-test/jdk/test/whitebox/vm_flags/StringTest.java (+1/-1)
test/lib-test/jdk/test/whitebox/vm_flags/Uint64Test.java (+1/-1)
test/lib-test/jdk/test/whitebox/vm_flags/UintxTest.java (+1/-1)
test/lib/jdk/test/lib/jfr/EventNames.java (+1/-0)
test/micro/org/openjdk/bench/java/lang/StringDecode.java (+103/-42)
test/micro/org/openjdk/bench/java/util/TestCRC32C.java (+60/-0)
test/micro/org/openjdk/bench/vm/gc/Alloc.java (+9/-8)
test/micro/org/openjdk/bench/vm/gc/RawAllocationRate.java (+28732/-0)
Reviewer Review Type Date Requested Status
git-ubuntu import Pending
Review via email: mp+435913@code.launchpad.net

Description of the change

openjdk-17 (17.0.6+10-0ubuntu1) lunar; urgency=medium

  * OpenJDK 17.0.6 release, build 10.
    - CVE-2023-21835, CVE-2023-21843
    - Release notes:
      https://www.oracle.com/java/technologies/javase/17-0-6-relnotes.html
  * debian/patches/*: Refreshed patches for the new release and dropped unused
    patches.
  * debian/rules: add lunar to jtreg version selection.

PPA: https://launchpad.net/~vpa1977/+archive/ubuntu/jdk-security-release2

To post a comment you must log in.
1978527... by Vladimir Petko

maintainer

4f68554... by Vladimir Petko

 maintainer

26e138b... by Vladimir Petko

fix patch formatting

4bdf74f... by Vladimir Petko

New upstream version 17.0.6+10

8d62909... by Vladimir Petko

Update upstream source from tag 'upstream/17.0.6+10'

Update to upstream version '17.0.6+10'
with Debian dir af7e9d5c19652037b4b8a5b4025b023b47630b54

e9458f0... by Vladimir Petko

changelog .10

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitattributes b/.gitattributes
2new file mode 100644
3index 0000000..7745062
4--- /dev/null
5+++ b/.gitattributes
6@@ -0,0 +1 @@
7+* -text
8diff --git a/.github/actions/config/action.yml b/.github/actions/config/action.yml
9new file mode 100644
10index 0000000..5f648ff
11--- /dev/null
12+++ b/.github/actions/config/action.yml
13@@ -0,0 +1,46 @@
14+#
15+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
16+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
17+#
18+# This code is free software; you can redistribute it and/or modify it
19+# under the terms of the GNU General Public License version 2 only, as
20+# published by the Free Software Foundation. Oracle designates this
21+# particular file as subject to the "Classpath" exception as provided
22+# by Oracle in the LICENSE file that accompanied this code.
23+#
24+# This code is distributed in the hope that it will be useful, but WITHOUT
25+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
26+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
27+# version 2 for more details (a copy is included in the LICENSE file that
28+# accompanied this code).
29+#
30+# You should have received a copy of the GNU General Public License version
31+# 2 along with this work; if not, write to the Free Software Foundation,
32+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
33+#
34+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
35+# or visit www.oracle.com if you need additional information or have any
36+# questions.
37+#
38+
39+name: 'Config'
40+description: 'Read JDK Configuration Variables'
41+inputs:
42+ var:
43+ description: 'The name of the variable to read'
44+ required: true
45+outputs:
46+ value:
47+ description: 'The value of the configuration variable'
48+ value: ${{ steps.read-config.outputs.value }}
49+
50+runs:
51+ using: composite
52+ steps:
53+ - name: 'Read configuration variable from repo'
54+ id: read-config
55+ run: |
56+ # Extract value from configuration file
57+ value="$(grep -h ${{ inputs.var }}= make/conf/github-actions.conf | cut -d '=' -f 2-)"
58+ echo "value=$value" >> $GITHUB_OUTPUT
59+ shell: bash
60diff --git a/.github/actions/do-build/action.yml b/.github/actions/do-build/action.yml
61new file mode 100644
62index 0000000..3deb7f4
63--- /dev/null
64+++ b/.github/actions/do-build/action.yml
65@@ -0,0 +1,80 @@
66+#
67+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
68+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
69+#
70+# This code is free software; you can redistribute it and/or modify it
71+# under the terms of the GNU General Public License version 2 only, as
72+# published by the Free Software Foundation. Oracle designates this
73+# particular file as subject to the "Classpath" exception as provided
74+# by Oracle in the LICENSE file that accompanied this code.
75+#
76+# This code is distributed in the hope that it will be useful, but WITHOUT
77+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
79+# version 2 for more details (a copy is included in the LICENSE file that
80+# accompanied this code).
81+#
82+# You should have received a copy of the GNU General Public License version
83+# 2 along with this work; if not, write to the Free Software Foundation,
84+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
85+#
86+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
87+# or visit www.oracle.com if you need additional information or have any
88+# questions.
89+#
90+
91+name: 'Do build'
92+description: 'Build the JDK using make'
93+inputs:
94+ make-target:
95+ description: 'Make target(s)'
96+ required: true
97+ platform:
98+ description: 'Platform name'
99+ required: true
100+ debug-suffix:
101+ description: 'File name suffix denoting debug level, possibly empty'
102+ required: false
103+
104+runs:
105+ using: composite
106+ steps:
107+ - name: 'Build'
108+ id: build
109+ run: >
110+ make LOG=info ${{ inputs.make-target }}
111+ || bash ./.github/scripts/gen-build-failure-report.sh "$GITHUB_STEP_SUMMARY"
112+ shell: bash
113+
114+ - name: 'Check for failure'
115+ id: check
116+ run: |
117+ # Check for failure marker file
118+ build_dir="$(ls -d build/*)"
119+ if [[ -e $build_dir/build-failure ]]; then
120+ # Collect relevant log files
121+ mkdir failure-logs
122+ cp \
123+ $build_dir/spec.gmk \
124+ $build_dir/build.log \
125+ $build_dir/configure.log \
126+ $build_dir/make-support/failure-summary.log \
127+ $build_dir/make-support/failure-logs/* \
128+ failure-logs/ 2> /dev/null || true
129+ echo 'failure=true' >> $GITHUB_OUTPUT
130+ fi
131+ shell: bash
132+
133+ - name: 'Upload build logs'
134+ uses: actions/upload-artifact@v3
135+ with:
136+ name: failure-logs-${{ inputs.platform }}${{ inputs.debug-suffix }}
137+ path: failure-logs
138+ if: steps.check.outputs.failure == 'true'
139+
140+ # This is the best way I found to abort the job with an error message
141+ - name: 'Notify about build failures'
142+ uses: actions/github-script@v6
143+ with:
144+ script: core.setFailed('Build failed. See summary for details.')
145+ if: steps.check.outputs.failure == 'true'
146diff --git a/.github/actions/get-bootjdk/action.yml b/.github/actions/get-bootjdk/action.yml
147new file mode 100644
148index 0000000..19c3a01
149--- /dev/null
150+++ b/.github/actions/get-bootjdk/action.yml
151@@ -0,0 +1,109 @@
152+#
153+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
154+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
155+#
156+# This code is free software; you can redistribute it and/or modify it
157+# under the terms of the GNU General Public License version 2 only, as
158+# published by the Free Software Foundation. Oracle designates this
159+# particular file as subject to the "Classpath" exception as provided
160+# by Oracle in the LICENSE file that accompanied this code.
161+#
162+# This code is distributed in the hope that it will be useful, but WITHOUT
163+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
164+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
165+# version 2 for more details (a copy is included in the LICENSE file that
166+# accompanied this code).
167+#
168+# You should have received a copy of the GNU General Public License version
169+# 2 along with this work; if not, write to the Free Software Foundation,
170+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
171+#
172+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
173+# or visit www.oracle.com if you need additional information or have any
174+# questions.
175+#
176+
177+name: 'Get BootJDK'
178+description: 'Download the BootJDK from cache or source location'
179+inputs:
180+ platform:
181+ description: 'Platform'
182+ required: true
183+outputs:
184+ path:
185+ description: 'Path to the installed BootJDK'
186+ value: ${{ steps.path-name.outputs.path }}
187+
188+runs:
189+ using: composite
190+ steps:
191+ - name: 'Determine platform prefix'
192+ id: platform-prefix
193+ run: |
194+ # Convert platform name to upper case
195+ platform_prefix="$(echo ${{ inputs.platform }} | tr [a-z-] [A-Z_])"
196+ echo "value=$platform_prefix" >> $GITHUB_OUTPUT
197+ shell: bash
198+
199+ - name: 'Get URL configuration'
200+ id: url
201+ uses: ./.github/actions/config
202+ with:
203+ var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_URL
204+
205+ - name: 'Get SHA256 configuration'
206+ id: sha256
207+ uses: ./.github/actions/config
208+ with:
209+ var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_SHA256
210+
211+ - name: 'Get file extension configuration'
212+ id: ext
213+ uses: ./.github/actions/config
214+ with:
215+ var: ${{ steps.platform-prefix.outputs.value}}_BOOT_JDK_EXT
216+
217+ - name: 'Check cache for BootJDK'
218+ id: get-cached-bootjdk
219+ uses: actions/cache@v3
220+ with:
221+ path: bootjdk/jdk
222+ key: boot-jdk-${{ inputs.platform }}-${{ steps.sha256.outputs.value }}
223+
224+ # macOS is missing sha256sum
225+ - name: 'Install sha256sum'
226+ run: |
227+ # Run Homebrew installation
228+ brew install coreutils
229+ shell: bash
230+ if: steps.get-cached-bootjdk.outputs.cache-hit != 'true' && runner.os == 'macOS'
231+
232+ - name: 'Download BootJDK'
233+ run: |
234+ # Download BootJDK and verify checksum
235+ mkdir -p bootjdk/jdk
236+ mkdir -p bootjdk/unpacked
237+ wget --progress=dot:mega -O bootjdk/jdk.${{ steps.ext.outputs.value }} '${{ steps.url.outputs.value }}'
238+ echo '${{ steps.sha256.outputs.value }} bootjdk/jdk.${{ steps.ext.outputs.value }}' | sha256sum -c >/dev/null -
239+ shell: bash
240+ if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
241+
242+ - name: 'Unpack BootJDK'
243+ run: |
244+ # Unpack the BootJDK and move files to a common location
245+ if [[ '${{ steps.ext.outputs.value }}' == 'tar.gz' ]]; then
246+ tar -xf bootjdk/jdk.${{ steps.ext.outputs.value }} -C bootjdk/unpacked
247+ else
248+ unzip -q bootjdk/jdk.${{ steps.ext.outputs.value }} -d bootjdk/unpacked
249+ fi
250+ jdk_root="$(dirname $(find bootjdk/unpacked -name bin -type d))"
251+ mv "$jdk_root"/* bootjdk/jdk/
252+ shell: bash
253+ if: steps.get-cached-bootjdk.outputs.cache-hit != 'true'
254+
255+ - name: 'Export path to where BootJDK is installed'
256+ id: path-name
257+ run: |
258+ # Export the path
259+ echo 'path=bootjdk/jdk' >> $GITHUB_OUTPUT
260+ shell: bash
261diff --git a/.github/actions/get-bundles/action.yml b/.github/actions/get-bundles/action.yml
262new file mode 100644
263index 0000000..956e152
264--- /dev/null
265+++ b/.github/actions/get-bundles/action.yml
266@@ -0,0 +1,109 @@
267+#
268+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
269+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
270+#
271+# This code is free software; you can redistribute it and/or modify it
272+# under the terms of the GNU General Public License version 2 only, as
273+# published by the Free Software Foundation. Oracle designates this
274+# particular file as subject to the "Classpath" exception as provided
275+# by Oracle in the LICENSE file that accompanied this code.
276+#
277+# This code is distributed in the hope that it will be useful, but WITHOUT
278+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
279+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
280+# version 2 for more details (a copy is included in the LICENSE file that
281+# accompanied this code).
282+#
283+# You should have received a copy of the GNU General Public License version
284+# 2 along with this work; if not, write to the Free Software Foundation,
285+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
286+#
287+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
288+# or visit www.oracle.com if you need additional information or have any
289+# questions.
290+#
291+
292+name: 'Get bundles'
293+description: 'Download resulting JDK bundles'
294+inputs:
295+ platform:
296+ description: 'Platform name'
297+ required: true
298+ debug-suffix:
299+ description: 'File name suffix denoting debug level, possibly empty'
300+ required: false
301+outputs:
302+ jdk-path:
303+ description: 'Path to the installed JDK bundle'
304+ value: ${{ steps.path-name.outputs.jdk }}
305+ symbols-path:
306+ description: 'Path to the installed symbols bundle'
307+ value: ${{ steps.path-name.outputs.symbols }}
308+ tests-path:
309+ description: 'Path to the installed tests bundle'
310+ value: ${{ steps.path-name.outputs.tests }}
311+
312+runs:
313+ using: composite
314+ steps:
315+ - name: 'Download bundles artifact'
316+ id: download-bundles
317+ uses: actions/download-artifact@v3
318+ with:
319+ name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
320+ path: bundles
321+ continue-on-error: true
322+
323+ - name: 'Download bundles artifact (retry)'
324+ uses: actions/download-artifact@v3
325+ with:
326+ name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
327+ path: bundles
328+ if: steps.download-bundles.outcome == 'failure'
329+
330+ - name: 'Unpack bundles'
331+ run: |
332+ if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip ]]; then
333+ echo 'Unpacking jdk bundle...'
334+ mkdir -p bundles/jdk
335+ unzip -q bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip -d bundles/jdk
336+ fi
337+
338+ if [[ -e bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
339+ echo 'Unpacking jdk bundle...'
340+ mkdir -p bundles/jdk
341+ tar -xf bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/jdk
342+ fi
343+
344+ if [[ -e bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
345+ echo 'Unpacking symbols bundle...'
346+ mkdir -p bundles/symbols
347+ tar -xf bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/symbols
348+ fi
349+
350+ if [[ -e bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz ]]; then
351+ echo 'Unpacking tests bundle...'
352+ mkdir -p bundles/tests
353+ tar -xf bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz -C bundles/tests
354+ fi
355+ shell: bash
356+
357+ - name: 'Export paths to where bundles are installed'
358+ id: path-name
359+ run: |
360+ # Export the paths
361+
362+ jdk_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/jdk -name bin -type d))"
363+ symbols_dir="$GITHUB_WORKSPACE/$(dirname $(find bundles/symbols -name bin -type d))"
364+ tests_dir="$GITHUB_WORKSPACE/bundles/tests"
365+
366+ if [[ '${{ runner.os }}' == 'Windows' ]]; then
367+ jdk_dir="$(cygpath $jdk_dir)"
368+ symbols_dir="$(cygpath $symbols_dir)"
369+ tests_dir="$(cygpath $tests_dir)"
370+ fi
371+
372+ echo "jdk=$jdk_dir" >> $GITHUB_OUTPUT
373+ echo "symbols=$symbols_dir" >> $GITHUB_OUTPUT
374+ echo "tests=$tests_dir" >> $GITHUB_OUTPUT
375+ shell: bash
376diff --git a/.github/actions/get-gtest/action.yml b/.github/actions/get-gtest/action.yml
377new file mode 100644
378index 0000000..76faaea
379--- /dev/null
380+++ b/.github/actions/get-gtest/action.yml
381@@ -0,0 +1,54 @@
382+#
383+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
384+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
385+#
386+# This code is free software; you can redistribute it and/or modify it
387+# under the terms of the GNU General Public License version 2 only, as
388+# published by the Free Software Foundation. Oracle designates this
389+# particular file as subject to the "Classpath" exception as provided
390+# by Oracle in the LICENSE file that accompanied this code.
391+#
392+# This code is distributed in the hope that it will be useful, but WITHOUT
393+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
394+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
395+# version 2 for more details (a copy is included in the LICENSE file that
396+# accompanied this code).
397+#
398+# You should have received a copy of the GNU General Public License version
399+# 2 along with this work; if not, write to the Free Software Foundation,
400+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
401+#
402+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
403+# or visit www.oracle.com if you need additional information or have any
404+# questions.
405+#
406+
407+name: 'Get GTest'
408+description: 'Download GTest source'
409+outputs:
410+ path:
411+ description: 'Path to the installed GTest'
412+ value: ${{ steps.path-name.outputs.path }}
413+
414+runs:
415+ using: composite
416+ steps:
417+ - name: 'Get GTest version configuration'
418+ id: version
419+ uses: ./.github/actions/config
420+ with:
421+ var: GTEST_VERSION
422+
423+ - name: 'Checkout GTest source'
424+ uses: actions/checkout@v3
425+ with:
426+ repository: google/googletest
427+ ref: 'release-${{ steps.version.outputs.value }}'
428+ path: gtest
429+
430+ - name: 'Export path to where GTest is installed'
431+ id: path-name
432+ run: |
433+ # Export the path
434+ echo 'path=gtest' >> $GITHUB_OUTPUT
435+ shell: bash
436diff --git a/.github/actions/get-jtreg/action.yml b/.github/actions/get-jtreg/action.yml
437new file mode 100644
438index 0000000..7c49b10
439--- /dev/null
440+++ b/.github/actions/get-jtreg/action.yml
441@@ -0,0 +1,72 @@
442+#
443+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
444+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
445+#
446+# This code is free software; you can redistribute it and/or modify it
447+# under the terms of the GNU General Public License version 2 only, as
448+# published by the Free Software Foundation. Oracle designates this
449+# particular file as subject to the "Classpath" exception as provided
450+# by Oracle in the LICENSE file that accompanied this code.
451+#
452+# This code is distributed in the hope that it will be useful, but WITHOUT
453+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
454+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
455+# version 2 for more details (a copy is included in the LICENSE file that
456+# accompanied this code).
457+#
458+# You should have received a copy of the GNU General Public License version
459+# 2 along with this work; if not, write to the Free Software Foundation,
460+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
461+#
462+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
463+# or visit www.oracle.com if you need additional information or have any
464+# questions.
465+#
466+
467+name: 'Get JTReg'
468+description: 'Download JTReg from cache or source location'
469+outputs:
470+ path:
471+ description: 'Path to the installed JTReg'
472+ value: ${{ steps.path-name.outputs.path }}
473+
474+runs:
475+ using: composite
476+ steps:
477+ - name: 'Get JTReg version configuration'
478+ id: version
479+ uses: ./.github/actions/config
480+ with:
481+ var: JTREG_VERSION
482+
483+ - name: 'Check cache for JTReg'
484+ id: get-cached-jtreg
485+ uses: actions/cache@v3
486+ with:
487+ path: jtreg/installed
488+ key: jtreg-${{ steps.version.outputs.value }}
489+
490+ - name: 'Checkout the JTReg source'
491+ uses: actions/checkout@v3
492+ with:
493+ repository: openjdk/jtreg
494+ ref: jtreg-${{ steps.version.outputs.value }}
495+ path: jtreg/src
496+ if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
497+
498+ - name: 'Build JTReg'
499+ run: |
500+ # Build JTReg and move files to the proper locations
501+ bash make/build.sh --jdk "$JAVA_HOME_11_X64"
502+ mkdir ../installed
503+ mv build/images/jtreg/* ../installed
504+ working-directory: jtreg/src
505+ shell: bash
506+ if: steps.get-cached-jtreg.outputs.cache-hit != 'true'
507+
508+ - name: 'Export path to where JTReg is installed'
509+ id: path-name
510+ run: |
511+ # Export the path
512+ echo 'path=jtreg/installed' >> $GITHUB_OUTPUT
513+ shell: bash
514diff --git a/.github/actions/get-msys2/action.yml b/.github/actions/get-msys2/action.yml
515new file mode 100644
516index 0000000..3e6c341
517--- /dev/null
518+++ b/.github/actions/get-msys2/action.yml
519@@ -0,0 +1,44 @@
520+#
521+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
522+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
523+#
524+# This code is free software; you can redistribute it and/or modify it
525+# under the terms of the GNU General Public License version 2 only, as
526+# published by the Free Software Foundation. Oracle designates this
527+# particular file as subject to the "Classpath" exception as provided
528+# by Oracle in the LICENSE file that accompanied this code.
529+#
530+# This code is distributed in the hope that it will be useful, but WITHOUT
531+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
532+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
533+# version 2 for more details (a copy is included in the LICENSE file that
534+# accompanied this code).
535+#
536+# You should have received a copy of the GNU General Public License version
537+# 2 along with this work; if not, write to the Free Software Foundation,
538+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
539+#
540+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
541+# or visit www.oracle.com if you need additional information or have any
542+# questions.
543+#
544+
545+name: 'Get MSYS2'
546+description: 'Download MSYS2 and prepare a Windows host'
547+
548+runs:
549+ using: composite
550+ steps:
551+ - name: 'Install MSYS2'
552+ uses: msys2/setup-msys2@v2
553+ with:
554+ install: 'autoconf tar unzip zip make'
555+ path-type: minimal
556+ location: msys2
557+
558+ # We can't run bash until this is completed, so stick with pwsh
559+ - name: 'Set MSYS2 path'
560+ run: |
561+ # Prepend msys2/msys64/usr/bin to the PATH
562+ echo "$env:GITHUB_WORKSPACE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
563+ shell: pwsh
564diff --git a/.github/actions/upload-bundles/action.yml b/.github/actions/upload-bundles/action.yml
565new file mode 100644
566index 0000000..88f7f6e
567--- /dev/null
568+++ b/.github/actions/upload-bundles/action.yml
569@@ -0,0 +1,77 @@
570+#
571+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
572+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
573+#
574+# This code is free software; you can redistribute it and/or modify it
575+# under the terms of the GNU General Public License version 2 only, as
576+# published by the Free Software Foundation. Oracle designates this
577+# particular file as subject to the "Classpath" exception as provided
578+# by Oracle in the LICENSE file that accompanied this code.
579+#
580+# This code is distributed in the hope that it will be useful, but WITHOUT
581+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
582+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
583+# version 2 for more details (a copy is included in the LICENSE file that
584+# accompanied this code).
585+#
586+# You should have received a copy of the GNU General Public License version
587+# 2 along with this work; if not, write to the Free Software Foundation,
588+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
589+#
590+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
591+# or visit www.oracle.com if you need additional information or have any
592+# questions.
593+#
594+
595+name: 'Upload bundles'
596+description: 'Upload resulting JDK bundles'
597+inputs:
598+ platform:
599+ description: 'Platform name'
600+ required: true
601+ debug-suffix:
602+ description: 'File name suffix denoting debug level, possibly empty'
603+ required: false
604+
605+runs:
606+ using: composite
607+ steps:
608+
609+ - name: 'Determine bundle names'
610+ id: bundles
611+ run: |
612+ # Rename bundles to consistent names
613+ jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
614+ jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
615+ symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
616+ tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
617+
618+ mkdir bundles
619+
620+ if [[ "$jdk_bundle_zip" != "" ]]; then
621+ mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
622+ fi
623+ if [[ "$jdk_bundle_tar_gz" != "" ]]; then
624+ mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
625+ fi
626+ if [[ "$symbols_bundle" != "" ]]; then
627+ mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
628+ fi
629+ if [[ "$tests_bundle" != "" ]]; then
630+ mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
631+ fi
632+
633+ if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
634+ echo 'bundles-found=true' >> $GITHUB_OUTPUT
635+ else
636+ echo 'bundles-found=false' >> $GITHUB_OUTPUT
637+ fi
638+ shell: bash
639+
640+ - name: 'Upload bundles artifact'
641+ uses: actions/upload-artifact@v3
642+ with:
643+ name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
644+ path: bundles
645+ retention-days: 1
646+ if: steps.bundles.outputs.bundles-found == 'true'
647diff --git a/.github/scripts/gen-build-failure-report.sh b/.github/scripts/gen-build-failure-report.sh
648new file mode 100644
649index 0000000..fd3215f
650--- /dev/null
651+++ b/.github/scripts/gen-build-failure-report.sh
652@@ -0,0 +1,51 @@
653+#!/bin/bash
654+#
655+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
656+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
657+#
658+# This code is free software; you can redistribute it and/or modify it
659+# under the terms of the GNU General Public License version 2 only, as
660+# published by the Free Software Foundation. Oracle designates this
661+# particular file as subject to the "Classpath" exception as provided
662+# by Oracle in the LICENSE file that accompanied this code.
663+#
664+# This code is distributed in the hope that it will be useful, but WITHOUT
665+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
666+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
667+# version 2 for more details (a copy is included in the LICENSE file that
668+# accompanied this code).
669+#
670+# You should have received a copy of the GNU General Public License version
671+# 2 along with this work; if not, write to the Free Software Foundation,
672+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
673+#
674+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
675+# or visit www.oracle.com if you need additional information or have any
676+# questions.
677+#
678+
679+GITHUB_STEP_SUMMARY="$1"
680+BUILD_DIR="$(ls -d build/*)"
681+
682+# Send signal to the do-build action that we failed
683+touch "$BUILD_DIR/build-failure"
684+
685+(
686+ echo '### :boom: Build failure summary'
687+ echo ''
688+ echo 'The build failed. Here follows the failure summary from the build.'
689+ echo '<details><summary><b>View build failure summary</b></summary>'
690+ echo ''
691+ echo '```'
692+ if [[ -f "$BUILD_DIR/make-support/failure-summary.log" ]]; then
693+ cat "$BUILD_DIR/make-support/failure-summary.log"
694+ else
695+ echo "Failure summary ($BUILD_DIR/make-support/failure-summary.log) not found"
696+ fi
697+ echo '```'
698+ echo '</details>'
699+ echo ''
700+
701+ echo ''
702+ echo ':arrow_right: To see the entire test log, click the job in the list to the left. To download logs, see the `failure-logs` [artifact above](#artifacts).'
703+) >> $GITHUB_STEP_SUMMARY
704diff --git a/.github/scripts/gen-test-results.sh b/.github/scripts/gen-test-results.sh
705new file mode 100644
706index 0000000..73edb8b
707--- /dev/null
708+++ b/.github/scripts/gen-test-results.sh
709@@ -0,0 +1,92 @@
710+#!/bin/bash
711+#
712+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
713+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
714+#
715+# This code is free software; you can redistribute it and/or modify it
716+# under the terms of the GNU General Public License version 2 only, as
717+# published by the Free Software Foundation. Oracle designates this
718+# particular file as subject to the "Classpath" exception as provided
719+# by Oracle in the LICENSE file that accompanied this code.
720+#
721+# This code is distributed in the hope that it will be useful, but WITHOUT
722+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
723+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
724+# version 2 for more details (a copy is included in the LICENSE file that
725+# accompanied this code).
726+#
727+# You should have received a copy of the GNU General Public License version
728+# 2 along with this work; if not, write to the Free Software Foundation,
729+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
730+#
731+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
732+# or visit www.oracle.com if you need additional information or have any
733+# questions.
734+#
735+
736+GITHUB_STEP_SUMMARY="$1"
737+
738+test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
739+results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
740+report_dir=build/run-test-prebuilt/test-support/$test_suite_name
741+
742+failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
743+errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
744+
745+if [[ "$failures" = "" && "$errors" = "" ]]; then
746+ # If we have nothing to report, exit this step now
747+ exit 0
748+fi
749+
750+echo "### Test output for failed tests" >> $GITHUB_STEP_SUMMARY
751+for test in $failures $errors; do
752+ anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
753+ base_path="$(echo "$test" | tr '#' '_')"
754+ report_file="$report_dir/$base_path.jtr"
755+ hs_err_files=$(ls $report_dir/$base_path/hs_err*.log 2> /dev/null || true)
756+ echo "#### <a id="$anchor">$test"
757+
758+ echo '<details><summary>View test results</summary>'
759+ echo ''
760+ echo '```'
761+ if [[ -f "$report_file" ]]; then
762+ cat "$report_file"
763+ else
764+ echo "Error: Result file $report_file not found"
765+ fi
766+ echo '```'
767+ echo '</details>'
768+ echo ''
769+
770+ if [[ "$hs_err_files" != "" ]]; then
771+ echo '<details><summary>View HotSpot error log</summary>'
772+ echo ''
773+ for hs_err in $hs_err_files; do
774+ echo '```'
775+ echo "$hs_err:"
776+ echo ''
777+ cat "$hs_err"
778+ echo '```'
779+ done
780+
781+ echo '</details>'
782+ echo ''
783+ fi
784+
785+done >> $GITHUB_STEP_SUMMARY
786+
787+# With many failures, the summary can easily exceed 1024 kB, the limit set by Github
788+# Trim it down if so.
789+summary_size=$(wc -c < $GITHUB_STEP_SUMMARY)
790+if [[ $summary_size -gt 1000000 ]]; then
791+ # Trim to below 1024 kB, and cut off after the last detail group
792+ head -c 1000000 $GITHUB_STEP_SUMMARY | tac | sed -n -e '/<\/details>/,$ p' | tac > $GITHUB_STEP_SUMMARY.tmp
793+ mv $GITHUB_STEP_SUMMARY.tmp $GITHUB_STEP_SUMMARY
794+ (
795+ echo ''
796+ echo ':x: **WARNING: Summary is too large and has been truncated.**'
797+ echo ''
798+ ) >> $GITHUB_STEP_SUMMARY
799+fi
800+
801+echo ':arrow_right: To see the entire test log, click the job in the list to the left.' >> $GITHUB_STEP_SUMMARY
802diff --git a/.github/scripts/gen-test-summary.sh b/.github/scripts/gen-test-summary.sh
803new file mode 100644
804index 0000000..d016cb3
805--- /dev/null
806+++ b/.github/scripts/gen-test-summary.sh
807@@ -0,0 +1,70 @@
808+#!/bin/bash
809+#
810+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
811+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
812+#
813+# This code is free software; you can redistribute it and/or modify it
814+# under the terms of the GNU General Public License version 2 only, as
815+# published by the Free Software Foundation. Oracle designates this
816+# particular file as subject to the "Classpath" exception as provided
817+# by Oracle in the LICENSE file that accompanied this code.
818+#
819+# This code is distributed in the hope that it will be useful, but WITHOUT
820+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
821+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
822+# version 2 for more details (a copy is included in the LICENSE file that
823+# accompanied this code).
824+#
825+# You should have received a copy of the GNU General Public License version
826+# 2 along with this work; if not, write to the Free Software Foundation,
827+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
828+#
829+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
830+# or visit www.oracle.com if you need additional information or have any
831+# questions.
832+#
833+
834+GITHUB_STEP_SUMMARY="$1"
835+GITHUB_OUTPUT="$2"
836+
837+test_suite_name=$(cat build/run-test-prebuilt/test-support/test-last-ids.txt)
838+results_dir=build/run-test-prebuilt/test-results/$test_suite_name/text
839+
840+if [[ ! -f build/run-test-prebuilt/make-support/exit-with-error ]]; then
841+ # There were no failures, exit now
842+ exit
843+fi
844+
845+failures=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/newfailures.txt 2> /dev/null || true)
846+errors=$(sed -E -e 's/(.*)\.(java|sh)/\1/' -e '/^#/d' $results_dir/other_errors.txt 2> /dev/null || true)
847+failure_count=$(echo $failures | wc -w || true)
848+error_count=$(echo $errors | wc -w || true)
849+
850+if [[ "$failures" = "" && "$errors" = "" ]]; then
851+ # We know something went wrong, but not what
852+ echo 'error-message=Unspecified test suite failure. Please see log for job for details.' >> $GITHUB_OUTPUT
853+ exit 0
854+fi
855+
856+echo 'failure=true' >> $GITHUB_OUTPUT
857+echo "error-message=Test run reported $failure_count test failure(s) and $error_count error(s). See summary for details." >> $GITHUB_OUTPUT
858+
859+echo '### :boom: Test failures summary' >> $GITHUB_STEP_SUMMARY
860+
861+if [[ "$failures" != "" ]]; then
862+ echo '' >> $GITHUB_STEP_SUMMARY
863+ echo 'These tests reported failure:' >> $GITHUB_STEP_SUMMARY
864+ for test in $failures; do
865+ anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
866+ echo "* [$test](#user-content-$anchor)"
867+ done >> $GITHUB_STEP_SUMMARY
868+fi
869+
870+if [[ "$errors" != "" ]]; then
871+ echo '' >> $GITHUB_STEP_SUMMARY
872+ echo 'These tests reported errors:' >> $GITHUB_STEP_SUMMARY
873+ for test in $errors; do
874+ anchor="$(echo "$test" | tr [A-Z/] [a-z_])"
875+ echo "* [$test](#user-content-$anchor)"
876+ done >> $GITHUB_STEP_SUMMARY
877+fi
878diff --git a/.github/workflows/build-cross-compile.yml b/.github/workflows/build-cross-compile.yml
879new file mode 100644
880index 0000000..168c592
881--- /dev/null
882+++ b/.github/workflows/build-cross-compile.yml
883@@ -0,0 +1,154 @@
884+#
885+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
886+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
887+#
888+# This code is free software; you can redistribute it and/or modify it
889+# under the terms of the GNU General Public License version 2 only, as
890+# published by the Free Software Foundation. Oracle designates this
891+# particular file as subject to the "Classpath" exception as provided
892+# by Oracle in the LICENSE file that accompanied this code.
893+#
894+# This code is distributed in the hope that it will be useful, but WITHOUT
895+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
896+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
897+# version 2 for more details (a copy is included in the LICENSE file that
898+# accompanied this code).
899+#
900+# You should have received a copy of the GNU General Public License version
901+# 2 along with this work; if not, write to the Free Software Foundation,
902+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
903+#
904+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
905+# or visit www.oracle.com if you need additional information or have any
906+# questions.
907+#
908+
909+name: 'Build (cross-compile)'
910+
911+on:
912+ workflow_call:
913+ inputs:
914+ gcc-major-version:
915+ required: false
916+ type: string
917+ default: '10'
918+ apt-gcc-version:
919+ required: false
920+ type: string
921+ default: '10.3.0-1ubuntu1~20.04'
922+ apt-gcc-cross-suffix:
923+ required: false
924+ type: string
925+ default: 'cross1'
926+
927+jobs:
928+ build-cross-compile:
929+ name: build
930+ runs-on: ubuntu-20.04
931+
932+ strategy:
933+ fail-fast: false
934+ matrix:
935+ target-cpu:
936+ - aarch64
937+ - arm
938+ - s390x
939+ - ppc64le
940+ include:
941+ - target-cpu: aarch64
942+ debian-arch: arm64
943+ gnu-arch: aarch64
944+ - target-cpu: arm
945+ debian-arch: armhf
946+ gnu-arch: arm
947+ gnu-abi: eabihf
948+ - target-cpu: s390x
949+ debian-arch: s390x
950+ gnu-arch: s390x
951+ - target-cpu: ppc64le
952+ debian-arch: ppc64el
953+ gnu-arch: powerpc64le
954+
955+ steps:
956+ - name: 'Checkout the JDK source'
957+ uses: actions/checkout@v3
958+
959+ - name: 'Get the BootJDK'
960+ id: bootjdk
961+ uses: ./.github/actions/get-bootjdk
962+ with:
963+ platform: linux-x64
964+
965+ # Use linux-x64 JDK bundle as build JDK
966+ - name: 'Get build JDK'
967+ id: buildjdk
968+ uses: ./.github/actions/get-bundles
969+ with:
970+ platform: linux-x64
971+
972+ # Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
973+ - name: 'Install toolchain and dependencies'
974+ run: |
975+ # Install dependencies using apt-get
976+ sudo apt-get update
977+ sudo apt-get install --only-upgrade apt
978+ sudo apt-get install \
979+ gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
980+ g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
981+ gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
982+ g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
983+ libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
984+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
985+
986+ - name: 'Check cache for sysroot'
987+ id: get-cached-sysroot
988+ uses: actions/cache@v3
989+ with:
990+ path: sysroot
991+ key: sysroot-${{ matrix.debian-arch }}-${{ hashFiles('./.github/workflows/build-cross-compile.yml') }}
992+
993+ - name: 'Install sysroot dependencies'
994+ run: sudo apt-get install debootstrap qemu-user-static
995+ if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
996+
997+ - name: 'Create sysroot'
998+ run: >
999+ sudo qemu-debootstrap
1000+ --arch=${{ matrix.debian-arch }}
1001+ --verbose
1002+ --include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
1003+ --resolve-deps
1004+ buster
1005+ sysroot
1006+ https://httpredir.debian.org/debian/
1007+ if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
1008+
1009+ - name: 'Prepare sysroot'
1010+ run: |
1011+ # Prepare sysroot and remove unused files to minimize cache
1012+ sudo chroot sysroot symlinks -cr .
1013+ sudo chown ${USER} -R sysroot
1014+ rm -rf sysroot/{dev,proc,run,sys}
1015+ if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
1016+
1017+ - name: 'Configure'
1018+ run: >
1019+ bash configure
1020+ --with-conf-name=linux-${{ matrix.target-cpu }}
1021+ --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
1022+ --with-boot-jdk=${{ steps.bootjdk.outputs.path }}
1023+ --with-zlib=system
1024+ --enable-debug
1025+ --disable-precompiled-headers
1026+ --openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
1027+ --with-sysroot=sysroot
1028+ --with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
1029+ CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
1030+ CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
1031+
1032+ - name: 'Build'
1033+ id: build
1034+ uses: ./.github/actions/do-build
1035+ with:
1036+ make-target: 'hotspot'
1037+ platform: linux-${{ matrix.target-cpu }}
1038diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml
1039new file mode 100644
1040index 0000000..5b1a6e8
1041--- /dev/null
1042+++ b/.github/workflows/build-linux.yml
1043@@ -0,0 +1,132 @@
1044+#
1045+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
1046+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1047+#
1048+# This code is free software; you can redistribute it and/or modify it
1049+# under the terms of the GNU General Public License version 2 only, as
1050+# published by the Free Software Foundation. Oracle designates this
1051+# particular file as subject to the "Classpath" exception as provided
1052+# by Oracle in the LICENSE file that accompanied this code.
1053+#
1054+# This code is distributed in the hope that it will be useful, but WITHOUT
1055+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1056+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1057+# version 2 for more details (a copy is included in the LICENSE file that
1058+# accompanied this code).
1059+#
1060+# You should have received a copy of the GNU General Public License version
1061+# 2 along with this work; if not, write to the Free Software Foundation,
1062+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1063+#
1064+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1065+# or visit www.oracle.com if you need additional information or have any
1066+# questions.
1067+#
1068+
1069+name: 'Build (linux)'
1070+
1071+on:
1072+ workflow_call:
1073+ inputs:
1074+ platform:
1075+ required: true
1076+ type: string
1077+ extra-conf-options:
1078+ required: false
1079+ type: string
1080+ make-target:
1081+ required: false
1082+ type: string
1083+ default: 'product-bundles test-bundles'
1084+ debug-levels:
1085+ required: false
1086+ type: string
1087+ default: '[ "debug", "release" ]'
1088+ apt-gcc-version:
1089+ required: true
1090+ type: string
1091+ apt-architecture:
1092+ required: false
1093+ type: string
1094+ apt-extra-packages:
1095+ required: false
1096+ type: string
1097+
1098+jobs:
1099+ build-linux:
1100+ name: build
1101+ runs-on: ubuntu-20.04
1102+
1103+ strategy:
1104+ fail-fast: false
1105+ matrix:
1106+ debug-level: ${{ fromJSON(inputs.debug-levels) }}
1107+ include:
1108+ - debug-level: debug
1109+ flags: --with-debug-level=fastdebug
1110+ suffix: -debug
1111+
1112+ steps:
1113+ - name: 'Checkout the JDK source'
1114+ uses: actions/checkout@v3
1115+
1116+ - name: 'Get the BootJDK'
1117+ id: bootjdk
1118+ uses: ./.github/actions/get-bootjdk
1119+ with:
1120+ platform: linux-x64
1121+
1122+ - name: 'Get JTReg'
1123+ id: jtreg
1124+ uses: ./.github/actions/get-jtreg
1125+
1126+ - name: 'Get GTest'
1127+ id: gtest
1128+ uses: ./.github/actions/get-gtest
1129+
1130+ - name: 'Set architecture'
1131+ id: arch
1132+ run: |
1133+ # Set a proper suffix for packages if using a different architecture
1134+ if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
1135+ echo 'suffix=:${{ inputs.apt-architecture }}' >> $GITHUB_OUTPUT
1136+ fi
1137+
1138+ # Upgrading apt to solve libc6 installation bugs, see JDK-8260460.
1139+ - name: 'Install toolchain and dependencies'
1140+ run: |
1141+ # Install dependencies using apt-get
1142+ if [[ '${{ inputs.apt-architecture }}' != '' ]]; then
1143+ sudo dpkg --add-architecture ${{ inputs.apt-architecture }}
1144+ fi
1145+ sudo apt-get update
1146+ sudo apt-get install --only-upgrade apt
1147+ sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
1148+ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
1149+
1150+ - name: 'Configure'
1151+ run: >
1152+ bash configure
1153+ --with-conf-name=${{ inputs.platform }}
1154+ ${{ matrix.flags }}
1155+ --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
1156+ --with-boot-jdk=${{ steps.bootjdk.outputs.path }}
1157+ --with-jtreg=${{ steps.jtreg.outputs.path }}
1158+ --with-gtest=${{ steps.gtest.outputs.path }}
1159+ --enable-jtreg-failure-handler
1160+ --with-zlib=system
1161+ ${{ inputs.extra-conf-options }}
1162+
1163+ - name: 'Build'
1164+ id: build
1165+ uses: ./.github/actions/do-build
1166+ with:
1167+ make-target: '${{ inputs.make-target }}'
1168+ platform: ${{ inputs.platform }}
1169+ debug-suffix: '${{ matrix.suffix }}'
1170+
1171+ - name: 'Upload bundles'
1172+ uses: ./.github/actions/upload-bundles
1173+ with:
1174+ platform: ${{ inputs.platform }}
1175+ debug-suffix: '${{ matrix.suffix }}'
1176diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml
1177new file mode 100644
1178index 0000000..a19dcc3
1179--- /dev/null
1180+++ b/.github/workflows/build-macos.yml
1181@@ -0,0 +1,114 @@
1182+#
1183+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
1184+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1185+#
1186+# This code is free software; you can redistribute it and/or modify it
1187+# under the terms of the GNU General Public License version 2 only, as
1188+# published by the Free Software Foundation. Oracle designates this
1189+# particular file as subject to the "Classpath" exception as provided
1190+# by Oracle in the LICENSE file that accompanied this code.
1191+#
1192+# This code is distributed in the hope that it will be useful, but WITHOUT
1193+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1194+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1195+# version 2 for more details (a copy is included in the LICENSE file that
1196+# accompanied this code).
1197+#
1198+# You should have received a copy of the GNU General Public License version
1199+# 2 along with this work; if not, write to the Free Software Foundation,
1200+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1201+#
1202+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1203+# or visit www.oracle.com if you need additional information or have any
1204+# questions.
1205+#
1206+
1207+name: 'Build (macos)'
1208+
1209+on:
1210+ workflow_call:
1211+ inputs:
1212+ platform:
1213+ required: true
1214+ type: string
1215+ extra-conf-options:
1216+ required: false
1217+ type: string
1218+ make-target:
1219+ required: false
1220+ type: string
1221+ default: 'product-bundles test-bundles'
1222+ debug-levels:
1223+ required: false
1224+ type: string
1225+ default: '[ "debug", "release" ]'
1226+ xcode-toolset-version:
1227+ required: true
1228+ type: string
1229+
1230+jobs:
1231+ build-macos:
1232+ name: build
1233+ runs-on: macos-11
1234+
1235+ strategy:
1236+ fail-fast: false
1237+ matrix:
1238+ debug-level: ${{ fromJSON(inputs.debug-levels) }}
1239+ include:
1240+ - debug-level: debug
1241+ flags: --with-debug-level=fastdebug
1242+ suffix: -debug
1243+
1244+ steps:
1245+ - name: 'Checkout the JDK source'
1246+ uses: actions/checkout@v3
1247+
1248+ - name: 'Get the BootJDK'
1249+ id: bootjdk
1250+ uses: ./.github/actions/get-bootjdk
1251+ with:
1252+ platform: macos-x64
1253+
1254+ - name: 'Get JTReg'
1255+ id: jtreg
1256+ uses: ./.github/actions/get-jtreg
1257+
1258+ - name: 'Get GTest'
1259+ id: gtest
1260+ uses: ./.github/actions/get-gtest
1261+
1262+ - name: 'Install toolchain and dependencies'
1263+ run: |
1264+ # Run Homebrew installation and xcode-select
1265+ brew install make
1266+ sudo xcode-select --switch /Applications/Xcode_${{ inputs.xcode-toolset-version }}.app/Contents/Developer
1267+ # This will make GNU make available as 'make' and not only as 'gmake'
1268+ echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
1269+
1270+ - name: 'Configure'
1271+ run: >
1272+ bash configure
1273+ --with-conf-name=${{ inputs.platform }}
1274+ ${{ matrix.flags }}
1275+ --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
1276+ --with-boot-jdk=${{ steps.bootjdk.outputs.path }}
1277+ --with-jtreg=${{ steps.jtreg.outputs.path }}
1278+ --with-gtest=${{ steps.gtest.outputs.path }}
1279+ --enable-jtreg-failure-handler
1280+ --with-zlib=system
1281+ ${{ inputs.extra-conf-options }}
1282+
1283+ - name: 'Build'
1284+ id: build
1285+ uses: ./.github/actions/do-build
1286+ with:
1287+ make-target: '${{ inputs.make-target }}'
1288+ platform: ${{ inputs.platform }}
1289+ debug-suffix: '${{ matrix.suffix }}'
1290+
1291+ - name: 'Upload bundles'
1292+ uses: ./.github/actions/upload-bundles
1293+ with:
1294+ platform: ${{ inputs.platform }}
1295+ debug-suffix: '${{ matrix.suffix }}'
1296diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml
1297new file mode 100644
1298index 0000000..86fdba8
1299--- /dev/null
1300+++ b/.github/workflows/build-windows.yml
1301@@ -0,0 +1,131 @@
1302+#
1303+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
1304+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1305+#
1306+# This code is free software; you can redistribute it and/or modify it
1307+# under the terms of the GNU General Public License version 2 only, as
1308+# published by the Free Software Foundation. Oracle designates this
1309+# particular file as subject to the "Classpath" exception as provided
1310+# by Oracle in the LICENSE file that accompanied this code.
1311+#
1312+# This code is distributed in the hope that it will be useful, but WITHOUT
1313+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1314+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1315+# version 2 for more details (a copy is included in the LICENSE file that
1316+# accompanied this code).
1317+#
1318+# You should have received a copy of the GNU General Public License version
1319+# 2 along with this work; if not, write to the Free Software Foundation,
1320+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1321+#
1322+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1323+# or visit www.oracle.com if you need additional information or have any
1324+# questions.
1325+#
1326+
1327+name: 'Build (windows)'
1328+
1329+on:
1330+ workflow_call:
1331+ inputs:
1332+ platform:
1333+ required: true
1334+ type: string
1335+ extra-conf-options:
1336+ required: false
1337+ type: string
1338+ make-target:
1339+ required: false
1340+ type: string
1341+ default: 'product-bundles test-bundles'
1342+ debug-levels:
1343+ required: false
1344+ type: string
1345+ default: '[ "debug", "release" ]'
1346+ msvc-toolset-version:
1347+ required: true
1348+ type: string
1349+ msvc-toolset-architecture:
1350+ required: true
1351+ type: string
1352+
1353+env:
1354+ # These are needed to make the MSYS2 bash work properly
1355+ MSYS2_PATH_TYPE: minimal
1356+ CHERE_INVOKING: 1
1357+
1358+jobs:
1359+ build-windows:
1360+ name: build
1361+ runs-on: windows-2019
1362+ defaults:
1363+ run:
1364+ shell: bash
1365+
1366+ strategy:
1367+ fail-fast: false
1368+ matrix:
1369+ debug-level: ${{ fromJSON(inputs.debug-levels) }}
1370+ include:
1371+ - debug-level: debug
1372+ flags: --with-debug-level=fastdebug
1373+ suffix: -debug
1374+
1375+ steps:
1376+ - name: 'Checkout the JDK source'
1377+ uses: actions/checkout@v3
1378+
1379+ - name: 'Get MSYS2'
1380+ uses: ./.github/actions/get-msys2
1381+
1382+ - name: 'Get the BootJDK'
1383+ id: bootjdk
1384+ uses: ./.github/actions/get-bootjdk
1385+ with:
1386+ platform: windows-x64
1387+
1388+ - name: 'Get JTReg'
1389+ id: jtreg
1390+ uses: ./.github/actions/get-jtreg
1391+
1392+ - name: 'Get GTest'
1393+ id: gtest
1394+ uses: ./.github/actions/get-gtest
1395+
1396+ - name: 'Install toolchain and dependencies'
1397+ run: |
1398+ # Run Visual Studio Installer
1399+ '/c/Program Files (x86)/Microsoft Visual Studio/Installer/vs_installer.exe' \
1400+ modify --quiet --installPath 'C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise' \
1401+ --add Microsoft.VisualStudio.Component.VC.${{ inputs.msvc-toolset-version }}.${{ inputs.msvc-toolset-architecture }}
1402+
1403+ - name: 'Configure'
1404+ run: >
1405+ bash configure
1406+ --with-conf-name=${{ inputs.platform }}
1407+ ${{ matrix.flags }}
1408+ --with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
1409+ --with-boot-jdk=${{ steps.bootjdk.outputs.path }}
1410+ --with-jtreg=${{ steps.jtreg.outputs.path }}
1411+ --with-gtest=${{ steps.gtest.outputs.path }}
1412+ --enable-jtreg-failure-handler
1413+ --with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
1414+ ${{ inputs.extra-conf-options }}
1415+ env:
1416+ # We need a minimal PATH on Windows
1417+ # Set PATH to "", so just GITHUB_PATH is included
1418+ PATH: ''
1419+
1420+ - name: 'Build'
1421+ id: build
1422+ uses: ./.github/actions/do-build
1423+ with:
1424+ make-target: '${{ inputs.make-target }}'
1425+ platform: ${{ inputs.platform }}
1426+ debug-suffix: '${{ matrix.suffix }}'
1427+
1428+ - name: 'Upload bundles'
1429+ uses: ./.github/actions/upload-bundles
1430+ with:
1431+ platform: ${{ inputs.platform }}
1432+ debug-suffix: '${{ matrix.suffix }}'
1433diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
1434new file mode 100644
1435index 0000000..88b68ea
1436--- /dev/null
1437+++ b/.github/workflows/main.yml
1438@@ -0,0 +1,331 @@
1439+#
1440+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
1441+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1442+#
1443+# This code is free software; you can redistribute it and/or modify it
1444+# under the terms of the GNU General Public License version 2 only, as
1445+# published by the Free Software Foundation. Oracle designates this
1446+# particular file as subject to the "Classpath" exception as provided
1447+# by Oracle in the LICENSE file that accompanied this code.
1448+#
1449+# This code is distributed in the hope that it will be useful, but WITHOUT
1450+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1451+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1452+# version 2 for more details (a copy is included in the LICENSE file that
1453+# accompanied this code).
1454+#
1455+# You should have received a copy of the GNU General Public License version
1456+# 2 along with this work; if not, write to the Free Software Foundation,
1457+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1458+#
1459+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1460+# or visit www.oracle.com if you need additional information or have any
1461+# questions.
1462+#
1463+
1464+name: 'OpenJDK GHA Sanity Checks'
1465+
1466+on:
1467+ push:
1468+ branches-ignore:
1469+ - master
1470+ - pr/*
1471+ workflow_dispatch:
1472+ inputs:
1473+ platforms:
1474+ description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
1475+ required: true
1476+ default: 'linux-x64, linux-x86, linux-x64-variants, linux-cross-compile, macos-x64, macos-aarch64, windows-x64, windows-aarch64'
1477+
1478+concurrency:
1479+ group: ${{ github.workflow }}-${{ github.ref }}
1480+ cancel-in-progress: true
1481+
1482+jobs:
1483+
1484+ ###
1485+ ### Determine platforms to include
1486+ ###
1487+
1488+ select:
1489+ name: 'Select platforms'
1490+ runs-on: ubuntu-20.04
1491+ outputs:
1492+ linux-x64: ${{ steps.include.outputs.linux-x64 }}
1493+ linux-x86: ${{ steps.include.outputs.linux-x86 }}
1494+ linux-x64-variants: ${{ steps.include.outputs.linux-x64-variants }}
1495+ linux-cross-compile: ${{ steps.include.outputs.linux-cross-compile }}
1496+ macos-x64: ${{ steps.include.outputs.macos-x64 }}
1497+ macos-aarch64: ${{ steps.include.outputs.macos-aarch64 }}
1498+ windows-x64: ${{ steps.include.outputs.windows-x64 }}
1499+ windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
1500+
1501+ steps:
1502+ # This function must be inlined in main.yml, or we'd be forced to checkout the repo
1503+ - name: 'Check what jobs to run'
1504+ id: include
1505+ run: |
1506+ # Determine which platform jobs to run
1507+
1508+ # Returns 'true' if the input platform list matches any of the platform monikers given as argument,
1509+ # 'false' otherwise.
1510+ # arg $1: platform name or names to look for
1511+ function check_platform() {
1512+ if [[ '${{ !secrets.JDK_SUBMIT_FILTER || startsWith(github.ref, 'refs/heads/submit/') }}' == 'false' ]]; then
1513+ # If JDK_SUBMIT_FILTER is set, and this is not a "submit/" branch, don't run anything
1514+ echo 'false'
1515+ return
1516+ fi
1517+
1518+ if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
1519+ input='${{ github.event.inputs.platforms }}'
1520+ elif [[ $GITHUB_EVENT_NAME == push ]]; then
1521+ input='${{ secrets.JDK_SUBMIT_PLATFORMS }}'
1522+ else
1523+ echo 'Internal error in GHA'
1524+ exit 1
1525+ fi
1526+
1527+ normalized_input="$(echo ,$input, | tr -d ' ')"
1528+ if [[ "$normalized_input" == ",," ]]; then
1529+ # For an empty input, assume all platforms should run
1530+ echo 'true'
1531+ return
1532+ else
1533+ # Check for all acceptable platform names
1534+ for part in $* ; do
1535+ if echo "$normalized_input" | grep -q -e ",$part," ; then
1536+ echo 'true'
1537+ return
1538+ fi
1539+ done
1540+ fi
1541+
1542+ echo 'false'
1543+ }
1544+
1545+ echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
1546+ echo "linux-x86=$(check_platform linux-x86 linux x86)" >> $GITHUB_OUTPUT
1547+ echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
1548+ echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
1549+ echo "macos-x64=$(check_platform macos-x64 macos x64)" >> $GITHUB_OUTPUT
1550+ echo "macos-aarch64=$(check_platform macos-aarch64 macos aarch64)" >> $GITHUB_OUTPUT
1551+ echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
1552+ echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
1553+
1554+ ###
1555+ ### Build jobs
1556+ ###
1557+
1558+ build-linux-x64:
1559+ name: linux-x64
1560+ needs: select
1561+ uses: ./.github/workflows/build-linux.yml
1562+ with:
1563+ platform: linux-x64
1564+ apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
1565+ # The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
1566+ if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
1567+
1568+ build-linux-x86:
1569+ name: linux-x86
1570+ needs: select
1571+ uses: ./.github/workflows/build-linux.yml
1572+ with:
1573+ platform: linux-x86
1574+ apt-gcc-version: '10-multilib'
1575+ apt-architecture: 'i386'
1576+ # Some multilib libraries do not have proper inter-dependencies, so we have to
1577+ # install their dependencies manually.
1578+ apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
1579+ extra-conf-options: '--with-target-bits=32'
1580+ if: needs.select.outputs.linux-x86 == 'true'
1581+
1582+ build-linux-x64-hs-nopch:
1583+ name: linux-x64-hs-nopch
1584+ needs: select
1585+ uses: ./.github/workflows/build-linux.yml
1586+ with:
1587+ platform: linux-x64
1588+ make-target: 'hotspot'
1589+ debug-levels: '[ "debug" ]'
1590+ apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
1591+ extra-conf-options: '--disable-precompiled-headers'
1592+ if: needs.select.outputs.linux-x64-variants == 'true'
1593+
1594+ build-linux-x64-hs-zero:
1595+ name: linux-x64-hs-zero
1596+ needs: select
1597+ uses: ./.github/workflows/build-linux.yml
1598+ with:
1599+ platform: linux-x64
1600+ make-target: 'hotspot'
1601+ debug-levels: '[ "debug" ]'
1602+ apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
1603+ extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
1604+ if: needs.select.outputs.linux-x64-variants == 'true'
1605+
1606+ build-linux-x64-hs-minimal:
1607+ name: linux-x64-hs-minimal
1608+ needs: select
1609+ uses: ./.github/workflows/build-linux.yml
1610+ with:
1611+ platform: linux-x64
1612+ make-target: 'hotspot'
1613+ debug-levels: '[ "debug" ]'
1614+ apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
1615+ extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
1616+ if: needs.select.outputs.linux-x64-variants == 'true'
1617+
1618+ build-linux-x64-hs-optimized:
1619+ name: linux-x64-hs-optimized
1620+ needs: select
1621+ uses: ./.github/workflows/build-linux.yml
1622+ with:
1623+ platform: linux-x64
1624+ make-target: 'hotspot'
1625+ # Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
1626+ debug-levels: '[ "debug" ]'
1627+ apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
1628+ extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
1629+ if: needs.select.outputs.linux-x64-variants == 'true'
1630+
1631+ build-linux-cross-compile:
1632+ name: linux-cross-compile
1633+ needs:
1634+ - select
1635+ - build-linux-x64
1636+ uses: ./.github/workflows/build-cross-compile.yml
1637+ if: needs.select.outputs.linux-cross-compile == 'true'
1638+
1639+ build-macos-x64:
1640+ name: macos-x64
1641+ needs: select
1642+ uses: ./.github/workflows/build-macos.yml
1643+ with:
1644+ platform: macos-x64
1645+ xcode-toolset-version: '11.7'
1646+ if: needs.select.outputs.macos-x64 == 'true'
1647+
1648+ build-macos-aarch64:
1649+ name: macos-aarch64
1650+ needs: select
1651+ uses: ./.github/workflows/build-macos.yml
1652+ with:
1653+ platform: macos-aarch64
1654+ xcode-toolset-version: '12.4'
1655+ extra-conf-options: '--openjdk-target=aarch64-apple-darwin'
1656+ if: needs.select.outputs.macos-aarch64 == 'true'
1657+
1658+ build-windows-x64:
1659+ name: windows-x64
1660+ needs: select
1661+ uses: ./.github/workflows/build-windows.yml
1662+ with:
1663+ platform: windows-x64
1664+ msvc-toolset-version: '14.25'
1665+ msvc-toolset-architecture: 'x86.x64'
1666+ if: needs.select.outputs.windows-x64 == 'true'
1667+
1668+ build-windows-aarch64:
1669+ name: windows-aarch64
1670+ needs: select
1671+ uses: ./.github/workflows/build-windows.yml
1672+ with:
1673+ platform: windows-aarch64
1674+ msvc-toolset-version: '14.29'
1675+ msvc-toolset-architecture: 'arm64'
1676+ make-target: 'hotspot'
1677+ extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
1678+ if: needs.select.outputs.windows-aarch64 == 'true'
1679+
1680+ ###
1681+ ### Test jobs
1682+ ###
1683+
1684+ test-linux-x64:
1685+ name: linux-x64
1686+ needs:
1687+ - build-linux-x64
1688+ uses: ./.github/workflows/test.yml
1689+ with:
1690+ platform: linux-x64
1691+ bootjdk-platform: linux-x64
1692+ runs-on: ubuntu-20.04
1693+
1694+ test-linux-x86:
1695+ name: linux-x86
1696+ needs:
1697+ - build-linux-x86
1698+ uses: ./.github/workflows/test.yml
1699+ with:
1700+ platform: linux-x86
1701+ bootjdk-platform: linux-x64
1702+ runs-on: ubuntu-20.04
1703+
1704+ test-macos-x64:
1705+ name: macos-x64
1706+ needs:
1707+ - build-macos-x64
1708+ uses: ./.github/workflows/test.yml
1709+ with:
1710+ platform: macos-x64
1711+ bootjdk-platform: macos-x64
1712+ runs-on: macos-11
1713+
1714+ test-windows-x64:
1715+ name: windows-x64
1716+ needs:
1717+ - build-windows-x64
1718+ uses: ./.github/workflows/test.yml
1719+ with:
1720+ platform: windows-x64
1721+ bootjdk-platform: windows-x64
1722+ runs-on: windows-2019
1723+
1724+ # Remove bundles so they are not misconstrued as binary distributions from the JDK project
1725+ remove-bundles:
1726+ name: 'Remove bundle artifacts'
1727+ runs-on: ubuntu-20.04
1728+ if: always()
1729+ needs:
1730+ - build-linux-x64
1731+ - build-linux-x86
1732+ - build-linux-x64-hs-nopch
1733+ - build-linux-x64-hs-zero
1734+ - build-linux-x64-hs-minimal
1735+ - build-linux-x64-hs-optimized
1736+ - build-linux-cross-compile
1737+ - build-macos-x64
1738+ - build-macos-aarch64
1739+ - build-windows-x64
1740+ - build-windows-aarch64
1741+ - test-linux-x64
1742+ - test-linux-x86
1743+ - test-macos-x64
1744+ - test-windows-x64
1745+
1746+ steps:
1747+ # Hack to get hold of the api environment variables that are only defined for actions
1748+ - name: 'Get API configuration'
1749+ id: api
1750+ uses: actions/github-script@v6
1751+ with:
1752+ script: 'return { url: process.env["ACTIONS_RUNTIME_URL"], token: process.env["ACTIONS_RUNTIME_TOKEN"] }'
1753+
1754+ - name: 'Remove bundle artifacts'
1755+ run: |
1756+ # Find and remove all bundle artifacts
1757+ ALL_ARTIFACT_URLS="$(curl -s \
1758+ -H 'Accept: application/json;api-version=6.0-preview' \
1759+ -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
1760+ '${{ fromJson(steps.api.outputs.result).url }}_apis/pipelines/workflows/${{ github.run_id }}/artifacts?api-version=6.0-preview')"
1761+ BUNDLE_ARTIFACT_URLS="$(echo "$ALL_ARTIFACT_URLS" | jq -r -c '.value | map(select(.name|startswith("bundles-"))) | .[].url')"
1762+ for url in $BUNDLE_ARTIFACT_URLS; do
1763+ echo "Removing $url"
1764+ curl -s \
1765+ -H 'Accept: application/json;api-version=6.0-preview' \
1766+ -H 'Authorization: Bearer ${{ fromJson(steps.api.outputs.result).token }}' \
1767+ -X DELETE "$url" \
1768+ || echo "Failed to remove bundle"
1769+ done
1770diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
1771new file mode 100644
1772index 0000000..81735dd
1773--- /dev/null
1774+++ b/.github/workflows/test.yml
1775@@ -0,0 +1,205 @@
1776+#
1777+# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
1778+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1779+#
1780+# This code is free software; you can redistribute it and/or modify it
1781+# under the terms of the GNU General Public License version 2 only, as
1782+# published by the Free Software Foundation. Oracle designates this
1783+# particular file as subject to the "Classpath" exception as provided
1784+# by Oracle in the LICENSE file that accompanied this code.
1785+#
1786+# This code is distributed in the hope that it will be useful, but WITHOUT
1787+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1788+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1789+# version 2 for more details (a copy is included in the LICENSE file that
1790+# accompanied this code).
1791+#
1792+# You should have received a copy of the GNU General Public License version
1793+# 2 along with this work; if not, write to the Free Software Foundation,
1794+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1795+#
1796+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1797+# or visit www.oracle.com if you need additional information or have any
1798+# questions.
1799+#
1800+
1801+name: 'Run tests'
1802+
1803+on:
1804+ workflow_call:
1805+ inputs:
1806+ platform:
1807+ required: true
1808+ type: string
1809+ bootjdk-platform:
1810+ required: true
1811+ type: string
1812+ runs-on:
1813+ required: true
1814+ type: string
1815+
1816+env:
1817+ # These are needed to make the MSYS2 bash work properly
1818+ MSYS2_PATH_TYPE: minimal
1819+ CHERE_INVOKING: 1
1820+
1821+jobs:
1822+ test:
1823+ name: test
1824+ runs-on: ${{ inputs.runs-on }}
1825+ defaults:
1826+ run:
1827+ shell: bash
1828+
1829+ strategy:
1830+ fail-fast: false
1831+ matrix:
1832+ test-name:
1833+ - 'jdk/tier1 part 1'
1834+ - 'jdk/tier1 part 2'
1835+ - 'jdk/tier1 part 3'
1836+ - 'langtools/tier1'
1837+ - 'hs/tier1 common'
1838+ - 'hs/tier1 compiler'
1839+ - 'hs/tier1 gc'
1840+ - 'hs/tier1 runtime'
1841+ - 'hs/tier1 serviceability'
1842+
1843+ include:
1844+ - test-name: 'jdk/tier1 part 1'
1845+ test-suite: 'test/jdk/:tier1_part1'
1846+
1847+ - test-name: 'jdk/tier1 part 2'
1848+ test-suite: 'test/jdk/:tier1_part2'
1849+
1850+ - test-name: 'jdk/tier1 part 3'
1851+ test-suite: 'test/jdk/:tier1_part3'
1852+
1853+ - test-name: 'langtools/tier1'
1854+ test-suite: 'test/langtools/:tier1'
1855+
1856+ - test-name: 'hs/tier1 common'
1857+ test-suite: 'test/hotspot/jtreg/:tier1_common'
1858+ debug-suffix: -debug
1859+
1860+ - test-name: 'hs/tier1 compiler'
1861+ test-suite: 'test/hotspot/jtreg/:tier1_compiler'
1862+ debug-suffix: -debug
1863+
1864+ - test-name: 'hs/tier1 gc'
1865+ test-suite: 'test/hotspot/jtreg/:tier1_gc'
1866+ debug-suffix: -debug
1867+
1868+ - test-name: 'hs/tier1 runtime'
1869+ test-suite: 'test/hotspot/jtreg/:tier1_runtime'
1870+ debug-suffix: -debug
1871+
1872+ - test-name: 'hs/tier1 serviceability'
1873+ test-suite: 'test/hotspot/jtreg/:tier1_serviceability'
1874+ debug-suffix: -debug
1875+
1876+ steps:
1877+ - name: 'Checkout the JDK source'
1878+ uses: actions/checkout@v3
1879+
1880+ - name: 'Get MSYS2'
1881+ uses: ./.github/actions/get-msys2
1882+ if: runner.os == 'Windows'
1883+
1884+ - name: 'Get the BootJDK'
1885+ id: bootjdk
1886+ uses: ./.github/actions/get-bootjdk
1887+ with:
1888+ platform: ${{ inputs.bootjdk-platform }}
1889+
1890+ - name: 'Get JTReg'
1891+ id: jtreg
1892+ uses: ./.github/actions/get-jtreg
1893+
1894+ - name: 'Get bundles'
1895+ id: bundles
1896+ uses: ./.github/actions/get-bundles
1897+ with:
1898+ platform: ${{ inputs.platform }}
1899+ debug-suffix: ${{ matrix.debug-suffix }}
1900+
1901+ - name: 'Install dependencies'
1902+ run: |
1903+ # On macOS we need to install some dependencies for testing
1904+ brew install make
1905+ sudo xcode-select --switch /Applications/Xcode_11.7.app/Contents/Developer
1906+ # This will make GNU make available as 'make' and not only as 'gmake'
1907+ echo '/usr/local/opt/make/libexec/gnubin' >> $GITHUB_PATH
1908+ if: runner.os == 'macOS'
1909+
1910+ - name: 'Set PATH'
1911+ id: path
1912+ run: |
1913+ # We need a minimal PATH on Windows
1914+ # Set PATH to "", so just GITHUB_PATH is included
1915+ if [[ '${{ runner.os }}' == 'Windows' ]]; then
1916+ echo "value=" >> $GITHUB_OUTPUT
1917+ else
1918+ echo "value=$PATH" >> $GITHUB_OUTPUT
1919+ fi
1920+
1921+ - name: 'Run tests'
1922+ id: run-tests
1923+ run: >
1924+ make test-prebuilt
1925+ TEST='${{ matrix.test-suite }}'
1926+ BOOT_JDK=${{ steps.bootjdk.outputs.path }}
1927+ JT_HOME=${{ steps.jtreg.outputs.path }}
1928+ JDK_IMAGE_DIR=${{ steps.bundles.outputs.jdk-path }}
1929+ SYMBOLS_IMAGE_DIR=${{ steps.bundles.outputs.symbols-path }}
1930+ TEST_IMAGE_DIR=${{ steps.bundles.outputs.tests-path }}
1931+ JTREG='JAVA_OPTIONS=-XX:-CreateCoredumpOnCrash;VERBOSE=fail,error,time;KEYWORDS=!headful'
1932+ && bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
1933+ env:
1934+ PATH: ${{ steps.path.outputs.value }}
1935+
1936+ # This is a separate step, since if the markdown from a step gets bigger than
1937+ # 1024 kB it is skipped, but then the short summary above is still generated
1938+ - name: 'Generate test report'
1939+ run: bash ./.github/scripts/gen-test-results.sh "$GITHUB_STEP_SUMMARY"
1940+ if: always()
1941+
1942+ - name: 'Package test results'
1943+ id: package
1944+ run: |
1945+ # Package test-results and relevant parts of test-support
1946+ mkdir results
1947+
1948+ if [[ -d build/run-test-prebuilt/test-results ]]; then
1949+ cd build/run-test-prebuilt/test-results/
1950+ zip -r -9 "$GITHUB_WORKSPACE/results/test-results.zip" .
1951+ cd $GITHUB_WORKSPACE
1952+ else
1953+ echo '::warning ::Missing test-results directory'
1954+ fi
1955+
1956+ if [[ -d build/run-test-prebuilt/test-support ]]; then
1957+ cd build/run-test-prebuilt/test-support/
1958+ zip -r -9 "$GITHUB_WORKSPACE/results/test-support.zip" . -i *.jtr -i */hs_err*.log -i */replay*.log
1959+ cd $GITHUB_WORKSPACE
1960+ else
1961+ echo '::warning ::Missing test-support directory'
1962+ fi
1963+
1964+ artifact_name="results-${{ inputs.platform }}-$(echo ${{ matrix.test-name }} | tr '/ ' '__')"
1965+ echo "artifact-name=$artifact_name" >> $GITHUB_OUTPUT
1966+ if: always()
1967+
1968+ - name: 'Upload test results'
1969+ uses: actions/upload-artifact@v3
1970+ with:
1971+ path: results
1972+ name: ${{ steps.package.outputs.artifact-name }}
1973+ if: always()
1974+
1975+ # This is the best way I found to abort the job with an error message
1976+ - name: 'Notify about test failures'
1977+ uses: actions/github-script@v6
1978+ with:
1979+ script: core.setFailed('${{ steps.run-tests.outputs.error-message }}')
1980+ if: steps.run-tests.outputs.failure == 'true'
1981diff --git a/.gitignore b/.gitignore
1982index cf21c89..6787b23 100644
1983--- a/.gitignore
1984+++ b/.gitignore
1985@@ -16,3 +16,5 @@ NashornProfile.txt
1986 **/JTreport/**
1987 **/JTwork/**
1988 /src/utils/LogCompilation/target/
1989+/.project/
1990+/.settings/
1991diff --git a/.jcheck/conf b/.jcheck/conf
1992index 54b440d..28a08ac 100644
1993--- a/.jcheck/conf
1994+++ b/.jcheck/conf
1995@@ -1,7 +1,7 @@
1996 [general]
1997 project=jdk-updates
1998 jbs=JDK
1999-version=17.0.5
2000+version=17.0.6
2001
2002 [checks]
2003 error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
2004diff --git a/configure b/configure
2005old mode 100755
2006new mode 100644
2007diff --git a/debian/changelog b/debian/changelog
2008index e7739f6..5847965 100644
2009--- a/debian/changelog
2010+++ b/debian/changelog
2011@@ -1,3 +1,15 @@
2012+openjdk-17 (17.0.6+10-0ubuntu1) lunar; urgency=medium
2013+
2014+ * OpenJDK 17.0.6 release, build 10.
2015+ - CVE-2023-21835, CVE-2023-21843
2016+ - Release notes:
2017+ https://www.oracle.com/java/technologies/javase/17-0-6-relnotes.html
2018+ * debian/patches/*: Refreshed patches for the new release and dropped unused
2019+ patches.
2020+ * debian/rules: add lunar to jtreg version selection.
2021+
2022+ -- Vladimir Petko <vladimir.petko@canonical.com> Thu, 19 Jan 2023 21:34:14 +1300
2023+
2024 openjdk-17 (17.0.5+8-2ubuntu1) kinetic-security; urgency=medium
2025
2026 * Handle jtreg package name for backports.
2027diff --git a/debian/control b/debian/control
2028index 4fd33c9..51e734d 100644
2029--- a/debian/control
2030+++ b/debian/control
2031@@ -1,7 +1,8 @@
2032 Source: openjdk-17
2033 Section: java
2034 Priority: optional
2035-Maintainer: OpenJDK Team <openjdk-17@packages.debian.org>
2036+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2037+XSBC-Original-Maintainer: OpenJDK Team <openjdk-17@packages.debian.org>
2038 Uploaders: Matthias Klose <doko@ubuntu.com>
2039 Build-Depends: debhelper (>= 11),
2040 m4, lsb-release, zip, unzip,
2041diff --git a/debian/control.in b/debian/control.in
2042index 1c13028..ff3128e 100644
2043--- a/debian/control.in
2044+++ b/debian/control.in
2045@@ -1,7 +1,8 @@
2046 Source: @basename@
2047 Section: java
2048 Priority: optional
2049-Maintainer: OpenJDK Team <openjdk-17@packages.debian.org>
2050+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
2051+XSBC-Original-Maintainer: OpenJDK Team <openjdk-17@packages.debian.org>
2052 Uploaders: Matthias Klose <doko@ubuntu.com>
2053 Build-Depends: @bd_debhelper@
2054 m4, lsb-release, zip, unzip,
2055diff --git a/debian/patches/accessible-toolkit.diff b/debian/patches/accessible-toolkit.diff
2056deleted file mode 100644
2057index b337a9c..0000000
2058--- a/debian/patches/accessible-toolkit.diff
2059+++ /dev/null
2060@@ -1,15 +0,0 @@
2061---- a/jdk/src/share/classes/java/awt/Toolkit.java
2062-+++ b/jdk/src/share/classes/java/awt/Toolkit.java
2063-@@ -894,7 +894,11 @@
2064- return null;
2065- }
2066- });
2067-- loadAssistiveTechnologies();
2068-+ try {
2069-+ loadAssistiveTechnologies();
2070-+ } catch ( AWTError error) {
2071-+ // ignore silently
2072-+ }
2073- } finally {
2074- // Make sure to always re-enable the JIT.
2075- java.lang.Compiler.enable();
2076diff --git a/debian/patches/adlc-parser.diff b/debian/patches/adlc-parser.diff
2077index 8cb97bf..096aadb 100644
2078--- a/debian/patches/adlc-parser.diff
2079+++ b/debian/patches/adlc-parser.diff
2080@@ -1,11 +1,22 @@
2081 # DP: fixes an uninitialized memory issue in adlc
2082 --- a/src/hotspot/share/adlc/formsopt.cpp
2083 +++ b/src/hotspot/share/adlc/formsopt.cpp
2084-@@ -445,6 +445,7 @@ FrameForm::FrameForm() {
2085+@@ -436,6 +436,10 @@
2086+ //==============================Frame Handling=================================
2087+ //------------------------------FrameForm--------------------------------------
2088+ FrameForm::FrameForm() {
2089++ _sync_stack_slots = NULL;
2090++ _inline_cache_reg = NULL;
2091++ _interpreter_frame_pointer_reg = NULL;
2092++ _cisc_spilling_operand_name = NULL;
2093+ _frame_pointer = NULL;
2094+ _c_frame_pointer = NULL;
2095+ _alignment = NULL;
2096+@@ -444,7 +448,6 @@
2097+ _varargs_C_out_slots_killed = NULL;
2098 _return_value = NULL;
2099 _c_return_value = NULL;
2100- _interpreter_frame_pointer_reg = NULL;
2101-+ _cisc_spilling_operand_name = NULL;
2102+- _interpreter_frame_pointer_reg = NULL;
2103 }
2104
2105 FrameForm::~FrameForm() {
2106diff --git a/debian/patches/default-jvm-cfg.diff b/debian/patches/default-jvm-cfg.diff
2107index 8022257..cad65d0 100644
2108--- a/debian/patches/default-jvm-cfg.diff
2109+++ b/debian/patches/default-jvm-cfg.diff
2110@@ -1,6 +1,6 @@
2111 --- a/src/java.base/share/native/libjli/java.c
2112 +++ b/src/java.base/share/native/libjli/java.c
2113-@@ -2079,7 +2079,7 @@ jint
2114+@@ -1997,7 +1997,7 @@
2115 ReadKnownVMs(const char *jvmCfgName, jboolean speculative)
2116 {
2117 FILE *jvmCfg;
2118@@ -9,7 +9,7 @@
2119 int cnt = 0;
2120 int lineno = 0;
2121 jlong start = 0, end = 0;
2122-@@ -2094,6 +2094,11 @@ ReadKnownVMs(const char *jvmCfgName, jbo
2123+@@ -2012,6 +2012,11 @@
2124
2125 jvmCfg = fopen(jvmCfgName, "r");
2126 if (jvmCfg == NULL) {
2127diff --git a/debian/patches/enumipv6-fix.diff b/debian/patches/enumipv6-fix.diff
2128deleted file mode 100644
2129index 82f73c5..0000000
2130--- a/debian/patches/enumipv6-fix.diff
2131+++ /dev/null
2132@@ -1,11 +0,0 @@
2133---- openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c~ 2012-02-15 09:26:50.000000000 +0100
2134-+++ openjdk/jdk/src/solaris/native/java/net/NetworkInterface.c 2012-02-26 14:13:22.602107361 +0100
2135-@@ -1105,7 +1105,7 @@
2136- uint8_t ipv6addr[16];
2137-
2138- if ((f = fopen(_PATH_PROCNET_IFINET6, "r")) != NULL) {
2139-- while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %02x %02x %02x %02x %20s\n",
2140-+ while (fscanf(f, "%4s%4s%4s%4s%4s%4s%4s%4s %x %x %x %x %20s\n",
2141- addr6p[0], addr6p[1], addr6p[2], addr6p[3], addr6p[4], addr6p[5], addr6p[6], addr6p[7],
2142- &if_idx, &plen, &scope, &dad_status, devname) != EOF) {
2143-
2144diff --git a/debian/patches/generated-headers.patch b/debian/patches/generated-headers.patch
2145index 9309aaa..9c5a2d3 100644
2146--- a/debian/patches/generated-headers.patch
2147+++ b/debian/patches/generated-headers.patch
2148@@ -1,6 +1,6 @@
2149 --- a/make/modules/java.desktop/lib/Awt2dLibraries.gmk
2150 +++ b/make/modules/java.desktop/lib/Awt2dLibraries.gmk
2151-@@ -289,7 +289,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIB
2152+@@ -290,7 +290,7 @@
2153 INCLUDE_FILES := $(BUILD_LIBLCMS_INCLUDE_FILES), \
2154 OPTIMIZATION := HIGHEST, \
2155 CFLAGS := $(CFLAGS_JDKLIB) \
2156@@ -9,7 +9,7 @@
2157 CFLAGS_windows := -DCMS_IS_WINDOWS_, \
2158 EXTRA_HEADER_DIRS := \
2159 common/awt/debug \
2160-@@ -337,7 +337,7 @@ $(eval $(call SetupJdkLibrary, BUILD_LIB
2161+@@ -338,7 +338,7 @@
2162 NAME := javajpeg, \
2163 INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
2164 OPTIMIZATION := HIGHEST, \
2165diff --git a/debian/patches/hotspot-disable-exec-shield-workaround.diff b/debian/patches/hotspot-disable-exec-shield-workaround.diff
2166index bf9d6df..924a182 100644
2167--- a/debian/patches/hotspot-disable-exec-shield-workaround.diff
2168+++ b/debian/patches/hotspot-disable-exec-shield-workaround.diff
2169@@ -1,6 +1,6 @@
2170 --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
2171 +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.cpp
2172-@@ -635,7 +635,7 @@ void os::verify_stack_alignment() {
2173+@@ -651,7 +651,7 @@
2174 * updates (JDK-8023956).
2175 */
2176 void os::workaround_expand_exec_shield_cs_limit() {
2177diff --git a/debian/patches/hotspot-disable-werror.diff b/debian/patches/hotspot-disable-werror.diff
2178deleted file mode 100644
2179index 0ec8583..0000000
2180--- a/debian/patches/hotspot-disable-werror.diff
2181+++ /dev/null
2182@@ -1,11 +0,0 @@
2183---- a/src/hotspot/make/linux/makefiles/gcc.make
2184-+++ b/src/hotspot/make/linux/makefiles/gcc.make
2185-@@ -203,7 +203,7 @@ else
2186- endif
2187-
2188- # Compiler warnings are treated as errors
2189--WARNINGS_ARE_ERRORS ?= -Werror -Wno-error=format
2190-+WARNINGS_ARE_ERRORS ?=
2191-
2192- ifeq ($(USE_CLANG), true)
2193- # However we need to clean the code up before we can unrestrictedly enable this option with Clang
2194diff --git a/debian/patches/hotspot-set-compiler.diff b/debian/patches/hotspot-set-compiler.diff
2195deleted file mode 100644
2196index 181b71c..0000000
2197--- a/debian/patches/hotspot-set-compiler.diff
2198+++ /dev/null
2199@@ -1,11 +0,0 @@
2200---- a/src/hotspot/make/linux/makefiles/gcc.make
2201-+++ b/src/hotspot/make/linux/makefiles/gcc.make
2202-@@ -39,7 +39,7 @@
2203- ifeq ($(USE_CLANG), true)
2204- CXX = clang++
2205- CC = clang
2206-- else
2207-+ else ifeq ($(CXX),)
2208- CXX = g++
2209- CC = gcc
2210- endif
2211diff --git a/debian/patches/hotspot-warn-no-errformat.diff b/debian/patches/hotspot-warn-no-errformat.diff
2212deleted file mode 100644
2213index 0628b89..0000000
2214--- a/debian/patches/hotspot-warn-no-errformat.diff
2215+++ /dev/null
2216@@ -1,22 +0,0 @@
2217---- a/src/hotspot/make/solaris/makefiles/gcc.make
2218-+++ b/src/hotspot/make/solaris/makefiles/gcc.make
2219-@@ -117,7 +117,7 @@ endif
2220-
2221-
2222- # Compiler warnings are treated as errors
2223--WARNINGS_ARE_ERRORS ?= -Werror
2224-+WARNINGS_ARE_ERRORS ?= -Werror -Wno-error=format
2225-
2226- # Enable these warnings. See 'info gcc' about details on these options
2227- WARNING_FLAGS = -Wpointer-arith -Wconversion -Wsign-compare -Wundef -Wformat=2
2228---- a/src/hotspot/make/linux/makefiles/gcc.make
2229-+++ b/src/hotspot/make/linux/makefiles/gcc.make
2230-@@ -203,7 +203,7 @@ else
2231- endif
2232-
2233- # Compiler warnings are treated as errors
2234--WARNINGS_ARE_ERRORS ?= -Werror
2235-+WARNINGS_ARE_ERRORS ?= -Werror -Wno-error=format
2236-
2237- ifeq ($(USE_CLANG), true)
2238- # However we need to clean the code up before we can unrestrictedly enable this option with Clang
2239diff --git a/debian/patches/include-all-srcs.diff b/debian/patches/include-all-srcs.diff
2240deleted file mode 100644
2241index f73bfaf..0000000
2242--- a/debian/patches/include-all-srcs.diff
2243+++ /dev/null
2244@@ -1,54 +0,0 @@
2245---- a/src/jdk/make/CreateJars.gmk
2246-+++ b/src/jdk/make/CreateJars.gmk
2247-@@ -569,38 +569,12 @@
2248- ##########################################################################################
2249-
2250- SRC_ZIP_INCLUDES = \
2251-- com/sun/corba \
2252-- com/sun/image/codec/jpeg \
2253-- com/sun/imageio \
2254-- com/sun/java_cup \
2255-- com/sun/javadoc \
2256-- com/sun/java/swing \
2257-- com/sun/jmx \
2258-- com/sun/naming \
2259-- com/sun/org/apache \
2260-- com/sun/security/auth \
2261-- com/sun/security/jgss \
2262-- com/sun/source \
2263-+ com \
2264- java \
2265-- javax/accessibility \
2266-- javax/annotation \
2267-- javax/imageio \
2268-- javax/lang \
2269-- javax/management \
2270-- javax/naming \
2271-- javax/print \
2272-- javax/rmi \
2273-- javax/script \
2274-- javax/security \
2275-- javax/sound \
2276-- javax/sql \
2277-- javax/swing \
2278-- javax/tools \
2279-- javax/xml \
2280-- org/ietf \
2281-- org/omg \
2282-- org/w3c/dom \
2283-- org/xml/sax \
2284-+ javax \
2285-+ jdk \
2286-+ org \
2287-+ sun \
2288- #
2289-
2290- SRC_ZIP_SRCS = $(JDK_TOPDIR)/src/share/classes $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/classes
2291-@@ -632,7 +606,6 @@
2292- $(eval $(call SetupZipArchive,BUILD_SRC_ZIP, \
2293- SRC := $(SRC_ZIP_SRCS) $(IMAGES_OUTPUTDIR)/src, \
2294- INCLUDES := $(SRC_ZIP_INCLUDES) launcher, \
2295-- EXCLUDES := javax/swing/beaninfo, \
2296- SUFFIXES := .java .c .h, \
2297- ZIP := $(IMAGES_OUTPUTDIR)/src.zip, \
2298- EXTRA_DEPS := $(LAUNCHER_ZIP_SRC)))
2299diff --git a/debian/patches/java-access-bridge-security.diff b/debian/patches/java-access-bridge-security.diff
2300deleted file mode 100644
2301index 2e5d0e1..0000000
2302--- a/debian/patches/java-access-bridge-security.diff
2303+++ /dev/null
2304@@ -1,15 +0,0 @@
2305-# patch only used for builds with java-access-bridge support
2306-
2307---- openjdk/jdk/src/share/lib/security/java.security-linux
2308-+++ openjdk/jdk/src/share/lib/security/java.security-linux
2309-@@ -149,7 +149,9 @@
2310- com.sun.org.apache.xml.internal.security.,\
2311- com.sun.org.glassfish.,\
2312- org.jcp.xml.dsig.internal.,\
2313-- oracle.jrockit.jfr.
2314-+ oracle.jrockit.jfr.,\
2315-+ org.GNOME.Accessibility.,\
2316-+ org.GNOME.Bonobo.
2317- #
2318- # List of comma-separated packages that start with or equal this string
2319- # will cause a security exception to be thrown when
2320diff --git a/debian/patches/jaw-classpath.diff b/debian/patches/jaw-classpath.diff
2321index 05e834c..5cf865e 100644
2322--- a/debian/patches/jaw-classpath.diff
2323+++ b/debian/patches/jaw-classpath.diff
2324@@ -2,7 +2,7 @@ Fix finding the Java ATK wrapper, see #900912
2325
2326 --- a/src/hotspot/os/linux/os_linux.cpp
2327 +++ b/src/hotspot/os/linux/os_linux.cpp
2328-@@ -461,6 +461,7 @@ void os::init_system_properties_values()
2329+@@ -464,6 +464,7 @@
2330 if (!set_boot_path('/', ':')) {
2331 vm_exit_during_initialization("Failed setting boot class path.", NULL);
2332 }
2333diff --git a/debian/patches/jdk-pulseaudio.diff b/debian/patches/jdk-pulseaudio.diff
2334deleted file mode 100644
2335index 5b75862..0000000
2336--- a/debian/patches/jdk-pulseaudio.diff
2337+++ /dev/null
2338@@ -1,16 +0,0 @@
2339---- a/src/jdk/src/java.desktop/share/conf/sound.properties
2340-+++ b/src/jdk/src/java.desktop/share/conf/sound.properties
2341-@@ -37,3 +37,13 @@
2342- # Specify the default Receiver by provider and name:
2343- # javax.sound.midi.Receiver=com.sun.media.sound.MidiProvider#SunMIDI1
2344- #
2345-+
2346-+javax.sound.sampled.Clip=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
2347-+javax.sound.sampled.Port=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
2348-+javax.sound.sampled.SourceDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
2349-+javax.sound.sampled.TargetDataLine=org.classpath.icedtea.pulseaudio.PulseAudioMixerProvider
2350-+
2351-+#javax.sound.sampled.Clip=com.sun.media.sound.DirectAudioDeviceProvider
2352-+#javax.sound.sampled.Port=com.sun.media.sound.PortMixerProvider
2353-+#javax.sound.sampled.SourceDataLine=com.sun.media.sound.DirectAudioDeviceProvider
2354-+#javax.sound.sampled.TargetDataLine=com.sun.media.sound.DirectAudioDeviceProvider
2355diff --git a/debian/patches/jexec.diff b/debian/patches/jexec.diff
2356deleted file mode 100644
2357index 47e598b..0000000
2358--- a/debian/patches/jexec.diff
2359+++ /dev/null
2360@@ -1,35 +0,0 @@
2361---- a/src/java.base/unix/native/launcher/jexec.c
2362-+++ b/src/java.base/unix/native/launcher/jexec.c
2363-@@ -168,9 +168,10 @@ int main(int argc, const char * argv[])
2364-
2365- /* Get the path to the java binary, which is in a known position relative
2366- * to our current position, which is in argv[0]. */
2367-- if (getJavaPath(argv[argi++], java, RELATIVE_DEPTH) != 0) {
2368-+ if (getJavaPath(JDK_BASE_DIR "/lib/jexec", java, RELATIVE_DEPTH) != 0) {
2369- errorExit(errno, MISSING_JAVA_MSG);
2370- }
2371-+ argi++;
2372- alen = (argc + 2) * (sizeof (const char *));
2373- if (alen <= 0 || alen > INT_MAX / sizeof(char *)) {
2374- errorExit(errno, BAD_ARG_MSG);
2375---- a/make/launcher/Launcher-java.base.gmk
2376-+++ b/make/launcher/Launcher-java.base.gmk
2377-@@ -56,6 +56,9 @@ $(eval $(call SetupBuildLauncher, keytoo
2378- ################################################################################
2379-
2380- ifeq ($(call isTargetOs, linux), true)
2381-+ ifeq (,$(DEBIAN_JDK_BASE_DIR))
2382-+ $(error DEBIAN_JDK_BASE_DIR must be defined for jexec build)
2383-+ endif
2384- $(eval $(call SetupJdkExecutable, BUILD_JEXEC, \
2385- NAME := jexec, \
2386- SRC := $(TOPDIR)/src/$(MODULE)/unix/native/launcher, \
2387-@@ -63,7 +66,7 @@ ifeq ($(call isTargetOs, linux), true)
2388- OPTIMIZATION := LOW, \
2389- CFLAGS := $(CFLAGS_JDKEXE) \
2390- -I$(TOPDIR)/src/$(MODULE)/share/native/libjli, \
2391-- CFLAGS_linux := -fPIC, \
2392-+ CFLAGS_linux := -fPIC '-DJDK_BASE_DIR="$(DEBIAN_JDK_BASE_DIR)"', \
2393- CFLAGS_solaris := -KPIC, \
2394- LDFLAGS := $(LDFLAGS_JDKEXE), \
2395- OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/modules_libs/$(MODULE), \
2396diff --git a/debian/patches/multiple-pkcs11-library-init.diff b/debian/patches/multiple-pkcs11-library-init.diff
2397index 81a65ca..0238c4f 100644
2398--- a/debian/patches/multiple-pkcs11-library-init.diff
2399+++ b/debian/patches/multiple-pkcs11-library-init.diff
2400@@ -7,7 +7,7 @@ Allow multiple PKCS11 library initialisation to be a non-critical error.
2401
2402 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java
2403 +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/Config.java
2404-@@ -52,6 +52,7 @@ final class Config {
2405+@@ -52,6 +52,7 @@
2406 static final int ERR_HALT = 1;
2407 static final int ERR_IGNORE_ALL = 2;
2408 static final int ERR_IGNORE_LIB = 3;
2409@@ -15,7 +15,7 @@ Allow multiple PKCS11 library initialisation to be a non-critical error.
2410
2411 // same as allowSingleThreadedModules but controlled via a system property
2412 // and applied to all providers. if set to false, no SunPKCS11 instances
2413-@@ -1019,6 +1020,8 @@ final class Config {
2414+@@ -1023,6 +1024,8 @@
2415 handleStartupErrors = ERR_IGNORE_LIB;
2416 } else if (val.equals("halt")) {
2417 handleStartupErrors = ERR_HALT;
2418@@ -26,7 +26,7 @@ Allow multiple PKCS11 library initialisation to be a non-critical error.
2419 }
2420 --- a/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
2421 +++ b/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java
2422-@@ -179,26 +179,37 @@ public final class SunPKCS11 extends Aut
2423+@@ -179,26 +179,37 @@
2424 String nssLibraryDirectory = config.getNssLibraryDirectory();
2425 String nssSecmodDirectory = config.getNssSecmodDirectory();
2426 boolean nssOptimizeSpace = config.getNssOptimizeSpace();
2427diff --git a/debian/patches/no-pch-build.diff b/debian/patches/no-pch-build.diff
2428deleted file mode 100644
2429index 76726e8..0000000
2430--- a/debian/patches/no-pch-build.diff
2431+++ /dev/null
2432@@ -1,110 +0,0 @@
2433---- a/src/hotspot/src/share/vm/oops/arrayKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2434-+++ b/src/hotspot/src/share/vm/oops/arrayKlassKlass.cpp 2013-04-15 13:57:24.992929086 +0200
2435-@@ -30,6 +30,7 @@
2436- #include "runtime/handles.inline.hpp"
2437- #ifndef SERIALGC
2438- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2439-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2440- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2441- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2442- #include "memory/cardTableRS.hpp"
2443---- a/src/hotspot/src/share/vm/oops/constantPoolKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2444-+++ b/src/hotspot/src/share/vm/oops/constantPoolKlass.cpp 2013-04-15 14:02:52.143087149 +0200
2445-@@ -49,6 +49,7 @@
2446- #endif
2447- #ifndef SERIALGC
2448- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2449-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2450- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2451- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2452- #include "memory/cardTableRS.hpp"
2453---- a/src/hotspot/src/share/vm/oops/cpCacheKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2454-+++ b/src/hotspot/src/share/vm/oops/cpCacheKlass.cpp 2013-04-15 14:04:45.219838633 +0200
2455-@@ -35,6 +35,7 @@
2456- #include "runtime/handles.inline.hpp"
2457- #ifndef SERIALGC
2458- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2459-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2460- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2461- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2462- #include "memory/cardTableRS.hpp"
2463---- a/src/hotspot/src/share/vm/oops/instanceKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2464-+++ b/src/hotspot/src/share/vm/oops/instanceKlass.cpp 2013-04-15 14:07:55.861109867 +0200
2465-@@ -70,6 +70,7 @@
2466- #include "gc_implementation/g1/g1RemSet.inline.hpp"
2467- #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
2468- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2469-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2470- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2471- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2472- #include "oops/oop.pcgc.inline.hpp"
2473---- a/src/hotspot/src/share/vm/oops/instanceKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2474-+++ b/src/hotspot/src/share/vm/oops/instanceKlassKlass.cpp 2013-04-15 14:08:53.541485528 +0200
2475-@@ -44,6 +44,7 @@
2476- #include "runtime/fieldDescriptor.hpp"
2477- #ifndef SERIALGC
2478- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2479-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2480- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2481- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2482- #include "memory/cardTableRS.hpp"
2483---- a/src/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2484-+++ b/src/hotspot/src/share/vm/oops/instanceMirrorKlass.cpp 2013-04-15 14:10:11.162003798 +0200
2485-@@ -42,6 +42,7 @@
2486- #include "gc_implementation/g1/g1RemSet.inline.hpp"
2487- #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
2488- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2489-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2490- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2491- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2492- #include "oops/oop.pcgc.inline.hpp"
2493---- a/src/hotspot/src/share/vm/oops/instanceRefKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2494-+++ b/src/hotspot/src/share/vm/oops/instanceRefKlass.cpp 2013-04-15 14:11:11.726403390 +0200
2495-@@ -39,6 +39,7 @@
2496- #include "gc_implementation/g1/g1RemSet.inline.hpp"
2497- #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
2498- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2499-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2500- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2501- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2502- #include "oops/oop.pcgc.inline.hpp"
2503---- a/src/hotspot/src/share/vm/oops/klassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2504-+++ b/src/hotspot/src/share/vm/oops/klassKlass.cpp 2013-04-15 14:13:01.999133769 +0200
2505-@@ -42,6 +42,7 @@
2506- #include "runtime/handles.inline.hpp"
2507- #ifndef SERIALGC
2508- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2509-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2510- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2511- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2512- #include "memory/cardTableRS.hpp"
2513---- a/src/hotspot/src/share/vm/oops/objArrayKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2514-+++ b/src/hotspot/src/share/vm/oops/objArrayKlass.cpp 2013-04-15 14:16:10.616389484 +0200
2515-@@ -47,6 +47,7 @@
2516- #include "gc_implementation/g1/g1RemSet.inline.hpp"
2517- #include "gc_implementation/g1/heapRegionSeq.inline.hpp"
2518- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2519-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2520- #include "gc_implementation/parallelScavenge/psCompactionManager.hpp"
2521- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2522- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2523---- a/src/hotspot/src/share/vm/oops/objArrayKlassKlass.cpp~ 2013-03-04 22:51:00.000000000 +0100
2524-+++ b/src/hotspot/src/share/vm/oops/objArrayKlassKlass.cpp 2013-04-15 14:17:01.800729154 +0200
2525-@@ -33,6 +33,7 @@
2526- #include "oops/oop.inline2.hpp"
2527- #ifndef SERIALGC
2528- #include "gc_implementation/parNew/parOopClosures.inline.hpp"
2529-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2530- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2531- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2532- #include "memory/cardTableRS.hpp"
2533---- a/src/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp~ 2013-03-04 22:51:00.000000000 +0100
2534-+++ b/src/hotspot/src/share/vm/gc_implementation/parallelScavenge/psTasks.cpp 2013-04-15 14:20:24.782079605 +0200
2535-@@ -28,6 +28,7 @@
2536- #include "gc_implementation/parallelScavenge/cardTableExtension.hpp"
2537- #include "gc_implementation/parallelScavenge/gcTaskManager.hpp"
2538- #include "gc_implementation/parallelScavenge/psMarkSweep.hpp"
2539-+#include "gc_implementation/parallelScavenge/psOldGen.hpp"
2540- #include "gc_implementation/parallelScavenge/psPromotionManager.hpp"
2541- #include "gc_implementation/parallelScavenge/psPromotionManager.inline.hpp"
2542- #include "gc_implementation/parallelScavenge/psScavenge.inline.hpp"
2543diff --git a/debian/patches/nspr+nss-headers.diff b/debian/patches/nspr+nss-headers.diff
2544deleted file mode 100644
2545index 235bb6d..0000000
2546--- a/debian/patches/nspr+nss-headers.diff
2547+++ /dev/null
2548@@ -1,9090 +0,0 @@
2549-Replace header files in src/jdk.crypto.cryptoki/share/native/libj2pkcs11.
2550-
2551-Import from NSPR 4.29:
2552- - prcpucfg.h
2553- - prtypes.h
2554-
2555-Import from NSS 2.63:
2556- - pkcs11.h
2557- - pkcs11f.h
2558- - pkcs11n.h
2559- - pkcs11p.h
2560- - pkcs11t.h
2561- - pkcs11u.h
2562-
2563-src/jdk.crypto.cryptoki/unix/native/libj2pkcs11/p11_md.h:
2564- - Remove macro CK_PTR
2565- - Remove macro CK_DEFINE_FUNCTION
2566- - Remove macro CK_DECLARE_FUNCTION
2567- - Remove macro CK_DECLARE_FUNCTION_POINTER
2568- - Remove macro CK_CALLBACK_FUNCTION
2569-
2570-src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11wrapper.h:
2571- - use CK_TRUE/CK_FALSE instead of TRUE/FALSE
2572-
2573-src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_convert.c:
2574- - FIXME: CKM_KEA_DERIVE is undefined
2575-
2576-src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_util.c:
2577- - FIXME: CKM_CAMELLIA_CTR is undefined
2578-
2579-
2580---- a/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11.h
2581-+++ b/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11.h
2582-@@ -1,10 +1,15 @@
2583--/* Copyright (c) OASIS Open 2016-2019. All Rights Reserved.
2584-- * Distributed under the terms of the OASIS IPR Policy,
2585-- * [http://www.oasis-open.org/policies-guidelines/ipr], AS-IS, WITHOUT ANY
2586-- * IMPLIED OR EXPRESS WARRANTY; there is no warranty of MERCHANTABILITY, FITNESS FOR A
2587-- * PARTICULAR PURPOSE or NONINFRINGEMENT of the rights of others.
2588-+/* This Source Code Form is subject to the terms of the Mozilla Public
2589-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
2590-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2591-+/*
2592-+ * Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
2593-+ * is granted provided that it is identified as "RSA Security In.c Public-Key
2594-+ * Cryptography Standards (PKCS)" in all material mentioning or referencing
2595-+ * this document.
2596-+ *
2597-+ * The latest version of this header can be found at:
2598-+ * http://www.rsalabs.com/pkcs/pkcs-11/index.html
2599- */
2600--
2601- #ifndef _PKCS11_H_
2602- #define _PKCS11_H_ 1
2603-
2604-@@ -13,20 +18,21 @@ extern "C" {
2605- #endif
2606-
2607- /* Before including this file (pkcs11.h) (or pkcs11t.h by
2608-- * itself), 5 platform-specific macros must be defined. These
2609-+ * itself), 6 platform-specific macros must be defined. These
2610- * macros are described below, and typical definitions for them
2611- * are also given. Be advised that these definitions can depend
2612- * on both the platform and the compiler used (and possibly also
2613-- * on whether a Cryptoki library is linked statically or
2614-+ * on whether a PKCS #11 library is linked statically or
2615- * dynamically).
2616- *
2617-- * In addition to defining these 5 macros, the packing convention
2618-- * for Cryptoki structures should be set. The Cryptoki
2619-+ * In addition to defining these 6 macros, the packing convention
2620-+ * for PKCS #11 structures should be set. The PKCS #11
2621- * convention on packing is that structures should be 1-byte
2622- * aligned.
2623- *
2624-- * If you're using Windows this might be done by using the following
2625-- * preprocessor directive before including pkcs11.h or pkcs11t.h:
2626-+ * In a Win32 environment, this might be done by using the
2627-+ * following preprocessor directive before including pkcs11.h
2628-+ * or pkcs11t.h:
2629- *
2630- * #pragma pack(push, cryptoki, 1)
2631- *
2632-@@ -35,8 +41,8 @@ extern "C" {
2633- *
2634- * #pragma pack(pop, cryptoki)
2635- *
2636-- * In a UNIX environment, you're on your own for this. You might
2637-- * not need to do (or be able to do!) anything.
2638-+ * In a UNIX environment, you're on your own here. You might
2639-+ * not need to do anything.
2640- *
2641- *
2642- * Now for the macros:
2643-@@ -47,17 +53,42 @@ extern "C" {
2644- *
2645- * typedef CK_BYTE CK_PTR CK_BYTE_PTR;
2646- *
2647-- * If you're using windows, it might be defined by:
2648-+ * In a Win32 environment, it might be defined by
2649- *
2650- * #define CK_PTR *
2651- *
2652-- * In a typical UNIX environment, it might be defined by:
2653-+ * In a UNIX environment, it might be defined by
2654- *
2655- * #define CK_PTR *
2656- *
2657- *
2658-- * 2. CK_DECLARE_FUNCTION(returnType, name): A macro which makes
2659-- * an importable Cryptoki library function declaration out of a
2660-+ * 2. CK_DEFINE_FUNCTION(returnType, name): A macro which makes
2661-+ * an exportable PKCS #11 library function definition out of a
2662-+ * return type and a function name. It should be used in the
2663-+ * following fashion to define the exposed PKCS #11 functions in
2664-+ * a PKCS #11 library:
2665-+ *
2666-+ * CK_DEFINE_FUNCTION(CK_RV, C_Initialize)(
2667-+ * CK_VOID_PTR pReserved
2668-+ * )
2669-+ * {
2670-+ * ...
2671-+ * }
2672-+ *
2673-+ * For defining a function in a Win32 PKCS #11 .dll, it might be
2674-+ * defined by
2675-+ *
2676-+ * #define CK_DEFINE_FUNCTION(returnType, name) \
2677-+ * returnType __declspec(dllexport) name
2678-+ *
2679-+ * In a UNIX environment, it might be defined by
2680-+ *
2681-+ * #define CK_DEFINE_FUNCTION(returnType, name) \
2682-+ * returnType name
2683-+ *
2684-+ *
2685-+ * 3. CK_DECLARE_FUNCTION(returnType, name): A macro which makes
2686-+ * an importable PKCS #11 library function declaration out of a
2687- * return type and a function name. It should be used in the
2688- * following fashion:
2689- *
2690-@@ -65,49 +96,49 @@ extern "C" {
2691- * CK_VOID_PTR pReserved
2692- * );
2693- *
2694-- * If you're using Windows to declare a function in a Win32 cryptoki .dll,
2695-- * it might be defined by:
2696-+ * For declaring a function in a Win32 PKCS #11 .dll, it might
2697-+ * be defined by
2698- *
2699- * #define CK_DECLARE_FUNCTION(returnType, name) \
2700- * returnType __declspec(dllimport) name
2701- *
2702-- * In a UNIX environment, it might be defined by:
2703-+ * In a UNIX environment, it might be defined by
2704- *
2705- * #define CK_DECLARE_FUNCTION(returnType, name) \
2706- * returnType name
2707- *
2708- *
2709-- * 3. CK_DECLARE_FUNCTION_POINTER(returnType, name): A macro
2710-- * which makes a Cryptoki API function pointer declaration or
2711-+ * 4. CK_DECLARE_FUNCTION_POINTER(returnType, name): A macro
2712-+ * which makes a PKCS #11 API function pointer declaration or
2713- * function pointer type declaration out of a return type and a
2714- * function name. It should be used in the following fashion:
2715- *
2716-- * // Define funcPtr to be a pointer to a Cryptoki API function
2717-+ * // Define funcPtr to be a pointer to a PKCS #11 API function
2718- * // taking arguments args and returning CK_RV.
2719- * CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtr)(args);
2720- *
2721- * or
2722- *
2723- * // Define funcPtrType to be the type of a pointer to a
2724-- * // Cryptoki API function taking arguments args and returning
2725-+ * // PKCS #11 API function taking arguments args and returning
2726- * // CK_RV, and then define funcPtr to be a variable of type
2727- * // funcPtrType.
2728- * typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, funcPtrType)(args);
2729- * funcPtrType funcPtr;
2730- *
2731-- * If you're using Windows to access
2732-- * functions in a Win32 Cryptoki .dll, in might be defined by:
2733-+ * For accessing functions in a Win32 PKCS #11 .dll, in might be
2734-+ * defined by
2735- *
2736- * #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
2737- * returnType __declspec(dllimport) (* name)
2738- *
2739-- * In a UNIX environment, it might be defined by:
2740-+ * In a UNIX environment, it might be defined by
2741- *
2742- * #define CK_DECLARE_FUNCTION_POINTER(returnType, name) \
2743- * returnType (* name)
2744- *
2745- *
2746-- * 4. CK_CALLBACK_FUNCTION(returnType, name): A macro which makes
2747-+ * 5. CK_CALLBACK_FUNCTION(returnType, name): A macro which makes
2748- * a function pointer type for an application callback out of
2749- * a return type for the callback and a name for the callback.
2750- * It should be used in the following fashion:
2751-@@ -121,77 +152,76 @@ extern "C" {
2752- * typedef CK_CALLBACK_FUNCTION(CK_RV, myCallbackType)(args);
2753- * myCallbackType myCallback;
2754- *
2755-- * If you're using Windows, it might be defined by:
2756-+ * In a Win32 environment, it might be defined by
2757- *
2758- * #define CK_CALLBACK_FUNCTION(returnType, name) \
2759- * returnType (* name)
2760- *
2761-- * In a UNIX environment, it might be defined by:
2762-+ * In a UNIX environment, it might be defined by
2763- *
2764- * #define CK_CALLBACK_FUNCTION(returnType, name) \
2765- * returnType (* name)
2766- *
2767- *
2768-- * 5. NULL_PTR: This macro is the value of a NULL pointer.
2769-+ * 6. NULL_PTR: This macro is the value of a NULL pointer.
2770- *
2771- * In any ANSI/ISO C environment (and in many others as well),
2772-- * this should best be defined by
2773-+ * this should be defined by
2774- *
2775- * #ifndef NULL_PTR
2776- * #define NULL_PTR 0
2777- * #endif
2778- */
2779-
2780--
2781--/* All the various Cryptoki types and #define'd values are in the
2782-- * file pkcs11t.h.
2783-- */
2784-+/* All the various PKCS #11 types and #define'd values are in the
2785-+ * file pkcs11t.h. */
2786- #include "pkcs11t.h"
2787-
2788--#define __PASTE(x,y) x##y
2789-+#define __PASTE(x, y) x##y
2790-
2791-+#ifndef CK_PKCS11_3_0
2792-+/* remember that we set it so we can unset it at the end */
2793-+#define __NSS_CK_PKCS11_3_IMPLICIT 1
2794-+#define CK_PKCS11_3_0 1
2795-+#endif
2796-
2797- /* ==============================================================
2798- * Define the "extern" form of all the entry points.
2799- * ==============================================================
2800- */
2801-
2802--#define CK_NEED_ARG_LIST 1
2803-+#define CK_NEED_ARG_LIST 1
2804- #define CK_PKCS11_FUNCTION_INFO(name) \
2805-- extern CK_DECLARE_FUNCTION(CK_RV, name)
2806-+ CK_DECLARE_FUNCTION(CK_RV, name)
2807-
2808--/* pkcs11f.h has all the information about the Cryptoki
2809-- * function prototypes.
2810-- */
2811-+/* pkcs11f.h has all the information about the PKCS #11
2812-+ * function prototypes. */
2813- #include "pkcs11f.h"
2814-
2815- #undef CK_NEED_ARG_LIST
2816- #undef CK_PKCS11_FUNCTION_INFO
2817-
2818--
2819- /* ==============================================================
2820- * Define the typedef form of all the entry points. That is, for
2821-- * each Cryptoki function C_XXX, define a type CK_C_XXX which is
2822-+ * each PKCS #11 function C_XXX, define a type CK_C_XXX which is
2823- * a pointer to that kind of function.
2824- * ==============================================================
2825- */
2826-
2827--#define CK_NEED_ARG_LIST 1
2828-+#define CK_NEED_ARG_LIST 1
2829- #define CK_PKCS11_FUNCTION_INFO(name) \
2830-- typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, __PASTE(CK_,name))
2831-+ typedef CK_DECLARE_FUNCTION_POINTER(CK_RV, __PASTE(CK_, name))
2832-
2833--/* pkcs11f.h has all the information about the Cryptoki
2834-- * function prototypes.
2835-- */
2836-+/* pkcs11f.h has all the information about the PKCS #11
2837-+ * function prototypes. */
2838- #include "pkcs11f.h"
2839-
2840- #undef CK_NEED_ARG_LIST
2841- #undef CK_PKCS11_FUNCTION_INFO
2842-
2843--
2844- /* ==============================================================
2845-- * Define structed vector of entry points. A CK_FUNCTION_LIST
2846-- * contains a CK_VERSION indicating a library's Cryptoki version
2847-+ * Define structed vector of entry points. A CK_FUNCTION_3_0_LIST
2848-+ * contains a CK_VERSION indicating a library's PKCS #11 version
2849- * and then a whole slew of function pointers to the routines in
2850- * the library. This type was declared, but not defined, in
2851- * pkcs11t.h.
2852-@@ -199,39 +229,41 @@ extern "C" {
2853- */
2854-
2855- #define CK_PKCS11_FUNCTION_INFO(name) \
2856-- __PASTE(CK_,name) name;
2857-+ __PASTE(CK_, name) \
2858-+ name;
2859-
2860--/* Create the 3.0 Function list */
2861-+#include "pkcs11p.h"
2862- struct CK_FUNCTION_LIST_3_0 {
2863-
2864-- CK_VERSION version; /* Cryptoki version */
2865-+ CK_VERSION version; /* PKCS #11 version */
2866-
2867--/* Pile all the function pointers into the CK_FUNCTION_LIST. */
2868--/* pkcs11f.h has all the information about the Cryptoki
2869-- * function prototypes.
2870-- */
2871-+/* Pile all the function pointers into the CK_FUNCTION_LIST_3_0. */
2872-+/* pkcs11f.h has all the information about the PKCS #11
2873-+ * function prototypes. */
2874- #include "pkcs11f.h"
2875--
2876- };
2877-
2878- #define CK_PKCS11_2_0_ONLY 1
2879-
2880--/* Continue to define the old CK_FUNCTION_LIST */
2881-+/* now define the 2.0 function list */
2882- struct CK_FUNCTION_LIST {
2883-
2884-- CK_VERSION version; /* Cryptoki version */
2885-+ CK_VERSION version; /* PKCS #11 version */
2886-
2887- /* Pile all the function pointers into the CK_FUNCTION_LIST. */
2888--/* pkcs11f.h has all the information about the Cryptoki
2889-- * function prototypes.
2890-- */
2891-+/* pkcs11f.h has all the information about the PKCS #11
2892-+ * function prototypes. */
2893- #include "pkcs11f.h"
2894--
2895- };
2896-+#include "pkcs11u.h"
2897-
2898- #undef CK_PKCS11_FUNCTION_INFO
2899- #undef CK_PKCS11_2_0_ONLY
2900-
2901-+#ifdef __NSS_CK_PKCS11_3_IMPLICIT
2902-+#undef CK_PKCS11_3_0
2903-+#undef __NSS_CK_PKCS11_3_IMPLICIT
2904-+#endif
2905-
2906- #undef __PASTE
2907-
2908-@@ -239,6 +271,4 @@ struct CK_FUNCTION_LIST {
2909- }
2910- #endif
2911-
2912--#endif /* _PKCS11_H_ */
2913--
2914--
2915-+#endif
2916---- a/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11f.h
2917-+++ b/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11f.h
2918-@@ -1,1197 +1,1044 @@
2919--/* Copyright (c) OASIS Open 2016, 2019. All Rights Reserved./
2920-- * /Distributed under the terms of the OASIS IPR Policy,
2921-- * [http://www.oasis-open.org/policies-guidelines/ipr], AS-IS, WITHOUT ANY
2922-- * IMPLIED OR EXPRESS WARRANTY; there is no warranty of MERCHANTABILITY, FITNESS FOR A
2923-- * PARTICULAR PURPOSE or NONINFRINGEMENT of the rights of others.
2924-- */
2925--
2926--/* Latest version of the specification:
2927-- * http://docs.oasis-open.org/pkcs11/pkcs11-base/v2.40/pkcs11-base-v2.40.html
2928-- */
2929--
2930--/* This header file contains pretty much everything about all the
2931-- * Cryptoki function prototypes. Because this information is
2932-- * used for more than just declaring function prototypes, the
2933-- * order of the functions appearing herein is important, and
2934-- * should not be altered.
2935-- */
2936-+/* This Source Code Form is subject to the terms of the Mozilla Public
2937-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
2938-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
2939-+/*
2940-+ * Copyright (C) 1994-1999 RSA Security Inc. Licence to copy this document
2941-+ * is granted provided that it is identified as "RSA Security In.c Public-Key
2942-+ * Cryptography Standards (PKCS)" in all material mentioning or referencing
2943-+ * this document.
2944-+ */
2945-+/* This function contains pretty much everything about all the */
2946-+/* PKCS #11 function prototypes. Because this information is */
2947-+/* used for more than just declaring function prototypes, the */
2948-+/* order of the functions appearing herein is important, and */
2949-+/* should not be altered. */
2950-
2951- /* General-purpose */
2952-
2953--/* C_Initialize initializes the Cryptoki library. */
2954-+/* C_Initialize initializes the PKCS #11 library. */
2955- CK_PKCS11_FUNCTION_INFO(C_Initialize)
2956- #ifdef CK_NEED_ARG_LIST
2957- (
2958-- CK_VOID_PTR pInitArgs /* if this is not NULL_PTR, it gets
2959-- * cast to CK_C_INITIALIZE_ARGS_PTR
2960-- * and dereferenced
2961-- */
2962--);
2963-+ CK_VOID_PTR pInitArgs /* if this is not NULL_PTR, it gets
2964-+ * cast to CK_C_INITIALIZE_ARGS_PTR
2965-+ * and dereferenced */
2966-+ );
2967- #endif
2968-
2969--
2970- /* C_Finalize indicates that an application is done with the
2971-- * Cryptoki library.
2972-- */
2973-+ * PKCS #11 library. */
2974- CK_PKCS11_FUNCTION_INFO(C_Finalize)
2975- #ifdef CK_NEED_ARG_LIST
2976- (
2977-- CK_VOID_PTR pReserved /* reserved. Should be NULL_PTR */
2978--);
2979-+ CK_VOID_PTR pReserved /* reserved. Should be NULL_PTR */
2980-+ );
2981- #endif
2982-
2983--
2984--/* C_GetInfo returns general information about Cryptoki. */
2985-+/* C_GetInfo returns general information about PKCS #11. */
2986- CK_PKCS11_FUNCTION_INFO(C_GetInfo)
2987- #ifdef CK_NEED_ARG_LIST
2988- (
2989-- CK_INFO_PTR pInfo /* location that receives information */
2990--);
2991-+ CK_INFO_PTR pInfo /* location that receives information */
2992-+ );
2993- #endif
2994-
2995--
2996- /* C_GetFunctionList returns the function list. */
2997- CK_PKCS11_FUNCTION_INFO(C_GetFunctionList)
2998- #ifdef CK_NEED_ARG_LIST
2999- (
3000-- CK_FUNCTION_LIST_PTR_PTR ppFunctionList /* receives pointer to
3001-- * function list
3002-- */
3003--);
3004-+ CK_FUNCTION_LIST_PTR_PTR ppFunctionList /* receives pointer to
3005-+ * function list */
3006-+ );
3007- #endif
3008-
3009--
3010--
3011- /* Slot and token management */
3012-
3013- /* C_GetSlotList obtains a list of slots in the system. */
3014- CK_PKCS11_FUNCTION_INFO(C_GetSlotList)
3015- #ifdef CK_NEED_ARG_LIST
3016- (
3017-- CK_BBOOL tokenPresent, /* only slots with tokens */
3018-- CK_SLOT_ID_PTR pSlotList, /* receives array of slot IDs */
3019-- CK_ULONG_PTR pulCount /* receives number of slots */
3020--);
3021-+ CK_BBOOL tokenPresent, /* only slots with tokens? */
3022-+ CK_SLOT_ID_PTR pSlotList, /* receives array of slot IDs */
3023-+ CK_ULONG_PTR pulCount /* receives number of slots */
3024-+ );
3025- #endif
3026-
3027--
3028- /* C_GetSlotInfo obtains information about a particular slot in
3029-- * the system.
3030-- */
3031-+ * the system. */
3032- CK_PKCS11_FUNCTION_INFO(C_GetSlotInfo)
3033- #ifdef CK_NEED_ARG_LIST
3034- (
3035-- CK_SLOT_ID slotID, /* the ID of the slot */
3036-- CK_SLOT_INFO_PTR pInfo /* receives the slot information */
3037--);
3038-+ CK_SLOT_ID slotID, /* the ID of the slot */
3039-+ CK_SLOT_INFO_PTR pInfo /* receives the slot information */
3040-+ );
3041- #endif
3042-
3043--
3044- /* C_GetTokenInfo obtains information about a particular token
3045-- * in the system.
3046-- */
3047-+ * in the system. */
3048- CK_PKCS11_FUNCTION_INFO(C_GetTokenInfo)
3049- #ifdef CK_NEED_ARG_LIST
3050- (
3051-- CK_SLOT_ID slotID, /* ID of the token's slot */
3052-- CK_TOKEN_INFO_PTR pInfo /* receives the token information */
3053--);
3054-+ CK_SLOT_ID slotID, /* ID of the token's slot */
3055-+ CK_TOKEN_INFO_PTR pInfo /* receives the token information */
3056-+ );
3057- #endif
3058-
3059--
3060- /* C_GetMechanismList obtains a list of mechanism types
3061-- * supported by a token.
3062-- */
3063-+ * supported by a token. */
3064- CK_PKCS11_FUNCTION_INFO(C_GetMechanismList)
3065- #ifdef CK_NEED_ARG_LIST
3066- (
3067-- CK_SLOT_ID slotID, /* ID of token's slot */
3068-- CK_MECHANISM_TYPE_PTR pMechanismList, /* gets mech. array */
3069-- CK_ULONG_PTR pulCount /* gets # of mechs. */
3070--);
3071-+ CK_SLOT_ID slotID, /* ID of token's slot */
3072-+ CK_MECHANISM_TYPE_PTR pMechanismList, /* gets mech. array */
3073-+ CK_ULONG_PTR pulCount /* gets # of mechs. */
3074-+ );
3075- #endif
3076-
3077--
3078- /* C_GetMechanismInfo obtains information about a particular
3079-- * mechanism possibly supported by a token.
3080-- */
3081-+ * mechanism possibly supported by a token. */
3082- CK_PKCS11_FUNCTION_INFO(C_GetMechanismInfo)
3083- #ifdef CK_NEED_ARG_LIST
3084- (
3085-- CK_SLOT_ID slotID, /* ID of the token's slot */
3086-- CK_MECHANISM_TYPE type, /* type of mechanism */
3087-- CK_MECHANISM_INFO_PTR pInfo /* receives mechanism info */
3088--);
3089-+ CK_SLOT_ID slotID, /* ID of the token's slot */
3090-+ CK_MECHANISM_TYPE type, /* type of mechanism */
3091-+ CK_MECHANISM_INFO_PTR pInfo /* receives mechanism info */
3092-+ );
3093- #endif
3094-
3095--
3096- /* C_InitToken initializes a token. */
3097- CK_PKCS11_FUNCTION_INFO(C_InitToken)
3098- #ifdef CK_NEED_ARG_LIST
3099-+/* pLabel changed from CK_CHAR_PTR to CK_UTF8CHAR_PTR for v2.10 */
3100- (
3101-- CK_SLOT_ID slotID, /* ID of the token's slot */
3102-- CK_UTF8CHAR_PTR pPin, /* the SO's initial PIN */
3103-- CK_ULONG ulPinLen, /* length in bytes of the PIN */
3104-- CK_UTF8CHAR_PTR pLabel /* 32-byte token label (blank padded) */
3105--);
3106-+ CK_SLOT_ID slotID, /* ID of the token's slot */
3107-+ CK_UTF8CHAR_PTR pPin, /* the SO's initial PIN */
3108-+ CK_ULONG ulPinLen, /* length in bytes of the PIN */
3109-+ CK_UTF8CHAR_PTR pLabel /* 32-byte token label (blank padded) */
3110-+ );
3111- #endif
3112-
3113--
3114- /* C_InitPIN initializes the normal user's PIN. */
3115- CK_PKCS11_FUNCTION_INFO(C_InitPIN)
3116- #ifdef CK_NEED_ARG_LIST
3117- (
3118-- CK_SESSION_HANDLE hSession, /* the session's handle */
3119-- CK_UTF8CHAR_PTR pPin, /* the normal user's PIN */
3120-- CK_ULONG ulPinLen /* length in bytes of the PIN */
3121--);
3122-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3123-+ CK_UTF8CHAR_PTR pPin, /* the normal user's PIN */
3124-+ CK_ULONG ulPinLen /* length in bytes of the PIN */
3125-+ );
3126- #endif
3127-
3128--
3129- /* C_SetPIN modifies the PIN of the user who is logged in. */
3130- CK_PKCS11_FUNCTION_INFO(C_SetPIN)
3131- #ifdef CK_NEED_ARG_LIST
3132- (
3133-- CK_SESSION_HANDLE hSession, /* the session's handle */
3134-- CK_UTF8CHAR_PTR pOldPin, /* the old PIN */
3135-- CK_ULONG ulOldLen, /* length of the old PIN */
3136-- CK_UTF8CHAR_PTR pNewPin, /* the new PIN */
3137-- CK_ULONG ulNewLen /* length of the new PIN */
3138--);
3139-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3140-+ CK_UTF8CHAR_PTR pOldPin, /* the old PIN */
3141-+ CK_ULONG ulOldLen, /* length of the old PIN */
3142-+ CK_UTF8CHAR_PTR pNewPin, /* the new PIN */
3143-+ CK_ULONG ulNewLen /* length of the new PIN */
3144-+ );
3145- #endif
3146-
3147--
3148--
3149- /* Session management */
3150-
3151- /* C_OpenSession opens a session between an application and a
3152-- * token.
3153-- */
3154-+ * token. */
3155- CK_PKCS11_FUNCTION_INFO(C_OpenSession)
3156- #ifdef CK_NEED_ARG_LIST
3157- (
3158-- CK_SLOT_ID slotID, /* the slot's ID */
3159-- CK_FLAGS flags, /* from CK_SESSION_INFO */
3160-- CK_VOID_PTR pApplication, /* passed to callback */
3161-- CK_NOTIFY Notify, /* callback function */
3162-- CK_SESSION_HANDLE_PTR phSession /* gets session handle */
3163--);
3164-+ CK_SLOT_ID slotID, /* the slot's ID */
3165-+ CK_FLAGS flags, /* from CK_SESSION_INFO */
3166-+ CK_VOID_PTR pApplication, /* passed to callback */
3167-+ CK_NOTIFY Notify, /* callback function */
3168-+ CK_SESSION_HANDLE_PTR phSession /* gets session handle */
3169-+ );
3170- #endif
3171-
3172--
3173- /* C_CloseSession closes a session between an application and a
3174-- * token.
3175-- */
3176-+ * token. */
3177- CK_PKCS11_FUNCTION_INFO(C_CloseSession)
3178- #ifdef CK_NEED_ARG_LIST
3179- (
3180-- CK_SESSION_HANDLE hSession /* the session's handle */
3181--);
3182-+ CK_SESSION_HANDLE hSession /* the session's handle */
3183-+ );
3184- #endif
3185-
3186--
3187- /* C_CloseAllSessions closes all sessions with a token. */
3188- CK_PKCS11_FUNCTION_INFO(C_CloseAllSessions)
3189- #ifdef CK_NEED_ARG_LIST
3190- (
3191-- CK_SLOT_ID slotID /* the token's slot */
3192--);
3193-+ CK_SLOT_ID slotID /* the token's slot */
3194-+ );
3195- #endif
3196-
3197--
3198- /* C_GetSessionInfo obtains information about the session. */
3199- CK_PKCS11_FUNCTION_INFO(C_GetSessionInfo)
3200- #ifdef CK_NEED_ARG_LIST
3201- (
3202-- CK_SESSION_HANDLE hSession, /* the session's handle */
3203-- CK_SESSION_INFO_PTR pInfo /* receives session info */
3204--);
3205-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3206-+ CK_SESSION_INFO_PTR pInfo /* receives session info */
3207-+ );
3208- #endif
3209-
3210--
3211- /* C_GetOperationState obtains the state of the cryptographic operation
3212-- * in a session.
3213-- */
3214-+ * in a session. */
3215- CK_PKCS11_FUNCTION_INFO(C_GetOperationState)
3216- #ifdef CK_NEED_ARG_LIST
3217- (
3218-- CK_SESSION_HANDLE hSession, /* session's handle */
3219-- CK_BYTE_PTR pOperationState, /* gets state */
3220-- CK_ULONG_PTR pulOperationStateLen /* gets state length */
3221--);
3222-+ CK_SESSION_HANDLE hSession, /* session's handle */
3223-+ CK_BYTE_PTR pOperationState, /* gets state */
3224-+ CK_ULONG_PTR pulOperationStateLen /* gets state length */
3225-+ );
3226- #endif
3227-
3228--
3229- /* C_SetOperationState restores the state of the cryptographic
3230-- * operation in a session.
3231-- */
3232-+ * operation in a session. */
3233- CK_PKCS11_FUNCTION_INFO(C_SetOperationState)
3234- #ifdef CK_NEED_ARG_LIST
3235- (
3236-- CK_SESSION_HANDLE hSession, /* session's handle */
3237-- CK_BYTE_PTR pOperationState, /* holds state */
3238-- CK_ULONG ulOperationStateLen, /* holds state length */
3239-- CK_OBJECT_HANDLE hEncryptionKey, /* en/decryption key */
3240-- CK_OBJECT_HANDLE hAuthenticationKey /* sign/verify key */
3241--);
3242-+ CK_SESSION_HANDLE hSession, /* session's handle */
3243-+ CK_BYTE_PTR pOperationState, /* holds state */
3244-+ CK_ULONG ulOperationStateLen, /* holds state length */
3245-+ CK_OBJECT_HANDLE hEncryptionKey, /* en/decryption key */
3246-+ CK_OBJECT_HANDLE hAuthenticationKey /* sign/verify key */
3247-+ );
3248- #endif
3249-
3250--
3251- /* C_Login logs a user into a token. */
3252- CK_PKCS11_FUNCTION_INFO(C_Login)
3253- #ifdef CK_NEED_ARG_LIST
3254- (
3255-- CK_SESSION_HANDLE hSession, /* the session's handle */
3256-- CK_USER_TYPE userType, /* the user type */
3257-- CK_UTF8CHAR_PTR pPin, /* the user's PIN */
3258-- CK_ULONG ulPinLen /* the length of the PIN */
3259--);
3260-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3261-+ CK_USER_TYPE userType, /* the user type */
3262-+ CK_UTF8CHAR_PTR pPin, /* the user's PIN */
3263-+ CK_ULONG ulPinLen /* the length of the PIN */
3264-+ );
3265- #endif
3266-
3267--
3268- /* C_Logout logs a user out from a token. */
3269- CK_PKCS11_FUNCTION_INFO(C_Logout)
3270- #ifdef CK_NEED_ARG_LIST
3271- (
3272-- CK_SESSION_HANDLE hSession /* the session's handle */
3273--);
3274-+ CK_SESSION_HANDLE hSession /* the session's handle */
3275-+ );
3276- #endif
3277-
3278--
3279--
3280- /* Object management */
3281-
3282- /* C_CreateObject creates a new object. */
3283- CK_PKCS11_FUNCTION_INFO(C_CreateObject)
3284- #ifdef CK_NEED_ARG_LIST
3285- (
3286-- CK_SESSION_HANDLE hSession, /* the session's handle */
3287-- CK_ATTRIBUTE_PTR pTemplate, /* the object's template */
3288-- CK_ULONG ulCount, /* attributes in template */
3289-- CK_OBJECT_HANDLE_PTR phObject /* gets new object's handle. */
3290--);
3291-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3292-+ CK_ATTRIBUTE_PTR pTemplate, /* the object's template */
3293-+ CK_ULONG ulCount, /* attributes in template */
3294-+ CK_OBJECT_HANDLE_PTR phObject /* gets new object's handle. */
3295-+ );
3296- #endif
3297-
3298--
3299- /* C_CopyObject copies an object, creating a new object for the
3300-- * copy.
3301-- */
3302-+ * copy. */
3303- CK_PKCS11_FUNCTION_INFO(C_CopyObject)
3304- #ifdef CK_NEED_ARG_LIST
3305- (
3306-- CK_SESSION_HANDLE hSession, /* the session's handle */
3307-- CK_OBJECT_HANDLE hObject, /* the object's handle */
3308-- CK_ATTRIBUTE_PTR pTemplate, /* template for new object */
3309-- CK_ULONG ulCount, /* attributes in template */
3310-- CK_OBJECT_HANDLE_PTR phNewObject /* receives handle of copy */
3311--);
3312-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3313-+ CK_OBJECT_HANDLE hObject, /* the object's handle */
3314-+ CK_ATTRIBUTE_PTR pTemplate, /* template for new object */
3315-+ CK_ULONG ulCount, /* attributes in template */
3316-+ CK_OBJECT_HANDLE_PTR phNewObject /* receives handle of copy */
3317-+ );
3318- #endif
3319-
3320--
3321- /* C_DestroyObject destroys an object. */
3322- CK_PKCS11_FUNCTION_INFO(C_DestroyObject)
3323- #ifdef CK_NEED_ARG_LIST
3324- (
3325-- CK_SESSION_HANDLE hSession, /* the session's handle */
3326-- CK_OBJECT_HANDLE hObject /* the object's handle */
3327--);
3328-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3329-+ CK_OBJECT_HANDLE hObject /* the object's handle */
3330-+ );
3331- #endif
3332-
3333--
3334- /* C_GetObjectSize gets the size of an object in bytes. */
3335- CK_PKCS11_FUNCTION_INFO(C_GetObjectSize)
3336- #ifdef CK_NEED_ARG_LIST
3337- (
3338-- CK_SESSION_HANDLE hSession, /* the session's handle */
3339-- CK_OBJECT_HANDLE hObject, /* the object's handle */
3340-- CK_ULONG_PTR pulSize /* receives size of object */
3341--);
3342-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3343-+ CK_OBJECT_HANDLE hObject, /* the object's handle */
3344-+ CK_ULONG_PTR pulSize /* receives size of object */
3345-+ );
3346- #endif
3347-
3348--
3349- /* C_GetAttributeValue obtains the value of one or more object
3350-- * attributes.
3351-- */
3352-+ * attributes. */
3353- CK_PKCS11_FUNCTION_INFO(C_GetAttributeValue)
3354- #ifdef CK_NEED_ARG_LIST
3355- (
3356-- CK_SESSION_HANDLE hSession, /* the session's handle */
3357-- CK_OBJECT_HANDLE hObject, /* the object's handle */
3358-- CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs; gets vals */
3359-- CK_ULONG ulCount /* attributes in template */
3360--);
3361-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3362-+ CK_OBJECT_HANDLE hObject, /* the object's handle */
3363-+ CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs; gets vals */
3364-+ CK_ULONG ulCount /* attributes in template */
3365-+ );
3366- #endif
3367-
3368--
3369- /* C_SetAttributeValue modifies the value of one or more object
3370-- * attributes.
3371-- */
3372-+ * attributes */
3373- CK_PKCS11_FUNCTION_INFO(C_SetAttributeValue)
3374- #ifdef CK_NEED_ARG_LIST
3375- (
3376-- CK_SESSION_HANDLE hSession, /* the session's handle */
3377-- CK_OBJECT_HANDLE hObject, /* the object's handle */
3378-- CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs and values */
3379-- CK_ULONG ulCount /* attributes in template */
3380--);
3381-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3382-+ CK_OBJECT_HANDLE hObject, /* the object's handle */
3383-+ CK_ATTRIBUTE_PTR pTemplate, /* specifies attrs and values */
3384-+ CK_ULONG ulCount /* attributes in template */
3385-+ );
3386- #endif
3387-
3388--
3389- /* C_FindObjectsInit initializes a search for token and session
3390-- * objects that match a template.
3391-- */
3392-+ * objects that match a template. */
3393- CK_PKCS11_FUNCTION_INFO(C_FindObjectsInit)
3394- #ifdef CK_NEED_ARG_LIST
3395- (
3396-- CK_SESSION_HANDLE hSession, /* the session's handle */
3397-- CK_ATTRIBUTE_PTR pTemplate, /* attribute values to match */
3398-- CK_ULONG ulCount /* attrs in search template */
3399--);
3400-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3401-+ CK_ATTRIBUTE_PTR pTemplate, /* attribute values to match */
3402-+ CK_ULONG ulCount /* attrs in search template */
3403-+ );
3404- #endif
3405-
3406--
3407- /* C_FindObjects continues a search for token and session
3408- * objects that match a template, obtaining additional object
3409-- * handles.
3410-- */
3411-+ * handles. */
3412- CK_PKCS11_FUNCTION_INFO(C_FindObjects)
3413- #ifdef CK_NEED_ARG_LIST
3414- (
3415-- CK_SESSION_HANDLE hSession, /* session's handle */
3416-- CK_OBJECT_HANDLE_PTR phObject, /* gets obj. handles */
3417-- CK_ULONG ulMaxObjectCount, /* max handles to get */
3418-- CK_ULONG_PTR pulObjectCount /* actual # returned */
3419--);
3420-+ CK_SESSION_HANDLE hSession, /* session's handle */
3421-+ CK_OBJECT_HANDLE_PTR phObject, /* gets obj. handles */
3422-+ CK_ULONG ulMaxObjectCount, /* max handles to get */
3423-+ CK_ULONG_PTR pulObjectCount /* actual # returned */
3424-+ );
3425- #endif
3426-
3427--
3428- /* C_FindObjectsFinal finishes a search for token and session
3429-- * objects.
3430-- */
3431-+ * objects. */
3432- CK_PKCS11_FUNCTION_INFO(C_FindObjectsFinal)
3433- #ifdef CK_NEED_ARG_LIST
3434- (
3435-- CK_SESSION_HANDLE hSession /* the session's handle */
3436--);
3437-+ CK_SESSION_HANDLE hSession /* the session's handle */
3438-+ );
3439- #endif
3440-
3441--
3442--
3443- /* Encryption and decryption */
3444-
3445- /* C_EncryptInit initializes an encryption operation. */
3446- CK_PKCS11_FUNCTION_INFO(C_EncryptInit)
3447- #ifdef CK_NEED_ARG_LIST
3448- (
3449-- CK_SESSION_HANDLE hSession, /* the session's handle */
3450-- CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */
3451-- CK_OBJECT_HANDLE hKey /* handle of encryption key */
3452--);
3453-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3454-+ CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */
3455-+ CK_OBJECT_HANDLE hKey /* handle of encryption key */
3456-+ );
3457- #endif
3458-
3459--
3460- /* C_Encrypt encrypts single-part data. */
3461- CK_PKCS11_FUNCTION_INFO(C_Encrypt)
3462- #ifdef CK_NEED_ARG_LIST
3463- (
3464-- CK_SESSION_HANDLE hSession, /* session's handle */
3465-- CK_BYTE_PTR pData, /* the plaintext data */
3466-- CK_ULONG ulDataLen, /* bytes of plaintext */
3467-- CK_BYTE_PTR pEncryptedData, /* gets ciphertext */
3468-- CK_ULONG_PTR pulEncryptedDataLen /* gets c-text size */
3469--);
3470-+ CK_SESSION_HANDLE hSession, /* session's handle */
3471-+ CK_BYTE_PTR pData, /* the plaintext data */
3472-+ CK_ULONG ulDataLen, /* bytes of plaintext */
3473-+ CK_BYTE_PTR pEncryptedData, /* gets ciphertext */
3474-+ CK_ULONG_PTR pulEncryptedDataLen /* gets c-text size */
3475-+ );
3476- #endif
3477-
3478--
3479- /* C_EncryptUpdate continues a multiple-part encryption
3480-- * operation.
3481-- */
3482-+ * operation. */
3483- CK_PKCS11_FUNCTION_INFO(C_EncryptUpdate)
3484- #ifdef CK_NEED_ARG_LIST
3485- (
3486-- CK_SESSION_HANDLE hSession, /* session's handle */
3487-- CK_BYTE_PTR pPart, /* the plaintext data */
3488-- CK_ULONG ulPartLen, /* plaintext data len */
3489-- CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3490-- CK_ULONG_PTR pulEncryptedPartLen /* gets c-text size */
3491--);
3492-+ CK_SESSION_HANDLE hSession, /* session's handle */
3493-+ CK_BYTE_PTR pPart, /* the plaintext data */
3494-+ CK_ULONG ulPartLen, /* plaintext data len */
3495-+ CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3496-+ CK_ULONG_PTR pulEncryptedPartLen /* gets c-text size */
3497-+ );
3498- #endif
3499-
3500--
3501- /* C_EncryptFinal finishes a multiple-part encryption
3502-- * operation.
3503-- */
3504-+ * operation. */
3505- CK_PKCS11_FUNCTION_INFO(C_EncryptFinal)
3506- #ifdef CK_NEED_ARG_LIST
3507- (
3508-- CK_SESSION_HANDLE hSession, /* session handle */
3509-- CK_BYTE_PTR pLastEncryptedPart, /* last c-text */
3510-- CK_ULONG_PTR pulLastEncryptedPartLen /* gets last size */
3511--);
3512-+ CK_SESSION_HANDLE hSession, /* session handle */
3513-+ CK_BYTE_PTR pLastEncryptedPart, /* last c-text */
3514-+ CK_ULONG_PTR pulLastEncryptedPartLen /* gets last size */
3515-+ );
3516- #endif
3517-
3518--
3519- /* C_DecryptInit initializes a decryption operation. */
3520- CK_PKCS11_FUNCTION_INFO(C_DecryptInit)
3521- #ifdef CK_NEED_ARG_LIST
3522- (
3523-- CK_SESSION_HANDLE hSession, /* the session's handle */
3524-- CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */
3525-- CK_OBJECT_HANDLE hKey /* handle of decryption key */
3526--);
3527-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3528-+ CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */
3529-+ CK_OBJECT_HANDLE hKey /* handle of decryption key */
3530-+ );
3531- #endif
3532-
3533--
3534- /* C_Decrypt decrypts encrypted data in a single part. */
3535- CK_PKCS11_FUNCTION_INFO(C_Decrypt)
3536- #ifdef CK_NEED_ARG_LIST
3537- (
3538-- CK_SESSION_HANDLE hSession, /* session's handle */
3539-- CK_BYTE_PTR pEncryptedData, /* ciphertext */
3540-- CK_ULONG ulEncryptedDataLen, /* ciphertext length */
3541-- CK_BYTE_PTR pData, /* gets plaintext */
3542-- CK_ULONG_PTR pulDataLen /* gets p-text size */
3543--);
3544-+ CK_SESSION_HANDLE hSession, /* session's handle */
3545-+ CK_BYTE_PTR pEncryptedData, /* ciphertext */
3546-+ CK_ULONG ulEncryptedDataLen, /* ciphertext length */
3547-+ CK_BYTE_PTR pData, /* gets plaintext */
3548-+ CK_ULONG_PTR pulDataLen /* gets p-text size */
3549-+ );
3550- #endif
3551-
3552--
3553- /* C_DecryptUpdate continues a multiple-part decryption
3554-- * operation.
3555-- */
3556-+ * operation. */
3557- CK_PKCS11_FUNCTION_INFO(C_DecryptUpdate)
3558- #ifdef CK_NEED_ARG_LIST
3559- (
3560-- CK_SESSION_HANDLE hSession, /* session's handle */
3561-- CK_BYTE_PTR pEncryptedPart, /* encrypted data */
3562-- CK_ULONG ulEncryptedPartLen, /* input length */
3563-- CK_BYTE_PTR pPart, /* gets plaintext */
3564-- CK_ULONG_PTR pulPartLen /* p-text size */
3565--);
3566-+ CK_SESSION_HANDLE hSession, /* session's handle */
3567-+ CK_BYTE_PTR pEncryptedPart, /* encrypted data */
3568-+ CK_ULONG ulEncryptedPartLen, /* input length */
3569-+ CK_BYTE_PTR pPart, /* gets plaintext */
3570-+ CK_ULONG_PTR pulPartLen /* p-text size */
3571-+ );
3572- #endif
3573-
3574--
3575- /* C_DecryptFinal finishes a multiple-part decryption
3576-- * operation.
3577-- */
3578-+ * operation. */
3579- CK_PKCS11_FUNCTION_INFO(C_DecryptFinal)
3580- #ifdef CK_NEED_ARG_LIST
3581- (
3582-- CK_SESSION_HANDLE hSession, /* the session's handle */
3583-- CK_BYTE_PTR pLastPart, /* gets plaintext */
3584-- CK_ULONG_PTR pulLastPartLen /* p-text size */
3585--);
3586-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3587-+ CK_BYTE_PTR pLastPart, /* gets plaintext */
3588-+ CK_ULONG_PTR pulLastPartLen /* p-text size */
3589-+ );
3590- #endif
3591-
3592--
3593--
3594- /* Message digesting */
3595-
3596- /* C_DigestInit initializes a message-digesting operation. */
3597- CK_PKCS11_FUNCTION_INFO(C_DigestInit)
3598- #ifdef CK_NEED_ARG_LIST
3599- (
3600-- CK_SESSION_HANDLE hSession, /* the session's handle */
3601-- CK_MECHANISM_PTR pMechanism /* the digesting mechanism */
3602--);
3603-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3604-+ CK_MECHANISM_PTR pMechanism /* the digesting mechanism */
3605-+ );
3606- #endif
3607-
3608--
3609- /* C_Digest digests data in a single part. */
3610- CK_PKCS11_FUNCTION_INFO(C_Digest)
3611- #ifdef CK_NEED_ARG_LIST
3612- (
3613-- CK_SESSION_HANDLE hSession, /* the session's handle */
3614-- CK_BYTE_PTR pData, /* data to be digested */
3615-- CK_ULONG ulDataLen, /* bytes of data to digest */
3616-- CK_BYTE_PTR pDigest, /* gets the message digest */
3617-- CK_ULONG_PTR pulDigestLen /* gets digest length */
3618--);
3619-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3620-+ CK_BYTE_PTR pData, /* data to be digested */
3621-+ CK_ULONG ulDataLen, /* bytes of data to digest */
3622-+ CK_BYTE_PTR pDigest, /* gets the message digest */
3623-+ CK_ULONG_PTR pulDigestLen /* gets digest length */
3624-+ );
3625- #endif
3626-
3627--
3628- /* C_DigestUpdate continues a multiple-part message-digesting
3629-- * operation.
3630-- */
3631-+ * operation. */
3632- CK_PKCS11_FUNCTION_INFO(C_DigestUpdate)
3633- #ifdef CK_NEED_ARG_LIST
3634- (
3635-- CK_SESSION_HANDLE hSession, /* the session's handle */
3636-- CK_BYTE_PTR pPart, /* data to be digested */
3637-- CK_ULONG ulPartLen /* bytes of data to be digested */
3638--);
3639-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3640-+ CK_BYTE_PTR pPart, /* data to be digested */
3641-+ CK_ULONG ulPartLen /* bytes of data to be digested */
3642-+ );
3643- #endif
3644-
3645--
3646- /* C_DigestKey continues a multi-part message-digesting
3647- * operation, by digesting the value of a secret key as part of
3648-- * the data already digested.
3649-- */
3650-+ * the data already digested. */
3651- CK_PKCS11_FUNCTION_INFO(C_DigestKey)
3652- #ifdef CK_NEED_ARG_LIST
3653- (
3654-- CK_SESSION_HANDLE hSession, /* the session's handle */
3655-- CK_OBJECT_HANDLE hKey /* secret key to digest */
3656--);
3657-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3658-+ CK_OBJECT_HANDLE hKey /* secret key to digest */
3659-+ );
3660- #endif
3661-
3662--
3663- /* C_DigestFinal finishes a multiple-part message-digesting
3664-- * operation.
3665-- */
3666-+ * operation. */
3667- CK_PKCS11_FUNCTION_INFO(C_DigestFinal)
3668- #ifdef CK_NEED_ARG_LIST
3669- (
3670-- CK_SESSION_HANDLE hSession, /* the session's handle */
3671-- CK_BYTE_PTR pDigest, /* gets the message digest */
3672-- CK_ULONG_PTR pulDigestLen /* gets byte count of digest */
3673--);
3674-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3675-+ CK_BYTE_PTR pDigest, /* gets the message digest */
3676-+ CK_ULONG_PTR pulDigestLen /* gets byte count of digest */
3677-+ );
3678- #endif
3679-
3680--
3681--
3682- /* Signing and MACing */
3683-
3684- /* C_SignInit initializes a signature (private key encryption)
3685- * operation, where the signature is (will be) an appendix to
3686- * the data, and plaintext cannot be recovered from the
3687-- * signature.
3688-- */
3689-+ *signature. */
3690- CK_PKCS11_FUNCTION_INFO(C_SignInit)
3691- #ifdef CK_NEED_ARG_LIST
3692- (
3693-- CK_SESSION_HANDLE hSession, /* the session's handle */
3694-- CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
3695-- CK_OBJECT_HANDLE hKey /* handle of signature key */
3696--);
3697-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3698-+ CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
3699-+ CK_OBJECT_HANDLE hKey /* handle of signature key */
3700-+ );
3701- #endif
3702-
3703--
3704- /* C_Sign signs (encrypts with private key) data in a single
3705- * part, where the signature is (will be) an appendix to the
3706-- * data, and plaintext cannot be recovered from the signature.
3707-- */
3708-+ * data, and plaintext cannot be recovered from the signature. */
3709- CK_PKCS11_FUNCTION_INFO(C_Sign)
3710- #ifdef CK_NEED_ARG_LIST
3711- (
3712-- CK_SESSION_HANDLE hSession, /* the session's handle */
3713-- CK_BYTE_PTR pData, /* the data to sign */
3714-- CK_ULONG ulDataLen, /* count of bytes to sign */
3715-- CK_BYTE_PTR pSignature, /* gets the signature */
3716-- CK_ULONG_PTR pulSignatureLen /* gets signature length */
3717--);
3718-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3719-+ CK_BYTE_PTR pData, /* the data to sign */
3720-+ CK_ULONG ulDataLen, /* count of bytes to sign */
3721-+ CK_BYTE_PTR pSignature, /* gets the signature */
3722-+ CK_ULONG_PTR pulSignatureLen /* gets signature length */
3723-+ );
3724- #endif
3725-
3726--
3727- /* C_SignUpdate continues a multiple-part signature operation,
3728- * where the signature is (will be) an appendix to the data,
3729-- * and plaintext cannot be recovered from the signature.
3730-- */
3731-+ * and plaintext cannot be recovered from the signature. */
3732- CK_PKCS11_FUNCTION_INFO(C_SignUpdate)
3733- #ifdef CK_NEED_ARG_LIST
3734- (
3735-- CK_SESSION_HANDLE hSession, /* the session's handle */
3736-- CK_BYTE_PTR pPart, /* the data to sign */
3737-- CK_ULONG ulPartLen /* count of bytes to sign */
3738--);
3739-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3740-+ CK_BYTE_PTR pPart, /* the data to sign */
3741-+ CK_ULONG ulPartLen /* count of bytes to sign */
3742-+ );
3743- #endif
3744-
3745--
3746- /* C_SignFinal finishes a multiple-part signature operation,
3747-- * returning the signature.
3748-- */
3749-+ * returning the signature. */
3750- CK_PKCS11_FUNCTION_INFO(C_SignFinal)
3751- #ifdef CK_NEED_ARG_LIST
3752- (
3753-- CK_SESSION_HANDLE hSession, /* the session's handle */
3754-- CK_BYTE_PTR pSignature, /* gets the signature */
3755-- CK_ULONG_PTR pulSignatureLen /* gets signature length */
3756--);
3757-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3758-+ CK_BYTE_PTR pSignature, /* gets the signature */
3759-+ CK_ULONG_PTR pulSignatureLen /* gets signature length */
3760-+ );
3761- #endif
3762-
3763--
3764- /* C_SignRecoverInit initializes a signature operation, where
3765-- * the data can be recovered from the signature.
3766-- */
3767-+ * the data can be recovered from the signature. */
3768- CK_PKCS11_FUNCTION_INFO(C_SignRecoverInit)
3769- #ifdef CK_NEED_ARG_LIST
3770- (
3771-- CK_SESSION_HANDLE hSession, /* the session's handle */
3772-- CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
3773-- CK_OBJECT_HANDLE hKey /* handle of the signature key */
3774--);
3775-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3776-+ CK_MECHANISM_PTR pMechanism, /* the signature mechanism */
3777-+ CK_OBJECT_HANDLE hKey /* handle of the signature key */
3778-+ );
3779- #endif
3780-
3781--
3782- /* C_SignRecover signs data in a single operation, where the
3783-- * data can be recovered from the signature.
3784-- */
3785-+ * data can be recovered from the signature. */
3786- CK_PKCS11_FUNCTION_INFO(C_SignRecover)
3787- #ifdef CK_NEED_ARG_LIST
3788- (
3789-- CK_SESSION_HANDLE hSession, /* the session's handle */
3790-- CK_BYTE_PTR pData, /* the data to sign */
3791-- CK_ULONG ulDataLen, /* count of bytes to sign */
3792-- CK_BYTE_PTR pSignature, /* gets the signature */
3793-- CK_ULONG_PTR pulSignatureLen /* gets signature length */
3794--);
3795-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3796-+ CK_BYTE_PTR pData, /* the data to sign */
3797-+ CK_ULONG ulDataLen, /* count of bytes to sign */
3798-+ CK_BYTE_PTR pSignature, /* gets the signature */
3799-+ CK_ULONG_PTR pulSignatureLen /* gets signature length */
3800-+ );
3801- #endif
3802-
3803--
3804--
3805- /* Verifying signatures and MACs */
3806-
3807- /* C_VerifyInit initializes a verification operation, where the
3808- * signature is an appendix to the data, and plaintext cannot
3809-- * cannot be recovered from the signature (e.g. DSA).
3810-- */
3811-+ * cannot be recovered from the signature (e.g. DSA). */
3812- CK_PKCS11_FUNCTION_INFO(C_VerifyInit)
3813- #ifdef CK_NEED_ARG_LIST
3814- (
3815-- CK_SESSION_HANDLE hSession, /* the session's handle */
3816-- CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
3817-- CK_OBJECT_HANDLE hKey /* verification key */
3818--);
3819-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3820-+ CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
3821-+ CK_OBJECT_HANDLE hKey /* verification key */
3822-+ );
3823- #endif
3824-
3825--
3826- /* C_Verify verifies a signature in a single-part operation,
3827- * where the signature is an appendix to the data, and plaintext
3828-- * cannot be recovered from the signature.
3829-- */
3830-+ * cannot be recovered from the signature. */
3831- CK_PKCS11_FUNCTION_INFO(C_Verify)
3832- #ifdef CK_NEED_ARG_LIST
3833- (
3834-- CK_SESSION_HANDLE hSession, /* the session's handle */
3835-- CK_BYTE_PTR pData, /* signed data */
3836-- CK_ULONG ulDataLen, /* length of signed data */
3837-- CK_BYTE_PTR pSignature, /* signature */
3838-- CK_ULONG ulSignatureLen /* signature length*/
3839--);
3840-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3841-+ CK_BYTE_PTR pData, /* signed data */
3842-+ CK_ULONG ulDataLen, /* length of signed data */
3843-+ CK_BYTE_PTR pSignature, /* signature */
3844-+ CK_ULONG ulSignatureLen /* signature length*/
3845-+ );
3846- #endif
3847-
3848--
3849- /* C_VerifyUpdate continues a multiple-part verification
3850- * operation, where the signature is an appendix to the data,
3851-- * and plaintext cannot be recovered from the signature.
3852-- */
3853-+ * and plaintext cannot be recovered from the signature. */
3854- CK_PKCS11_FUNCTION_INFO(C_VerifyUpdate)
3855- #ifdef CK_NEED_ARG_LIST
3856- (
3857-- CK_SESSION_HANDLE hSession, /* the session's handle */
3858-- CK_BYTE_PTR pPart, /* signed data */
3859-- CK_ULONG ulPartLen /* length of signed data */
3860--);
3861-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3862-+ CK_BYTE_PTR pPart, /* signed data */
3863-+ CK_ULONG ulPartLen /* length of signed data */
3864-+ );
3865- #endif
3866-
3867--
3868- /* C_VerifyFinal finishes a multiple-part verification
3869-- * operation, checking the signature.
3870-- */
3871-+ * operation, checking the signature. */
3872- CK_PKCS11_FUNCTION_INFO(C_VerifyFinal)
3873- #ifdef CK_NEED_ARG_LIST
3874- (
3875-- CK_SESSION_HANDLE hSession, /* the session's handle */
3876-- CK_BYTE_PTR pSignature, /* signature to verify */
3877-- CK_ULONG ulSignatureLen /* signature length */
3878--);
3879-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3880-+ CK_BYTE_PTR pSignature, /* signature to verify */
3881-+ CK_ULONG ulSignatureLen /* signature length */
3882-+ );
3883- #endif
3884-
3885--
3886- /* C_VerifyRecoverInit initializes a signature verification
3887-- * operation, where the data is recovered from the signature.
3888-- */
3889-+ * operation, where the data is recovered from the signature. */
3890- CK_PKCS11_FUNCTION_INFO(C_VerifyRecoverInit)
3891- #ifdef CK_NEED_ARG_LIST
3892- (
3893-- CK_SESSION_HANDLE hSession, /* the session's handle */
3894-- CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
3895-- CK_OBJECT_HANDLE hKey /* verification key */
3896--);
3897-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3898-+ CK_MECHANISM_PTR pMechanism, /* the verification mechanism */
3899-+ CK_OBJECT_HANDLE hKey /* verification key */
3900-+ );
3901- #endif
3902-
3903--
3904- /* C_VerifyRecover verifies a signature in a single-part
3905-- * operation, where the data is recovered from the signature.
3906-- */
3907-+ * operation, where the data is recovered from the signature. */
3908- CK_PKCS11_FUNCTION_INFO(C_VerifyRecover)
3909- #ifdef CK_NEED_ARG_LIST
3910- (
3911-- CK_SESSION_HANDLE hSession, /* the session's handle */
3912-- CK_BYTE_PTR pSignature, /* signature to verify */
3913-- CK_ULONG ulSignatureLen, /* signature length */
3914-- CK_BYTE_PTR pData, /* gets signed data */
3915-- CK_ULONG_PTR pulDataLen /* gets signed data len */
3916--);
3917-+ CK_SESSION_HANDLE hSession, /* the session's handle */
3918-+ CK_BYTE_PTR pSignature, /* signature to verify */
3919-+ CK_ULONG ulSignatureLen, /* signature length */
3920-+ CK_BYTE_PTR pData, /* gets signed data */
3921-+ CK_ULONG_PTR pulDataLen /* gets signed data len */
3922-+ );
3923- #endif
3924-
3925--
3926--
3927- /* Dual-function cryptographic operations */
3928-
3929- /* C_DigestEncryptUpdate continues a multiple-part digesting
3930-- * and encryption operation.
3931-- */
3932-+ * and encryption operation. */
3933- CK_PKCS11_FUNCTION_INFO(C_DigestEncryptUpdate)
3934- #ifdef CK_NEED_ARG_LIST
3935- (
3936-- CK_SESSION_HANDLE hSession, /* session's handle */
3937-- CK_BYTE_PTR pPart, /* the plaintext data */
3938-- CK_ULONG ulPartLen, /* plaintext length */
3939-- CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3940-- CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
3941--);
3942-+ CK_SESSION_HANDLE hSession, /* session's handle */
3943-+ CK_BYTE_PTR pPart, /* the plaintext data */
3944-+ CK_ULONG ulPartLen, /* plaintext length */
3945-+ CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3946-+ CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
3947-+ );
3948- #endif
3949-
3950--
3951- /* C_DecryptDigestUpdate continues a multiple-part decryption and
3952-- * digesting operation.
3953-- */
3954-+ * digesting operation. */
3955- CK_PKCS11_FUNCTION_INFO(C_DecryptDigestUpdate)
3956- #ifdef CK_NEED_ARG_LIST
3957- (
3958-- CK_SESSION_HANDLE hSession, /* session's handle */
3959-- CK_BYTE_PTR pEncryptedPart, /* ciphertext */
3960-- CK_ULONG ulEncryptedPartLen, /* ciphertext length */
3961-- CK_BYTE_PTR pPart, /* gets plaintext */
3962-- CK_ULONG_PTR pulPartLen /* gets plaintext len */
3963--);
3964-+ CK_SESSION_HANDLE hSession, /* session's handle */
3965-+ CK_BYTE_PTR pEncryptedPart, /* ciphertext */
3966-+ CK_ULONG ulEncryptedPartLen, /* ciphertext length */
3967-+ CK_BYTE_PTR pPart, /* gets plaintext */
3968-+ CK_ULONG_PTR pulPartLen /* gets plaintext len */
3969-+ );
3970- #endif
3971-
3972--
3973- /* C_SignEncryptUpdate continues a multiple-part signing and
3974-- * encryption operation.
3975-- */
3976-+ * encryption operation. */
3977- CK_PKCS11_FUNCTION_INFO(C_SignEncryptUpdate)
3978- #ifdef CK_NEED_ARG_LIST
3979- (
3980-- CK_SESSION_HANDLE hSession, /* session's handle */
3981-- CK_BYTE_PTR pPart, /* the plaintext data */
3982-- CK_ULONG ulPartLen, /* plaintext length */
3983-- CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3984-- CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
3985--);
3986-+ CK_SESSION_HANDLE hSession, /* session's handle */
3987-+ CK_BYTE_PTR pPart, /* the plaintext data */
3988-+ CK_ULONG ulPartLen, /* plaintext length */
3989-+ CK_BYTE_PTR pEncryptedPart, /* gets ciphertext */
3990-+ CK_ULONG_PTR pulEncryptedPartLen /* gets c-text length */
3991-+ );
3992- #endif
3993-
3994--
3995- /* C_DecryptVerifyUpdate continues a multiple-part decryption and
3996-- * verify operation.
3997-- */
3998-+ * verify operation. */
3999- CK_PKCS11_FUNCTION_INFO(C_DecryptVerifyUpdate)
4000- #ifdef CK_NEED_ARG_LIST
4001- (
4002-- CK_SESSION_HANDLE hSession, /* session's handle */
4003-- CK_BYTE_PTR pEncryptedPart, /* ciphertext */
4004-- CK_ULONG ulEncryptedPartLen, /* ciphertext length */
4005-- CK_BYTE_PTR pPart, /* gets plaintext */
4006-- CK_ULONG_PTR pulPartLen /* gets p-text length */
4007--);
4008-+ CK_SESSION_HANDLE hSession, /* session's handle */
4009-+ CK_BYTE_PTR pEncryptedPart, /* ciphertext */
4010-+ CK_ULONG ulEncryptedPartLen, /* ciphertext length */
4011-+ CK_BYTE_PTR pPart, /* gets plaintext */
4012-+ CK_ULONG_PTR pulPartLen /* gets p-text length */
4013-+ );
4014- #endif
4015-
4016--
4017--
4018- /* Key management */
4019-
4020- /* C_GenerateKey generates a secret key, creating a new key
4021-- * object.
4022-- */
4023-+ * object. */
4024- CK_PKCS11_FUNCTION_INFO(C_GenerateKey)
4025- #ifdef CK_NEED_ARG_LIST
4026- (
4027-- CK_SESSION_HANDLE hSession, /* the session's handle */
4028-- CK_MECHANISM_PTR pMechanism, /* key generation mech. */
4029-- CK_ATTRIBUTE_PTR pTemplate, /* template for new key */
4030-- CK_ULONG ulCount, /* # of attrs in template */
4031-- CK_OBJECT_HANDLE_PTR phKey /* gets handle of new key */
4032--);
4033-+ CK_SESSION_HANDLE hSession, /* the session's handle */
4034-+ CK_MECHANISM_PTR pMechanism, /* key generation mech. */
4035-+ CK_ATTRIBUTE_PTR pTemplate, /* template for new key */
4036-+ CK_ULONG ulCount, /* # of attrs in template */
4037-+ CK_OBJECT_HANDLE_PTR phKey /* gets handle of new key */
4038-+ );
4039- #endif
4040-
4041--
4042- /* C_GenerateKeyPair generates a public-key/private-key pair,
4043-- * creating new key objects.
4044-- */
4045-+ * creating new key objects. */
4046- CK_PKCS11_FUNCTION_INFO(C_GenerateKeyPair)
4047- #ifdef CK_NEED_ARG_LIST
4048- (
4049-- CK_SESSION_HANDLE hSession, /* session handle */
4050-- CK_MECHANISM_PTR pMechanism, /* key-gen mech. */
4051-- CK_ATTRIBUTE_PTR pPublicKeyTemplate, /* template for pub. key */
4052-- CK_ULONG ulPublicKeyAttributeCount, /* # pub. attrs. */
4053-- CK_ATTRIBUTE_PTR pPrivateKeyTemplate, /* template for priv. key */
4054-- CK_ULONG ulPrivateKeyAttributeCount, /* # priv. attrs. */
4055-- CK_OBJECT_HANDLE_PTR phPublicKey, /* gets pub. key handle */
4056-- CK_OBJECT_HANDLE_PTR phPrivateKey /* gets priv. key handle */
4057--);
4058-+ CK_SESSION_HANDLE hSession, /* session handle */
4059-+ CK_MECHANISM_PTR pMechanism, /* key-gen mech. */
4060-+ CK_ATTRIBUTE_PTR pPublicKeyTemplate, /* template for pub. key */
4061-+ CK_ULONG ulPublicKeyAttributeCount, /* # pub. attrs. */
4062-+ CK_ATTRIBUTE_PTR pPrivateKeyTemplate, /* template for priv. key */
4063-+ CK_ULONG ulPrivateKeyAttributeCount, /* # priv. attrs. */
4064-+ CK_OBJECT_HANDLE_PTR phPublicKey, /* gets pub. key handle */
4065-+ CK_OBJECT_HANDLE_PTR phPrivateKey /* gets priv. key handle */
4066-+ );
4067- #endif
4068-
4069--
4070- /* C_WrapKey wraps (i.e., encrypts) a key. */
4071- CK_PKCS11_FUNCTION_INFO(C_WrapKey)
4072- #ifdef CK_NEED_ARG_LIST
4073- (
4074-- CK_SESSION_HANDLE hSession, /* the session's handle */
4075-- CK_MECHANISM_PTR pMechanism, /* the wrapping mechanism */
4076-- CK_OBJECT_HANDLE hWrappingKey, /* wrapping key */
4077-- CK_OBJECT_HANDLE hKey, /* key to be wrapped */
4078-- CK_BYTE_PTR pWrappedKey, /* gets wrapped key */
4079-- CK_ULONG_PTR pulWrappedKeyLen /* gets wrapped key size */
4080--);
4081-+ CK_SESSION_HANDLE hSession, /* the session's handle */
4082-+ CK_MECHANISM_PTR pMechanism, /* the wrapping mechanism */
4083-+ CK_OBJECT_HANDLE hWrappingKey, /* wrapping key */
4084-+ CK_OBJECT_HANDLE hKey, /* key to be wrapped */
4085-+ CK_BYTE_PTR pWrappedKey, /* gets wrapped key */
4086-+ CK_ULONG_PTR pulWrappedKeyLen /* gets wrapped key size */
4087-+ );
4088- #endif
4089-
4090--
4091- /* C_UnwrapKey unwraps (decrypts) a wrapped key, creating a new
4092-- * key object.
4093-- */
4094-+ * key object. */
4095- CK_PKCS11_FUNCTION_INFO(C_UnwrapKey)
4096- #ifdef CK_NEED_ARG_LIST
4097- (
4098-- CK_SESSION_HANDLE hSession, /* session's handle */
4099-- CK_MECHANISM_PTR pMechanism, /* unwrapping mech. */
4100-- CK_OBJECT_HANDLE hUnwrappingKey, /* unwrapping key */
4101-- CK_BYTE_PTR pWrappedKey, /* the wrapped key */
4102-- CK_ULONG ulWrappedKeyLen, /* wrapped key len */
4103-- CK_ATTRIBUTE_PTR pTemplate, /* new key template */
4104-- CK_ULONG ulAttributeCount, /* template length */
4105-- CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
4106--);
4107-+ CK_SESSION_HANDLE hSession, /* session's handle */
4108-+ CK_MECHANISM_PTR pMechanism, /* unwrapping mech. */
4109-+ CK_OBJECT_HANDLE hUnwrappingKey, /* unwrapping key */
4110-+ CK_BYTE_PTR pWrappedKey, /* the wrapped key */
4111-+ CK_ULONG ulWrappedKeyLen, /* wrapped key len */
4112-+ CK_ATTRIBUTE_PTR pTemplate, /* new key template */
4113-+ CK_ULONG ulAttributeCount, /* template length */
4114-+ CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
4115-+ );
4116- #endif
4117-
4118--
4119- /* C_DeriveKey derives a key from a base key, creating a new key
4120-- * object.
4121-- */
4122-+ * object. */
4123- CK_PKCS11_FUNCTION_INFO(C_DeriveKey)
4124- #ifdef CK_NEED_ARG_LIST
4125- (
4126-- CK_SESSION_HANDLE hSession, /* session's handle */
4127-- CK_MECHANISM_PTR pMechanism, /* key deriv. mech. */
4128-- CK_OBJECT_HANDLE hBaseKey, /* base key */
4129-- CK_ATTRIBUTE_PTR pTemplate, /* new key template */
4130-- CK_ULONG ulAttributeCount, /* template length */
4131-- CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
4132--);
4133-+ CK_SESSION_HANDLE hSession, /* session's handle */
4134-+ CK_MECHANISM_PTR pMechanism, /* key deriv. mech. */
4135-+ CK_OBJECT_HANDLE hBaseKey, /* base key */
4136-+ CK_ATTRIBUTE_PTR pTemplate, /* new key template */
4137-+ CK_ULONG ulAttributeCount, /* template length */
4138-+ CK_OBJECT_HANDLE_PTR phKey /* gets new handle */
4139-+ );
4140- #endif
4141-
4142--
4143--
4144- /* Random number generation */
4145-
4146- /* C_SeedRandom mixes additional seed material into the token's
4147-- * random number generator.
4148-- */
4149-+ * random number generator. */
4150- CK_PKCS11_FUNCTION_INFO(C_SeedRandom)
4151- #ifdef CK_NEED_ARG_LIST
4152- (
4153-- CK_SESSION_HANDLE hSession, /* the session's handle */
4154-- CK_BYTE_PTR pSeed, /* the seed material */
4155-- CK_ULONG ulSeedLen /* length of seed material */
4156--);
4157-+ CK_SESSION_HANDLE hSession, /* the session's handle */
4158-+ CK_BYTE_PTR pSeed, /* the seed material */
4159-+ CK_ULONG ulSeedLen /* length of seed material */
4160-+ );
4161- #endif
4162-
4163--
4164- /* C_GenerateRandom generates random data. */
4165- CK_PKCS11_FUNCTION_INFO(C_GenerateRandom)
4166- #ifdef CK_NEED_ARG_LIST
4167- (
4168-- CK_SESSION_HANDLE hSession, /* the session's handle */
4169-- CK_BYTE_PTR RandomData, /* receives the random data */
4170-- CK_ULONG ulRandomLen /* # of bytes to generate */
4171--);
4172-+ CK_SESSION_HANDLE hSession, /* the session's handle */
4173-+ CK_BYTE_PTR RandomData, /* receives the random data */
4174-+ CK_ULONG ulRandomLen /* # of bytes to generate */
4175-+ );
4176- #endif
4177-
4178--
4179--
4180- /* Parallel function management */
4181-
4182- /* C_GetFunctionStatus is a legacy function; it obtains an
4183- * updated status of a function running in parallel with an
4184-- * application.
4185-- */
4186-+ * application. */
4187- CK_PKCS11_FUNCTION_INFO(C_GetFunctionStatus)
4188- #ifdef CK_NEED_ARG_LIST
4189- (
4190-- CK_SESSION_HANDLE hSession /* the session's handle */
4191--);
4192-+ CK_SESSION_HANDLE hSession /* the session's handle */
4193-+ );
4194- #endif
4195-
4196--
4197- /* C_CancelFunction is a legacy function; it cancels a function
4198-- * running in parallel.
4199-- */
4200-+ * running in parallel. */
4201- CK_PKCS11_FUNCTION_INFO(C_CancelFunction)
4202- #ifdef CK_NEED_ARG_LIST
4203- (
4204-- CK_SESSION_HANDLE hSession /* the session's handle */
4205--);
4206-+ CK_SESSION_HANDLE hSession /* the session's handle */
4207-+ );
4208- #endif
4209-
4210-+/* Functions added in for PKCS #11 Version 2.01 or later */
4211-
4212- /* C_WaitForSlotEvent waits for a slot event (token insertion,
4213-- * removal, etc.) to occur.
4214-- */
4215-+ * removal, etc.) to occur. */
4216- CK_PKCS11_FUNCTION_INFO(C_WaitForSlotEvent)
4217- #ifdef CK_NEED_ARG_LIST
4218- (
4219-- CK_FLAGS flags, /* blocking/nonblocking flag */
4220-- CK_SLOT_ID_PTR pSlot, /* location that receives the slot ID */
4221-- CK_VOID_PTR pRserved /* reserved. Should be NULL_PTR */
4222--);
4223-+ CK_FLAGS flags, /* blocking/nonblocking flag */
4224-+ CK_SLOT_ID_PTR pSlot, /* location that receives the slot ID */
4225-+ CK_VOID_PTR pRserved /* reserved. Should be NULL_PTR */
4226-+ );
4227- #endif
4228-
4229--#ifndef CK_PKCS11_2_0_ONLY
4230--/* C_GetInterfaceList returns all the interfaces supported by the module*/
4231-+#if defined(CK_PKCS11_3_0) && !defined(CK_PKCS11_2_0_ONLY)
4232- CK_PKCS11_FUNCTION_INFO(C_GetInterfaceList)
4233- #ifdef CK_NEED_ARG_LIST
4234- (
4235-- CK_INTERFACE_PTR pInterfacesList, /* returned interfaces */
4236-- CK_ULONG_PTR pulCount /* number of interfaces returned */
4237--);
4238-+ CK_INTERFACE_PTR interfaces,
4239-+ CK_ULONG_PTR pulCount);
4240- #endif
4241-
4242--/* C_GetInterface returns a specific interface from the module. */
4243- CK_PKCS11_FUNCTION_INFO(C_GetInterface)
4244- #ifdef CK_NEED_ARG_LIST
4245- (
4246-- CK_UTF8CHAR_PTR pInterfaceName, /* name of the interface */
4247-- CK_VERSION_PTR pVersion, /* version of the interface */
4248-- CK_INTERFACE_PTR_PTR ppInterface, /* returned interface */
4249-- CK_FLAGS flags /* flags controlling the semantics
4250-- * of the interface */
4251--);
4252-+ CK_UTF8CHAR_PTR pInterfaceName,
4253-+ CK_VERSION_PTR pVersion,
4254-+ CK_INTERFACE_PTR_PTR ppInterface,
4255-+ CK_FLAGS flags);
4256- #endif
4257-
4258- CK_PKCS11_FUNCTION_INFO(C_LoginUser)
4259- #ifdef CK_NEED_ARG_LIST
4260- (
4261-- CK_SESSION_HANDLE hSession, /* the session's handle */
4262-- CK_USER_TYPE userType, /* the user type */
4263-- CK_UTF8CHAR_PTR pPin, /* the user's PIN */
4264-- CK_ULONG ulPinLen, /* the length of the PIN */
4265-- CK_UTF8CHAR_PTR pUsername, /* the user's name */
4266-- CK_ULONG ulUsernameLen /*the length of the user's name */
4267--);
4268-+ CK_SESSION_HANDLE hSession,
4269-+ CK_USER_TYPE userType,
4270-+ CK_CHAR_PTR pPin,
4271-+ CK_ULONG ulPinLen,
4272-+ CK_UTF8CHAR_PTR pUsername,
4273-+ CK_ULONG ulUsernameLen);
4274- #endif
4275-
4276- CK_PKCS11_FUNCTION_INFO(C_SessionCancel)
4277- #ifdef CK_NEED_ARG_LIST
4278- (
4279-- CK_SESSION_HANDLE hSession, /* the session's handle */
4280-- CK_FLAGS flags /* flags control which sessions are cancelled */
4281--);
4282-+ CK_SESSION_HANDLE hSession,
4283-+ CK_FLAGS flags);
4284- #endif
4285-
4286- CK_PKCS11_FUNCTION_INFO(C_MessageEncryptInit)
4287- #ifdef CK_NEED_ARG_LIST
4288- (
4289-- CK_SESSION_HANDLE hSession, /* the session's handle */
4290-- CK_MECHANISM_PTR pMechanism, /* the encryption mechanism */
4291-- CK_OBJECT_HANDLE hKey /* handle of encryption key */
4292--);
4293-+ CK_SESSION_HANDLE hSession,
4294-+ CK_MECHANISM_PTR pMechanism,
4295-+ CK_OBJECT_HANDLE hKey);
4296- #endif
4297-
4298- CK_PKCS11_FUNCTION_INFO(C_EncryptMessage)
4299- #ifdef CK_NEED_ARG_LIST
4300- (
4301-- CK_SESSION_HANDLE hSession, /* the session's handle */
4302-- CK_VOID_PTR pParameter, /* message specific parameter */
4303-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4304-- CK_BYTE_PTR pAssociatedData, /* AEAD Associated data */
4305-- CK_ULONG ulAssociatedDataLen, /* AEAD Associated data length */
4306-- CK_BYTE_PTR pPlaintext, /* plain text */
4307-- CK_ULONG ulPlaintextLen, /* plain text length */
4308-- CK_BYTE_PTR pCiphertext, /* gets cipher text */
4309-- CK_ULONG_PTR pulCiphertextLen /* gets cipher text length */
4310--);
4311-+ CK_SESSION_HANDLE hSession,
4312-+ CK_VOID_PTR pParameter,
4313-+ CK_ULONG ulParameterLen,
4314-+ CK_BYTE_PTR pAssociatedData,
4315-+ CK_ULONG ulAssociatedDataLen,
4316-+ CK_BYTE_PTR pPlaintext,
4317-+ CK_ULONG ulPlaintextLen,
4318-+ CK_BYTE_PTR pCiphertext,
4319-+ CK_ULONG_PTR pulCiphertextLen);
4320- #endif
4321-
4322- CK_PKCS11_FUNCTION_INFO(C_EncryptMessageBegin)
4323- #ifdef CK_NEED_ARG_LIST
4324- (
4325-- CK_SESSION_HANDLE hSession, /* the session's handle */
4326-- CK_VOID_PTR pParameter, /* message specific parameter */
4327-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4328-- CK_BYTE_PTR pAssociatedData, /* AEAD Associated data */
4329-- CK_ULONG ulAssociatedDataLen /* AEAD Associated data length */
4330--);
4331-+ CK_SESSION_HANDLE hSession,
4332-+ CK_VOID_PTR pParameter,
4333-+ CK_ULONG ulParameterLen,
4334-+ CK_BYTE_PTR pAssociatedData,
4335-+ CK_ULONG ulAssociatedDataLen);
4336- #endif
4337-
4338- CK_PKCS11_FUNCTION_INFO(C_EncryptMessageNext)
4339- #ifdef CK_NEED_ARG_LIST
4340- (
4341-- CK_SESSION_HANDLE hSession, /* the session's handle */
4342-- CK_VOID_PTR pParameter, /* message specific parameter */
4343-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4344-- CK_BYTE_PTR pPlaintextPart, /* plain text */
4345-- CK_ULONG ulPlaintextPartLen, /* plain text length */
4346-- CK_BYTE_PTR pCiphertextPart, /* gets cipher text */
4347-- CK_ULONG_PTR pulCiphertextPartLen, /* gets cipher text length */
4348-- CK_FLAGS flags /* multi mode flag */
4349--);
4350-+ CK_SESSION_HANDLE hSession,
4351-+ CK_VOID_PTR pParameter,
4352-+ CK_ULONG ulParameterLen,
4353-+ CK_BYTE_PTR pPlaintextPart,
4354-+ CK_ULONG ulPlaintextPartLen,
4355-+ CK_BYTE_PTR pCiphertextPart,
4356-+ CK_ULONG_PTR pulCiphertextPartLen,
4357-+ CK_FLAGS flags);
4358- #endif
4359-
4360- CK_PKCS11_FUNCTION_INFO(C_MessageEncryptFinal)
4361- #ifdef CK_NEED_ARG_LIST
4362- (
4363-- CK_SESSION_HANDLE hSession /* the session's handle */
4364--);
4365-+ CK_SESSION_HANDLE hSession);
4366- #endif
4367-
4368- CK_PKCS11_FUNCTION_INFO(C_MessageDecryptInit)
4369- #ifdef CK_NEED_ARG_LIST
4370- (
4371-- CK_SESSION_HANDLE hSession, /* the session's handle */
4372-- CK_MECHANISM_PTR pMechanism, /* the decryption mechanism */
4373-- CK_OBJECT_HANDLE hKey /* handle of decryption key */
4374--);
4375-+ CK_SESSION_HANDLE hSession,
4376-+ CK_MECHANISM_PTR pMechanism,
4377-+ CK_OBJECT_HANDLE hKey);
4378- #endif
4379-
4380- CK_PKCS11_FUNCTION_INFO(C_DecryptMessage)
4381- #ifdef CK_NEED_ARG_LIST
4382- (
4383-- CK_SESSION_HANDLE hSession, /* the session's handle */
4384-- CK_VOID_PTR pParameter, /* message specific parameter */
4385-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4386-- CK_BYTE_PTR pAssociatedData, /* AEAD Associated data */
4387-- CK_ULONG ulAssociatedDataLen, /* AEAD Associated data length */
4388-- CK_BYTE_PTR pCiphertext, /* cipher text */
4389-- CK_ULONG ulCiphertextLen, /* cipher text length */
4390-- CK_BYTE_PTR pPlaintext, /* gets plain text */
4391-- CK_ULONG_PTR pulPlaintextLen /* gets plain text length */
4392--);
4393-+ CK_SESSION_HANDLE hSession,
4394-+ CK_VOID_PTR pParameter,
4395-+ CK_ULONG ulParameterLen,
4396-+ CK_BYTE_PTR pAssociatedData,
4397-+ CK_ULONG ulAssociatedDataLen,
4398-+ CK_BYTE_PTR pCiphertext,
4399-+ CK_ULONG ulCiphertextLen,
4400-+ CK_BYTE_PTR pPlaintext,
4401-+ CK_ULONG_PTR pulPlaintextLen);
4402- #endif
4403-
4404- CK_PKCS11_FUNCTION_INFO(C_DecryptMessageBegin)
4405- #ifdef CK_NEED_ARG_LIST
4406- (
4407-- CK_SESSION_HANDLE hSession, /* the session's handle */
4408-- CK_VOID_PTR pParameter, /* message specific parameter */
4409-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4410-- CK_BYTE_PTR pAssociatedData, /* AEAD Associated data */
4411-- CK_ULONG ulAssociatedDataLen /* AEAD Associated data length */
4412--);
4413-+ CK_SESSION_HANDLE hSession,
4414-+ CK_VOID_PTR pParameter,
4415-+ CK_ULONG ulParameterLen,
4416-+ CK_BYTE_PTR pAssociatedData,
4417-+ CK_ULONG ulAssociatedDataLen);
4418- #endif
4419-
4420- CK_PKCS11_FUNCTION_INFO(C_DecryptMessageNext)
4421- #ifdef CK_NEED_ARG_LIST
4422- (
4423-- CK_SESSION_HANDLE hSession, /* the session's handle */
4424-- CK_VOID_PTR pParameter, /* message specific parameter */
4425-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4426-- CK_BYTE_PTR pCiphertextPart, /* cipher text */
4427-- CK_ULONG ulCiphertextPartLen, /* cipher text length */
4428-- CK_BYTE_PTR pPlaintextPart, /* gets plain text */
4429-- CK_ULONG_PTR pulPlaintextPartLen, /* gets plain text length */
4430-- CK_FLAGS flags /* multi mode flag */
4431--);
4432-+ CK_SESSION_HANDLE hSession,
4433-+ CK_VOID_PTR pParameter,
4434-+ CK_ULONG ulParameterLen,
4435-+ CK_BYTE_PTR pCiphertextPart,
4436-+ CK_ULONG ulCiphertextPartLen,
4437-+ CK_BYTE_PTR pPlaintextPart,
4438-+ CK_ULONG_PTR pulPlaintextPartLen,
4439-+ CK_FLAGS flags);
4440- #endif
4441-
4442- CK_PKCS11_FUNCTION_INFO(C_MessageDecryptFinal)
4443- #ifdef CK_NEED_ARG_LIST
4444- (
4445-- CK_SESSION_HANDLE hSession /* the session's handle */
4446--);
4447-+ CK_SESSION_HANDLE hSession);
4448- #endif
4449-
4450- CK_PKCS11_FUNCTION_INFO(C_MessageSignInit)
4451- #ifdef CK_NEED_ARG_LIST
4452- (
4453-- CK_SESSION_HANDLE hSession, /* the session's handle */
4454-- CK_MECHANISM_PTR pMechanism, /* the signing mechanism */
4455-- CK_OBJECT_HANDLE hKey /* handle of signing key */
4456--);
4457-+ CK_SESSION_HANDLE hSession,
4458-+ CK_MECHANISM_PTR pMechanism,
4459-+ CK_OBJECT_HANDLE hKey);
4460- #endif
4461-
4462- CK_PKCS11_FUNCTION_INFO(C_SignMessage)
4463- #ifdef CK_NEED_ARG_LIST
4464- (
4465-- CK_SESSION_HANDLE hSession, /* the session's handle */
4466-- CK_VOID_PTR pParameter, /* message specific parameter */
4467-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4468-- CK_BYTE_PTR pData, /* data to sign */
4469-- CK_ULONG ulDataLen, /* data to sign length */
4470-- CK_BYTE_PTR pSignature, /* gets signature */
4471-- CK_ULONG_PTR pulSignatureLen /* gets signature length */
4472--);
4473-+ CK_SESSION_HANDLE hSession,
4474-+ CK_VOID_PTR pParameter,
4475-+ CK_ULONG ulParameterLen,
4476-+ CK_BYTE_PTR pData,
4477-+ CK_ULONG ulDataLen,
4478-+
4479-+ CK_BYTE_PTR pSignature,
4480-+ CK_ULONG_PTR pulSignatureLen);
4481- #endif
4482-
4483- CK_PKCS11_FUNCTION_INFO(C_SignMessageBegin)
4484- #ifdef CK_NEED_ARG_LIST
4485- (
4486-- CK_SESSION_HANDLE hSession, /* the session's handle */
4487-- CK_VOID_PTR pParameter, /* message specific parameter */
4488-- CK_ULONG ulParameterLen /* length of message specific parameter */
4489--);
4490-+ CK_SESSION_HANDLE hSession,
4491-+ CK_VOID_PTR pParameter,
4492-+ CK_ULONG ulParameterLen);
4493- #endif
4494-
4495- CK_PKCS11_FUNCTION_INFO(C_SignMessageNext)
4496- #ifdef CK_NEED_ARG_LIST
4497- (
4498-- CK_SESSION_HANDLE hSession, /* the session's handle */
4499-- CK_VOID_PTR pParameter, /* message specific parameter */
4500-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4501-- CK_BYTE_PTR pData, /* data to sign */
4502-- CK_ULONG ulDataLen, /* data to sign length */
4503-- CK_BYTE_PTR pSignature, /* gets signature */
4504-- CK_ULONG_PTR pulSignatureLen /* gets signature length */
4505--);
4506-+ CK_SESSION_HANDLE hSession,
4507-+ CK_VOID_PTR pParameter,
4508-+ CK_ULONG ulParameterLen,
4509-+ CK_BYTE_PTR pData,
4510-+ CK_ULONG ulDataLen,
4511-+ CK_BYTE_PTR pSignature,
4512-+ CK_ULONG_PTR pulSignatureLen);
4513- #endif
4514-
4515- CK_PKCS11_FUNCTION_INFO(C_MessageSignFinal)
4516- #ifdef CK_NEED_ARG_LIST
4517- (
4518-- CK_SESSION_HANDLE hSession /* the session's handle */
4519--);
4520-+ CK_SESSION_HANDLE hSession);
4521- #endif
4522-
4523- CK_PKCS11_FUNCTION_INFO(C_MessageVerifyInit)
4524- #ifdef CK_NEED_ARG_LIST
4525- (
4526-- CK_SESSION_HANDLE hSession, /* the session's handle */
4527-- CK_MECHANISM_PTR pMechanism, /* the signing mechanism */
4528-- CK_OBJECT_HANDLE hKey /* handle of signing key */
4529--);
4530-+ CK_SESSION_HANDLE hSession,
4531-+ CK_MECHANISM_PTR pMechanism,
4532-+ CK_OBJECT_HANDLE hKey);
4533- #endif
4534-
4535- CK_PKCS11_FUNCTION_INFO(C_VerifyMessage)
4536- #ifdef CK_NEED_ARG_LIST
4537- (
4538-- CK_SESSION_HANDLE hSession, /* the session's handle */
4539-- CK_VOID_PTR pParameter, /* message specific parameter */
4540-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4541-- CK_BYTE_PTR pData, /* data to sign */
4542-- CK_ULONG ulDataLen, /* data to sign length */
4543-- CK_BYTE_PTR pSignature, /* signature */
4544-- CK_ULONG ulSignatureLen /* signature length */
4545--);
4546-+ CK_SESSION_HANDLE hSession,
4547-+ CK_VOID_PTR pParameter,
4548-+ CK_ULONG ulParameterLen,
4549-+ CK_BYTE_PTR pData,
4550-+ CK_ULONG ulDataLen,
4551-+ CK_BYTE_PTR pSignature,
4552-+ CK_ULONG ulSignatureLen);
4553- #endif
4554-
4555- CK_PKCS11_FUNCTION_INFO(C_VerifyMessageBegin)
4556- #ifdef CK_NEED_ARG_LIST
4557- (
4558-- CK_SESSION_HANDLE hSession, /* the session's handle */
4559-- CK_VOID_PTR pParameter, /* message specific parameter */
4560-- CK_ULONG ulParameterLen /* length of message specific parameter */
4561--);
4562-+ CK_SESSION_HANDLE hSession,
4563-+ CK_VOID_PTR pParameter,
4564-+ CK_ULONG ulParameterLen);
4565- #endif
4566-
4567- CK_PKCS11_FUNCTION_INFO(C_VerifyMessageNext)
4568- #ifdef CK_NEED_ARG_LIST
4569- (
4570-- CK_SESSION_HANDLE hSession, /* the session's handle */
4571-- CK_VOID_PTR pParameter, /* message specific parameter */
4572-- CK_ULONG ulParameterLen, /* length of message specific parameter */
4573-- CK_BYTE_PTR pData, /* data to sign */
4574-- CK_ULONG ulDataLen, /* data to sign length */
4575-- CK_BYTE_PTR pSignature, /* signature */
4576-- CK_ULONG ulSignatureLen /* signature length */
4577--);
4578-+ CK_SESSION_HANDLE hSession,
4579-+ CK_VOID_PTR pParameter,
4580-+ CK_ULONG ulParameterLen,
4581-+ CK_BYTE_PTR pData,
4582-+ CK_ULONG ulDataLen,
4583-+ CK_BYTE_PTR pSignature,
4584-+ CK_ULONG ulSignatureLen);
4585- #endif
4586-
4587- CK_PKCS11_FUNCTION_INFO(C_MessageVerifyFinal)
4588- #ifdef CK_NEED_ARG_LIST
4589- (
4590-- CK_SESSION_HANDLE hSession /* the session's handle */
4591--);
4592-+ CK_SESSION_HANDLE hSession);
4593- #endif
4594-
4595--#endif /* CK_PKCS11_2_0_ONLY */
4596--
4597-+#endif
4598---- /dev/null
4599-+++ b/src/jdk.crypto.cryptoki/share/native/libj2pkcs11/pkcs11n.h
4600-@@ -0,0 +1,672 @@
4601-+/* This Source Code Form is subject to the terms of the Mozilla Public
4602-+ * License, v. 2.0. If a copy of the MPL was not distributed with this
4603-+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4604-+
4605-+#ifndef _PKCS11N_H_
4606-+#define _PKCS11N_H_
4607-+
4608-+/*
4609-+ * pkcs11n.h
4610-+ *
4611-+ * This file contains the NSS-specific type definitions for Cryptoki
4612-+ * (PKCS#11).
4613-+ */
4614-+
4615-+/*
4616-+ * NSSCK_VENDOR_NSS
4617-+ *
4618-+ * Cryptoki reserves the high half of all the number spaces for
4619-+ * vendor-defined use. I'd like to keep all of our NSS-
4620-+ * specific values together, but not in the oh-so-obvious
4621-+ * 0x80000001, 0x80000002, etc. area. So I've picked an offset,
4622-+ * and constructed values for the beginnings of our spaces.
4623-+ *
4624-+ * Note that some "historical" Netscape values don't fall within
4625-+ * this range.
4626-+ */
4627-+#define NSSCK_VENDOR_NSS 0x4E534350 /* NSCP */
4628-+
4629-+/*
4630-+ * NSS-defined object classes
4631-+ *
4632-+ */
4633-+#define CKO_NSS (CKO_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4634-+
4635-+#define CKO_NSS_CRL (CKO_NSS + 1)
4636-+#define CKO_NSS_SMIME (CKO_NSS + 2)
4637-+#define CKO_NSS_TRUST (CKO_NSS + 3)
4638-+#define CKO_NSS_BUILTIN_ROOT_LIST (CKO_NSS + 4)
4639-+#define CKO_NSS_NEWSLOT (CKO_NSS + 5)
4640-+#define CKO_NSS_DELSLOT (CKO_NSS + 6)
4641-+
4642-+/*
4643-+ * NSS-defined key types
4644-+ *
4645-+ */
4646-+#define CKK_NSS (CKK_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4647-+
4648-+#define CKK_NSS_PKCS8 (CKK_NSS + 1)
4649-+
4650-+#define CKK_NSS_JPAKE_ROUND1 (CKK_NSS + 2)
4651-+#define CKK_NSS_JPAKE_ROUND2 (CKK_NSS + 3)
4652-+
4653-+#define CKK_NSS_CHACHA20 (CKK_NSS + 4)
4654-+
4655-+/*
4656-+ * NSS-defined certificate types
4657-+ *
4658-+ */
4659-+#define CKC_NSS (CKC_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4660-+
4661-+/* FAKE PKCS #11 defines */
4662-+#define CKA_DIGEST 0x81000000L
4663-+#define CKA_NSS_MESSAGE 0x82000000L
4664-+#define CKA_NSS_MESSAGE_MASK 0xff000000L
4665-+#define CKA_FLAGS_ONLY 0 /* CKA_CLASS */
4666-+
4667-+/*
4668-+ * NSS-defined object attributes
4669-+ *
4670-+ */
4671-+#define CKA_NSS (CKA_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4672-+
4673-+#define CKA_NSS_URL (CKA_NSS + 1)
4674-+#define CKA_NSS_EMAIL (CKA_NSS + 2)
4675-+#define CKA_NSS_SMIME_INFO (CKA_NSS + 3)
4676-+#define CKA_NSS_SMIME_TIMESTAMP (CKA_NSS + 4)
4677-+#define CKA_NSS_PKCS8_SALT (CKA_NSS + 5)
4678-+#define CKA_NSS_PASSWORD_CHECK (CKA_NSS + 6)
4679-+#define CKA_NSS_EXPIRES (CKA_NSS + 7)
4680-+#define CKA_NSS_KRL (CKA_NSS + 8)
4681-+
4682-+#define CKA_NSS_PQG_COUNTER (CKA_NSS + 20)
4683-+#define CKA_NSS_PQG_SEED (CKA_NSS + 21)
4684-+#define CKA_NSS_PQG_H (CKA_NSS + 22)
4685-+#define CKA_NSS_PQG_SEED_BITS (CKA_NSS + 23)
4686-+#define CKA_NSS_MODULE_SPEC (CKA_NSS + 24)
4687-+#define CKA_NSS_OVERRIDE_EXTENSIONS (CKA_NSS + 25)
4688-+
4689-+#define CKA_NSS_JPAKE_SIGNERID (CKA_NSS + 26)
4690-+#define CKA_NSS_JPAKE_PEERID (CKA_NSS + 27)
4691-+#define CKA_NSS_JPAKE_GX1 (CKA_NSS + 28)
4692-+#define CKA_NSS_JPAKE_GX2 (CKA_NSS + 29)
4693-+#define CKA_NSS_JPAKE_GX3 (CKA_NSS + 30)
4694-+#define CKA_NSS_JPAKE_GX4 (CKA_NSS + 31)
4695-+#define CKA_NSS_JPAKE_X2 (CKA_NSS + 32)
4696-+#define CKA_NSS_JPAKE_X2S (CKA_NSS + 33)
4697-+
4698-+#define CKA_NSS_MOZILLA_CA_POLICY (CKA_NSS + 34)
4699-+#define CKA_NSS_SERVER_DISTRUST_AFTER (CKA_NSS + 35)
4700-+#define CKA_NSS_EMAIL_DISTRUST_AFTER (CKA_NSS + 36)
4701-+
4702-+/*
4703-+ * Trust attributes:
4704-+ *
4705-+ * If trust goes standard, these probably will too. So I'll
4706-+ * put them all in one place.
4707-+ */
4708-+
4709-+#define CKA_TRUST (CKA_NSS + 0x2000)
4710-+
4711-+/* "Usage" key information */
4712-+#define CKA_TRUST_DIGITAL_SIGNATURE (CKA_TRUST + 1)
4713-+#define CKA_TRUST_NON_REPUDIATION (CKA_TRUST + 2)
4714-+#define CKA_TRUST_KEY_ENCIPHERMENT (CKA_TRUST + 3)
4715-+#define CKA_TRUST_DATA_ENCIPHERMENT (CKA_TRUST + 4)
4716-+#define CKA_TRUST_KEY_AGREEMENT (CKA_TRUST + 5)
4717-+#define CKA_TRUST_KEY_CERT_SIGN (CKA_TRUST + 6)
4718-+#define CKA_TRUST_CRL_SIGN (CKA_TRUST + 7)
4719-+
4720-+/* "Purpose" trust information */
4721-+#define CKA_TRUST_SERVER_AUTH (CKA_TRUST + 8)
4722-+#define CKA_TRUST_CLIENT_AUTH (CKA_TRUST + 9)
4723-+#define CKA_TRUST_CODE_SIGNING (CKA_TRUST + 10)
4724-+#define CKA_TRUST_EMAIL_PROTECTION (CKA_TRUST + 11)
4725-+#define CKA_TRUST_IPSEC_END_SYSTEM (CKA_TRUST + 12)
4726-+#define CKA_TRUST_IPSEC_TUNNEL (CKA_TRUST + 13)
4727-+#define CKA_TRUST_IPSEC_USER (CKA_TRUST + 14)
4728-+#define CKA_TRUST_TIME_STAMPING (CKA_TRUST + 15)
4729-+#define CKA_TRUST_STEP_UP_APPROVED (CKA_TRUST + 16)
4730-+
4731-+#define CKA_CERT_SHA1_HASH (CKA_TRUST + 100)
4732-+#define CKA_CERT_MD5_HASH (CKA_TRUST + 101)
4733-+
4734-+/* NSS trust stuff */
4735-+
4736-+/* HISTORICAL: define used to pass in the database key for DSA private keys */
4737-+#define CKA_NSS_DB 0xD5A0DB00L
4738-+#define CKA_NSS_TRUST 0x80000001L
4739-+
4740-+/* FAKE PKCS #11 defines */
4741-+#define CKM_FAKE_RANDOM 0x80000efeUL
4742-+#define CKM_INVALID_MECHANISM 0xffffffffUL
4743-+#define CKT_INVALID_TYPE 0xffffffffUL
4744-+
4745-+/*
4746-+ * NSS-defined crypto mechanisms
4747-+ *
4748-+ */
4749-+#define CKM_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4750-+
4751-+#define CKM_NSS_AES_KEY_WRAP (CKM_NSS + 1)
4752-+#define CKM_NSS_AES_KEY_WRAP_PAD (CKM_NSS + 2)
4753-+
4754-+/* HKDF key derivation mechanisms. See CK_NSS_HKDFParams for documentation. */
4755-+#define CKM_NSS_HKDF_SHA1 (CKM_NSS + 3)
4756-+#define CKM_NSS_HKDF_SHA256 (CKM_NSS + 4)
4757-+#define CKM_NSS_HKDF_SHA384 (CKM_NSS + 5)
4758-+#define CKM_NSS_HKDF_SHA512 (CKM_NSS + 6)
4759-+
4760-+/* J-PAKE round 1 key generation mechanisms.
4761-+ *
4762-+ * Required template attributes: CKA_PRIME, CKA_SUBPRIME, CKA_BASE,
4763-+ * CKA_NSS_JPAKE_SIGNERID
4764-+ * Output key type: CKK_NSS_JPAKE_ROUND1
4765-+ * Output key class: CKO_PRIVATE_KEY
4766-+ * Parameter type: CK_NSS_JPAKERound1Params
4767-+ *
4768-+ */
4769-+#define CKM_NSS_JPAKE_ROUND1_SHA1 (CKM_NSS + 7)
4770-+#define CKM_NSS_JPAKE_ROUND1_SHA256 (CKM_NSS + 8)
4771-+#define CKM_NSS_JPAKE_ROUND1_SHA384 (CKM_NSS + 9)
4772-+#define CKM_NSS_JPAKE_ROUND1_SHA512 (CKM_NSS + 10)
4773-+
4774-+/* J-PAKE round 2 key derivation mechanisms.
4775-+ *
4776-+ * Required template attributes: CKA_NSS_JPAKE_PEERID
4777-+ * Input key type: CKK_NSS_JPAKE_ROUND1
4778-+ * Output key type: CKK_NSS_JPAKE_ROUND2
4779-+ * Output key class: CKO_PRIVATE_KEY
4780-+ * Parameter type: CK_NSS_JPAKERound2Params
4781-+ */
4782-+#define CKM_NSS_JPAKE_ROUND2_SHA1 (CKM_NSS + 11)
4783-+#define CKM_NSS_JPAKE_ROUND2_SHA256 (CKM_NSS + 12)
4784-+#define CKM_NSS_JPAKE_ROUND2_SHA384 (CKM_NSS + 13)
4785-+#define CKM_NSS_JPAKE_ROUND2_SHA512 (CKM_NSS + 14)
4786-+
4787-+/* J-PAKE final key material derivation mechanisms
4788-+ *
4789-+ * Input key type: CKK_NSS_JPAKE_ROUND2
4790-+ * Output key type: CKK_GENERIC_SECRET
4791-+ * Output key class: CKO_SECRET_KEY
4792-+ * Parameter type: CK_NSS_JPAKEFinalParams
4793-+ *
4794-+ * You must apply a KDF (e.g. CKM_NSS_HKDF_*) to resultant keying material
4795-+ * to get a key with uniformly distributed bits.
4796-+ */
4797-+#define CKM_NSS_JPAKE_FINAL_SHA1 (CKM_NSS + 15)
4798-+#define CKM_NSS_JPAKE_FINAL_SHA256 (CKM_NSS + 16)
4799-+#define CKM_NSS_JPAKE_FINAL_SHA384 (CKM_NSS + 17)
4800-+#define CKM_NSS_JPAKE_FINAL_SHA512 (CKM_NSS + 18)
4801-+
4802-+/* Constant-time MAC mechanisms:
4803-+ *
4804-+ * These operations verify a padded, MAC-then-encrypt block of data in
4805-+ * constant-time. Because of the order of operations, the padding bytes are not
4806-+ * protected by the MAC. However, disclosing the value of the padding bytes
4807-+ * gives an attacker the ability to decrypt ciphertexts. Such disclosure can be
4808-+ * as subtle as taking slightly less time to perform the MAC when the padding
4809-+ * is one byte longer. See https://www.isg.rhul.ac.uk/tls/
4810-+ *
4811-+ * CKM_NSS_HMAC_CONSTANT_TIME: performs an HMAC authentication.
4812-+ * CKM_NSS_SSL3_MAC_CONSTANT_TIME: performs an authentication with SSLv3 MAC.
4813-+ *
4814-+ * Parameter type: CK_NSS_MAC_CONSTANT_TIME_PARAMS
4815-+ */
4816-+#define CKM_NSS_HMAC_CONSTANT_TIME (CKM_NSS + 19)
4817-+#define CKM_NSS_SSL3_MAC_CONSTANT_TIME (CKM_NSS + 20)
4818-+
4819-+/* TLS 1.2 mechanisms */
4820-+#define CKM_NSS_TLS_PRF_GENERAL_SHA256 (CKM_NSS + 21)
4821-+#define CKM_NSS_TLS_MASTER_KEY_DERIVE_SHA256 (CKM_NSS + 22)
4822-+#define CKM_NSS_TLS_KEY_AND_MAC_DERIVE_SHA256 (CKM_NSS + 23)
4823-+#define CKM_NSS_TLS_MASTER_KEY_DERIVE_DH_SHA256 (CKM_NSS + 24)
4824-+
4825-+/* TLS extended master secret derivation */
4826-+#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE (CKM_NSS + 25)
4827-+#define CKM_NSS_TLS_EXTENDED_MASTER_KEY_DERIVE_DH (CKM_NSS + 26)
4828-+
4829-+#define CKM_NSS_CHACHA20_KEY_GEN (CKM_NSS + 27)
4830-+#define CKM_NSS_CHACHA20_POLY1305 (CKM_NSS + 28)
4831-+
4832-+/* Additional PKCS #12 PBE algorithms defined in v1.1 */
4833-+#define CKM_NSS_PKCS12_PBE_SHA224_HMAC_KEY_GEN (CKM_NSS + 29)
4834-+#define CKM_NSS_PKCS12_PBE_SHA256_HMAC_KEY_GEN (CKM_NSS + 30)
4835-+#define CKM_NSS_PKCS12_PBE_SHA384_HMAC_KEY_GEN (CKM_NSS + 31)
4836-+#define CKM_NSS_PKCS12_PBE_SHA512_HMAC_KEY_GEN (CKM_NSS + 32)
4837-+
4838-+#define CKM_NSS_CHACHA20_CTR (CKM_NSS + 33)
4839-+
4840-+/* IKE mechanism (to be proposed to PKCS #11 */
4841-+#define CKM_NSS_IKE_PRF_PLUS_DERIVE (CKM_NSS + 34)
4842-+#define CKM_NSS_IKE_PRF_DERIVE (CKM_NSS + 35)
4843-+#define CKM_NSS_IKE1_PRF_DERIVE (CKM_NSS + 36)
4844-+#define CKM_NSS_IKE1_APP_B_PRF_DERIVE (CKM_NSS + 37)
4845-+
4846-+#define CKM_NSS_PUB_FROM_PRIV (CKM_NSS + 40)
4847-+
4848-+/* SP800-108 NSS mechanism with support for data object derivation */
4849-+#define CKM_NSS_SP800_108_COUNTER_KDF_DERIVE_DATA (CKM_NSS + 42)
4850-+#define CKM_NSS_SP800_108_FEEDBACK_KDF_DERIVE_DATA (CKM_NSS + 43)
4851-+#define CKM_NSS_SP800_108_DOUBLE_PIPELINE_KDF_DERIVE_DATA (CKM_NSS + 44)
4852-+
4853-+/*
4854-+ * HISTORICAL:
4855-+ * Do not attempt to use these. They are only used by NSS's internal
4856-+ * PKCS #11 interface. Most of these are place holders for other mechanism
4857-+ * and will change in the future.
4858-+ */
4859-+#define CKM_NSS_PBE_SHA1_DES_CBC 0x80000002UL
4860-+#define CKM_NSS_PBE_SHA1_TRIPLE_DES_CBC 0x80000003UL
4861-+#define CKM_NSS_PBE_SHA1_40_BIT_RC2_CBC 0x80000004UL
4862-+#define CKM_NSS_PBE_SHA1_128_BIT_RC2_CBC 0x80000005UL
4863-+#define CKM_NSS_PBE_SHA1_40_BIT_RC4 0x80000006UL
4864-+#define CKM_NSS_PBE_SHA1_128_BIT_RC4 0x80000007UL
4865-+#define CKM_NSS_PBE_SHA1_FAULTY_3DES_CBC 0x80000008UL
4866-+#define CKM_NSS_PBE_SHA1_HMAC_KEY_GEN 0x80000009UL
4867-+#define CKM_NSS_PBE_MD5_HMAC_KEY_GEN 0x8000000aUL
4868-+#define CKM_NSS_PBE_MD2_HMAC_KEY_GEN 0x8000000bUL
4869-+
4870-+#define CKM_TLS_PRF_GENERAL 0x80000373UL
4871-+
4872-+typedef struct CK_NSS_JPAKEPublicValue {
4873-+ CK_BYTE *pGX;
4874-+ CK_ULONG ulGXLen;
4875-+ CK_BYTE *pGV;
4876-+ CK_ULONG ulGVLen;
4877-+ CK_BYTE *pR;
4878-+ CK_ULONG ulRLen;
4879-+} CK_NSS_JPAKEPublicValue;
4880-+
4881-+typedef struct CK_NSS_JPAKERound1Params {
4882-+ CK_NSS_JPAKEPublicValue gx1; /* out */
4883-+ CK_NSS_JPAKEPublicValue gx2; /* out */
4884-+} CK_NSS_JPAKERound1Params;
4885-+
4886-+typedef struct CK_NSS_JPAKERound2Params {
4887-+ CK_BYTE *pSharedKey; /* in */
4888-+ CK_ULONG ulSharedKeyLen; /* in */
4889-+ CK_NSS_JPAKEPublicValue gx3; /* in */
4890-+ CK_NSS_JPAKEPublicValue gx4; /* in */
4891-+ CK_NSS_JPAKEPublicValue A; /* out */
4892-+} CK_NSS_JPAKERound2Params;
4893-+
4894-+typedef struct CK_NSS_JPAKEFinalParams {
4895-+ CK_NSS_JPAKEPublicValue B; /* in */
4896-+} CK_NSS_JPAKEFinalParams;
4897-+
4898-+/* macAlg: the MAC algorithm to use. This determines the hash function used in
4899-+ * the HMAC/SSLv3 MAC calculations.
4900-+ * ulBodyTotalLen: the total length of the data, including padding bytes and
4901-+ * padding length.
4902-+ * pHeader: points to a block of data that contains additional data to
4903-+ * authenticate. For TLS this includes the sequence number etc. For SSLv3,
4904-+ * this also includes the initial padding bytes.
4905-+ *
4906-+ * NOTE: the softoken's implementation of CKM_NSS_HMAC_CONSTANT_TIME and
4907-+ * CKM_NSS_SSL3_MAC_CONSTANT_TIME requires that the sum of ulBodyTotalLen
4908-+ * and ulHeaderLen be much smaller than 2^32 / 8 bytes because it uses an
4909-+ * unsigned int variable to represent the length in bits. This should not
4910-+ * be a problem because the SSL/TLS protocol limits the size of an SSL
4911-+ * record to something considerably less than 2^32 bytes.
4912-+ */
4913-+typedef struct CK_NSS_MAC_CONSTANT_TIME_PARAMS {
4914-+ CK_MECHANISM_TYPE macAlg; /* in */
4915-+ CK_ULONG ulBodyTotalLen; /* in */
4916-+ CK_BYTE *pHeader; /* in */
4917-+ CK_ULONG ulHeaderLen; /* in */
4918-+} CK_NSS_MAC_CONSTANT_TIME_PARAMS;
4919-+
4920-+typedef struct CK_NSS_AEAD_PARAMS {
4921-+ CK_BYTE_PTR pNonce;
4922-+ CK_ULONG ulNonceLen;
4923-+ CK_BYTE_PTR pAAD;
4924-+ CK_ULONG ulAADLen;
4925-+ CK_ULONG ulTagLen;
4926-+} CK_NSS_AEAD_PARAMS;
4927-+
4928-+/*
4929-+ * NSS-defined return values
4930-+ *
4931-+ */
4932-+#define CKR_NSS (CKM_VENDOR_DEFINED | NSSCK_VENDOR_NSS)
4933-+
4934-+#define CKR_NSS_CERTDB_FAILED (CKR_NSS + 1)
4935-+#define CKR_NSS_KEYDB_FAILED (CKR_NSS + 2)
4936-+
4937-+/* Mandatory parameter for the CKM_NSS_HKDF_* key deriviation mechanisms.
4938-+ See RFC 5869.
4939-+
4940-+ bExtract: If set, HKDF-Extract will be applied to the input key. If
4941-+ the optional salt is given, it is used; otherwise, the salt is
4942-+ set to a sequence of zeros equal in length to the HMAC output.
4943-+ If bExpand is not set, then the key template given to
4944-+ C_DeriveKey must indicate an output key size less than or equal
4945-+ to the output size of the HMAC.
4946-+
4947-+ bExpand: If set, HKDF-Expand will be applied to the input key (if
4948-+ bExtract is not set) or to the result of HKDF-Extract (if
4949-+ bExtract is set). Any info given in the optional pInfo field will
4950-+ be included in the calculation.
4951-+
4952-+ The size of the output key must be specified in the template passed to
4953-+ C_DeriveKey.
4954-+*/
4955-+typedef struct CK_NSS_HKDFParams {
4956-+ CK_BBOOL bExtract;
4957-+ CK_BYTE_PTR pSalt;
4958-+ CK_ULONG ulSaltLen;
4959-+ CK_BBOOL bExpand;
4960-+ CK_BYTE_PTR pInfo;
4961-+ CK_ULONG ulInfoLen;
4962-+} CK_NSS_HKDFParams;
4963-+
4964-+/*
4965-+ * CK_NSS_IKE_PRF_PLUS_PARAMS is a structure that provides the parameters to
4966-+ * the CKM_NSS_IKE_PRF_PLUS_DERIVE mechanism.
4967-+ * The fields of the structure have the following meanings:
4968-+ * prfMechanism underlying MAC mechanism used to generate the prf.
4969-+ * bHasSeedKey hSeed key is present.
4970-+ * hSeedKey optional seed from key
4971-+ * pSeedData optional seed from data.
4972-+ * ulSeedDataLen length of optional seed data.
4973-+ * If no seed data is present this value is NULL.
4974-+ */
4975-+typedef struct CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS {
4976-+ CK_MECHANISM_TYPE prfMechanism;
4977-+ CK_BBOOL bHasSeedKey;
4978-+ CK_OBJECT_HANDLE hSeedKey;
4979-+ CK_BYTE_PTR pSeedData;
4980-+ CK_ULONG ulSeedDataLen;
4981-+} CK_NSS_IKE_PRF_PLUS_DERIVE_PARAMS;
4982-+
4983-+/* CK_NSS_IKE_PRF_DERIVE_PARAMS is a structure that provides the parameters to
4984-+ * the CKM_NSS_IKE_PRF_DERIVE mechanism.
4985-+ *
4986-+ * The fields of the structure have the following meanings:
4987-+ * prfMechanism underlying MAC mechanism used to generate the prf.
4988-+ * bRekey hNewKey is present.
4989-+ * pNi Ni value
4990-+ * ulNiLen length of Ni
4991-+ * pNr Nr value
4992-+ * ulNrLen length of Nr
4993-+ * hNewKey New key value to drive the rekey.
4994-+ */
4995-+typedef struct CK_NSS_IKE_PRF_DERIVE_PARAMS {
4996-+ CK_MECHANISM_TYPE prfMechanism;
4997-+ CK_BBOOL bDataAsKey;
4998-+ CK_BBOOL bRekey;
4999-+ CK_BYTE_PTR pNi;
5000-+ CK_ULONG ulNiLen;
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches