<?xml version="1.0"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:media="http://search.yahoo.com/mrss/" xmlns:yt="http://gdata.youtube.com/schemas/2007" xmlns:atom="http://www.w3.org/2005/Atom">
   <channel>
      <title>Java Security and Networking</title>
      <description>Pipes Output</description>
      <link>http://pipes.yahoo.com/pipes/pipe.info?_id=_rn8QKpg3hGZt64je0xjxw</link>
      <atom:link rel="next" href="http://pipes.yahoo.com/pipes/pipe.run?_id=_rn8QKpg3hGZt64je0xjxw&amp;_render=rss&amp;page=2"/>
      <pubDate>Thu, 01 Oct 2015 22:57:35 +0000</pubDate>
      <generator>http://pipes.yahoo.com/pipes/</generator>
      <item>
         <title>by Smullan-Oracle   - Slides for my JavaOne 2014 session on &quot;Understanding the New JDK 8 Security Features&quot;</title>
         <link>https://blogs.oracle.com/mullan/entry/slides_for_my_javaone_2014</link>
         <description>&lt;p&gt;
Here are the slides for my JavaOne 2014 session on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blogs.oracle.com/mullan/resource/J1-2014-CON5778.pdf&quot;&gt;Understanding the New JDK 8 Security Features&lt;/a&gt;.&lt;/p&gt; 
  &lt;p&gt;Thanks to all who attended the session. I hope it was very useful.&lt;br /&gt;&lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/slides_for_my_javaone_2014</guid>
         <pubDate>Thu, 02 Oct 2014 16:24:09 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - Version 5.0 of the Java Secure Coding Guidelines now available!</title>
         <link>https://blogs.oracle.com/mullan/entry/version_5_0_of_java</link>
         <description>&lt;p&gt;A new version of the Java Secure Coding Guidelines is now available at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/technetwork/java/seccodeguide-139067.html&quot;&gt;http://www.oracle.com/technetwork/java/seccodeguide-139067.html&lt;/a&gt;&lt;/p&gt; 
  &lt;p&gt;This version has many updates, including:&lt;/p&gt; 
  &lt;ul&gt; 
    &lt;li&gt;Additional information for some of the new &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/8/&quot;&gt;Java SE 8&lt;/a&gt; features
&lt;/li&gt; 
    &lt;li&gt;Several new guidelines and examples
&lt;/li&gt; 
    &lt;li&gt;A new appendix covering the Java Native Interface
&lt;/li&gt; 
    &lt;li&gt;A new symbolic naming for sections
&lt;/li&gt; 
    &lt;li&gt;Several formatting changes&lt;/li&gt; 
  &lt;/ul&gt;These guidelines contain coding patterns and best practices that are extremely useful for building robust and secure Java applications.&lt;br /&gt; 
  &lt;ul&gt; &lt;/ul&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/version_5_0_of_java</guid>
         <pubDate>Mon, 14 Apr 2014 19:21:58 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - How to use the XML Signature secure validation mode</title>
         <link>https://blogs.oracle.com/mullan/entry/how_to_use_the_xml</link>
         <description>&lt;p&gt;
In JDK 7u25, we introduced a new secure validation mode for XML Signatures. This mode is designed to protect you from XML Signatures that contain potentially hostile constructs that could cause denial-of-service or other types of security issues.&amp;nbsp; &lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;The good news is that if you run your application with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/tutorial/security/tour2/step2.html&quot;&gt;a SecurityManager&lt;/a&gt;, the secure validation mode is enabled by default, and there is no further action required.&lt;br /&gt;&lt;/p&gt;Otherwise, a new property with the name &lt;code&gt;org.jcp.xml.dsig.secureValidation &lt;/code&gt;has been defined to allow applications to enable the mode.&lt;code&gt;&lt;/code&gt; &lt;code&gt;&lt;/code&gt; 
  &lt;p&gt;The property can be set by an application by calling the &lt;code&gt;setProperty &lt;/code&gt;method of the &lt;code&gt;javax.xml.crypto.dsig.dom.DOMValidateContext&lt;/code&gt; class with the name of the property above and a &lt;code&gt;Boolean&lt;/code&gt; value. For example:&lt;/p&gt; 
  &lt;pre&gt;    DOMValidateContext context = new DOMValidateContext(key, element);
    context.setProperty(&quot;org.jcp.xml.dsig.secureValidation&quot;, Boolean.TRUE);
&lt;/pre&gt; 
  &lt;p&gt;The property should be set before you validate an XML Signature. When set to true&lt;code&gt;&lt;/code&gt;,
 this property instructs the implementation to process XML signatures 
more securely. This will set limits on various XML signature constructs 
to avoid conditions such as denial-of-service attacks. Specifically, it enforces the following restrictions:&lt;/p&gt; 
  &lt;ol&gt; 
    &lt;li&gt;Forbids use of the XSLT Transform&amp;nbsp;&lt;/li&gt; 
    &lt;li&gt;Restricts the number of SignedInfo or Manifest References to 30 or less&lt;/li&gt; 
    &lt;li&gt;Restricts the number of Reference Transforms to 5 or less&amp;nbsp;&amp;nbsp;&lt;/li&gt; 
    &lt;li&gt;Forbids the use of MD5 related signature or mac algorithms&lt;/li&gt; 
    &lt;li&gt;Ensures that Reference Ids are unique to help prevent signature wrapping attacks&lt;/li&gt; 
    &lt;li&gt;Forbids Reference URIs of type http or file&lt;br /&gt;&lt;/li&gt; 
    &lt;li&gt;Does not allow a RetrievalMethod to reference another RetrievalMethod&lt;/li&gt; 
  &lt;/ol&gt; 
  &lt;p&gt;The feature is based on a similar&amp;nbsp; validation mode that was included in version &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://santuario.apache.org/java150releasenotes.html&quot;&gt;1.5.0&lt;/a&gt; of&amp;nbsp; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://santuario.apache.org/&quot;&gt;Apache Santuario XML Security&lt;/a&gt;. The JDK implementation is based on Apache Santuario. &lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;This mode is also in the soon to be released JDK 8.&lt;br /&gt; &lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/how_to_use_the_xml</guid>
         <pubDate>Thu, 13 Mar 2014 13:52:16 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - A Bug in Kerberos used by Java's HTTP</title>
         <link>https://blogs.oracle.com/wangwj/entry/a_bug_in_kerberos_used</link>
         <description>Sorry, I didn't notice a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://community.oracle.com/thread/2547044&quot;&gt;thread on Oracle's forum&lt;/a&gt; until recently &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bugs.openjdk.java.net/browse/JDK-8028351&quot;&gt;JDK-8028351&lt;/a&gt; was reported to us directly. After some investigation, the bug is resolved in 7u60/8. Hopefully it's not too late for our customers.
&lt;p&gt;
A web page that is behind &quot;Windows Authentication&quot; is in fact protected by Kerberos and NTLM, and is accessible whichever auth scheme a client supports. In JDK 7, Kerberos works out-of-the-box on a Windows machine that already joins a domain (well, not exactly, see below), so it's always tried first. However, without the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.javaactivedirectory.com/?page_id=93&quot;&gt;allowtgtsessionkey registry key&lt;/a&gt; being set, Java still needs a password to login. There is no way to get this password (unless you program JAAS directly) so Java &lt;b&gt;tries the empty password&lt;/b&gt;. Obviously, the KDC (Windows domain controller) does not like it and blocks the user if it's tried multiple times.
&lt;p&gt;
The thread mentions the .java.login.config trick. When Java wants to use that file but cannot find it, it just fails without trying to login at all. The bug report mentions that disabling kerberos pre-authentication is also a workaround. In this case, no encrypted timestamp is sent so the KDC has no chance to know the client does not have the correct password.
&lt;p&gt;
In all these cases, Kerberos always fails and Java falls back to NTLM and the web page is still reached. However, the terrible thing about the empty password case is that you can read the page when you first access it, but if you access it again and again, your account is finally blocked and even NTLM does not work anymore.
&lt;p&gt;</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/a_bug_in_kerberos_used</guid>
         <pubDate>Fri, 28 Feb 2014 03:42:02 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Use Braces Even For Single Line Statement</title>
         <link>http://simsmi.blogspot.com/2014/02/love-to-use-braces-even-for-single-line.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-6mloe7_rIVA/U38rCDitlvI/AAAAAAAAAQI/4X9X-61lBew/s1600/img_1404.jpg&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-6mloe7_rIVA/U38rCDitlvI/AAAAAAAAAQI/4X9X-61lBew/s1600/img_1404.jpg&quot; height=&quot;436&quot; width=&quot;640&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;On Feb. 21, 2014, Apple released &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://support.apple.com/kb/HT6147&quot;&gt;security update&lt;/a&gt; for iOS&amp;nbsp;that affected SSL/TLS connections. The impact is described as &quot;An attacker with a privileged network position may capture or modify data in sessions protected by SSL/TLS.&quot;  And the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1266&quot;&gt;CVSS v2 Base Score&lt;/a&gt; is 6.8(AV:N/AC:M/Au:N/C:P/I:P/A:P).  What's the problem with it?&lt;br /&gt;&lt;br /&gt;Here is the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://opensource.apple.com/source/Security/Security-55471/libsecurity_ssl/lib/sslKeyExchange.c&quot;&gt;Apple code&lt;/a&gt;:&lt;br /&gt;&lt;pre&gt;static OSStatus&lt;br /&gt;SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,&lt;br /&gt;                                 uint8_t *signature, UInt16 signatureLen)&lt;br /&gt;{&lt;br /&gt;    ...&lt;br /&gt;&lt;br /&gt;    if ((err = ReadyHash(&amp;amp;SSLHashSHA1, &amp;amp;hashCtx)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;clientRandom)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;serverRandom)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;signedParams)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;        goto fail;&lt;br /&gt;    if ((err = SSLHashSHA1.final(&amp;amp;hashCtx, &amp;amp;hashOut)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;&lt;br /&gt;    err = sslRawVerify(ctx,&lt;br /&gt;                       ctx-&amp;gt;peerPubKey,&lt;br /&gt;                       dataToSign,    /* plaintext */&lt;br /&gt;                       dataToSignLen,   /* plaintext length */&lt;br /&gt;                       signature,&lt;br /&gt;                       signatureLen);&lt;br /&gt;    if(err) {&lt;br /&gt;        sslErrorLog(&quot;SSLDecodeSignedServerKeyExchange: sslRawVerify &quot;&lt;br /&gt;                    &quot;returned %d&amp;#92;n&quot;, (int)err);&lt;br /&gt;        goto fail;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;fail:&lt;br /&gt;    SSLFreeBuffer(&amp;amp;signedHashes);&lt;br /&gt;    SSLFreeBuffer(&amp;amp;hashCtx);&lt;br /&gt;    return err;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Did you note these lines?&lt;br /&gt;&lt;pre&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;signedParams)) != 0)&lt;br /&gt;        goto fail;&lt;br /&gt;        goto fail;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;There are two &quot;goto fail;&quot; lines. The second one will always be executed and jump to &quot;fail&quot; marked block. Therefore, there is no chance to execute the sslRawVerify() method, which is essential to establish a safe SSL connection. &amp;nbsp;Here comes the security issue.  Read &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.imperialviolet.org/2014/02/22/applebug.html&quot;&gt;here&lt;/a&gt; if you want to learn more detailed analysis of the issue.&lt;br /&gt;&lt;br /&gt;The lesson I learned:&lt;br /&gt;1. Be patient during code review. Even a minor typo can result in serious security issues.&lt;br /&gt;2. Follow good code conversions. People make fewer mistakes in consistent environments.&lt;br /&gt;&lt;br /&gt;Java &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/technetwork/java/javase/documentation/codeconventions-142311.html#449&quot;&gt;suggests&lt;/a&gt; to always to use braces for &quot;if&quot; statements. C and C++ also have similar conversions, for example the brace policy in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://users.ece.cmu.edu/~eno/coding/CCodingStandard.html#brace&quot;&gt;C&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.possibility.com/Cpp/CppCodingStandard.html&quot;&gt;C++&lt;/a&gt;.&lt;br /&gt;&lt;pre&gt;Note: if statements always use braces, {}. Avoid the following error-prone form:&lt;br /&gt;&lt;br /&gt;if (condition) //AVOID! THIS OMITS THE BRACES {}!&lt;br /&gt;    statement;&lt;br /&gt;&lt;/pre&gt;Rewrite the Apple code with the braces policy: &lt;br /&gt;&lt;pre&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;signedParams)) != 0) {&lt;br /&gt;        goto fail;&lt;br /&gt;    }&lt;br /&gt;    goto fail;&lt;br /&gt;&lt;/pre&gt;With this reorg, it is easier to find the problem during code review. Or &lt;br /&gt;&lt;pre&gt;    if ((err = SSLHashSHA1.update(&amp;amp;hashCtx, &amp;amp;signedParams)) != 0) {&lt;br /&gt;        goto fail;&lt;br /&gt;        goto fail;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;With this reorg, the problem disappears.  &lt;br /&gt;&lt;br /&gt;Good code conversions make a lot of fun!&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-8206294773368122177</guid>
         <pubDate>Mon, 24 Feb 2014 22:04:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://2.bp.blogspot.com/-6mloe7_rIVA/U38rCDitlvI/AAAAAAAAAQI/4X9X-61lBew/s72-c/img_1404.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - JEP 115: AES-GCM CipherSuites in JDK 8</title>
         <link>http://simsmi.blogspot.com/2014/01/jep-115-aes-gcm-ciphersuites-in-jdk-8.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;margin-right:1em;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-5ZzJRrHrIJc/UtvfFkIX7SI/AAAAAAAAAPE/IU1nVVOye1o/s1600/IMG_3673.JPG&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-5ZzJRrHrIJc/UtvfFkIX7SI/AAAAAAAAAPE/IU1nVVOye1o/s1600/IMG_3673.JPG&quot; height=&quot;300&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Chengdu, China&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc5288.txt&quot;&gt;RFC 5288&lt;/a&gt; describes the use of AES in Galois Counter Mode (&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf&quot;&gt;GCM&lt;/a&gt;) (AES-GCM) with various key exchange mechanisms as a cipher suite for TLS.  AES-GCM is an authenticated encryption with associated data (AEAD) cipher (as defined in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc5246.txt&quot;&gt;TLS 1.2&lt;/a&gt;) providing both confidentiality and data origin authentication.   &lt;br /&gt;&lt;br /&gt;Java SE had already defined the AES-GCM interfaces in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.oracle.com/javase/7/docs/&quot;&gt;Java SE 7&lt;/a&gt;. &amp;nbsp;In the coming Java SE 8, as an implementation of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/115&quot;&gt;JEP 115&lt;/a&gt;, AES-GCM algorithms is implemented in SunJCE provider, and AES-GCM cipher suites are implemented in SunJSSE provider.&lt;br /&gt;&lt;br /&gt;The following SSL/TLS AEAD/GCM cipher suites, in preference order, are enabled by default in SunJSSE provider for TLS version 1.2:&lt;br /&gt;&lt;pre&gt;    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (RFC 5289)&lt;br /&gt;    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (RFC 5289)&lt;br /&gt; &lt;br /&gt;    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (RFC 5289)&lt;br /&gt;    TLS_RSA_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt;    TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 (RFC 5289)&lt;br /&gt;    TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 (RFC 5289)&lt;br /&gt;    TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt;    TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt; &lt;br /&gt;    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (RFC 5289)&lt;br /&gt;    TLS_RSA_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;    TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 (RFC 5289)&lt;br /&gt;    TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 (RFC 5289)&lt;br /&gt;    TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;    TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The following SSL/TLS AEAD/GCM cipher suites are supported but not enabled by default in SunJSSE provider for TLS version 1.2: &lt;br /&gt;&lt;pre&gt;    TLS_DH_anon_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt;    TLS_DH_anon_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;The following SSL/TLS AEAD/GCM cipher suites are defined, but not implemented or supported by SunJSSE provider:&lt;br /&gt;&lt;pre&gt;    TLS_DH_RSA_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;    TLS_DH_RSA_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt; &lt;br /&gt;    TLS_DH_DSS_WITH_AES_128_GCM_SHA256 (RFC 5288)&lt;br /&gt;    TLS_DH_DSS_WITH_AES_256_GCM_SHA384 (RFC 5288)&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For better compatibility and interoperability, in JDK 8, it is decided to decrease the preference priority of cipher suites in GCM mode for a while before GCM technologies mature in the industry.  New developments in TLS security have occurred recently, the industry is moving towards TLS 1.1/1.2 and the use of GCM-based cipher suites.  The preference priority of GCM-based cipher suites by default may be increased in JDK 9, or a JDK 8 update release in the future. &lt;br /&gt;&lt;br /&gt;Enojoy this new feature!&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-27373965470847473</guid>
         <pubDate>Sun, 19 Jan 2014 06:22:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-5ZzJRrHrIJc/UtvfFkIX7SI/AAAAAAAAAPE/IU1nVVOye1o/s72-c/IMG_3673.JPG" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - JEP 114: TLS SNI Extension - Virtual Servers Dispatcher</title>
         <link>http://simsmi.blogspot.com/2014/01/jep-114-tls-sni-extension-virtual.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-NxsLeZJY0JM/UsZiJ-jzJnI/AAAAAAAAAOw/RZenEob6hyc/s1600/8c60a28054636f9f50eef16ef11335e5.jpg&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-NxsLeZJY0JM/UsZiJ-jzJnI/AAAAAAAAAOw/RZenEob6hyc/s1600/8c60a28054636f9f50eef16ef11335e5.jpg&quot; height=&quot;400&quot; width=&quot;285&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The implementation of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/114&quot;&gt;JEP 114&lt;/a&gt;&amp;nbsp;(TLS Server Name Indication (SNI) Extension) had&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/3f62cfc4e83d&quot;&gt;&amp;nbsp;integrated into JDK 8&lt;/a&gt;&amp;nbsp;at October, 2012. In&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;the previous blog entries&lt;/a&gt;, we talked about the behavior changes in JSSE, and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-typical-user.html&quot;&gt;a few typical user cases&lt;/a&gt;. Let's look at a special user case, how to design a virtual server dispatcher in Java. Please refer to javax.net.ssl package of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk8/docs/api/&quot;&gt;JDK 8 APIs&lt;/a&gt;&amp;nbsp;for the detailed specification.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Prepare the ClientHello Parser&lt;/h3&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt;Applications need to implementation their own APIs to parser the client hello message from a plaintext socket. Suppose that an application design the following API to do the work, SSLCapabilities and SSLExplorer.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;SSLCapabilities is defined to show the SSL/TLS security capabilities during handshaking, SSLCapabilities can be retrieved by exploring the network data of an SSL/TLS connection via SSLExplorer.explore(ByteBuffer).&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;/**&lt;br /&gt; * Encapsulates the security capabilities&lt;br /&gt; * of an SSL/TLS connection.&lt;br /&gt; * &lt;br /&gt; * The security capabilities are the list&lt;br /&gt; * ciphersuites to be accepted in an SSL/TLS&lt;br /&gt; * handshake, the record version, the hello&lt;br /&gt; * version, and server name indication, etc.,&lt;br /&gt; * of an SSL/TLS connection.&lt;br /&gt; * &lt;br /&gt; * {@code SSLCapabilities} can be retrieved by exploring the network&lt;br /&gt; * data of an SSL/TLS connection via {@link SSLExplorer#explore(ByteBuffer)}&lt;br /&gt; * or {@link SSLExplorer#explore(byte[], int, int)}.&lt;br /&gt; *&lt;br /&gt; * @see SSLExplorer&lt;br /&gt; */&lt;br /&gt;public abstract class SSLCapabilities {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Returns the record version of an SSL/TLS connection&lt;br /&gt;     *&lt;br /&gt;     * @return a non-null record version&lt;br /&gt;     */&lt;br /&gt;    public abstract String getRecordVersion();&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Returns the hello version of an SSL/TLS connection&lt;br /&gt;     *&lt;br /&gt;     * @return a non-null hello version&lt;br /&gt;     */&lt;br /&gt;    public abstract String getHelloVersion();&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Returns a {@code List} containing all&lt;br /&gt;     * {@link SNIServerName}s of the server name indication.&lt;br /&gt;     *&lt;br /&gt;     * @return a non-null immutable list of {@link SNIServerName}s&lt;br /&gt;     *         of the server name indication parameter, may be empty&lt;br /&gt;     *         if no server name indication.&lt;br /&gt;     *&lt;br /&gt;     * @see SNIServerName&lt;br /&gt;     */&lt;br /&gt;    public abstract List&amp;lt;SNIServerName&amp;gt; getServerNames();&lt;br /&gt;}&lt;span style=&quot;font-family:Times New Roman;&quot;&gt;&lt;span style=&quot;white-space:normal;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;&lt;/blockquote&gt;SSLExplorer is defined to explore the initial ClientHello message from TLS Client. But it does not kick off handshaking, or consume network data. The SSLExplorer.explore() method parses the ClientHello message, and retrieve the security parameters from ClientHello message into SSLCapabilities.&lt;br /&gt;&lt;br /&gt;This method must be called before handshaking occurs on any TLS connections.&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;/**&lt;br /&gt; * Instances of this class acts as an explorer of the network data of an&lt;br /&gt; * SSL/TLS connection.&lt;br /&gt; */&lt;br /&gt;public final class SSLExplorer {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * The header size of TLS/SSL records.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * The value of this constant is {@value}.&lt;br /&gt;     */&lt;br /&gt;    public final static int RECORD_HEADER_SIZE = 0x05;&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Returns the required size in byte from byte buffer to explore an&lt;br /&gt;     * SSL/TLS connection.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * This method tries to parse as few bytes as possible from&lt;br /&gt;     * {@code source} byte buffer to get the length of an&lt;br /&gt;     * SSL/TLS record.&lt;br /&gt;     *&lt;br /&gt;     * @param  source&lt;br /&gt;     *         a {@code ByteBuffer} containing&lt;br /&gt;     *         inbound or outbound network data for an SSL/TLS connection.&lt;br /&gt;     *&lt;br /&gt;     * @throws BufferUnderflowException if less than {@code RECORD_HEADER_SIZE}&lt;br /&gt;     *         bytes remaining in {@code source}&lt;br /&gt;     */&lt;br /&gt;    public final static int getRequiredSize(ByteBuffer source);&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Returns the required size in byte from byte array to explore an&lt;br /&gt;     * SSL/TLS connection.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * This method tries to parse as few bytes as possible from&lt;br /&gt;     * {@code source} byte array to get the length of an&lt;br /&gt;     * SSL/TLS record.&lt;br /&gt;     *&lt;br /&gt;     * @param  source&lt;br /&gt;     *         a byte array containing inbound or outbound network data for&lt;br /&gt;     *         an SSL/TLS connection.&lt;br /&gt;     * @param  offset&lt;br /&gt;     *         the start offset in array {@code source} at which the&lt;br /&gt;     *         network data is read from.&lt;br /&gt;     * @param  length&lt;br /&gt;     *         the maximum number of bytes to read.&lt;br /&gt;     *&lt;br /&gt;     * @throws BufferUnderflowException if less than {@code RECORD_HEADER_SIZE}&lt;br /&gt;     *         bytes remaining in {@code source}&lt;br /&gt;     */&lt;br /&gt;    public final static int getRequiredSize(byte[] source,&lt;br /&gt;            int offset, int lenght) throws IOException;&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Launch and explore the security capabilities from byte buffer.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * This method tries to parse as few records as possible from&lt;br /&gt;     * {@code source} byte buffer to get the {@code SSLCapabilities}&lt;br /&gt;     * of an SSL/TLS connection.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * Please NOTE that this method must be called before any handshaking&lt;br /&gt;     * occurs.  The behavior of this method is not defined in this release&lt;br /&gt;     * if the handshake has begun, or has completed.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * This method accesses the {@code source} parameter in read-only&lt;br /&gt;     * mode, and does not update the buffer's properties such as capacity,&lt;br /&gt;     * limit, position, and mark values.&lt;br /&gt;     *&lt;br /&gt;     * @param  source&lt;br /&gt;     *         a {@code ByteBuffer} containing&lt;br /&gt;     *         inbound or outbound network data for an SSL/TLS connection.&lt;br /&gt;     *&lt;br /&gt;     * @throws IOException on network data error&lt;br /&gt;     * @throws BufferUnderflowException if no enough source bytes available&lt;br /&gt;     *         to make a complete exploration.&lt;br /&gt;     *&lt;br /&gt;     * @return the explored {@code SSLCapabilities} of the SSL/TLS&lt;br /&gt;     *         connection&lt;br /&gt;     */&lt;br /&gt;    public final static SSLCapabilities explore(ByteBuffer source)&lt;br /&gt;            throws IOException;&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Launch and explore the security capabilities from byte array.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * Please NOTE that this method must be called before any handshaking&lt;br /&gt;     * occurs.  The behavior of this method is not defined in this release&lt;br /&gt;     * if the handshake has begun, or has completed.&lt;br /&gt;     * &amp;lt;P&amp;gt;&lt;br /&gt;     * Please NOTE that this method must be called before any handshaking&lt;br /&gt;     * occurs.  Once handshake has begun, or has completed, the security&lt;br /&gt;     * capabilities can not and should not be launched with this method.&lt;br /&gt;     *&lt;br /&gt;     * @param  source&lt;br /&gt;     *         a byte array containing inbound or outbound network data for&lt;br /&gt;     *         an SSL/TLS connection.&lt;br /&gt;     * @param  offset&lt;br /&gt;     *         the start offset in array {@code source} at which the&lt;br /&gt;     *         network data is read from.&lt;br /&gt;     * @param  length&lt;br /&gt;     *         the maximum number of bytes to read.&lt;br /&gt;     *&lt;br /&gt;     * @throws IOException on network data error&lt;br /&gt;     * @throws BufferUnderflowException if no enough source bytes available&lt;br /&gt;     *         to make a complete exploration.&lt;br /&gt;     * @return the explored {@code SSLCapabilities} of the SSL/TLS&lt;br /&gt;     *         connection&lt;br /&gt;     *&lt;br /&gt;     * @see #explore(ByteBuffer)&lt;br /&gt;     */&lt;br /&gt;    public final static SSLCapabilities explore(byte[] source,&lt;br /&gt;            int offset, int length) throws IOException;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/blockquote&gt;Please note that the above two classes is not part of JDK. It is used to illustrate how to use JSSE specification of server name indication.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Socket Based Scenarios of a virtual servers dispatcher&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Step 1: register server name handler in the dispatcher server&lt;/b&gt;&lt;br /&gt;At the step, the application may create different SSLContext for different server name indication, or link a certain server name indication to a specified virtual machine or distributed system. &lt;br /&gt;&lt;br /&gt;For example, for server name of &quot;www.example.com&quot;, the registered server name handler may be for a local virtual hosting web service. The local virtual hosting web service will use a specified SSL context. For server name of &quot;www.invalid.com&quot;, the registered server name handler may be for a virtual machine hosting on &quot;10.0.0.36&quot;. The handler may map proxy this connection to the virtual machine. &lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 2: create a server socket, and accept a new connection&lt;/b&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    ServerSocket serverSocket = new ServerSocket(serverPort);&lt;br /&gt;    Socket socket = serverSocket.accept();&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 3: read and buffer bytes from the socket input stream, and explore the buffered bytes&lt;/b&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    InputStream ins = socket.getInputStream();&lt;br /&gt;&lt;br /&gt;    byte[] buffer = new byte[0xFF];&lt;br /&gt;    int position = 0;&lt;br /&gt;    SSLCapabilities capabilities = null;&lt;br /&gt;&lt;br /&gt;    // Read the header of TLS record&lt;br /&gt;    while (position &amp;lt; SSLExplorer.RECORD_HEADER_SIZE) {&lt;br /&gt;        int count = SSLExplorer.RECORD_HEADER_SIZE - position;&lt;br /&gt;        int n = ins.read(buffer, position, count);&lt;br /&gt;        if (n &amp;lt; 0) {&lt;br /&gt;            throw new Exception(&quot;unexpected end of stream!&quot;);&lt;br /&gt;        }&lt;br /&gt;        position += n;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // Get the required size to exlpore the SSL capabilities&lt;br /&gt;    int recordLength = SSLExplorer.getRequiredSize(buffer, 0, position);&lt;br /&gt;    if (buffer.length &amp;lt; recordLength) {&lt;br /&gt;        buffer = Arrays.copyOf(buffer, recordLength);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    while (position &amp;lt; recordLength) {&lt;br /&gt;        int count = recordLength - position;&lt;br /&gt;        int n = ins.read(buffer, position, count);&lt;br /&gt;        if (n &amp;lt; 0) {&lt;br /&gt;            throw new Exception(&quot;unexpected end of stream!&quot;);&lt;br /&gt;        }&lt;br /&gt;        position += n;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    // Explore&lt;br /&gt;    capabilities = SSLExplorer.explore(buffer, 0, recordLength);;&lt;br /&gt;    if (capabilities != null) {&lt;br /&gt;        System.out.println(&quot;Record version: &quot; +&lt;br /&gt;                capabilities.getRecordVersion());&lt;br /&gt;        System.out.println(&quot;Hello version: &quot; +&lt;br /&gt;                capabilities.getHelloVersion());&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 4: get the requested server name from the SSLCapabilities&lt;/b&gt;&lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    List&amp;lt;SNIServerName&amp;gt; serverNames = capabilities.getServerNames();&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Step 5: looking for the registered server name handler for this server name indication&lt;/b&gt;&lt;br /&gt;Typically, there are two types of handler. The first one is that the service of the hostname is resident in a virtual machine or another distributed separated box. In this case, the application need to forward the connection to the destination. The application requires to read and write the raw internet data, rather than the SSL application from the socket stream. &lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    Socket destinationSocket = new Socket(serverName, 443);&lt;br /&gt;&lt;br /&gt;    // forward buffered bytes and network data from the current socket to&lt;br /&gt;    // destinationSocket, proxy-like coding&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;The 2nd one is that the service of the server name is resident in the same process. And the service is able to use the socket directly. In this case, the application will simply set the SSLSocket instance to the server. &lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    SSLContext serviceContext = ...&lt;br /&gt;                    // get service context from registered handler&lt;br /&gt;                    // or create the context on the fly&lt;br /&gt;    SSLSocketFactory serviceSocketFac =&lt;br /&gt;                    serviceContext.getSSLSocketFactory();&lt;br /&gt;&lt;br /&gt;    ByteArrayInputStream bais =&lt;br /&gt;        new ByteArrayInputStream(buffer, 0, position);&lt;br /&gt;                           // wrap the buffered bytes&lt;br /&gt;    SSLSocket serviceSocket =&lt;br /&gt;        (SSLSocket)serviceSocketFac.createSocket(socket, bais, true);&lt;br /&gt;&lt;br /&gt;    // Now the service can use the serviceSocket as normal.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;SSLEngine Based Scenarios of a virtual servers dispatcher&lt;/h3&gt;&lt;br /&gt;Similar to the socket based scenatios. There is a little different in the 2nd case in step 5. &lt;br /&gt;The 2nd case is that the service of the hostname is resident in the same process. And hostname service is able to use the engine directly. In this case, the application will simply feed the net data to the new engine. &lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    SSLContext serviceContext =&lt;br /&gt;                    // get service context from registered handler&lt;br /&gt;                    // or create the context on the fly&lt;br /&gt;    SSLEngine serviceEngine = serviceContext.createSSLEngine();&lt;br /&gt;&lt;br /&gt;    // Now the service can use the buffered bytes and other byte&lt;br /&gt;    // buffer as normal.&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;The scenarios for the cases that bridge SSLSocket source to SSLEngine destination, or SSLEngine source to SSLSocket destination are pretty similar to the above two scenarios. &lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;No server name indication extension&lt;/h3&gt;&lt;br /&gt;It's often that there is no server name indication extension in a ClientHello message. There is no way to select a proper service according to server name indication. &lt;br /&gt;&lt;br /&gt;For such cases, the application may want to specify a default service. When there is no server name indication extension, the connection will be delegated to the default service. &lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Failover&lt;/h3&gt;&lt;br /&gt;Please NOTE that the explore of the security capabilities should neither consume nor produce network or application data. So what about if the explore fails? &lt;br /&gt;&lt;br /&gt;SSLExploree.explore() should not checking the validity of SSL/TLS contents. However, it requires that the record format complies to SSL/TLS specification, and handshaking has not started. SSLExploree.explore() may throw IOException for such bad cases. &lt;br /&gt;&lt;br /&gt;SSLExploree.explore() cannot produce network data. And SSL/TLS protocols requires to reply with proper alert messages. It is not recommended to close the raw socket out of band of SSL/TLS protocols. Failover is recommended to handle exception thrown by SSLExplorer.explore(). &lt;br /&gt;&lt;br /&gt;The application need to define a failover SSLContext, it is not used to negotiate any real SSL/TLS connection. Instead, it is used to close the SSL/TLS connection with proper alert message. So the initialization of the context can be very basic. &lt;br /&gt;&lt;blockquote class=&quot;tr_bq&quot;&gt;&lt;pre&gt;    byte[] buffer = ...       // buffered network data&lt;br /&gt;    boolean failed = true;    // SSLExploree.explore() throws an exception&lt;br /&gt;&lt;br /&gt;    // off course, the above explore failed. Faile to failure handler&lt;br /&gt;    SSLContext context = SSLContext.getInstance(&quot;TLS&quot;);&lt;br /&gt;                                        // the failover SSLContext&lt;br /&gt;    context.init(null, null, null);&lt;br /&gt;    SSLSocketFactory sslsf = context.getSocketFactory();&lt;br /&gt;    ByteArrayInputStream bais =&lt;br /&gt;            new ByteArrayInputStream(buffer, 0, position);&lt;br /&gt;    SSLSocket sslSocket = (SSLSocket)sslsf.createSocket(socket, bais, true);&lt;br /&gt;&lt;br /&gt;    SNIMatcher matcher = new DenialSNIMatcher(); // see case 2.2.1&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;    SSLParameters params = sslSocket.getSSLParameters();&lt;br /&gt;    params.setSNIMatchers(matchers);    // no recognizable server name&lt;br /&gt;    sslSocket.setSSLParameters(params);&lt;br /&gt;&lt;br /&gt;    try {&lt;br /&gt;        InputStream sslIS = sslSocket.getInputStream();&lt;br /&gt;        sslIS.read();&lt;br /&gt;    } catch (Exception e) {&lt;br /&gt;        System.out.println(&quot;server exception &quot; + e);&lt;br /&gt;    } finally {&lt;br /&gt;        sslSocket.close();&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;br /&gt;To put it together, as SSLExplore.explore() may fail with exception, the application MUST handle the exception with a failover solution, such as failover SSLContext. An application may also need to handle ClientHello message without server name indication extension, the application MUST specify a default service for non-server-name-indication handshaking. And an application may be expected to handle server name indication properly, the application MUST specify the target service for a particular server name indication. &lt;br /&gt;&lt;br /&gt;Hope it helps! &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;More blog entries about TLS Server Name Indication (SNI) Extension:&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2013/12/tls-server-name-indication-extension.html&quot; style=&quot;line-height:18px;&quot;&gt;TLS Server Name Indication Extension and Unrecognized_name&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse_2.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes (Continue)&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-typical-user.html&quot;&gt;JEP 114: TLS SNI Extension - Typical User Cases&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-2343273439919346509</guid>
         <pubDate>Thu, 02 Jan 2014 22:20:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-NxsLeZJY0JM/UsZiJ-jzJnI/AAAAAAAAAOw/RZenEob6hyc/s72-c/8c60a28054636f9f50eef16ef11335e5.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - JEP 114: TLS SNI Extension - Typical User Cases</title>
         <link>http://simsmi.blogspot.com/2014/01/jep-114-tls-sni-extension-typical-user.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-YlIBHiuga18/UsZQOZ8Y4XI/AAAAAAAAAOg/ZjU9WGSty3E/s1600/01.jpg&quot; style=&quot;clear:left;float:left;margin-bottom:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-YlIBHiuga18/UsZQOZ8Y4XI/AAAAAAAAAOg/ZjU9WGSty3E/s1600/01.jpg&quot; height=&quot;320&quot; width=&quot;240&quot;/&gt;&lt;/a&gt;&lt;/div&gt;The implementation of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/114&quot;&gt;JEP 114&lt;/a&gt;&amp;nbsp;(TLS Server Name Indication (SNI) Extension) had&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/3f62cfc4e83d&quot;&gt;&amp;nbsp;integrated into JDK 8&lt;/a&gt;&amp;nbsp;at October, 2012. In&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;the previous two blog entries&lt;/a&gt;, we talked about the behavior changes in JSSE. Let's look at a few typical user cases. Please refer to javax.net.ssl package of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk8/docs/api/&quot;&gt;JDK 8 APIs&lt;/a&gt;&amp;nbsp;for the detailed specification.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Client side user cases&lt;/h3&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;b&gt;Case C-1: I want to access &quot;www.example.com&quot;&lt;/b&gt;&lt;/div&gt;Set the host name explicit. &lt;br /&gt;&lt;pre&gt;    SNIHostName serverName = new SNIHostName(&quot;www.example.com&quot;);&lt;br /&gt;    List&amp;lt;SNIServerName&amp;gt; serverNames = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    serverNames.add(serverName);&lt;br /&gt;    sslParameters.setServerNames(serverNames);&lt;/pre&gt;It is recommend that the client always specify the host name.  &lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Case C-2:&amp;nbsp;I don't want to use server name indication&lt;/b&gt;&lt;/div&gt;The server side terminates the transaction if server name indication is presented. I cannot use server name indication because of the compatibility issues in server side.&lt;br /&gt;&lt;br /&gt;Disable the server name indication with empty server name list: &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;br /&gt;&lt;pre&gt;    List&amp;lt;SNIServerName&amp;gt; serverNames = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    sslParameters.setServerNames(serverNames);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Case C-3:&amp;nbsp;I want to access URL, &quot;https://www.example.com&quot;&lt;/b&gt;&lt;/div&gt;Doing nothing in SunJSSE, the provider default behaviors will set the hostname for me. I don't have to care about what's the real server name indication.&lt;br /&gt;&lt;br /&gt;But third parties' providers may not support default server name indication. It is recommended to use Case C-1 to be provider independent.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Case C-4:&amp;nbsp;I want to switch a socket from server mode to client mode&lt;/b&gt;&lt;/div&gt;The socket was in server mode, but I need it work in client mode. Firstly, need to switch the mode:Set the host name explicit.&lt;br /&gt;&lt;pre&gt;    sslSocket.setUseClientMode(true);&lt;/pre&gt;Secondly, need to reset the server name indication parameters in server mode, &amp;nbsp;see case S-1~S-5 for different purposes.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;h3&gt;Server side user cases&lt;/h3&gt;&lt;div&gt;&lt;b&gt;Case S-1:&amp;nbsp;I want to accept all kind of server name indication&lt;/b&gt;&lt;/div&gt;Doing nothing, the server will ignore the server name indication.&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;b&gt;Case S-2:&amp;nbsp;I want to deny all server name indication of type host_name&lt;/b&gt;&lt;/div&gt;Set an invalid server name pattern for host_name:&lt;br /&gt;&lt;pre&gt;    SNIMatcher matcher = SNIHostName.createSNIMatcher(&quot;&quot;);&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;    sslParameters.setSNIMatchers(matchers);&lt;/pre&gt;Or define a new SNIMatcher extension, which the matches() method always returns false.&lt;/div&gt;&lt;div&gt;&lt;pre&gt;    class DenialSNIMatcher extends SNIMatcher {&lt;br /&gt;        DenialSNIMatcher() {&lt;br /&gt;            super(StandardConstants.SNI_HOST_NAME);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        @Override&lt;br /&gt;        public boolean matches(SNIServerName serverName) {&lt;br /&gt;            return false;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    SNIMatcher matcher = new DenialSNIMatcher();&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;&lt;br /&gt;    sslParameters.setSNIMatchers(matchers);&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Case S-3:&amp;nbsp;I want to be accessed as &quot;www.example.com&quot;&lt;/b&gt;&lt;/div&gt;Set the recognizable server name for &quot;host_name&quot; as &quot;www.example.com&quot;:&lt;br /&gt;&lt;pre&gt;    SNIMatcher matcher =&lt;br /&gt;        SNIHostName.createSNIMatcher(&quot;www&amp;#92;&amp;#92;.example&amp;#92;&amp;#92;.com&quot;);&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;    sslParameters.setSNIMatchers(matchers);&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Case S-4:&amp;nbsp;I want to be accessed as &quot;www.example.com&quot; or &quot;www.example.net&quot;&lt;/b&gt;&lt;/div&gt;Set the recognizable server name for &quot;host_name&quot; as &quot;www.example.com&quot; &amp;nbsp;or &quot;www.example.net&quot;:&lt;br /&gt;&lt;pre&gt;    SNIMatcher matcher =&lt;br /&gt;        SNIHostName.createSNIMatcher(&quot;www&amp;#92;&amp;#92;.example&amp;#92;&amp;#92;.(com|net)&quot;);&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;    sslParameters.setSNIMatchers(matchers);&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;b&gt;Case S-5:&amp;nbsp;I want to be accessed as any hostname in the example.com domain&lt;/b&gt;&lt;/div&gt;Set the recognizable server name for &quot;host_name&quot; as &quot;*.example.com&quot;:&lt;br /&gt;&lt;pre&gt;    SNIMatcher matcher =&lt;br /&gt;        SNIHostName.createSNIMatcher(&quot;(.*&amp;#92;&amp;#92;.)*example&amp;#92;&amp;#92;.com&quot;);&lt;br /&gt;    Collection&amp;lt;SNIMatcher&amp;gt; matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;    matchers.add(matcher);&lt;br /&gt;    sslParameters.setSNIMatchers(matchers);&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;b&gt;Case S-6:&amp;nbsp;I want to switch a socket from client mode to server mode&lt;/b&gt;&lt;/div&gt;The socket was in client mode, but I need it work in server mode. &amp;nbsp;Firstly, need to switch the mode:&lt;br /&gt;&lt;pre&gt;    sslSocket.setUseClientMode(true);&lt;/pre&gt;Secondly, need to reset the server name indication in client mode, see case C-1-C-3 for different purpose. &lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More blog entries about TLS Server Name Indication (SNI) Extension:&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2013/12/tls-server-name-indication-extension.html&quot; style=&quot;line-height:18px;&quot;&gt;TLS Server Name Indication Extension and Unrecognized_name&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse_2.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes (Continue)&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-virtual.html&quot;&gt;JEP 114: TLS SNI Extension - Virtual Servers Dispatcher&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-5510926225638816930</guid>
         <pubDate>Thu, 02 Jan 2014 21:12:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-YlIBHiuga18/UsZQOZ8Y4XI/AAAAAAAAAOg/ZjU9WGSty3E/s72-c/01.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - JEP 114: TLS SNI Extension - SunJSSE Behavior Changes (Continue)</title>
         <link>http://simsmi.blogspot.com/2014/01/jep-114-tls-sni-extension-sunjsse_2.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;margin-right:1em;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://1.bp.blogspot.com/-O7yEyqvJ-44/UsU94oHoqkI/AAAAAAAAAOA/pKz3BRPCTxw/s1600/002.jpg&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-O7yEyqvJ-44/UsU94oHoqkI/AAAAAAAAAOA/pKz3BRPCTxw/s1600/002.jpg&quot; height=&quot;300&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Students Apartment,&amp;nbsp;Harbin Institute of Technology (HIT), China&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The implementation of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/114&quot;&gt;JEP 114&lt;/a&gt; (TLS Server Name Indication (SNI) Extension) had&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/3f62cfc4e83d&quot;&gt; integrated into JDK 8&lt;/a&gt;&amp;nbsp;at October, 2012. In &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;the previous blog entry&lt;/a&gt;, we talked about the behavior changes in client and server mode. This blog entry will continue to talk about behavior changes in key manager and trust manager of JSSE. Please refer to javax.net.ssl package of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk8/docs/api/&quot;&gt;JDK 8 APIs&lt;/a&gt; for the detailed specification.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Server Name Indication (SNI) sensitive KeyManager&lt;/h3&gt;&lt;br /&gt;In JDK 7 and previous releases, the KeyManager of server is not server name indication sensitive. The KeyManager of SunJSSE provider does not check the server name indication in order to get the proper key and certificate. &lt;br /&gt;&lt;br /&gt;In JDK 8, the KeyManager of server of SunJSSE provider will try check the server name indication in extension and select the appropriate keys according to requested server name indication. &lt;br /&gt;&lt;br /&gt;For example, supposed that there are three key/cert entries in server key store. The subject of the certs are &quot;cn=www.example.com&quot;, &quot;cn=www.invalid.com&quot; and &quot;cn=www.example.net&quot;. When the client requested server name indication is &quot;www.example.net&quot;, the server should be able to select the cert with subject &quot;cn=www.example.net&quot;, rather than the other two certs. &lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Server name indication sensitive TrustManager&lt;/h3&gt;&lt;br /&gt;Endpoint identification can be based on IP address or literal hostname. &lt;br /&gt;&lt;br /&gt;In JDK 7, if a SSL/TSL connection specified the literal hostname of the server, the hostname will be used to make the endpoint identification against the peer's identity presented in the end-entity X.509 certificate. &lt;br /&gt;&lt;br /&gt;For example: &lt;br /&gt;&lt;pre&gt; &lt;br /&gt;        SSLSocketFactory factory = ...&lt;br /&gt;        SSLSocket sslSocket = factory.createSocket(&quot;www.example.com&quot;, 443);&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;the hostname, &quot;www.example.com&quot; will be used to make the endpoint identification. &lt;br /&gt;&lt;br /&gt;While for&lt;br /&gt;&lt;pre&gt;        SSLSocketFactory factory = ...&lt;br /&gt;        SSLSocket sslSocket = factory.createSocket(&quot;172.16.10.6&quot;, 443);&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;as the hostname is an IP address, the endpoint identification cannot be used for literal hostname. &lt;br /&gt;&lt;br /&gt;In JDK 8, developers have a chance to explicitly set the server name indication with SSLParameters.setServerNames(List&amp;lt;SNIServerName&amp;gt; serverNames). The server name indication in client mode also has impact on endpoint identification. &lt;br /&gt;&lt;br /&gt;In SunJSSE provider, in client mode, the endpoint identification in the implementation of X509ExtendedTrustManager will make use of the server name indication, retrieved by ExtendedSSLSession.getRequestedServerNames(). &lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;        SSLSocketFactory factory = ...&lt;br /&gt;        SSLSocket sslSocket = factory.createSocket(&quot;172.16.10.6&quot;, 443);&lt;br /&gt;        // SSLEngine sslEngine = sslContext.createSSLEngine(&quot;172.16.10.6&quot;, 443);&lt;br /&gt; &lt;br /&gt;        SNIHostName serverName = new SNIHostName(&quot;www.example.com&quot;);&lt;br /&gt;        List&amp;lt;SNIServerName&amp;gt; serverNames = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;        serverNames.add(serverName);&lt;br /&gt; &lt;br /&gt;        SSLParameters params = sslSocket.getSSLParameters();&lt;br /&gt;        params.setServerNames(serverNames);&lt;br /&gt;        sslSocket.setSSLParameters(params);&lt;br /&gt;        // sslEngine.setSSLParameters(params);&lt;br /&gt;&lt;/pre&gt;the hostname in server name indication, &quot;www.example.com&quot;, will be used to make endpoint identification against the peer's identity presented in the end-entity X.509 certificate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More blog entries about TLS Server Name Indication (SNI) Extension:&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2013/12/tls-server-name-indication-extension.html&quot; style=&quot;line-height:18px;&quot;&gt;TLS Server Name Indication Extension and Unrecognized_name&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-typical-user.html&quot;&gt;JEP 114: TLS SNI Extension - Typical User Cases&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-virtual.html&quot;&gt;JEP 114: TLS SNI Extension - Virtual Servers Dispatcher&lt;/a&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-6850343503219864745</guid>
         <pubDate>Thu, 02 Jan 2014 02:01:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://1.bp.blogspot.com/-O7yEyqvJ-44/UsU94oHoqkI/AAAAAAAAAOA/pKz3BRPCTxw/s72-c/002.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - JEP 114: TLS SNI Extension - SunJSSE Behavior Changes</title>
         <link>http://simsmi.blogspot.com/2014/01/jep-114-tls-sni-extension-sunjsse.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;margin-right:1em;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-w-NPZ--kq4I/UsU9LwNzKHI/AAAAAAAAAN4/4m0nt7-hDaE/s1600/001.jpg&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-w-NPZ--kq4I/UsU9LwNzKHI/AAAAAAAAAN4/4m0nt7-hDaE/s1600/001.jpg&quot; height=&quot;400&quot; width=&quot;300&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Silver Cave, Guilin, China&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;The implementation of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/114&quot;&gt;JEP 114&lt;/a&gt; (TLS Server Name Indication (SNI) Extension) had&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk8/jdk8/jdk/rev/3f62cfc4e83d&quot;&gt; integrated into JDK 8&lt;/a&gt;&amp;nbsp;at October, 2012. This blog entry will talk about some useful behavior changes and user cases that make use of SNI extenstion. &amp;nbsp;Please refer to javax.net.ssl package of&amp;nbsp;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk8/docs/api/&quot;&gt;JDK 8 APIs&lt;/a&gt; for the detailed specification.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;The SNI extension in client mode&lt;/h3&gt;&lt;br /&gt;In JDK 7, if a SSL/TSL connection specified hostname of the server, and when the hostname is fully qualified domain name (FQDN), the hostname will be used as the default server name indication in ClientHello message, implicitly.&lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; SSLSocketFactory factory = ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLSocket sslSocket = factory.createSocket(&quot;www.example.com&quot;, 443);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;the hostname, &quot;www.example.com&quot; will appear in the server name indication extension in ClientHello message.&lt;br /&gt;&lt;br /&gt;While for&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; SSLSocketFactory factory = ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLSocket sslSocket = factory.createSocket(&quot;172.16.10.6&quot;, 443);&lt;/pre&gt;&lt;br /&gt;as the hostname is an IP address, No server name indication extension will appear in ClientHello message.&lt;br /&gt;&lt;br /&gt;And for&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; SSLSocketFactory factory = ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLSocket sslSocket = factory.createSocket(&quot;docs&quot;, 443);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;although the real hostname may be docs.example.com, but as &quot;docs&quot; is not a fully qualified domain name, No server name indication extension will appear in ClientHello message.&lt;br /&gt;&lt;br /&gt;For&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; SSLSocketFactory factory = ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLSocket sslSocket = factory.createSocket(&quot;docs.example&quot;, 443);&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;the real hostname may be docs.example.com, although &quot;docs.example&quot; is not a fully qualified domain name, but the computer cannot tell this point. &quot;docs.example&quot; will be regarded as a fully qualified domain name, and server name indication extension will appear in ClientHello message. It is ambiguous!&lt;br /&gt;&lt;br /&gt;In JDK 8, developers have a chance to explicitly set the server name indication. It is SSLParameters.setServerNames(List serverNames).&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;nbsp; &amp;nbsp; SSLSocketFactory factory = ...&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLSocket sslSocket = factory.createSocket(&quot;172.16.10.6&quot;, 443);&lt;br /&gt;&amp;nbsp; &amp;nbsp; // SSLEngine sslEngine = sslContext.createSSLEngine(&quot;172.16.10.6&quot;, 443);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; SNIHostName serverName = new SNIHostName(&quot;www.example.com&quot;);&lt;br /&gt;&amp;nbsp; &amp;nbsp; List serverNames = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;&amp;nbsp; &amp;nbsp; serverNames.add(serverName);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; SSLParameters params = sslSocket.getSSLParameters();&lt;br /&gt;&amp;nbsp; &amp;nbsp; params.setServerNames(serverNames);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; sslSocket.setSSLParameters(params);&lt;br /&gt;&amp;nbsp; &amp;nbsp; // sslEngine.setSSLParameters(params);&lt;/pre&gt;&lt;br /&gt;&lt;h3&gt;The SNI extension in server mode&lt;/h3&gt;&lt;br /&gt;In JDK 7, server will ignore all server name indication extension. &lt;br /&gt;&lt;br /&gt;In JDK 8, by default, server reserves the behaviors of JDK 7. &amp;nbsp;For better interoperability, providers generally will not define default matchers so that by default servers will ignore the SNI extension and continue the handshake. However, in JDK 8, server can use SNIMatcher to decide how to recognize server name indication. &lt;br /&gt;&lt;pre&gt;        SSLSocket sslSocket = sslServerSocket.accept();&lt;br /&gt; &lt;br /&gt;        SNIMatcher matcher = SNIHostName.createSNIMatcher(&lt;br /&gt;                                        &quot;www&amp;#92;&amp;#92;.example&amp;#92;&amp;#92;.(com|org)&quot;);&lt;br /&gt;        Collection matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;        matchers.add(matcher);&lt;br /&gt; &lt;br /&gt;        SSLParameters params = sslSocket.getSSLParameters();&lt;br /&gt;        params.setSNIMatchers(matchers);&lt;br /&gt;        sslSocket.setSSLParameters(params);&lt;br /&gt;&lt;/pre&gt; Or&lt;br /&gt;&lt;pre&gt;        SSLServerSocket sslServerSocket = ...;&lt;br /&gt; &lt;br /&gt;        SNIMatcher matcher = SNIHostName.createSNIMatcher(&lt;br /&gt;                                        &quot;www&amp;#92;&amp;#92;.example&amp;#92;&amp;#92;.(com|org)&quot;);&lt;br /&gt;        Collection matchers = new ArrayList&amp;lt;&amp;gt;(1);&lt;br /&gt;        matchers.add(matcher);&lt;br /&gt; &lt;br /&gt;        SSLParameters params = sslServerSocket.getSSLParameters();&lt;br /&gt;        params.setSNIMatchers(matchers);&lt;br /&gt;        sslServerSocket.setSSLParameters(params);&lt;br /&gt; &lt;br /&gt;        SSLSocket sslSocket = sslServerSocket.accept();&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;If server does not configure the server name matchers, the behavior is the same as JDK 7. &lt;br /&gt;The following table shows the interaction behaviors between server SNI configuration and client request SNI in ClientHello message. &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;  Server configured matcher           client requested SNI&lt;br /&gt;                             www.example.com    www.invalid.com    empty&lt;br /&gt; &lt;br /&gt;        www&amp;#92;&amp;#92;.example&amp;#92;&amp;#92;.com       +                    x             v&lt;br /&gt;        www&amp;#92;&amp;#92;.invalid&amp;#92;&amp;#92;.com       x                    +             v&lt;br /&gt;        no matcher                v                    v             v&lt;br /&gt; &lt;br /&gt;v: accepted server name indication, but no server name confirmation in&lt;br /&gt;   server hello message.&lt;br /&gt;+: accepted server name indication, response with recognized server name&lt;br /&gt;   confirmation in server hello message&lt;br /&gt;x: rejected with unrecognized_name fatal error&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;For example, if the server name in SNI extension of ClientHello message is &quot;www.example.com&quot;, and the server is configured to support &quot;www.example.com&quot;, the server will accept the SNI extension, and reply a confirmation in server hello message. However, if the server is configurated to support &quot;www.invalid.com&quot;, but not &quot;www.example.com&quot;, the server will deny the SNI extension, and response with a unrecognized_name fatal error. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More blog entries about TLS Server Name Indication (SNI) Extension:&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2013/12/tls-server-name-indication-extension.html&quot; style=&quot;line-height:18px;&quot;&gt;TLS Server Name Indication Extension and Unrecognized_name&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse_2.html&quot; style=&quot;line-height:18px;&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes (Continue)&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-typical-user.html&quot;&gt;JEP 114: TLS SNI Extension - Typical User Cases&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-virtual.html&quot;&gt;JEP 114: TLS SNI Extension - Virtual Servers Dispatcher&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-7664311452175150930</guid>
         <pubDate>Thu, 02 Jan 2014 01:46:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-w-NPZ--kq4I/UsU9LwNzKHI/AAAAAAAAAN4/4m0nt7-hDaE/s72-c/001.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - TLS Server Name Indication Extension and Unrecognized_name</title>
         <link>http://simsmi.blogspot.com/2013/12/tls-server-name-indication-extension.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;margin-right:1em;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://3.bp.blogspot.com/-_I4hy9w6jYA/UsZADq4PW2I/AAAAAAAAAOQ/gZoZLCk6RIU/s1600/01.jpg&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-_I4hy9w6jYA/UsZADq4PW2I/AAAAAAAAAOQ/gZoZLCk6RIU/s1600/01.jpg&quot; height=&quot;300&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Heavy Pond,&amp;nbsp;Jianfengling National Forest Park, Ledong, Hainan, China&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;It's getting hot that some TLS/HTTPS server failed with &quot;unrecognized_name&quot;. For example, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://forums.adobe.com/thread/913234&quot;&gt;the Adobe AIR 3 Code Signing Certificate Problem&lt;/a&gt;, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://groups.google.com/forum/?fromgroups#%21topic/air-tight/F8041xo4VYc&quot;&gt;the ADT handshake alert&lt;/a&gt;, and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7127374&quot;&gt;the jarsigner issue with timestamp.geotrust.com&lt;/a&gt;, etc. This entry will discussion some background of the &quot;unrecognized_name&quot; alert, and the TLS Server Name Indication (SNI) extension.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Background&lt;/h3&gt;&lt;br /&gt;&quot;Unrecognized_name&quot; is an error alert, define by &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt;. &amp;nbsp;In section 4 of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;- &quot;unrecognized_name&quot;: this alert is sent by servers that receive a server_name extension request, but do not recognize the server name.  This message MAY be fatal.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;And in section 3.1 of of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;If the server understood the client hello extension but does not recognize the server name, it SHOULD send an &quot;unrecognized_name&quot; alert (which MAY be fatal).&lt;/pre&gt;&lt;br /&gt;From above sections, we see that &quot;unrecognized_name&quot; is related to &quot;the server name&quot; or &quot;server_name&quot; extension. What is the &quot;server name&quot;? In section 3.1 of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc4366.txt&quot;&gt;RFC4366&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;3.1. Server Name Indication&lt;br /&gt;&lt;br /&gt;TLS does not provide a mechanism for a client to tell a server the name of the server it is contacting. &amp;nbsp;It may be desirable for clients to provide this information to facilitate secure connections to servers that host multiple 'virtual' servers at a single underlying network address.&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In order to provide the server name, clients MAY include an extension of type &quot;server_name&quot; in the (extended) client hello.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Let's Look Into a Case&lt;/h3&gt;&lt;br /&gt;There is a lot of discussion about the timestamp service from timestamp.EXAMPLE.com. The service is hosted as &quot;https://timestamp.EXAMPLE.com/tsa&quot;. Let's look at the scenarios of the access:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;ol style=&quot;text-align:left;&quot;&gt;&lt;li&gt;Client want to negotiate a TLS connection with timestamp.EXAMPLE.com. By default, the server name indication extension will be included in the client hello. The server name is &quot;timestamp.EXAMPLE.com&quot;. &amp;nbsp;It is expected that:&lt;/li&gt;&lt;ul style=&quot;text-align:left;&quot;&gt;&lt;li&gt;The server does not understand the server name indication extension. No problem, the server will ignore the extension, will continue the negotiation. &amp;nbsp;No impact on the TLS negotiation/handshaking.&lt;/li&gt;&lt;li&gt;The server understands the server name indication extension, but does not recognize the server &amp;nbsp;name. In this case, that's to say, the server does not think that the server name in the request, &quot;timestamp.EXAMPLE.com&quot;, is its supported/recognized server name.&lt;/li&gt;&lt;li&gt;The server is able to recognize the server name in the request. The handshaking will go on.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;/div&gt;&lt;li&gt;&amp;nbsp;The server response with a &quot;unexpected_message&quot; fatal alert. As means that the server understand the server name indication extension, but it does not recognize the server name. It looks a little weird in this case in that the server is &quot;timestamp.EXAMPLE.com&quot;, but it does not admit that it is &quot;timestamp.EXAMPLE.com&quot;.&lt;/li&gt;&lt;li&gt;The client have to terminate the negotiation because the server has denied to continue.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&amp;nbsp;It is strange, is it? The server, &quot;timestamp.EXAMPLE.com&quot;, said it is not &quot;&quot;timestamp.EXAMPLE.com&quot;.&lt;br /&gt;&lt;br /&gt;Know nothing about the details in TSA server, timestamp.EXAMPLE.com, it looks more like a configuration problem in the server side.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Workaround&lt;/h3&gt;&lt;br /&gt;It would be nice if the timestamp.EXAMPLE.com server would like to correct the behaviors in server side. &amp;nbsp;But before the correction, many applications may need to work day to day. As a workaround, the client can disable the server name indication in client hello.&lt;br /&gt;&lt;br /&gt;Java platform starts to support server name indication extension from JDK 7. &amp;nbsp;However, considering the compatibility issues, a system property, &quot;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Customization&quot;&gt;jsse.enableSNIExtension&lt;/a&gt;&quot;, is defined to disable the extension in TLS handshaking:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;   jsse.enableSNIExtension system property.&lt;br /&gt;&lt;br /&gt;   Server Name Indication (SNI) is a TLS extension, defined in RFC4366. It enables TLS connections to virtual servers, in which multiple servers for different network names are hosted at a single underlying network address.&lt;br /&gt;&lt;br /&gt;   Some very old SSL/TLS vendors may not be able handle SSL/TLS extensions. In this case, set this property to false to disable the SNI extension.&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;OK, let looks at an example in jarsigner in JDK 7. &amp;nbsp;The 2nd one uses the system property, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Customization&quot;&gt;jsse.enableSNIExtension&lt;/a&gt;, to disable the server name indication extension in client.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;$ jarsigner -keystore myKeyStore -tsa https://timestamp.EXAMPLE.com/tsa &amp;#92;&lt;br /&gt;      -signedjar signedjar.jar toBeSigned.jar myKeyAliasInKeyStore&lt;br /&gt;&lt;br /&gt;  jarsigner: unable to sign jar: javax.net.ssl.SSLProtocolException: &amp;#92;&lt;br /&gt;      handshake alert: &amp;nbsp;unrecognized_name&lt;br /&gt;&lt;br /&gt;$ jarsigner -J-Djsse.enableSNIExtension=false &amp;#92;&lt;br /&gt;      -keystore myKeyStore -tsa https://timestamp.EXAMPLE.com/tsa &amp;#92;&lt;br /&gt;      -signedjar signedjar.jar toBeSigned.jar myKeyAliasInKeyStore&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Hope it helps!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More blog entries about TLS Server Name Indication (SNI) Extension:&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-sunjsse_2.html&quot;&gt;JEP 114: TLS SNI Extension - SunJSSE Behavior Changes (Continue)&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-typical-user.html&quot;&gt;JEP 114: TLS SNI Extension - Typical User Cases&lt;/a&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2014/01/jep-114-tls-sni-extension-virtual.html&quot;&gt;JEP 114: TLS SNI Extension - Virtual Servers Dispatcher&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-460059351163763271</guid>
         <pubDate>Tue, 03 Dec 2013 20:45:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://3.bp.blogspot.com/-_I4hy9w6jYA/UsZADq4PW2I/AAAAAAAAAOQ/gZoZLCk6RIU/s72-c/01.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Smullan-Oracle   - How to determine if a signed JAR is timestamped</title>
         <link>https://blogs.oracle.com/mullan/entry/how_to_determine_if_a</link>
         <description>&lt;p&gt;Applying a timestamp when you sign a JAR is strongly recommended, as it allows you to prove that you signed the JAR during the time interval that your code signing certificate was still valid. This allows your JAR to be validated after the certificate expires thereby prolonging the lifetime of your application. There's really no good reason you should not apply a timestamp, and we are encouraging all developers &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blogs.oracle.com/java-platform-group/entry/signing_code_for_the_long&quot;&gt;to do that&lt;/a&gt; as we introduce &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blogs.oracle.com/java-platform-group/entry/new_security_requirements_for_rias&quot;&gt;stricter applet/RIA restrictions&lt;/a&gt; in JDK 7u51.&lt;/p&gt; 
  &lt;p&gt;To sign a JAR with a timestamp, use the -tsa option of the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html&quot;&gt;jarsigner&lt;/a&gt; utility, as follows:&lt;/p&gt; 
  &lt;pre&gt;    jarsigner &lt;code&gt;-tsa &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://example.tsa.url&quot;&gt;http://example.tsa.url&lt;/a&gt; jar alias&lt;/code&gt;
&lt;/pre&gt; 
  &lt;p&gt;where &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://example.tsa.url&quot;&gt;&amp;quot;http://example.tsa.url&amp;quot;&lt;/a&gt;&amp;nbsp; is an example of a URL of the Time Stamp Authority (TSA). Do an internet search for &amp;quot;timestamp server URL&amp;quot; to find TSA servers that you can use.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;You can use the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jarsigner.html&quot;&gt;jarsigner&lt;/a&gt; utility to determine if a signed JAR has been timestamped as follows: &lt;/p&gt; 
  &lt;pre&gt;    jarsigner -verify -verbose -certs signed.jar
&lt;/pre&gt; 
  &lt;p&gt;where &lt;font face=&quot;courier new,courier,monospace&quot;&gt;signed.jar&lt;/font&gt; is the name of your signed JAR. If it is timestamped, the output will include lines of the following indicating the time it was signed:&lt;/p&gt; 
  &lt;pre&gt;    [entry was signed on 8/2/13 3:48 PM]
&lt;/pre&gt; 
  &lt;p&gt;If the JAR is not timestamped, the output will not include those lines. Currently, the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;-certs&lt;/font&gt; option only prints the contents of the code signer's certificate chain, and not the Time Stamp Authority's (TSA) chain. However, there is an open &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bugs.openjdk.java.net/browse/JDK-8005124&quot;&gt;RFE&lt;/a&gt; to add that functionality.&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt;&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/how_to_determine_if_a</guid>
         <pubDate>Tue, 03 Dec 2013 13:39:18 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Understanding of OCSP Stapling</title>
         <link>http://simsmi.blogspot.com/2013/11/understanding-of-ocsp-stapling.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://2.bp.blogspot.com/-voqNF4_nbfI/UobuvOXgx5I/AAAAAAAAANQ/rq-oIhfub4w/s1600/2013-10-31+183622.jpg&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img alt=&quot;Sun and Moon Pagodas&quot; border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-voqNF4_nbfI/UobuvOXgx5I/AAAAAAAAANQ/rq-oIhfub4w/s1600/2013-10-31+183622.jpg&quot; height=&quot;300&quot; title=&quot;Sun and Moon Pagodas, Shanhu Lake, Guilin, China&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Sun and Moon Pagodas, Shanhu Lake, Guilin, China&lt;/td&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;What's OCSP Stapling?&lt;/h3&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;br /&gt;OCSP  stapling, also known as the TLS Certificate Status Request extension, is  an alternative approach to the Online Certificate Status Protocol  (OCSP) for checking the revocation status of X.509 digital certificates.  It allows the presenter of a certificate to bear the resource cost  involved in providing OCSP responses, instead of the issuing Certificate  Authority (CA). [&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/OCSP_stapling&quot;&gt;WIKI&lt;/a&gt;]&lt;br /&gt;&lt;br /&gt;With  OCSP stapling, it is the responsibility of the web site to get the OCSP  response and send OCSP response to clients/browsers in SSL/TLS  handshaking. &lt;br /&gt;&lt;br /&gt;OCSP stapling is defined as TLS Certificate Status Request extension in section 8 of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc6066.txt&quot;&gt;RFC 6066&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;The Benefits of OCSP Stapling&lt;/h3&gt;&lt;ol style=&quot;text-align:left;&quot;&gt;&lt;li&gt;The performance bottleneck of OCSP server&lt;br /&gt;If client checks the  certificate status directly from OCSP server, for each client with a  given certificate, the OCSP server has to response with a particular  certificate status. For high traffic web site, OCSP server is likely to  be the performance bottleneck.&amp;nbsp; The client side also need more  cycles (DNS, networking, CPU etc.) to communicate with OCSP server.&lt;br /&gt;&lt;br /&gt;OCSP stapling can save OCSP query cost of both OCSP server and clients.&amp;nbsp;  The certificate holder (the server), rather than the client, queries  the certificate status from OCSP server in a regular interval.&amp;nbsp; And the  OCSP response can be used directly by client side in a &quot;stapled&quot;  approach.&amp;nbsp; Note that the server performance impact is pretty limited as  the OCSP response (valid from hours to days) can be cached and used  repeatedly in the valid period.&lt;br /&gt;&lt;br /&gt;The performance impact has very bad side effect that browsers/clients  may choose to disable certificate status checking or continue the TLS  handshaking if the OCSP server is not accessible (for example, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox/&quot;&gt;Firefox will continue the connection&lt;/a&gt; if it cannot connect to the CA, and the same for &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.msdn.com/b/ieinternals/archive/2011/04/07/enabling-certificate-revocation-check-failure-warnings-in-internet-explorer.aspx&quot;&gt;IE&lt;/a&gt;).&lt;br /&gt;&lt;br /&gt;According to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blog.cloudflare.com/ocsp-stapling-how-cloudflare-just-made-ssl-30&quot;&gt;a report from CloudFlare&lt;/a&gt;, OCSP stapling can make SSL 30% faster. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The potential privacy impairment of OCSP request&lt;br /&gt; In normal OCSP  scenarios, when client requests a OCSP service, it exposes both the  server (via server certificate entry) and itself (via IP address at  least) to OCSP server, and hence disclose the browser behaviors.&amp;nbsp; A way  to verify validity without disclosing browsing behavior would be  desirable for some groups of users.&lt;br /&gt;&lt;br /&gt;OCSP stapling solved this  issue because client won't need to query OCSP server any more, while  server queries of OCSP status won't disclose any client information at  all. &lt;br /&gt;&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The limitation of the Captive Portal technique  &lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/Captive_portal&quot;&gt;The captive portal technique&lt;/a&gt; forces an HTTP client on a network to see a special web page (usually  for authentication purposes) before using the Internet normally.&amp;nbsp;&amp;nbsp; In  such environments,&amp;nbsp; clients are not able to check OCSP status of the  SSL/TLS certificate since all Internet access is blocked until  authentication is successful.&lt;br /&gt;&lt;br /&gt;There is no such limitation with OCSP stapling as OCSP status is stapled within the target SSL handing processes.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;The deployment of OCSP Stapling&lt;/h3&gt;&lt;br /&gt;In Server side,&lt;/div&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;ul style=&quot;text-align:left;&quot;&gt;&lt;li&gt;Apache HTTP Server supports OCSP stapling since version 2.3.3, with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://httpd.apache.org/docs/trunk/mod/mod_ssl.html#sslusestapling&quot;&gt;SSLUseStapling Directive&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Nginx web server supports OCSP stapling since version 1.3.7/1.4.0, with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_stapling&quot;&gt;ssl_stapling directive&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Microsoft IIS web server supports OCSP stapling since version 7. The feature is enabled by default. It is also &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://technet.microsoft.com/en-us/library/hh826044%28v=ws.10%29.aspx&quot;&gt;enabled in Kerberos PKINIT&lt;/a&gt;.&lt;/li&gt;&lt;/ul&gt;In client side,&lt;br /&gt;&lt;ul style=&quot;text-align:left;&quot;&gt;&lt;li&gt;Beginning with Windows Server 2008,&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://technet.microsoft.com/en-us/library/hh826044%28v=ws.10%29.aspx&quot;&gt; Kerberos clients will request OCSP stapling when using PKINIT by default&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Firefox,&amp;nbsp; since &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ghacks.net/2013/08/01/firefox-25-gets-ocsp-stapling-which-improves-privacy/&quot;&gt;version 25&lt;/a&gt; (and this &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blog.mozilla.org/security/2013/07/29/ocsp-stapling-in-firefox/&quot;&gt;link&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;IE  (it is said OCSP stapling is supported since Vista, but I did not get  the declare yet.&amp;nbsp; IE 10 does support OSCP stapling according to my  test.)&lt;/li&gt;&lt;li&gt;Google Chrome browser (no data so far when it get supported.&amp;nbsp; Chrom version 30 does support it according to my test)&lt;/li&gt;&lt;li&gt;Opera browser (no date so far when it get supported. Opera 12.11 does support it according to my test)&lt;/li&gt;&lt;/ul&gt;TLS Vendors,&lt;br /&gt;&lt;ul style=&quot;text-align:left;&quot;&gt;&lt;li&gt;The OpenSSL project included support in their 0.9.8h since 2008, please also take care of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.openssl.org/news/secadv_20110208.txt&quot;&gt;the OCSP stapling vulnerability in OpenSSL&lt;/a&gt;.&lt;/li&gt;&lt;li&gt;Microsoft IIS/Schennel &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://technet.microsoft.com/en-us/library/ee619754%28WS.10%29.aspx&quot;&gt;support OCSP stapling&lt;/a&gt; since version 7.&lt;/li&gt;&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://developer.mozilla.org/en-US/docs/NSS/NSS_3.15_release_notes&quot;&gt;NSS supports OCSP stapling since version 3.15.&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;Why a SSL/TLS vendor need this feature&lt;/h3&gt;&lt;ol style=&quot;text-align:left;&quot;&gt;&lt;li&gt;Because of performance, we cannot enable OCSP checking on TLS client side by default.&amp;nbsp; Chrome had &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.imperialviolet.org/2012/02/05/crlsets.html&quot;&gt;decide to disable OCSP checking&lt;/a&gt; because of performance.&amp;nbsp; However, if check certificate status cannot be checked,  there is a security issue if certificate has been revoked.&lt;/li&gt;&lt;li&gt;Support OCSP stapling in server side boost the performance and improve security of client sides who supports OCSP stapling. &lt;/li&gt;&lt;li&gt;OCSP based certificate status checking of TLS cannot work in a certain environment, for example in Captive Porta environment. &lt;/li&gt;&lt;li&gt;It's required to check certificate status for EV certificate.&lt;/li&gt;&lt;li&gt;Generally, Java  based SSL web server, for example Tomcat/Glassfish,&amp;nbsp; may also want to  support OCSP stapling to better service its customers and compete with other platform, for example Apachs HTTP server, Nginx and  Microsoft IIS. &lt;/li&gt;&lt;li&gt;OCSP stapling has been widely supported in the industry in both client and server.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-5984619360299886264</guid>
         <pubDate>Tue, 12 Nov 2013 23:33:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://2.bp.blogspot.com/-voqNF4_nbfI/UobuvOXgx5I/AAAAAAAAANQ/rq-oIhfub4w/s72-c/2013-10-31+183622.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - Harness SSL and JSSE: Key Size Control</title>
         <link>http://simsmi.blogspot.com/2013/11/harness-ssl-and-jsse-key-size-control.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;float:left;text-align:left;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://4.bp.blogspot.com/-m2Yqc8BxHvM/UobyUuehMTI/AAAAAAAAANg/aocB052DAU4/s1600/2013-11-03+092536.jpg&quot; style=&quot;clear:left;margin-bottom:1em;margin-left:auto;margin-right:auto;&quot;&gt;&lt;img alt=&quot;Aged Bridge, Yulong River, Yangshuo, China&quot; border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-m2Yqc8BxHvM/UobyUuehMTI/AAAAAAAAANg/aocB052DAU4/s400/2013-11-03+092536.jpg&quot; height=&quot;300&quot; title=&quot;Aged Bridge, Yulong River, Yangshuo, China&quot; width=&quot;400&quot;/&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align:center;&quot;&gt;Aged Bridge, Yulong River, Yangshuo, China&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;h3&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Why Key Size Concerns&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;The  key size is an important security parameter to determine the strength  of cryptography algorithms. For example, RSA keys with fewer than 1024  bits are considered forgeable.&amp;nbsp; If RSA keys less than 1024 bits are used  in X.509 certificates, the private keys used in these certificates can  be derived and could allow an attacker to duplicate the certificates and  use them fraudulently to spoof content, perform phishing attacks, or  perform man-in-the-middle attacks.&lt;br /&gt;&lt;br /&gt;On August 14, 2012,  Microsoft offered an update to Windows that restricts the use of  certificates with RSA keys less than 1024 bits in length.&amp;nbsp; As of October  9, 2012, the update is delivered via automatic update through the  Microsoft update service.&amp;nbsp; Microsoft recommends that customers apply the  update at the earliest opportunity.&lt;br /&gt;&lt;br /&gt;Since JDK 7u12,&amp;nbsp;  RSA keys less than 1024 bits in X.509 certificates are disabled.&amp;nbsp; This  is in line with the NIST recommendations to move to a minimum of  2048-bit keys by January 1, 2014.&amp;nbsp; With this key size restriction, those  who use X.509 certificates based on RSA keys less than 1024 bits will  encounter compatibility issues with certification path building and  validation.&amp;nbsp; This key size restriction also impacts components that  based on X.509 certificates, for example signed JAR verification,  SSL/TLS transportation, HTTPS connections, etc.&lt;br /&gt;&lt;br /&gt;According to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.trustworthyinternet.org/ssl-pulse/&quot;&gt;the SSL surveys&lt;/a&gt; on &lt;span class=&quot;date&quot;&gt;November 03, 2013&lt;/span&gt;,  none out of around 200,000 SSL-enabled web sites based on Alexa's list  of most popular sites are using keys below 1024 bits.&amp;nbsp; And according to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://factorable.net/weakkeys12.extended.pdf&quot;&gt;another research &lt;/a&gt;targeted  more wild scope, 0.96% (123,038) of 12,828,613 public live SSL hosts  and 0.08%&amp;nbsp; (8,459)of&amp;nbsp; 10,216,363 live SSH hosts in the world are using a  key size of 512 bits.&amp;nbsp; In order to avoid any compatibility issue,  applications are strongly recommended to renew their certificates with  stronger keys. Or on your own risks, adjust the key size restriction  property (jdk.certpath.disabledAlgorithms) to permit the smaller key  sizes in case of any compatibility issue.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;The impact on JSSE&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;Since  JDK 7u12,&amp;nbsp; RSA keys less than 1024 bits in X.509 certificates are  disabled. &amp;nbsp; This improvement directly impacts the behaviors of SunJSSE  (Oracle JSSE provider) if certificate based authentication is used and  the certification path contains RSA keys less than 1024 bits. &lt;br /&gt;&lt;br /&gt;This restriction is limited via security property, &quot;jdk.certpath.disabledAlgorithms&quot; (See more &quot;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2011/07/java-se-7-release-security-enhancements.html&quot;&gt;Java™ SE 7 Release Security Enhancements - Weak Cryptography Control&lt;/a&gt;&quot; about this property). &lt;br /&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;pre&gt;jdk.certpath.disabledAlgorithms=MD2, RSA keySize &amp;lt; 1024&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;This security property was introduced since  JDK 7.&amp;nbsp; There is no such handy approach in JDK 6 and 5.0 as the author  wrote this blog.&lt;br /&gt;&lt;br /&gt;&lt;h3 style=&quot;text-align:left;&quot;&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Workarounds&lt;/span&gt;&lt;/h3&gt;&lt;br /&gt;If RSA keys  less than 1024 bits in X.509 certificates have to be used in a certain  circumstance, it is likely to run into compatibility because of this key  size restriction.&amp;nbsp; Please adjust the key size restriction property  (jdk.certpath.disabledAlgorithms) to permit small key sizes.&amp;nbsp; For  example:&lt;br /&gt;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;pre&gt;-    jdk.certpath.disabledAlgorithms=MD2, RSA keySize &amp;lt; 1024&lt;br /&gt;+    jdk.certpath.disabledAlgorithms=MD2, RSA keySize &amp;lt; 512&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Note that it is really risky.&amp;nbsp; One must  understand and control the potential risks in the application runtime  environment before enforcing this workaround.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Best Practices&lt;/span&gt;&lt;/h3&gt;&lt;ol style=&quot;text-align:left;&quot;&gt;&lt;li&gt;Put more weak key size restrictions.&amp;nbsp; Of course, please consider the  potential compatibility issues.&amp;nbsp; For example, EC keys less than 160  bits and DSA keys less than 1024 bits may be also considered too weak to  be acceptable.&lt;pre&gt;   jdk.certpath.disabledAlgorithms=MD2, RSA keySize &amp;lt; 1024, &amp;#92;&lt;br /&gt;                EC keySize &amp;lt; 160, DSA keySize &amp;lt; 1024&lt;/pre&gt;&lt;/li&gt;&lt;li&gt;Upgrade your X.509 certificate to use strong keys. At present, the  preferable security strength is 128-bits (128 bits AES/3072 bits RSA/256  bits ECC/3072 bits DSA keys). 2048 bits RSA/DSA keys is also acceptable  according to NIST recommendations (See also a summary of the time  frame, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2012/04/nist-security-strength-time-frames.html&quot;&gt;NIST Security Strength Time Frames&lt;/a&gt;).&lt;/li&gt;&lt;li&gt;Moving forward to use EC keys, which is more performance friendly.&amp;nbsp; &lt;/li&gt;&lt;li&gt;Encourage to enforce more flexible algorithm (and key size) constraints in JSSE with &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk8/docs/api/javax/net/ssl/SSLParameters.html#setAlgorithmConstraints-java.security.AlgorithmConstraints-&quot;&gt;javax.net.ssl.SSLParameters.setAlgorithmConstraints(AlgorithmConstraints&lt;/a&gt;).&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;h3&gt;&lt;span style=&quot;font-weight:bold;&quot;&gt;Looking forward …&lt;/span&gt;&lt;/h3&gt;&lt;ol&gt;&lt;li&gt;Enforce and improve algorithm and key constraints in more components other than PKI and JSSE.&lt;br /&gt;            &lt;/li&gt;&lt;br /&gt;&lt;li&gt;In a long run, enforce more strict, wide and fine key size  restriction by default, for example RSA and DSA keys must be great than  1024 bits when apply to data, and EC keys cannot be less than 224 bits.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-3227123130416166210</guid>
         <pubDate>Fri, 08 Nov 2013 04:51:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://4.bp.blogspot.com/-m2Yqc8BxHvM/UobyUuehMTI/AAAAAAAAANg/aocB052DAU4/s72-c/2013-11-03+092536.jpg" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Smullan-Oracle   - JEP 124: Enhance the Certificate Revocation-Checking API</title>
         <link>https://blogs.oracle.com/mullan/entry/jep_124_enhance_the_certificate</link>
         <description>Revocation checking is the mechanism to determine the revocation status of a certificate. If it is revoked, it is considered invalid and should not be used. Currently as of JDK 7, the PKIX implementation of &lt;font face=&quot;courier new,courier,monospace&quot;&gt;java.security.cert.CertPathValidator&lt;/font&gt;&amp;nbsp; includes a revocation checking implementation that supports both OCSP and CRLs, the two main methods of checking revocation. However, there are very few options that allow you to configure the behavior. You can always implement your own revocation checker, but that's a lot of work.&lt;br /&gt; 
  &lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/124&quot;&gt;JEP 124&lt;/a&gt; (Enhance the Certificate Revocation-Checking API) is one of the 11 new security features in JDK 8. This feature enhances the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;java.security.cert&lt;/font&gt; API to support various revocation settings such as best-effort checking, end-entity certificate checking, and mechanism-specific options and parameters. Let's describe each of these in more detail and show some examples.&lt;/p&gt; 
  &lt;p&gt;The features are provided through a new class named &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXRevocationChecker&lt;/font&gt;. A &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXRevocationChecker&lt;/font&gt; instance is returned by a PKIX &lt;font face=&quot;courier new,courier,monospace&quot;&gt;CertPathValidator&lt;/font&gt; as follows:&lt;/p&gt; 
  &lt;pre&gt;CertPathValidator cpv = CertPathValidator.getInstance(&quot;PKIX&quot;);
PKIXRevocationChecker prc = (PKIXRevocationChecker)cpv.getRevocationChecker();
&lt;/pre&gt; 
  &lt;p&gt;You can now set various revocation options by calling different methods of the returned &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXRevocationChecker&lt;/font&gt; object. For example, the best-effort option (called soft-fail) allows the revocation check to succeed if the status cannot be obtained due to a network connection failure or an overloaded server. It is enabled as follows:&lt;/p&gt; 
  &lt;pre&gt;prc.setOptions(Enum.setOf(Option.SOFT_FAIL)); 
&lt;/pre&gt; 
  &lt;p&gt;When the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;SOFT_FAIL&lt;/font&gt; option is specified, you can still obtain any exceptions that may have been thrown due to network issues. This can be useful if you want to log this information or treat it as a warning. You can obtain these exceptions by calling the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;getSoftFailExceptions&lt;/font&gt; method:&lt;/p&gt; 
  &lt;pre&gt;List&amp;lt;CertPathValidatorException&amp;gt; exceptions = prc.getSoftFailExceptions();
&lt;/pre&gt; 
  &lt;p&gt;Another new option called &lt;font face=&quot;courier new,courier,monospace&quot;&gt;ONLY_END_ENTITY&lt;/font&gt; allows you to only check the revocation status of the end-entity certificate. This can improve performance, but you should be careful using this option, as the revocation status of CA certificates will not be checked. To set more than one option, simply specify them together, for example:&lt;br /&gt;&lt;/p&gt; 
  &lt;pre&gt;prc.setOptions(Enum.setOf(Option.SOFT_FAIL, Option.ONLY_END_ENTITY));
&lt;/pre&gt; 
  &lt;p&gt;By default, &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXRevocationChecker&lt;/font&gt; will try to check the revocation status of a certificate using OCSP first, and then CRLs as a fallback. However, you can switch the order using the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PREFER_CRLS&lt;/font&gt; option, or disable the fallback altogether using the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;NO_FALLBACK&lt;/font&gt; option. For example, here is how you would only use CRLs to check the revocation status: &lt;br /&gt;&lt;/p&gt; 
  &lt;pre&gt;prc.setOptions(Enum.setOf(Option.PREFER_CRLS, Option.NO_FALLBACK));&lt;/pre&gt; 
  &lt;p&gt;There are also a number of other useful methods which allow you to specify various options such as the OCSP responder URI, the trusted OCSP responder certificate, and OCSP request extensions. However, one of the most useful features is the ability to specify a cached OCSP response with the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;setOCSPResponse&lt;/font&gt; method. This can be quite useful if the OCSPResponse has already been obtained, for example in a protocol that uses &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/OCSP_stapling&quot;&gt;OCSP stapling&lt;/a&gt;.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;After you have set all of your preferred options, you must add the &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXRevocationChecker&lt;/font&gt; to your &lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXParameters&lt;/font&gt; object as one of your custom &lt;font face=&quot;courier new,courier,monospace&quot;&gt;CertPathChecker&lt;/font&gt;s before you validate the certificate chain, as follows:&lt;/p&gt; 
  &lt;pre&gt;PKIXParameters params = new PKIXParameters(keystore);
params.addCertPathChecker(prc);
CertPathValidatorResult result = cpv.validate(path, params);

&lt;/pre&gt; 
  &lt;p&gt;Early access binaries of JDK 8 can be downloaded from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk8.java.net/download.html&quot;&gt;http://jdk8.java.net/download.html
&lt;/a&gt;&lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/jep_124_enhance_the_certificate</guid>
         <pubDate>Fri, 01 Nov 2013 14:09:41 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - Slides for my JavaOne session: &quot;Using the New JDK 8 Security Features&quot;</title>
         <link>https://blogs.oracle.com/mullan/entry/slides_for_my_javaone_session</link>
         <description>Thanks to everyone who attended my talk yesterday on &amp;quot;Using the New JDK 8 Security Features&amp;quot;. Here are the slides for my session for those that could not attend or would like a copy for further reference: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://blogs.oracle.com/mullan/resource/CON7932_Mullan.pdf&quot;&gt;CON_7932_Mullan.pdf&lt;/a&gt;.&lt;br /&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/slides_for_my_javaone_session</guid>
         <pubDate>Wed, 25 Sep 2013 17:19:58 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - JEP 131: PKCS#11 Crypto Provider for 64-bit Windows</title>
         <link>https://blogs.oracle.com/mullan/entry/jep_131_pkcs_11_crypto</link>
         <description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/131&quot;&gt;JEP 131&lt;/a&gt; (PKCS#11 Crypto Provider for 64-bit Windows) is another of the 11 new security features funded and targeted to JDK 8.&lt;/p&gt; 
  &lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/PKCS_%E2%99%AF11&quot;&gt;PKCS #11&lt;/a&gt; is a standard that defines a platform-independent API to cryptographic tokens like smart cards and hardware security modules. Oracle's JDK currently supports PKCS #11 on Solaris (SPARC and x86), Linux (32-bit and 64-bit), and Windows (32-bit). PKCS #11 support is provided via &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/security/crypto/CryptoSpec.html#Provider&quot;&gt;a JCA provider&lt;/a&gt; which is simply a bridge to the native PKCS #11 library. This allows developers to use the standard Java Cryptography APIs and take advantage of the PKCS #11 functionality without having to change their applications. Support for Solaris is configured out-of-the-box, but some additional configuration is required on the other platforms.&lt;/p&gt; 
  &lt;p&gt;JEP 131 adds PKCS #11 support for 64-bit Windows. To use the provider, additional&amp;nbsp; configuration is required that specifies the location of the
native PKCS #11 library along with additional directives as documented in the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/security/p11guide.html&quot;&gt;Java PKCS#11 Reference Guide&lt;/a&gt;.&lt;/p&gt; 
  &lt;p&gt;A PKCS #11 provider can be configured statically in the java.security file, ex:&lt;/p&gt; 
  &lt;pre&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; security.provider.1=sun.security.pkcs11.SunPKCS11 pkcs11.cfg
&lt;/pre&gt; 
  &lt;p&gt;or dynamically in code, ex:&lt;/p&gt; 
  &lt;pre&gt;    Provider p = new sun.security.pkcs11.SunPKCS11(“pkcs11.cfg”);
&amp;nbsp;   Security.addProvider(p);
&lt;/pre&gt; 
  &lt;p&gt; Early access binaries of JDK 8 can be downloaded at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk8.java.net/download.html&quot;&gt;http://jdk8.java.net/download.html
&lt;/a&gt;&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/jep_131_pkcs_11_crypto</guid>
         <pubDate>Mon, 26 Aug 2013 18:17:19 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - JEP 130: SHA-224 Message Digests</title>
         <link>https://blogs.oracle.com/mullan/entry/jep_130_sha_224_message</link>
         <description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/130&quot;&gt;JEP 130&lt;/a&gt; (SHA-224 Message Digests) is one of the 11 new security features funded and targeted to JDK 8.

&lt;/p&gt; 
  &lt;p&gt;The SHA-2 cryptographic hash family includes the SHA-224, SHA-256, SHA-384, and SHA-512 algorithms. The JDK already includes support for SHA-256, SHA-384, and SHA-512. JEP 130 completes the JDK support for the SHA-2 family.&lt;/p&gt; 
  &lt;p&gt; SHA-224 is basically a truncated version of SHA-256. The calculated hash is 224 bits (instead of 256) and is computed with a different initial value than SHA-256. It provides 112 bits of security (which is the same as two-key Triple DES). Use SHA-224 when your cryptographic application provides no more than 112 bits of security or you need the extra savings of the smaller hash size.&lt;/p&gt; 
  &lt;p&gt;Here are some code examples using SHA-224: &lt;br /&gt;&lt;/p&gt; 
  &lt;pre&gt;// Create a SHA-224 java.security.MessageDigest
MessageDigest md = MessageDigest.getInstance(“SHA-224”);

// Create a SHA224withRSA java.security.Signature
Signature sig = Signature.getInstance(“SHA224withRSA”);
// Create a SHA224withECDSA java.security.Signature
Signature esig = Signature.getInstance(“SHA224withECDSA”);

// Create an HmacSHA224 javax.crypto.KeyGenerator
KeyGenerator kg = KeyGenerator.getInstance(“HmacSHA224”);

// Create an HmacSHA224 javax.crypto.Mac
Mac mac = Mac.getInstance(“HmacSHA224”);

// Create an RSA/ECB/OAEPWithSHA-224ANDMGF1PADDING javax.crypto.Cipher
Cipher c = Cipher.getInstance(“RSA/ECB/OAEPWithSHA-224ANDMGF1PADDING”);&lt;/pre&gt; 
  &lt;p&gt;Early access binaries of JDK 8 can be downloaded at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk8.java.net/download.html&quot;&gt;http://jdk8.java.net/download.html
&lt;/a&gt;&lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/jep_130_sha_224_message</guid>
         <pubDate>Mon, 19 Aug 2013 19:50:07 +0000</pubDate>
      </item>
      <item>
         <title>by Smullan-Oracle   - I will be speaking at JavaOne 2013 on &quot;Using the New JDK 8 Security Features&quot;</title>
         <link>https://blogs.oracle.com/mullan/entry/i_will_be_speaking_at</link>
         <description>&lt;p&gt;Hi all,&lt;/p&gt; 
  &lt;p&gt;I will be presenting a session at this year's &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/javaone/index.html&quot;&gt;JavaOne 2013&lt;/a&gt; (San Francisco) on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://oracleus.activeevents.com/2013/connect/search.ww?eventRef=javaone#loadSearch-event=null&amp;amp;searchPhrase=&amp;amp;searchType=session&amp;amp;tc=0&amp;amp;sortBy=&amp;amp;p=&amp;amp;sessionTypeID=2&amp;amp;i%2811180%29=20801&amp;amp;i%2810038%29=21515&quot;&gt;&amp;quot;Using the New JDK 8 Security Features&amp;quot;&lt;/a&gt;. This will be an informative session describing the 11 new security features (aka &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/jeps/0&quot;&gt;&amp;quot;JEPs&amp;quot;&lt;/a&gt;) and will include plenty of code samples. &lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;Over the next few weeks, I will be posting new blog entries with more details of each of these features. So stay tuned for more information or attend my session if you are coming to JavaOne!&lt;br /&gt;&lt;/p&gt;</description>
         <author>Smullan-Oracle</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/i_will_be_speaking_at</guid>
         <pubDate>Thu, 15 Aug 2013 14:29:28 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Re-read [capaths]</title>
         <link>https://blogs.oracle.com/wangwj/entry/re_read_capaths</link>
         <description>&lt;h2&gt;Discovery&lt;/h2&gt;

&lt;p&gt;[capaths] does not have the same meaning in JDK and the rest of the world (See references at the bottom).&lt;/p&gt;

&lt;p&gt;In JDK, each line describes a &lt;b&gt;relation&lt;/b&gt; and one needs to consult multiple relations to create a path. In the rest of the world, each line itself is a &lt;b&gt;path&lt;/b&gt;.&lt;/p&gt;

&lt;p&gt;So, suppose shared keys are between A and B, B and C, and, C and D. For a client in A, in order to visit a service in D, it needs A -&amp;gt; B -&amp;gt; C -&amp;gt; D.&lt;/p&gt;

&lt;p&gt;In JDK, the capaths is written as&lt;/p&gt;

&lt;pre&gt;A = {
   B = .     # I can go B directly
   C = B     # To go C, I need to go B first
   D = C     # To go D, I need to go C first
}
&lt;/pre&gt;

&lt;p&gt;In the rest of the world, it's&lt;/p&gt;

&lt;pre&gt;A = {
   B = .    # I can go B directly
   C = B    # To go C, I need to go B. Done
   D = B C  # To go D, I need to go B and then C. Done
}
&lt;/pre&gt;

&lt;p&gt;and the last line is often written into multiple lines&lt;/p&gt;

&lt;pre&gt;D = B
D = C
&lt;/pre&gt;

&lt;p&gt;although this becomes not so clear.&lt;/p&gt;

&lt;h2&gt;Problem&lt;/h2&gt;

&lt;p&gt;When a sub-tag has multiple values (either on a single line or multiple lines), it is interpreted differently.&lt;/p&gt;

&lt;pre&gt;A = {
   B = C D
}
&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;For the rest of the world, it's a series of realms that the client needs to walk thru to the server. The client in A needs to go to C and then D to reach B&lt;/li&gt;
&lt;li&gt;For Java, it's a list of alternatives that can lead to the server. In order for a client A to go to B, it must reach C or D first.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;and the Java way is wrong.&lt;/p&gt;

&lt;h2&gt;Fix&lt;/h2&gt;

&lt;p&gt;There will be a behavior change anyway, but we must preserve as much as we can. That is to say, if there are no sub-tags with multiple values, we do the same as before. If there are, we should treat it correctly like the rest of the world.&lt;/p&gt;

&lt;p&gt;Here is a way to unify the two different designs. For&lt;/p&gt;

&lt;pre&gt;cRealm = {
   sRealm = A ... B
}
&lt;/pre&gt;

&lt;p&gt;&quot;A ... B&quot; should be regarded as a &lt;b&gt;(possibly partial) path&lt;/b&gt; from cRealm to sRealm.&lt;/p&gt;

&lt;p&gt;The key point here is the &quot;possibly partial&quot; modifier. By partial, it means the path could be only the tail, i.e. you need to find zero or more realms &quot;C ... D&quot; to build the full path &quot;C ... D A ... B&quot;, where C directly shares keys with cRealm.&lt;/p&gt;

&lt;p&gt;Now, the rest of the world always gives the full path, and JDK gives the shortest-available partial path. Unified.&lt;/p&gt;

&lt;p&gt;How to build the full path then? Given the previous example&lt;/p&gt;

&lt;pre&gt;A = {
   B = .     # I can go B directly
   C = B     # To go C, I need to go B first
   D = C     # To go D, I need to go C first
}
&lt;/pre&gt;

&lt;p&gt;From D = C, we get partial path for A to D as C -&amp;gt; D. Here A cannot directly go to C, so we start building. We have C = B, we have a partial path for A to C as B -&amp;gt; C. Merging the partial paths give a longer path from A to D being B -&amp;gt; C -&amp;gt; D. B = . shows B is a direct link, and we have the full path.&lt;/p&gt;

&lt;p&gt;There are still some rules:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;. can only appear in a single-valued sub-tag&lt;/li&gt;
&lt;li&gt;No loops&lt;/li&gt;
&lt;li&gt;No dups in multiple values of the same subtag&lt;/li&gt;
&lt;li&gt;Neither cRealm nor sRealm can appear in path&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;If any rule is broken, the output is undefined. The current implementation is that the value is ignored.&lt;/p&gt;

&lt;h2&gt;Workaround&lt;/h2&gt;

&lt;p&gt;From the discussion above, we can say that previous JDK releases still work if there is no multiple-value sub-tags. This means you can always rewrite &quot;A = B C&quot; to two lines &quot;A = C&quot; and &quot;C = B&quot;. Both the old JDK and future JDK will recognize it. Unfortunately, the rest of the world does not like this format, say, MIT's krb5.&lt;/p&gt;

&lt;h2&gt;And, the Hierarchy Case&lt;/h2&gt;

&lt;p&gt;The hierarchy algorithm is also wrong: When two realms have completely no common components, Java now regards it as a direct link. However, the correct path should go down to the last component of cRealm, and then go up from the last component of sRealm to the full sRealm.&lt;/p&gt;

&lt;p&gt;For example, a path from A.COM to B.ORG will be A.COM -&amp;gt; COM -&amp;gt; ORG -&amp;gt; B.ORG.&lt;/p&gt;

&lt;h2&gt;References&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://web.mit.edu/kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-admin/capaths.html&quot; class=&quot;external-link&quot;&gt;http://web.mit.edu/kerberos/krb5-1.5/krb5-1.5.4/doc/krb5-admin/capaths.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Smart_Cards/Setting_Up_Cross_Realm_Authentication.html&quot; class=&quot;external-link&quot;&gt;https://access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Managing_Smart_Cards/Setting_Up_Cross_Realm_Authentication.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/re_read_capaths</guid>
         <pubDate>Wed, 24 Apr 2013 10:06:37 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - A Test for 2013</title>
         <link>https://blogs.oracle.com/wangwj/entry/a_test_for_2013</link>
         <description>I want to see if this blog and its commenting system still works.
&lt;br&gt;
&lt;br&gt;
Update: Aha, I have to manually approve each comment.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/a_test_for_2013</guid>
         <pubDate>Sat, 05 Jan 2013 03:01:57 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - NIST Security Strength Time Frames</title>
         <link>http://simsmi.blogspot.com/2012/04/nist-security-strength-time-frames.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table align=&quot;center&quot; border=&quot;1&quot;&gt;&lt;caption&gt;Security Strength Time Frames of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://csrc.nist.gov/groups/ST/toolkit/key_management.html&quot;&gt;NIST&lt;/a&gt; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://csrc.nist.gov/publications/nistpubs/800-57/sp800-57_part1_rev3_general.pdf&quot;&gt;SP 800-57 Part 1&lt;/a&gt;&lt;/caption&gt;&lt;tbody&gt;&lt;tr&gt;&lt;th rowspan=&quot;2&quot;&gt;Security Strength&lt;/th&gt;&lt;th colspan=&quot;2&quot;&gt;80&lt;/th&gt;&lt;th colspan=&quot;2&quot;&gt;112&lt;/th&gt;&lt;th rowspan=&quot;2&quot;&gt;128&lt;/th&gt;&lt;th rowspan=&quot;2&quot;&gt;192&lt;/th&gt;&lt;th rowspan=&quot;2&quot;&gt;256&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;applying&lt;/th&gt;&lt;th&gt;processing&lt;/th&gt;&lt;th&gt;applying&lt;/th&gt;&lt;th&gt;processing&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;8&quot; style=&quot;background-color:#d0e4fe;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;through 2010&lt;/th&gt;&lt;td&gt;acceptable&lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;2011 through2013&lt;/th&gt;&lt;td&gt;deprecated &lt;/td&gt;&lt;td&gt;legacy use &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;2014 through 2030 &lt;/th&gt;&lt;td&gt;disallowed &lt;/td&gt;&lt;td&gt;legacy use &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;2031 and Beyond&lt;/th&gt;&lt;td&gt;disallowed &lt;/td&gt;&lt;td&gt;legacy use &lt;/td&gt;&lt;td&gt;disallowed &lt;/td&gt;&lt;td&gt;legacy use &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;td&gt;acceptable &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;8&quot; style=&quot;background-color:#d0e4fe;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Symmetric Algorithms&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;2TDEA&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;3TDEA&lt;/td&gt;&lt;td&gt;AES-128 &lt;/td&gt;&lt;td&gt;AES-192 &lt;/td&gt;&lt;td&gt;AES-256 &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;FFC (e.g., DSA, D-H) &lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;L = 1024&lt;br /&gt;N = 160 &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;L = 2048&lt;br /&gt;N = 224  &lt;/td&gt;&lt;td&gt;L = 3072&lt;br /&gt;N = 256 &lt;/td&gt;&lt;td&gt;L = 7680&lt;br /&gt;N = 384  &lt;/td&gt;&lt;td&gt;L = 15360&lt;br /&gt;N = 512  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;IFC (e.g., RSA)&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;k = 1024  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;k = 2048 &lt;/td&gt;&lt;td&gt;k = 3072  &lt;/td&gt;&lt;td&gt;k = 7680  &lt;/td&gt;&lt;td&gt;k = 15360  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;ECC (e.g.,ECDSA) &lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;f = 160-223  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;f = 224-255  &lt;/td&gt;&lt;td&gt;f = 256-383 &lt;/td&gt;&lt;td&gt;f = 384-511 &lt;/td&gt;&lt;td&gt;f = 512+ &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Digital Signatures and hash-only applications &lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;td&gt;SHA-384, SHA-512 &lt;/td&gt;&lt;td&gt;SHA-512  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;HMAC&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-224, SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;td&gt;SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Key Derivation Functions&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-224, SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;td&gt;SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;th&gt;Random Number Generation&lt;/th&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;SHA-1,&lt;br /&gt;SHA-224,&lt;br /&gt;SHA-256,&lt;br /&gt;SHA-384,&lt;br /&gt;SHA-512  &lt;/td&gt;&lt;td&gt;SHA-1, SHA-224, SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;td&gt;SHA-224, SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;td&gt;SHA-256, SHA-384, SHA-512  &lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note (Reference from NIST SP 800-57 part 1, reversion 3): &lt;br /&gt;&lt;ul&gt;&lt;li&gt;&quot;applying&quot; and &quot;processing&quot; indicates whether cryptographic protection is being applied to data (e.g., encrypted), or whether cryptographically protected data is being processed (e.g., decrypted).&lt;/li&gt;&lt;li&gt;&quot;Acceptable&quot; indicates that the algorithm or key length is not known to be insecure.&amp;nbsp;&lt;/li&gt;&lt;li&gt;&quot;Deprecated&quot; means that the use of an algorithm or key length that provides the indicated security strength may be used if risk is accepted; note that the use deprecated algorithms or key lengths may have restrictions.&lt;/li&gt;&lt;li&gt;&quot;Disallowed&quot; means that an algorithm or key length shall not be used for applying cryptographic protection.&lt;/li&gt;&lt;li&gt;&quot;Legacy use&quot; means that an algorithm or key length may be used because of its use in legacy applications (i.e., the algorithm or key length can be used to process cryptographically-protected data). &lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-3414045861903059114</guid>
         <pubDate>Tue, 24 Apr 2012 06:36:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - SSL Server Test Online Service</title>
         <link>http://simsmi.blogspot.com/2012/01/ssl-server-test-online-service.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://www.ssllabs.com/ssldb/analyze.html&quot;&gt;SSL Server Test Online Service&lt;/a&gt; performs a deep analysis of the configuration of any SSL web server on the public Internet. It's a great web service to test the quality of a SSL web server.&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-8572824867784768928</guid>
         <pubDate>Thu, 26 Jan 2012 18:20:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Another Challenge of Hash Functions</title>
         <link>http://simsmi.blogspot.com/2011/12/another-challenge-of-hash-functions.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;No comments, please refer to the following docs: &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.securityweek.com/hash-table-collision-attacks-could-trigger-ddos-massive-scale&quot;&gt;&quot;Hash Table Collision Attacks Could Trigger DDoS on a Massive Scale | SecurityWeek.Com&quot;&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.nruns.com/_downloads/advisory28122011.pdf&quot;&gt;the research from n.runs AG&lt;/a&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-70753160449931398</guid>
         <pubDate>Fri, 30 Dec 2011 06:00:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Search and Replace Strings in Files Under a Certain Directory</title>
         <link>http://simsmi.blogspot.com/2011/12/search-and-replace-strings-in-files.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;As simple as: &lt;br /&gt;&lt;pre&gt;$ find thePath -type f -name theFileNamePattern |xargs &amp;#92;&lt;br /&gt;  perl -e &quot;s/toBeReplacedString/newString/g&quot; -pi&lt;br /&gt;&lt;/pre&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-9064591410092756460</guid>
         <pubDate>Thu, 29 Dec 2011 18:52:00 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Old Versions of Cisco AnyConnect and Java 6u29</title>
         <link>https://blogs.oracle.com/wangwj/entry/old_versions_of_cisco_anyconnect</link>
         <description>In &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/technetwork/java/javase/6u14-137039.html&quot;&gt;Oracle Java 6u14&lt;/a&gt;, we introduced blacklist support. The blacklist &quot;is a list of signed jars that contain serious security vulnerabilities that can be exploited by untrusted applets or applications&quot;. Once a signed jar is listed here, it will never be loaded. Recently, in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/technetwork/java/javase/6u29-relnotes-507960.html&quot;&gt;6u29&lt;/a&gt;, we added more entries into the list. Some of them are for the Cisco AnyConnect Mobility Client, and you can see why this is a very serious problem on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.cisco.com/en/US/products/products_security_advisory09186a0080b80123.shtml&quot;&gt;Cisco's own support page&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;
Unfortunately, it seems quite a lot of AnyConnect servers out there are not updated to the latest version. Some are not that ancient, which do no harm to a Windows client, but can still be exploited if the client is on a non-Windows system like Linux or Apple MacOS X. Read the Cisco page above for details.
&lt;br&gt;&lt;br&gt;
Therefore, 6u29 users will see an error when trying to install AnyConnect clients from such a server, for example, &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://supportforums.cisco.com/message/3480625&quot;&gt;this report to Cisco&lt;/a&gt;. AnyConnect admins, please update your server as soon as possible.
&lt;br&gt;&lt;br&gt;
Please note that this is not a vulnerability in Oracle's JRE. On the contrary, 6u29 protects you from any possible exploit of this issue to damage your system.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/old_versions_of_cisco_anyconnect</guid>
         <pubDate>Mon, 07 Nov 2011 18:33:54 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - A proposal to countermeasure BEAST attack</title>
         <link>http://simsmi.blogspot.com/2011/11/proposal-to-countermeasure-beast-attack.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;I posted the proposal to countermeasure &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://vnhacker.blogspot.com/2011/09/beast.html&quot;&gt;the BEAST attack&lt;/a&gt; in&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=665814&quot;&gt; Bug 665814&lt;/a&gt; at Bugzilla@Mozilla. For quick reference, I copy it in the blog:&lt;br /&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://bugzilla.mozilla.org/show_bug.cgi?id=665814#c59&quot;&gt;&lt;span class=&quot;bz_comment_user&quot;&gt;&lt;span class=&quot;vcard&quot;&gt;&lt;span class=&quot;fn&quot;&gt;Xuelei Fan&lt;/span&gt; &lt;/span&gt;         &lt;/span&gt;          &lt;span class=&quot;bz_comment_user_images&quot;&gt;         &lt;/span&gt;          &lt;span class=&quot;bz_comment_time&quot;&gt;           2011-07-20 20:35:42 PDT&amp;nbsp;         &lt;/span&gt;Comment 59&lt;/a&gt;:&lt;br /&gt;&lt;pre class=&quot;bz_comment_text&quot;&gt;One significant drawback of the current proposed countermeasure&lt;br /&gt;(sending empty application data packets) is that the empty packet&lt;br /&gt;might be rejected by the TLS peer (see comments #30/#50/others:  MSIE&lt;br /&gt;does not accept empty fragments, Oracle application server (non-JSSE)&lt;br /&gt;cannot accept empty fragments, etc.)&lt;br /&gt;&lt;br /&gt;We've been looking at a slightly different countermeasure that should&lt;br /&gt;comply with the TLSv1.0/SSLv3.0 specifications, and likely won't break&lt;br /&gt;implementations. Would you please review the following proposal?&lt;br /&gt;If this is sound, this might avoid the empty packet issue, and the&lt;br /&gt;switches necessary to configure it.&lt;br /&gt;&lt;br /&gt;Looking at the spec of TLS, the block-ciphered structure is defined as:&lt;br /&gt;&lt;br /&gt;       block-ciphered struct {&lt;br /&gt;           opaque content[TLSCompressed.length];&lt;br /&gt;           opaque MAC[CipherSpec.hash_size];&lt;br /&gt;           uint8 padding[GenericBlockCipher.padding_length];&lt;br /&gt;           uint8 padding_length;&lt;br /&gt;       } GenericBlockCipher;&lt;br /&gt;&lt;br /&gt;This implies that if the TLSCompressed.length is less than the cipher&lt;br /&gt;block size, the MAC and padding data [1] will be used to construct the&lt;br /&gt;first block.&lt;br /&gt;&lt;br /&gt;The countermeasure:  instead of sending a completely empty fragment&lt;br /&gt;before the supplied application data, send the first byte of&lt;br /&gt;application data in a packet, followed by the remaining data from the&lt;br /&gt;write call.  I think this should work because the TLS specification&lt;br /&gt;requires content followed by the MAC.  Like the proposed solution,&lt;br /&gt;you're still removing the adaptive guessing mechanism from the IV&lt;br /&gt;calculation, but in a different way.&lt;br /&gt;&lt;br /&gt;Assume here a cipher block size of 8.  Since the MAC effectively&lt;br /&gt;randomizes the IV for successive SSL/TLS packets, if this first byte is&lt;br /&gt;one of the bytes being guessed, that still leaves a search space of 28&lt;br /&gt;(1 byte of data) * 256 (MAC) = 264, which is the same as the cipher&lt;br /&gt;itself.  If the 1 byte is known plaintext, then the MAC will change the&lt;br /&gt;IV for successive packets, and the attacker is not given the chance to&lt;br /&gt;adapt the input Pj.&lt;br /&gt;&lt;br /&gt;Implementations should readily accept 1 byte of application data, so&lt;br /&gt;this will likely address the empty fragment issue, while complying with&lt;br /&gt;the SSL 3.0 and TLS 1.0 specifications.&lt;br /&gt;&lt;br /&gt;Looking forward to your comments.&lt;br /&gt;&lt;br /&gt;Thanks,&lt;br /&gt;Xuelei&lt;br /&gt;&lt;br /&gt;[1] From a quick review of the standard hashes and ciphers of TLS&lt;br /&gt;cipher suites, the CipherSpec.hash_size should be always bigger or&lt;br /&gt;equal to block size. So the first block of an cipher operation should&lt;br /&gt;not contain the padding data.&lt;/pre&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-3932158844803100894</guid>
         <pubDate>Sun, 06 Nov 2011 19:35:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Java SE 7 New Features Ed 1 course</title>
         <link>http://simsmi.blogspot.com/2011/08/java-se-7-new-features-ed-1-course.html</link>
         <description>&lt;span style=&quot;color:black;&quot;&gt;The first of the Java SE 7 courses - &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://education.oracle.com/pls/web_prod-plq-dad/db_pages.getSchedPage?page_id=4&amp;amp;dc=D72719GC10&quot;&gt;&lt;b&gt;D72697GC10        - Java SE 7 New Features Ed 1&lt;/b&gt;&lt;/a&gt; is now on the public schedule       on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://education.oracle.com/&quot;&gt;education.oracle.com&lt;/a&gt;. &lt;/span&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-1171936132344057159</guid>
         <pubDate>Fri, 26 Aug 2011 18:17:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - JSSE Oracle Provider Default Disabled TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/08/jsse-oracle-provider-default-disabled.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;The following TLS cipher suites are supported by Oracle provider, SunJSSE. These cipher suites are disabled by default because of one of the following reasons:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;obsoleted weak cipher suites&lt;/li&gt;&lt;li&gt;anonymous cipher suites&lt;/li&gt;&lt;li&gt;no encryption cipher suites (null cipher)&lt;/li&gt;&lt;li&gt;Kerberos cipher suites&lt;/li&gt;&lt;/ul&gt;Cipher suites for Kerberos (KRB5) need additional KRB5 service configuration, and these cipher suites are not common in practice.&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;color:black;&quot;&gt;&lt;b&gt;You are NOT supposed to use these cipher suites unless you really know what you're doing from a standpoint. &lt;/b&gt;&lt;/div&gt;&lt;br /&gt;&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt; &lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt; &lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt;&lt;/colgroup&gt;  &lt;tbody&gt;&lt;tr&gt;   &lt;td&gt;Perference&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0x00,0x6D&lt;/td&gt;   &lt;td&gt;TLS_DH_anon_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0xC0,0x19&lt;/td&gt;   &lt;td&gt;TLS_ECDH_anon_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x3A&lt;/td&gt;   &lt;td&gt;TLS_DH_anon_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x6C&lt;/td&gt;   &lt;td&gt;TLS_DH_anon_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0xC0,0x18&lt;/td&gt;   &lt;td&gt;TLS_ECDH_anon_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x34&lt;/td&gt;   &lt;td&gt;TLS_DH_anon_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0xC0,0x16&lt;/td&gt;   &lt;td&gt;TLS_ECDH_anon_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0x00,0x18&lt;/td&gt;   &lt;td&gt;SSL_DH_anon_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0xC0,0x17&lt;/td&gt;   &lt;td&gt;TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x1B&lt;/td&gt;   &lt;td&gt;SSL_DH_anon_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0xC0,0x3B&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_NULL_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0xC0,0x06&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0xC0,0x10&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0x00,0x02&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0xC0,0x01&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0xC0,0x05&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x15&lt;/td&gt;   &lt;td&gt;TLS_ECDH_anon_WITH_NULL_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0x00,0x01&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_NULL_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0x00,0x09&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_DES_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0x00,0x15&lt;/td&gt;   &lt;td&gt;SSL_DHE_RSA_WITH_DES_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0x00,0x12&lt;/td&gt;   &lt;td&gt;SSL_DHE_DSS_WITH_DES_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;22&lt;/td&gt;   &lt;td&gt;0x00,0x03&lt;/td&gt;   &lt;td&gt;SSL_RSA_EXPORT_WITH_RC4_40_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;23&lt;/td&gt;   &lt;td&gt;0x00,0x17&lt;/td&gt;   &lt;td&gt;SSL_DH_anon_EXPORT_WITH_RC4_40_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;24&lt;/td&gt;   &lt;td&gt;0x00,0x08&lt;/td&gt;   &lt;td&gt;SSL_RSA_EXPORT_WITH_DES40_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;25&lt;/td&gt;   &lt;td&gt;0x00,0x14&lt;/td&gt;   &lt;td&gt;SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;26&lt;/td&gt;   &lt;td&gt;0x00,0x11&lt;/td&gt;   &lt;td&gt;SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;0x00,0x19&lt;/td&gt;   &lt;td&gt;SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;28&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;29&lt;/td&gt;   &lt;td&gt;0x00,0x20&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;30&lt;/td&gt;   &lt;td&gt;0x00,0x24&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;31&lt;/td&gt;   &lt;td&gt;0x00,0x1F&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;32&lt;/td&gt;   &lt;td&gt;0x00,0x23&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_3DES_EDE_CBC_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;33&lt;/td&gt;   &lt;td&gt;0x00,0x1E&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_DES_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;34&lt;/td&gt;   &lt;td&gt;0x00,0x22&lt;/td&gt;   &lt;td&gt;TLS_KRB5_WITH_DES_CBC_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;35&lt;/td&gt;   &lt;td&gt;0x00,0x28&lt;/td&gt;   &lt;td&gt;TLS_KRB5_EXPORT_WITH_RC4_40_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;36&lt;/td&gt;   &lt;td&gt;0x00,0x2B&lt;/td&gt;   &lt;td&gt;TLS_KRB5_EXPORT_WITH_RC4_40_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;37&lt;/td&gt;   &lt;td&gt;0x00,0x26&lt;/td&gt;   &lt;td&gt;TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;38&lt;/td&gt;   &lt;td&gt;0x00,0x29&lt;/td&gt;   &lt;td&gt;TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/technotes/guides/security/SunProviders.html#SunJSSEProvider&quot;&gt;the Java SE doc of SunJSSE provider&lt;/a&gt;.&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-3315800580748679286</guid>
         <pubDate>Sun, 07 Aug 2011 18:04:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Java™ SE 7 Release Security Enhancements - Weak Cryptography Control</title>
         <link>http://simsmi.blogspot.com/2011/07/java-se-7-release-security-enhancements.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;Weak cryptographic algorithms can now be disabled in Java SE 7 release. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/MD2_%28cryptography%29&quot;&gt;MD2 Message-Digest Algorithm&lt;/a&gt; was disabled by default in Sun PKIX provider and SunJSSE provider.&lt;br /&gt;&lt;br /&gt;The MD2 algorithm  is a cryptographic hash function &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.rsa.com/rsalabs/node.asp?id=2253&quot;&gt;developed by Ronald Rivest in 1989&lt;/a&gt;, and was published in 1992 as &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc1319.txt&quot;&gt;an Informational RFC (RFC 1319)&lt;/a&gt;.; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc6149.txt&quot;&gt;RFC 6149&lt;/a&gt; moves RFC 1319/MD2 to historic status, &quot;Since its publication, MD2 has been shown to not be collision-free, albeit successful collision attacks for properly implemented MD2 are not that damaging.  Successful pre-image and second pre-image attacks against MD2 have been shown.&quot;&lt;br /&gt;&lt;br /&gt;Although MD2 is no longer considered secure, it remains in use in public key infrastructures as part of certificates generated with MD2 and RSA. An a countermeasure of the vulnerability, Java SE &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://sim.ivi.co/2011/06/java-se-disables-md2-message-digest.html&quot;&gt;has disabled MD2 algorithm&lt;/a&gt; in certification path building and validation.&lt;br /&gt;&lt;br /&gt;You may wonder, Java SE has disabled MD2 algorithm in certification path building and validation in the latest releases and updates, what is the enhancement in Java SE 7?; Good question, NOT ONLY MD2, BUT ALSO MD4, MD5, or what else weak  cryptographic algorithms, you can disable them in Java SE 7; and you also can disable cryptographic keys without enough strength key size. To control the usage of weak cryptographic algorithms, Java SE 7 introduces two new security properties, &quot;jdk.certpath.disabledAlgorithms&quot; and &quot;jdk.tls.disabledAlgorithms&quot;.&lt;br /&gt;&lt;br /&gt;The security property (and the syntax) of &quot;jdk.certpath.disabledAlgorithms&quot; is defined as:&lt;br /&gt;&lt;pre&gt;# Algorithm restrictions for certification path (CertPath) processing&lt;br /&gt;#&lt;br /&gt;# In some environments, certain algorithms or key lengths may be undesirable&lt;br /&gt;# for certification path building and validation.  For example, &quot;MD2&quot; is&lt;br /&gt;# generally no longer considered to be a secure hash algorithm.  This section&lt;br /&gt;# describes the mechanism for disabling algorithms based on algorithm name&lt;br /&gt;# and/or key length.  This includes algorithms used in certificates, as well&lt;br /&gt;# as revocation information such as CRLs and signed OCSP Responses.&lt;br /&gt;#&lt;br /&gt;# The syntax of the disabled algorithm string is described as this Java&lt;br /&gt;# BNF-style:&lt;br /&gt;#   DisabledAlgorithms:&lt;br /&gt;#       &quot; DisabledAlgorithm { , DisabledAlgorithm } &quot;&lt;br /&gt;#&lt;br /&gt;#   DisabledAlgorithm:&lt;br /&gt;#       AlgorithmName [Constraint]&lt;br /&gt;#&lt;br /&gt;#   AlgorithmName:&lt;br /&gt;#       (see below)&lt;br /&gt;#&lt;br /&gt;#   Constraint:&lt;br /&gt;#       KeySizeConstraint&lt;br /&gt;#&lt;br /&gt;#   KeySizeConstraint:&lt;br /&gt;#       keySize Operator DecimalInteger&lt;br /&gt;#&lt;br /&gt;#   Operator:&lt;br /&gt;#       &amp;lt;= | &amp;lt; | == | != | &amp;gt;= | &amp;gt;&lt;br /&gt;#&lt;br /&gt;#   DecimalInteger:&lt;br /&gt;#       DecimalDigits&lt;br /&gt;#&lt;br /&gt;#   DecimalDigits:&lt;br /&gt;#       DecimalDigit {DecimalDigit}&lt;br /&gt;#&lt;br /&gt;#   DecimalDigit: one of&lt;br /&gt;#       1 2 3 4 5 6 7 8 9 0&lt;br /&gt;#&lt;br /&gt;# The &quot;AlgorithmName&quot; is the standard algorithm name of the disabled&lt;br /&gt;# algorithm. See &quot;Java Cryptography Architecture Standard Algorithm Name&lt;br /&gt;# Documentation&quot; for information about Standard Algorithm Names.  Matching&lt;br /&gt;# is performed using a case-insensitive sub-element matching rule.  (For&lt;br /&gt;# example, in &quot;SHA1withECDSA&quot; the sub-elements are &quot;SHA1&quot; for hashing and&lt;br /&gt;# &quot;ECDSA&quot; for signatures.)  If the assertion &quot;AlgorithmName&quot; is a&lt;br /&gt;# sub-element of the certificate algorithm name, the algorithm will be&lt;br /&gt;# rejected during certification path building and validation.  For example,&lt;br /&gt;# the assertion algorithm name &quot;DSA&quot; will disable all certificate algorithms&lt;br /&gt;# that rely on DSA, such as NONEwithDSA, SHA1withDSA.  However, the assertion&lt;br /&gt;# will not disable algorithms related to &quot;ECDSA&quot;.&lt;br /&gt;#&lt;br /&gt;# A &quot;Constraint&quot; provides further guidance for the algorithm being specified.&lt;br /&gt;# The &quot;KeySizeConstraint&quot; requires a key of a valid size range if the&lt;br /&gt;# &quot;AlgorithmName&quot; is of a key algorithm.  The &quot;DecimalInteger&quot; indicates the&lt;br /&gt;# key size specified in number of bits.  For example, &quot;RSA keySize &amp;lt;= 1024&quot;&lt;br /&gt;# indicates that any RSA key with key size less than or equal to 1024 bits&lt;br /&gt;# should be disabled, and &quot;RSA keySize &amp;lt; 1024, RSA keySize &amp;gt; 2048&quot; indicates&lt;br /&gt;# that any RSA key with key size less than 1024 or greater than 2048 should&lt;br /&gt;# be disabled. Note that the &quot;KeySizeConstraint&quot; only makes sense to key&lt;br /&gt;# algorithms.&lt;br /&gt;#&lt;br /&gt;# Note: This property is currently used by Oracle's PKIX implementation. It&lt;br /&gt;# is not guaranteed to be examined and used by other implementations.&lt;br /&gt;#&lt;br /&gt;# Example:&lt;br /&gt;#   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize &amp;lt; 2048&lt;br /&gt;#&lt;br /&gt;#&lt;br /&gt;jdk.certpath.disabledAlgorithms=MD2&lt;br /&gt;&lt;/pre&gt;And the security property of &quot;jdk.tls.disabledAlgorithms&quot; is defined as: &lt;br /&gt;&lt;pre&gt;# Algorithm restrictions for Secure Socket Layer/Transport Layer Security&lt;br /&gt;# (SSL/TLS) processing&lt;br /&gt;#&lt;br /&gt;# In some environments, certain algorithms or key lengths may be undesirable&lt;br /&gt;# when using SSL/TLS.  This section describes the mechanism for disabling&lt;br /&gt;# algorithms during SSL/TLS security parameters negotiation, including cipher&lt;br /&gt;# suites selection, peer authentication and key exchange mechanisms.&lt;br /&gt;#&lt;br /&gt;# For PKI-based peer authentication and key exchange mechanisms, this list&lt;br /&gt;# of disabled algorithms will also be checked during certification path&lt;br /&gt;# building and validation, including algorithms used in certificates, as&lt;br /&gt;# well as revocation information such as CRLs and signed OCSP Responses.&lt;br /&gt;# This is in addition to the jdk.certpath.disabledAlgorithms property above.&lt;br /&gt;#&lt;br /&gt;# See the specification of &quot;jdk.certpath.disabledAlgorithms&quot; for the&lt;br /&gt;# syntax of the disabled algorithm string.&lt;br /&gt;#&lt;br /&gt;# Note: This property is currently used by Oracle's JSSE implementation.&lt;br /&gt;# It is not guaranteed to be examined and used by other implementations.&lt;br /&gt;#&lt;br /&gt;# Example:&lt;br /&gt;#   jdk.tls.disabledAlgorithms=MD5, SHA1, DSA, RSA keySize &amp;lt; 2048&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;You are able to find the definition from java_home/jre/lib/security/java.security.&lt;br /&gt;OK, let's look at more examples about how to control weak cryptographic algorithms and key strength.&lt;br /&gt;MD5 is no longer acceptable where collision resistance is required such as digital signatures [&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc6151.txt&quot;&gt;RFC 6151&lt;/a&gt;]. However, there are still a lot of well-known certificates generated with MD5 based signature.&lt;br /&gt;For RSA crypto-system, 512-bit keys no longer provide sufficient security for anything more than very short-term security needs [&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.rsa.com/rsalabs/node.asp?id=2218&quot;&gt;How large a key should be used in the RSA cryptosystem?&lt;/a&gt;]. RSA is widely used in the industry, for better interoperability, you may not be able to completely disable RSA crypto-system in your application. You may only accept strength enough RSA keys.&lt;br /&gt;You may want to disable MD5 algorithms and RSA keys size less than 1024 bits in Sun PKIX provider. The security property may look like:&lt;br /&gt;&lt;pre&gt;jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize &amp;lt; 1024&lt;/pre&gt;For what ever reason, you may not like a particular TLS cipher suites, for example, &quot;SSL_RSA_WITH_RC4_128_MD5/TLS_RSA_WITH_RC4_128_MD5&quot;. Of course, you can disable it in SunJSSE provider with:&lt;br /&gt;&lt;pre&gt;jdk.tls.disabledAlgorithms=SSL_RSA_WITH_RC4_128_MD5&lt;/pre&gt;&lt;br /&gt;Yes, with these two security properties, you can control weak cryptographic algorithms and key sizes in Java VM globally. It is as you will!&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-1830440802989852330</guid>
         <pubDate>Sun, 31 Jul 2011 04:09:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Time of ECC Algorithms in Web Services?</title>
         <link>http://simsmi.blogspot.com/2011/07/time-of-ecc-algorithms-in-web-services.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;It's a question, the answer depends on your application deployment. The browser market share in the following pie may be a fact of your consideration. From previous posts, I learned that out of the major market players, only Opera does not support ECC TLS cipher suites yet. &lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://skydrive.live.com/redir.aspx?cid=6eb7ebcf1a04eaad&amp;amp;page=play&amp;amp;resid=6EB7EBCF1A04EAAD%21264&quot; style=&quot;margin-left:1em;margin-right:1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-uUdJPjQlfzY/TjI5nI4P-yI/AAAAAAAAAFA/eZE_NBdelnc/s1600/browser_market_share_2011_06.png&quot;/&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot; style=&quot;clear:both;text-align:center;&quot;&gt;&lt;/div&gt;&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-8446443370591876287</guid>
         <pubDate>Fri, 29 Jul 2011 01:56:00 +0000</pubDate>
         <media:thumbnail height="72" url="http://2.bp.blogspot.com/-uUdJPjQlfzY/TjI5nI4P-yI/AAAAAAAAAFA/eZE_NBdelnc/s72-c/browser_market_share_2011_06.png" width="72" xmlns:media="http://search.yahoo.com/mrss/"/>
      </item>
      <item>
         <title>by Xuelei Fan - Oracle Launches Java 7</title>
         <link>http://simsmi.blogspot.com/2011/07/oracle-launches-java-7.html</link>
         <description>Source: www.oracle.com. Oracle Announces &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/us/corporate/features/java-7-launched-435823.html&quot;&gt;Availability of Java SE 7&lt;/a&gt;, you are able to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.oracle.com/technetwork/java/javase/downloads/index.html?ssSourceSiteId=ocomen&quot;&gt;download and try Java SE 7&lt;/a&gt; right now.&lt;br /&gt;&lt;br /&gt;You may also want to know &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.oracle.com/javase/7/docs/technotes/guides/security/enhancements7.html&quot;&gt;Java™ SE 7 Release Security Enhancements&lt;/a&gt;. I may publish new post to introduce the new security features in the blog.  Stay Tuned!</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-1696161623517851342</guid>
         <pubDate>Thu, 28 Jul 2011 17:37:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - JSSE Oracle Provider Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/jsse-oracle-provider-preference-of-tls.html</link>
         <description>&lt;div dir=&quot;ltr&quot; style=&quot;text-align:left;&quot;&gt;&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt; &lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Perference Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0xC0,0x24&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0xC0,0x28&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x3D&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0xC0,0x26&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0xC0,0x2A&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x6B&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0x00,0x6A&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0xC0,0x0A&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0xC0,0x14&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0xC0,0x05&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0xC0,0x0F&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0x00,0x39&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0xC0,0x23&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0xC0,0x27&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x3C&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0xC0,0x25&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0xC0,0x29&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0x00,0x67&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0x00,0x40&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;22&lt;/td&gt;   &lt;td&gt;0xC0,0x09&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;23&lt;/td&gt;   &lt;td&gt;0xC0,0x13&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;24&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;25&lt;/td&gt;   &lt;td&gt;0xC0,0x04&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;26&lt;/td&gt;   &lt;td&gt;0xC0,0x0E&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;0x00,0x33&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;28&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;29&lt;/td&gt;   &lt;td&gt;0xC0,0x07&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;30&lt;/td&gt;   &lt;td&gt;0xC0,0x11&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;31&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;32&lt;/td&gt;   &lt;td&gt;0xC0,0x02&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;33&lt;/td&gt;   &lt;td&gt;0xC0,0x0C&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;34&lt;/td&gt;   &lt;td&gt;0xC0,0x08&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;35&lt;/td&gt;   &lt;td&gt;0xC0,0x12&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;36&lt;/td&gt;   &lt;td&gt;0x00,0x0A&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;37&lt;/td&gt;   &lt;td&gt;0xC0,0x03&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;38&lt;/td&gt;   &lt;td&gt;0xC0,0x0D&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;39&lt;/td&gt;   &lt;td&gt;0x00,0x16&lt;/td&gt;   &lt;td&gt;SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;40&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;41&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;SSL_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;42&lt;/td&gt;   &lt;td&gt;0x00,0xFF&lt;/td&gt;   &lt;td&gt;TLS_EMPTY_RENEGOTIATION_INFO_SCSV [1]&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/technotes/guides/security/SunProviders.html#SunJSSEProvider&quot;&gt;the Java SE doc of SunJSSE provider&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;[1] TLS_EMPTY_RENEGOTIATION_INFO_SCSV means that secure TLS renegotiation [&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc5746.txt&quot;&gt;RFC 5746&lt;/a&gt;] is supported.&lt;/div&gt;</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-7911260212831937784</guid>
         <pubDate>Sat, 23 Jul 2011 20:32:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Browser Safari Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/browser-safari-preference-of-tls-cipher.html</link>
         <description>&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt; &lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Perference Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x0A&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0xC0,0x13&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0xC0,0x14&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0xC0,0x09&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0xC0,0x0A&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from the observation of the TLS ClientHello message when visiting a HTTPS web site from Safari 5.1.</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-3784290163998668278</guid>
         <pubDate>Sat, 23 Jul 2011 20:01:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Browser Opera Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/browser-opera-preference-of-tls-cipher.html</link>
         <description>&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt; &lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Perference&lt;br /&gt;Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0x00,0xFF&lt;/td&gt;   &lt;td&gt;TLS_EMPTY_RENEGOTIATION_INFO_SCSV [1]&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0x00,0x6B&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x6A&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x69&lt;/td&gt;   &lt;td&gt;TLS_DH_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0x00,0x68&lt;/td&gt;   &lt;td&gt;TLS_DH_DSS_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x3D&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0x00,0x39&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0x00,0x37&lt;/td&gt;   &lt;td&gt;TLS_DH_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x36&lt;/td&gt;   &lt;td&gt;TLS_DH_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0x00,0x67&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0x00,0x40&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0x00,0x3F&lt;/td&gt;   &lt;td&gt;TLS_DH_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0x00,0x3E&lt;/td&gt;   &lt;td&gt;TLS_DH_DSS_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0x00,0x3C&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x33&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0x00,0x31&lt;/td&gt;   &lt;td&gt;TLS_DH_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0x00,0x30&lt;/td&gt;   &lt;td&gt;TLS_DH_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;22&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;23&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;24&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;25&lt;/td&gt;   &lt;td&gt;0x00,0x0D&lt;/td&gt;   &lt;td&gt;TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;26&lt;/td&gt;   &lt;td&gt;0x00,0x16&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;0x00,0x10&lt;/td&gt;   &lt;td&gt;TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;28&lt;/td&gt;   &lt;td&gt;0x00,0x0A&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from the observation of the TLS ClientHello message when visiting a HTTPS web site from Opera 11.50.&lt;br /&gt;&lt;br /&gt;[1] TLS_EMPTY_RENEGOTIATION_INFO_SCSV means the browser supports secure TLS renegotiation [&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.ietf.org/rfc/rfc5746.txt&quot;&gt;RFC 5746&lt;/a&gt;].</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-2105114530099244283</guid>
         <pubDate>Sat, 23 Jul 2011 19:51:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Google Chrome Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/google-chrome-preference-of-tls-cipher.html</link>
         <description>&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt; &lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Perference Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0xC0,0x0A&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0xC0,0x14&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x88&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x87&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0x00,0x39&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0xC0,0x0F&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0xC0,0x05&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0x00,0x84&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0xC0,0x07&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0xC0,0x09&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0xC0,0x11&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0xC0,0x13&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0x00,0x45&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0x00,0x44&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x66&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0x00,0x33&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0xC0,0x0C&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0xC0,0x0e&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;22&lt;/td&gt;   &lt;td&gt;0xC0,0x02&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;23&lt;/td&gt;   &lt;td&gt;0xC0,0x04&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;24&lt;/td&gt;   &lt;td&gt;0x00,0x96&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_SEED_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;25&lt;/td&gt;   &lt;td&gt;0x00,0x41&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;26&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;28&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;29&lt;/td&gt;   &lt;td&gt;0xC0,0x08&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;30&lt;/td&gt;   &lt;td&gt;0xC0,0x12&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;31&lt;/td&gt;   &lt;td&gt;0x00,0x16&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;32&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;33&lt;/td&gt;   &lt;td&gt;0xC0,0x0d&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;34&lt;/td&gt;   &lt;td&gt;0xC0,0x03&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;35&lt;/td&gt;   &lt;td&gt;0xFE,0xFF&lt;/td&gt;   &lt;td&gt;SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;36&lt;/td&gt;   &lt;td&gt;0x00,0x0a&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from the observation of the TLS ClientHello message when visiting a HTTPS web site from Google Chrome 14.0.</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-6514561021947459239</guid>
         <pubDate>Sat, 23 Jul 2011 19:37:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Internet Explorer Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/internet-explorer-preference-of-tls.html</link>
         <description>&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Perference Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0x00,0x3C&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x3D&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x0A&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0xC0,0x27&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0xC0,0x13&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0xC0,0x14&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0xC0,0x2B&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0xC0,0x23&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0xC0,0x2C&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0xC0,0x24&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0xC0,0x09&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0xC0,0x0A&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0x00,0x40&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0x00,0x6A&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA256&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from the observation of the TLS ClientHello message when visiting a HTTPS web site from Internet Explorer (IE) 9.0.</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-1449299707147411568</guid>
         <pubDate>Sat, 23 Jul 2011 19:22:00 +0000</pubDate>
      </item>
      <item>
         <title>by Xuelei Fan - Firefox Preference of TLS Cipher Suites</title>
         <link>http://simsmi.blogspot.com/2011/07/firefox-preference-of-tls-cipher-suites.html</link>
         <description>&lt;table border=&quot;1&quot; style=&quot;width:100%;&quot;&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt;&lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:center;&quot;&gt; &lt;/colgroup&gt;&lt;colgroup span=&quot;1&quot; style=&quot;text-align:left;&quot;&gt; &lt;/colgroup&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;Order&lt;/td&gt;   &lt;td&gt;Value&lt;/td&gt;   &lt;td&gt;Description&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;1&lt;/td&gt;   &lt;td&gt;0xC0,0x0A&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;2&lt;/td&gt;   &lt;td&gt;0xC0,0x14&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;3&lt;/td&gt;   &lt;td&gt;0x00,0x88&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;4&lt;/td&gt;   &lt;td&gt;0x00,0x87&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;5&lt;/td&gt;   &lt;td&gt;0x00,0x39&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;6&lt;/td&gt;   &lt;td&gt;0x00,0x38&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;7&lt;/td&gt;   &lt;td&gt;0xC0,0x0F&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;8&lt;/td&gt;   &lt;td&gt;0xC0,0x05&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;9&lt;/td&gt;   &lt;td&gt;0x00,0x84&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_CAMELLIA_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;10&lt;/td&gt;   &lt;td&gt;0x00,0x35&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_256_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;11&lt;/td&gt;   &lt;td&gt;0xC0,0x07&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;12&lt;/td&gt;   &lt;td&gt;0xC0,0x09&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;13&lt;/td&gt;   &lt;td&gt;0xC0,0x11&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;14&lt;/td&gt;   &lt;td&gt;0xC0,0x13&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;15&lt;/td&gt;   &lt;td&gt;0x00,0x45&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;16&lt;/td&gt;   &lt;td&gt;0x00,0x44&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;17&lt;/td&gt;   &lt;td&gt;0x00,0x33&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;18&lt;/td&gt;   &lt;td&gt;0x00,0x32&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;19&lt;/td&gt;   &lt;td&gt;0xC0,0x0C&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;20&lt;/td&gt;   &lt;td&gt;0xC0,0x0E&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;21&lt;/td&gt;   &lt;td&gt;0xC0,0x02&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;22&lt;/td&gt;   &lt;td&gt;0xC0,0x04&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;23&lt;/td&gt;   &lt;td&gt;0x00,0x96&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_SEED_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;24&lt;/td&gt;   &lt;td&gt;0x00,0x41&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_CAMELLIA_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;25&lt;/td&gt;   &lt;td&gt;0x00,0x04&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_MD5&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;26&lt;/td&gt;   &lt;td&gt;0x00,0x05&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_RC4_128_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;27&lt;/td&gt;   &lt;td&gt;0x00,0x2F&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_AES_128_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;28&lt;/td&gt;   &lt;td&gt;0xC0,0x08&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;29&lt;/td&gt;   &lt;td&gt;0xC0,0x12&lt;/td&gt;   &lt;td&gt;TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;30&lt;/td&gt;   &lt;td&gt;0x00,0x16&lt;/td&gt;   &lt;td&gt;TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;31&lt;/td&gt;   &lt;td&gt;0x00,0x13&lt;/td&gt;   &lt;td&gt;TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;32&lt;/td&gt;   &lt;td&gt;0xC0,0x0D&lt;/td&gt;   &lt;td&gt;TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;33&lt;/td&gt;   &lt;td&gt;0xC0,0x03&lt;/td&gt;   &lt;td&gt;TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;34&lt;/td&gt;   &lt;td&gt;0xFE,0xFF&lt;/td&gt;   &lt;td class=&quot;xl6327091&quot;&gt;SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr&gt;   &lt;td&gt;35&lt;/td&gt;   &lt;td&gt;0x00,0x0A&lt;/td&gt;   &lt;td&gt;TLS_RSA_WITH_3DES_EDE_CBC_SHA&lt;/td&gt;  &lt;/tr&gt;&lt;tr height=&quot;0&quot; style=&quot;display:none;&quot;&gt;   &lt;td style=&quot;width:48pt;&quot; width=&quot;64&quot;&gt;&lt;/td&gt;   &lt;td style=&quot;width:59pt;&quot; width=&quot;78&quot;&gt;&lt;/td&gt;   &lt;td style=&quot;width:224pt;&quot; width=&quot;299&quot;&gt;&lt;/td&gt;  &lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;Note that the data was from the observation of the TLS ClientHello message when visiting a HTTPS web site from Firefox 5.0.</description>
         <author>Xuelei Fan</author>
         <guid isPermaLink="false">tag:blogger.com,1999:blog-4878357546277600287.post-6748749188200590082</guid>
         <pubDate>Sat, 23 Jul 2011 19:06:00 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Kerberos Programming on Windows</title>
         <link>https://blogs.oracle.com/wangwj/entry/kerberos_programming_on_windows</link>
         <description>&lt;em&gt;This article was published as http://java.sun.com/javase/6/docs/technotes/guides/security/kerberos/jgss-windows.html some time in 2009, but the original link does not exist anymore. It's copied here mainly for archive purpose and a lot of thing have changed since. I might or might not update it.&lt;/em&gt;
&lt;p&gt;&lt;hr&gt;&lt;/p&gt;
   This article talks about Kerberos programming on Windows, especially in
   a Kerberos environment of Windows Active Directory (AD), with all
   clients and services running on Windows platforms in AD domains. The
   typical client/server environment described here is Windows XP and
   Windows Server 2003. We may talk about other scenarios if necessary.
&lt;p&gt;
   Note: Kerberos programming in Java is done through the JGSS-API. Please
   make sure you're familiar with basic JGSS concepts and programming
   styles. Read the Java SE documentation of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/index.html&quot;&gt;JGSS section&lt;/a&gt; first.

&lt;h3&gt;Basic Setup&lt;/h3&gt;

   There are three roles in Kerberos: the KDC, the client, and the server.
   We're talking about writing Java programs on the client or the server,
   or both.
&lt;p&gt;
   First, you must have a Windows Active Directory server running, and all
   clients and servers joining this AD domain. In order for Java to
   recognize this environment, extra configurations are needed on both the
   client and the server side.

&lt;h3&gt;Realm and KDC Info&lt;/h3&gt;

   There are two ways to inform a Java program what the Kerberos realm and
   KDC are:
&lt;ol&gt;
&lt;li&gt;
    krb5.ini configuration file
    &lt;ul&gt;&lt;li&gt;
            krb5.ini should contain the realm info and hostname of the KDC
            for this realm. For example:
&lt;pre&gt;[libdefaults]
default_realm = MY.REALM
realms]
MY.REALM = {
    kdc = kdc.my.realm
}&lt;/pre&gt;

        &lt;li&gt;The file location can be specified by system property
            java.security.krb5.conf. Otherwise, Java will try to locate
            this file in these locations (ordered by):&lt;ol&gt;
              &lt;li&gt;%JAVA_HOME%/lib/security/krb5.conf
              &lt;li&gt;%WINDOWS_ROOT%/krb5.ini&lt;/ol&gt;&lt;/ul&gt;
&lt;li&gt;    System properties java.security.krb5.realm and
       java.security.krb5.kdc.
&lt;/ol&gt;
   Please note that these two configurations cannot be provided at the
   same time.
&lt;p&gt;
   In JDK 7, when neither of the two ways above is used. Java will try to
   read the realm and KDC settings from Windows environment variables.

&lt;h3&gt;JAAS login config file&lt;/h3&gt;

   Since JGSS uses JAAS to acquire the initial Kerberos credentials, a
   JAAS login config file is always needed. The location of this file
   should be specified inside the java.security file or using the system
   property java.security.auth.login.config. Read
   &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/JA
   ASRefGuide.html#AppendixA&quot;&gt;here&lt;/a&gt; for details.
&lt;p&gt;
   The login module required here is
   com.sun.security.auth.module.Krb5LoginModule, we'll talk about the
   details in later sections for the client side and the server side
   respectively.
&lt;p&gt;
   In JDK 7, when no JAAS login config file is specified, pre-defined
   entries are created for the client side and server side respectively:
&lt;p&gt;
   For the client side:

&lt;pre&gt;com.sun.security.jgss.krb5.initiate {
    com.sun.security.auth.module.Krb5LoginModule
    required
    useTicketCache=true
    doNotPrompt=false
};&lt;/pre&gt;
&lt;p&gt;
   For the server side:

&lt;pre&gt;com.sun.security.jgss.krb5.accept {
    com.sun.security.auth.module.Krb5LoginModule
    required
    useKeyTab=true
    storeKey=true
    doNotPrompt=true
    isInitiator=false;
};&lt;/pre&gt;

&lt;h3&gt;TGT accessibility&lt;/h3&gt;

   By default, Windows does not allow the session key of a TGT to be
   accessed. Please add the following registry key on the client side, so
   that the session key for TGT is accessible and Java can use it to
   acquire additional service tickets.
&lt;p&gt;
   For Windows XP and Windows 2000, the registry key and value should be:
&lt;pre&gt;HKEY_LOCAL_MACHINE&amp;#92;System&amp;#92;CurrentControlSet&amp;#92;Control&amp;#92;Lsa&amp;#92;Kerberos
Value Name: allowtgtsessionkey
Value Type: REG_DWORD
Value: 0x01&lt;/pre&gt;
&lt;p&gt;
   For Windows 2003 and Windows Vista, the registry key and value should
   be:
&lt;pre&gt;HKEY_LOCAL_MACHINE&amp;#92;System&amp;#92;CurrentControlSet&amp;#92;Control&amp;#92;Lsa&amp;#92;Kerberos&amp;#92;Parameters
Value Name: allowtgtsessionkey
Value Type: REG_DWORD
Value: 0x01&lt;/pre&gt;

&lt;h3&gt;Programming the client side&lt;/h3&gt;

&lt;h4&gt;The Initial Credentials&lt;/h4&gt;

   JGSS uses JAAS to get the initial credentials (in the case of Kerberos,
   the initial TGT). Java tries to get it in this order:
&lt;ol&gt;&lt;li&gt;File credentials cache (%HOME%&amp;#92;krb5cc_userid for Windows)
    &lt;li&gt;Native credentials cache (LSA, or Local Security Authority, for
       Windows)
    &lt;li&gt;Read key from a keytab file and use AS_REQ to acquire credentials
       from KDC
    &lt;li&gt;Prompt for username and password and use AS_REQ to acquire
       credentials from KDC&lt;/ol&gt;

   Not all of them will be tried. The actual behavior depends on what's
   specified in Krb5LoginModule of your JAAS long config file:
     &lt;ul&gt;&lt;li&gt;If useTicketCache=true, 1, 2 will be tried
     &lt;li&gt;If useKeyTab=true, 3 will be tried
     &lt;li&gt;If doNotPrompt=true, 4 will not be tried&lt;/ul&gt;

   Note that all of these parameters' default values are false. They can
   be specified in any combination.
&lt;p&gt;
   The most common case on a Windows client is that the user has already
   logged on to the system as an AD account, which means there's a native
   credential cached in LSA. This goes the 2nd way above. However, if the
   client platform is not Windows, or, although it's Windows but the user
   is not logged on as an AD account, there's no LSA cache available.
   Please check the availability of an LSA cache using the MS klist.exe
   tool (Attention: not the klist.exe comes with Java) or kerbtray.exe
   (for GUI lovers) provided by Microsoft.
&lt;p&gt;
   Therefore, the typical JAAS login config file for client should look
   like this:
&lt;pre&gt;com.sun.security.jgss.krb5.initiate {
    com.sun.security.auth.module.Krb5LoginModule
    required
    useTicketCache=true
    doNotPrompt=false
};&lt;/pre&gt;

   This means the ticket cache (LSA) should be used automatically,
   doNotPrompt=false means when the cache is not available, username
   and password will be prompted using a CallbackHandler.
&lt;p&gt;
   &lt;b&gt;Attention&lt;/b&gt;: Unfortunately, there's no way to inform Java that LSA should
   be looked up ahead of the file cache. So, you should always make sure
   that the %HOME%&amp;#92;krb5cc_userid file does not exist when you want to use
   the LSA. This file is generated by the kinit.exe command, so don't run
   it if you wish to use the credentials from the LSA cache.
&lt;p&gt;
   On the other hand, if you want your program working even if the LSA
   cache is not available, normally you choose one of the following:
   &lt;ol&gt;&lt;li&gt;Run kinit.exe (comes with Java) before running the Java app, this
       will create a credentials cache file %HOME%&amp;#92;krb5cc_userid, which
       goes the 1st way. The JAAS login config file is the same as the
       typical style. If you create the credentials cache file into a
       different pathname, specify the location using
       ticketCache=&quot;c:/path/to/file&quot; inside the JAAS login config file.
   &lt;li&gt;Feed username and password to the Java program directly using a
       CallbackHandler, which goes the 4th way. Please specify
       doNotPrompt=false in the JAAS login config file. You can provide an
       instance of CallbackHandler at the creation time of LoginContext if
       the JAAS call style is used (see the next section), or Java will
       create a new instance of the type specified by the security
       property auth.login.defaultCallbackHandler. For direct JGSS without
       JAAS, if this security property is not given, the internal
       text-based callback handler will be used.&lt;/ol&gt;

&lt;h4&gt;JGSS calls&lt;/h4&gt;

   There are 2 ways to start JGSS:
   &lt;ol&gt;&lt;li&gt;Use JAAS to generate a Subject that contains the initial
       credentials, and call JGSS from this subject:

&lt;pre&gt;LoginContext lc = new LoginContext(name, callback);
lc.login(); lc.commit();
Subject.doAs(lc.getSubject(), /* JGSS-API calls... */)&lt;/pre&gt;
&lt;p&gt;
       In this case, you can choose whatever login entry name in the JAAS
       login config file. Read &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jgs
       s/tutorials/ClientServer.html&quot;&gt;more&lt;/a&gt; for details.
    &lt;li&gt;Direct JGSS:

&lt;pre&gt;/* JGSS-API calls... */&lt;/pre&gt;

       In this case, the JAAS config file's entry name MUST be the
       standard entry name (com.sun.security.jgss.krb5.initiate), and you
       must set -Djavax.security.auth.useSubjectCredsOnly=false on the
       Java command line. Read &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/tutorials/BasicClientServer.html&quot;&gt;here&lt;/a&gt; for details.&lt;/ol&gt;

&lt;h4&gt;Other APIs that use JGSS&lt;/h4&gt;

   In Java, there are 2 other APIs that call JGSS-API internally.
   &lt;ol&gt;&lt;li&gt;SASL using JGSS as the mechanism. Read
       &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/sasl/sasl-refguide.html#GSSAPICLNT&quot;&gt;here&lt;/a&gt; and &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/lab/part2.html#SASL&quot;&gt;here&lt;/a&gt; for details.
    &lt;li&gt;HTTP/SPNEGO. Read &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/net/http-auth.html&quot;&gt;here&lt;/a&gt; for details. Please note that the system property javax.security.auth.useSubjectCredsOnly is now default false for HTTP/SPNEGO now.&lt;/ol&gt;

   Please note that when initial credentials are not available from the
   cache (neither from a file nor the LSA), HTTP/SPNEGO behaves different
   in username and password providing. Instead of the JAAS callback model,
   java.net.Authenticator is used. Read the doc mentioned above.

&lt;h3&gt;Programming the server side&lt;/h3&gt;

&lt;h4&gt;Service name&lt;/h4&gt;

   The biggest difference here from the client side is that there's no such
   concept as a native keytab, which means a JGSS server program cannot
   simply &quot;RunAs&quot; a Windows service account and uses the encryption key
   for that account. To make server side JGSS programming on Windows
   available, a special step is needed to create a mapping service name and
   a keytab file, by using the Microsoft provided tool ktpass.exe.
&lt;p&gt;
   For example, if the AD domain name is AD.LOCAL, and you'd like to run a
   service called myservice on the host machine.ad.local, you can perform
   these steps on your AD server:
   &lt;ol&gt;&lt;li&gt;Create a normal user account (say myservicemachine) inside
       AD.LOCAL, any password is OK.
   &lt;li&gt;Call &quot;ktpass -princ myservice/machine.ad.local@AD.LOCAL -mapuser
        myservicemachine@AD.LOCAL -out x.keytab +rndPass&quot; to create a
       SPN mapping to the user account, and generate a keytab file
       x.keytab. The password is regenerated with a random value so the
       password you give in step 1 is useless.&lt;/ol&gt;

   Now, put the x.keytab file into a secret place that only your service
   application can read. The server side JAAS login config file would look
   like:
&lt;pre&gt;com.sun.security.jgss.krb5.accept {
    com.sun.security.auth.module.Krb5LoginModule
    required
    storeKey=true
    useKeyTab=true
    keyTab=&quot;c:/secret/path/to/x.keytab&quot;
    principal=&quot;service/machine.ad.local&quot;
    isInitiator=false;
};&lt;/pre&gt;

   Here you need to provide the location of the keytab file. Otherwise,
   Java will try to locate this file in these locations (ordered by):
   &lt;ol&gt;&lt;li&gt;default_keytab_name in the [libdefaults] section of krb5.ini, or
   &lt;li&gt;%HOME%/krb5.keytab&lt;/ol&gt;

   &lt;b&gt;Note&lt;/b&gt;: isInitiator=false is specified here so that the application acts
   as a pure server side program that will never try to authenticate
   itself to the KDC. This is useful when it cannot communicate directly
   with the KDC.

&lt;h4&gt;JGSS calls&lt;/h4&gt;

   Just like the client side, you can use JAAS to create a Subject and
   call JGSS-APIs through this subject, or calls JGSS methods directly. In
   the latter case, please specify
&lt;pre&gt;   -Djavax.security.auth.useSubjectCredsOnly=false.&lt;/pre&gt;

&lt;h3&gt;Delegations&lt;/h3&gt;

   To enable delegations, both configurations and programming on needed.

&lt;h4&gt;Configuration at client side (the delegated)&lt;/h4&gt;

   In order for the credentials of the client to be delegatable to a
   service, if the initial TGT is acquired the Java way, please add
   forwardable=true into the [libdefaults] section of krb5.ini. If from
   LSA, make sure the &quot;Account is sensitive and cannot be delegated&quot; is
   NOT set in AD account settings.

&lt;h4&gt;Configuration at server side (the delegator)&lt;/h4&gt;

   In order to use the delegated credentials from the client, we suggest
   the service needs to be configured to be allowed receiving delegations.
   For a computer account, find the delegation tab, or for a user account,
   find the account tab, check &quot;Trusted for delegation&quot;. The turns on the
   OK-AS-DELEGATE for the service ticket. A Windows native client program
   needs this flag to enable delegation. A Java client MAY respect this
   flag later (currenrly NO except for HTTP/SPNEGO).

&lt;h4&gt;Programming&lt;/h4&gt;

   Please call GSSContext.requestCredDeleg(true) on the client side. Read
   &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/tutorials/MoreToDo.html&quot;&gt;here&lt;/a&gt; for details.

&lt;h3&gt;Trusts between Domains&lt;/h3&gt;

   If you have already setup cross realms trusts in multiple AD domains,
   please add the [domain_realm] section into the client side's krb5.conf
   file so that Java can correctly locate the realm for a requested
   service. Like this:
&lt;pre&gt;[domain_realm]
.this.com = THIS.COM
.that.com = THAT.COM&lt;/pre&gt;

   With this configuration, when a client on THIS.COM tries to connect to
   a service service/host.that.com, Java can correctly figured out that
   the service belongs to another realm THAT.COM and perform proper
   inter-realm authentications.

&lt;h3&gt;Other Windows Platforms&lt;/h3&gt;

   This article talks about Kerberos programming on the Windows platform.
   The typical KDC is Windows Server 2003. The typical client is Windows
   XP, and the typical server is Windows Server 2003 or Windows XP.
   There're some minor issues for other flavors of Windows versions.

&lt;h4&gt;Windows 2000 Server&lt;/h4&gt;

   Note that before SP4 of Windows 2000, there's no need to specify the
   allowtgtsessionkey registry key.

&lt;h4&gt;Windows Server 2008&lt;/h4&gt;

   In Windows 2008, the AES etype is supported. In order to use AES256 as
   the encryption etype, please download and enable Java Cryptography
   Extension (JCE) Unlimited Strength Jurisdiction Policy Files. Read the
   &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot;&gt;&quot;Other downloads&quot; section&lt;/a&gt; for details.
&lt;p&gt;
   In Windows 2008, you cannot request a service ticket for a normal user,
   since Windows only allows user2user communications with a normal user
   using a special Microsoft defined Kerberos extension. In fact, Windows
   KDC simply does not issue a service ticket targeting a normal user.
&lt;p&gt;
   There's a workaround to allow normal service ticket for a normal user
   on Windows 2008. Call setspn -a service/host username, a SPN will be
   created for this user. After this step, the client can acquire a normal
   service ticket targeting either the username or the SPN. This will also
   lure out the delegation tab for a user
   so that you can allows delegation on the user.

&lt;h3&gt;Debugging&lt;/h3&gt;

   These options are most useful in debugging a JGSS program:
   &lt;ol&gt;&lt;li&gt;Add -Dsun.security.krb5.debug=true on Java command line
   &lt;li&gt;Add debug=true into JAAS login config file
   &lt;li&gt;Inspect networking packets using a sniffer&lt;/ol&gt;

   Also, remember to always use the latest version of JRE/JDK. Some bugs
   may have already been fixed. The new versions may also show better
   debug information.

&lt;h3&gt;Frequently Asked Questions (FAQ)&lt;/h3&gt;

   &lt;b&gt;Note&lt;/b&gt;: Please remember to always read the 
   &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/jgss/tutorials/Troubleshooting.html&quot;&gt;JGSS troubleshooting guide&lt;/a&gt; first. Some of the following case are
   included in that guide, and some are Windows-specific.
   &lt;ul&gt;&lt;li&gt;JGSS complains that my JAAS config file has errors: Make sure it
       has correct format, the semi-colons are always there. Sometimes you
       need to put &quot;&quot; around a file name or principal name
   &lt;li&gt;I have a keytab, but JGSS still asks me for password: Make sure the
       keytab path is correct. Maybe you need to provide a full path,
       maybe you need to add &quot;&quot; around it. Also, use &quot;/&quot; or &quot;&amp;#92;&amp;#92;&quot; as path
       separator.
   &lt;li&gt;The client seems not login as an AD account: Sometimes you forgot
       to login as an AD account, or, if there are any network problems
       and your Windows client automatically goes to offline login mode.
       Use the Microsoft klist.exe or kerbtray.exe to see if a TGT is
       available in the LSA.
   &lt;li&gt;The debug output shows native TGT is loaded, but does not use it:
       This happens when the session key inside TGT is not readable. For
       clients before Vista, use kerbtray.exe to see if encryption type
       for session key is null. For Vista, look at the debug output to see
       if the key are all zero. If so, please setup the allowtgtsessionkey
       registry key.
   &lt;li&gt;Kerberos is never called (no Kerberos debug info after I add
       -Dsun.security.krb5.debug=true): Make sure various configurations
       are in place, which includes JAAS login conf file, krb5.ini file
       (or kdc/realm system properties). Also, if you don't use JAAS
       explicitly, make sure javax.security.auth.useSubjectCredsOnly is
       set to false.
   &lt;li&gt;Delegation in HTTP/SPNEGO fails: Make sure in Windows AD computer
       settings, the allow delegation box is checked.
   &lt;li&gt;Credentials not available: You don't have a native cache. Try to
       re-login as an AD account, or, consider the LSA-less way, say,
       -kinit.exe= or callback.
   &lt;li&gt;Checksum failed (or other encryption/decryption errors): If you are
       using username/password callbacks, possibly the password is wrong.
       If you are using a keytab (on the server side), possibly the keytab
       contains a bad key.
   &lt;li&gt;The Kerberos principal is not mine: Make sure there's no
       krb5cc_userid file inside your home directory. Java always uses
       this credential cache even if the user is logged in an AD user.
       Remove it.
   &lt;li&gt;EType not supported: Latest Java (update releases of all versions)
       already supports RC4-HMAC, which is the default etype used on
       Windows. You needn't specify default etypes for either the session
       key or ticket in krb5.ini.
   &lt;li&gt;Cannot find server name in Kerberos database: Have you mapped the
       service principal name(SPN) correctly? Please note that an SPN
       cannot be mapped to multiple accounts. Also, you must use the full
       qualified domain name in the ktpass command.
   &lt;li&gt;Server name (as seen in the debug output) is not FQDN (full
       qualified domain name), or becomes simply numeric IP address: Make
       sure DNS is correctly configured. JGSS uses
       InetAddress.getCanonicalHostName() to get the FQDN of the server's
       hostname. Write a tiny program to check it.
   &lt;li&gt;Cannot access Windows services like IIS: Make sure &quot;Do not require
       pre-authentication&quot; is not checked in AD user setting. Windows
       native services needs pre-authentication to provide PAC info in
       tickets.
   &lt;li&gt;Cross realm failed: Read into debug outputs, especially the TGS-REQ
       info. Make sure the service principal name is correct. If the
       Windows DNS server is not configured correctly, it may not return
       the correct full qualified host name.
   &lt;li&gt;Invalid option setting in ticket request: There are some options
       inside the [libdefaults] section of krb5.ini (say,
       forwardable=true, proxiable=true etc) which are used to provide
       KDCOptions when requesting a TGT using the AS-REQ message. In this
       case, when a TGT is returned, its TicketFlags are compared to the
       options here. Since in this paper we're mainly talking about TGT
       from the Windows LSA cache, these options are useless. Proving too
       many of them will only bring conflicts with your native TGT.&lt;/ul&gt;

&lt;h3&gt;Known Issues&lt;/h3&gt;

   If an AD account is also added into local administrator group on the
   client PC, Microsoft restricts such client from getting the session key
   for tickets (even if you set the allowtgtsessionkey registry key to 1).
   The workaround is: Just forget you're a logged in user, call kinit.exe.
   Do not depends on LSA credential cache.
&lt;p&gt;
   In a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://support.microsoft.com/kb/942219/en-us&quot;&gt;recent hotfix&lt;/a&gt; 
   (should be included in Vista SP1), this restriction is lifted for normal
   service tickets. However, it still applies to TGT. Since Java uses TGT
   to acquire tickets for other services (the standard Kerberos process),
   this update provides no benefit to JGSS programming on Windows.
   Furthermore, even if the implementation of Java is changed to read
   service tickets from the LSA cache, it still cannot perform delegation,
   since a TGT is always needed in that case.

&lt;h3&gt;Useful Tools&lt;/h3&gt;

   &lt;ol&gt;&lt;li&gt;KERBTRAY.EXE, KLIST.EXE. SETSPN.EXE, KTPASS.EXE from Microsoft.
   &lt;li&gt;Any network packet sniffer. For example, Windows Netmon, Wireshark.
   &lt;li&gt;Web browsers, with HTTP header viewer (for example, LiveHTTPHeaders
       for Firefox, and iehttpheaders for IE) are useful in debugging
       HTTP/SPNEGO programs.&lt;/ol&gt;

&lt;h3&gt;References&lt;/h3&gt;

   &lt;ol&gt;&lt;li&gt;RFC 4120, 4121, 3961, 3962
   &lt;li&gt;MSDN doc on Kerberos and Active Directory&lt;/ol&gt;</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/kerberos_programming_on_windows</guid>
         <pubDate>Mon, 23 May 2011 21:09:23 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Some Kerberos Compiler Warnings on Windows</title>
         <link>https://blogs.oracle.com/wangwj/entry/some_kerberos_compiler_warnings_on</link>
         <description>There is a rather old bug on native code compiler warnings on Windows. I have been the responsible engineer for some time but never really started working on it. Unfortunately, some warnings result in a real runtime error now. Sorry.
&lt;p&gt;
Here is the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/d901560d70a7&quot;&gt;changeset&lt;/a&gt; for it.
&lt;p&gt;
As you can see, we used the swprintf function in a not-so-standard way. The correct signature of the function is &lt;code&gt;swprintf(buffer, size, format, args...)&lt;/code&gt; but we didn't provide the &lt;code&gt;size&lt;/code&gt; argument. In the age of VC++ 2003, there were already warnings, but the runtime accepted this &quot;overloaded&quot; form and it ran fine. Starting from jdk7b108, we start using VC++ 2010 to build jdk7, the same warnings still show, but this time the runtime does not accept the form anymore, and a JVM crash is observed.
&lt;p&gt;
The lesson is never ignore compiler warnings.
&lt;p&gt;
The fix would be integrated in jdk7 builds in several weeks, and I've uploaded a copy &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.sun.com/wangwj/resource/vs2010warnings/w2k_lsa_auth.dll&quot;&gt;here&lt;/a&gt; (32 bit build) in case anyone wants to try it out. I build it in a VirtualBox guest and hope it contains no virus.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/some_kerberos_compiler_warnings_on</guid>
         <pubDate>Mon, 21 Mar 2011 03:25:22 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Jarsigner with Timestamping Behind a Firewall</title>
         <link>https://blogs.oracle.com/wangwj/entry/jarsigner_with_timestamping_behind_a</link>
         <description>We've supported timestamping in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/technotes/tools/solaris/jarsigner.html&quot;&gt;jarsigner&lt;/a&gt; for a long time. By providing a -tsa option to the command when signing a jar file, a timestamping block will be added to the signed jar. This makes an application to be accepted by Java Plugin in a future time when the signer's certificate already expires.
&lt;p&gt;
In a lot of enterprise environments, you need to go through a firewall to access the Internet, here, the TSA (Time Stamping Authority). We've noticed this some time ago. Therefore, when a connection to the TSA is not available, jarsigner would print out a message like this:
&lt;blockquote&gt;
jarsigner: unable to sign jar: no response from the Timestamping
Authority. When connecting from behind a firewall then an HTTP
proxy may need to be specified. Supply the following options to
jarsigner: &lt;br&gt;
&amp;nbsp;&amp;nbsp;-J-Dhttp.proxyHost=&amp;lt;hostname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;-J-Dhttp.proxyPort=&amp;lt;portnumber&amp;gt;
&lt;/blockquote&gt;
We thought this is very helpful, but there are still some customer feedbacks saying it does not work. It turns out that when a TSA server provides its service through an HTTPS website, in order to specify the proxy setting, you should use another pair of system property names:
&lt;blockquote&gt;
&amp;nbsp;&amp;nbsp;-J-Dhttps.proxyHost=&amp;lt;hostname&amp;gt;&lt;br&gt;
&amp;nbsp;&amp;nbsp;-J-Dhttps.proxyPort=&amp;lt;portnumber&amp;gt;
&lt;/blockquote&gt;
Detailed of proxy support in Java can be found &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/net/proxies.html&quot;&gt;here&lt;/a&gt;.
&lt;p&gt;
In order for people using other languages to reach this page, here are the same messages in Simplified Chinese and Japanese:
&lt;blockquote&gt;
jarsigner: 无法对 jar 进行签名: 时间戳颁发机构没有响应。 
如果要从防火墙后面连接, 则可能需要指定 HTTP 代理。请为 
jarsigner 提供以下选项:
&lt;/blockquote&gt;
and
&lt;blockquote&gt;
jarsigner: jarに署名できません: タイムスタンプ局からのレスポンスがありません。
ファイアウォールを介して接続するときは、必要に応じてHTTPプロキシを指定してください。
jarsignerに次のオプションを指定してください:&lt;/blockquote&gt;
(Best wishes for people in Japan. Hope this earthquake/tsunami/nuclear crisis can be over soon.)</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/jarsigner_with_timestamping_behind_a</guid>
         <pubDate>Thu, 17 Mar 2011 20:13:37 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Fixed-width Font Widened on Bold</title>
         <link>https://blogs.oracle.com/wangwj/entry/fixed_width_font_widened_on</link>
         <description>So here is a screenshot of a JDK source file I am working on now, in NetBeans:
&lt;p&gt;
&lt;img src=&quot;https://blogs.oracle.com/wangwj/resource/netbeans.font.png&quot; title=&quot;wired netbeans lucida sans typewriter font&quot;&gt;
&lt;p&gt;
It seems there is an extra space before the &quot;// ok&quot; comment on line 52 which makes the comments non-aligned. So I removed it. But then when I read the diff, it shows:
&lt;pre style=&quot;font-size:90%;&quot;&gt;
@@ -49,7 +49,7 @@
      &amp;#92;* Constructs an AS-REQ message.
      &amp;#92;*/
                                                 // Can be null? has default?
&lt;span style=&quot;color:red;&quot;&gt;-    public KrbAsReq(EncryptionKey pakey,        // ok&lt;/span&gt;
&lt;span style=&quot;color:green;&quot;&gt;+    public KrbAsReq(EncryptionKey pakey,       // ok&lt;/span&gt;
                       KDCOptions options,       // ok, new KDCOptions()
                       PrincipalName cname,      // NO and must have realm
                       PrincipalName sname,      // ok, krgtgt@CREALM
&lt;/pre&gt;
Bad, so they &lt;b&gt;were&lt;/b&gt; aligned, but after my change, they are not.
&lt;p&gt;
I am really confused by this. Is there anything wrong with the hg repository? or the diff command? or my console? Or, is there a hidden TAB character? I checked and checked but nothing seems wrong.
&lt;p&gt;
Finally I have to count the spaces one by one. Good heavens! It turns out that the font used in NetBeans &amp;mdash; Lucida Sans Typewriter &amp;mdash; has different widths between normal and bold typefaces.
&lt;p&gt;
Isn't this ridiculous? A fixed-width font's width should be fixed whenever it's shown in normal, or bold, or italic. I believe all modern IDEs use these styles to show different types of source tokens.
&lt;p&gt;
Anyway, I changed the font to the simple &quot;monospaced&quot; and everything looks normal now. Maybe the Lucida Sans Typewriter font is not fixed-width at all, it just looks like one.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/fixed_width_font_widened_on</guid>
         <pubDate>Tue, 15 Mar 2011 19:01:57 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Cool Mercurial Bundles</title>
         <link>https://blogs.oracle.com/wangwj/entry/cool_mercurial_bundles</link>
         <description>Although OpenJDK is mostly in open source state but there are still some code repositories closed. When I work from home and need to update these repositories, I'll have to connect to the Oracle VPN to access them. I always hesitate to use VPN at home because I won't be able to see other machines on the LAN (especially, VirtualBox guests using &lt;em&gt;this&lt;/em&gt; machine as the host) and I don't like accessing the Internet using the Oracle proxy servers. My solution is to create a VirtualBox guest for VPN exclusively.
&lt;p&gt;
But then I see a problem, there is &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.virtualbox.org/ticket/818&quot;&gt;a VirtualBox bug&lt;/a&gt; saying that symlinks in a shared folder shows incorrectly inside the guest. Now I share the OpenJDK forest in read-write mode to the guest, when trying to run &lt;code&gt;hg pull -R jdk/src/closed&lt;/code&gt; inside the guest, it would complain
&lt;pre&gt;
abort: Is a directory: /mnt/root/openjdk7/jdk/src/closed/.hg/wlock
&lt;/pre&gt;
This is bad.
&lt;p&gt;
So I go take a look at the Mercurial commands and notice this cool feature: bundles. A bundle looks like a code repository as a single file, which can contain the whole history or only part of it. Now in the guest I would call
&lt;pre&gt;
hg inc -R jdk/src/closed --bundle jsc
&lt;/pre&gt;
to create a bundle file to contain all incoming changesets of the jdk/src/closed repo. Note that there is no problem creating a normal file from within the guest in a shared folder. Then I can go back to the host machine, and call this
&lt;pre&gt;
hg fetch -R jdk/src/closed bundle://jsc
&lt;/pre&gt;
Cool, a bundle-schemed URI. In fact, I can now make the shared folder as read-only, and create another another smaller read-write shared folder only for file transmission from guest to host. Mecurial has dedicated commands like &lt;code&gt;bundle&lt;/code&gt; and &lt;code&gt;unbundle&lt;/code&gt; to deal with bundles, but I'm not eager to look into &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://mercurial.selenic.com/wiki/Bundle&quot;&gt;their details&lt;/a&gt; now.
&lt;p&gt;
Something else to say, I wrap the calls into a script, and it's a single script that can be called on both guest and host. In fact, this script does not perform any real mercurial/file actions, all it does is to iterate thru repository names and call echo to output command lines on the screen (plus #comments). I often write scripts in this way so that I can take a second look at the output commands for safety. After making sure they are OK I can simply copy and paste (drag thru and middle-click) lines I want to run to execute them. In this case, I run the &quot;hg inc&quot; lines on the guest and &quot;hg fetch&quot; lines on the host.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/cool_mercurial_bundles</guid>
         <pubDate>Mon, 14 Mar 2011 02:23:22 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - PolicyTool Tiny Behavior Change</title>
         <link>https://blogs.oracle.com/wangwj/entry/policytool_tiny_behavior_change</link>
         <description>&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.oracle.com/javase/6/docs/technotes/guides/security/PolicyGuide.html&quot;&gt;PolicyTool&lt;/a&gt; is the only GUI tool included in the JRE, which is used to generate a policy file for Java security permission management. You can use the tool to create a policy file or edit an existing one.
&lt;p&gt;
The &quot;Save As&quot; command of the tool opens a file save dialog, let you choose a file, and save the current policy into that file. When the file you choose already exists, the tool will issue a warning asking you if you want to overwrite it.
&lt;p&gt;
Here comes the problem, back in the old days, the file save dialog is drawn by Java itself, and it does not care about file overwriting at all. Therefore, it's the PolicyTool itself showing the prompt of overwrite warning. Nowadays, the file save dialog is loaded using the standard dialog of the native platforms, say, Windows style, GTK style, Mac style, etc, etc. This is nice, because people are familiar with those dialogs on their platforms and each of them provides some nice features on locating and navigating through the file system. But, there is one issue, as far as I know, all of these Save As dialogs already provide the overwrite warning feature internally, that is to say, when you click OK there, before the dialog closes, it warns you about possible file overwriting. Now in PolicyTool, you see the warning and click YES, the save file dialog is closed, but then, PolicyTool warns you again and you have to click another YES button. This is quite confusing as well as frustrating.
&lt;p&gt;
Therefore we remove PolicyTool's warning dialog in JDK 7. The client/awt guys are also looking through all Save As dialogs on different platforms, to make sure the behavior is the same.
&lt;p&gt;
The lesson is: there is much more to care about in an API design. A spec can be never too complicated. I mean the java.awt.FileDialog class.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/policytool_tiny_behavior_change</guid>
         <pubDate>Wed, 05 Jan 2011 18:42:59 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - I'm Still Here</title>
         <link>https://blogs.oracle.com/wangwj/entry/i_m_still_here</link>
         <description>Haven't written anything on this blog for a long time. I'm still in the Java SE core libraries team and we even have some new people. Oracle LEC in China was finished last September, JSRs for Java SE 7 and 8 were approved late last year and we are now busy adding the final bits for JDK 7 and testing it heavily. It's also time to think of what features I can add in JDK 8.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/i_m_still_here</guid>
         <pubDate>Mon, 03 Jan 2011 18:00:58 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - allow_weak_crypto for Kerberos</title>
         <link>https://blogs.oracle.com/wangwj/entry/allow_weak_crypto_for_kerberos</link>
         <description>I just &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/61c298558549&quot;&gt;added&lt;/a&gt; &lt;code&gt;allow_weak_crypto&lt;/code&gt; support in OpenJDK. With this property set to false, des-cbc-md5 and des-cbc-crc etypes are not supported, even if you include them i permitted_enctypes or default_{tkt|tgs}_enctypes settings.
&lt;br&gt;&lt;br&gt;
Please note that in MIT krb5-1.8, the default value for this property is false, which means the DES-related enctypes are disabled out-of-box. In Java, we choose to keep it true for compatibility reasons, which we've always cared most.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/allow_weak_crypto_for_kerberos</guid>
         <pubDate>Wed, 03 Mar 2010 18:53:27 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Announcing XML Signature 1.1 and Signature Properties Last Call</title>
         <link>https://blogs.oracle.com/mullan/entry/announcing_xml_signature_1_1</link>
         <description>The W3C XML Security Working Group has released a Last Call Working Draft for XML Signature 1.1:&lt;br /&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/TR/xmldsig-core1/&quot;&gt;http://www.w3.org/TR/xmldsig-core1/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;An explanation of the changes against the XML Signature 1.0&amp;nbsp; specification is available:&lt;br /&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/TR/xmldsig-core1/explain.html&quot;&gt;http://www.w3.org/TR/xmldsig-core1/explain.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Changes are focused on the set of mandatory to implement algorithms and markup for relevant key material.&lt;br /&gt;&lt;br /&gt;The Working Group has also released a Last Call Working Draft for XML Signature Properties:&lt;br /&gt;&lt;br /&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/TR/2010/WD-xmldsig-properties-20100204/&quot;&gt;http://www.w3.org/TR/2010/WD-xmldsig-properties-20100204/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Last Call period lasts until 18 March 2010; comments can be sent to public-xmlsec-comments @ w3.org.&amp;nbsp; The next step in the W3C Recommendation Track process is either a Candidate Recommendation phase to collect implementation experience, or another Working Draft.&lt;br /&gt;&lt;br /&gt;The WG continues its work on XML Encryption 1.1 and is also working on a 2.0 version of Canonical XML and XML Signature.&lt;br /&gt;&lt;br /&gt;Details on all the publications of the Working Group are available on&amp;nbsp; the Working Group Publication Status page at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/2008/xmlsec/wiki/PublicationStatus&quot;&gt;http://www.w3.org/2008/xmlsec/wiki/PublicationStatus&lt;/a&gt; .&amp;nbsp;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/announcing_xml_signature_1_1</guid>
         <pubDate>Fri, 12 Feb 2010 14:11:02 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Oracle</title>
         <link>https://blogs.oracle.com/wangwj/entry/oracle</link>
         <description>&lt;img src=&quot;http://wpcontent.answers.com/wikipedia/en/f/f0/The_Oracle_(i).gif&quot;&gt;
&lt;br/&gt;&lt;br/&gt;
The future begins today. Let's embrace it.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/oracle</guid>
         <pubDate>Wed, 27 Jan 2010 15:24:26 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Sun</title>
         <link>https://blogs.oracle.com/wangwj/entry/sun</link>
         <description>&lt;img src=&quot;https://blogs.oracle.com/jag/resource/SunRIPsmall.jpg&quot;/&gt;
&lt;br/&gt;&lt;br/&gt;
Linked from James Gosling's &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.sun.com/jag/entry/so_long_old_friend&quot;&gt;blog&lt;/a&gt;.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/sun</guid>
         <pubDate>Thu, 21 Jan 2010 06:44:44 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Secure Coding Guidelines for the Java Programming Language, Version 3.0</title>
         <link>https://blogs.oracle.com/mullan/entry/secure_coding_guidelines_for_the</link>
         <description>&lt;p&gt;A new version (3.0) of the Secure Coding Guidelines for the Java Programming Language has just been published at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/security/seccodeguide.html&quot;&gt;http://java.sun.com/security/seccodeguide.html&lt;/a&gt;&lt;/p&gt; 
  &lt;p&gt;The secure coding guidelines documents best practices and patterns that you should adhere to when writing Java code in order to avoid vulnerabilities. These guidelines are important for every Java developer, whether you are writing a trusted library or an end-user application.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;Version 3.0 is a significant enhancement and includes a new section on fundamentals as well as many new guidelines and enhancements.&lt;/p&gt; 
  &lt;p&gt;Please send me any feedback you may have.&lt;br /&gt;&lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/secure_coding_guidelines_for_the</guid>
         <pubDate>Wed, 06 Jan 2010 05:38:36 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - ExtendedGSSContext</title>
         <link>https://blogs.oracle.com/wangwj/entry/extendedgsscontext</link>
         <description>We're doing some experiments in JDK 7 to add more JGSS APIs. Currently they're defined into the vendor-specific package &lt;tt&gt;com.sun.security.jgss&lt;/tt&gt;, but we'd like to enhance them and finally get them into the standard &lt;tt&gt;org.ietf.jgss&lt;/tt&gt; package.
&lt;br&gt;&lt;br&gt;
Basically, we defined a new &lt;tt&gt;ExtendedGSSContext&lt;/tt&gt; interface. Now it has 3 methods:
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;tt&gt;requestDelegPolicy(boolean state)&lt;/tt&gt;&lt;/b&gt;:
Requests that the delegation policy be respected. When a true value is requested, the underlying context would use the delegation policy defined by the environment as a hint to determine whether credentials delegation should be performed. This method is mainly used to deal with the Kerberos OK-AS-DELEGATE flag.
&lt;li&gt;&lt;b&gt;&lt;tt&gt;getDelegPolicyState()&lt;/tt&gt;&lt;/b&gt;:
Returns the delegation policy response.
&lt;li&gt;&lt;b&gt;&lt;tt&gt;inquireSecContext(InquireType type)&lt;/tt&gt;&lt;/b&gt;:
Returns the mechanism-specific attribute associated with &lt;tt&gt;type&lt;/tt&gt;. Currently we're supporting four types for the Kerberos 5 mechanism: KRB5_GET_TKT_FLAGS for flags in a service ticket, KRB5_GET_SESSION_KEY for the session key of an established session, KRB5_GET_AUTHZ_DATA  for authorization data in a service ticket (mainly used on AD for the PAC info), and KRB5_GET_AUTHTIME for the authtime in a service ticket.
&lt;/ul&gt;
We haven't created method names like &lt;tt&gt;getTicketFlags&lt;/tt&gt; or &lt;tt&gt;getSessionKey&lt;/tt&gt; because we believe these information are mechanism-specific and not general enough on the GSS level. Even the &lt;tt&gt;getSessionKey&lt;/tt&gt; method only returns Kerberos 5-specific keys, where the etype values are only defined in Kerberos 5. A disadvantage side of this design is that the method must return &lt;tt&gt;Object&lt;/tt&gt; and the result needs to be casted to other type depending on the input type value.
&lt;br&gt;&lt;br&gt;
Full spec is at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/file/tip/src/share/classes/com/sun/security/jgss&quot;&gt;OpenJDK code repository&lt;/a&gt;, and implementation in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/file/15568b6998f4/src/share/classes/sun/security/jgss&quot;&gt;other parts&lt;/a&gt; of the code repo.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/extendedgsscontext</guid>
         <pubDate>Mon, 14 Dec 2009 21:45:27 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Using more recent Apache XML Security Libraries with JDK 6 or JDK 7</title>
         <link>https://blogs.oracle.com/mullan/entry/using_more_recent_apache_xml</link>
         <description>&lt;p&gt;This question has come up in user forums quite a bit: &amp;quot;how can I use a more recent Apache XML Security library with the XML Signature APIs (JSR 105) in JDK 6 and JDK 7?&amp;quot;&lt;/p&gt; 
  &lt;p&gt;Most of the time, you will not need to do this. Our JDK 6/7 XML Signature implementation is based on Apache XML Security and we try to keep up with the latest release. However, there may be a bug fix or new algorithm that you really need and are willing to depend on a more recent version of the Apache XML Security library that has that fix.&amp;nbsp; Here is what you need to do if so:&lt;/p&gt; 
  &lt;ul&gt; 
    &lt;li&gt;Place the Apache xmlsec.jar in the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/standards/index.html&quot;&gt;endorsed standards directory&lt;/a&gt;.&amp;nbsp;&lt;/li&gt; 
    &lt;li&gt;You will also need to put the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://commons.apache.org/logging/&quot;&gt;Apache commons logging jar&lt;/a&gt; there as well, since the Apache code uses a different logging mechanism than the JDK.&lt;/li&gt; 
  &lt;/ul&gt;And that's it. You can also use the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.endorsed.dirs&quot;&gt;java.endorsed.dirs&lt;/a&gt;&amp;nbsp; system property to point to different directory containing the jars above.&lt;tt&gt; &lt;br /&gt;&lt;/tt&gt; 
  &lt;p&gt; &lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/using_more_recent_apache_xml</guid>
         <pubDate>Thu, 01 Oct 2009 08:57:48 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Using stronger XML Signature Algorithms in JDK 7</title>
         <link>https://blogs.oracle.com/mullan/entry/using_stronger_xml_signature_algorithms</link>
         <description>&lt;p&gt;One of the new features of the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/TR/xmldsig-core1/&quot;&gt;XML Signature 1.1 specification&lt;/a&gt;, which is currently in draft review, is the addition of stronger cryptographic algorithms to the REQUIRED algorithms, such as the RSAwithSHA256 SignatureMethod algorithm. Additional RECOMMENDED and OPTIONAL algorithms have also been added. See &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/TR/xmldsig-core1/#sec-AlgID&quot;&gt;section 6.1&lt;/a&gt; for a complete list of algorithm requirements.&lt;/p&gt; 
  &lt;p&gt;In &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk7.dev.java.net/&quot;&gt;JDK 7&lt;/a&gt;, you can already use many of these stronger XML Signature algorithms in your Java applications. The following algorithms are newly supported: the RSAwithSHA256, RSAwithSHA384, RSAwithSHA512 signature algorithms and the HMAC-SHA256, HMAC-SHA384, and HMAC-SHA512 mac algorithms. &lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;To take advantage of these stronger algorithms when generating XML Signatures, you may have to specify the URI of the algorithm (if there isn't a String constant already defined in the API). For example:&lt;/p&gt; 
  &lt;pre&gt;XMLSignatureFactory factory = XMLSignatureFactory.getInstance(); 
&lt;/pre&gt; 
  &lt;pre&gt;SignatureMethod sm = 
    factory.newSignatureMethod
        (&quot;http://www.w3.org/2001/04/xmldsig-more#rsa-sha256&quot;, 
         (SignatureMethodParameterSpec) null);&lt;/pre&gt; 
  &lt;p&gt; No special code is required when validating XML Signatures with these algorithms as the implementation will automatically identify the algorithm URIs.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;We plan to add String constants for these URIs in a future revision of the JSR 105 API, but for now you must specify the URIs when generating signatures.&lt;/p&gt; 
  &lt;p&gt;Last, but not least, we are planning to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6845600&quot;&gt;backport support&lt;/a&gt; for these stronger signature and mac algorithms to JDK 6. &lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/using_stronger_xml_signature_algorithms</guid>
         <pubDate>Fri, 24 Jul 2009 09:07:10 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Hope to see you at our Java Security BOF next week at JavaOne</title>
         <link>https://blogs.oracle.com/mullan/entry/hope_to_see_you_at</link>
         <description>&lt;p&gt;Just a reminder that we'll be holding a BOF at this year's &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javaone/&quot;&gt;JavaOne conference&lt;/a&gt; on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www28.cplan.com/cc230/sessions_catalog.jsp?ilc=230-1&amp;amp;ilg=english&amp;amp;isort=&amp;amp;isort_type=&amp;amp;is=yes&amp;amp;icriteria1=+&amp;amp;icriteria2=+&amp;amp;icriteria8=&amp;amp;icriteria3=Mullan&amp;amp;icriteria9=&amp;amp;icriteria4=+&amp;amp;icriteria7=+&quot;&gt;&amp;quot;New Security Features in JDK™ Releases 6 and 7&amp;quot;&lt;/a&gt;.&amp;nbsp; It is on Wednesday at 6:45 PM in Gateway 102/103 in the Moscone Center. We plan to have a short presentation on the
latest security features in JDK 6, JDK 7 and JavaFX. Then, we are going to show a demo of the new &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/webnotes/6u14.html#blacklist-jar-6u14&quot;&gt;blacklist mechanism&lt;/a&gt; in the just-released &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/downloads/index.jsp&quot;&gt;JRE 6u14&lt;/a&gt;. The remaining time will be for Q&amp;amp;A so please bring
your questions on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/technologies/security/index.jsp&quot;&gt;Java Security&lt;/a&gt; as many members of Sun's Java Security team will be on hand to help answer them.&amp;nbsp;&lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/hope_to_see_you_at</guid>
         <pubDate>Fri, 29 May 2009 08:45:15 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Subscribe to a mail list and start replying immediately</title>
         <link>https://blogs.oracle.com/wangwj/entry/subscribe_to_a_mail_list</link>
         <description>Sometimes I browse through archives of a mail list and find some topics very interesting. I subscribe it, but only new messages come to my mail client, and those topics I found interesting initially won't appear anymore. How I wish I can reply to those topics.
&lt;br/&gt;&lt;br/&gt;
If it's also hosted on Google Groups, that's great. Just reply to it there. If you don't want to keep using your Google Account in the discussion. Reply with some nonsense in Google Groups, and then reply with your real identity after that nonsense reaches your mail box.
&lt;br/&gt;&lt;br/&gt;
If the list is available on gmane.org, you may be able to reply from there.
&lt;br/&gt;&lt;br/&gt;
If the above two methods do not apply, you can still force that mail appear in your mailbox. Just create a mbox file and import it into your mail client. If the mail list is not that busy, I would simply download the archive including the topic, gunzip it, and import the archive. Note that some archive changes the mail address to &lt;code&gt;me at here.com&lt;/code&gt;. Just run a &lt;code&gt;perl -p -i -e 's/ at /@/g' file&lt;/code&gt; is OK.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/subscribe_to_a_mail_list</guid>
         <pubDate>Sat, 25 Apr 2009 06:31:53 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Come to our Java Security BOF at JavaOne 2009</title>
         <link>https://blogs.oracle.com/mullan/entry/come_to_our_java_security</link>
         <description>&lt;p&gt;We'll be holding a BOF at this year's &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javaone/&quot;&gt;JavaOne conference&lt;/a&gt; on &lt;a rel=&quot;nofollow&quot;&gt;&amp;quot;New Security Features in JDK™ Releases 6 and 7&amp;quot;&lt;/a&gt;. This is sure to be an interesting BOF, as we'll go over all of the latest security features that we have added to JDK 6 and new ones that are targeted for JDK 7. We also plan to show a demo of some of the features. There should be plenty of time for Q&amp;amp;A so please bring your questions on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/technologies/security/index.jsp&quot;&gt;Java Security&lt;/a&gt; as many members of Sun's Java Security team will be on hand to help answer them.&amp;nbsp;&lt;/p&gt; 
  &lt;p&gt;I'll add more details as we get closer to JavaOne.&lt;img/&gt;&lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/come_to_our_java_security</guid>
         <pubDate>Fri, 24 Apr 2009 08:19:08 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Fedora 10</title>
         <link>https://blogs.oracle.com/wangwj/entry/fedora_10</link>
         <description>Trying to install it again. Last time (probably F8) it does not support GUI login as a NIS user. GDM hangs.
&lt;br/&gt;&lt;br/&gt;
Hope it's fine now. Will see if it's a better system building OpenJDK.
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Update&lt;/b&gt;: NIS account can login, no +::: lines needed. However, system goes unstable when trying to change network setting to manual IP. Re grub-install and now back in Ubuntu.
&lt;br/&gt;&lt;br/&gt;
Anyway, OS is there now, might try again someday.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/fedora_10</guid>
         <pubDate>Wed, 22 Apr 2009 01:03:08 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Several Enhancements for JarSigner</title>
         <link>https://blogs.oracle.com/wangwj/entry/several_enhancements_for_jarsigner</link>
         <description>There're several enhancements to the jarsigner tool in OpenJDK lately.
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;First&lt;/b&gt;, jarsigner accepts a new option &lt;tt&gt;-certchain &lt;em&gt;file&lt;/em&gt;&lt;/tt&gt; to use a certificate chain in an external file. People can using PKCS #11 tokens to store their private keys. Some of these tokens are so small that there's no place to store the certificate chain inside it. Although you can access it with a &lt;tt&gt;KeyStore.getInstance(&quot;pkcs11&quot;)&lt;/tt&gt;, the &lt;tt&gt;getCertificateChain()&lt;/tt&gt; method returns nothing. Now you can use jarsigner with this kind of tokens, using the token as the keystore, but point your certchain to another file that contains the full chain.
&lt;br/&gt;&lt;br&gt;
&lt;b&gt;Second&lt;/b&gt;, people see jarsigner showing warnings now and then, like &lt;em&gt;certificate expired&lt;/em&gt;, or &lt;em&gt;keyusage not correct&lt;/em&gt;. if they want to know this information if jarsigner is called in a script, they can only grep the words. Now, if you add a new option &lt;tt&gt;-strict&lt;/tt&gt; , not only the warnings will be printed, a &lt;tt&gt;System.exit(&lt;em&gt;n&lt;/em&gt;)&lt;/tt&gt; is called when there is/are warning(s). Here, &lt;em&gt;n&lt;/em&gt; is a binary sum of these pre-defined warning codes:
&lt;ul&gt;
&lt;li&gt;2: hasExpiringCert
&lt;li&gt;4: chainNotValidated (including hasExpiredCert, notYetValidCert)
&lt;li&gt;8: Usages problems (including badKeyUsage, badExtendedKeyUsage, badNetscapeCertType)
&lt;li&gt;16: hasUnsignedEntry
&lt;li&gt;32: notSignedByAlias or aliasNotInStore
&lt;/ul&gt;
Noticed the new warning type notSignedByAlias? Now you can call &lt;tt&gt;jarsigner -verify jarfile alias0 alias1...&lt;/tt&gt; with zero+ of aliases to check if certificates of the signed entries inside the file match any of these aliases.
&lt;br/&gt;&lt;br/&gt;
&lt;b&gt;Third&lt;/b&gt;, people complain jarfiles show too little or too much output at verifying. If you simply verify a jarfile, it might tell you &lt;em&gt;some warnings, call with -verbose -certs to read details&lt;/em&gt;. You verify again with those two options on, and huala... thousands of lines fly through and you cannot catch a word. Now &lt;tt&gt;-verbose&lt;/tt&gt; has sub options so you can precisely tell it how verbose the output should be:
&lt;ul&gt;
&lt;li&gt;-verbose:all, this is the default -verbose, which shows as much information as it did
&lt;li&gt;-verbose:grouped, this shows less information. The entries with the same signer info are grouped together. This means the names of the entries are listed together, with the signer info only printed once. Something like this:
&lt;pre&gt;      smk   A.class
      smk   B.class
      ...
 
      Certificate A (CN=A, OU=B)
&lt;/pre&gt;
&lt;li&gt;-verbose:summary. This is the simplest one. Besides grouping the entries with same signer info together, not all the entry names are printed, but only one line of summary. Something like this:
&lt;pre&gt;smk   A.class (and N-1 more)
 
      Certificate A (CN=A, OU=B)
&lt;/pre&gt;
Using this option, unless your jar file is signed by dozens of different signers, no matter how many entries inside, the output should not exceeds two screens.
&lt;/ul&gt;</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/several_enhancements_for_jarsigner</guid>
         <pubDate>Sun, 19 Apr 2009 18:55:31 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Would 6 units of band class qualify me for a free JavaOne 2009 pass?</title>
         <link>https://blogs.oracle.com/wetmore/entry/would_6_units_of_band</link>
         <description>&lt;p&gt;The worst thing about graduating and getting a job in the real world is that all the cool benefits dried up.&amp;nbsp; Student rates on travel, movie passes, food...etc.&lt;/p&gt; 
  &lt;p&gt; I just noticed &lt;a rel=&quot;nofollow&quot; title=&quot;Free JavaOne 2009 pass offer&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javaone/2009/students_and_educators/&quot;&gt;an offer on the J1 web site&lt;/a&gt; that appears to allow students (6 units or more) to get a free, &lt;b&gt;FULL&lt;/b&gt; JavaOne 2009 conference pass.&amp;nbsp; Even as a Sun employee, I only get a limited pass.&amp;nbsp; Which got me thinking:&amp;nbsp; I'm currently taking a 1 unit music performance class at a local community college.&amp;nbsp; If I sign up for 5 more of these classes, would that qualify?&lt;/p&gt; 
  &lt;p&gt;Hm...I should check with my manager...&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/would_6_units_of_band</guid>
         <pubDate>Fri, 17 Apr 2009 20:23:45 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - New API to indicate the reason a certificate chain was invalid</title>
         <link>https://blogs.oracle.com/mullan/entry/new_api_to_indicate_the</link>
         <description>&lt;p&gt;In &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk7.dev.java.net/&quot;&gt;JDK 7&lt;/a&gt;, we have added a new method (&lt;font face=&quot;courier new,courier,monospace&quot;&gt;getReason&lt;/font&gt;) to the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/CertPathValidatorException.html&quot;&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;java.security.cert.CertPathValidatorException&lt;/font&gt;&lt;/a&gt; class which returns an object indicating the reason a certificate chain, or &lt;font face=&quot;courier new,courier,monospace&quot;&gt;CertPath&lt;/font&gt;, is invalid. Previously, there was no standard mechanism to determine the reason of failure, and applications had to depend on the exception message or the cause which could vary based on the underlying service provider implementation.&lt;/p&gt; 
  &lt;p&gt;The &lt;font face=&quot;courier new,courier,monospace&quot;&gt;getReason&lt;/font&gt; method returns an instance of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/CertPathValidatorException.Reason.html&quot;&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;CertPathValidatorException.Reason&lt;/font&gt;&lt;/a&gt;, which is an interface. There are 2 subclasses of this interface. One is &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/CertPathValidatorException.BasicReason.html&quot;&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;BasicReason&lt;/font&gt;&lt;/a&gt; which is an enumeration of reasons which can apply to certificate chains of any type (X.509, PGP, etc). It contains reasons such as EXPIRED (certificate has expired) or INVALID_SIGNATURE. The other subclass is &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/PKIXReason.html&quot;&gt;&lt;font face=&quot;courier new,courier,monospace&quot;&gt;PKIXReason&lt;/font&gt;&lt;/a&gt;, and that enumerates the potential PKIX-specific reasons
 that an X.509 certification path may be invalid according to the PKIX
 (RFC 3280) standard, for example UNRECOGNIZED_CRIT_EXT . Here's an example of how you might use these new APIs in your application that validates certificate chains:&lt;/p&gt; 
  &lt;pre&gt;CertPathValidator cpv = CertPathValidator.getInstance(&quot;PKIX&quot;);
try {
&amp;nbsp;&amp;nbsp;&amp;nbsp; CertPathValidatorResult cpvr = cpv.validate(path, params);
} catch (CertPathValidatorException cpve) {
    CertPathValidator.Reason reason = cpve.getReason();
    int index = cpve.getIndex();
    System.err.println(&quot;Invalid certificate chain, certificate[&quot; + index + &quot;], reason: &quot; + reason);⁞  
}
&lt;/pre&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/new_api_to_indicate_the</guid>
         <pubDate>Fri, 03 Apr 2009 11:39:42 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - New CertificateRevokedException class in JDK 7</title>
         <link>https://blogs.oracle.com/mullan/entry/new_certificaterevokedexception_class_in_jdk</link>
         <description>&lt;p&gt;There is a new &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/CertificateRevokedException.html&quot;&gt;CertificateRevocationException&lt;/a&gt; class in &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;https://jdk7.dev.java.net/&quot;&gt;JDK 7&lt;/a&gt; in the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.security.cert&quot;&gt;java.security.cert&lt;/a&gt; package that indicates that an X.509 certificate is revoked and also allows you to determine additional information such as the reason the certificate has been revoked and when it was revoked.&amp;nbsp; The getRevocationReason method returns a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://download.java.net/jdk7/docs/api/java/security/cert/CRLReason.html&quot;&gt;CRLReason&lt;/a&gt;, which is a new enum class that enumerates the different reasons an X.509 certificate can be revoked, such as compromise of the private key. In JDK 7, The Sun PKIX CertPathValidator service provider implementation has been enhanced to throw this exception. Here's an example of how your application may use this new exception class:&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;pre&gt;CertPathValidator cpv = CertPathValidator.getInstance(&quot;PKIX&quot;, &quot;Sun&quot;);
try {
&amp;nbsp;&amp;nbsp;&amp;nbsp; CertPathValidatorResult cpvr = cpv.validate(path, params);
} catch (CertPathValidatorException cpve) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (cpve.getCause() instanceof CertificateRevokedException) {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CertificateRevokedExcepion cre = (CertificateRevokedException) cpve.getCause();&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://System.out.println&quot;&gt;
        System.err.println(&quot;Certificate&lt;/a&gt;&amp;nbsp; revoked on &quot; + cre.getRevocationDate());&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://System.err.println&quot;&gt;
        System.err.println(&quot;reason&lt;/a&gt;&amp;nbsp; for revocation: &quot; + cre.getCRLReason());
    }
}
&lt;/pre&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/new_certificaterevokedexception_class_in_jdk</guid>
         <pubDate>Fri, 27 Mar 2009 08:44:19 +0000</pubDate>
      </item>
      <item>
         <title>by Sean Mullan   - Greetings</title>
         <link>https://blogs.oracle.com/mullan/entry/greetings</link>
         <description>&lt;p&gt;Hello everyone. Although I have been with Sun for over 10 years, this is my first blog entry at &lt;a rel=&quot;nofollow&quot;&gt;blogs.sun.com.&lt;/a&gt; I already have a &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://weblogs.java.net/blog/mullan/&quot;&gt;blog&lt;/a&gt; over at java.net (http://weblogs.java.net/blog/mullan/), but for now I will be posting new entries right here at &lt;a rel=&quot;nofollow&quot;&gt;blogs.sun.com.&lt;/a&gt; I may still update my blog at java.net from time to time, or figure out a way to cross-post my entries.&lt;/p&gt; 
  &lt;p&gt;A little about myself. I work on the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/security&quot;&gt;Java Security&lt;/a&gt; Team and have spent almost 10 years working on the Java SE security technology. I was specification lead of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://jcp.org/en/jsr/detail?id=55&quot;&gt;JSR 55&lt;/a&gt; and co-specification lead of &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://jcp.org/en/jsr/detail?id=105&quot;&gt;JSR 105&lt;/a&gt;, both successful APIs that were integrated into Java SE. I'm also Sun's representative on the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.w3.org/2008/xmlsec/&quot;&gt;W3C XML Security Working Group&lt;/a&gt; and a committer on the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://santuario.apache.org/&quot;&gt;Apache XML Security project&lt;/a&gt;. Lately, I have been investigating and working on security features related to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://javafx.com&quot;&gt;JavaFX&lt;/a&gt; and web-deployed technologies.&lt;/p&gt; 
  &lt;p&gt;&amp;nbsp;Stay tuned for my next entry about the new CertificateRevokedException class in JDK 7.&lt;br /&gt;&lt;/p&gt;</description>
         <author>Sean Mullan</author>
         <guid isPermaLink="false">https://blogs.oracle.com/mullan/entry/greetings</guid>
         <pubDate>Fri, 20 Mar 2009 12:49:12 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Another new keytool enhancement: -printcert -sslserver</title>
         <link>https://blogs.oracle.com/wangwj/entry/another_old_new_keytool_enhancement</link>
         <description>Andreas has written &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.sun.com/andreas/entry/no_more_unable_to_find&quot;&gt;a blog entry&lt;/a&gt; on retrieving certificates from an SSL server. Whenever I see someone asking this question on &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://forums.sun.com&quot;&gt;the Java forum&lt;/a&gt; I point the user to this entry. Now it's time for this function to be included in keytool.
&lt;br&gt;&lt;br&gt;
Call &lt;b&gt;keytool -printcert -sslserver sun.com&lt;/b&gt; to see what's shown.
&lt;br&gt;&lt;br&gt;
During the implementation of this feature, there are some discussions on how the function should be called. Two topics are most interesting:
&lt;br&gt;&lt;br&gt;
&lt;b&gt;What's the function name?&lt;/b&gt; At first, the plan is to add a new function to import the certificate into a keystore. The command will look like &quot;-importcert -sslserver&quot;. However, there came several problems:
&lt;ol&gt;
&lt;li&gt;For a normal certificate file, you can first call -printcert on it, read carefully, and then decide if it can be imported. For a certificate from an SSL server, you can still call something like &quot;-printcert -sslserver&quot; on it, but do you dare call &quot;-importcert -sslserver&quot; after examining it carefully? No, because the SSL server is not controlled by you, and it might send out a different certificate in the second call. That's scary, isn't it?
&lt;li&gt;An SSL server sends you a certificate chain. If you want to import one that's not always the end-entity cert, you need to specify a position number. This means another option, more interactions, and, more error messages or IndexOutOfBoundException. That's not good.
&lt;/ol&gt;
So the command ends up with a simple &quot;-printcert -sslserver&quot;. It's left to the user to read/check/cut/paste the info wanted.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;What protocols to support?&lt;/b&gt; This is a simple question, and the answer is ALL. Every application protocol that's based on SSL is included. However, the implementation chooses only HTTPS, for several reasons:
&lt;ol&gt;
&lt;li&gt;HTTPS is the most popular SSL-based protocol out there, and programming it is the easiest, I simply call
&lt;pre&gt;
new URL(&quot;https://&quot; + sslserver).openConnection().connect();
&lt;/pre&gt;
&lt;li&gt;HTTPS supports proxy, so you can add -Dhttps.proxyHost and -Dhttps.proxyPort if the SSL server is behind a proxy.
&lt;li&gt;Last and the best. It also works for any SSL-based application protocol, because the handshake part of any such protocol is identical. Please notice that I only call the connect() method, where handshake is done but no application specific data communication is performed yet.
&lt;/ol&gt;
&lt;hr&gt;
BTW, the feature was added into keytool &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/1d621ef0330b&quot;&gt;long time ago&lt;/a&gt;.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/another_old_new_keytool_enhancement</guid>
         <pubDate>Sun, 22 Feb 2009 23:40:51 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - keytool enhancements</title>
         <link>https://blogs.oracle.com/wangwj/entry/keytool_enhancements</link>
         <description>&lt;b&gt;Update&lt;/b&gt;: CRLDistributionPoints extension support added.
&lt;hr&gt;
There're two enhancements made to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/tools/solaris/keytool.html&quot;&gt;keytool&lt;/a&gt; today (the doc has not been updated, it's still for JDK 6):
&lt;h3&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/90ab7b4891e3&quot;&gt;new commands and options&lt;/a&gt;&lt;/h3&gt;
We have 2 new commands: -gencert, -printcertreq and 1 new option -ext. Read the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/view_bug.do?bug_id=6780416&quot;&gt;RFE descriptions&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;-printcertreq&lt;/b&gt; is simply for printing the content of a certificate request. It behaves like the -printcert command, reading a PKCS #10 format cert req from a file or stdin, and does not need a keystore to run with.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;-gencert&lt;/b&gt; is a big enhancement, which means you can setup a tiny CA now with keytool. The command reads a certificate request from a file (specified by -infile) or stdin, creates a certificate, signs it with the private key in the PrivateKeyEntry specified by -alias, and print the output to another file (specified by -outfile) or stdout. That's it. Just like -genkeypair for self-signed certificate, you can specify -sigalg, -startdate, and -validity options to the command.
&lt;br&gt;&lt;br&gt;
&lt;b&gt;-ext&lt;/b&gt; is used to add X.509v3 certificate extensions to a certificate (for both -genkeypair and -gencert) or a certificate request (for -certreq). The option can be specified multiple times to add multiple extensions. The value of this option takes the form of &lt;em&gt;name&lt;/em&gt;[:critical][=&lt;em&gt;value&lt;/em&gt;]. Here &lt;em&gt;name&lt;/em&gt; is the extension name, and &lt;em&gt;value&lt;/em&gt; the value (omit if empty). The :critical modifier, if provided, means the extension's isCritical attribute is true; otherwise, false.
&lt;br/&gt;&lt;br/&gt;
Currently we support these named extensions (case-insensitive):
&lt;table border=&quot;1&quot; style=&quot;font-size:small;&quot;&gt;
&lt;tr&gt;&lt;th&gt;name&lt;/th&gt;&lt;th&gt;value&lt;/th&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;BC or BasicConstraints&lt;/td&gt;&lt;td&gt;The full form: &quot;ca:{true|false}[,pathlen:len]&quot;;
                               or, &quot;len&quot;, a shorthand for &quot;ca:true,pathlen:len&quot;;
                               or omitted, means &quot;ca:true&quot;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;KU or KeyUsage&lt;/td&gt;&lt;td&gt;usage(,usage)&amp;#92;*, usage can be one of digitalSignature,
                               nonRepudiation (contentCommitment), keyEncipherment,
                               dataEncipherment, keyAgreement, keyCertSign, cRLSign,
                               encipherOnly, decipherOnly. Usage can be abbreviated
                               with the first few letters (say, dig for
                               digitalSignature) or in camel-case style (say,
                               dS for digitalSignature, cRLS for cRLSign), as long as
                               no ambiguity is found. Usage is case-insensitive.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;EKU or ExtendedkeyUsage&lt;/td&gt;&lt;td&gt;usage(,usage)&amp;#92;*, usage can be one of anyExtendedKeyUsage,
                               serverAuth, clientAuth, codeSigning, emailProtection,
                               timeStamping, OCSPSigning, or any OID string.
                               Named usage can be abbreviated with the first
                               few letters or in camel-case style, as long as
                               no ambiguity is found. Usage is case-insensitive.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;SAN or SubjectAlternativeName&lt;/td&gt;&lt;td&gt;type:value(,type:value)&amp;#92;*, type can be EMAIL, URI,
                               DNS, IP, or OID, value is the string format value
                               for the type.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;IAN or IssuerAlternativeName&lt;/td&gt;&lt;td&gt;same as SubjectAlternativeName&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;SIA or SubjectInfoAccess&lt;/td&gt;&lt;td&gt;method:location-type:location-value
                               (,method:location-type:location-value)&amp;#92;*,
                               method can be &quot;timeStamping&quot;, &quot;caRepository&quot; or 
                               any OID. location-type and location-value can be any
                               type:value supported by the SubjectAlternativeName
                               extension.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;AIA or AuthorityInfoAccess&lt;/td&gt;&lt;td&gt;same as SubjectInfoAccess. method can be &quot;ocsp&quot;,
                               &quot;caIssuers&quot; or any OID.&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;CRL or CRLDistributionPoints&lt;/td&gt;&lt;td&gt;same as SAN. This means you can only add one point with only names&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;
&lt;br&gt;
When name is an arbitrary OID, value is the HEX dumped DER encoding of the extnValue for the extension excluding the OCTET STRING type and length bytes. Any extra character other than standard HEX numbers (0-9, a-f, A-F) are ignored in the HEX string. Therefore, both &quot;01:02:03:04&quot; and &quot;01020304&quot; are accepted as identical values. If there's no value, the extension has an empty value field then.
&lt;br&gt;&lt;br&gt;
A special name &quot;honored&quot;, used in -gencert only, denotes how the extensions included in the certificate request should be honored. The value for this name is a comma-seperated list of &quot;all&quot; (all requested extensions are honored), &quot;name[:{critical|non-critical}]&quot; (the named extension is honored, but using a different isCritical attribute) and &quot;-name&quot; (used with all, denotes an exception). Requested extensions are not honored by default.
&lt;br&gt;&lt;br&gt; 
If, besides the -ext honored option, another named or OID -ext option is provided, this extension will be added to those already honored. However, if this name (or OID) also appears in the honored value, its value and criticality overrides the one in the request.
&lt;br&gt;&lt;br&gt;
The subjectKeyIdentifier extension is always created. For non self-signed certificates, the authorityKeyIdentifier is always created.
&lt;br&gt;&lt;br&gt;
Try this command on your system if you already have 2 self-signed certs me and ca created in your default keystore:
&lt;pre&gt;
    keytool -storepass changeit -certreq -alias me -ext bc -ext eku=sa,ca | &amp;#92;&amp;#92;
    keytool -storepass changeit -gencert -alias ca -ext honored=all,-bc &amp;#92;&amp;#92;
        -ext aia=ocsp:uri:http://ocsp.ca.com,cai:uri:http://ca.com/ca.crt  |
    keytool -printcert
&lt;/pre&gt;
Here, the user me requests for an SSL server certificate from the CA. It asks for an EKU extension named ServerAuth and ClientAuth, which is useful for an SSL server. However, it also secretly asks for a BC extension, so that it can start its own CA. The CA, with sharp eyes, notices this problem. It grants all extensions requested &lt;b&gt;except&lt;/b&gt; BC. It also adds another extension AIA which includes issuer info into the cert generated.
&lt;h3&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/9b1bc2e28518&quot;&gt;openssl-style certificate support&lt;/a&gt;&lt;/h3&gt;
When you run &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.openssl.org/docs/apps/x509.html&quot;&gt;openssl x509 -text&lt;/a&gt; with an X.509 certificate, the output includes a bunch of human-readable texts before the BASE64-encoded certificate itself. Java did not accept these texts and threw an exception something like &quot;unknown tag or bad length&quot;, since it tried to interpret the file as DER encoded. Now we enhance the X.509 &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/api/java/security/cert/CertificateFactory.html&quot;&gt;CertificateFactory&lt;/a&gt; class to accept this kind of certificate.
&lt;br&gt;&lt;br&gt;&lt;hr&gt;&lt;br&gt;
By the way, have I mentioned -startdate before? This option allows you to change the issuing time of a certificate from current system time to something else. Some people may like this option to create certs for special test cases, and some other people would like the certificate to have an earlier time because they want to use it right now but their clients and servers are not precisely time-synchronized. The grammar for this option takes one of the 2 following formats:
&lt;ol&gt;
&lt;li&gt;([+-]nnn[ymdHMS])+
&lt;li&gt;[yyyy/mm/dd] [HH:MM:SS]
&lt;/ol&gt;
So -startdate -5M means 5 minutes ago, -startdate &quot;2001/01/01 11:11:11&quot; means that exact time, -startdate 11:11:11 means that time today. Read more in the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/view_bug.do?bug_id=6468285&quot;&gt;RFE decriptions&lt;/a&gt;.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/keytool_enhancements</guid>
         <pubDate>Sun, 22 Feb 2009 20:59:12 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Extra!  Extra!  Read all about it!  OpenJDK Bugzilla Goes Live!</title>
         <link>https://blogs.oracle.com/wetmore/entry/extra_extra_read_all_about</link>
         <description>&lt;p&gt;News at 11...or whenever the moderator on &amp;quot;announce at openjdk dot java dot net&amp;quot; approves my message...or just go to:&lt;/p&gt; 
  &lt;blockquote&gt; 
    &lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/groups/web/bugzilla.html&quot; title=&quot;Link to OpenJDK Bugzilla project page.&quot;&gt;http://openjdk.java.net/groups/web/bugzilla.html&amp;nbsp;&lt;/a&gt;&lt;/p&gt; 
  &lt;/blockquote&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt;(Apologies to my younger or international readers if &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://wiki.answers.com/Q/What_is_the_origin_of_the_phrase_'Extra_Extra_Read_all_about_it'&quot; title=&quot;The Origin of the Extra&quot;&gt;the title of this entry didn't make any sense&lt;/a&gt;.)&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/extra_extra_read_all_about</guid>
         <pubDate>Fri, 06 Feb 2009 20:50:04 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Update on the OpenJDK Bugzilla instance.</title>
         <link>https://blogs.oracle.com/wetmore/entry/update_on_the_openjdk_bugzilla</link>
         <description>&lt;p&gt;I've recently been leading the effort to get our OpenJDK Bugzilla instance in place, and just wanted to let folks know that we're pretty close.&lt;/p&gt; 
  &lt;p&gt;I took some time over the last couple days to take a snapshot of what we have and what's planned for the near and somewhat longer future.&amp;nbsp; The short story is that we'll begin by tracking contributions from OpenJDK developers who do not have push rights to the JDK 6 and 7 forests.&amp;nbsp; The next phase will expand the system to track most if not all of the OpenJDK projects under development.&lt;/p&gt; 
  &lt;p&gt;The longer story is now available &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://openjdk.java.net/groups/web/bugzilla.html&quot; title=&quot;Link to the OpenJDK Bugzilla Project webpage&quot;&gt;on the OpenJDK website&lt;/a&gt;.&lt;/p&gt; 
  &lt;p&gt;One last point.&amp;nbsp; Until the general system is up, you should continue to &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/bugdatabase/index.jsp&quot; title=&quot;Link to the Webbugs page&quot;&gt;submit new bug reports through the normal channel&lt;/a&gt;.&lt;/p&gt; 
  &lt;p&gt;There's still a lot of work to be done and questions to be answered, but thought you might like to see the current status and what's being planned.&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/update_on_the_openjdk_bugzilla</guid>
         <pubDate>Sun, 01 Feb 2009 21:42:26 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Small Enhancements to HGrev</title>
         <link>https://blogs.oracle.com/wangwj/entry/small_enhancements_to_hgrev</link>
         <description>I've enhanced &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hgrev.appspot.com&quot;&gt;http://hgrev.appspot.com&lt;/a&gt; a little. Now the patch view has links to previous and new codes in raw form, so that you can download it directly to try on your own computer.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/small_enhancements_to_hgrev</guid>
         <pubDate>Wed, 21 Jan 2009 01:10:45 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Who Moved My krb5.ini?</title>
         <link>https://blogs.oracle.com/wangwj/entry/who_moved_my_krb5_ini</link>
         <description>Java Kerberos 5, on Windows, looks for a config file named krb5.ini in the Windows directory, and a Windows directory is defined as the return value of the Win32 API GetWindowsDirectory(), which should normally return something like C:&amp;#92;&amp;#92;Windows.
&lt;br&gt;&lt;br/&gt;
But, since Windows Server 2003, something has changed. The &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/aa383490(VS.85).aspx&quot;&gt;Terminal Services Programming Guidelines&lt;/a&gt; has &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://msdn.microsoft.com/en-us/library/aa383452(VS.85).aspx&quot;&gt;these words&lt;/a&gt;: &lt;em&gt;In a Terminal Services environment, the Windows directory is guaranteed to be private for each user.&lt;/em&gt;
&lt;br&gt;&lt;br&gt;
So this means if your (post Windows 2003) system has Terminal Services turned on, Java would look for krb5.ini inside %YOUR_HOME%&amp;#92;&amp;#92;Windows. This is bad, since we believe that the Kerberos 5 setting is a system-wide configuration, which should be setup once for all. To fix &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://bugs.sun.com/view_bug.do?bug_id=6793475&quot;&gt;this problem&lt;/a&gt;, we make &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/tl/jdk/rev/9260d9bd0843&quot;&gt;some changes&lt;/a&gt; in the OpenJDK codes. From now on, Java will look for krb5.ini in both GetWindowsDirectory() and GetSystemWindowsDirectory(),
&lt;br&gt;&lt;br&gt;
FAQ:
&lt;ol&gt;
&lt;li&gt;&lt;b&gt;Why is GetWindowsDirectory() still called? why is it even preferred to GetSystemWindowsDirectory()?&lt;/b&gt;&lt;br/&gt;
&lt;dt&gt;There are two reasons. First, compatibility matters. It is very possible that users out there have already noticed this issue and have put krb5.ini inside the user-private Windows directory instead of the system-wide one. For these users, JDK 7 should still work for them. Second, it's a common sense that user settings should override system settings. Therefore, user-private Windows is preferred to system-wide Windows.
&lt;li&gt;&lt;b&gt;I'm still using JDK 6 and I don't like this user-private Windows directory, what shall I do?&lt;/b&gt;&lt;br/&gt;
There are three solutions. First, you can provide the -Djava.security.krb5.conf =/path/to/my/krb5.ini option to your Java command line, or setup the environment variable _JAVA_OPTIONS to contain this value. Second, the most preferred Kerberos 5 config file is krb5.conf inside [JRE]/lib/security. Use this file is always safe (Note: it's krb5.&lt;b&gt;conf&lt;/b&gt;, not krb5.ini). Third, you can trick the Windows to still return C:&amp;#92;&amp;#92;Windows for GetWindowsDirectory(). To do this, add a registry key HKLM&amp;#92;&amp;#92;SOFTWARE&amp;#92;&amp;#92;Microsoft&amp;#92;&amp;#92;Windows NT&amp;#92;&amp;#92;CurrentVersion&amp;#92;&amp;#92;Terminal Server&amp;#92;&amp;#92;Compatibility&amp;#92;&amp;#92;Application&amp;#92;&amp;#92;JAVA, with a 32-bit DWORD value Flags=0x408. If you want to use Java's Kerberos command kinit, klist etc, provide keys with the name KINIT, KLIST etc.
&lt;/ol&gt;
P.S.: A minor Windows 2008 bug (or maybe not a bug, see below) makes this problem a little tougher. On Windows Server 2008, GetWindowsDirectory(NULL,0) returns the length of the system-wide directory, but not the user-private one. Thus our original trick of get-length-then-allocate-then-get-value fails, and JDK 6 cannot locate the correct user-private Windows directory. If you met this problem, you would have to choose one of the three workarounds above. MSDN never says the first parameter of this API can be NULL, although &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.google.com/search?q=%22getwindowsdirectory%28null%22&quot;&gt;quite a lot of people&lt;/a&gt; are using the same trick.
&lt;br&gt;&lt;br&gt;
The positive side is, we always print out the pathname of the krb5.ini file we're using in the debug output. Just add the -Dsun.security.krb5.debug =true option to your java command line to make sure it's using the krb5.ini of your intention.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/who_moved_my_krb5_ini</guid>
         <pubDate>Mon, 19 Jan 2009 02:59:47 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - NetBeans C++ is Cool</title>
         <link>https://blogs.oracle.com/wangwj/entry/netbeans_c_is_cool</link>
         <description>Although I use NetBeans a lot writing Java, I've never really tried its C/C++ Pack before. Today I need to read some MIT Kerberos codes. There's a long time I haven't worked heavily on C so I find it quite difficult to find out which function does what and where it's defined. And then, I think of NetBeans, it's very good at parsing Java codes and give you multiple ways to navigate through the method calls and field definitions. How about trying it for C?
&lt;br&gt;&lt;br&gt;
So I fire up NetBeans and go download the C/C++ pack. It's a huge 5MB module that takes care of projects, editing, debugging all in one place. Install and restart.
&lt;br&gt;&lt;br&gt;
I create a C/C++ project, there's a choice called &quot;Use existing codes&quot; so I choose the Kerberos src directory and click go. The magic happens: it loads all the files inside the directory, and then starts to call the configure script, and I see yes/no lines flying in the output window. Then, it starts to build the source! With no human intervention, it does everything from the beginning to the end, and I'm now seeing MAKE SUCCESSFUL.
&lt;br&gt;&lt;br&gt;
Brilliant, isn't it? I open a terminal window and run the newly-built kinit command with DYLD_LIBRARY_PATH pointing to the lib directory, and it runs smoothly and correctly, showing the kinit help page.
&lt;br&gt;&lt;br&gt;
Now I'm browsing the Kerberos codes, using the familiar Command+click to go through function calls and variable definitions. A real charm!</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/netbeans_c_is_cool</guid>
         <pubDate>Fri, 16 Jan 2009 01:04:08 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Picasa for Mac</title>
         <link>https://blogs.oracle.com/wangwj/entry/picasa_for_mac</link>
         <description>I'm happy to become a Picasa user again. For the last two years, I use Finder and Preview to take care of all my photos. It's a very difficult job － I leave quite some duplicates here and there, and I dare not edit photos except rotating them. I hate iPhoto, I don't want the files be moved to somewhere else, and I feel bad when I don't know what it's doing and how it stores things.
&lt;br&gt;&lt;br&gt;
Now I can do the so-called non-destructive edit again. Picasa for Mac still recognizes all previous edit made in Windows, the Picasa.ini file I mean. It would update the file if you make more edit. When there's no Picasa.ini, it happily creates a .picasa.ini file, which is the standard Unix style to name a hidden file.
&lt;br&gt;&lt;br&gt;
I believe Picasa for Windows will recognize .picasa.ini also.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/picasa_for_mac</guid>
         <pubDate>Thu, 08 Jan 2009 00:23:18 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - OpenSolaris on Bare Metal</title>
         <link>https://blogs.oracle.com/wangwj/entry/opensolaris_on_bare_metal</link>
         <description>Finally I decide to install OpenSolaris on the bare metal, and probably use it as a nightly build machine.
&lt;ol&gt;
&lt;li&gt;Create a USB installer using &lt;tt&gt;usbcopy&lt;/tt&gt;
&lt;li&gt;Boot from this USB disk and install
&lt;li&gt;Reboot, disable network/physical:nwam, enable multicast and network/physical:default, call sys-unconfig
&lt;li&gt;Reconfigure the machine
&lt;li&gt;Reboot again
&lt;/ol&gt;
I hadn't enabled/disabled the services first time when I run sys-unconfig, and the machine cannot reboot complaining avahi-bridge-dsd cannot start. Fortunately I can login to single user mode and do that again.
&lt;br&gt;&lt;br&gt;
I'm learning how to give more privileges to my NIS user account now.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/opensolaris_on_bare_metal</guid>
         <pubDate>Tue, 06 Jan 2009 21:50:45 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - You can teach a somewhat older dog new tricks-OpenSolaris 2008.11:  Wow!</title>
         <link>https://blogs.oracle.com/wetmore/entry/you_can_teach_a_somewhat</link>
         <description>&lt;p&gt;Way back in grad school (early 90's), I was called in to assist in the investigation of an internet porn exchange ring.&amp;nbsp; The ring was using some unsecured FTP servers belonging to our state's government.&amp;nbsp; Our team finished our initial assessment and called in the State Police to report our findings.&amp;nbsp; I will never forget that day as long as I live.&amp;nbsp; I said, &amp;quot;Yes, you've got a problem&amp;quot; and brought up one of the tamer images.&amp;nbsp; This career cop was two years away from retirement, and he just rolled his eyes and said &amp;quot;I'm too old for this, I don't get this new technology.&amp;quot;&lt;/p&gt; 
  &lt;p&gt;I'm nowhere near retirement age, tho if that .com bubble hadn't burst...hmmm...&amp;nbsp; But when I see something cool, it just invigorates me.&amp;nbsp; Although I've been on the bleeding edge of Java technology for almost 10 years now, I'm ashamed to admit I've lost my edge in Solaris.&amp;nbsp; I recently got called into a high-priority escalation involving some native code.&amp;nbsp; All my familiar tools still worked, but were limited in how quickly I could drill down into the problem.&amp;nbsp; To analyze this issue, I finally had the excuse to play with all the cool new tools now in Solaris.&amp;nbsp; prstat, libumem, mdb, dtrace, etc.&amp;nbsp; Wow, what a difference those years made.&amp;nbsp; And that's only scratching the surface.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;Even netbeans has come a long way since I last &amp;quot;attempted&amp;quot; to use it (4.X).&amp;nbsp; The debugger and editor are light years better, the profiler now works, and I am now actually using&amp;nbsp; it to debug my OpenJDK7 builds.&amp;nbsp; How much productivity have I gained via &amp;quot;Ctrl-space&amp;quot;?&amp;nbsp;&amp;nbsp; Look for another post on using Netbeans 6.5 to work in OpenJDK7 when I get some more time.&lt;/p&gt; 
  &lt;p&gt;Today, Tim Bell and I set up a sandbox area for the codereview and bug tracker databases for OpenJDK.&amp;nbsp; We needed the usual parts:&amp;nbsp; some hardware, an OS instance, a web server, a database.&amp;nbsp; As we subscribe to the &amp;quot;Eat our own dogfood&amp;quot; school of thought, the new &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.opensolaris.com&quot; title=&quot;Jump to the OpenSolaris website.&quot;&gt;OpenSolaris 2008.11&lt;/a&gt; immediately came to mind.&amp;nbsp; Wow.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;My day went something like this:&lt;/p&gt; 
  &lt;ul&gt; 
    &lt;li&gt;Lunch.&amp;nbsp; Check.&lt;/li&gt; 
    &lt;li&gt;Find x86 hardware.&amp;nbsp; Check&lt;/li&gt; 
    &lt;li&gt;Download OpenSolaris 2008.11, and burn to CD.&amp;nbsp; Boot.&amp;nbsp; Check.&lt;br /&gt;&lt;/li&gt; 
    &lt;li&gt;Wait, what's this GUI installer thingy?&amp;nbsp; Ok...a few simple questions later...wait for install to finish.&amp;nbsp; Check.&lt;/li&gt; 
    &lt;li&gt;Wait, it booted and the networking is already up and configured?&amp;nbsp; DHCP by default?&amp;nbsp; Cool!&amp;nbsp; Check.&lt;/li&gt; 
    &lt;li&gt;Wait, I just realized I didn't have to spend an hour trying to remember some arcane display commands.&amp;nbsp; And then spending another two actually tweaking the settings.&amp;nbsp; My display &lt;b&gt;just came up&lt;/b&gt;.&amp;nbsp; And the default workspace looks good.&lt;br /&gt;&lt;/li&gt; 
    &lt;li&gt;And now you're telling me I can just use the new IPS GUI to point and click to install a webserver, SQL instance, netbeans, and a bunch of other tools?&amp;nbsp; No downloading the source, building, cursing?&amp;nbsp; Cool!&lt;/li&gt; 
    &lt;li&gt;Elapsed time:&amp;nbsp; 3 hours.&lt;/li&gt; 
  &lt;/ul&gt; 
  &lt;p&gt;I'm sure I'll spend the next couple days/weeks tweaking things, but for simply getting something up quickly, Solaris has made huge inroads in the last few years, both in tools for techies and for providing a general work environment for the non-techie.&amp;nbsp; What a pleasure.&amp;nbsp; And all on x86.&amp;nbsp; I can distinctly recall several periods in Sun's history where
mentioning x86 and Solaris in the same breath were grounds for
dismissal.&lt;/p&gt; 
  &lt;p&gt;It's to the point where I can finally recommend Solaris to my parents.&lt;/p&gt; 
  &lt;p&gt;Except that my brother works at Microsoft, and gets a great discount.&lt;/p&gt; 
  &lt;p&gt;And they always did like him better.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt; 
  &lt;p&gt; &lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/you_can_teach_a_somewhat</guid>
         <pubDate>Thu, 18 Dec 2008 21:30:16 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - mechListMIC in SPNEGO</title>
         <link>https://blogs.oracle.com/wangwj/entry/mechlistmic_in_spnego</link>
         <description>I try hard to understand when should mechListMIC be generated in SPNEGO, but still find the specification (&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;ftp://ftp.rfc-editor.org/in-notes/rfc4178.txt&quot;&gt;RFC 4178&lt;/a&gt;) confusing. I'd like to interpret it this way:
&lt;ul&gt;
&lt;li&gt; If the chosen mech is the first one in the list, don't bother to create it
&lt;li&gt; Generate the MIC whenever you think you can do it, i.e. mech's isEstablished() is true
&lt;li&gt; Response to a MIC whenever you receive one
&lt;/ul&gt;
In case you believe the incoming token should have the MIC but it hasn't, if it's already marked COMPLETE, you go COMPLETE also. Otherwise, it may be expecting a MIC from you, either create the MIC and send back, or send back an empty COMPLETE.
&lt;br&gt;&lt;br&gt;
OK, I admit I don't understand it.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/mechlistmic_in_spnego</guid>
         <pubDate>Tue, 16 Dec 2008 19:37:36 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Consolidation of the JSN and TL gates.</title>
         <link>https://blogs.oracle.com/wetmore/entry/consolidation_of_the_jsn_and</link>
         <description>&lt;p&gt;For the last 4 years, I've been the &amp;quot;&lt;a rel=&quot;nofollow&quot; title=&quot;What's a Gatekeeper?&quot;&gt;Gatekeeper&lt;/a&gt;&amp;quot; for the Java Security and Network (JSN) team.&amp;nbsp; Gatekeepers are those under-appreciated but highly necessary folks who make sure that new changes work, and play nicely with what's already there.&amp;nbsp; We're only as good as our test cases, but not all developers are as diligent about running everything that's available.&lt;br /&gt; &lt;/p&gt; 
  &lt;p&gt;A month ago, I was asked to take on a project to support the OpenJDK project.&amp;nbsp; In order to free up time, we decided to decommission the JSN gate, and transition the JSN developers to the Tools and Libraries (TL) gate run by Tim Bell.&amp;nbsp; My last push from/to the JSN gate was October 20th, and the first push of the merged TL gate was done last week November 7th.&amp;nbsp; The JSN gate still exists in its normal place, but is fast becoming out-of-date.&amp;nbsp; We will eventually remove it completely from the project.&lt;/p&gt; 
  &lt;p&gt;Giving up this role has been bittersweet.&amp;nbsp; I had spent a lot of time automating the process, and those scripts now sit mostly unused.&amp;nbsp; But I've been gatekeeper for JDK 1.3.1 and in my previous life working on Trusted Solaris 2.5 with Sun's Federal Systems Division.&amp;nbsp; I wouldn't be surprised if I find myself in this role again, but for now, I'm definitely looking forward to doing something different for a while.&lt;/p&gt; 
  &lt;p&gt;For anyone thinking of breaking the TL gate, Tim now has &lt;a rel=&quot;nofollow&quot; title=&quot;Picture of the Noose.&quot;&gt;the noose&lt;/a&gt;, and isn't afraid to assign it.&lt;/p&gt; 
  &lt;p&gt;P.S.&amp;nbsp; For the &amp;quot;GhostBusters&amp;quot; fans out there, even though I'm no longer &amp;quot;Gatekeeper,&amp;quot; I still have my other job as backup &amp;quot;Keymaster&amp;quot;.&amp;nbsp; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://java.sun.com/javase/6/docs/technotes/guides/security/crypto/HowToImplAProvider.html#Step6&quot;&gt;Requests for JCE Code Signing Certificates&lt;/a&gt; still come to me.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/consolidation_of_the_jsn_and</guid>
         <pubDate>Wed, 12 Nov 2008 15:54:40 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - Mark Bristow, Today's Gold Medalist</title>
         <link>https://blogs.oracle.com/wangwj/entry/mark_bristow</link>
         <description>&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://news.bbc.co.uk/sport2/hi/other_sports/disability_sport/7605555.stm&quot;&gt;&lt;img src=&quot;https://blogs.oracle.com/wangwj/resource/bristow.PNG&quot;&gt;&lt;/a&gt;
&lt;br&gt;
&lt;hr&gt;
&lt;br&gt;
Silicon Valley? That's Sun Microsystems.
&lt;br&gt;&lt;br&gt;
Congratulations!</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/mark_bristow</guid>
         <pubDate>Tue, 09 Sep 2008 02:08:15 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - LiveCD of OpenSolaris in VMWare</title>
         <link>https://blogs.oracle.com/wangwj/entry/livecd_of_opensolaris_in_vmware</link>
         <description>Normally I don't like running an OS as a LiveCD on a bare metal machine because accessing CD-ROM is too slow and makes very big noises. However as a VMWare guest, since the CD-ROM is in fact an ISO file on the hard disk, I guess the speed should be quite fast, I'm quite happy to only run it on the LiveCD.
&lt;br&gt;&lt;br&gt;
So I creates a new Virtual machine with two CD-ROM drives, put the LiveCD in the 1st one and the VMTools into the 2nd. When the system CD boots up, I will be able to install VMTools from the 2nd CD.
&lt;br&gt;&lt;br&gt;
This works quite fine for Ubuntu and the VMTools is installed correctly. But for OpenSolaris 2008.05, it cannot be installed, because the file system that contains /usr is not writable.
&lt;br&gt;&lt;br&gt;
I guess in Ubuntu the /usr volume is implemented as a cascaded/hybrid file system, most of the files are from the CD, but you can still add/remove/modify files into the memory that shadows the ones on the CD, and this combined file system looks like a single unified one. OpenSolaris should works the same way, I guess it's only that the designers didn't realize that /usr needs to be modified, so they never make this volume cascaded/hybrid.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/livecd_of_opensolaris_in_vmware</guid>
         <pubDate>Mon, 25 Aug 2008 20:51:22 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - F9 (Compile) for NetBeans Missing</title>
         <link>https://blogs.oracle.com/wangwj/entry/f9_compile_for_netbeans_missing</link>
         <description>Just downloaded the latest DEV version of NetBeans, haven't done it for several weeks.
&lt;br/&gt;&lt;br/&gt;
One thing that confuses me is that F9 seems does not work for individual files in a Java project anymore. Pressing F9 has no impact, the edited Java file still shows an asterisk sign in the editor pane header, still dirty, not even saved. Looking at the right mouse menu of the file, and the compile item is grayed not completely.
&lt;br/&gt;&lt;br/&gt;
Strange, isn't it? Then I suddenly realized this might be because of the newly introduced compile-on-save feature. I try to add some runtime error into my Java file and save it. Run, failed! So my guess is correct.
&lt;br/&gt;&lt;br/&gt;
Anyway, I'm still a little uneasy with this feature. When I save the file, if there's any compile-time error, how can I know the compilation failed? I may not have noticed the red lines or the red exclamation mark on the file node. And worse, the output pane does not popped up showing the compilation error info. (Yes, I normally hide it. Off topic, people invent more and more wide screens, why not higher?)
&lt;br/&gt;&lt;br/&gt;
There should be a more friendly way here, right?</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/f9_compile_for_netbeans_missing</guid>
         <pubDate>Sun, 03 Aug 2008 21:28:30 +0000</pubDate>
      </item>
      <item>
         <title>by Weijun   - my webrev experiment: public, interactive and easy</title>
         <link>https://blogs.oracle.com/wangwj/entry/my_webrev_experiment_public_interactive</link>
         <description>Inside Sun, we use &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.sun.com/jcc/date/20080303&quot;&gt;webrev&lt;/a&gt; to do code reviews, you can see an example &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://cr.opensolaris.org/~rralphs/review/&quot;&gt;here&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;
Well, there're several reasons I don't like webrev very much:
&lt;ul&gt;
&lt;li&gt;It's a pile of static files, you must first create them, and upload them to a public website (possibly one by one).
&lt;li&gt;It used to be a nice archive of what you've done, but now in Mercurial we already have changesets.
&lt;li&gt;It includes no interactive review process 
&lt;/ul&gt;
OK, only the first reason is real. I just cannot resist the temptation to create a list.
&lt;br&gt;&lt;br&gt;
Recently I've done some experiments on creating a new review style which is meant to be:
&lt;ul&gt;
&lt;li&gt;Public, the patch can be created and reviewed by anyone
&lt;li&gt;Easy, creation and viewing are both very easy
&lt;li&gt;Richer interaction, request and review can be done interactively along with the patch
&lt;/ul&gt;
I'm using the Google App Engine for a prototype called &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hgrev.appspot.com/&quot;&gt;hgrev&lt;/a&gt;. The current implementation is already public and easy. By using the Google Accounts system, I believe the richer interaction should be fairly easy to add. Now it runs in a create-only mode, which means after you create a hgrev request, it cannot be modified anymore. This is not a bad idea before the accounts system is used.
&lt;br&gt;&lt;br&gt;
To create a hgrev, you need to provide three info:
&lt;ol&gt;
&lt;li&gt;A title, possibly a synopsis of a bug item
&lt;li&gt;The base URL, a public accessible URL that your patch is based on. If you're working on 2 patches at the same time on a single file, sorry. Maybe one day the base URL can be also another hgrev request.
&lt;li&gt;The patch itself, which is the raw output of &quot;hg diff&quot;. Or if you use Mercurial Queue, the raw content of the patch file.
&lt;/ol&gt;
After you enter these information, a new hgrev request is created, you can send the URL of the request to anyone you ask for a code review. The reviewer can read the patch itself, or read a side-by-side comparison of each file before/after the patch. Since you've already provided the base URL, the reviewer can go back to the Mercurial code repository to read related codes etc.
&lt;br&gt;&lt;br&gt;
Take a try at &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hgrev.appspot.com/&quot;&gt;http://hgrev.appspot.com/&lt;/a&gt;, I've already included several examples there.
&lt;br&gt;&lt;br&gt;
By the way, if the webpage does not work with IE or any other web browser, that's my fault.</description>
         <author>Weijun</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wangwj/entry/my_webrev_experiment_public_interactive</guid>
         <pubDate>Wed, 11 Jun 2008 21:27:10 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - He Is He, Don Quixote:  The Lord of La Mancha!</title>
         <link>https://blogs.oracle.com/wetmore/entry/he_is_he_don_quixote</link>
         <description>&lt;p&gt;Folks have been asking what I'm up to outside of work.&amp;nbsp; Way too many things for one blog entry, so I'll focus on the most recent.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;As you may know, one of the things I'm quite passionate about is music and performance. I'd started with church choirs, but I'd say I got really passionate about music in 5th grade, when I had to choose an instrument for the school band.&amp;nbsp; I can't believe how practical I was back then:&amp;nbsp; I asked myself what instrument(s) will allow me to do the most types of music.&amp;nbsp; (pretty impressive for a 5th grader, no?)&amp;nbsp; The answer was obvious:&amp;nbsp; Percussion.&amp;nbsp; Rock, soul, jazz, classical, latin, marching, tribal, etc., etc., etc.&lt;br /&gt; &lt;/p&gt; 
  &lt;p&gt;Here it is, &lt;b&gt;&amp;#92;*mumble-something&amp;#92;*&lt;/b&gt; years later, and I'm still at it.&amp;nbsp; Played on 6 continents so far.&amp;nbsp; (Note: If any researchers/penguins in Antarctica are reading, I'll be happy to come bang out a tune.)&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;20&quot; align=&quot;right&quot; alt=&quot;Brad in the pit surrounded by instruments.&quot;/&gt;My latest gig is playing in the pit (orchestra) for the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.saratogadramagroup.com/&quot; title=&quot;Saratoga Drama Group website&quot;&gt;Saratoga Drama Group&lt;/a&gt;'s production of &amp;quot;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.saratogadramagroup.com/shows/man_of_lamancha.html&quot;&gt;Man of La Mancha&lt;/a&gt;&amp;quot;.&amp;nbsp; The music actually calls for three percussionists, but we're covering with two.&amp;nbsp; A good friend of mine who is also a percussionists likes to say that &amp;quot;We're busier back there than a one-armed wallpaper hanger.&amp;quot;&amp;nbsp; Snare, tom toms, and bass drums, cymbals, castanets, wood blocks, timpani, orchestra bells, finger cymbals, tambourine:&amp;nbsp; The only reason we don't have a xylophone back there is that we're out of room!&lt;/p&gt; 
  &lt;p&gt;(By the way, is there an English spelling book that doesn't use &amp;quot;Xylophone&amp;quot; for the letter &amp;quot;X&amp;quot;?)&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;Oh yeah, I almost forgot why I chose the title for this blog.&amp;nbsp; Everyone is raving about how tall our Don Quioxote (&lt;a rel=&quot;nofollow&quot; title=&quot;Walter The Giant's website&quot; target=&quot;_blank&quot; href=&quot;http://www.walterthegiant.com/&quot;&gt;Walter Mayes&lt;/a&gt;) is.&amp;nbsp; He's 6' 7-1/2&amp;quot; (201 cms) tall.&amp;nbsp; Yet, I don't hear anyone emoting about how tall one of the percussionists is.&amp;nbsp; ;)&amp;nbsp; Ah, jealousy is a fickle beast.&amp;nbsp; But at least 6' (183 cms) Michael Johnson finally got to play one of his favorite roles, Sancho Panza.&amp;nbsp; It wouldn't be right to have Sancho taller than Don Quioxote.&lt;/p&gt; 
  &lt;p&gt;I've been really impressed by the overall quality of this show.&amp;nbsp; As the orchestra is onstage in the wings, I haven't seen the full show.&amp;nbsp; But from where I sit, the cast seems really strong, the orchestra solid, the lighting and sound great, and the reviews have been comparing us to professional productions.&amp;nbsp; Even my wife, whose honest opinion I respect, said it's probably one of the best SDG shows she's seen over the years.&amp;nbsp; Community theater can sometimes be hit or miss, this was a definite hit.&lt;br /&gt;&lt;/p&gt; 
  &lt;p&gt;This next weekend is the last weekend of the run, so if you feel like a seeing a great show, please come on down.&amp;nbsp; There are a few tickets available still.&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/he_is_he_don_quixote</guid>
         <pubDate>Tue, 03 Jun 2008 16:02:35 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - I Have Met &quot;The Man,&quot; and The Tail Will Not Be Pretty.</title>
         <link>https://blogs.oracle.com/wetmore/entry/i_have_met_the_man</link>
         <description>&lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;1&quot; align=&quot;right&quot; alt=&quot;Meet &amp;quot;The Man&amp;quot;&quot; src=&quot;http://blogs.sun.com/wetmore/resource/images/Dixie0.JPG&quot;/&gt;&lt;/p&gt;
  &lt;p&gt;&amp;nbsp;I love &amp;quot;dives.&amp;quot;&amp;nbsp; You know those places that you look at from the outside, and say...&amp;quot;hmm...&amp;quot;&amp;nbsp; But with lines out the door, you know they must be doing &lt;i&gt;something&lt;/i&gt; right.&amp;nbsp; Once you get inside, you know there's something special going on in the kitchen.&amp;nbsp; My wife has always accused me of taking her to only the &amp;quot;finest&amp;quot; establishments, but this one almost killed her.&lt;/p&gt;
  &lt;p&gt;A little backstory:&amp;nbsp;&amp;nbsp;As my little brother was graduating from college, he was seduced by the Dark Side and moved to Redmond Washington to work for the large unnamed software company based there.&amp;nbsp; &lt;b&gt;coughcough&amp;#92;*&lt;/b&gt;bluescreenofdeath&lt;b&gt;&amp;#92;*coughcough&lt;/b&gt;&amp;nbsp; It made for interesting family dinner conversations, as dad was always trying to get&amp;nbsp;his boys&amp;nbsp;to talk smack about each other's company.&amp;nbsp; Sorry, Dad, I'm not Scott McNealy!&lt;/p&gt;
  &lt;p&gt;Apparently all visitors to the Microsoft campus have to make the pilgrimage to Dixie's BBQ in Bellevue.&amp;nbsp; The walls are adorned with about a dozen maps each with hundreds of colorful pins, each signifying where a previous customer was born.&amp;nbsp; The place is infamous for its colorful characters, pretty good BBQ, and &amp;quot;The Man.&amp;quot;&lt;br /&gt;&lt;/p&gt;
  &lt;p&gt;So how does one&amp;nbsp;describe &amp;quot;The Man?&amp;quot;&amp;nbsp; Imagine one of the lowest &lt;a rel=&quot;nofollow&quot; title=&quot;Dante's Divine Comedy&quot; target=&quot;_blank&quot; href=&quot;http://en.wikipedia.org/wiki/The_Divine_Comedy&quot;&gt; fiery Circles of Hell&lt;/a&gt;, say those&amp;nbsp;reserved for corrupt politicians, people who commit simony, or OpenJDK developers who break the build.&amp;nbsp; Now imagine&amp;nbsp;these people&amp;nbsp;are served a&amp;nbsp;nice BBQ lunch.&amp;nbsp;&amp;nbsp;As this is Hell, the BBQ sauce is punishingly spicy, somewhere just between &amp;quot;Dave's Insanity Sauce&amp;quot; and &amp;quot;Lord, if you would just remove this molten lava from my mouth, I won't ever _______ again!!!&amp;quot;&amp;nbsp; Now, place a couple of gallons of &lt;b&gt;that&lt;/b&gt; BBQ sauce in a large cauldron, and allow it to simmer/reduce for several years, to the volume of a small quart pot.&amp;nbsp; Now give this pot to a Bellevue&amp;nbsp;Washington restaurateur named Gene Porter, and have him walk around&amp;nbsp;his restaurant asking if you've met &amp;quot;The Man.&amp;quot;&amp;nbsp; &lt;/p&gt;
  &lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;1&quot; align=&quot;right&quot; alt=&quot;Deb met &amp;quot;The Man&amp;quot;&quot; src=&quot;http://blogs.sun.com/wetmore/resource/images/Dixie1.JPG&quot;/&gt;Fortunately, for most people, Gene is nice, and only dips the tip of a toothpick into&amp;nbsp;his concoction, or if you're unlucky, the tip of a spoon.&amp;nbsp;&amp;nbsp;Whatever you do, don't say&amp;nbsp;something stupid like say&amp;nbsp;&amp;quot;I love hot sauce!&amp;quot;&amp;nbsp; For those &lt;strike&gt;idiots&lt;/strike&gt;people, Gene scrapes the bottom of the pot.&amp;nbsp; Trust me, you don't want to be anywhere near when that happens.&lt;/p&gt;
  &lt;p&gt;For years my brother&amp;nbsp;had warned&amp;nbsp;us about &amp;quot;The Man&amp;quot;.&amp;nbsp; I've even had some&amp;nbsp;at family picnics.&amp;nbsp; But until last weekend, I'd never had it straight from the pot.&amp;nbsp;&amp;nbsp;Whoa Nelly!&amp;nbsp; &amp;nbsp;Fortunately, I was in control of the camera, and got to capture my wife's reaction.&amp;nbsp; She's not normally that pink!&amp;nbsp; It took 15 minutes and a lot of peanuts, but was finally able to speak again.&amp;nbsp; She gave us a very memorable quote:&amp;nbsp; &amp;quot;That would make a great diet aid!&amp;quot;&amp;nbsp; I wasn't sure if she meant on the way in, or out.&lt;br /&gt; &lt;/p&gt;
  &lt;p&gt;A few other reviews of &amp;quot;Dixie's&amp;quot;:&amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://seattlepi.nwsource.com/business/131302_momentwith18.html&quot;&gt;http://seattlepi.nwsource.com/business/131302_momentwith18.html&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://www.seattledining.com/ARCHIVE/restaurants/dixies.htm&quot;&gt;http://www.seattledining.com/ARCHIVE/restaurants/dixies.htm&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/i_have_met_the_man</guid>
         <pubDate>Wed, 05 Mar 2008 14:53:40 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Leave me alone, I'm on vacation!</title>
         <link>https://blogs.oracle.com/wetmore/entry/leave_me_alone_i_m</link>
         <description>I've got no qualms about giving my all when I'm working.&amp;nbsp; I've done the long days, the long nights, the long weekends.&amp;nbsp; But when I officially pull the plug and go on vacation, I expect to be able to leave Sun behind, and enjoy some well-deserved time off without any reminders of what I do the rest of the year.&amp;nbsp; &lt;br /&gt;&lt;p&gt; I don't think that's too much to ask.&amp;nbsp; But have you ever tried to unplug yourself completely when you work for a &amp;quot;network&amp;quot; company like Sun?&amp;nbsp; &lt;/p&gt;&lt;p&gt;I first noticed it on a trip to Nepal.&amp;nbsp; I had just finished a rather stressful project, and was glad to be getting away.&amp;nbsp; But as I'm walking between planes in Bangkok, there's a 20 foot ad image of then-CEO Scott McNealy, smiling with his big toothy grin from his perch on the wall, reminding me that &amp;quot;Sun in the . (dot) in dot com.&amp;quot;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Trip to Brazil.&amp;nbsp; Sun's being profiled in the in-flight magazine.&amp;nbsp; Trip to Spain/Portugal:&amp;nbsp; Sun's being advertised on a whole wall of posters in a small city.&amp;nbsp; Ok, gloves are off.&amp;nbsp; Hawaii?&amp;nbsp; Nope, there's a high-tech design exhibit in SFO United Terminal featuring all kind of high-tech product designs.&amp;nbsp; I was halfway through before I saw the case that featured a Sun Ray.&amp;nbsp; Dagnabit!!!&amp;nbsp;&lt;/p&gt;&lt;p&gt;Out of all the buildings in Sydney, Australia, our route took us right by the Sydney sales office.&amp;nbsp; Cameroon?&amp;nbsp; I thought for sure, I stood a fighting chance.&amp;nbsp; Nope.&amp;nbsp; I forget what I saw in the Cook Islands, but was not amused.&lt;br /&gt; &lt;/p&gt;&lt;p&gt;I guess it's good to work for a company with a global presence.&amp;nbsp; But just for a couple days a year, can't you just leave me alone&lt;sup&gt;1&lt;/sup&gt;?&lt;/p&gt;&lt;p&gt;On the other hand, I'm glad I don't work for another unnamed large software company.&amp;nbsp; I don't know how many times I've walked by an airport flight status board only to see an infamous &amp;quot;Blue Screen of Death.&amp;quot;&amp;nbsp; It does give me a chuckle.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;hr width=&quot;100%&quot; size=&quot;2&quot;/&gt; &lt;p&gt;1.&amp;nbsp; Maybe now I'm looking for Sun references just to keep the streak alive.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/leave_me_alone_i_m</guid>
         <pubDate>Thu, 14 Feb 2008 17:02:14 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - &quot;You're a...Gatekeeper?  Uh huh.  What's a Gatekeeper?&quot;</title>
         <link>https://blogs.oracle.com/wetmore/entry/you_re_a_gatekeeper_uh</link>
         <description>&lt;div&gt;&lt;p&gt;(You might want to read &lt;a rel=&quot;nofollow&quot; title=&quot;OpenJDK Mercurial Wheel blog entry&quot;&gt;Kelly O'Hair's &amp;quot;OpenJDK Mercurial Wheel&amp;quot;&lt;/a&gt; blog entry before reading this.) &lt;/p&gt;&lt;/div&gt;&lt;p&gt;Besides my normal job as a developer in the Java Security and Networking (JSN) and&amp;nbsp; the Java Tools/Libraries (TL) groups, I have been tasked from time to time as the &amp;quot;Gatekeeper&amp;quot; (also known as an &amp;quot;Integrator&amp;quot;) for the JSN group.&amp;nbsp; Some of you have asked on the IRC channel &lt;a rel=&quot;nofollow&quot;&gt;#openjdk&lt;/a&gt;, &amp;quot;What's a Gatekeeper?&amp;quot;&amp;nbsp; Good question.&amp;nbsp; Ask any of the N gatekeepers, and you'll get N different answers.&lt;/p&gt;&lt;div&gt;&lt;p&gt;Since I'm a musician by night, I had to distill it down to a song that's been running through my head this morning &lt;i&gt;(with apologies to Donny and Marie Osmond, as I'm an unfortunate product of the 1970's)&lt;/i&gt;:&lt;/p&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;p&gt;I'm a little bit Developer,&lt;br /&gt;And I'm a little bit Release Engineer.&lt;br /&gt;I've got a little bit of SHA-1 and Blowfish,&lt;br /&gt;With a whole lot of Makefiles in my soul.&lt;br /&gt;Don't know if it's good or bad,&lt;br /&gt;but I know I love it so...&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Ok, scratch those last two lines.&amp;nbsp; Gatekeeper is an under-recognized, thankless, but absolutely necessary (IMHO) job.&lt;/p&gt;&lt;p&gt;A quick bit of terminology:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;p&gt;MASTER repository:&amp;nbsp; The master workspace from which products are eventually built.&amp;nbsp; All changes eventually filter into this set of repositories.&amp;nbsp; Also known as &amp;quot;The Golden Source&amp;quot;, &amp;quot;Top Level Workspace&amp;quot;, or more concretely:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://hg.openjdk.java.net/jdk7/jdk7&quot;&gt;http://hg.openjdk.java.net/jdk7/jdk7&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Group repository:&amp;nbsp; The repository that individual developers clone and where they eventually submit their work for inclusion in the MASTER repository.&amp;nbsp; Developers generally work in the group repository assigned to their functional group.&amp;nbsp; (e.g. JSN, TL, 2D, etc).&amp;nbsp; In my case:&lt;/p&gt;&lt;/li&gt;&lt;blockquote&gt;&lt;p&gt;&lt;a rel=&quot;nofollow&quot;&gt;http://hg.openjdk.java.net/jdk7/jsn&lt;/a&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;li&gt;&lt;p&gt;Repository Updates:&amp;nbsp; The process by which changes are merged and placed into a shared repository.&amp;nbsp; This is performed by a developer in the case of Dev/Group repositories, or by a special person called a Gatekeeper(below) who merges the Group/MASTER repositories.&amp;nbsp; There are two types of updates:&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;&lt;blockquote&gt;&lt;ul&gt;&lt;li&gt;Rebase:&amp;nbsp; The process of bringing down code from higher-level repositories to local repositories (e.g. MASTER to JSN, or JSN to DEV).&amp;nbsp; Rebasing is done fairly frequently (I try to do it daily).&lt;/li&gt;&lt;li&gt;Integration:&amp;nbsp; The process of pushing up changes from a repository to a higher-level repository (e.g.
DEV to JSN, or JSN to MASTER).&amp;nbsp; The gatekeeper is sometimes also known as an&lt;i&gt; &amp;quot;Integrator&amp;quot;&lt;/i&gt; as they will be &amp;quot;integrating&amp;quot; changes into the MASTER.&amp;nbsp;  Gatekeeper integrations are generally done every two weeks
or as needed.&lt;/li&gt;&lt;/ul&gt;&lt;/blockquote&gt;&lt;p&gt;So, what is a Gatekeeper?&amp;nbsp; At a high level, we're the technical liaisons between specific development groups and Release Engineering (RE).&amp;nbsp; It's our job to take changes from developers via the group repositories, merge them with the MASTER repositories, then build/test those changes.&amp;nbsp; If all looks good, move the changes into the appropriate repositories.&amp;nbsp;&amp;nbsp; If all doesn't look good, I put on my archaeologist hat, go figure out what broke, and why.&amp;nbsp; Hearing from your gatekeeper &lt;b&gt;is not&lt;/b&gt; the way to start your day.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;img vspace=&quot;0&quot; hspace=&quot;0&quot; border=&quot;0&quot; align=&quot;middle&quot; src=&quot;http://blogs.sun.com/wetmore/resource/images/gates.gif&quot; alt=&quot;Image of Gate layout&quot;/&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Why have a gatekeeper?&amp;nbsp; Why not just integrate directly into the MASTER?&amp;nbsp; A couple of reasons:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Less breakage:&amp;nbsp; Assume for a second that developers could integrate their code directly to the MASTER repositories.&amp;nbsp; If new code breaks the build, &lt;b&gt;EVERYONE&lt;/b&gt; is affected, not just a smaller subgroup.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Let changes bake with your technical peers before releasing to the world.&amp;nbsp; Each gatekeeper is responsible for a specific functional area.&amp;nbsp; (S)he can run tests specifics to that area, and find problems before they ever reach the MASTER.&amp;nbsp; As brilliant as our RE organization is, they are not going to want to investigate why obj.toString() is now throwing a NoSuchMethodError.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Quiescent Source Base during Integrations:&amp;nbsp; Changsets need to fit well with previous changesets.&amp;nbsp; In a project this large, the build/test cycle can take several hours.&amp;nbsp; Thus, the source base needs to be unchanging during this period so Gatekeepers can build/test/integration with the current bits.&amp;nbsp; If First-Come-First-Served integrations were allowed, your careful build/test cycle could be invalidated by someone changing a single line somewhere.&amp;nbsp; You could hope/pray that your changes are compatible, but that's far too risky. Thus Gatekeepers are assigned specific time slots (currently 12 hours), and are guaranteed only they have write-access to the MASTER repositories during that time. This hierarchy model has proved the most expedient for the large numbers of changes that happen in this project.&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;So what do I actually do?&amp;nbsp; Again, each gatekeeper will give different answers, but basically, here's what the job involves:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;p&gt;Provide a stable gate for my developers (also affectionately known as &amp;quot;gatelings&amp;quot;).&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Merge and build the repositories nightly on as many platforms as possible (solaris-sparc/solaris-sparcv9, solaris-i586/solaris-amd64, linux-i586/linux-amd64, and windows-i586).&amp;nbsp; My builds include most repositories (jdk, deploy, langtools, jax&amp;#92;*, etc.).&amp;nbsp; I generally don't build docs/install/etc.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Most gatelings generally only need build the 1-2 repositories they are directly modifying, but sometimes their changes will incompatibly affect other workspaces.&amp;nbsp; Gatekeepers are the last line of defense before that code hits the MASTER, so I need to assure myself that your changes won't break the rest of the product.&amp;nbsp; Developers &lt;i&gt;&lt;b&gt;should &lt;/b&gt;&lt;/i&gt;be doing this themselves, but it's a sad fact that not everyone is as responsible when it comes to build/testing their code.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Test nightly.&amp;nbsp; Depending on the functional group, there are several test suites available.&amp;nbsp; In my case, I have the developer unit/regression tests (in the test subdirectory of each repository), the JCK, and the internal Sun Software Quality Engineering&amp;nbsp; (SQE) tests.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;About a week before an integration, provide builds to the SQE teams.&amp;nbsp; They have a procedure called &amp;quot;Pre-Integration Testing&amp;quot; (aka PIT), which is a much more involved testing process than the gatekeepers could run nightly..&amp;nbsp; Gatekeepers normally build/test on specific reference OS (e.g. Microsoft Windows Server 2000), but the SQE teams will test on many of the other available platforms (e.g. Windows XP, Windows Vista, etc.).&amp;nbsp; If all goes well, they will issue a test report called a &amp;quot;PIT Certificate,&amp;quot; which is their blessing that the expected changes don't appear to break anything.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Copy changesets from one set of repositories to the other.&amp;nbsp; (Rebase/Integration) &lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Update bug status to reflect the changesets just put into the MASTER.&lt;/p&gt;&lt;/li&gt;&lt;li&gt;&lt;p&gt;Breathe a sigh of relief, I'm done!&amp;nbsp; (For this week anyways...). &amp;nbsp; Oh, and... &lt;/p&gt;&lt;p&gt;Pray integrator with the next slot does not call you at home in 6 hours, especially if you have the afternoon/evening integration.&lt;br /&gt;&lt;/p&gt;&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;In theory, the MASTER should never be broken, we work pretty hard to make sure that doesn't happen, and it's pretty rare.&amp;nbsp; The group repositories...well, let's just say it does happen on occasion.&amp;nbsp; Don't make me come find you because your integration broke the build, neither of us will have a good day.&amp;nbsp; ;)&lt;/p&gt;&lt;p&gt;That's pretty much it.&amp;nbsp; Gatekeeper officially takes about 50% of time.&amp;nbsp; &lt;i&gt;(I always crack myself up when I say that!)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;Only true gearheads/propellerheads need continue.&lt;br /&gt;&lt;/p&gt;&lt;hr width=&quot;100%&quot; size=&quot;2&quot;/&gt;&lt;p&gt;What's that you say, you want even more specifics?&amp;nbsp; (curious little bugger, aren't you!&amp;nbsp; ;) )&lt;/p&gt;&lt;p&gt;Why have yet another set of repositories for the build/test/integrate phase?&amp;nbsp; Simple, the process can be done in a disposable area (the
blue 'JSN Gatekeeper' box above).&amp;nbsp; In case of problems like a bad merge or other breakage, we can simply blow away these repositories and start over.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Ok...how about some pseudo code to make this a little more concrete?&amp;nbsp; Understand I'm doing a lot of handwaving here, otherwise I'll be here all night simplifying the scripts I currently use.&amp;nbsp; (Each gatekeeper usually has their own set of scripts, because each gates tends to have different requirements.)&lt;br /&gt;&lt;br /&gt;If I'm doing an integration build to the MASTER, wait until the gate has been released by the previous gatekeeper.&amp;nbsp; Pray the previous gatekeeper didn't introduce any problems.&lt;br /&gt;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;% hg fclone JSN ws&lt;br /&gt;% hg pull MASTER ws&lt;br /&gt;% cd ws&lt;br /&gt;% hg fmerge/fupdate&lt;br /&gt;% hg foutgoing JSN&lt;br /&gt;% hg foutgoing MASTER&lt;br /&gt;% webrev JSN MASTER&lt;br /&gt;&lt;br /&gt;% gnumake long_list_of_options all&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # on all platforms&lt;br /&gt;% cd jdk/test; jtreg -testjdk:path_to_built_jdk long_list_of_testdirs&amp;nbsp; # on all plaforms&lt;br /&gt;% cd JCK6a; javatest -cp:path_to_JCK long_list_of_tests&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # on all platforms&lt;br /&gt;% kickOffInternalSQETests.sh                                           # on all platforms&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;I generally build both the product and OpenJDK variants.&amp;nbsp; At this point, examine all the build logs.&amp;nbsp; Everything needs to be clean.&amp;nbsp; If not, find out why.&lt;/p&gt;&lt;p&gt;If we're creating PIT builds, send these bits to the SQE teams for testing.&amp;nbsp; Wait for your PIT Certificate, then repeat the steps above when ready to integrate.&lt;/p&gt;&lt;p&gt;If I'm rebasing (roughly nightly): &amp;nbsp;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;% hg foutgoing JSN               # Make sure you're putting the expected bits back.&lt;br /&gt;% hg fpush JSN&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;If everything looks good and it's integration day:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;% hg foutgoing MASTER            # Make sure you're putting the expected bits back.&lt;br /&gt;% hg fpush MASTER&lt;br /&gt;% mail -s &amp;quot;JSN Integration complete&amp;quot; &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;mailto:jdk-gk@openjdk.java.net&quot;&gt;jdk-gk@openjdk.java.net&lt;/a&gt;&lt;br /&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;There are several variations on the theme, but those are the main steps.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;I hope that gives you a little more background about what it is we do.&amp;nbsp; There's a lot of gatekeeper lore I could regale you with, such as the &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://blogs.sun.com/wetmore/resource/images/PowerNoose.JPG&quot;&gt;noose made out of a power cable&lt;/a&gt; reserved for folks guilty of committing really heinous acts of carelessness, but I'll save that for another post.&lt;br /&gt;&lt;/p&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/you_re_a_gatekeeper_uh</guid>
         <pubDate>Mon, 11 Feb 2008 15:12:41 +0000</pubDate>
      </item>
      <item>
         <title>by Brad Wetmore   - Nice Overview for Getting Started with OpenJDK</title>
         <link>https://blogs.oracle.com/wetmore/entry/nice_overview_for_getting_started</link>
         <description>Lars Westergren posted an article in his blog about &lt;a rel=&quot;nofollow&quot; target=&quot;_blank&quot; href=&quot;http://larswestergren.blogspot.com/2007/12/beginners-guide-to-openjdk-contributing.html&quot;&gt;what the OpenJDK project is and how it works&lt;/a&gt;.&amp;nbsp; I found it to be a great overview, as he did a nice job on culling information from various sources and presenting it in a very coherent manner.&lt;br /&gt;</description>
         <author>Brad Wetmore</author>
         <guid isPermaLink="false">https://blogs.oracle.com/wetmore/entry/nice_overview_for_getting_started</guid>
         <pubDate>Mon, 11 Feb 2008 15:08:35 +0000</pubDate>
      </item>
   </channel>
</rss>
<!-- fe2.yql.bf1.yahoo.com compressed/chunked Thu Oct  1 22:57:34 UTC 2015 -->
