Skip to content
This repository has been archived by the owner on May 29, 2024. It is now read-only.

Commit

Permalink
[GR-44462] Merge in tag jdk-11.0.19+5.
Browse files Browse the repository at this point in the history
PullRequest: labsjdk-ce-11/331
  • Loading branch information
marwan-hallaoui committed Mar 13, 2023
2 parents e7e07d4 + 8d95393 commit 8103e7f
Show file tree
Hide file tree
Showing 102 changed files with 12,046 additions and 1,802 deletions.
29 changes: 29 additions & 0 deletions make/data/cacerts/certignaca
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Owner: CN=Certigna, O=Dhimyotis, C=FR
Issuer: CN=Certigna, O=Dhimyotis, C=FR
Serial number: fedce3010fc948ff
Valid from: Fri Jun 29 15:13:05 GMT 2007 until: Tue Jun 29 15:13:05 GMT 2027
Signature algorithm name: SHA1withRSA
Subject Public Key Algorithm: 2048-bit RSA key
Version: 3
-----BEGIN CERTIFICATE-----
MIIDqDCCApCgAwIBAgIJAP7c4wEPyUj/MA0GCSqGSIb3DQEBBQUAMDQxCzAJBgNV
BAYTAkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hMB4X
DTA3MDYyOTE1MTMwNVoXDTI3MDYyOTE1MTMwNVowNDELMAkGA1UEBhMCRlIxEjAQ
BgNVBAoMCURoaW15b3RpczERMA8GA1UEAwwIQ2VydGlnbmEwggEiMA0GCSqGSIb3
DQEBAQUAA4IBDwAwggEKAoIBAQDIaPHJ1tazNHUmgh7stL7qXOEm7RFHYeGifBZ4
QCHkYJ5ayGPhxLGWkv8YbWkj4Sti993iNi+RB7lIzw7sebYs5zRLcAglozyHGxny
gQcPOJAZ0xH+hrTy0V4eHpbNgGzOOzGTtvKg0KmVEn2lmsxryIRWijOp5yIVUxbw
zBfsV1/pogqYCd7jX5xv3EjjhQsVWqa6n6xI4wmy9/Qy3l40vhx4XUJbzg4ij02Q
130yGLMLLGq/jj8UEYkgDncUtT2UCIf3JR7VsmAA7G8qKCVuKj4YYxclPz5EIBb2
JsglrgVKtOdjLPOMFlN+XPsRGgjBRmKfIrjxwo1p3Po6WAbfAgMBAAGjgbwwgbkw
DwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUGu3+QTmQtCRZvgHyUtVF9lo53BEw
ZAYDVR0jBF0wW4AUGu3+QTmQtCRZvgHyUtVF9lo53BGhOKQ2MDQxCzAJBgNVBAYT
AkZSMRIwEAYDVQQKDAlEaGlteW90aXMxETAPBgNVBAMMCENlcnRpZ25hggkA/tzj
AQ/JSP8wDgYDVR0PAQH/BAQDAgEGMBEGCWCGSAGG+EIBAQQEAwIABzANBgkqhkiG
9w0BAQUFAAOCAQEAhQMeknH2Qq/ho2Ge6/PAD/Kl1NqV5ta+aDY9fm4fTIrv0Q8h
bV6lUmPOEvjvKtpv6zf+EwLHyzs+ImvaYS5/1HI93TDhHkxAGYwP15zRgzB7mFnc
fca5DClMoTOi62c6ZYTTluLtdkVwj7Ur3vkj1kluPBS1xp81HlDQwY9qcEQCYsuu
HWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY1gkIl2PlwS6w
t0QmwCbAr1UwnjvVNioZBPRcHv/PLLf/0P2HQBHVESO7SMAhqaQoLf0V+LBOK/Qw
WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg==
-----END CERTIFICATE-----
15 changes: 8 additions & 7 deletions make/gensrc/GensrcBuffer.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ define SetupGenBuffer
endif

$$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
$(TOOL_SPP) < $$($1_SRC) > $$($1_OUT).tmp \
$(RM) $$($1_OUT).tmp
$(TOOL_SPP) -i$$($1_SRC) -o$$($1_OUT).tmp \
-K$$($1_type) \
-K$$($1_category) \
-K$$($1_streams) \
Expand Down Expand Up @@ -260,12 +261,12 @@ define SetupGenBuffer
ifeq ($$($1_BIN), 1)
$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
$(RM) $$($1_OUT)
$$($1_char_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_short_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_int_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_long_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_float_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_double_CMD) < $$($1_SRC_BIN) >> $$($1_DST).tmp
$$($1_char_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_short_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_int_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
$(PRINTF) "}\n" >> $$($1_DST).tmp
mv $$($1_DST).tmp $$($1_DST)
endif
Expand Down
6 changes: 3 additions & 3 deletions make/gensrc/GensrcCharsetCoder.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
-$(RM) $@.tmp
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_decoder, \
$(TOOL_SPP) < $< >$@.tmp \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kdecoder \
-DA='A' \
-Da='a' \
Expand Down Expand Up @@ -71,9 +71,9 @@ GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java

$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
$(MKDIR) -p $(@D)
-$(RM) $@.tmp
$(RM) $@.tmp
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_encoder, \
$(TOOL_SPP) < $< >$@.tmp \
$(TOOL_SPP) -i$< -o$@.tmp \
-Kencoder \
-DA='An' \
-Da='an' \
Expand Down
6 changes: 4 additions & 2 deletions make/gensrc/GensrcVarHandles.gmk
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ define GenerateVarHandle
$$(eval $1_type := $$$$(shell $(TR) '[:upper:]' '[:lower:]' <<< $$$$($1_Type)))
endif
$$(call MakeDir, $$(@D))
$(RM) $$@
$(TOOL_SPP) -nel -K$$($1_type) -Dtype=$$($1_type) -DType=$$($1_Type) \
$$($1_ARGS) < $$< > $$@
$$($1_ARGS) -i$$< -o$$@

GENSRC_VARHANDLES += $$($1_FILENAME)
endef
Expand Down Expand Up @@ -147,10 +148,11 @@ define GenerateVarHandleByteArray

$$($1_FILENAME): $(VARHANDLES_SRC_DIR)/X-VarHandleByteArrayView.java.template $(BUILD_TOOLS_JDK)
$$(call MakeDir, $$(@D))
$(RM) $$@
$(TOOL_SPP) -nel -K$$($1_type) \
-Dtype=$$($1_type) -DType=$$($1_Type) -DBoxType=$$($1_BoxType) \
-DrawType=$$($1_rawType) -DRawType=$$($1_RawType) -DRawBoxType=$$($1_RawBoxType) \
$$($1_ARGS) < $$< > $$@
$$($1_ARGS) -i$$< -o$$@

GENSRC_VARHANDLES += $$($1_FILENAME)
endef
Expand Down
23 changes: 18 additions & 5 deletions make/jdk/src/classes/build/tools/spp/Spp.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2008, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand All @@ -25,14 +25,17 @@

package build.tools.spp;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.*;
import java.util.regex.*;

/*
* Spp: A simple regex-based stream preprocessor based on Mark Reinhold's
* sed-based spp.sh
*
* Usage: java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... <in >out
* Usage:
* java build.tools.spp.Spp [-be] [-nel] [-Kkey] -Dvar=value ... -iin -oout
*
* If -nel is declared then empty lines will not be substituted for lines of
* text in the template that do not appear in the output.
Expand Down Expand Up @@ -69,13 +72,19 @@ public static void main(String args[]) throws Exception {
Set<String> keys = new HashSet<>();
boolean be = false;
boolean el = true;
String inputFile = null;
String outputFile = null;

for (String arg:args) {
if (arg.startsWith("-D")) {
int i = arg.indexOf('=');
vars.put(arg.substring(2, i),arg.substring(i+1));
} else if (arg.startsWith("-K")) {
keys.add(arg.substring(2));
} else if (arg.startsWith("-i")) {
inputFile = arg.substring(2);
} else if (arg.startsWith("-o")) {
outputFile = arg.substring(2);
} else if ("-be".equals(arg)) {
be = true;
} else if ("-nel".equals(arg)) {
Expand All @@ -87,17 +96,17 @@ public static void main(String args[]) throws Exception {
}

StringBuffer out = new StringBuffer();
new Spp().spp(new Scanner(System.in),
new Spp().spp(new Scanner(new FileInputStream(inputFile)),
out, "",
keys, vars, be, el,
false);
System.out.print(out.toString());
new FileOutputStream(outputFile, true).write(out.toString().getBytes());
}

static final String LNSEP = System.getProperty("line.separator");
static final String KEY = "([a-zA-Z0-9]+)";
static final String VAR = "([a-zA-Z0-9_\\-]+)";
static final String TEXT = "([a-zA-Z0-9&;,.<>/#() \\?\\[\\]\\$]+)"; // $ -- hack embedded $var$
static final String TEXT = "([\\p{Print}&&[^{#:}]]+)";

static final int GN_NOT = 1;
static final int GN_KEY = 2;
Expand Down Expand Up @@ -131,6 +140,10 @@ void append(StringBuffer buf, String ln,
}
}
}
if (repl == null) {
System.err.println("Error: undefined variable in line " + ln);
System.exit(-1);
}
vardef.appendReplacement(buf, repl);
}
vardef.appendTail(buf);
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/jfr/recorder/service/jfrRecorderService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ class RotationLock : public StackObj {
static int64_t write_checkpoint_event_prologue(JfrChunkWriter& cw, u8 type_id) {
const int64_t last_cp_offset = cw.last_checkpoint_offset();
const int64_t delta_to_last_checkpoint = 0 == last_cp_offset ? 0 : last_cp_offset - cw.current_offset();
cw.reserve(sizeof(u4));
cw.reserve(sizeof(u8));
cw.write<u8>(EVENT_CHECKPOINT);
cw.write(JfrTicks::now());
cw.write((int64_t)0); // duration
Expand Down Expand Up @@ -176,7 +176,7 @@ class WriteCheckpointEvent : public StackObj {
assert(number_of_elements > 0, "invariant");
assert(_cw.current_offset() > num_elements_offset, "invariant");
_cw.write_padded_at_offset<u4>(number_of_elements, num_elements_offset);
_cw.write_padded_at_offset<u4>((u4)_cw.current_offset() - current_cp_offset, current_cp_offset);
_cw.write_padded_at_offset<u8>((u8)(_cw.current_offset() - current_cp_offset), current_cp_offset);
// update writer with last checkpoint position
_cw.set_last_checkpoint_offset(current_cp_offset);
return true;
Expand Down
94 changes: 38 additions & 56 deletions src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

package sun.security.ssl;

import java.io.*;
import java.io.FileInputStream;
import java.net.Socket;
import java.security.*;
import java.security.cert.*;
Expand Down Expand Up @@ -571,9 +571,7 @@ private abstract static class AbstractTLSContext extends SSLContextImpl {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30,
ProtocolVersion.SSL20Hello
ProtocolVersion.TLS10
});
}

Expand Down Expand Up @@ -617,26 +615,6 @@ SSLEngine createSSLEngineImpl(String host, int port) {
boolean isDTLS() {
return false;
}

static ProtocolVersion[] getSupportedProtocols() {
if (SunJSSE.isFIPS()) {
return new ProtocolVersion[] {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
} else {
return new ProtocolVersion[]{
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30,
ProtocolVersion.SSL20Hello
};
}
}
}

/*
Expand All @@ -657,8 +635,7 @@ public static final class TLS10Context extends AbstractTLSContext {
} else {
clientDefaultProtocols = getAvailableProtocols(
new ProtocolVersion[] {
ProtocolVersion.TLS10,
ProtocolVersion.SSL30
ProtocolVersion.TLS10
});
}

Expand Down Expand Up @@ -697,8 +674,7 @@ public static final class TLS11Context extends AbstractTLSContext {
clientDefaultProtocols = getAvailableProtocols(
new ProtocolVersion[] {
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30
ProtocolVersion.TLS10
});
}

Expand Down Expand Up @@ -740,8 +716,7 @@ public static final class TLS12Context extends AbstractTLSContext {
new ProtocolVersion[] {
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30
ProtocolVersion.TLS10
});
}

Expand Down Expand Up @@ -784,8 +759,7 @@ public static final class TLS13Context extends AbstractTLSContext {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30
ProtocolVersion.TLS10
});
}

Expand Down Expand Up @@ -934,9 +908,39 @@ private static List<ProtocolVersion> customizedProtocols(
ProtocolVersion[] candidates;
if (refactored.isEmpty()) {
if (client) {
candidates = getProtocols();
// default client protocols
if (SunJSSE.isFIPS()) {
candidates = new ProtocolVersion[] {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
} else {
candidates = new ProtocolVersion[] {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
}
} else {
candidates = getSupportedProtocols();
// default server protocols
if (SunJSSE.isFIPS()) {
candidates = new ProtocolVersion[] {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
} else {
candidates = new ProtocolVersion[] {
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
}
}
} else {
// Use the customized TLS protocols.
Expand All @@ -947,25 +951,6 @@ private static List<ProtocolVersion> customizedProtocols(
return getAvailableProtocols(candidates);
}

static ProtocolVersion[] getProtocols() {
if (SunJSSE.isFIPS()) {
return new ProtocolVersion[]{
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10
};
} else {
return new ProtocolVersion[]{
ProtocolVersion.TLS13,
ProtocolVersion.TLS12,
ProtocolVersion.TLS11,
ProtocolVersion.TLS10,
ProtocolVersion.SSL30
};
}
}

protected CustomizedTLSContext() {
if (reservedException != null) {
throw reservedException;
Expand All @@ -991,8 +976,6 @@ List<CipherSuite> getClientDefaultCipherSuites() {
List<CipherSuite> getServerDefaultCipherSuites() {
return serverDefaultCipherSuites;
}


}

/*
Expand Down Expand Up @@ -1243,7 +1226,6 @@ private abstract static class AbstractDTLSContext extends SSLContextImpl {
private static final List<CipherSuite> serverDefaultCipherSuites;

static {
// Both DTLSv1.0 and DTLSv1.2 can be used in FIPS mode.
supportedProtocols = Arrays.asList(
ProtocolVersion.DTLS12,
ProtocolVersion.DTLS10
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/legal/zlib.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
## zlib v1.2.11
## zlib v1.2.13

### zlib License
<pre>

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
Expand Down
Loading

0 comments on commit 8103e7f

Please sign in to comment.