134. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 9/25/2018 2:13:05 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.

134.1 Files compared

# Location File Last Modified
1 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\org\apache\xml\internal\security\keys\keyresolver KeyResolverSpi.java Mon Jan 22 14:46:50 2018 UTC
2 build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\org\apache\xml\internal\security\keys\keyresolver KeyResolverSpi.java Wed Sep 12 16:37:51 2018 UTC

134.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 520
Changed 1 2
Inserted 0 0
Removed 0 0

134.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

134.4 Active regular expressions

No regular expressions were active.

134.5 Comparison detail

  1   /*
  2    * reserve d comment  block
  3    * DO NOT  REMOVE OR  ALTER!
  4    */
  5   /**
  6    * License d to the A pache Soft ware Found ation (ASF ) under on e
  7    * or more  contribut or license  agreement s. See the  NOTICE fi le
  8    * distrib uted with  this work  for additi onal infor mation
  9    * regardi ng copyrig ht ownersh ip. The AS F licenses  this file
  10    * to you  under the  Apache Lic ense, Vers ion 2.0 (t he
  11    * "Licens e"); you m ay not use  this file  except in  complianc e
  12    * with th e License.  You may o btain a co py of the  License at
  13    *
  14    * http:// www.apache .org/licen ses/LICENS E-2.0
  15    *
  16    * Unless  required b y applicab le law or  agreed to  in writing ,
  17    * softwar e distribu ted under  the Licens e is distr ibuted on  an
  18    * "AS IS"  BASIS, WI THOUT WARR ANTIES OR  CONDITIONS  OF ANY
  19    * KIND, e ither expr ess or imp lied. See  the Licens e for the
  20    * specifi c language  governing  permissio ns and lim itations
  21    * under t he License .
  22    */
  23   package co m.sun.org. apache.xml .internal. security.k eys.keyres olver;
  24  
  25   import jav a.security .PrivateKe y;
  26   import jav a.security .PublicKey ;
  27   import jav a.security .cert.X509 Certificat e;
  28   import jav a.util.Has hMap;
  29  
  30   import jav ax.crypto. SecretKey;
  31  
  32   import com .sun.org.a pache.xml. internal.s ecurity.ke ys.storage .StorageRe solver;
  33   import org .w3c.dom.E lement;
  34  
  35   /**
  36    * This cl ass is an  abstract c lass for a  child Key Info Eleme nt.
  37    *
  38    * If you  want the y our KeyRes olver, at  firstly yo u must ext end this c lass, and  register
  39    * as foll owing in c onfig.xml
  40    * <PRE>
  41    *  &lt;Ke yResolver  URI="http: //www.w3.o rg/2000/09 /xmldsig#K eyValue"
  42    *     JA DNS    SS="MyPack age.MyKeyV alueImpl"/ /gt;
  43    * </PRE>
  44    */
  45   public abs tract clas s KeyResol verSpi {
  46  
  47       /** Fi eld proper ties */
  48       protec ted java.u til.Map<St ring, Stri ng> proper ties = nul l;
  49  
  50       protec ted boolea n globalRe solver = f alse;
  51  
  52       protec ted boolea n secureVa lidation;
  53  
  54       /**
  55        * Set  whether s ecure vali dation is  enabled or  not. The  default is  false.
  56        */
  57       public  void setS ecureValid ation(bool ean secure Validation ) {
  58           th is.secureV alidation  = secureVa lidation;
  59       }
  60  
  61       /**
  62        * Thi s method r eturns whe ther the K eyResolver Spi is abl e to perfo rm the req uested act ion.
  63        *
  64        * @pa ram elemen t
  65        * @pa ram baseUR I
  66        * @pa ram storag e
  67        * @re turn wheth er the Key ResolverSp i is able  to perform  the reque sted actio n.
  68        */
  69       public  boolean e ngineCanRe solve(Elem ent elemen t, String  baseURI, S torageReso lver stora ge) {
  70           th row new Un supportedO perationEx ception();
  71       }
  72  
  73       /**
  74        * Met hod engine ResolvePub licKey
  75        *
  76        * @pa ram elemen t
  77        * @pa ram baseUR I
  78        * @pa ram storag e
  79        * @re turn resol ved public  key from  the regist ered from  the elemen t.
  80        *
  81        * @th rows KeyRe solverExce ption
  82        */
  83       public  PublicKey  engineRes olvePublic Key(
  84           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  85       ) thro ws KeyReso lverExcept ion {
  86           th row new Un supportedO perationEx ception();
  87       };
  88  
  89       /**
  90        * Met hod engine LookupAndR esolvePubl icKey
  91        *
  92        * @pa ram elemen t
  93        * @pa ram baseUR I
  94        * @pa ram storag e
  95        * @re turn resol ved public  key from  the regist ered from  the elemen t.
  96        *
  97        * @th rows KeyRe solverExce ption
  98        */
  99       public  PublicKey  engineLoo kupAndReso lvePublicK ey(
  100           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  101       ) thro ws KeyReso lverExcept ion {
  102           Ke yResolverS pi tmp = c loneIfNeed ed();
  103           if  (!tmp.eng ineCanReso lve(elemen t, baseURI , storage) ) {
  104                return n ull;
  105           }
  106           re turn tmp.e ngineResol vePublicKe y(element,  baseURI,  storage);
  107       }
  108  
  109       privat e KeyResol verSpi clo neIfNeeded () throws  KeyResolve rException  {
  110           Ke yResolverS pi tmp = t his;
  111           if  (globalRe solver) {
  112                try {
  113                    tmp  = getClass ().newInst ance();
  114                } catch  (Instantia tionExcept ion e) {
  115                    thro w new KeyR esolverExc eption("",  e);
  116                } catch  (IllegalAc cessExcept ion e) {
  117                    thro w new KeyR esolverExc eption("",  e);
  118                }
  119           }
  120           re turn tmp;
  121       }
  122  
  123       /**
  124        * Met hod engine ResolveCer tificate
  125        *
  126        * @pa ram elemen t
  127        * @pa ram baseUR I
  128        * @pa ram storag e
  129        * @re turn resol ved X509Ce rtificate  key from t he registe red from t he element s
  130        *
  131        * @th rows KeyRe solverExce ption
  132        */
  133       public  X509Certi ficate eng ineResolve X509Certif icate(
  134           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  135       ) thro ws KeyReso lverExcept ion{
  136           th row new Un supportedO perationEx ception();
  137       };
  138  
  139       /**
  140        * Met hod engine LookupReso lveX509Cer tificate
  141        *
  142        * @pa ram elemen t
  143        * @pa ram baseUR I
  144        * @pa ram storag e
  145        * @re turn resol ved X509Ce rtificate  key from t he registe red from t he element s
  146        *
  147        * @th rows KeyRe solverExce ption
  148        */
  149       public  X509Certi ficate eng ineLookupR esolveX509 Certificat e(
  150           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  151       ) thro ws KeyReso lverExcept ion {
  152           Ke yResolverS pi tmp = c loneIfNeed ed();
  153           if  (!tmp.eng ineCanReso lve(elemen t, baseURI , storage) ) {
  154                return n ull;
  155           }
  156           re turn tmp.e ngineResol veX509Cert ificate(el ement, bas eURI, stor age);
  157  
  158       }
  159       /**
  160        * Met hod engine ResolveSec retKey
  161        *
  162        * @pa ram elemen t
  163        * @pa ram baseUR I
  164        * @pa ram storag e
  165        * @re turn resol ved Secret Key key fr om the reg istered fr om the ele ments
  166        *
  167        * @th rows KeyRe solverExce ption
  168        */
  169       public  SecretKey  engineRes olveSecret Key(
  170           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  171       ) thro ws KeyReso lverExcept ion{
  172           th row new Un supportedO perationEx ception();
  173       };
  174  
  175       /**
  176        * Met hod engine LookupAndR esolveSecr etKey
  177        *
  178        * @pa ram elemen t
  179        * @pa ram baseUR I
  180        * @pa ram storag e
  181        * @re turn resol ved Secret Key key fr om the reg istered fr om the ele ments
  182        *
  183        * @th rows KeyRe solverExce ption
  184        */
  185       public  SecretKey  engineLoo kupAndReso lveSecretK ey(
  186           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  187       ) thro ws KeyReso lverExcept ion {
  188           Ke yResolverS pi tmp = c loneIfNeed ed();
  189           if  (!tmp.eng ineCanReso lve(elemen t, baseURI , storage) ) {
  190                return n ull;
  191           }
  192           re turn tmp.e ngineResol veSecretKe y(element,  baseURI,  storage);
  193       }
  194  
  195       /**
  196        * Met hod engine LookupAndR esolvePriv ateKey
  197        *
  198        * @pa ram elemen t
  199        * @pa ram baseUR I
  200        * @pa ram storag e
  201        * @re turn resol ved Privat eKey key f rom the re gistered f rom the el ements
  202        *
  203        * @th rows KeyRe solverExce ption
  204        */
  205       public  PrivateKe y engineLo okupAndRes olvePrivat eKey(
  206           El ement elem ent, Strin g baseURI,  StorageRe solver sto rage
  207       ) thro ws KeyReso lverExcept ion {
  208           //  This meth od was add ed later,  it has no  equivalent
  209           //  engineRes olvePrivat eKey() in  the old AP I.
  210           //  We cannot  throw Uns upportedOp erationExc eption bec ause
  211           //  KeyResolv erSpi impl ementation s who don' t know abo ut
  212           //  this meth od would s top the se arch too e arly.
  213           re turn null;
  214       }
  215  
  216       /**
  217        * Met hod engine SetPropert y
  218        *
  219        * @pa ram key
  220        * @pa ram value
  221        */
  222       public  void engi neSetPrope rty(String  key, Stri ng value)  {
  223           if  (properti es == null ) {
  224                properti es = new H ashMap<Str ing, Strin g>();
  225           }
  226           pr operties.p ut(key, va lue);
  227       }
  228  
  229       /**
  230        * Met hod engine GetPropert y
  231        *
  232        * @pa ram key
  233        * @re turn obtai n the prop erty appoi nted by ke y
  234        */
  235       public  String en gineGetPro perty(Stri ng key) {
  236           if  (properti es == null ) {
  237                return n ull;
  238           }
  239  
  240           re turn prope rties.get( key);
  241       }
  242  
  243       /**
  244        * Met hod unders tandsPrope rty
  245        *
  246        * @pa ram proper tyToTest
  247        * @re turn true  if underst ood the pr operty
  248        */
  249       public  boolean u nderstands Property(S tring prop ertyToTest ) {
  250           if  (properti es == null ) {
  251                return f alse;
  252           }
  253  
  254           re turn prope rties.get( propertyTo Test) != n ull;
  255       }
  256  
  257       public  void setG lobalResol ver(boolea n globalRe solver) {
  258           th is.globalR esolver =  globalReso lver;
  259       }
  260  
  261   }