提交 e95ef7a9 编写于 作者: L lana

Merge

...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
tzdata2015a tzdata2015b
...@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male ...@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # was at the start of 2008-03-31 (the day of Steffen Thorsen's report);
# this is almost surely wrong. # this is almost surely wrong.
# From Ganbold Tsagaankhuu (2015-03-10):
# It seems like yesterday Mongolian Government meeting has concluded to use
# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of
# March 2015, daylight saving time starts. And 00:00AM of last Saturday of
# September daylight saving time ends. Source:
# http://zasag.mn/news/view/8969
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 - Rule Mongol 1983 only - Oct 1 0:00 0 -
...@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - ...@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 -
Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S
Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2001 2006 - Sep lastSat 2:00 0 -
Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S
Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S
Rule Mongol 2015 max - Sep lastSat 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
...@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 ...@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# official source...: # official source...:
# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
# From Paul Eggert (2013-09-24): # From Steffen Thorsen (2015-03-03):
# For future dates, guess the last Thursday in March at 24:00 through # Sources such as http://www.alquds.com/news/article/view/id/548257
# the first Friday on or after September 21 at 00:00. This is consistent with # and http://www.raya.ps/ar/news/890705.html say Palestine areas will
# the predictions in today's editions of the following URLs, # start DST on 2015-03-28 00:00 which is one day later than expected.
# which are for Gaza and Hebron respectively: #
# http://www.timeanddate.com/worldclock/timezone.html?n=702 # From Paul Eggert (2015-03-03):
# http://www.timeanddate.com/worldclock/timezone.html?n=2364 # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
# says that the fall 2014 transition was Oct 23 at 24:00.
# For future dates, guess the last Friday in March at 24:00 through
# the first Friday on or after October 21 at 00:00. This is consistent with
# the predictions in today's editions of the following URLs:
# http://www.timeanddate.com/time/change/gaza-strip/gaza
# http://www.timeanddate.com/time/change/west-bank/hebron
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
...@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S ...@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S
Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 1 0:00 0 -
Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Aug 30 0:00 1:00 S
Rule Palestine 2011 only - Sep 30 0:00 0 - Rule Palestine 2011 only - Sep 30 0:00 0 -
Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S
Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2012 only - Sep 21 1:00 0 -
Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
Rule Palestine 2014 max - Oct Fri>=21 0:00 0 -
Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
......
...@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31 ...@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
9:39:00 - LMT 1901 # Agana 9:39:00 - LMT 1901 # Agana
10:00 - GST 2000 Dec 23 # Guam 10:00 - GST 2000 Dec 23 # Guam
10:00 - ChST # Chamorro Standard Time 10:00 - ChST # Chamorro Standard Time
Link Pacific/Guam Pacific/Saipan # N Mariana Is
# Kiribati # Kiribati
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901 ...@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901
14:00 - LINT 14:00 - LINT
# N Mariana Is # N Mariana Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See Pacific/Guam.
Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31
9:43:00 - LMT 1901
9:00 - MPT 1969 Oct # N Mariana Is Time
10:00 - MPT 2000 Dec 23
10:00 - ChST # Chamorro Standard Time
# Marshall Is # Marshall Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 ...@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - NST 1967 Apr # N=Nome -11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering -11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa -11:00 - SST # S=Samoa
Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Samoa (formerly and also known as Western Samoa) # Samoa (formerly and also known as Western Samoa)
...@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 ...@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# uninhabited # uninhabited
# Midway # Midway
# # See Pacific/Pago_Pago.
# From Mark Brader (2005-01-23):
# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
# reproduced a Pan American Airways timetable from 1936, for their weekly
# "Orient Express" flights between San Francisco and Manila, and connecting
# flights to Chicago and the US East Coast. As it uses some time zone
# designations that I've never seen before:....
# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
#
Zone Pacific/Midway -11:49:28 - LMT 1901
-11:00 - NST 1956 Jun 3
-11:00 1:00 NDT 1956 Sep 2
-11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
# Palmyra # Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritimati # uninhabited since World War II; was probably like Pacific/Kiritimati
......
...@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 ...@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T
3:00 Russia VOL%sT 1991 Mar 31 2:00s 3:00 Russia VOL%sT 1991 Mar 31 2:00s
4:00 - VOLT 1992 Mar 29 2:00s 4:00 - VOLT 1992 Mar 29 2:00s
3:00 Russia MSK 2011 Mar 27 2:00s 3:00 Russia MSK/MSD 2011 Mar 27 2:00s
4:00 - MSK 2014 Oct 26 2:00s 4:00 - MSK 2014 Oct 26 2:00s
3:00 - MSK 3:00 - MSK
......
...@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 ...@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# "...the new time zone will come into effect at two o'clock on the first Sunday # "...the new time zone will come into effect at two o'clock on the first Sunday
# of February, when we will have to advance the clock one hour from its current # of February, when we will have to advance the clock one hour from its current
# time..." # time..."
#
# Also, the new zone will not use DST. # Also, the new zone will not use DST.
#
# From Carlos Raúl Perasso (2015-02-02):
# The decree that modifies the Mexican Hour System Law has finally
# been published at the Diario Oficial de la Federación
# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015
# It establishes 5 zones for Mexico:
# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W,
# includes most of Mexico, excluding what's mentioned below.
# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the
# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía
# de Banderas which lies in Central Zone); Sinaloa and Sonora.
# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the
# state of Baja California.
# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state
# of Quintana Roo.
# 5- The islands, reefs and keys shall take their timezone from the
# longitude they are located at.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Feb 5 0:00 1:00 D
...@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 ...@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
############################################################################### ###############################################################################
# Anguilla # Anguilla
# See America/Port_of_Spain.
# Antigua and Barbuda # Antigua and Barbuda
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See America/Port_of_Spain.
Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
-5:00 - EST 1951
-4:00 - AST
# Bahamas # Bahamas
# #
...@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton ...@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
-4:00 US A%sT -4:00 US A%sT
# Cayman Is # Cayman Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See America/Panama.
Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST
# Costa Rica # Costa Rica
...@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890 ...@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890
Zone America/Panama -5:18:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST -5:00 - EST
Link America/Panama America/Cayman
# Puerto Rico # Puerto Rico
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
......
...@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 ...@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
# From Juan Correa (2015-01-28): # From Eduardo Romero Urra (2015-03-03):
# ... today the Ministry of Energy announced that Chile will drop DST, will keep # Today has been published officially that Chile will use the DST time
# "summer time" (UTC -3 / UTC -5) all year round.... # permanently until March 25 of 2017
# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html # http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg
#
# From Paul Eggert (2015-03-03):
# For now, assume that the extension will persist indefinitely.
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the # NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file. # 'antarctica' file.
...@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890 ...@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890
-3:00 - CLT -3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890 Zone Pacific/Easter -7:17:44 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time -7:17:28 - EMT 1932 Sep # Easter Mean Time
-7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time
-6:00 Chile EAS%sT 2015 Apr 26 3:00u -6:00 Chile EAS%sT 2015 Apr 26 3:00u
-5:00 - EAST -5:00 - EAST
# #
...@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 ...@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
# These all agree with Trinidad and Tobago since 1970. # These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla Link America/Port_of_Spain America/Anguilla
Link America/Port_of_Spain America/Antigua
Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe Link America/Port_of_Spain America/Guadeloupe
......
...@@ -140,7 +140,8 @@ public final class KeychainStore extends KeyStoreSpi { ...@@ -140,7 +140,8 @@ public final class KeychainStore extends KeyStoreSpi {
* password to recover it. * password to recover it.
* *
* @param alias the alias name * @param alias the alias name
* @param password the password for recovering the key * @param password the password for recovering the key. This password is
* used internally as the key is exported in a PKCS12 format.
* *
* @return the requested key, or null if the given alias does not exist * @return the requested key, or null if the given alias does not exist
* or does not identify a <i>key entry</i>. * or does not identify a <i>key entry</i>.
...@@ -155,6 +156,20 @@ public final class KeychainStore extends KeyStoreSpi { ...@@ -155,6 +156,20 @@ public final class KeychainStore extends KeyStoreSpi {
{ {
permissionCheck(); permissionCheck();
// An empty password is rejected by MacOS API, no private key data
// is exported. If no password is passed (as is the case when
// this implementation is used as browser keystore in various
// deployment scenarios like Webstart, JFX and applets), create
// a dummy password so MacOS API is happy.
if (password == null || password.length == 0) {
// Must not be a char array with only a 0, as this is an empty
// string.
if (random == null) {
random = new SecureRandom();
}
password = Long.toString(random.nextLong()).toCharArray();
}
Object entry = entries.get(alias.toLowerCase()); Object entry = entries.get(alias.toLowerCase());
if (entry == null || !(entry instanceof KeyEntry)) { if (entry == null || !(entry instanceof KeyEntry)) {
......
...@@ -504,7 +504,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy ...@@ -504,7 +504,10 @@ public class ContainerOrderFocusTraversalPolicy extends FocusTraversalPolicy
} else if (comp instanceof Container && comp != aContainer) { } else if (comp instanceof Container && comp != aContainer) {
Container cont = (Container)comp; Container cont = (Container)comp;
if (cont.isFocusTraversalPolicyProvider()) { if (cont.isFocusTraversalPolicyProvider()) {
return cont.getFocusTraversalPolicy().getLastComponent(cont); Component retComp = cont.getFocusTraversalPolicy().getLastComponent(cont);
if (retComp != null) {
return retComp;
}
} }
} }
} }
......
...@@ -481,6 +481,8 @@ class ZipEntry implements ZipConstants, Cloneable { ...@@ -481,6 +481,8 @@ class ZipEntry implements ZipConstants, Cloneable {
} }
break; break;
case EXTID_NTFS: case EXTID_NTFS:
if (sz < 32) // reserved 4 bytes + tag 2 bytes + size 2 bytes
break; // m[a|c]time 24 bytes
int pos = off + 4; // reserved 4 bytes int pos = off + 4; // reserved 4 bytes
if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24) if (get16(extra, pos) != 0x0001 || get16(extra, pos + 2) != 24)
break; break;
......
...@@ -566,7 +566,10 @@ public class SortingFocusTraversalPolicy ...@@ -566,7 +566,10 @@ public class SortingFocusTraversalPolicy
} else if (comp instanceof Container && comp != aContainer) { } else if (comp instanceof Container && comp != aContainer) {
Container cont = (Container)comp; Container cont = (Container)comp;
if (cont.isFocusTraversalPolicyProvider()) { if (cont.isFocusTraversalPolicyProvider()) {
return cont.getFocusTraversalPolicy().getLastComponent(cont); Component retComp = cont.getFocusTraversalPolicy().getLastComponent(cont);
if (retComp != null) {
return retComp;
}
} }
} }
} }
......
...@@ -90,6 +90,7 @@ final class SessionManager { ...@@ -90,6 +90,7 @@ final class SessionManager {
// maximum number of active sessions during this invocation, for debugging // maximum number of active sessions during this invocation, for debugging
private int maxActiveSessions; private int maxActiveSessions;
private Object maxActiveSessionsLock;
// flags to use in the C_OpenSession() call // flags to use in the C_OpenSession() call
private final long openSessionFlags; private final long openSessionFlags;
...@@ -113,6 +114,9 @@ final class SessionManager { ...@@ -113,6 +114,9 @@ final class SessionManager {
this.token = token; this.token = token;
this.objSessions = new Pool(this); this.objSessions = new Pool(this);
this.opSessions = new Pool(this); this.opSessions = new Pool(this);
if (debug != null) {
maxActiveSessionsLock = new Object();
}
} }
// returns whether only a fairly low number of sessions are // returns whether only a fairly low number of sessions are
...@@ -212,7 +216,7 @@ final class SessionManager { ...@@ -212,7 +216,7 @@ final class SessionManager {
Session session = new Session(token, id); Session session = new Session(token, id);
activeSessions.incrementAndGet(); activeSessions.incrementAndGet();
if (debug != null) { if (debug != null) {
synchronized(this) { synchronized(maxActiveSessionsLock) {
if (activeSessions.get() > maxActiveSessions) { if (activeSessions.get() > maxActiveSessions) {
maxActiveSessions = activeSessions.get(); maxActiveSessions = activeSessions.get();
if (maxActiveSessions % 10 == 0) { if (maxActiveSessions % 10 == 0) {
......
...@@ -625,6 +625,15 @@ public final class ZoneInfoFile { ...@@ -625,6 +625,15 @@ public final class ZoneInfoFile {
params[2] = 5; params[2] = 5;
params[3] = 86400000; params[3] = 86400000;
} }
// Additional check for startDayOfWeek=6 and starTime=86400000
// is needed for Asia/Amman; Asia/Gasa and Asia/Hebron
if (params[2] == 7 && params[3] == 0 &&
(zoneId.equals("Asia/Amman") ||
zoneId.equals("Asia/Gaza") ||
zoneId.equals("Asia/Hebron"))) {
params[2] = 6; // Friday
params[3] = 86400000; // 24h
}
//endDayOfWeek and endTime workaround //endDayOfWeek and endTime workaround
if (params[7] == 6 && params[8] == 0 && if (params[7] == 6 && params[8] == 0 &&
(zoneId.equals("Africa/Cairo"))) { (zoneId.equals("Africa/Cairo"))) {
......
...@@ -2252,6 +2252,8 @@ public class ZipFileSystem extends FileSystem { ...@@ -2252,6 +2252,8 @@ public class ZipFileSystem extends FileSystem {
} }
break; break;
case EXTID_NTFS: case EXTID_NTFS:
if (sz < 32)
break;
pos += 4; // reserved 4 bytes pos += 4; // reserved 4 bytes
if (SH(extra, pos) != 0x0001) if (SH(extra, pos) != 0x0001)
break; break;
......
...@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 ...@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
# #
# Example: # Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3 jdk.tls.disabledAlgorithms=SSLv3, RC4
...@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 ...@@ -500,4 +500,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
# #
# Example: # Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3 jdk.tls.disabledAlgorithms=SSLv3, RC4
...@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 ...@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
# #
# Example: # Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3 jdk.tls.disabledAlgorithms=SSLv3, RC4
...@@ -502,4 +502,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 ...@@ -502,4 +502,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
# #
# Example: # Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3 jdk.tls.disabledAlgorithms=SSLv3, RC4
...@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024 ...@@ -503,4 +503,4 @@ jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024
# #
# Example: # Example:
# jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048 # jdk.tls.disabledAlgorithms=MD5, SSLv3, DSA, RSA keySize < 2048
jdk.tls.disabledAlgorithms=SSLv3 jdk.tls.disabledAlgorithms=SSLv3, RC4
...@@ -814,10 +814,32 @@ public final class XToolkit extends UNIXToolkit implements Runnable { ...@@ -814,10 +814,32 @@ public final class XToolkit extends UNIXToolkit implements Runnable {
// managers don't set this hint correctly, so we just get intersection with windowBounds // managers don't set this hint correctly, so we just get intersection with windowBounds
if (windowBounds != null && windowBounds.intersects(screenBounds)) if (windowBounds != null && windowBounds.intersects(screenBounds))
{ {
insets.left = Math.max((int)Native.getLong(native_ptr, 0), insets.left); int left = (int)Native.getLong(native_ptr, 0);
insets.right = Math.max((int)Native.getLong(native_ptr, 1), insets.right); int right = (int)Native.getLong(native_ptr, 1);
insets.top = Math.max((int)Native.getLong(native_ptr, 2), insets.top); int top = (int)Native.getLong(native_ptr, 2);
insets.bottom = Math.max((int)Native.getLong(native_ptr, 3), insets.bottom); int bottom = (int)Native.getLong(native_ptr, 3);
/*
* struts could be relative to root window bounds, so
* make them relative to the screen bounds in this case
*/
left = rootBounds.x + left > screenBounds.x ?
rootBounds.x + left - screenBounds.x : 0;
right = rootBounds.x + rootBounds.width - right <
screenBounds.x + screenBounds.width ?
screenBounds.x + screenBounds.width -
(rootBounds.x + rootBounds.width - right) : 0;
top = rootBounds.y + top > screenBounds.y ?
rootBounds.y + top - screenBounds.y : 0;
bottom = rootBounds.y + rootBounds.height - bottom <
screenBounds.y + screenBounds.height ?
screenBounds.y + screenBounds.height -
(rootBounds.y + rootBounds.height - bottom) : 0;
insets.left = Math.max(left, insets.left);
insets.right = Math.max(right, insets.right);
insets.top = Math.max(top, insets.top);
insets.bottom = Math.max(bottom, insets.bottom);
} }
} }
} }
......
/* /*
* Copyright (c) 2003, 2005, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -22,11 +22,16 @@ ...@@ -22,11 +22,16 @@
*/ */
/* /*
* * @test
*
* @bug 4858522 * @bug 4858522
* @summary Basic unit test of OperatingSystemMXBean.getTotalSwapSpaceSize() * @summary Basic unit test of OperatingSystemMXBean.getTotalSwapSpaceSize()
*
* @library /lib/testlibrary
* @build TestTotalSwap jdk.testlibrary.*
* @run main TestTotalSwap
*
* @author Steve Bohne * @author Steve Bohne
* @author Jaroslav Bachorik
*/ */
/* /*
...@@ -50,9 +55,13 @@ ...@@ -50,9 +55,13 @@
import com.sun.management.OperatingSystemMXBean; import com.sun.management.OperatingSystemMXBean;
import java.lang.management.*; import java.lang.management.*;
public class GetTotalSwapSpaceSize { import jdk.testlibrary.OSInfo;
import jdk.testlibrary.ProcessTools;
import jdk.testlibrary.OutputAnalyzer;
public class TestTotalSwap {
private static OperatingSystemMXBean mbean = private static final OperatingSystemMXBean mbean =
(com.sun.management.OperatingSystemMXBean) (com.sun.management.OperatingSystemMXBean)
ManagementFactory.getOperatingSystemMXBean(); ManagementFactory.getOperatingSystemMXBean();
...@@ -62,19 +71,9 @@ public class GetTotalSwapSpaceSize { ...@@ -62,19 +71,9 @@ public class GetTotalSwapSpaceSize {
private static long min_size_for_pass = 0; private static long min_size_for_pass = 0;
private static final long MAX_SIZE_FOR_PASS = Long.MAX_VALUE; private static final long MAX_SIZE_FOR_PASS = Long.MAX_VALUE;
private static boolean trace = false; public static void main(String args[]) throws Throwable {
public static void main(String args[]) throws Exception {
if (args.length > 1 && args[1].equals("trace")) {
trace = true;
}
long expected_swap_size = 0;
if (args.length < 1 || args.length > 2) {
throw new IllegalArgumentException("Unexpected number of args " + args.length);
}
long expected_swap_size = getSwapSizeFromOs();
long min_size = mbean.getFreeSwapSpaceSize(); long min_size = mbean.getFreeSwapSpaceSize();
if (min_size > 0) { if (min_size > 0) {
...@@ -83,12 +82,9 @@ public class GetTotalSwapSpaceSize { ...@@ -83,12 +82,9 @@ public class GetTotalSwapSpaceSize {
long size = mbean.getTotalSwapSpaceSize(); long size = mbean.getTotalSwapSpaceSize();
if (trace) { System.out.println("Total swap space size in bytes: " + size);
System.out.println("Total swap space size in bytes: " + size);
}
if (!args[0].matches("sanity-only")) { if (expected_swap_size > -1) {
expected_swap_size = Long.parseLong(args[0]);
if (size != expected_swap_size) { if (size != expected_swap_size) {
throw new RuntimeException("Expected total swap size : " + throw new RuntimeException("Expected total swap size : " +
expected_swap_size + expected_swap_size +
...@@ -97,6 +93,7 @@ public class GetTotalSwapSpaceSize { ...@@ -97,6 +93,7 @@ public class GetTotalSwapSpaceSize {
} }
} }
// sanity check
if (size < min_size_for_pass || size > MAX_SIZE_FOR_PASS) { if (size < min_size_for_pass || size > MAX_SIZE_FOR_PASS) {
throw new RuntimeException("Total swap space size " + throw new RuntimeException("Total swap space size " +
"illegal value: " + size + " bytes " + "illegal value: " + size + " bytes " +
...@@ -106,4 +103,60 @@ public class GetTotalSwapSpaceSize { ...@@ -106,4 +103,60 @@ public class GetTotalSwapSpaceSize {
System.out.println("Test passed."); System.out.println("Test passed.");
} }
private static long getSwapSizeFromOs() throws Throwable {
OSInfo.OSType os = OSInfo.getOSType();
switch (os) {
// total used free shared buffers cached
// Mem: 16533540864 13638467584 2895073280 534040576 1630248960 6236909568
// -/+ buffers/cache: 5771309056 10762231808
// Swap: 15999168512 0 15999168512
case LINUX: {
String swapSizeStr = ProcessTools.executeCommand("free", "-b")
.firstMatch("Swap:\\s+([0-9]+)\\s+.*", 1);
return Long.parseLong(swapSizeStr);
}
case SOLARIS: {
// swapfile dev swaplo blocks free
// /dev/dsk/c0t0d0s1 136,1 16 1638608 1600528
OutputAnalyzer out= ProcessTools.executeCommand(
"/usr/sbin/swap",
"-l"
);
long swapSize = 0;
for (String line : out.asLines()) {
if (line.contains("swapfile")) continue;
String[] vals = line.split("\\s+");
if (vals.length == 5) {
swapSize += Long.parseLong(vals[3]) * 512; // size is reported in 512b blocks
}
}
return swapSize;
}
case MACOSX: {
// total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
String swapSizeStr = ProcessTools.executeCommand(
"/usr/sbin/sysctl",
"-n",
"vm.swapusage"
).firstMatch("total\\s+=\\s+([0-9]+(\\.[0-9]+)?[Mm]?).*", 1);
if (swapSizeStr.toLowerCase().endsWith("m")) {
swapSizeStr = swapSizeStr.substring(0, swapSizeStr.length() - 1);
return (long)(Double.parseDouble(swapSizeStr) * 1024 * 1024); // size in MB
}
return (long)(Double.parseDouble(swapSizeStr) * 1024 * 1024);
}
default: {
System.err.println("Unsupported operating system: " + os);
}
}
return -1;
}
} }
#
# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License version 2 only, as
# published by the Free Software Foundation.
#
# This code is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# version 2 for more details (a copy is included in the LICENSE file that
# accompanied this code).
#
# You should have received a copy of the GNU General Public License version
# 2 along with this work; if not, write to the Free Software Foundation,
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
# or visit www.oracle.com if you need additional information or have any
# questions.
#
#
# @test
# @summary Tests MM getTotalSwapSpaceSize() api.
# @author Swamy V
# @bug 6252770
#
# @run build GetTotalSwapSpaceSize
# @run shell TestTotalSwap.sh
#
#
# This test tests the actual swap size on linux and solaris.
# On windows this is just a sanity check and correct size should
# be checked manually:
#
# Windows NT/XP/2000:
# 1. Run Start->Accessories->System Tools->System Information.
# 2. The value (reported in Kbytes) is in the "Page File Space" entry
# Windows 98/ME:
# Unknown.
#
#set -x
#Set appropriate jdk
#
if [ ! -z "${TESTJAVA}" ] ; then
jdk="$TESTJAVA"
else
echo "--Error: TESTJAVA must be defined as the pathname of a jdk to test."
exit 1
fi
runOne()
{
echo "runOne $@"
$TESTJAVA/bin/java ${TESTVMOPTS} -classpath $TESTCLASSES $@ || exit 3
}
solaris_swap_size()
{
total_swap=0
for i in `/usr/sbin/swap -l | awk '{print $4}' | grep -v blocks`
do
# swap -l returns size in blocks of 512 bytes.
total_swap=`expr $i \* 512 + $total_swap`
done
}
# Test GetTotalSwapSpaceSize if we are running on Unix
total_swap=0
case `uname -s` in
SunOS )
solaris_swap_size
runOne GetTotalSwapSpaceSize $total_swap
;;
Linux )
total_swap=`free -b | grep -i swap | awk '{print $2}'`
runOne GetTotalSwapSpaceSize $total_swap
;;
Darwin )
# $ sysctl -n vm.swapusage
# total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
swap=`/usr/sbin/sysctl -n vm.swapusage | awk '{ print $3 }' | awk -F . '{ print $1 }'` || exit 2
total_swap=`expr $swap \* 1024 \* 1024` || exit 2
runOne GetTotalSwapSpaceSize $total_swap
;;
* )
runOne GetTotalSwapSpaceSize "sanity-only"
;;
esac
exit 0
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @bug 8073453
* @summary Focus doesn't move when pressing Shift + Tab keys
* @author Dmitry Markov
* @compile AWTFocusTransitionTest.java
* @run main/othervm AWTFocusTransitionTest
*/
import sun.awt.SunToolkit;
import java.awt.*;
import java.awt.event.KeyEvent;
public class AWTFocusTransitionTest {
private static SunToolkit toolkit;
private static Robot robot;
private static Frame frame;
private static TextField textField;
private static Button button;
public static void main(String[] args) throws Exception {
toolkit = (SunToolkit)Toolkit.getDefaultToolkit();
robot = new Robot();
robot.setAutoDelay(50);
try {
createAndShowGUI();
toolkit.realSync();
checkFocusOwner(textField);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
toolkit.realSync();
checkFocusOwner(button);
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_SHIFT);
toolkit.realSync();
checkFocusOwner(textField);
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_SHIFT);
toolkit.realSync();
checkFocusOwner(button);
} finally {
if (frame != null) {
frame.dispose();
}
}
System.out.println("Test Passed!");
}
private static void createAndShowGUI() {
frame = new Frame("AWTFocusTransitionTest");
frame.setSize(300, 300);
frame.setFocusTraversalPolicyProvider(true);
frame.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
textField = new TextField();
button = new Button();
Panel panel = new Panel();
panel.setFocusTraversalPolicyProvider(true);
panel.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
Panel p = new Panel();
p.setLayout(new GridLayout(3, 1));
p.add(textField);
p.add(button);
p.add(panel);
frame.add(p);
frame.setVisible(true);
}
private static void checkFocusOwner(Component component) {
if (component != frame.getFocusOwner()) {
throw new RuntimeException("Test Failed! Incorrect focus owner: " + frame.getFocusOwner() +
", but expected: " + component);
}
}
}
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* @test
* @bug 8073453
* @summary Focus doesn't move when pressing Shift + Tab keys
* @author Dmitry Markov
* @compile SwingFocusTransitionTest.java
* @run main/othervm SwingFocusTransitionTest
*/
import sun.awt.SunToolkit;
import javax.swing.*;
import java.awt.*;
import java.awt.event.KeyEvent;
public class SwingFocusTransitionTest {
private static SunToolkit toolkit;
private static Robot robot;
private static JFrame frame;
private static JTextField textField;
private static JButton button;
public static void main(String[] args) throws Exception {
toolkit = (SunToolkit)Toolkit.getDefaultToolkit();
robot = new Robot();
robot.setAutoDelay(50);
try {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
createAndShowGUI();
}
});
toolkit.realSync();
checkFocusOwner(textField);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
toolkit.realSync();
checkFocusOwner(button);
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_SHIFT);
toolkit.realSync();
checkFocusOwner(textField);
robot.keyPress(KeyEvent.VK_SHIFT);
robot.keyPress(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_TAB);
robot.keyRelease(KeyEvent.VK_SHIFT);
toolkit.realSync();
checkFocusOwner(button);
} finally {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
if (frame != null) {
frame.dispose();
}
}
});
}
System.out.println("Test Passed!");
}
private static void createAndShowGUI() {
frame = new JFrame("SwingFocusTransitionTest");
frame.setSize(300, 300);
frame.setFocusTraversalPolicyProvider(true);
frame.setFocusTraversalPolicy(new LayoutFocusTraversalPolicy());
textField = new JTextField();
button = new JButton();
JPanel panel = new JPanel();
panel.setFocusTraversalPolicyProvider(true);
panel.setFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
JPanel p = new JPanel();
p.setLayout(new GridLayout(3, 1));
p.add(textField);
p.add(button);
p.add(panel);
frame.add(p);
frame.setVisible(true);
}
private static void checkFocusOwner(final Component component) throws Exception {
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
if (component != frame.getFocusOwner()) {
throw new RuntimeException("Test Failed! Incorrect focus owner: " + frame.getFocusOwner() +
", but expected: " + component);
}
}
});
}
}
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
@test
@bug 8020443
@summary Frame is not created on the specified GraphicsDevice with two
monitors
@author Oleg Pekhovskiy
@run main MultiScreenInsetsTest
*/
import java.awt.Frame;
import java.awt.GraphicsConfiguration;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.Toolkit;
import sun.awt.OSInfo;
public class MultiScreenInsetsTest {
private static final int SIZE = 100;
public static void main(String[] args) throws InterruptedException {
OSInfo.OSType type = OSInfo.getOSType();
if (type != OSInfo.OSType.LINUX && type != OSInfo.OSType.SOLARIS) {
System.out.println("This test is for Solaris and Linux only..." +
"skipping!");
return;
}
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice[] gds = ge.getScreenDevices();
if (gds.length < 2) {
System.out.println("It's a multi-screen test... skipping!");
return;
}
for (int screen = 0; screen < gds.length; ++screen) {
GraphicsDevice gd = gds[screen];
GraphicsConfiguration gc = gd.getDefaultConfiguration();
Rectangle bounds = gc.getBounds();
Insets insets = Toolkit.getDefaultToolkit().getScreenInsets(gc);
Frame frame = new Frame(gc);
frame.setLocation(bounds.x + (bounds.width - SIZE) / 2,
bounds.y + (bounds.height - SIZE) / 2);
frame.setSize(SIZE, SIZE);
frame.setUndecorated(true);
frame.setVisible(true);
// Maximize Frame to reach the struts
frame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
Thread.sleep(2000);
Rectangle frameBounds = frame.getBounds();
frame.dispose();
if (bounds.x + insets.left != frameBounds.x
|| bounds.y + insets.top != frameBounds.y
|| bounds.width - insets.right - insets.left != frameBounds.width
|| bounds.height - insets.bottom - insets.top != frameBounds.height) {
throw new RuntimeException("Test FAILED! Wrong screen #" +
screen + " insets: " + insets);
}
}
System.out.println("Test PASSED!");
}
}
/* /*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,15 +33,16 @@ ...@@ -33,15 +33,16 @@
* @library /lib/testlibrary/ * @library /lib/testlibrary/
* @build LowMemoryTest MemoryUtil RunUtil * @build LowMemoryTest MemoryUtil RunUtil
* @run main/timeout=600 LowMemoryTest * @run main/timeout=600 LowMemoryTest
* @requires vm.opt.ExplicitGCInvokesConcurrent != "true"
* @requires vm.opt.ExplicitGCInvokesConcurrentAndUnloadsClasses != "true"
* @requires vm.opt.DisableExplicitGC != "true"
*/ */
import com.sun.management.DiagnosticCommandMBean;
import java.lang.management.*; import java.lang.management.*;
import java.util.*; import java.util.*;
import java.util.concurrent.Phaser; import java.util.concurrent.Phaser;
import javax.management.*; import javax.management.*;
import javax.management.openmbean.CompositeData; import javax.management.openmbean.CompositeData;
import sun.management.ManagementFactoryHelper;
public class LowMemoryTest { public class LowMemoryTest {
private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean(); private static final MemoryMXBean mm = ManagementFactory.getMemoryMXBean();
......
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -27,21 +27,19 @@ ...@@ -27,21 +27,19 @@
* @summary Basic unit test of ThreadMXBean.getAllThreadIds() * @summary Basic unit test of ThreadMXBean.getAllThreadIds()
* @author Alexei Guibadoulline and Mandy Chung * @author Alexei Guibadoulline and Mandy Chung
* *
* @run build Barrier
* @run main/othervm AllThreadIds * @run main/othervm AllThreadIds
*/ */
import java.lang.management.*; import java.lang.management.*;
import java.util.*; import java.util.concurrent.Phaser;
public class AllThreadIds { public class AllThreadIds {
final static int DAEMON_THREADS = 20; final static int DAEMON_THREADS = 20;
final static int USER_THREADS = 5; final static int USER_THREADS = 5;
final static int ALL_THREADS = DAEMON_THREADS + USER_THREADS; final static int ALL_THREADS = DAEMON_THREADS + USER_THREADS;
private static volatile boolean live[] = new boolean[ALL_THREADS]; private static final boolean live[] = new boolean[ALL_THREADS];
private static Thread allThreads[] = new Thread[ALL_THREADS]; private static final Thread allThreads[] = new Thread[ALL_THREADS];
private static ThreadMXBean mbean private static final ThreadMXBean mbean = ManagementFactory.getThreadMXBean();
= ManagementFactory.getThreadMXBean();
private static boolean testFailed = false; private static boolean testFailed = false;
private static boolean trace = false; private static boolean trace = false;
...@@ -52,8 +50,7 @@ public class AllThreadIds { ...@@ -52,8 +50,7 @@ public class AllThreadIds {
private static int curLiveThreadCount = 0; private static int curLiveThreadCount = 0;
private static int curPeakThreadCount = 0; private static int curPeakThreadCount = 0;
// barrier for threads communication private static final Phaser startupCheck = new Phaser(ALL_THREADS + 1);
private static Barrier barrier = new Barrier(ALL_THREADS);
private static void printThreadList() { private static void printThreadList() {
if (!trace) return; if (!trace) return;
...@@ -124,18 +121,15 @@ public class AllThreadIds { ...@@ -124,18 +121,15 @@ public class AllThreadIds {
curPeakThreadCount = mbean.getPeakThreadCount(); curPeakThreadCount = mbean.getPeakThreadCount();
checkThreadCount(0, 0); checkThreadCount(0, 0);
// Start all threads and wait to be sure they all are alive // Start all threads and wait to be sure they all are alive
barrier.set(ALL_THREADS);
for (int i = 0; i < ALL_THREADS; i++) { for (int i = 0; i < ALL_THREADS; i++) {
live[i] = true; setLive(i, true);
allThreads[i] = new MyThread(i); allThreads[i] = new MyThread(i);
allThreads[i].setDaemon( (i < DAEMON_THREADS) ? true : false); allThreads[i].setDaemon(i < DAEMON_THREADS);
allThreads[i].start(); allThreads[i].start();
} }
// wait until all threads are started. // wait until all threads are started.
barrier.await(); startupCheck.arriveAndAwaitAdvance();
checkThreadCount(ALL_THREADS, 0); checkThreadCount(ALL_THREADS, 0);
printThreadList(); printThreadList();
...@@ -173,15 +167,14 @@ public class AllThreadIds { ...@@ -173,15 +167,14 @@ public class AllThreadIds {
// Stop daemon threads, wait to be sure they all are dead, and check // Stop daemon threads, wait to be sure they all are dead, and check
// that they disappeared from getAllThreadIds() list // that they disappeared from getAllThreadIds() list
barrier.set(DAEMON_THREADS);
for (int i = 0; i < DAEMON_THREADS; i++) { for (int i = 0; i < DAEMON_THREADS; i++) {
live[i] = false; setLive(i, false);
} }
// wait until daemon threads are terminated.
barrier.await();
// give chance to threads to terminate // make sure the daemon threads are completely dead
pause(); joinDaemonThreads();
// and check the reported thread count
checkThreadCount(0, DAEMON_THREADS); checkThreadCount(0, DAEMON_THREADS);
// Check mbean now // Check mbean now
...@@ -190,11 +183,11 @@ public class AllThreadIds { ...@@ -190,11 +183,11 @@ public class AllThreadIds {
for (int i = 0; i < ALL_THREADS; i++) { for (int i = 0; i < ALL_THREADS; i++) {
long expectedId = allThreads[i].getId(); long expectedId = allThreads[i].getId();
boolean found = false; boolean found = false;
boolean live = (i >= DAEMON_THREADS); boolean alive = (i >= DAEMON_THREADS);
if (trace) { if (trace) {
System.out.print("Looking for thread with id " + expectedId + System.out.print("Looking for thread with id " + expectedId +
(live ? " expected alive." : " expected terminated.")); (alive ? " expected alive." : " expected terminated."));
} }
for (int j = 0; j < list.length; j++) { for (int j = 0; j < list.length; j++) {
if (expectedId == list[j]) { if (expectedId == list[j]) {
...@@ -203,11 +196,11 @@ public class AllThreadIds { ...@@ -203,11 +196,11 @@ public class AllThreadIds {
} }
} }
if (live != found) { if (alive != found) {
testFailed = true; testFailed = true;
} }
if (trace) { if (trace) {
if (live != found) { if (alive != found) {
System.out.println(" TEST FAILED."); System.out.println(" TEST FAILED.");
} else { } else {
System.out.println(); System.out.println();
...@@ -216,15 +209,14 @@ public class AllThreadIds { ...@@ -216,15 +209,14 @@ public class AllThreadIds {
} }
// Stop all threads and wait to be sure they all are dead // Stop all threads and wait to be sure they all are dead
barrier.set(ALL_THREADS - DAEMON_THREADS);
for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) { for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) {
live[i] = false; setLive(i, false);
} }
// wait until daemon threads are terminated .
barrier.await();
// give chance to threads to terminate // make sure the non-daemon threads are completely dead
pause(); joinNonDaemonThreads();
// and check the thread count
checkThreadCount(0, ALL_THREADS - DAEMON_THREADS); checkThreadCount(0, ALL_THREADS - DAEMON_THREADS);
if (testFailed) if (testFailed)
...@@ -233,6 +225,30 @@ public class AllThreadIds { ...@@ -233,6 +225,30 @@ public class AllThreadIds {
System.out.println("Test passed."); System.out.println("Test passed.");
} }
private static void joinDaemonThreads() throws InterruptedException {
for (int i = 0; i < DAEMON_THREADS; i++) {
allThreads[i].join();
}
}
private static void joinNonDaemonThreads() throws InterruptedException {
for (int i = DAEMON_THREADS; i < ALL_THREADS; i++) {
allThreads[i].join();
}
}
private static void setLive(int i, boolean val) {
synchronized(live) {
live[i] = val;
}
}
private static boolean isLive(int i) {
synchronized(live) {
return live[i];
}
}
// The MyThread thread lives as long as correspondent live[i] value is true // The MyThread thread lives as long as correspondent live[i] value is true
private static class MyThread extends Thread { private static class MyThread extends Thread {
int id; int id;
...@@ -243,8 +259,8 @@ public class AllThreadIds { ...@@ -243,8 +259,8 @@ public class AllThreadIds {
public void run() { public void run() {
// signal started // signal started
barrier.signal(); startupCheck.arrive();
while (live[id]) { while (isLive(id)) {
try { try {
sleep(100); sleep(100);
} catch (InterruptedException e) { } catch (InterruptedException e) {
...@@ -253,23 +269,6 @@ public class AllThreadIds { ...@@ -253,23 +269,6 @@ public class AllThreadIds {
testFailed = true; testFailed = true;
} }
} }
// signal about to exit
barrier.signal();
} }
} }
private static Object pauseObj = new Object();
private static void pause() {
// Enter lock a without blocking
synchronized (pauseObj) {
try {
// may need to tune this timeout for different platforms
pauseObj.wait(50);
} catch (Exception e) {
System.err.println("Unexpected exception.");
e.printStackTrace(System.err);
}
}
}
} }
/* /*
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -75,7 +75,7 @@ public class SynchronizationStatistics { ...@@ -75,7 +75,7 @@ public class SynchronizationStatistics {
} }
private static void waitForThreadState(Thread t, Thread.State state) throws InterruptedException { private static void waitForThreadState(Thread t, Thread.State state) throws InterruptedException {
while (!t.isInterrupted() && t.getState() != state) { while (t.getState() != state) {
Thread.sleep(3); Thread.sleep(3);
} }
} }
...@@ -109,7 +109,9 @@ public class SynchronizationStatistics { ...@@ -109,7 +109,9 @@ public class SynchronizationStatistics {
synchronized(lock1) { synchronized(lock1) {
p.arriveAndAwaitAdvance(); // phase[1] p.arriveAndAwaitAdvance(); // phase[1]
waitForThreadState(lt, Thread.State.BLOCKED); waitForThreadState(lt, Thread.State.BLOCKED);
lockName = mbean.getThreadInfo(tid).getLockName(); do {
lockName = mbean.getThreadInfo(tid).getLockName();
} while (lockName == null);
} }
p.arriveAndAwaitAdvance(); // phase[2] p.arriveAndAwaitAdvance(); // phase[2]
...@@ -159,7 +161,9 @@ public class SynchronizationStatistics { ...@@ -159,7 +161,9 @@ public class SynchronizationStatistics {
synchronized(lock1) { synchronized(lock1) {
p.arriveAndAwaitAdvance(); // phase[1] p.arriveAndAwaitAdvance(); // phase[1]
waitForThreadState(lt, Thread.State.BLOCKED); waitForThreadState(lt, Thread.State.BLOCKED);
lockName = mbean.getThreadInfo(tid).getLockName(); do {
lockName = mbean.getThreadInfo(tid).getLockName();
} while (lockName == null);
} }
p.arriveAndAwaitAdvance(); // phase[2] p.arriveAndAwaitAdvance(); // phase[2]
...@@ -168,7 +172,9 @@ public class SynchronizationStatistics { ...@@ -168,7 +172,9 @@ public class SynchronizationStatistics {
synchronized(lock2) { synchronized(lock2) {
p.arriveAndAwaitAdvance(); // phase [3] p.arriveAndAwaitAdvance(); // phase [3]
waitForThreadState(lt, Thread.State.BLOCKED); waitForThreadState(lt, Thread.State.BLOCKED);
lockName = mbean.getThreadInfo(tid).getLockName(); do {
lockName = mbean.getThreadInfo(tid).getLockName();
} while (lockName == null);
} }
p.arriveAndAwaitAdvance(); // phase [4] p.arriveAndAwaitAdvance(); // phase [4]
testBlocked(ti, () -> mbean.getThreadInfo(tid), lockName, lock2); testBlocked(ti, () -> mbean.getThreadInfo(tid), lockName, lock2);
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
/** /**
* @test * @test
* @bug 4759491 6303183 7012868 8015666 8023713 8068790 8074694 * @bug 4759491 6303183 7012868 8015666 8023713 8068790 8074694 8076641
* @summary Test ZOS and ZIS timestamp in extra field correctly * @summary Test ZOS and ZIS timestamp in extra field correctly
*/ */
...@@ -40,7 +40,6 @@ import java.util.zip.ZipFile; ...@@ -40,7 +40,6 @@ import java.util.zip.ZipFile;
import java.util.zip.ZipInputStream; import java.util.zip.ZipInputStream;
import java.util.zip.ZipOutputStream; import java.util.zip.ZipOutputStream;
public class TestExtraTime { public class TestExtraTime {
public static void main(String[] args) throws Throwable{ public static void main(String[] args) throws Throwable{
...@@ -71,6 +70,7 @@ public class TestExtraTime { ...@@ -71,6 +70,7 @@ public class TestExtraTime {
} }
testNullHandling(); testNullHandling();
testTagOnlyHandling();
testTimeConversions(); testTimeConversions();
} }
...@@ -208,4 +208,42 @@ public class TestExtraTime { ...@@ -208,4 +208,42 @@ public class TestExtraTime {
} }
} }
} }
static void check(ZipEntry ze, byte[] extra) {
if (extra != null) {
byte[] extra1 = ze.getExtra();
if (extra1 == null || extra1.length < extra.length ||
!Arrays.equals(Arrays.copyOfRange(extra1,
extra1.length - extra.length,
extra1.length),
extra)) {
throw new RuntimeException("Timestamp: storing extra field failed!");
}
}
}
static void testTagOnlyHandling() throws Throwable {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
byte[] extra = new byte[] { 0x0a, 0, 4, 0, 0, 0, 0, 0 };
try (ZipOutputStream zos = new ZipOutputStream(baos)) {
ZipEntry ze = new ZipEntry("TestExtraTime.java");
ze.setExtra(extra);
zos.putNextEntry(ze);
zos.write(new byte[] { 1,2 ,3, 4});
}
try (ZipInputStream zis = new ZipInputStream(
new ByteArrayInputStream(baos.toByteArray()))) {
ZipEntry ze = zis.getNextEntry();
check(ze, extra);
}
Path zpath = Paths.get(System.getProperty("test.dir", "."),
"TestExtraTime.zip");
Files.copy(new ByteArrayInputStream(baos.toByteArray()), zpath);
try (ZipFile zf = new ZipFile(zpath.toFile())) {
ZipEntry ze = zf.getEntry("TestExtraTime.java");
check(ze, extra);
} finally {
Files.delete(zpath);
}
}
} }
/* /*
* Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,37 +34,31 @@ ...@@ -34,37 +34,31 @@
// java imports // java imports
// //
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.util.Map; import javax.management.MBeanNotificationInfo;
import javax.management.MBeanServer;
// JMX imports import javax.management.MBeanServerConnection;
// import javax.management.MBeanServerFactory;
import javax.management.* ; import javax.management.Notification;
import javax.management.NotificationBroadcasterSupport;
import javax.management.remote.*; import javax.management.NotificationListener;
import javax.management.ObjectName;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXConnectorServer;
import javax.management.remote.JMXConnectorServerFactory;
import javax.management.remote.JMXServiceURL; import javax.management.remote.JMXServiceURL;
public class NotSerializableNotifTest { public class NotSerializableNotifTest {
private static final MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer(); private static final MBeanServer mbeanServer = MBeanServerFactory.createMBeanServer();
private static ObjectName emitter; private static ObjectName emitter;
private static int port = 2468;
private static String[] protocols; private static String[] protocols;
private static final int sentNotifs = 10; private static final int sentNotifs = 10;
private static double timeoutFactor = 1.0;
private static final double defaultTimeout = 10;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
System.out.println(">>> Test to send a not serializable notification"); System.out.println(">>> Test to send a not serializable notification");
String timeoutVal = System.getProperty("test.timeout.factor");
if (timeoutVal != null) {
timeoutFactor = Double.parseDouble(
System.getProperty("test.timeout.factor")
);
}
// IIOP fails on JDK1.4, see 5034318 // IIOP fails on JDK1.4, see 5034318
final String v = System.getProperty("java.version"); final String v = System.getProperty("java.version");
float f = Float.parseFloat(v.substring(0, 3)); float f = Float.parseFloat(v.substring(0, 3));
...@@ -77,35 +71,18 @@ public class NotSerializableNotifTest { ...@@ -77,35 +71,18 @@ public class NotSerializableNotifTest {
emitter = new ObjectName("Default:name=NotificationEmitter"); emitter = new ObjectName("Default:name=NotificationEmitter");
mbeanServer.registerMBean(new NotificationEmitter(), emitter); mbeanServer.registerMBean(new NotificationEmitter(), emitter);
boolean ok = true;
for (int i = 0; i < protocols.length; i++) { for (int i = 0; i < protocols.length; i++) {
try { test(protocols[i]);
if (!test(protocols[i])) {
System.out.println(">>> Test failed for " + protocols[i]);
ok = false;
} else {
System.out.println(">>> Test successed for " + protocols[i]);
}
} catch (Exception e) {
System.out.println(">>> Test failed for " + protocols[i]);
e.printStackTrace(System.out);
ok = false;
}
} }
if (ok) { System.out.println(">>> Test passed");
System.out.println(">>> Test passed");
} else {
System.out.println(">>> TEST FAILED");
System.exit(1);
}
} }
private static boolean test(String proto) throws Exception { private static void test(String proto) throws Exception {
System.out.println("\n>>> Test for protocol " + proto); System.out.println("\n>>> Test for protocol " + proto);
JMXServiceURL url = new JMXServiceURL(proto, null, port++); JMXServiceURL url = new JMXServiceURL(proto, null, 0);
System.out.println(">>> Create a server: "+url); System.out.println(">>> Create a server: "+url);
...@@ -115,7 +92,7 @@ public class NotSerializableNotifTest { ...@@ -115,7 +92,7 @@ public class NotSerializableNotifTest {
} catch (MalformedURLException e) { } catch (MalformedURLException e) {
System.out.println("System does not recognize URL: " + url + System.out.println("System does not recognize URL: " + url +
"; ignoring"); "; ignoring");
return true; return;
} }
server.start(); server.start();
...@@ -146,25 +123,10 @@ public class NotSerializableNotifTest { ...@@ -146,25 +123,10 @@ public class NotSerializableNotifTest {
// waiting ... // waiting ...
synchronized (listener) { synchronized (listener) {
int top = (int)Math.ceil(timeoutFactor * defaultTimeout); while (listener.received() < sentNotifs) {
for (int i=0; i<top; i++) { listener.wait(); // either pass or test timeout (killed by test harness)
if (listener.received() < sentNotifs) {
listener.wait(1000);
} else {
break;
}
}
}
// check }
boolean ok = true;
if (listener.received() != sentNotifs) {
System.out.println("Failed: received "+listener.received()+
" but should be "+sentNotifs);
ok = false;
} else {
System.out.println("The client received all notifications.");
} }
// clean // clean
...@@ -172,8 +134,6 @@ public class NotSerializableNotifTest { ...@@ -172,8 +134,6 @@ public class NotSerializableNotifTest {
conn.close(); conn.close();
server.stop(); server.stop();
return ok;
} }
//-------------------------- //--------------------------
......
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.NoSuchAlgorithmException;
import java.security.Security;
import java.util.concurrent.TimeUnit;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLServerSocket;
import javax.net.ssl.SSLServerSocketFactory;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
/**
* @test
* @bug 8076221
* @summary Check if weak cipher suites are disabled
* @run main/othervm DisabledAlgorithms default
* @run main/othervm DisabledAlgorithms empty
*/
public class DisabledAlgorithms {
private static final String pathToStores =
"../../../../sun/security/ssl/etc";
private static final String keyStoreFile = "keystore";
private static final String trustStoreFile = "truststore";
private static final String passwd = "passphrase";
private static final String keyFilename =
System.getProperty("test.src", "./") + "/" + pathToStores +
"/" + keyStoreFile;
private static final String trustFilename =
System.getProperty("test.src", "./") + "/" + pathToStores +
"/" + trustStoreFile;
// supported RC4 cipher suites
// it does not contain KRB5 cipher suites because they need a KDC
private static final String[] rc4_ciphersuites = new String[] {
"TLS_ECDHE_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDHE_RSA_WITH_RC4_128_SHA",
"SSL_RSA_WITH_RC4_128_SHA",
"TLS_ECDH_ECDSA_WITH_RC4_128_SHA",
"TLS_ECDH_RSA_WITH_RC4_128_SHA",
"SSL_RSA_WITH_RC4_128_MD5",
"TLS_ECDH_anon_WITH_RC4_128_SHA",
"SSL_DH_anon_WITH_RC4_128_MD5"
};
public static void main(String[] args) throws Exception {
if (args.length < 1) {
throw new RuntimeException("No parameters specified");
}
System.setProperty("javax.net.ssl.keyStore", keyFilename);
System.setProperty("javax.net.ssl.keyStorePassword", passwd);
System.setProperty("javax.net.ssl.trustStore", trustFilename);
System.setProperty("javax.net.ssl.trustStorePassword", passwd);
switch (args[0]) {
case "default":
// use default jdk.tls.disabledAlgorithms
System.out.println("jdk.tls.disabledAlgorithms = "
+ Security.getProperty("jdk.tls.disabledAlgorithms"));
// check if RC4 cipher suites can't be used by default
checkFailure(rc4_ciphersuites);
break;
case "empty":
// reset jdk.tls.disabledAlgorithms
Security.setProperty("jdk.tls.disabledAlgorithms", "");
System.out.println("jdk.tls.disabledAlgorithms = "
+ Security.getProperty("jdk.tls.disabledAlgorithms"));
// check if RC4 cipher suites can be used
// if jdk.tls.disabledAlgorithms is empty
checkSuccess(rc4_ciphersuites);
break;
default:
throw new RuntimeException("Wrong parameter: " + args[0]);
}
}
/*
* Checks if that specified cipher suites cannot be used.
*/
private static void checkFailure(String[] ciphersuites) throws Exception {
try (SSLServer server = SSLServer.init(ciphersuites)) {
startNewThread(server);
while (!server.isRunning()) {
sleep();
}
int port = server.getPort();
for (String ciphersuite : ciphersuites) {
try (SSLClient client = SSLClient.init(port, ciphersuite)) {
client.connect();
throw new RuntimeException("Expected SSLHandshakeException "
+ "not thrown");
} catch (SSLHandshakeException e) {
System.out.println("Expected exception on client side: "
+ e);
}
}
server.stop();
while (server.isRunning()) {
sleep();
}
if (!server.sslError()) {
throw new RuntimeException("Expected SSL exception "
+ "not thrown on server side");
}
}
}
/*
* Checks if specified cipher suites can be used.
*/
private static void checkSuccess(String[] ciphersuites) throws Exception {
try (SSLServer server = SSLServer.init(ciphersuites)) {
startNewThread(server);
while (!server.isRunning()) {
sleep();
}
int port = server.getPort();
for (String ciphersuite : ciphersuites) {
try (SSLClient client = SSLClient.init(port, ciphersuite)) {
client.connect();
String negotiated = client.getNegotiatedCipherSuite();
System.out.println("Negotiated cipher suite: "
+ negotiated);
if (!negotiated.equals(ciphersuite)) {
throw new RuntimeException("Unexpected cipher suite: "
+ negotiated);
}
}
}
server.stop();
while (server.isRunning()) {
sleep();
}
if (server.error()) {
throw new RuntimeException("Unexpected error on server side");
}
}
}
private static Thread startNewThread(SSLServer server) {
Thread serverThread = new Thread(server, "SSL server thread");
serverThread.setDaemon(true);
serverThread.start();
return serverThread;
}
private static void sleep() {
try {
TimeUnit.MILLISECONDS.sleep(50);
} catch (InterruptedException e) {
// do nothing
}
}
static class SSLServer implements Runnable, AutoCloseable {
private final SSLServerSocket ssocket;
private volatile boolean stopped = false;
private volatile boolean running = false;
private volatile boolean sslError = false;
private volatile boolean otherError = false;
private SSLServer(SSLServerSocket ssocket) {
this.ssocket = ssocket;
}
@Override
public void run() {
System.out.println("Server: started");
running = true;
while (!stopped) {
try (SSLSocket socket = (SSLSocket) ssocket.accept()) {
System.out.println("Server: accepted client connection");
InputStream in = socket.getInputStream();
OutputStream out = socket.getOutputStream();
int b = in.read();
if (b < 0) {
throw new IOException("Unexpected EOF");
}
System.out.println("Server: send data: " + b);
out.write(b);
out.flush();
socket.getSession().invalidate();
} catch (SSLHandshakeException e) {
System.out.println("Server: run: " + e);
sslError = true;
} catch (IOException e) {
if (!stopped) {
System.out.println("Server: run: " + e);
e.printStackTrace();
otherError = true;
}
}
}
System.out.println("Server: finished");
running = false;
}
int getPort() {
return ssocket.getLocalPort();
}
String[] getEnabledCiperSuites() {
return ssocket.getEnabledCipherSuites();
}
boolean isRunning() {
return running;
}
boolean sslError() {
return sslError;
}
boolean error() {
return sslError || otherError;
}
void stop() {
stopped = true;
if (!ssocket.isClosed()) {
try {
ssocket.close();
} catch (IOException e) {
System.out.println("Server: close: " + e);
}
}
}
@Override
public void close() {
stop();
}
static SSLServer init(String[] ciphersuites)
throws IOException {
SSLServerSocketFactory ssf = (SSLServerSocketFactory)
SSLServerSocketFactory.getDefault();
SSLServerSocket ssocket = (SSLServerSocket)
ssf.createServerSocket(0);
if (ciphersuites != null) {
System.out.println("Server: enable cipher suites: "
+ java.util.Arrays.toString(ciphersuites));
ssocket.setEnabledCipherSuites(ciphersuites);
}
return new SSLServer(ssocket);
}
}
static class SSLClient implements AutoCloseable {
private final SSLSocket socket;
private SSLClient(SSLSocket socket) {
this.socket = socket;
}
void connect() throws IOException {
System.out.println("Client: connect to server");
try (
BufferedInputStream bis = new BufferedInputStream(
socket.getInputStream());
BufferedOutputStream bos = new BufferedOutputStream(
socket.getOutputStream())) {
bos.write('x');
bos.flush();
int read = bis.read();
if (read < 0) {
throw new IOException("Client: couldn't read a response");
}
socket.getSession().invalidate();
}
}
String[] getEnabledCiperSuites() {
return socket.getEnabledCipherSuites();
}
String getNegotiatedCipherSuite() {
return socket.getSession().getCipherSuite();
}
@Override
public void close() throws Exception {
if (!socket.isClosed()) {
try {
socket.close();
} catch (IOException e) {
System.out.println("Client: close: " + e);
}
}
}
static SSLClient init(int port)
throws NoSuchAlgorithmException, IOException {
return init(port, null);
}
static SSLClient init(int port, String ciphersuite)
throws NoSuchAlgorithmException, IOException {
SSLContext context = SSLContext.getDefault();
SSLSocketFactory ssf = (SSLSocketFactory)
context.getSocketFactory();
SSLSocket socket = (SSLSocket) ssf.createSocket("localhost", port);
if (ciphersuite != null) {
System.out.println("Client: enable cipher suite: "
+ ciphersuite);
socket.setEnabledCipherSuites(new String[] { ciphersuite });
}
return new SSLClient(socket);
}
}
}
/*
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/**
* @test
* @bug 8073385
* @summary test that invalid XML character exception string contains
* information about character value, element and attribute names
* @run testng/othervm BadExceptionMessageTest
*/
import java.io.StringReader;
import java.util.Locale;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
import org.xml.sax.SAXException;
import org.xml.sax.InputSource;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
import static org.testng.Assert.assertTrue;
public class BadExceptionMessageTest {
private Locale defLoc;
@BeforeClass
private void setup() {
defLoc = Locale.getDefault();
Locale.setDefault(Locale.ENGLISH);
}
@AfterClass
private void cleanup() {
Locale.setDefault(defLoc);
}
@DataProvider(name = "illegalCharactersData")
public static Object[][] illegalCharactersData() {
return new Object[][]{
{0x00},
{0xFFFE},
{0xFFFF}
};
}
@Test(dataProvider = "illegalCharactersData")
public void test(int character) throws Exception {
// Construct the XML document as a String
int[] cps = new int[]{character};
String txt = new String(cps, 0, cps.length);
String inxml = "<topElement attTest=\'" + txt + "\'/>";
String exceptionText = "NO EXCEPTION OBSERVED";
String hexString = "0x" + Integer.toHexString(character);
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setNamespaceAware(true);
dbf.setValidating(false);
DocumentBuilder db = dbf.newDocumentBuilder();
InputSource isrc = new InputSource(new StringReader(inxml));
try {
db.parse(isrc);
} catch (SAXException e) {
exceptionText = e.toString();
}
System.out.println("Got Exception:" + exceptionText);
assertTrue(exceptionText.contains("attribute \"attTest\""));
assertTrue(exceptionText.contains("element is \"topElement\""));
assertTrue(exceptionText.contains("Unicode: " + hexString));
}
}
...@@ -23,10 +23,11 @@ ...@@ -23,10 +23,11 @@
/** /**
* @test * @test
* @bug 8062923 8062924 * @bug 8062923 8062924 8074297 8076290
* @run testng XslSubstringTest * @run testng XslSubstringTest
* @summary Test xsl substring function with negative, Inf and * @summary Test xsl substring function with negative, Inf and
* NaN length and few other use cases * NaN length and few other use cases. Also test proper
* processing of supplementary characters by substring function.
*/ */
import java.io.StringReader; import java.io.StringReader;
...@@ -39,6 +40,7 @@ import javax.xml.transform.stream.StreamResult; ...@@ -39,6 +40,7 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource; import javax.xml.transform.stream.StreamSource;
import static org.testng.Assert.assertEquals; import static org.testng.Assert.assertEquals;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test; import org.testng.annotations.Test;
public class XslSubstringTest { public class XslSubstringTest {
...@@ -50,6 +52,36 @@ public class XslSubstringTest { ...@@ -50,6 +52,36 @@ public class XslSubstringTest {
+ "<xsl:template match='/'><t>"; + "<xsl:template match='/'><t>";
final String xslPost = "</t></xsl:template></xsl:stylesheet>"; final String xslPost = "</t></xsl:template></xsl:stylesheet>";
@DataProvider(name = "GeneralTestsData")
private Object[][] xmls() {
return new Object[][] {
{ "|<xsl:value-of select=\"substring('asdf',2, 1)\"/>|", "<t>|s|</t>"},
{ "|<xsl:value-of select=\"substring('asdf',2, 1 div 0)\"/>|", "<t>|sdf|</t>"},
{ "|<xsl:value-of select=\"substring('asdf',2, -0 div 0)\"/>|", "<t>||</t>" },
{ "|<xsl:value-of select=\"substring('asdf',2, 1 div 0)\"/>|", "<t>|sdf|</t>" },
// 8076290 bug test case
{ "|<xsl:value-of select=\"substring('123', 0, 3)\"/>|", "<t>|12|</t>"},
};
}
@DataProvider(name = "SupplementaryCharactersTestData")
private Object[][] dataSupplementaryCharacters() {
return new Object[][] {
// 8074297 bug test cases
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 3)\"/>|", "<t>|BC|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 3, 1)\"/>|", "<t>|B|</t>" },
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 2, 2)\"/>|", "<t>|AB|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 3, 2)\"/>|", "<t>|BC|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 3, 4)\"/>|", "<t>|BC|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 1, 1)\"/>|", "<t>|&#131083;|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 2, 1)\"/>|", "<t>|A|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 1, 1 div 0)\"/>|", "<t>|&#131083;ABC|</t>"},
{ "|<xsl:value-of select=\"substring('&#131083;ABC', -10, 1 div 0)\"/>|", "<t>|&#131083;ABC|</t>"},
// 8076290 bug test case
{ "|<xsl:value-of select=\"substring('&#131083;ABC', 0, 2)\"/>|", "<t>|&#131083;|</t>"},
};
}
private String testTransform(String xsl) throws Exception { private String testTransform(String xsl) throws Exception {
//Prepare sources for transormation //Prepare sources for transormation
Source src = new StreamSource(new StringReader(xml)); Source src = new StreamSource(new StringReader(xml));
...@@ -78,27 +110,14 @@ public class XslSubstringTest { ...@@ -78,27 +110,14 @@ public class XslSubstringTest {
"<t>||</t>"); "<t>||</t>");
} }
@Test @Test(dataProvider = "GeneralTestsData")
public void testGeneral1() throws Exception { public void testGeneralAll(String xsl, String result) throws Exception {
assertEquals(testTransform("|<xsl:value-of select=\"substring('asdf',2, 1)\"/>|"), assertEquals(testTransform(xsl), result);
"<t>|s|</t>");
} }
@Test @Test(dataProvider = "SupplementaryCharactersTestData")
public void testGeneral2() throws Exception { public void testSupplementCharacters(String xsl, String result) throws Exception {
assertEquals(testTransform("|<xsl:value-of select=\"substring('asdf',2, 1 div 0)\"/>|"), assertEquals(testTransform(xsl), result);
"<t>|sdf|</t>");
} }
@Test
public void testGeneral3() throws Exception {
assertEquals(testTransform("|<xsl:value-of select=\"substring('asdf',2, -0 div 0)\"/>|"),
"<t>||</t>");
}
@Test
public void testGeneral4() throws Exception {
assertEquals(testTransform("|<xsl:value-of select=\"substring('asdf',2, 0 div 0)\"/>|"),
"<t>||</t>");
}
} }
/* /*
* Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -39,11 +39,10 @@ ...@@ -39,11 +39,10 @@
* @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 * @run main/othervm SSL TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5
*/ */
import java.io.*; import java.io.*;
import java.net.InetAddress;
import java.security.AccessControlException;
import java.security.Permission; import java.security.Permission;
import javax.net.ssl.*; import javax.net.ssl.*;
import java.security.Principal; import java.security.Principal;
import java.security.Security;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -82,6 +81,9 @@ public class SSL extends SecurityManager { ...@@ -82,6 +81,9 @@ public class SSL extends SecurityManager {
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
krb5Cipher = args[0]; krb5Cipher = args[0];
......
/* /*
* Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
*/ */
import java.io.*; import java.io.*;
import java.net.*; import java.security.Security;
import javax.net.ssl.*; import javax.net.ssl.*;
public class CipherSuiteOrder { public class CipherSuiteOrder {
...@@ -196,6 +196,10 @@ public class CipherSuiteOrder { ...@@ -196,6 +196,10 @@ public class CipherSuiteOrder {
volatile Exception clientException = null; volatile Exception clientException = null;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
String keyFilename = String keyFilename =
System.getProperty("test.src", "./") + "/" + pathToStores + System.getProperty("test.src", "./") + "/" + pathToStores +
"/" + keyStoreFile; "/" + keyStoreFile;
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -102,10 +102,10 @@ import java.io.*; ...@@ -102,10 +102,10 @@ import java.io.*;
import java.nio.*; import java.nio.*;
import java.security.KeyStore; import java.security.KeyStore;
import java.security.KeyFactory; import java.security.KeyFactory;
import java.security.Security;
import java.security.cert.Certificate; import java.security.cert.Certificate;
import java.security.cert.CertificateFactory; import java.security.cert.CertificateFactory;
import java.security.spec.PKCS8EncodedKeySpec; import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.*;
import java.security.interfaces.*; import java.security.interfaces.*;
import java.util.Base64; import java.util.Base64;
...@@ -377,6 +377,10 @@ public class DHEKeySizing { ...@@ -377,6 +377,10 @@ public class DHEKeySizing {
} }
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
if (args.length != 4) { if (args.length != 4) {
System.out.println( System.out.println(
"Usage: java DHEKeySizing cipher-suite " + "Usage: java DHEKeySizing cipher-suite " +
......
/* /*
* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -622,6 +622,9 @@ public class CheckStatus { ...@@ -622,6 +622,9 @@ public class CheckStatus {
} }
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
CheckStatus cs; CheckStatus cs;
......
/* /*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2003, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -33,6 +33,8 @@ ...@@ -33,6 +33,8 @@
* The code could certainly be tightened up a lot. * The code could certainly be tightened up a lot.
* *
* @author Brad Wetmore * @author Brad Wetmore
*
* @run main/othervm ConnectionTest
*/ */
import javax.net.ssl.*; import javax.net.ssl.*;
...@@ -669,6 +671,10 @@ public class ConnectionTest { ...@@ -669,6 +671,10 @@ public class ConnectionTest {
} }
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
ConnectionTest ct = new ConnectionTest(); ConnectionTest ct = new ConnectionTest();
ct.test(); ct.test();
} }
......
/* /*
* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -179,6 +179,9 @@ public class LargeBufs { ...@@ -179,6 +179,9 @@ public class LargeBufs {
} }
public static void main(String args[]) throws Exception { public static void main(String args[]) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
LargeBufs test; LargeBufs test;
......
/* /*
* Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
*/ */
import java.io.*; import java.io.*;
import java.net.*; import java.security.Security;
import javax.net.ssl.*; import javax.net.ssl.*;
import java.util.Arrays; import java.util.Arrays;
...@@ -195,6 +195,10 @@ public class UseCipherSuitesOrder { ...@@ -195,6 +195,10 @@ public class UseCipherSuitesOrder {
volatile Exception clientException = null; volatile Exception clientException = null;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
// parse the arguments // parse the arguments
parseArguments(args); parseArguments(args);
......
/* /*
* Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
*/ */
import java.io.*; import java.io.*;
import java.net.*; import java.security.Security;
import javax.net.ssl.*; import javax.net.ssl.*;
public class GenericStreamCipher { public class GenericStreamCipher {
...@@ -160,6 +160,10 @@ public class GenericStreamCipher { ...@@ -160,6 +160,10 @@ public class GenericStreamCipher {
volatile Exception clientException = null; volatile Exception clientException = null;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// reset the security property to make sure that the algorithms
// and keys used in this test are not disabled.
Security.setProperty("jdk.tls.disabledAlgorithms", "");
String keyFilename = String keyFilename =
System.getProperty("test.src", ".") + "/" + pathToStores + System.getProperty("test.src", ".") + "/" + pathToStores +
"/" + keyStoreFile; "/" + keyStoreFile;
......
/*
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
import java.security.*;
/*
* Export a private key from the named keychain entry without supplying a
* password. See JDK-8062264.
*
* NOTE: Keychain access controls must already have been lowered to permit
* the target entry to be accessed.
*/
public class ExportPrivateKeyNoPwd {
public static final void main(String[] args) throws Exception {
if (args.length != 1) {
throw new Exception(
"ExportPrivateKeyNoPwd: must supply name of a keystore entry");
}
String alias = args[0];
KeyStore ks = KeyStore.getInstance("KeychainStore");
System.out.println("ExportPrivateKeyNoPwd: loading keychains...");
ks.load(null, null);
System.out.println("ExportPrivateKeyNoPwd: exporting key...");
Key key = ks.getKey(alias, null);
if (key instanceof PrivateKey) {
System.out.println("ExportPrivateKeyNoPwd: exported " +
key.getAlgorithm() + " private key from '" + alias + "'");
} else {
throw new Exception("Error exporting private key from keychain");
}
}
}
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
# #
# @test # @test
# @bug 7133495 8041740 # @bug 7133495 8041740 8062264
# @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry # @summary [macosx] KeyChain KeyStore implementation retrieves only one private key entry
if [ "${TESTJAVA}" = "" ] ; then if [ "${TESTJAVA}" = "" ] ; then
...@@ -30,6 +30,9 @@ if [ "${TESTJAVA}" = "" ] ; then ...@@ -30,6 +30,9 @@ if [ "${TESTJAVA}" = "" ] ; then
TESTJAVA=`dirname $JAVAC_CMD`/.. TESTJAVA=`dirname $JAVAC_CMD`/..
fi fi
if [ "${TESTSRC}" = "" ] ; then
TESTSRC="."
fi
if [ "${TESTCLASSES}" = "" ] ; then if [ "${TESTCLASSES}" = "" ] ; then
TESTCLASSES=`pwd` TESTCLASSES=`pwd`
fi fi
...@@ -59,10 +62,6 @@ CLEANUP_LIST="rm -f $TEMPORARY_LIST" ...@@ -59,10 +62,6 @@ CLEANUP_LIST="rm -f $TEMPORARY_LIST"
COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l` COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
echo "Found $COUNT private key entries in the Keychain keystores" echo "Found $COUNT private key entries in the Keychain keystores"
if [ $COUNT -gt 1 ]; then
exit 0
fi
# Create a temporary PKCS12 keystore containing 3 public/private keypairs # Create a temporary PKCS12 keystore containing 3 public/private keypairs
RESULT=`$CLEANUP_P12` RESULT=`$CLEANUP_P12`
...@@ -107,8 +106,9 @@ fi ...@@ -107,8 +106,9 @@ fi
echo "Unlocked the temporary keychain" echo "Unlocked the temporary keychain"
# Import the keypairs from the PKCS12 keystore into the keychain # Import the keypairs from the PKCS12 keystore into the keychain
# (The '-A' option is used to lower the temporary keychain's access controls)
security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD security import $TEMPORARY_P12 -k $TEMPORARY_KC -f pkcs12 -P $PWD -A
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: cannot import keypairs from PKCS12 keystore into the keychain" echo "Error: cannot import keypairs from PKCS12 keystore into the keychain"
RESULT=`$CLEANUP_P12` RESULT=`$CLEANUP_P12`
...@@ -128,26 +128,39 @@ security list-keychains ...@@ -128,26 +128,39 @@ security list-keychains
# Recount the number of private key entries in the Keychain keystores # Recount the number of private key entries in the Keychain keystores
COUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l` RECOUNT=`$KEYTOOL -list | grep PrivateKeyEntry | wc -l`
echo "Found $COUNT private key entries in the Keychain keystore" echo "Found $RECOUNT private key entries in the Keychain keystore"
if [ $COUNT -lt 3 ]; then if [ $RECOUNT -lt `expr $COUNT + 3` ]; then
echo "Error: expected >2 private key entries in the Keychain keystores" echo "Error: expected >$COUNT private key entries in the Keychain keystores"
RESULT=`$CLEANUP_P12` RESULT=`$CLEANUP_P12`
RESULT=`$CLEANUP_KC` RESULT=`$CLEANUP_KC`
exit 5 exit 5
fi fi
# Export a private key from the keychain (without supplying a password)
# Access controls have already been lowered (see 'security import ... -A' above)
${TESTJAVA}/bin/javac ${TESTJAVACOPTS} ${TESTTOOLVMOPTS} -d . ${TESTSRC}/ExportPrivateKeyNoPwd.java || exit 6
echo | ${TESTJAVA}/bin/java ${TESTVMOPTS} ExportPrivateKeyNoPwd x
if [ $? -ne 0 ]; then
echo "Error exporting private key from the temporary keychain"
RESULT=`$CLEANUP_P12`
RESULT=`$CLEANUP_KC`
exit 6
fi
echo "Exported a private key from the temporary keychain"
RESULT=`$CLEANUP_P12` RESULT=`$CLEANUP_P12`
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: cannot remove the temporary PKCS12 keystore" echo "Error: cannot remove the temporary PKCS12 keystore"
exit 6 exit 7
fi fi
echo "Removed the temporary PKCS12 keystore" echo "Removed the temporary PKCS12 keystore"
RESULT=`$CLEANUP_KC` RESULT=`$CLEANUP_KC`
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: cannot remove the temporary keychain" echo "Error: cannot remove the temporary keychain"
exit 7 exit 8
fi fi
echo "Removed the temporary keychain" echo "Removed the temporary keychain"
......
...@@ -21,4 +21,4 @@ ...@@ -21,4 +21,4 @@
# or visit www.oracle.com if you need additional information or have any # or visit www.oracle.com if you need additional information or have any
# questions. # questions.
# #
tzdata2015a tzdata2015b
...@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male ...@@ -1927,6 +1927,13 @@ Zone Indian/Maldives 4:54:00 - LMT 1880 # Male
# was at the start of 2008-03-31 (the day of Steffen Thorsen's report); # was at the start of 2008-03-31 (the day of Steffen Thorsen's report);
# this is almost surely wrong. # this is almost surely wrong.
# From Ganbold Tsagaankhuu (2015-03-10):
# It seems like yesterday Mongolian Government meeting has concluded to use
# daylight saving time in Mongolia.... Starting at 2:00AM of last Saturday of
# March 2015, daylight saving time starts. And 00:00AM of last Saturday of
# September daylight saving time ends. Source:
# http://zasag.mn/news/view/8969
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S Rule Mongol 1983 1984 - Apr 1 0:00 1:00 S
Rule Mongol 1983 only - Oct 1 0:00 0 - Rule Mongol 1983 only - Oct 1 0:00 0 -
...@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 - ...@@ -1947,6 +1954,8 @@ Rule Mongol 1984 1998 - Sep lastSun 0:00 0 -
Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S Rule Mongol 2001 only - Apr lastSat 2:00 1:00 S
Rule Mongol 2001 2006 - Sep lastSat 2:00 0 - Rule Mongol 2001 2006 - Sep lastSat 2:00 0 -
Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S Rule Mongol 2002 2006 - Mar lastSat 2:00 1:00 S
Rule Mongol 2015 max - Mar lastSat 2:00 1:00 S
Rule Mongol 2015 max - Sep lastSat 0:00 0 -
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
# Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta # Hovd, a.k.a. Chovd, Dund-Us, Dzhargalant, Khovd, Jirgalanta
...@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907 ...@@ -2365,13 +2374,19 @@ Zone Asia/Karachi 4:28:12 - LMT 1907
# official source...: # official source...:
# http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252 # http://www.palestinecabinet.gov.ps/ar/Views/ViewDetails.aspx?pid=1252
# From Paul Eggert (2013-09-24): # From Steffen Thorsen (2015-03-03):
# For future dates, guess the last Thursday in March at 24:00 through # Sources such as http://www.alquds.com/news/article/view/id/548257
# the first Friday on or after September 21 at 00:00. This is consistent with # and http://www.raya.ps/ar/news/890705.html say Palestine areas will
# the predictions in today's editions of the following URLs, # start DST on 2015-03-28 00:00 which is one day later than expected.
# which are for Gaza and Hebron respectively: #
# http://www.timeanddate.com/worldclock/timezone.html?n=702 # From Paul Eggert (2015-03-03):
# http://www.timeanddate.com/worldclock/timezone.html?n=2364 # http://www.timeanddate.com/time/change/west-bank/ramallah?year=2014
# says that the fall 2014 transition was Oct 23 at 24:00.
# For future dates, guess the last Friday in March at 24:00 through
# the first Friday on or after October 21 at 00:00. This is consistent with
# the predictions in today's editions of the following URLs:
# http://www.timeanddate.com/time/change/gaza-strip/gaza
# http://www.timeanddate.com/time/change/west-bank/hebron
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule EgyptAsia 1957 only - May 10 0:00 1:00 S Rule EgyptAsia 1957 only - May 10 0:00 1:00 S
...@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S ...@@ -2397,9 +2412,11 @@ Rule Palestine 2011 only - Apr 1 0:01 1:00 S
Rule Palestine 2011 only - Aug 1 0:00 0 - Rule Palestine 2011 only - Aug 1 0:00 0 -
Rule Palestine 2011 only - Aug 30 0:00 1:00 S Rule Palestine 2011 only - Aug 30 0:00 1:00 S
Rule Palestine 2011 only - Sep 30 0:00 0 - Rule Palestine 2011 only - Sep 30 0:00 0 -
Rule Palestine 2012 max - Mar lastThu 24:00 1:00 S Rule Palestine 2012 2014 - Mar lastThu 24:00 1:00 S
Rule Palestine 2012 only - Sep 21 1:00 0 - Rule Palestine 2012 only - Sep 21 1:00 0 -
Rule Palestine 2013 max - Sep Fri>=21 0:00 0 - Rule Palestine 2013 only - Sep Fri>=21 0:00 0 -
Rule Palestine 2014 max - Oct Fri>=21 0:00 0 -
Rule Palestine 2015 max - Mar lastFri 24:00 1:00 S
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
Zone Asia/Gaza 2:17:52 - LMT 1900 Oct Zone Asia/Gaza 2:17:52 - LMT 1900 Oct
......
...@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31 ...@@ -396,6 +396,7 @@ Zone Pacific/Guam -14:21:00 - LMT 1844 Dec 31
9:39:00 - LMT 1901 # Agana 9:39:00 - LMT 1901 # Agana
10:00 - GST 2000 Dec 23 # Guam 10:00 - GST 2000 Dec 23 # Guam
10:00 - ChST # Chamorro Standard Time 10:00 - ChST # Chamorro Standard Time
Link Pacific/Guam Pacific/Saipan # N Mariana Is
# Kiribati # Kiribati
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901 ...@@ -411,12 +412,7 @@ Zone Pacific/Kiritimati -10:29:20 - LMT 1901
14:00 - LINT 14:00 - LINT
# N Mariana Is # N Mariana Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See Pacific/Guam.
Zone Pacific/Saipan -14:17:00 - LMT 1844 Dec 31
9:43:00 - LMT 1901
9:00 - MPT 1969 Oct # N Mariana Is Time
10:00 - MPT 2000 Dec 23
10:00 - ChST # Chamorro Standard Time
# Marshall Is # Marshall Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # Zone NAME GMTOFF RULES FORMAT [UNTIL]
...@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5 ...@@ -586,6 +582,7 @@ Zone Pacific/Pago_Pago 12:37:12 - LMT 1879 Jul 5
-11:00 - NST 1967 Apr # N=Nome -11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering -11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa -11:00 - SST # S=Samoa
Link Pacific/Pago_Pago Pacific/Midway # in US minor outlying islands
# Samoa (formerly and also known as Western Samoa) # Samoa (formerly and also known as Western Samoa)
...@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901 ...@@ -767,23 +764,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
# uninhabited # uninhabited
# Midway # Midway
# # See Pacific/Pago_Pago.
# From Mark Brader (2005-01-23):
# [Fallacies and Fantasies of Air Transport History, by R.E.G. Davies,
# published 1994 by Paladwr Press, McLean, VA, USA; ISBN 0-9626483-5-3]
# reproduced a Pan American Airways timetable from 1936, for their weekly
# "Orient Express" flights between San Francisco and Manila, and connecting
# flights to Chicago and the US East Coast. As it uses some time zone
# designations that I've never seen before:....
# Fri. 6:30A Lv. HONOLOLU (Pearl Harbor), H.I. H.L.T. Ar. 5:30P Sun.
# " 3:00P Ar. MIDWAY ISLAND . . . . . . . . . M.L.T. Lv. 6:00A "
#
Zone Pacific/Midway -11:49:28 - LMT 1901
-11:00 - NST 1956 Jun 3
-11:00 1:00 NDT 1956 Sep 2
-11:00 - NST 1967 Apr # N=Nome
-11:00 - BST 1983 Nov 30 # B=Bering
-11:00 - SST # S=Samoa
# Palmyra # Palmyra
# uninhabited since World War II; was probably like Pacific/Kiritimati # uninhabited since World War II; was probably like Pacific/Kiritimati
......
...@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3 ...@@ -2423,7 +2423,7 @@ Zone Europe/Volgograd 2:57:40 - LMT 1920 Jan 3
4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T 4:00 Russia VOL%sT 1989 Mar 26 2:00s # Volgograd T
3:00 Russia VOL%sT 1991 Mar 31 2:00s 3:00 Russia VOL%sT 1991 Mar 31 2:00s
4:00 - VOLT 1992 Mar 29 2:00s 4:00 - VOLT 1992 Mar 29 2:00s
3:00 Russia MSK 2011 Mar 27 2:00s 3:00 Russia MSK/MSD 2011 Mar 27 2:00s
4:00 - MSK 2014 Oct 26 2:00s 4:00 - MSK 2014 Oct 26 2:00s
3:00 - MSK 3:00 - MSK
......
...@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20 ...@@ -2335,8 +2335,24 @@ Zone America/Dawson -9:17:40 - LMT 1900 Aug 20
# "...the new time zone will come into effect at two o'clock on the first Sunday # "...the new time zone will come into effect at two o'clock on the first Sunday
# of February, when we will have to advance the clock one hour from its current # of February, when we will have to advance the clock one hour from its current
# time..." # time..."
#
# Also, the new zone will not use DST. # Also, the new zone will not use DST.
#
# From Carlos Raúl Perasso (2015-02-02):
# The decree that modifies the Mexican Hour System Law has finally
# been published at the Diario Oficial de la Federación
# http://www.dof.gob.mx/nota_detalle.php?codigo=5380123&fecha=31/01/2015
# It establishes 5 zones for Mexico:
# 1- Zona Centro (Central Zone): Corresponds to longitude 90 W,
# includes most of Mexico, excluding what's mentioned below.
# 2- Zona Pacífico (Pacific Zone): Longitude 105 W, includes the
# states of Baja California Sur; Chihuahua; Nayarit (excluding Bahía
# de Banderas which lies in Central Zone); Sinaloa and Sonora.
# 3- Zona Noroeste (Northwest Zone): Longitude 120 W, includes the
# state of Baja California.
# 4- Zona Sureste (Southeast Zone): Longitude 75 W, includes the state
# of Quintana Roo.
# 5- The islands, reefs and keys shall take their timezone from the
# longitude they are located at.
# Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S # Rule NAME FROM TO TYPE IN ON AT SAVE LETTER/S
Rule Mexico 1939 only - Feb 5 0:00 1:00 D Rule Mexico 1939 only - Feb 5 0:00 1:00 D
...@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32 ...@@ -2531,13 +2547,8 @@ Zone America/Santa_Isabel -7:39:28 - LMT 1922 Jan 1 0:20:32
############################################################################### ###############################################################################
# Anguilla # Anguilla
# See America/Port_of_Spain.
# Antigua and Barbuda # Antigua and Barbuda
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See America/Port_of_Spain.
Zone America/Antigua -4:07:12 - LMT 1912 Mar 2
-5:00 - EST 1951
-4:00 - AST
# Bahamas # Bahamas
# #
...@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton ...@@ -2604,10 +2615,7 @@ Zone Atlantic/Bermuda -4:19:18 - LMT 1930 Jan 1 2:00 # Hamilton
-4:00 US A%sT -4:00 US A%sT
# Cayman Is # Cayman Is
# Zone NAME GMTOFF RULES FORMAT [UNTIL] # See America/Panama.
Zone America/Cayman -5:25:32 - LMT 1890 # Georgetown
-5:07:11 - KMT 1912 Feb # Kingston Mean Time
-5:00 - EST
# Costa Rica # Costa Rica
...@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890 ...@@ -3130,6 +3138,7 @@ Zone America/Managua -5:45:08 - LMT 1890
Zone America/Panama -5:18:08 - LMT 1890 Zone America/Panama -5:18:08 - LMT 1890
-5:19:36 - CMT 1908 Apr 22 # Colón Mean Time -5:19:36 - CMT 1908 Apr 22 # Colón Mean Time
-5:00 - EST -5:00 - EST
Link America/Panama America/Cayman
# Puerto Rico # Puerto Rico
# There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'. # There are too many San Juans elsewhere, so we'll use 'Puerto_Rico'.
......
...@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914 ...@@ -1229,10 +1229,13 @@ Zone America/Rio_Branco -4:31:12 - LMT 1914
# DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC) # DST Start: first Saturday of September 2014 (Sun 07 Sep 2014 04:00 UTC)
# http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf # http://www.diariooficial.interior.gob.cl//media/2014/02/19/do-20140219.pdf
# From Juan Correa (2015-01-28): # From Eduardo Romero Urra (2015-03-03):
# ... today the Ministry of Energy announced that Chile will drop DST, will keep # Today has been published officially that Chile will use the DST time
# "summer time" (UTC -3 / UTC -5) all year round.... # permanently until March 25 of 2017
# http://www.minenergia.cl/ministerio/noticias/generales/ministerio-de-energia-anuncia.html # http://www.diariooficial.interior.gob.cl/media/2015/03/03/1-large.jpg
#
# From Paul Eggert (2015-03-03):
# For now, assume that the extension will persist indefinitely.
# NOTE: ChileAQ rules for Antarctic bases are stored separately in the # NOTE: ChileAQ rules for Antarctic bases are stored separately in the
# 'antarctica' file. # 'antarctica' file.
...@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890 ...@@ -1291,7 +1294,7 @@ Zone America/Santiago -4:42:46 - LMT 1890
-3:00 - CLT -3:00 - CLT
Zone Pacific/Easter -7:17:44 - LMT 1890 Zone Pacific/Easter -7:17:44 - LMT 1890
-7:17:28 - EMT 1932 Sep # Easter Mean Time -7:17:28 - EMT 1932 Sep # Easter Mean Time
-7:00 Chile EAS%sT 1982 Mar 13 3:00u # Easter Time -7:00 Chile EAS%sT 1982 Mar 14 3:00u # Easter Time
-6:00 Chile EAS%sT 2015 Apr 26 3:00u -6:00 Chile EAS%sT 2015 Apr 26 3:00u
-5:00 - EAST -5:00 - EAST
# #
...@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2 ...@@ -1626,6 +1629,7 @@ Zone America/Port_of_Spain -4:06:04 - LMT 1912 Mar 2
# These all agree with Trinidad and Tobago since 1970. # These all agree with Trinidad and Tobago since 1970.
Link America/Port_of_Spain America/Anguilla Link America/Port_of_Spain America/Anguilla
Link America/Port_of_Spain America/Antigua
Link America/Port_of_Spain America/Dominica Link America/Port_of_Spain America/Dominica
Link America/Port_of_Spain America/Grenada Link America/Port_of_Spain America/Grenada
Link America/Port_of_Spain America/Guadeloupe Link America/Port_of_Spain America/Guadeloupe
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册