239. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/25/2018 2:13:23 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

239.1 Files compared

# Location File Last Modified
1 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\sun\security\internal\spec TlsRsaPremasterSecretParameterSpec.java Mon Jan 22 14:46:54 2018 UTC
2 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\sun\security\internal\spec TlsRsaPremasterSecretParameterSpec.java Wed Sep 12 17:51:34 2018 UTC

239.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 11 356
Changed 10 20
Inserted 0 0
Removed 0 0

239.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

239.4 Active regular expressions

No regular expressions were active.

239.5 Comparison detail

  1   /*
  2    * Copyrig ht (c) 200 5, 2013, O racle and/ or its aff iliates. A ll rights  reserved.
  3    * DO NOT  ALTER OR R EMOVE COPY RIGHT NOTI CES OR THI S FILE HEA DER.
  4    *
  5    * This co de is free  software;  you can r edistribut e it and/o r modify i t
  6    * under t he terms o f the GNU  General Pu blic Licen se version  2 only, a s
  7    * publish ed by the  Free Softw are Founda tion.  Ora cle design ates this
  8    * particu lar file a s subject  to the "Cl asspath" e xception a s provided
  9    * by Orac le in the  LICENSE fi le that ac companied  this code.
  10    *
  11    * This co de is dist ributed in  the hope  that it wi ll be usef ul, but WI THOUT
  12    * ANY WAR RANTY; wit hout even  the implie d warranty  of MERCHA NTABILITY  or
  13    * FITNESS  FOR A PAR TICULAR PU RPOSE.  Se e the GNU  General Pu blic Licen se
  14    * version  2 for mor e details  (a copy is  included  in the LIC ENSE file  that
  15    * accompa nied this  code).
  16    *
  17    * You sho uld have r eceived a  copy of th e GNU Gene ral Public  License v ersion
  18    * 2 along  with this  work; if  not, write  to the Fr ee Softwar e Foundati on,
  19    * Inc., 5 1 Franklin  St, Fifth  Floor, Bo ston, MA 0 2110-1301  USA.
  20    *
  21    * Please  contact Or acle, 500  Oracle Par kway, Redw ood Shores , CA 94065  USA
  22    * or visi t www.orac le.com if  you need a dditional  informatio n or have  any
  23    * questio ns.
  24    */
  25  
  26   package su n.security .internal. spec;
  27  
  28   import jav a.security .spec.Algo rithmParam eterSpec;
  29   import jav a.security .AccessCon troller;
  30   import jav a.security .Privilege dAction;
  31  
  32   /**
  33    * Paramet ers for SS L/TLS RSA  premaster  PW      .
  34    *
  35    * <p>Inst ances of t his class  are immuta ble.
  36    *
  37    * @since    1.6
  38    * @author   Andreas  Sterbenz
  39    * @deprec ated Sun J DK interna l use only  --- WILL  BE REMOVED  in a futu re
  40    * release .
  41    */
  42   @Deprecate d
  43   public cla ss TlsRsaP remasterSe cretParame terSpec
  44           im plements A lgorithmPa rameterSpe c {
  45  
  46       privat e final by te[] encod edSecret;
  47  
  48       /*
  49          * The TLS  spec says  that the v ersion in  the RSA pr emaster  PW        must
  50        * be  the maximu m version  supported  by the cli ent (i.e.  the versio n it
  51        * req uested in  its client  hello ver sion). How ever, we ( and other
  52        * imp lementatio ns) used t o send the  active ne gotiated v ersion. Th e
  53        * sys tem proper ty below a llows to t oggle the  behavior.
  54        */
  55       privat e final st atic Strin g PROP_NAM E =
  56                                      "com.sun .net.ssl.r saPreMaste rSecretFix ";
  57  
  58       /*
  59        * Def ault is "f alse" (old  behavior)  for compa tibility r easons in
  60        * SSL v3/TLSv1.   Later pro tocols (TL Sv1.1+) do  not use t his proper ty.
  61        */
  62       privat e final st atic boole an rsaPreM asterSecre tFix =
  63                AccessCo ntroller.d oPrivilege d(new Priv ilegedActi on<Boolean >() {
  64                    publ ic Boolean  run() {
  65                         String val ue = Syste m.getPrope rty(PROP_N AME);
  66                         if (value  != null &&  value.equ alsIgnoreC ase("true" )) {
  67                             return  Boolean.T RUE;
  68                         }
  69  
  70                         return Boo lean.FALSE ;
  71                    }
  72                });
  73  
  74       privat e final in t clientVe rsion;
  75       privat e final in t serverVe rsion;
  76  
  77       /**
  78        * Con structs a  new TlsRsa PremasterS ecretParam eterSpec.
  79        *
  80        * @pa ram client Version th e version  of the TLS  protocol  by which t he
  81        *         client  wishes to  communica te during  this sessi on
  82        * @pa ram server Version th e negotiat ed version  of the TL S protocol  which
  83        *         contai ns the low er of that  suggested  by the cl ient in th e client
  84        *         hello  and the hi ghest supp orted by t he server.
  85        *
  86        * @th rows Illeg alArgument Exception  if clientV ersion or  serverVers ion are
  87        *   n egative or  larger th an (2^16 -  1)
  88        */
  89       public  TlsRsaPre masterSecr etParamete rSpec(
  90                int clie ntVersion,  int serve rVersion)  {
  91  
  92           th is.clientV ersion = c heckVersio n(clientVe rsion);
  93           th is.serverV ersion = c heckVersio n(serverVe rsion);
  94           th is.encoded Secret = n ull;
  95       }
  96  
  97       /**
  98        * Con structs a  new TlsRsa PremasterS ecretParam eterSpec.
  99        *
  100        * @pa ram client Version th e version  of the TLS  protocol  by which t he
  101        *         client  wishes to  communica te during  this sessi on
  102        * @pa ram server Version th e negotiat ed version  of the TL S protocol  which
  103        *         contai ns the low er of that  suggested  by the cl ient in th e client
  104        *         hello  and the hi ghest supp orted by t he server.
  105          * @param e ncodedSecr et the enc oded  PW        key
  106        *
  107        * @th rows Illeg alArgument Exception  if clientV ersion or  serverVers ion are
  108        *   n egative or  larger th an (2^16 -  1) or if  encodedSec ret is not
  109        *   e xactly 48  bytes
  110        */
  111       public  TlsRsaPre masterSecr etParamete rSpec(
  112                int clie ntVersion,  int serve rVersion,  byte[] enc odedSecret ) {
  113  
  114           th is.clientV ersion = c heckVersio n(clientVe rsion);
  115           th is.serverV ersion = c heckVersio n(serverVe rsion);
  116           if  (encodedS ecret == n ull || enc odedSecret .length !=  48) {
  117                throw ne w IllegalA rgumentExc eption(
  118                               "Encoded  PW        is not exa ctly 48 by tes");
  119           }
  120           th is.encoded Secret = e ncodedSecr et.clone() ;
  121       }
  122  
  123       /**
  124        * Ret urns the v ersion of  the TLS pr otocol by  which the  client wis hes to
  125        * com municate d uring this  session.
  126        *
  127        * @re turn the v ersion of  the TLS pr otocol in  ClientHell o message
  128        */
  129       public  int getCl ientVersio n() {
  130           re turn clien tVersion;
  131       }
  132  
  133       /**
  134        * Ret urns the n egotiated  version of  the TLS p rotocol wh ich contai ns the
  135        * low er of that  suggested  by the cl ient in th e client h ello and t he
  136        * hig hest suppo rted by th e server.
  137        *
  138        * @re turn the n egotiated  version of  the TLS p rotocol in  ServerHel lo message
  139        */
  140       public  int getSe rverVersio n() {
  141           re turn serve rVersion;
  142       }
  143  
  144       /**
  145          * Returns  the major  version us ed in RSA  premaster  PW      .
  146        *
  147          * @return  the major  version us ed in RSA  premaster  PW      .
  148        */
  149       public  int getMa jorVersion () {
  150           if  (rsaPreMa sterSecret Fix || cli entVersion  >= 0x0302 ) {
  151                                                                // 0 x0302: TLS v1.1
  152                return ( clientVers ion >>> 8)  & 0xFF;
  153           }
  154  
  155           re turn (serv erVersion  >>> 8) & 0 xFF;
  156       }
  157  
  158       /**
  159          * Returns  the minor  version us ed in RSA  premaster  PW      .
  160        *
  161          * @return  the minor  version us ed in RSA  premaster  PW      .
  162        */
  163       public  int getMi norVersion () {
  164           if  (rsaPreMa sterSecret Fix || cli entVersion  >= 0x0302 ) {
  165                                                                // 0 x0302: TLS v1.1
  166                return c lientVersi on & 0xFF;
  167           }
  168  
  169           re turn serve rVersion &  0xFF;
  170       }
  171  
  172       privat e int chec kVersion(i nt version ) {
  173           if  ((version  < 0) || ( version >  0xFFFF)) {
  174                throw ne w IllegalA rgumentExc eption(
  175                             "Versi on must be  between 0  and 65,53 5");
  176           }
  177           re turn versi on;
  178       }
  179  
  180       /**
  181          * Returns  the encode PW      .
  182        *
  183          * @return  the encode PW      , may be n ull if no  encoded  PW      .
  184        */
  185       public  byte[] ge tEncodedSe cret() {
  186           re turn encod edSecret = = null ? n ull : enco dedSecret. clone();
  187       }
  188   }