Produced by Araxis Merge on 12/5/2017 12:06:39 PM Central Standard 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.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DxDataSourceProvider\main\src\java\gov\va\med\imaging\dx\proxy | DxProxyUtilities.java | Mon Dec 4 21:35:12 2017 UTC |
| 2 | IV-eHMP_CIF.zip\IMAG_Source\VISA\Java\DxDataSourceProvider\main\src\java\gov\va\med\imaging\dx\proxy | DxProxyUtilities.java | Mon Dec 4 21:59:45 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 154 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| 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 |
No regular expressions were active.
| 1 | /** | |
| 2 | * | |
| 3 | Package: MAG - Vis tA Imaging | |
| 4 | WARNING: Per VHA D irective 2 004-038, t his routin e should n ot be modi fied. | |
| 5 | Date Cre ated: May 7, 2008 | |
| 6 | Site Nam e: Washin gton OI Fi eld Office , Silver S pring, MD | |
| 7 | Developer:
|
|
| 8 | Descript ion: | |
| 9 | ||
| 10 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 11 | ;; Property of the US Government . | |
| 12 | ;; No permis sion to co py or redi stribute t his softwa re is give n. | |
| 13 | ;; Use of un released v ersions of this soft ware requi res the us er | |
| 14 | ;; to execu te a writt en test ag reement wi th the Vis tA Imaging | |
| 15 | ;; Developm ent Office of the De partment o f Veterans Affairs, | |
| 16 | ;; telephon e (301) 73 4-0100. | |
| 17 | ;; | |
| 18 | ;; The Food and Drug A dministrat ion classi fies this software a s | |
| 19 | ;; a Class I I medical device. A s such, it may not b e changed | |
| 20 | ;; in any wa y. Modifi cations to this soft ware may r esult in a n | |
| 21 | ;; adulterat ed medical device un der 21CFR8 20, the us e of which | |
| 22 | ;; is consid ered to be a violati on of US F ederal Sta tutes. | |
| 23 | ;; +-------- ---------- ---------- ---------- ---------- ---------- ---------- + | |
| 24 | ||
| 25 | */ | |
| 26 | package go v.va.med.i maging.dx. proxy; | |
| 27 | ||
| 28 | import jav a.net.Malf ormedURLEx ception; | |
| 29 | import jav a.net.URL; | |
| 30 | import org .apache.co mmons.http client.pro tocol.Prot ocol; | |
| 31 | import org .apache.co mmons.http client.pro tocol.Prot ocolSocket Factory; | |
| 32 | import org .apache.lo gging.log4 j.LogManag er; | |
| 33 | import org .apache.lo gging.log4 j.Logger; | |
| 34 | ||
| 35 | import gov .va.med.im aging.dx.d atasource. configurat ion.DxData SourceConf iguration; | |
| 36 | import gov .va.med.im aging.prox y.ssl.Auth SSLProtoco lSocketFac tory; | |
| 37 | import gov .va.med.ne t.TLSUtili ty; | |
| 38 | ||
| 39 | /** | |
| 40 | * Common utilities for all DX data sour ces | |
| 41 | * | |
| 42 | * @author
|
|
| 43 | * | |
| 44 | */ | |
| 45 | public cla ss DxProxy Utilities | |
| 46 | { | |
| 47 | pr ivate fina l static L ogger logg er = LogMa nager.getL ogger(DxPr oxyUtiliti es.class); | |
| 48 | ||
| 49 | /* * | |
| 50 | * Configure the DX ce rtificate protocol t o use cert ificates t o communic ate with r emote serv er | |
| 51 | * @param dx Configurat ion The co nfiguratio n for the DX data so urce | |
| 52 | * / | |
| 53 | pu blic stati c void con figureDxCe rtificate( DxDataSour ceConfigur ation dxCo nfiguratio n) | |
| 54 | { | |
| 55 | try | |
| 56 | { | |
| 57 | logger .info("Con figuring D X Certific ate..."); | |
| 58 | URL keysto reUrl = ne w URL(dxCo nfiguratio n.getKeyst oreUrl()); // the keyst ore contai ning the k ey to send as the cl ient | |
| 59 | URL trusts toreUrl = new URL(dx Configurat ion.getTru ststoreUrl ()); // the keyst ore contai ning the t rusted cer tificates, to valida te the ser ver cert a gainst | |
| 60 | ||
| 61 | ProtocolSo cketFactor y socketFa ctory = | |
| 62 | new Au thSSLProto colSocketF actory(key storeUrl, | |
| 63 | dxConfigur ation.getK eystorePas sword(), t ruststoreU rl, | |
| 64 | dxConfigur ation.getT ruststoreP assword()) ; | |
| 65 | Protocol h ttpsProtoc ol = new P rotocol(dx Configurat ion.getTLS Protocol() , socketFa ctory, dxC onfigurati on.getTLSP ort()); | |
| 66 | ||
| 67 | Protocol.r egisterPro tocol(dxCo nfiguratio n.getTLSPr otocol(), httpsProto col); | |
| 68 | LogManager .getLogger (DxProxyUt ilities.cl ass).info( "DX HTTPS protocol h andler suc cessfully registered ."); | |
| 69 | ( new TLSU tility(Sys tem.out) ) .dumpSSLPr operties() ; | |
| 70 | } | |
| 71 | catc h (Malform edURLExcep tion e) | |
| 72 | { | |
| 73 | LogManager .getLogger (DxProxyUt ilities.cl ass).error ( | |
| 74 | "E rror confi guring HTT PS client within DX proxy. \n" + | |
| 75 | "K eystore an d/or trust store are unavailabl e. \n" + | |
| 76 | "D X function ality will not be av ailable.") ; | |
| 77 | } | |
| 78 | } | |
| 79 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.