aboutsummaryrefslogtreecommitdiff
path: root/spss
diff options
context:
space:
mode:
Diffstat (limited to 'spss')
-rw-r--r--spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201bin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710bin0 -> 806 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08bin0 -> 1314 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7bin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726bin0 -> 1383 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630bin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522Fbin0 -> 990 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35bin0 -> 1087 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9Abin0 -> 886 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214bin0 -> 1292 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7Dbin0 -> 820 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2bin0 -> 1151 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6bin0 -> 1353 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7bin0 -> 1157 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9Cbin0 -> 704 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732bin0 -> 913 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2bin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941bin0 -> 991 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5bin0 -> 919 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0bin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233bin0 -> 987 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66Fbin0 -> 1253 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38bin0 -> 704 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8Dbin0 -> 914 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03bin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27bin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517bin0 -> 802 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEAbin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8Fbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AEbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733bin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6bin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9Ebin0 -> 1298 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9bin0 -> 1234 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8Cbin0 -> 791 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4bin0 -> 1045 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26bin0 -> 914 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923Ebin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FAbin0 -> 1391 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4bin0 -> 1130 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0Fbin0 -> 1188 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526bin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830bin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25Bbin0 -> 1159 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1bin0 -> 1366 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CDbin0 -> 825 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9bin0 -> 1213 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2Bbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0bin0 -> 1546 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8Cbin0 -> 740 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85Ebin0 -> 1133 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01bin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878bin0 -> 835 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6Cbin0 -> 990 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506Bbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BBbin0 -> 1065 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92Bbin0 -> 1066 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFEbin0 -> 947 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6bin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400bin0 -> 761 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913bin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BCbin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3Fbin0 -> 1053 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6bin0 -> 1030 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8Bbin0 -> 932 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0Bbin0 -> 999 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8Cbin0 -> 997 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926bin0 -> 930 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623bin0 -> 1028 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1Bbin0 -> 1237 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BDbin0 -> 1333 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02Bbin0 -> 1201 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBEbin0 -> 1159 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0Fbin0 -> 1057 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540Dbin0 -> 1058 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7Abin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515bin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92bin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419bin0 -> 734 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374bin0 -> 1167 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305bin0 -> 1339 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331bin0 -> 1266 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2bin0 -> 920 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088Dbin0 -> 922 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04bin0 -> 700 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBEbin0 -> 823 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240bin0 -> 1224 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890Cbin0 -> 944 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3EDbin0 -> 406 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AAbin0 -> 1260 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3bin0 -> 1366 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734Fbin0 -> 930 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3bin0 -> 933 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217Dbin0 -> 997 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1bin0 -> 1209 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221Cbin0 -> 994 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3bin0 -> 1202 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAEbin0 -> 1218 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344bin0 -> 1217 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18bin0 -> 924 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65Cbin0 -> 606 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267bin0 -> 1020 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703bin0 -> 1067 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BEbin0 -> 758 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25bin0 -> 786 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696bin0 -> 660 bytes
-rw-r--r--spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6Cbin0 -> 1157 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.derbin0 -> 1020 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12bin0 -> 3716 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.derbin0 -> 920 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12bin0 -> 3932 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.derbin0 -> 1200 bytes
-rw-r--r--spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12bin0 -> 3908 bytes
-rw-r--r--spss/handbook/conf/moa-spss/log4j.properties37
-rw-r--r--spss/handbook/conf/moa-spss/sp.minimum.config.xml44
-rw-r--r--spss/handbook/conf/moa-spss/spss.config.xml149
-rw-r--r--spss/handbook/conf/moa-spss/ss.minimum.config.xml34
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.derbin0 -> 877 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12bin0 -> 3808 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystorebin0 -> 5200 bytes
-rw-r--r--spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystorebin0 -> 1003 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cerbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cerbin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cerbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.TrustSignTest-Enc-01.20011206-20041206.SerNo0450[CertifiedKeypair].cerbin0 -> 1018 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20021120-20051120.SerNo16f8[CertifiedKeypair].cerbin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20030903-20060903.SerNo4848[CertifiedKeypair].cerbin0 -> 1136 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/Stabsstelle.TestCA-Verschluesselung-Buerger.20040518-20100101.SerNo0004[CertifiedKeypair].der22
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cerbin0 -> 865 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cerbin0 -> 979 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cerbin0 -> 860 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cerbin0 -> 864 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cerbin0 -> 861 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cerbin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/MOA-Test-CA-Signaturdienste.cerbin0 -> 835 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.derbin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.derbin0 -> 1385 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cerbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.derbin0 -> 1205 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.derbin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.TrustSignTest-Sig-01.20011206-20041206.SerNo0588[SecureSignatureKeypair].cerbin0 -> 1151 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20021120-20051120.SerNo16f9[SecureSignatureKeypair].cerbin0 -> 1171 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20030903-20060903.SerNo484a[SecureSignatureKeypair].cerbin0 -> 1133 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/Stabsstelle.TestCA_Signatur_Buerger.20040518-20100101.SerNo0003[CertifiedKeypair].derbin0 -> 914 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cerbin0 -> 1111 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cerbin0 -> 975 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cerbin0 -> 901 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cerbin0 -> 1110 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.derbin0 -> 1747 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cerbin0 -> 1076 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cerbin0 -> 1141 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cerbin0 -> 870 bytes
-rw-r--r--spss/handbook/conf/moa-spss/trustProfiles/test/signaturdienst.derbin0 -> 914 bytes
-rw-r--r--spss/handbook/handbook.html6
-rw-r--r--spss/handbook/handbook/common/LogoBKA.pngbin0 -> 8062 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpgbin0 -> 1584855 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoa4c.jpgbin0 -> 45624 bytes
-rw-r--r--spss/handbook/handbook/common/LogoMoaBw.jpgbin0 -> 41375 bytes
-rw-r--r--spss/handbook/handbook/common/MOA.css300
-rw-r--r--spss/handbook/handbook/config/MOA-SPSS-config-1.3.xsd254
-rw-r--r--spss/handbook/handbook/config/config.html1014
-rw-r--r--spss/handbook/handbook/faq/faq.html126
-rw-r--r--spss/handbook/handbook/index.html34
-rw-r--r--spss/handbook/handbook/install/install.html486
-rw-r--r--spss/handbook/handbook/intro/intro.html44
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.pdfbin0 -> 146062 bytes
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl105
-rw-r--r--spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd469
-rw-r--r--spss/handbook/handbook/usage/usage.html1236
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml166
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/server.xml169
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh12
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties4
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat27
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat13
-rw-r--r--spss/server/serverlib/resources/data/deploy/tomcat/workers.properties6
-rw-r--r--spss/server/serverlib/resources/data/deploy/tools/certtool.bat25
-rw-r--r--spss/server/serverlib/resources/data/deploy/tools/certtool.sh20
-rw-r--r--spss/server/serverlib/resources/data/deploy/tools/configtool.bat25
-rw-r--r--spss/server/serverlib/resources/data/deploy/tools/configtool.sh20
-rw-r--r--spss/server/serverlib/resources/licenses/Apache-2.0.txt202
-rw-r--r--spss/server/serverlib/resources/licenses/IAIK-License.txt13
-rw-r--r--spss/server/serverlib/resources/licenses/Jaxen.txt40
-rw-r--r--spss/server/serverlib/resources/licenses/PostgreSQL-JDBC.txt26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java161
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java163
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java1012
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java57
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java19
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java17
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java21
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java13
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java17
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java21
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java17
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java11
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java19
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java15
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java27
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java16
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java30
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java23
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java22
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java46
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java44
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java24
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java66
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java50
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java31
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java79
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java22
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java99
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java99
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java44
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java75
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java46
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java46
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java568
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java52
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java81
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java49
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java39
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java24
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java54
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java93
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java15
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java36
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java113
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java141
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java64
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java59
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java288
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java119
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java285
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java157
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java206
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java246
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java169
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java101
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java275
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java310
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java30
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java30
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java20
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java23
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java27
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java18
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java20
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java29
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java24
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java20
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java32
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java24
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java19
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java19
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java23
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java19
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java18
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java40
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java21
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java26
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java12
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java27
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java13
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java28
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java25
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java18
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm155
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java165
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java1239
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java689
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java60
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java59
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java125
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java106
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java41
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java58
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java37
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java36
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java48
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java97
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java69
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java50
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java121
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java33
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java81
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java55
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java173
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java80
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java53
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java75
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java56
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java116
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java107
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java64
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java135
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java54
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java49
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java87
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java76
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java34
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java46
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java47
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java43
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java116
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java82
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java98
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java168
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java150
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java279
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java131
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java129
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java221
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java71
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java892
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java162
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java267
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java63
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java249
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java45
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java72
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java258
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java86
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java437
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java545
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java455
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java675
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java144
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java126
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java42
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java54
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java38
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java382
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java120
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java78
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java72
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java104
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java151
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java242
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java59
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java264
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java62
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java51
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java61
-rw-r--r--spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java65
-rw-r--r--spss/server/serverlib/src/main/resources/properties/spss_messages_de.properties151
-rw-r--r--spss/server/serverlib/src/main/resources/security/cacertsbin0 -> 7365 bytes
-rw-r--r--spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.wsdl105
-rw-r--r--spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.xsd469
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/AllTests.java40
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/SPSSTestCase.java82
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java24
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java71
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java113
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java61
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java81
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/AllTests.java20
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java377
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java225
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java166
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java149
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java36
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java25
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java63
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java180
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java201
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java63
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java61
-rw-r--r--spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java50
-rw-r--r--spss/server/serverws/spec/MOA-SPSS-1.3.docbin0 -> 559616 bytes
-rw-r--r--spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd48
-rw-r--r--spss/server/serverws/src/main/webapp/WEB-INF/web.xml55
-rw-r--r--spss/server/serverws/tools/ConfigurationMapper.xsl343
480 files changed, 30430 insertions, 0 deletions
diff --git a/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201 b/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/01540E2704537AA810D671E1C4106FD8821EB52A/C2556DADDF68A9EEF7F5C14A24CA33BCA930B201
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710 b/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710
new file mode 100644
index 000000000..a7948e488
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/032F2123890A879585CE96674CA4C37B55986729/E1201A308CC10323C27D9084B048996E44B8F710
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08 b/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08
new file mode 100644
index 000000000..73434134e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/04462EF01783744F9F4CDE3705FD86D488697C9F/D44EED7580C7792242D73E267A89C7DB25E4BD08
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7 b/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/083E1A0528C48475951A6610360D813E2713DCC7/7E691392F741B7E4B4AA9A76D75851BDE18BE5A7
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726 b/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726
new file mode 100644
index 000000000..3af27c013
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0889EBEC55D9E34E782E6D3C250840EB932EEA2F/9CD9ADF04626E7E8C9A1C8DACE3B0B8A2979C726
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630 b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630
new file mode 100644
index 000000000..29d93550e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/0F843FB1E0C626540BE638B79A2987E2611CE630
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F
new file mode 100644
index 000000000..2a88295a7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/69F21C82DC9A7A940ACEC414593E59C9E61E522F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35 b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35
new file mode 100644
index 000000000..84a1690d2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0AF04E7099C9829BD1F8437362BA0036E0705C4D/FC72939DC06EDDF8C51549ECF00AC92BF2B39F35
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A b/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A
new file mode 100644
index 000000000..04c6ea363
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/0FE419AB943E7E5C6A7190CC6BBE8E3F914C658A/FB356CEF4406D1F135E3FC59026B338D3F518F9A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214 b/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214
new file mode 100644
index 000000000..fd23a38d6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/10F17BDACD8DEAA1E8F23FBEAE7B3EC3D9773D1D/E7340D1FB627D8917A9C0D23F21515C441BF1214
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D b/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D
new file mode 100644
index 000000000..1a3106742
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/125E4AC6B38C1E0BF34BF7D927CBB947E35141E8/2CA36B76BC6CCDC29296111A4EFCAFC0553BBC7D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2 b/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2
new file mode 100644
index 000000000..28cb48bb0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1607988A938D3D339F40AFB567384BC5B7540935/9FDCFE5A082FD69BF5D9E73C25FBE9EA1AC0ACF2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6 b/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6
new file mode 100644
index 000000000..bdfcb7ab1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1A283D1183DB82A548427B4F19E99E7A8EA728D7/49969819654C230ECDF779ABB9629A211FCC43D6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7 b/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7
new file mode 100644
index 000000000..eaac3518b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/1BF3C1D2767F5C333AD5531531FEE3A712935B73/D0AF386E182F00983637F97C0A5F4708F9F641A7
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C b/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C
new file mode 100644
index 000000000..4dd2c49bf
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/20DD04B052D2D364E5FF851A3FD314F0FD91253E/6814C7316CEA7191C9CB3BE58199B4A957210D9C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732 b/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732
new file mode 100644
index 000000000..13abede5c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/22973CFC20EA68162A0B2E837D45FB8266ACDBCF/C529469053D9F95810A8F7F2DB9A6596A7655732
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2 b/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/238ACC1D03DA5A2E7E580D760FB3EE218FDC5A97/D3C063F219ED073E34AD5D750B327629FFD59AF2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941
new file mode 100644
index 000000000..d2e7db667
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/1C43C0BA36CC8DE659180B2FAC9A6F54430D5941
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5
new file mode 100644
index 000000000..f2f1c6562
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/AC36A78C66FEC87CC0FD2C32B49214C65676E0C5
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0
new file mode 100644
index 000000000..476a3efb2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/C92238A7178A6C61F8BACA22D6CF7E50772BA9F0
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233 b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233
new file mode 100644
index 000000000..5c88b668a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/23A16796B3D718035F1E0DB209A42938767631DA/DFAE695342AC81A521025904406884399822B233
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F b/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F
new file mode 100644
index 000000000..4d1852203
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2962CDAADFA0BF8EE53B80870C53E551A43EA72A/12B06E039F1A36D8238AFC508009E1ADF88BF66F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38 b/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38
new file mode 100644
index 000000000..69a8e4872
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2C976220B378E08DF5E68CBC54C05CE41224FD29/0CC37CC35E18F9909E43E4E9894D0CDF06EE9A38
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D b/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D
new file mode 100644
index 000000000..807fa786c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/2F5DA022AAFF668F34C35A80049D690F3CFE3040/D62327E6B19B7968A8BE6588DEAB0BC0DB684D8D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03 b/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/31B5BA02D476873C5220CDCFA0C095C4A31DEFDF/88D6151358A5E3C81D7AE1A536121DC03011BC03
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27 b/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3314CE3E42175EACC28D57C35F192430BBADAC1A/B1D0BC027906A3B7E7518C93ACB26D978233ED27
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517 b/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517
new file mode 100644
index 000000000..f8a8957ac
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/337F895A0435AA7E2629C5282B5A0DBBE19EE1C7/75F792DE2CF544007F470F1B924961C2BD2EF517
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA b/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA
new file mode 100644
index 000000000..836ba3767
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3A095C38EB5D5824FE61BE43F9CDF6515DC94805/65698A39E03FF00FD552D4AD99FB290C2B9D4BEA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/0F5A0342F5CD448799C3C6D178607E3F2B5BCB8F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/51A44C28F313E3F9CB5E7C0A1E0E0DD2843758AE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733 b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/9E0512DD61DA5949D1D8631C3F19D75F496C3733
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6 b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B2F8C424AA88CA305C519FDEFCF29DDB7E96AE2/E6E6FC88719177C9B7421825757C5E47BCAC85F6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E b/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E
new file mode 100644
index 000000000..b2beddaa5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3B76D7A5CE7EC6022D7990CFEA534C908717DF54/C0C699EFE6E837CB5E4CFC3A61077617A22C1A9E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9 b/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9
new file mode 100644
index 000000000..54893c9d6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3C627C9D89A5BFB5E4E385982DF33B7E7F6E8D2D/C5AC86EC5B771BEBDF8B6E040F109A1186E229B9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C b/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C
new file mode 100644
index 000000000..8588ce58a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/3C7CE93947421CB66603DC7DBAB0F04C4788382F/23E594945195F2414803B4D564D2A3A3F5D88B8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4 b/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4
new file mode 100644
index 000000000..6e17b9db5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/4224231A54F64581FBA2AB6ED82ADE467F144BDC/65EF37033859C2F709A64086D3A5BD1B8F1A85A4
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26 b/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26
new file mode 100644
index 000000000..55707d69f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/45E2F3F807C6EAB9EDC1B3250F7558CA12A063DE/3A77E9B577661D99F9BBA5A352B29C7FF58A3D26
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E b/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/47ED4C584F9DCD54A6C2925252C5603ADAC93F49/84E4E75DBB2FD6397E6ABBD27FBE16D5BA71923E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA b/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA
new file mode 100644
index 000000000..4e18de8d7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/487F4DEE9E63DADEB4CAAB07E0E166ACC9F584B6/9891BBEA9FDA665EEEC31C403A00A5CA5628D0FA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4 b/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4
new file mode 100644
index 000000000..9b2ee0fc6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/52B42552A440A54C21A39D46D7F176AF28BEB5AA/51AC8CFF36818AA25498A293DF48EBCFFFF6D0B4
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F b/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F
new file mode 100644
index 000000000..5dd9558d0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/550E9627E9094A2D1BB6385821334D02122BCF26/B7BCA7BC3C41FD0DC835175486FAB3FB4626EC0F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526 b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/620127A8E5886A4805403977C3EF7D5EAF881526
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830 b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/562428A359B1CC3A820ABCC9C8F625CBB6A6A510/FCD9E881BCCCB9352EEF337C8D4EAAD65C4EC830
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B b/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B
new file mode 100644
index 000000000..b15880c29
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/58090A698038FEDAD56B4B976F23C29950D1D5A5/6BDA1FF41EEBC5DA66912F3C69B60C2A41C6E25B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1 b/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1
new file mode 100644
index 000000000..6da18c620
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/59484253C7D4C5BEAB7D2BABFAC13DDD1CA53FCC/341EA32E448659125A67DD04177FD17468FCFCB1
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD b/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD
new file mode 100644
index 000000000..c19647ad8
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/60EF765436B4F314F2285BE2D89A511073AC0D58/334710B9169BCD20687A6302EEB16AEB97F288CD
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9 b/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9
new file mode 100644
index 000000000..39f88d881
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6144BFC0CBE85C63DEFB6F208D80385B89F68046/D031945D982820B92FADBC7F71F6D1D9DFFDA2C9
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B b/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6F5F08A3A5D59CA877CB146F00BB0264369B2304/ADEC5673B57A18F16EFAF75EEFBFAD4841E2CD2B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0 b/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0
new file mode 100644
index 000000000..89cfe44fd
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/6F86F897C45679B45F03C67D44B6447EFF43B758/53CB69CF933C2D28FB9DF91F2852A99EC3352EA0
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C b/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C
new file mode 100644
index 000000000..cc8b505ec
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/728C819D737EE42627F96F839C33BB6E68E85F68/00845B74CA13FE0A9056E6C0B5126FECF73B0D8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E
new file mode 100644
index 000000000..c9da41583
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/474BC41135FB88BF58B5A8D976A1D5583378D85E
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01 b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01
new file mode 100644
index 000000000..28fbdf42f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/738B34854780955AE8FAF12349F2C9C52105A52C/6B618820CE6A5EC0B5E63A9170335E5EA9F3BA01
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878 b/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878
new file mode 100644
index 000000000..424f849a1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/76011AE57123CC4E476C094C48C461DC37A0DEDD/FDC348410699803DE7D8276813BC2232EA99A878
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C b/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C
new file mode 100644
index 000000000..4989f3e73
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/7A9DC855647136050A8D75D6571AC64739F36C6C/BF648929E7DAABD8D97B3202F48D6C4A19C78F6C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B b/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/88D9F0C0EBB72C58516EC96AEED397FA86B40E39/6DCD5118D1542E6C205C580775C5420B7509506B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB
new file mode 100644
index 000000000..6f97837a2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/3B8484BF1370941BF03F206B5C4958DA4E1559BB
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B
new file mode 100644
index 000000000..508f7f076
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8B23D64DBA1572885563DF070BE9C22A39A3BD26/C0EF3E7A54B4C501295F77974B1995E36B25C92B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE b/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE
new file mode 100644
index 000000000..a0e3fdda1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/8FDB1CB752D82C88C89F9E9DA7AD2F54C6FA6F3B/842B3870A64001CDD90978D0E554DAF94D9ABDFE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6 b/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9014D44A2072A5D74E12C7FE47F37D68371E1C42/679A4F81FC705DDEC419778DD2EBD875F4C242C6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400 b/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400
new file mode 100644
index 000000000..6c0216239
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/91C4DD783D6D38F0325FE74930BF61F656364EA9/53A6B611F8CEE0315BCCE5D59898931ED390E400
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913 b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913
new file mode 100644
index 000000000..f3cf5e676
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/45B43346251FDF9E95DCB7F36928785D46D63913
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC
new file mode 100644
index 000000000..fc5bd433b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/96107213A757FFB88DECEE469373162636D7146C/E33619C88426E4FE956041E6751ADDEC9C10F0BC
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F b/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F
new file mode 100644
index 000000000..3beb4529a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/975729FFAF7EB667BCF68E9B886EA876E44F46D0/35202B14F69409EAA51CD8AB547AC0CD5E993F3F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6 b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6
new file mode 100644
index 000000000..781d1e4f2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/3F4E01DF7547CDD38DCCFCCD76170C299ECEB9F6
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B
new file mode 100644
index 000000000..8286cabbc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/9D4CB7E3DBF24AE596972D59C375DD6384BB5E8B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B
new file mode 100644
index 000000000..a0148f63b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9D3E6FACCD6AF894CDD2B91D1B9E3C2E310EAB93/A562C4B99E2847251CB4A1F05DA1FF43E7296F0B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C
new file mode 100644
index 000000000..61d346a8f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9039DBD29DB8AD0F8E2015F05FCD40582CCCBE8C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926 b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926
new file mode 100644
index 000000000..9ae7ffa0c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/9F0E0FBB25F66FF88C8E033EFF358923C84A2926
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623 b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623
new file mode 100644
index 000000000..a68ae2db7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/9F5A9B8D0F919C96B9472442BFBBDD34232A627D/C87D1855227D995C332C4C9072A2E2053F2CC623
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B
new file mode 100644
index 000000000..f1d7b6a28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/42AD1897A4643D2AA634D980F16349E6694F3B1B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD
new file mode 100644
index 000000000..c1b90c0f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A07E912CAA2AB620034B05353E7D4B91807880ED/FE7891B6ED7B178F528A28B21478299F865889BD
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B b/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B
new file mode 100644
index 000000000..e27a87038
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A15B5DBE14A19CF859F48E2DA2A29A4C3DB4D680/3AC12E21FFF9ACAB2BCFF52BBD885FB7AAC9A02B
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE b/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE
new file mode 100644
index 000000000..cc35ba691
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A24C49B7F1B637E7F72C12CAB35910EC8EF1C6CF/8784ED81F5A22779EB0B081945FD151992557FBE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F
new file mode 100644
index 000000000..b596d82e3
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/20CAECDCA766243AAD6FA1327618FC81BA65DC0F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D
new file mode 100644
index 000000000..4adc3b7ec
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A4B140FBD4D5EA2AC3A570299945D8FCBBAD2231/96D5D179016A5A6546973BA63733617EE1F1540D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/DFA7DDEF5C212F0F0651E2A9DE1CE4A1AC63AF7A
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515 b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/E619D25B380B7B13FDA33E8A58CD82D8A88E0515
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92 b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/A95F0C3FA54CA93E3D5BA61AD23459300FA498D6/F825578F8F5484DFB40F81867C392D6CB0012B92
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419 b/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419
new file mode 100644
index 000000000..10a1f7141
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/AAB27F0E98B28AF253454415F6490CB5F43A4B49/A9D28607928FA8615E2615CC9D71B535C5D0D419
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374 b/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374
new file mode 100644
index 000000000..61a7ccb15
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/AC1B67D7D5A300767C0944ACE8458DD49960F1BD/4D523730501ADB80A76B0B473A4D21C7D86F8374
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305 b/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305
new file mode 100644
index 000000000..ea3512e3d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/B310CEED301C503EDB15720F94D5D7E76BF423DA/AA94FD422AEB8F5B6E8508314CE0DC68BCD53305
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331 b/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331
new file mode 100644
index 000000000..46dd968f0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/B3EB7B59ECFF1E25E16C64BB24993D1B20DCFC28/07A6DEED70213CCF598F278789680DA4C04A0331
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2 b/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2
new file mode 100644
index 000000000..63ba5cce5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BAA9ADD095E87E0B490B6DD933AA2F450C6B9492/7A430B6E3592BEEDFAA0DD5DD6262C27EB8D26D2
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D b/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D
new file mode 100644
index 000000000..0bab77032
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BE47A5DA41A35F740D98305DA8FF4096B71492BE/D1474E7D99512D05B98DD37B3FE86496A03D088D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04 b/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04
new file mode 100644
index 000000000..0a8de4bb9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/BED4C70D83B5042F4254459064FDEACD43DD1EDF/7BE0C8E441786C69A3CB35BDBEF235F8B5310E04
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE b/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE
new file mode 100644
index 000000000..6428b8256
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C15FFFE6EFAD484909C9EFC6CD5C20435E326685/DDBAE68B1FF60FFBB2854C78727B76C95EC83BBE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240 b/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240
new file mode 100644
index 000000000..f11bd6247
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C2A7CAE9E68EB7945828D193CB22CDD246BC7F95/6955D95F6B0799F7D96F4FC28E6E6C64758C1240
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C b/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C
new file mode 100644
index 000000000..348257122
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C52E4A04A22D98C70E19F1969AD71C838E4371B3/F96FE4F59166EFA9000B21A16EF22CF14468890C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED b/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED
new file mode 100644
index 000000000..a3f8a7409
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C7E1D3604D2A960201D70F29B8A80EDA11475EEB/C18ECC8FD712ACAFBEAEDC1FA13F5AB19930E3ED
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA b/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA
new file mode 100644
index 000000000..3c1f2f8a2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/C976280EC7FECF169577E31D8CA0BB00967904B1/7666A8BD2C2513DE489C06D08D566F177ECE84AA
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3 b/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3
new file mode 100644
index 000000000..5026d395f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CABD2EA6CA438084840DCCAE875F341E2D3A2C43/02A0E6456442E35198532ACFFB6FEE3B606D9FA3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F
new file mode 100644
index 000000000..c34d0f380
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/8AB0A3519AFA7F3C04074522678BAA1CB3DC734F
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3 b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3
new file mode 100644
index 000000000..d894e92ca
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/DF47B3040E7632614464BD2EC4ECD1B8030F53E3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D
new file mode 100644
index 000000000..380486f65
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/CE91CC7CF2DDDEE6623A1A91B3298DCAD2375F2B/E117479B4A41D7F3223FCAE50560B0D57B22217D
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1 b/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1
new file mode 100644
index 000000000..22d64fb5f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/D4D40BD33958CD9169A7AB6304AA2BBAD22DC595/07976A2A16EC182670161B46886B05E1FEAC16B1
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C b/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C
new file mode 100644
index 000000000..42a64da07
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/D708C897515970D33EF7CD0C2474449D3AB6AA83/52ED0FAFBD38A868C678174D7EB03D266ADB221C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3 b/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3
new file mode 100644
index 000000000..010c5d5b6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DD29E76659D18371B78E61E7DF4D4B8FEDCAF8E7/8BA5C0847597612C7E16970EAE55EF58D32E9CF3
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE
new file mode 100644
index 000000000..5375c57c3
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/27337257493B86B9BFF78D569F938D692A430EAE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344 b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344
new file mode 100644
index 000000000..7085c5ac9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/DF5F53FDADAFC93F4789141B5A7627EB9F3BD29F/4832F0A28C3724A92F6CB3314F747D0E74FC7344
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18 b/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18
new file mode 100644
index 000000000..6225c0ca7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/E6A4C843059A6043B4DC967F9EF892B695990777/B4B77C83465979E3679E3A33F972F48EE3730A18
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C b/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C
new file mode 100644
index 000000000..a3aa0000d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/EA7E6D37E678C1BCA5060F97DAF09F559DFD04B7/3AAD23B00CA10E54E6368DF7952E3F4B5108B65C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267 b/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267
new file mode 100644
index 000000000..332aa817a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/EEE6351C5C6EBD8644AB88E7648D44FA07C72A80/14E59C02A6877B0EBD2C4203886BA25959C1D267
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703 b/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703
new file mode 100644
index 000000000..069640ffc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F1B84756A1EAB09C171B2783DD163B42A9BD0BBB/ED5608CE67EA5CB79AC024CEA7445F9BCBE48703
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE b/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE
new file mode 100644
index 000000000..c3fc91352
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F3DA7C495789E656FA27E611CCAFA05F232ADEA0/F3AE9FEA4DECEE5330770A2520BD86909929E7BE
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25 b/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25
new file mode 100644
index 000000000..83aeb1fce
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F48B57F89BACD8687EBB12223A5B8E5EF3774583/CAF84A42305615AC2C582F6412BDA3E36DAC3D25
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696 b/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696
new file mode 100644
index 000000000..5631441a9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F613568C1D7A1300B32609998288211959DBDFB0/D7EDAF7381F7FC93B4C28FA372190D7A59CFA696
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C b/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C
new file mode 100644
index 000000000..585047fa2
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/certstore/F7D331850EC13D22284909E0FC3493A65FFA7F30/EC988340526163D5B7AC80481B2AC76828EDDC6C
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der
new file mode 100644
index 000000000..332aa817a
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12 b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12
new file mode 100644
index 000000000..8827ed99c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der
new file mode 100644
index 000000000..63ba5cce5
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12 b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12
new file mode 100644
index 000000000..4499ab52b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der
new file mode 100644
index 000000000..4f87134e7
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12 b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12
new file mode 100644
index 000000000..5b7631133
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/log4j.properties b/spss/handbook/conf/moa-spss/log4j.properties
new file mode 100644
index 000000000..f6abfd495
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/log4j.properties
@@ -0,0 +1,37 @@
+#
+# Sample log4j configuration for the MOA-SPSS web service
+#
+
+# commons-logging setup
+org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.Log4jFactory
+
+# Configure root logger and loggers for moa-spss
+log4j.rootLogger=info, stdout
+log4j.logger.moa.spss.server=info, moaspss
+log4j.logger.iaik.server=info, moaspss
+
+# Configure the 'stdout' appender to write logging output to the console
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+
+# Configure the 'moaspss' appender to write moa-spss related logging output
+# to the file '${catalina.home}/logs/moa-spss.log'. The file is rolled over every 1000KB,
+# and a maximum history of 10 log files is being kept.
+log4j.appender.moaspss=org.apache.log4j.RollingFileAppender
+log4j.appender.moaspss.File=${catalina.home}/logs/moa-spss.log
+log4j.appender.moaspss.MaxFileSize=1000KB
+log4j.appender.moaspss.MaxBackupIndex=10
+log4j.appender.moaspss.layout=org.apache.log4j.PatternLayout
+log4j.appender.moaspss.layout.ConversionPattern=%5p | %d{dd HH:mm:ss,SSS} | %20c | %10t | %m%n
+
+# Configure the jdbc appender 'JDBC' to write logging output
+# to the given PostgreSQL database
+# a suitable table called 'spss_log' must have been created in the
+# database using the command:
+# create table spss_log (log_time timestamp, log_level char(5), log_msg text)
+#log4j.appender.JDBC=org.apache.log4j.jdbc.JDBCAppender
+#log4j.appender.JDBC.driver=org.postgresql.Driver
+#log4j.appender.JDBC.URL=jdbc:postgresql://10.16.46.108/moa?user=moa&password=moatest
+#log4j.appender.JDBC.layout=org.apache.log4j.PatternLayout
+#log4j.appender.JDBC.sql=INSERT INTO spss_log (log_time, log_level, log_msg) VALUES ('%d{ yyyy-MM-dd HH:mm:ss.SSS}', '%5p', '%m')
diff --git a/spss/handbook/conf/moa-spss/sp.minimum.config.xml b/spss/handbook/conf/moa-spss/sp.minimum.config.xml
new file mode 100644
index 000000000..e2a556677
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sp.minimum.config.xml
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+<cfg:SignatureVerification>
+<cfg:CertificateValidation>
+<cfg:PathConstruction>
+<cfg:AutoAddCertificates>true</cfg:AutoAddCertificates>
+<cfg:UseAuthorityInformationAccess>true</cfg:UseAuthorityInformationAccess>
+<cfg:CertificateStore>
+<cfg:DirectoryStore>
+<cfg:Location>certstore</cfg:Location>
+</cfg:DirectoryStore>
+</cfg:CertificateStore>
+</cfg:PathConstruction>
+<cfg:PathValidation>
+<cfg:ChainingMode>
+<cfg:DefaultMode>pkix</cfg:DefaultMode>
+</cfg:ChainingMode>
+<cfg:TrustProfile>
+<cfg:Id>Test-Signaturdienste</cfg:Id>
+<cfg:TrustAnchorsLocation>trustProfiles/test</cfg:TrustAnchorsLocation>
+</cfg:TrustProfile>
+</cfg:PathValidation>
+<cfg:RevocationChecking>
+<cfg:EnableChecking>true</cfg:EnableChecking>
+<cfg:MaxRevocationAge>0</cfg:MaxRevocationAge>
+<cfg:ServiceOrder>
+<cfg:Service>CRL</cfg:Service>
+<cfg:Service>OCSP</cfg:Service>
+</cfg:ServiceOrder>
+<cfg:Archiving>
+<cfg:EnableArchiving>false</cfg:EnableArchiving>
+<cfg:ArchiveDuration>365</cfg:ArchiveDuration>
+<cfg:Archive>
+<cfg:DatabaseArchive>
+<cfg:JDBCURL>jdbc:url</cfg:JDBCURL>
+<cfg:JDBCDriverClassName>fully.qualified.classname</cfg:JDBCDriverClassName>
+</cfg:DatabaseArchive>
+</cfg:Archive>
+</cfg:Archiving>
+</cfg:RevocationChecking>
+</cfg:CertificateValidation>
+</cfg:SignatureVerification>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/spss.config.xml b/spss/handbook/conf/moa-spss/spss.config.xml
new file mode 100644
index 000000000..d792f9478
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/spss.config.xml
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+ <cfg:SignatureCreation>
+ <cfg:KeyModules>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_Kunde1</cfg:Id>
+ <cfg:FileName>keys/customer1/moa-signaturdienst-kunde1[pwd=kunde1].p12</cfg:FileName>
+ <cfg:Password>kunde1</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_Kunde2</cfg:Id>
+ <cfg:FileName>keys/customer2/moa-signaturdienst-kunde2[pwd=kunde2].p12</cfg:FileName>
+ <cfg:Password>kunde2</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>SKM_allgemein</cfg:Id>
+ <cfg:FileName>keys/common/moa-signaturdienst-allekunden[pwd=allekunden].p12</cfg:FileName>
+ <cfg:Password>allekunden</cfg:Password>
+ </cfg:SoftwareKeyModule>
+ </cfg:KeyModules>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_Kunde1</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_Kunde1</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>7</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_Kunde2</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_Kunde2</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>8</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroup>
+ <cfg:Id>KG_allgemein</cfg:Id>
+ <cfg:Key>
+ <cfg:KeyModuleId>SKM_allgemein</cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>9</dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </cfg:KeyGroup>
+ <cfg:KeyGroupMapping>
+ <cfg:KeyGroupId>KG_allgemein</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:KeyGroupMapping>
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>CN=Test CA - Verschl\C3\BCsselung B\C3\BCrger,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>0</dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ <cfg:KeyGroupId>KG_Kunde1</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:KeyGroupMapping>
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>CN=Test CA - Verschl\C3\BCsselung B\C3\BCrger,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>1</dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ <cfg:KeyGroupId>KG_Kunde2</cfg:KeyGroupId>
+ </cfg:KeyGroupMapping>
+ <cfg:XMLDSig>
+ <cfg:CanonicalizationAlgorithm>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</cfg:CanonicalizationAlgorithm>
+ <cfg:DigestMethodAlgorithm>http://www.w3.org/2000/09/xmldsig#sha1</cfg:DigestMethodAlgorithm>
+ </cfg:XMLDSig>
+ </cfg:SignatureCreation>
+ <cfg:SignatureVerification>
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>true</cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>true</cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>certstore</cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>pkix</cfg:DefaultMode>
+ <cfg:TrustAnchor>
+ <cfg:Identification>
+ <dsig:X509IssuerName>CN=A-Trust-nQual-0,OU=A-Trust-nQual-0,O=A-Trust,C=AT</dsig:X509IssuerName>
+ <dsig:X509SerialNumber>536</dsig:X509SerialNumber>
+ </cfg:Identification>
+ <cfg:Mode>chaining</cfg:Mode>
+ </cfg:TrustAnchor>
+ </cfg:ChainingMode>
+ <cfg:TrustProfile>
+ <cfg:Id>Test-Signaturdienste</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>CertifiedSignature</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/certifiedSignature</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>CertifiedSignature+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/certifiedSignature+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature-Qual-Only</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature-qual-only</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>SecureSignature+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/secureSignature+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>IdentityLink</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/identityLink</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ <cfg:TrustProfile>
+ <cfg:Id>IdentityLink+Test</cfg:Id>
+ <cfg:TrustAnchorsLocation>trustProfiles/identityLink+Test</cfg:TrustAnchorsLocation>
+ </cfg:TrustProfile>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>true</cfg:EnableChecking>
+ <cfg:MaxRevocationAge>0</cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>false</cfg:EnableArchiving>
+ <cfg:ArchiveDuration>365</cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>jdbc:url</cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>fully.qualified.classname</cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ </cfg:SignatureVerification>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/ss.minimum.config.xml b/spss/handbook/conf/moa-spss/ss.minimum.config.xml
new file mode 100644
index 000000000..8ab10a994
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/ss.minimum.config.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper-->
+<cfg:MOAConfiguration xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#">
+<cfg:SignatureCreation>
+<cfg:KeyModules>
+<cfg:SoftwareKeyModule>
+<cfg:Id>SKM_Kunde1</cfg:Id>
+<cfg:FileName>keys/customer1/moa-signaturdienst-kunde1(pwd=kunde1).p12</cfg:FileName>
+<cfg:Password>kunde1</cfg:Password>
+</cfg:SoftwareKeyModule>
+</cfg:KeyModules>
+<cfg:KeyGroup>
+<cfg:Id>KG_Kunde1</cfg:Id>
+<cfg:Key>
+<cfg:KeyModuleId>SKM_Kunde1</cfg:KeyModuleId>
+<cfg:KeyCertIssuerSerial>
+<dsig:X509IssuerName>CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+<dsig:X509SerialNumber>7</dsig:X509SerialNumber>
+</cfg:KeyCertIssuerSerial>
+</cfg:Key>
+</cfg:KeyGroup>
+<cfg:KeyGroupMapping>
+<cfg:CustomerId>
+<dsig:X509IssuerName>CN=Test CA - Verschl\C3\BCsselung B\C3\BCrger,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT</dsig:X509IssuerName>
+<dsig:X509SerialNumber>0</dsig:X509SerialNumber>
+</cfg:CustomerId>
+<cfg:KeyGroupId>KG_Kunde1</cfg:KeyGroupId>
+</cfg:KeyGroupMapping>
+<cfg:XMLDSig>
+<cfg:CanonicalizationAlgorithm>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</cfg:CanonicalizationAlgorithm>
+<cfg:DigestMethodAlgorithm>http://www.w3.org/2000/09/xmldsig#sha1</cfg:DigestMethodAlgorithm>
+</cfg:XMLDSig>
+</cfg:SignatureCreation>
+</cfg:MOAConfiguration>
diff --git a/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der
new file mode 100644
index 000000000..c3b3003d9
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12 b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12
new file mode 100644
index 000000000..af524d060
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/server/moa-ssl-server[pwd=server].p12
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore b/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
new file mode 100644
index 000000000..780e58934
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/tomcat/tomcat[pwd=server].keystore
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore b/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
new file mode 100644
index 000000000..b3673b45d
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/sslKeys/tomcat/trustedClients[pwd=clients].keystore
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.TrustSignTest-Enc-01.20011206-20041206.SerNo0450[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.TrustSignTest-Enc-01.20011206-20041206.SerNo0450[CertifiedKeypair].cer
new file mode 100644
index 000000000..836ba3767
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.TrustSignTest-Enc-01.20011206-20041206.SerNo0450[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20021120-20051120.SerNo16f8[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20021120-20051120.SerNo16f8[CertifiedKeypair].cer
new file mode 100644
index 000000000..fc5bd433b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20021120-20051120.SerNo16f8[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20030903-20060903.SerNo4848[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20030903-20060903.SerNo4848[CertifiedKeypair].cer
new file mode 100644
index 000000000..f3cf5e676
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/A-Trust.a-sign-TEST-Premium-Enc-01.20030903-20060903.SerNo4848[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/Stabsstelle.TestCA-Verschluesselung-Buerger.20040518-20100101.SerNo0004[CertifiedKeypair].der b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/Stabsstelle.TestCA-Verschluesselung-Buerger.20040518-20100101.SerNo0004[CertifiedKeypair].der
new file mode 100644
index 000000000..d3c213711
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/Stabsstelle.TestCA-Verschluesselung-Buerger.20040518-20100101.SerNo0004[CertifiedKeypair].der
@@ -0,0 +1,22 @@
+-----BEGIN CERTIFICATE-----
+MIIDljCCAwOgAwIBAgIBBDAJBgUrDgMCHQUAMHQxCzAJBgNVBAYTAkFUMSwwKgYD
+VQQKEyNTdGFic3RlbGxlIElLVC1TdHJhdGVnaWUgZGVzIEJ1bmRlczEeMBwGA1UE
+CxMVVGVjaG5payB1bmQgU3RhbmRhcmRzMRcwFQYDVQQDEw5UZXN0IENBIC0gUm9v
+dDAeFw0wNDA1MTgxMzQ1NTdaFw0wOTEyMzEyMjU5MzBaMIGGMQswCQYDVQQGEwJB
+VDEsMCoGA1UEChMjU3RhYnN0ZWxsZSBJS1QtU3RyYXRlZ2llIGRlcyBCdW5kZXMx
+HjAcBgNVBAsTFVRlY2huaWsgdW5kIFN0YW5kYXJkczEpMCcGA1UEAxQgVGVzdCBD
+QSAtIFZlcnNjaGz8c3NlbHVuZyBC/HJnZXIwgZ8wDQYJKoZIhvcNAQEBBQADgY0A
+MIGJAoGBALmykoSgYUpJiaK5NlC5jTcMQikEIB6kOdS7e82DBbT5G13zQeuiNBA2
+KzLMPMBK62Go+ZV8w94N5cSm2auuempVAHNF80ao9G3wYgK0xOVZXvf/145o8TIw
+StPPckmVPL2OPa8/DIB8tqNjblFxy+XcBnTQMLKaxYSzwA/zULoNAgMBAAGjggEr
+MIIBJzAOBgNVHQ8BAf8EBAMCAcYwEgYDVR0TAQH/BAgwBgEB/wIBADAdBgNVHQ4E
+FgQUjRMKvtgH3PngerFS/Rt+vuEDbLMwXQYDVR0gBFYwVDBSBgwrBgEEAZUSAQID
+AQEwQjBABggrBgEFBQcCAjA0GjJEaWVzZXMgWmVydGlmaWthdCBpc3QgbnVyIGb8
+ciBUZXN0endlY2tlIGdlZWlnbmV0LjA5BgNVHR8EMjAwMC6gLKAqhihodHRwOi8v
+bGFicy5jaW8uZ3YuYXQvdGVtcC9jcmxzL3Jvb3QuY3JsMBQGByooAAoBAQEECQwH
+QktBLUlLVDARBglghkgBhvhCAQEEBAMCAQIwHwYDVR0jBBgwFoAUZWxSwiqQLpxu
+4vk3Op4dYHG46XswCQYFKw4DAh0FAAOBgQAnuY7RPFXLpO2hb3h1B0cy5p861j6E
+eD+c/ZKAGqIh4kh3A65D8Zl90GSv9vV4L03dnN5hc7rm/bwKzDI57/PI2dL0H/S4
+OOl4tt4fZmjN8Xrv3oJxNEa+6AJ8TGCcouc/Eqxnpc0SxkP6UQrA8J8RM/8fk05U
+DAyTZbTQ5wPIhA==
+-----END CERTIFICATE-----
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
new file mode 100644
index 000000000..8c434777e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20040326-20070326.SerNo6632(CertifiedKeypair).cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
new file mode 100644
index 000000000..efa28178e
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-01.20041201-20141201.SerNoe242.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
new file mode 100644
index 000000000..33e776369
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust-nQual-03.20050817-20150817.SerNo016c1e.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
new file mode 100644
index 000000000..b7d4b08a6
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20010427-20040427.SerNo006f[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
new file mode 100644
index 000000000..289fc2198
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0213[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
new file mode 100644
index 000000000..69de75609
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/A-Trust.A-Trust-nQual-01.20011212-20041212.SerNo0218[CertifiedKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/certifiedSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Dr. Waltraut Kotschy.20070119-20120119.SerNo02de1c.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/MOA-Test-CA-Signaturdienste.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/MOA-Test-CA-Signaturdienste.cer
new file mode 100644
index 000000000..424f849a1
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/MOA-Test-CA-Signaturdienste.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink+Test/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der
new file mode 100644
index 000000000..592c96230
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Dr. Waltraut Kotschy-20070119-20120119.SerNo02de1c.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink-signerCerts/Nikolaus_Schwab.20040219-20070219.SerNo5C39.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der
new file mode 100644
index 000000000..376d0753f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/Nikolaus-Schwab-BM-f-Inneres-20040219-20070219.SerNo5c39.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
new file mode 100644
index 000000000..5171276f4
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/identityLink/a-sign-corporate-light-03-20051114-20151114.SerNo01aaed.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.TrustSignTest-Sig-01.20011206-20041206.SerNo0588[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.TrustSignTest-Sig-01.20011206-20041206.SerNo0588[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..28cb48bb0
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.TrustSignTest-Sig-01.20011206-20041206.SerNo0588[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20021120-20051120.SerNo16f9[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20021120-20051120.SerNo16f9[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..28fbdf42f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20021120-20051120.SerNo16f9[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20030903-20060903.SerNo484a[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20030903-20060903.SerNo484a[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..c9da41583
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/A-Trust.a-sign-TEST-Premium-Sig-01.20030903-20060903.SerNo484a[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/Stabsstelle.TestCA_Signatur_Buerger.20040518-20100101.SerNo0003[CertifiedKeypair].der b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/Stabsstelle.TestCA_Signatur_Buerger.20040518-20100101.SerNo0003[CertifiedKeypair].der
new file mode 100644
index 000000000..807fa786c
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/Stabsstelle.TestCA_Signatur_Buerger.20040518-20100101.SerNo0003[CertifiedKeypair].der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature+Test/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-01.20041201-20141201.SerNoE243[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust-Qual-02.20041203-20141203.SerNoE248[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature-qual-only/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
new file mode 100644
index 000000000..f9fef65fc
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-01.20041201-20141201.SerNoE243.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
new file mode 100644
index 000000000..36a442b89
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust-Qual-02.20041203-20141203.SerNoE248.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..d361d919f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011130-20041130.SerNo01f6[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..ad13d7b28
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20011215-20041215.SerNo021e[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..f9f27442b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo0291[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..b6f39e354
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/A-Trust.A-Trust-Qual-01.20020207-20050207.SerNo210d[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
new file mode 100644
index 000000000..3be7b6a06
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/C=AT,O=Hauptverband oesterr. Sozialvers.,CN=Root-CA 1-2045.der
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
new file mode 100644
index 000000000..06b40aa67
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom.A1-Signatur.20040326-20140326.SerNo6646[SecureSignatureKeypair].cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
new file mode 100644
index 000000000..7e9fd5b0b
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20060912-20110912_SerNo027866.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
new file mode 100644
index 000000000..da38ce028
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/secureSignature/mobilkom_A1-Signatur_20070501-20120501_SerNo6650.cer
Binary files differ
diff --git a/spss/handbook/conf/moa-spss/trustProfiles/test/signaturdienst.der b/spss/handbook/conf/moa-spss/trustProfiles/test/signaturdienst.der
new file mode 100644
index 000000000..55707d69f
--- /dev/null
+++ b/spss/handbook/conf/moa-spss/trustProfiles/test/signaturdienst.der
Binary files differ
diff --git a/spss/handbook/handbook.html b/spss/handbook/handbook.html
new file mode 100644
index 000000000..2497d7f70
--- /dev/null
+++ b/spss/handbook/handbook.html
@@ -0,0 +1,6 @@
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; URL=handbook/index.html">
+ </head>
+ <body><p><a href="handbook/index.html">Zum Handbuch ...</a></p></body>
+</html> \ No newline at end of file
diff --git a/spss/handbook/handbook/common/LogoBKA.png b/spss/handbook/handbook/common/LogoBKA.png
new file mode 100644
index 000000000..6a92647fd
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoBKA.png
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg b/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg
new file mode 100644
index 000000000..a5ba135ef
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoa4c.3148x3545.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoa4c.jpg b/spss/handbook/handbook/common/LogoMoa4c.jpg
new file mode 100644
index 000000000..a1102090b
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoa4c.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/LogoMoaBw.jpg b/spss/handbook/handbook/common/LogoMoaBw.jpg
new file mode 100644
index 000000000..5a31e3e15
--- /dev/null
+++ b/spss/handbook/handbook/common/LogoMoaBw.jpg
Binary files differ
diff --git a/spss/handbook/handbook/common/MOA.css b/spss/handbook/handbook/common/MOA.css
new file mode 100644
index 000000000..81e0a3f8d
--- /dev/null
+++ b/spss/handbook/handbook/common/MOA.css
@@ -0,0 +1,300 @@
+body
+{
+ font-family: "Times New Roman", Times, serif;
+ font-size: medium;
+ font-weight: normal;
+ margin-left: 2.5em;
+ margin-right: 2.5em;
+}
+
+p
+{
+ margin-top: 0pt;
+ margin-bottom: 0.5em;
+ text-align: justify
+}
+
+pre
+{
+ font-family: "Courier New", monospace;
+ font-size: 90%;
+ background-color: #cccccc;
+ color: #000000;
+ margin-left:1.5%;
+ margin-right:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+ border: #008000 none;
+}
+
+hr
+{
+ color: #000080;
+ background-color: #000080;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
+}
+
+table.fixedWidth
+{
+ width: 97%;
+ margin-left:1.5%;
+ margin-right:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+
+table.varWidth
+{
+ margin-left:1.5%;
+ margin-top: 1em;
+ margin-bottom: 1em;
+}
+
+th
+{
+ text-align: left;
+}
+
+h1
+{
+ color: #000080;
+ text-align: left;
+ font-size: 167%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h2
+{
+ color: #000080;
+ font-size: 150%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h3
+{
+ color: #000080;
+ font-size: 133%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h4
+{
+ color: #000080;
+ font-size: 116%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h5
+{
+ color: #000080;
+ font-size: 100%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+h6
+{
+ color: #000080;
+ font-size: 83%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal
+}
+
+code
+{
+ font-family: "Courier New", Courier, monospace;
+ font-size: 90%;
+ color: #000000
+}
+
+dd
+{
+ margin-top: 0.8em;
+ margin-bottom: 0.8em;
+ text-align: justify
+
+}
+
+dt
+{
+ margin-top: 0.8em;
+ font-family: Arial, Helvetica, sans-serif;
+ color: #000080
+}
+
+ol
+{
+ margin-top: 0.5em;
+ margin-bottom: 0.5em
+}
+
+ol.alpha
+{
+ list-style-type: lower-alpha
+}
+
+li
+{
+ margin-top: 0.25em;
+ margin-bottom: 0.25em;
+ text-align: justify
+}
+
+a:hover
+{
+ color: #990000
+}
+
+
+.title
+{
+ text-align: left;
+ font-size: 167%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+ margin-top: 0.4em;
+ margin-bottom: 0.4em
+}
+
+.subtitle
+{
+ text-align: left;
+ font-size: 133%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+ margin-top: 0.4em;
+ margin-bottom: 0.4em
+}
+
+.glossaryTerm
+{
+ font-style: italic;
+ color: #006699
+}
+
+.example
+{
+ font-family: "Courier New", monospace;
+ background-color: #CCFFFF;
+ color: #000000;
+ margin: 0pt 0pt;
+ border: #008000 none
+}
+
+.schema
+{
+ font-family: "Courier New", monospace;
+ background-color: #FFFFCC;
+ color: #000000;
+ margin: 0pt 0pt;
+ border: #008000 none
+}
+
+.documentinfo
+{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 100%;
+}
+
+.ol-contents
+{
+ font-size: 100%;
+ margin-top: 0.0em;
+ margin-bottom: 0.0em;
+}
+
+.li-contents
+{
+ font-size: 100%;
+ margin-top: 0.0em;
+ margin-bottom: 0.0em;
+}
+
+.logoTitle
+{
+ text-align: center;
+ font-size: 133%;
+ color: #000080;
+ font-family: Arial, Helvetica, sans-serif;
+}
+
+.logoTable
+{
+ margin-bottom: 0px;
+ margin-left: 0px
+}
+
+.superscript
+{
+ vertical-align: super;
+ font-size: 66%;
+}
+
+.term
+{
+ font-style: italic;
+}
+
+.comment
+{
+ color: #000000;
+ background: #ffff00;
+ font-style: italic
+}
+
+.addedErrata12
+{
+ color: #FF0000;
+ background-color: #FFEEEE;
+ text-decoration: underline
+}
+
+.deletedErrata12
+{
+ color: #999999;
+ background-color: #EEEEEE;
+ text-decoration: line-through
+}
+
+.added12
+{
+ color: #FF0000;
+ text-decoration: underline
+; background-color: #F8F0FF
+}
+
+.deleted12
+{
+ color: #999999;
+ text-decoration: line-through
+; background-color: #f8f0ff
+}
+
+.rfc2119Keyword
+{
+ font-variant: small-caps;
+ font-style: normal;
+}
+
+.remark { font-style: italic}
+
+li.faq
+{
+ margin-top: 1.5em;
+ margin-bottom: 1.5em;
+}
+
+.faq-question
+{
+ color: #000080;
+ font-size: 100%;
+ font-family: Arial, Helvetica, sans-serif;
+ font-weight: normal;
+ margin-bottom: 0.4em;
+}
diff --git a/spss/handbook/handbook/config/MOA-SPSS-config-1.3.xsd b/spss/handbook/handbook/config/MOA-SPSS-config-1.3.xsd
new file mode 100644
index 000000000..1521b4f1b
--- /dev/null
+++ b/spss/handbook/handbook/config/MOA-SPSS-config-1.3.xsd
@@ -0,0 +1,254 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Configuration Schema
+-->
+<xs:schema targetNamespace="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns:config="http://reference.e-government.gv.at/namespace/moaconfig/20021122#" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xs:element name="MOAConfiguration">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Common" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="HardwareCryptoModule" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureCreation" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModules">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="HardwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Name" type="xs:string"/>
+ <xs:element name="SlotId" type="xs:string" minOccurs="0"/>
+ <xs:element name="UserPIN" type="xs:string"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SoftwareKeyModule">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="FileName" type="xs:string"/>
+ <xs:element name="Password" type="xs:string" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroup" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:sequence maxOccurs="unbounded">
+ <xs:element name="Key">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="KeyModuleId" type="xs:token"/>
+ <xs:element name="KeyCertIssuerSerial" type="dsig:X509IssuerSerialType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="KeyGroupMapping" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CustomerId" type="dsig:X509IssuerSerialType" minOccurs="0"/>
+ <xs:element name="KeyGroupId" type="xs:token" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="XMLDSig">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CanonicalizationAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ <xs:element name="DigestMethodAlgorithm" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="CreateTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="CreateSignatureEnvironmentProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="SignatureVerification" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CertificateValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="PathConstruction">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="AutoAddCertificates" type="xs:boolean"/>
+ <xs:element name="UseAuthorityInformationAccess" type="xs:boolean"/>
+ <xs:element name="CertificateStore">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DirectoryStore">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="PathValidation">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ChainingMode">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="DefaultMode" type="config:ChainingModeType"/>
+ <xs:element name="TrustAnchor" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Identification" type="dsig:X509IssuerSerialType"/>
+ <xs:element name="Mode" type="config:ChainingModeType"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="TrustProfile" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="TrustAnchorsLocation" type="xs:anyURI"/>
+ <xs:element name="SignerCertsLocation" type="xs:anyURI" minOccurs="0"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="RevocationChecking">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableChecking" type="xs:boolean"/>
+ <xs:element name="MaxRevocationAge" type="xs:integer"/>
+ <xs:element name="ServiceOrder" minOccurs="0">
+ <xs:complexType>
+ <xs:sequence minOccurs="2" maxOccurs="2">
+ <xs:element name="Service">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="OCSP"/>
+ <xs:enumeration value="CRL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="Archiving">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="EnableArchiving" type="xs:boolean"/>
+ <xs:element name="ArchiveDuration" type="xs:nonNegativeInteger" minOccurs="0"/>
+ <xs:element name="Archive" minOccurs="0">
+ <xs:complexType>
+ <xs:choice>
+ <xs:element name="DatabaseArchive">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="JDBCURL" type="xs:anyURI"/>
+ <xs:element name="JDBCDriverClassName" type="xs:token"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="DistributionPoint" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="CAIssuerDN" type="xs:token"/>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="CRLDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="IndirectCRLIssuer" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ <xs:element name="ReasonCode" minOccurs="0" maxOccurs="unbounded">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="unused"/>
+ <xs:enumeration value="keyCompromise"/>
+ <xs:enumeration value="cACompromise"/>
+ <xs:enumeration value="affiliationChanged"/>
+ <xs:enumeration value="superseded"/>
+ <xs:enumeration value="cessationOfOperation"/>
+ <xs:enumeration value="certificateHold"/>
+ <xs:enumeration value="privilegeWithdrawn"/>
+ <xs:enumeration value="aACompromise"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="OCSPDP">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:choice>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="VerifyTransformsInfoProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="SupplementProfile" type="config:ProfileType" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:simpleType name="ChainingModeType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="chaining"/>
+ <xs:enumeration value="pkix"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="ProfileType">
+ <xs:sequence>
+ <xs:element name="Id" type="xs:token"/>
+ <xs:element name="Location" type="xs:anyURI"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:schema>
diff --git a/spss/handbook/handbook/config/config.html b/spss/handbook/handbook/config/config.html
new file mode 100644
index 000000000..f1097e55a
--- /dev/null
+++ b/spss/handbook/handbook/config/config.html
@@ -0,0 +1,1014 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Konfiguration</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.3</a></p>
+ <p class="subtitle">Konfiguration</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#252;bersicht">&Uuml;bersicht</a></p>
+ <ol>
+ <li><a href="#&#252;bersicht_allgemeines">Allgemeines</a>
+ <ol>
+ <li><a href="#&#252;bersicht_allgemeines_namenskonventionen">Namenskonventionen</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_zentraledatei">Zentrale Konfigurationsdatei</a>
+ <ol>
+ <li><a href="#&#252;bersicht_zentraledatei_aktualisierung">Aktualisierung auf das Format von MOA SP/SS 1.3</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_bekanntmachung">Bekanntmachung der Konfigurationsdatei
+ </a>
+ <ol>
+ <li><a href="#&#252;bersicht_bekanntmachung_laufenderbetrieb">Aktualisierung der Konfiguration im laufenden Betrieb</a></li>
+ </ol>
+ </li>
+ <li><a href="#&#252;bersicht_logging">Konfiguration des Loggings</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter">Konfigurationsparameter</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_allgemein">Allgemeines Parameter</a> <ol>
+ <li><a href="#konfigurationsparameter_allgemein_hardwarecryptomodule">Hardwarebasiertes Kryptographiemodul</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_ss">Parameter f&uuml;r MOA SS</a> <ol>
+ <li><a href="#konfigurationsparameter_ss_keymodules">Schl&uuml;sselspeicher</a> <ol>
+ <li><a href="#konfigurationsparameter_ss_keymodules_hardwarekeymodule">Hardware-Schl&uuml;sselspeicher</a></li>
+ <li><a href="#konfigurationsparameter_ss_keymodules_softwarekeymodule">Software-Schl&uuml;sselspeicher</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_ss_keygroup">Schl&uuml;sselgruppe</a></li>
+ <li><a href="#konfigurationsparameter_ss_keygroupmapping">Zuordnung von Schl&uuml;sselgruppen zu einem
+ Kunden</a></li>
+ <li><a href="#konfigurationsparameter_ss_xmldsig">Parameter f&uuml;r XML-Signaturen</a> </li>
+ <li><a href="#konfigurationsparameter_ss_createtransformsinfoprofile">Profil f&uuml;r Transformationen</a></li>
+ <li><a href="#konfigurationsparameter_ss_createsignatureenvironmentprofile">Profil f&uuml;r Signaturumgebung </a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp">Parameter f&uuml;r MOA SP</a> <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation">Zertifikatsvalidierung</a> <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction">Konstruktion des Zertifikatspfads</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates">Cachen von Zertifikaten</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess">Auswertung der Zertifikatserweiterung <span class="term">Authority Information Access</span></a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore">Lokalisierung des Zertifikatsspeichers</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation">Valdierung des Zertifikatspfads</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode">G&uuml;ltigkeitsmodell f&uuml;r die Zertifikatskettenpr&uuml;fung</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile">Vertrauensprofile</a></li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking">Widerrufspr&uuml;fung</a>
+ <ol>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking">Aktivieren
+ der Widerrufspr&uuml;fung</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage">Maximales Alter der Widerrufsinformation</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder">Reihenfolge der Widerrufsdienste</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving">Archivierung von Widerrufsinformationen</a></li>
+ <li><a href="#konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint">Manuelle
+ Konfiguration von Verteilungspunkten f&uuml;r Widerrufsinformationen</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#konfigurationsparameter_sp_verifytransformsinfoprofile">Profil f&uuml;r Transformationen</a></li>
+ <li><a href="#konfigurationsparameter_sp_supplementprofile">Profil f&uuml;r Erg&auml;nzungsobjekte</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#beispielkonfigurationen">Beispielkonfigurationen</a>
+ <ol>
+ <li><a href="#beispielkonfigurationen_minss">Minimale Konfiguration f&uuml;r MOA SS</a></li>
+ <li><a href="#beispielkonfigurationen_minsp">Minimale Konfiguration f&uuml;r MOA SP</a></li>
+ <li><a href="#beispielkonfigurationen_typspss">Typische Konfiguration f&uuml;r MOA SP/SS</a></li>
+ </ol>
+ </li>
+ </ol>
+ <hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht </h1>
+ <p>Dieses Handbuch beschreibt detailliert die Konfigurationsm&ouml;glichkeiten f&uuml;r MOA SP/SS. Wenn nicht anders angegeben, beziehen sich die Erl&auml;uterungen sowohl auf die Konfiguration des Webservices als auch auf die Konfiguration von MOA SP/SS f&uuml;r den Einsatz als Klassenbibliothek.</p>
+ <h2><a name="&uuml;bersicht_allgemeines" id="&uuml;bersicht_allgemeines"></a>1.1 Allgemeines</h2>
+ <h3><a name="&uuml;bersicht_allgemeines_namenskonventionen" id="&uuml;bersicht_allgemeines_namenskonventionen"></a>1.1.1 Namenskonventionen </h3>
+ <p>Folgende Namenraum-Pr&auml;fixe werden in diesem Handbuch zur Kennzeichnung der Namenr&auml;ume
+ von XML-Elementen verwendet: </p>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <th scope="col">Pr&auml;fix</th>
+ <th scope="col">Namenraum</th>
+ </tr>
+ <tr>
+ <td><code>cfg</code></td>
+ <td><code>http://reference.e-government.gv.at/namespace/moaconfig/20021122#</code></td>
+ </tr>
+ <tr>
+ <td><code>dsig</code></td>
+ <td><code>http://www.w3.org/2000/09/xmldsig#</code></td>
+ </tr>
+ <tr>
+ <td>moa</td>
+ <td><code>http://reference.e-government.gv.at/namespace/moa/20020822#</code></td>
+ </tr>
+ <tr>
+ <td><code>xs</code></td>
+ <td><code>http://www.w3.org/2001/XMLSchema</code></td>
+ </tr>
+ </table>
+ <h2><a name="übersicht_zentraledatei" id="übersicht_zentraledatei"></a>1.2 Zentrale Konfigurationsdatei</h2>
+ <p>Die Konfiguration von MOA SP/SS erfolgt zentral &uuml;ber eine einzige Konfigurationsdatei. Das Format der Konfigurationsdatei ist XML und muss dem Schema <a href="./MOA-SPSS-config-1.3.xsd">MOA-SPSS-config-1.3.xsd</a> entsprechen. <a href="#konfigurationsparameter">Abschnitt 2</a> erl&auml;utert die Konfigurationsm&ouml;glichkeiten im Einzelnen.</p>
+ <h3><a name="&uuml;bersicht_zentraledatei_aktualisierung" id="&uuml;bersicht_zentraledatei_aktualisierung"></a>1.2.1
+ Aktualisierung auf das Format von MOA SP/SS 1.3</h3>
+ <p>Mit dem Wechsel auf Version 1.3 verwendet MOA SP/SS ein neues, &uuml;bersichtlicheres Format f&uuml;r die
+ XML-Konfigurationsdatei. </p>
+ <p>Wenn Sie von einer &auml;lteren Version von MOA SP/SS auf die Version 1.3 wechseln und Ihre bestehende
+ Konfiguration beibehalten wollen, steht Ihnen ein einfaches Kommandozeilenwerkzeug zur Verf&uuml;gung, mit dem
+ Sie Ihre Konfigurationsdatei vom bisherigen auf das neue Format migrieren k&ouml;nnen. </p>
+ <p>Dieses Werkzeug k&ouml;nnen Sie durch Ausf&uuml;hren des Scripts <code>configtool</code> aus dem Verzeichnis
+ <code>tools</code> im MOA-Installationsverzeichnis verwenden:</p>
+ <pre>configtool c:\pfad\zur\konfiguration\config.alt.xml c:\pfad\zur\konfiguration\config.neu.xml</pre>
+ <p>Der erste Parameter f&uuml;r das Script gibt also Pfad und Dateiname der bestehenden, alten Konfigurationsdatei
+ an, der zweite Parameter Pfad und Dateiname f&uuml;r die zu erzeugende Konfigurationsdatei im neuen Format (<span class="remark">Hinweis:
+ Die Beispielpfade beziehen sich auf Windows-Betriebssysteme; f&uuml;r Unix-Betriebssysteme w&auml;hlen Sie bitte sinngem&auml;&szlig;e
+ Pfade.</span>). </p>
+ <h2><a name="übersicht_bekanntmachung" id="übersicht_bekanntmachung"></a>1.3 Bekanntmachung der Konfigurationsdatei</h2>
+ <p>Die zentrale Konfigurationsdatei von MOA SP/SS wird der <span class="term">Java Virtual Machine</span>, in der MOA SP/SS l&auml;uft, durch eine <span class="term">System Property </span> mitgeteilt (wird beim Starten der <span class="term">Java Virtual Machine</span> in der Form <code>-D&lt;name&gt;=&lt;wert&gt;</code> gemacht). Der Name der <span class="term">System Property</span> lautet <code>moa.spss.server.configuration</code>; als Wert der <span class="term">System Property</span> ist der Pfad sowie der Name der Konfigurationsdatei im Dateisystem anzugeben, z.B.</p>
+ <pre>moa.spss.server.configuration=C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/moa-spss.config.xml
+</pre>
+<p>Weitere Informationen zum Bekanntmachen der zentralen Konfigurationsdatei f&uuml;r MOA SP/SS erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_installation_spssdeploy">Abschnitt 2.1.2.3</a> des Installationshandbuchs.</p>
+<h3><a name="übersicht_bekanntmachung_laufenderbetrieb" id="übersicht_bekanntmachung_laufenderbetrieb"></a>1.3.1
+ Aktualisierung der Konfiguration im laufenden Betrieb</h3>
+<p>Wird MOA SP/SS als Webservice eingesetzt, kann durch Aufrufen einer speziellen URL des Webservice ein erneutes Einlesen der Konfigurationsdatei erzwungen werden. Damit ist es m&ouml;glich, &Auml;nderungen an der Konfigurationsdatei vorzunehmen, und diese &Auml;nderungen ohne Neustart des zu Grunde liegenden Servlet Containers in den Betrieb zu &uuml;bernehmen.</p>
+<p>Weitere Informationen zum erneuten Einlesen der Konfigurationsdatei im Webservice-Betrieb erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_installation_changeonthefly">Abschnitt 2.1.2.5</a> des Installationshandbuchs.</p>
+<h2><a name="übersicht_logging" id="übersicht_logging"></a>1.4 Konfiguration des Loggings</h2>
+ <p>MOA SP/SS verwendet als Framework f&uuml;r Logging-Information die Open Source Software <code>log4j</code>. Die Konfiguration der Logging-Information erfolgt nicht direkt durch MOA SP/SS, sondern &uuml;ber eine eigene Konfigurationsdatei, die der <span class="term">Java Virtual Machine</span> durch eine <span class="term">System Property </span> mitgeteilt wird. Der Name der <span class="term">System Property </span> lautet <code>log4j.configuration</code>; als Wert der <span class="term">System Property </span> ist eine URL anzugeben, die auf die <code>log4j</code>-Konfigurationsdatei verweist, z.B.</p>
+ <p>
+ <pre>log4j.configuration=file:/C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/log4j.properties</pre>
+ Weitere Informationen zur Konfiguration des Loggings erhalten Sie in <a href="../install/install.html#webservice_basisinstallation_logging">Abschnitt 2.1.3</a> des Installationshandbuchs.
+<p></p>
+ <h1><a name="konfigurationsparameter"></a>2 Konfigurationsparameter</h1>
+ <p>Nachfolgend werden die verf&uuml;gbaren Konfigurationsparameter der zentralen Konfigurationsdatei im Detail erl&auml;utert. Die Reihenfolge der Abhandlung entspricht der Reihenfolge des vorgeschriebenen Auftretens in der Konfigurationsdatei. F&uuml;r beispielhafte Konfigurationsdateien siehe <a href="#beispielkonfigurationen">Abschnitt 3</a>. </p>
+ <p>Muss der Wert eines Konfigurationsparameters eine URL oder eine Pfadangabe sein, und wird als konkreter Wert eine relative URL bzw. ein relativer Pfad angegeben, so wird diese Angabe relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist.</p>
+ <h2><a name="konfigurationsparameter_allgemein" id="konfigurationsparameter_allgemein"></a>2.1
+ Allgemeine Parameter</h2>
+ <h3><a name="konfigurationsparameter_allgemein_hardwarecryptomodule" id="konfigurationsparameter_allgemein_hardwarecryptomodule"></a>2.1.1 Hardwarebasiertes Kryptographiemodul</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:Common/cfg:HardwareCryptoModule</code></td>
+ </tr>
+ <tr>
+ <td> Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Mit diesem Element wird MOA SP bzw. SS die Verf&uuml;gbarkeit eines Hardware-Kryptographiemoduls
+ mitgeteilt. Wird ein solches Hardware-Kryptographiemodul konfiguriert, versucht MOA SP/SS das
+ Hardware-Kryptographiemodul f&uuml;r die Verifikation des Signaturwerts (MOA SP) bzw. f&uuml;r die Berechnung
+ von Hashwerten (MOA SP und MOA SS) anstatt des standardm&auml;&szlig;ig konfigurierten Software-Kryptographiemoduls
+ zu verwenden. </p>
+ <p>Werden mehrere Hardware-Kryptographiemodule konfiguriert, pr&uuml;ft MOA SP/SS entsprechend
+ der Konfigurationsreihenfolge der Hardware-Kryptographiemodule, ob eines der Module die ben&ouml;tigte
+ Funktion (Hashwertberechnung, Siganturpr&uuml;fung) zur Verf&uuml;gung stellt. Verwendet wird das erste Hardware-Kryptographiemodul,
+ das ide ben&ouml;tigte Funktion zur Verf&uuml;gung stellen kann. </p>
+ <p>Das Element weist bis zu drei Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Name</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der DLL (Windows) oder der Shared-Library (Unix), welche die PKCS#11-Schnittstelle
+ zum Hardware-Kryptographiemodul implementiert; der Wert enth&auml;lt entweder einen Dateinamen
+ mit absoluter Pfadangabe oder einen Dateinamen ohne Pfadangabe. Im letzteren Fall wird der Dateiname
+ relativ zum Suchpfad des Betriebssystems interpretiert. </li>
+ <li>Element <code>cfg:SlotId</code>: Dieses optionale Element vom Typ <code>xs:string</code> gibt
+ des Slot der PKCS#11-Schnittstelle an, &uuml;ber den das Hardware-Kryptographiemodul von MOA
+ SP/SS angesprochen werden soll. Fehlt dieses Attribut, w&auml;hlt MOA SP/SS selbst einen Slot
+ aus der Liste der verf&uuml;gbaren Slots aus. </li>
+ <li>Element <code>cfg:UserPIN</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den PIN-Code zur Freischaltung der Kryptographiefunktionen &uuml;ber die PKCS#11-Schnittstelle
+ des Hardware-Kryptographiemoduls. </li>
+ </ul></td>
+ </tr>
+ </table>
+ <h2><a name="konfigurationsparameter_ss" id="konfigurationsparameter_ss"></a>2.2 Parameter f&uuml;r MOA SS</h2>
+ <h3><a name="konfigurationsparameter_ss_keymodules" id="konfigurationsparameter_ss_keymodules"></a>2.2.1 Schl&uuml;sselspeicher</h3>
+ <h4><a name="konfigurationsparameter_ss_keymodules_hardwarekeymodule" id="konfigurationsparameter_ss_keymodules_hardwarekeymodule"></a>2.2.1.1 Hardware-Schl&uuml;sselspeicher</h4>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft; zumindest ein Hardware- (<code>cfg:HardwareKeyModule</code>) oder
+ Software-Schl&uuml;sselspeicher (<code>cfg:SoftwareKeyModule</code>) muss
+ jedoch vorhanden sein</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird MOA SS die Verf&uuml;gbarkeit eines Hardware-Schl&uuml;sselspeichers mitgeteilt. </p>
+ <p>Das Element weist bis zu vier Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroup</code> auf
+ dieses Konfigurationselement referenziert.</li>
+ <li> Element <code>cfg:Name</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der DLL (Windows) oder der Shared-Library (Unix), welche die PKCS#11-Schnittstelle
+ zum Hardware-Schl&uuml;sselspeicher implementiert; der Wert enth&auml;lt entweder einen Dateinamen
+ mit absoluter Pfadangabe oder einen Dateinamen ohne Pfadangabe. Im letzteren Fall wird der Dateiname
+ relativ zum Suchpfad des Betriebssystems interpretiert. </li>
+ <li>Element <code>cfg:SlotId</code>: Dieses optionale Element vom Typ <code>xs:string</code> gibt des
+ Slot der PKCS#11-Schnittstelle an, &uuml;ber den der Hardware-Schl&uuml;sselspeicher von MOA SS
+ angesprochen werden soll. Fehlt dieses Attribut, w&auml;hlt MOA SS selbst einen Slot aus der Liste
+ der verf&uuml;gbaren Slots aus. </li>
+ <li>Element <code>cfg:UserPIN</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> enth&auml;lt
+ den PIN-Code zur Freischaltung der Schl&uuml;sselverwendung &uuml;ber die PKCS#11-Schnittstelle
+ des Hardware-Schl&uuml;sselspeichers. </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_ss_keymodules_softwarekeymodule" id="konfigurationsparameter_ss_keymodules_softwarekeymodule"></a>2.2.1.2
+ Software-Schl&uuml;sselspeicher</h4>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft; zumindest ein Hardware- (<code>cfg:HardwareKeyModule</code>) oder
+ Software-Schl&uuml;sselspeicher (<code>cfg:SoftwareKeyModule</code>) muss jedoch vorhanden sein</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird MOA SS die Verf&uuml;gbarkeit eines Software-Schl&uuml;sselspeichers in
+ Form einer PKCS#12-Datei mitgeteilt. </p>
+ <p>Das Element weist drei obligatorische Kindelemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses Element vom Typ <code>xs:token</code> enth&auml;lt einen
+ frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroup</code> auf
+ dieses Konfigurationselement referenziert.</li>
+ <li> Element <code>cfg:Filename</code>: Dieses Element vom Typ <code>xs:string</code> enth&auml;lt
+ den Dateinamen der PKCS#12-Datei, die den Software-Schl&uuml;sselspeicher repr&auml;sentiert. Der
+ Wert enth&auml;lt einen Dateinamen mit absoluter oder relativer Pfadangabe. Eine relative Pfadangabe
+ wird von MOA SS relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei
+ gespeichert ist.</li>
+ <li>Element <code>cfg:Password</code>: Dieses Element vom Typ <code>xs:string</code> enth&auml;lt
+ das Passwort zum Entschl&uuml;sseln der Inhalte der PKCS#12-Datei. </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_keygroup" id="konfigurationsparameter_ss_keygroup"></a>2.2.2 Schl&uuml;sselgruppe</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyGroup</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Mit diesem Element wird in MOA SS eine Schl&uuml;sselgruppe definiert. Eine Schl&uuml;sselgruppe
+ ist eine Zusammenfassung von einem oder mehreren privaten Schl&uuml;sseln, die in Hardware- bzw. Softwareschl&uuml;sselspeichern
+ (vergleiche Abschnitte <a href="#konfigurationsparameter_ss_keymodules_hardwarekeymodule">2.2.1.1</a> bzw. <a href="#konfigurationsparameter_ss_keymodules_softwarekeymodule">2.2.1.2</a>)
+ verwaltet werden. Die Schl&uuml;sselgruppe wird vom Kunden von MOA SS &uuml;ber einen eindeutigen Bezeichner
+ im Request zur Signaturerstellung angesprochen. </p>
+ <p>Sinn der Zusammenfassung von mehreren privaten Schl&uuml;sseln zu einer Schl&uuml;sselgruppe ist
+ es, dass MOA SS selbst entscheidet, welcher konkrete Schl&uuml;ssel aus der Schl&uuml;sselgruppe
+ zur Erstellung der Signatur verwendet wird. Durch die somit m&ouml;gliche Parallelisierung (mehrere
+ private Schl&uuml;ssel werden parallel f&uuml;r Anfragen, die auf die gleiche Schl&uuml;sselgruppe
+ referenzieren) l&auml;sst sich der Durchsatz der erstellten Signaturen verbessern. </p>
+ <p>Das Element <code>cfg:SignatureCreation/cfg:KeyGroup</code> hat folgenden Element-Inhalt:</p>
+ <ul>
+ <li>Element <code>cfg:Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Mit Hilfe dieses Identifikators wird im Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> auf
+ dieses Konfigurationselement referenziert. Weiters wird dieser Identifikator im Request zur Erstellung
+ der Signatur verwendet, um die zu verwendende Schl&uuml;sselgruppe anzugeben.</li>
+ <li>Element <code>cfg:Key</code>: Dieses Element muss zumindest einmal vorkommen. Jedes Element beschreibt
+ einen der privaten Schl&uuml;ssel, aus denen sich die Schl&uuml;sselgruppe zusammensetzt. Das Element
+ hat folgenden Element-Inhalt:
+ <ul>
+ <li>Element <code>cfg:KeyModuleId</code>: Dieses Element kommt genau einmal vor. Mit ihm wird
+ auf einen der konfigurierten Hardware- oder Software-Schl&uuml;sselspeicher referenziert.
+ Sein Textinhalt vom Typ <code>xs:token</code> enth&auml;lt den Identifikator des Hardware-
+ oder Software-Schl&uuml;sselspeichers, so wie er in <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule/cfg:Id</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule/cfg:Id</code> festgelegt
+ wurde. </li>
+ <li>Element <code>cfg:KeyCertIssuerSerial</code>: Dieses Element kommt ebenfalls genau einmal
+ vor. Mit ihm wird ein privater Schl&uuml;ssel innerhalb des mit <code>cfg:KeyModuleId</code> ausgew&auml;hlten
+ Schl&uuml;sselspeichers ausgew&auml;hlt (sowohl Hardware- als auch Softwareschl&uuml;sselspeicher
+ k&ouml;nnen ja prinzipiell mehr als nur einen einzigen privaten Schl&uuml;ssel verwalten).
+ Das Element hat folgenden Element-Inhalt:
+ <ul>
+ <li>Element <code>dsig:X509IssuerName</code>: Dieses Element kommt genau einmal vor.
+ Sein Textinhalt vom Typ <code>xs:string</code> enth&auml;lt den Namen des Ausstellers
+ des Zertifikats f&uuml;r den ausgew&auml;hlten privaten Schl&uuml;ssel.</li>
+ <li>Element <code>dsig:X509SerialNumber</code>: Dieses Element kommt genau einmal vor.
+ Sein Textinhalt vom Typ <code>xs:integer</code> enth&auml;lt die Seriennummer des Zertifikats
+ f&uuml;r den ausgew&auml;hlten privaten Schl&uuml;ssel. </li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ </ul>
+ <p>Um auf einfache Weise f&uuml;r alle in Ihren Schl&uuml;sselspeichern enthaltenen privaten Schl&uuml;ssel
+ die jeweiligen Werte f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> zu
+ erhalten, gehen Sie am besten wie folgt vor:</p>
+ <ol>
+ <li>Erfassen Sie in der zentralen Konfigurationsdatei alle Ihre Schl&uuml;sselspeicher mit Hilfe
+ der Konfigurationselemente <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code>. </li>
+ <li>Starten Sie nun - mit bewusst fehlenden <code>cfg:SignatureCreation/cfg:KeyGroup</code> Elementen - den MOA SP/SS Server.
+ Stellen Sie dabei sicher, dass das Log-Level f&uuml;r den Logger <code>moa.spss.server</code> zumindest
+ auf das Niveau <code>info</code> eingestellt ist (Informationen zur Konfiguration des Loggings
+ von MOA SP/SS finden Sie in <a href="../install/install.html#webservice_basisinstallation_logging">Abschnitt
+ 2.1.3</a> des Installationshandbuchs). Im Log-File werden dann alle verf&uuml;gbaren privaten Schl&uuml;ssel
+ an Hand der Werte <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> aufgelistet.
+ Vergleichen Sie den folgenden beispielhaften Auszug:<br>
+ <pre>INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key <br> ID=SKM_Kunde1;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;7
+INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key
+ ID=SKM_allgemein;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;9<br>INFO | 15 15:10:14,737 | moa.spss.server | TID=startup NID=node1 MSG=Key <br> ID=SKM_Kunde2;CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT;8</pre>
+ Der Wert der Eigenschaft <code>ID</code> des Logging-Eintrags gliedert sich in drei Teile:
+ <ol>
+ <li>Der erste Teil enth&auml;lt den Identifikator des Hardware- bzw. Softwareschl&uuml;sselspeichers,
+ so wie er im entsprechenden Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyModules/cfg:HardwareKeyModule</code> bzw. <code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code> erfasst
+ wurde. </li>
+ <li>Der zweite Teil enth&auml;lt nach dem ersten Semikolon den Namen des Ausstellers des Zertifikats
+ f&uuml;r den privaten Schl&uuml;ssel, so wie er in <code>dsig:X509IssuerName</code> ben&ouml;tigt
+ wird. </li>
+ <li>Der dritte Teil enth&auml;lt nach dem zweiten Semikolon die Seriennummer des Zertifikats f&uuml;r
+ den privaten Schl&uuml;ssel, so wie er in <code>dsig:X509SerialNumber</code> ben&ouml;tigt wird. </li>
+ </ol>
+ </li>
+ <li>Erfassen Sie nun mit Hilfe der neu gewonnenen Informationen die Schl&uuml;sselgruppen, die in
+ MOA SS zur Verf&uuml;gung stehen sollen. </li>
+ </ol>
+ <p>Wenn Ihnen f&uuml;r einen privaten Schl&uuml;ssel, den Sie in eine Schl&uuml;sselgruppe aufnehmen
+ wollen, das Zertifikat bekannt ist und es in Form einer DER-kodierten Datei vorliegt, k&ouml;nnen
+ Sie alternativ das Script <code>certtool</code> aus dem Verzeichnis <code>tools</code> im MOA-Installationsverzeichnis
+ verwenden, um zu den Werten f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> zu
+ kommen: </p>
+ <pre>certtool -info &lt;certfilename&gt;</pre> <p><code>&lt;certfilename&gt;</code> enth&auml;lt den Namen der DER-kodierten Zertifikatsdatei, f&uuml;r
+ die die beiden Werte <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code> geliefert
+ werden sollen. Eine beispielhafte Ausgabe des Scripts sieht wie folgt aus: </p>
+ <pre>SubjectDN (RFC2253):
+ CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,O=Stabsstelle IKT-Strategie des Bundes,C=AT
+IssuerDN (RFC2253) :
+ CN=Test CA - Signaturdienste,OU=Technik und Standards,O=Stabstelle IKT-Strategie des Bundes,C=AT<br>Serial Number :
+ 9</pre> <p>Die Werte f&uuml;r <code>IssuerDN (RFC2253)</code> sowie <code>Serial Number</code> entsprechen
+ den Werten f&uuml;r <code>dsig:X509IssuerName</code> und <code>dsig:X509SerialNumber</code>.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_keygroupmapping" id="konfigurationsparameter_ss_keygroupmapping"></a>2.2.3
+ Zuordnung von Schl&uuml;sselgruppen zu Kunden</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:KeyGroupMapping</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> ordnet einem Kunden von MOA SS die ihm zur Verf&uuml;gung
+ stehenden Schl&uuml;sselgruppen zu, indem das den Kunden repr&auml;sentierende SSL-Clientzertifikat
+ mit einer oder mehreren Schl&uuml;sselgruppen assoziiert wird. </p>
+ <p>Das Element hat folgenden Element-Inhalt:</p>
+ <ul>
+ <li>Element <code>cfg:CustomerId</code>: Dieses Element bezeichnet auf eindeutige
+ Weise das den Kunden repr&auml;sentierende SSL-Clientzertifikat. Der Aufbau des Elements enspricht
+ dem Aufbau des Elements <code>cfg:KeyCertIssuerSerial</code> in Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>.
+ Um zu den Werten f&uuml;r Ausstellername und Seriennummer des SSL-Clientzertifikats zu kommen,
+ k&ouml;nnen Sie auch hier das Script <code>certtool</code> (vergleiche Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>)
+ verwenden. </li>
+ <li>Element <code>cfg:KeyGroupId</code>: Dieses Element vom Typ <code>xs:token</code> kommt so oft
+ vor, wie Schl&uuml;sselgruppen
+ einem bestimmten SSL-Clientzertifikat zugeordnet werden sollen, mindestens jedoch einmal. Sein
+ Wert repr&auml;sentiert dem Identifikator der Schl&uuml;sselgruppe, so wie er in <code>cfg:SignatureCreation/cfg:KeyGroup/cfg:Id</code> festgelegt
+ wurde. </li>
+ </ul>
+ <p class="remark">Bitte beachten Sie: F&uuml;r maximal ein Konfigurationselement <code>cfg:SignatureCreation/cfg:KeyGroupMapping</code> kann <code>cfg:CustomerId</code> auch
+ weggelassen werden. Die darin enthaltenen Schl&uuml;sselgruppen stehen dann allen Kunden von MOA
+ SS gleicherma&szlig;en zur Verf&uuml;gung.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_xmldsig" id="konfigurationsparameter_ss_xmldsig"></a>2.2.4 Parameter
+ f&uuml;r XML-Signaturen </h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:XMLDSig/cfg:CanonicalizationAlgorithm</code></td>
+ </tr>
+ <tr>
+ <td> Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Als Inhalt des Elements kann der Kanonisierungs-Algorithmus, der f&uuml;r das Erstellen von XML-Signaturen verwendet werden soll und in der Signatur als Inhalt von <code>dsig:Signature/dsig:SignedInfo/dsig:CanonicalizationMethod</code> aufscheint, spezifiziert werden. Folgende Werte d&uuml;rfen verwendet werden:</p>
+ <p>
+ <pre>http://www.w3.org/TR/2001/REC-xml-c14n-20010315 <br>http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments <br>http://www.w3.org/2001/10/xml-exc-c14n# <br>http://www.w3.org/2001/10/xml-exc-c14n#WithComments </pre>
+ <p></p> <p>Wird das Element nicht angegeben, wird folgender Wert als Default-Wert verwendet:</p>
+ <pre>http://www.w3.org/TR/2001/REC-xml-c14n-20010315 </pre> <p>Für die genaue Bedeutung der Werte siehe die <a href="http://www.w3.org/TR/xmldsig-core/" target="_blank">Spezifikation für XML-Signaturen</a>.</p></td>
+ </tr>
+ </table>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:XMLDSig/cfg:DigestMethodAlgorithm</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Als Inhalt des Elements kann der Digest-Algorithmus, der f&uuml;r das Erstellen von XML-Signaturen verwendet werden soll und in der Signatur als Inhalt von <code>dsig:Signature/dsig:SignedInfo/dsig:Reference/dsig:DigestMethod</code> aufscheint, spezifiziert werden. Folgende Werte d&uuml;rfen verwendet werden:</p>
+ <p>
+ <pre>http://www.w3.org/2000/09/xmldsig#sha1
+</pre>
+ <p></p>
+ <p>Wird das Element nicht angegeben, wird folgender Wert als Default-Wert verwendet:</p>
+ <pre>http://www.w3.org/2000/09/xmldsig#sha1</pre> <p>F&uuml;r die genaue Bedeutung der Werte siehe die <a href="http://www.w3.org/TR/xmldsig-core/" target="_blank">Spezifikation f&uuml;r XML-Signaturen</a>.</p></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_createtransformsinfoprofile" id="konfigurationsparameter_ss_createtransformsinfoprofile"></a>2.2.5 Profil f&uuml;r Transformationen</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:CreateTransformsInfoProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung von vordefinierten Profilen f&uuml;r Transformationen, die im Rahmen
+ einer XML-Signaturerstellung zur Anwendung kommen sollen. Im Request zur XML-Signaturerstellung
+ reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die gesamten Transformationen explizit
+ anzugeben. </p>
+ <p><code>cfg:CreateTransformsInfoProfile</code> enth&auml;lt f&uuml;r ein bestimmtes Datenobjekt
+ f&uuml;r eine zu erstellende XML-Signatur die auf dieses Datenobjekt anzuwendenden Transformationen,
+ sowie allenfalls f&uuml;r die Durchf&uuml;hrung der Transformationen notwendige Erg&auml;nzungsobjekte
+ (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:CreateTransformsInfoProfile</code> weist folgende obligatorische Kindelemene auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt einen frei
+ w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Dieser Identifikator wird im Request zur Erstellung der XML-Signatur verwendet,
+ um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:CreateTransformsInfoProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI
+ wird von MOA SS als File-URI relativ zum Lage jenes Verzeichnisses interpretiert, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Die XML-Datei muss als Wurzelelement das Element<code> moa:CreateTransformsInfoProfile
+ </code>enthalten.</li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_ss_createsignatureenvironmentprofile" id="konfigurationsparameter_ss_createsignatureenvironmentprofile"></a>2.2.6 Profil f&uuml;r Signaturumgebung </h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureCreation/cfg:CreateSignatureEnvironmentProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung von vordefinierten Profilen f&uuml;r die Signaturumgebung,
+ die im Rahmen einer XML-Signaturerstellung zur Anwendung kommen soll. Im Request zur XML-Signaturerstellung
+ reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die Informationen zur Signaturumgebung
+ explizit anzugeben. </p>
+ <p><code>cfg:CreateSignatureEnvironmentProfile</code> enth&auml;lt f&uuml;r eine zu erstellende XML-Signatur,
+ die in ein bereits bestehendes XML-Dokument integriert werden soll, die Stelle, an der die XML-Signatur
+ eingef&uuml;gt werden soll, sowie allenfalls f&uuml;r die Verarbeitung des bestehenden XML-Dokuments
+ notwendige Erg&auml;nzungsobjekte (z.B. ein XML-Schema f&uuml;r das validierende Parsen des bestehenden
+ XML-Dokuments).</p>
+ <p><code>cfg:</code><code>CreateSignatureEnvironmentProfile</code> weist folgende obligatorische Kindelemene
+ auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Erstellung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>CreateSignatureEnvironmentProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SS als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:CreateSignatureEnvironmentProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h2><a name="konfigurationsparameter_sp" id="konfigurationsparameter_sp"></a>2.3
+ Parameter f&uuml;r MOA SP </h2>
+ <h3> <a name="konfigurationsparameter_sp_certificatevalidation" id="konfigurationsparameter_sp_certificatevalidation"></a>2.3.1
+ Zertifikatsvalidierung</h3>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction"></a>2.3.1.1
+ Konstruktion des Zertifikatspfads</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_autoaddcertificates"></a>2.3.1.1.1 Cachen von Zertifikaten </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:AutoAddCertificates</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob Zertifikate, die in einer
+ zu pr&uuml;fenden
+ Signatur enthalten sind bzw. bei der Zertifikatspfaderstellung durch Auswertung der Zertifikatserweiterung <span class="term">Authority
+ Information Access</span> (siehe
+ auch Parameter <code>cfg:UseAuthorityInfoAccess</code>) aus dem Internet geladen werden, automatisch
+ in den lokalen Zertifikatsspeicher (siehe Abschnitt <span class="comment">x.y.z</span>) hinzugef&uuml;gt werden sollen.</p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p>
+ </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_useauthorityinfoaccess"></a>2.3.1.1.2 Auswertung
+ der Zertifikatserweiterung <span class="term">Authority Information Access</span>
+ </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:UseAuthorityInfoAccess</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob die Zertifikatserweiterung <span class="term">Authority
+ Information Access</span> f&uuml;r die Zertifikatspfaderstellung verwendet werden soll. Wird der
+ Wert auf <code>true</code> gesetzt, dann setzt MOA auch den Parameter <code>cfg:AutoAddCertificate</code> automatisch
+ auf <code>true</code> und ignoriert den gegebenenfalls in der Konfigurationsdatei daf&uuml;r gesetzten
+ Wert. </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p></td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore" id="konfigurationsparameter_sp_certificatevalidation_pathconstruction_certificatestore"></a>2.3.1.1.3 Lokalisierung
+ des Zertifikatsspeichers </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction/cfg:CertificateStore/cfg:DirectoryStore/cfg:Location</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:token</code> gibt ein Verzeichnis im lokalen Dateisystem
+ an, das von MOA als lokaler Zertifikatsspeicher verwendet werden soll.
+Zul&auml;ssige Werte f&uuml;r diesen Parameter sind absolute oder relative Pfadangaben, wobei relative Pfadangaben
+als relativ zum Pfad jenes Verzeichnisses interpretiert werden, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Beispiele f&uuml;r zul&auml;ssige Werte lauten:</p>
+ <pre>C:/Programme/apache/tomcat-4.1.30/conf/moa-spss/certstore</pre>
+ <pre>certstore</pre></td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation"></a>2.3.1.2
+ Valdierung des Zertifikatspfads</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation_chainingmode"></a>2.3.1.2.1 G&uuml;ltigkeitsmodell
+ f&uuml;r die Zertifikatskettenpr&uuml;fung</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation/cfg:ChainingMode</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element legt fest, ob MOA SP f&uuml;r die Pr&uuml;fung der G&uuml;ltigkeit
+ einer konstruierten Zertifikatskette das Kettenmodell aus ISIS-MTT oder das Schalenmodell aus dem PKIX
+ RFC 3280 verwenden soll. Es hat folgende Kindelemente:</p>
+ <ul>
+ <li><code>cfg:DefaultMode</code>: Dieses obligatorische Element gibt das Default-Modell f&uuml;r die Pr&uuml;fung
+ der G&uuml;ltigkeit einer konstruierten Zertifikatskette an. G&uuml;ltige Werte sind <code>chaining</code> (Kettenmodell)
+ oder <code>pkix</code> (Schalenmodell). </li>
+ <li><code>cfg:TrustAnchor</code>: Dieses Element kann beliebig oft (auch gar nicht) verwendet
+ werden, um f&uuml;r bestimmte Vertrauensanker (vergleiche n&auml;chsten Parameter <code>cfg:TrustProfile</code>)
+ Ausnahmen vom Default-Modell vorzugeben.
+ Das Element weist folgende Kindelemente auf:
+ <ul>
+ <li><code>cfg:Identification</code>: Dieses obligatorische Element identifiziert den Vertrauensanker,
+ f&uuml;r den ein bestimmtes Modell konfiguriert werden soll. Es entspricht vom Aufbau jenem
+ von <code>cfg:KeyCertIssuerSerial</code> in
+ Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>. Um zu den Werten f&uuml;r
+ Ausstellername und Seriennummer des Vertrauensankers zu kommen, k&ouml;nnen Sie auch hier
+ das Script <code>certtool</code> (vergleiche Abschnitt <a href="#konfigurationsparameter_ss_keygroup">2.2.2</a>)
+ verwenden. </li>
+ <li><code>cfg:Mode</code>: Dieses obligatorische Element vom Typ <code>xs:string</code> gibt
+ jenes Modell an, das von MOA SP f&uuml;r die
+ Pr&uuml;fung von konstruierten Zertifikatsketten zu verwenden ist, die im mittels <code>cfg:Identification/dsig:X509IssuerName</code> und <code>cfg:Identification/dsig:X509SerialNumber</code> angegebenen
+ Vertrauensanker m&uuml;nden. G&uuml;ltige Werte sind <code>chaining</code> (Kettenmodell)
+ oder <code>pkix</code> (Schalenmodell).</li>
+ </ul>
+ </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile" id="konfigurationsparameter_sp_certificatevalidation_pathvalidation_trustprofile"></a>2.3.1.2.2 Vertrauensprofile </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation/cfg:TrustProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>einmal bis unbeschr&auml;nkt oft (zumindest ein Vertrauensprofil muss vorhanden sein) </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:</code><code>TrustProfile</code> wird dazu verwendet, um in MOA SP ein Vertrauensprofil
+ f&uuml;r die Signaturpr&uuml;fung einzurichten. Ein Vertrauensprofil besteht aus einer Menge von Vertrauensankern
+ und einer optionalen Menge von explizit erlaubten Signatorzertifikaten. </p>
+ <p>Ein Vertrauensanker ist ein CA-Zertifikat, das explizit als vertrauensw&uuml;rdig eingestuft wird.
+ MOA SP versucht bei der Konstruktion einer Zertifikatskette, einen Pfad vom Signatorzertifikat bis
+ hin zu einem der konfigurierten Vertrauensanker zu finden. Gelingt dies, wird auch das Signatorzertifikat
+ als vertrauensw&uuml;rdig betrachtet, ansonsten nicht. </p>
+ <p>Wird neben der Menge von Vertrauensankern auch noch eine Menge von explizit erlaubten Signatorzertifikaten
+ angegeben, pr&uuml;ft MOA SP nicht nur, ob sich ein Pfad vom Signatorzertifikat zu einem konfigurierten
+ Vertrauensanker konstruieren l&auml;sst, sondern dar&uuml;ber hinaus auch noch, ob das Signatorzertifikat
+ aus der zu pr&uuml;fenden Signatur in der Menge der explizit erlaubten Signatorzertifikate vorkommt.
+ Explizit erlaubte Signatorzertifikate sollten Sie dann konfigurieren, wenn nicht allen von einer
+ als Vertrauensanker konfigurierten CA ausgestellten Zertifikaten vertraut werden soll, sondern nur
+ ganz bestimmten Zertifikaten dieser CA. </p>
+ <p>In MOA SP k&ouml;nnen beliebig viele solcher Vertrauensprofile konfiguriert werden. Der Kunde von
+ MOA SP gibt im Request zur Signaturpr&uuml;fung an, gegen welches Vertrauensprofil MOA SP die Zertifikatspr&uuml;fung
+ vornehmen soll.</p>
+ <p>Das Element <code>cfg:</code><code>TrustProfile</code> weist folgende Kindelemente
+ auf:</p>
+ <ul>
+ <li><code>Id</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> enth&auml;lt einen
+ frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der XML-Konfigurationsdatei
+ eindeutig sein muss. Dieser Identifikator wird im Request zur Signaturpr&uuml;fung verwendet, um
+ das zu verwendende Vertrauensprofil auszuw&auml;hlen. </li>
+ <li>Element <code>TrustAnchorsLocation</code>: Dieses obligatorische Element vom Typ <code>xs:anyURI </code> enth&auml;lt
+ eine relative oder absolute URL, die ein Verzeichnis im lokalen Dateisystem referenziert.
+ Eine relative URL wird relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale
+ Konfigurationsdatei gespeichert ist. Eine absolute URL muss als Protokoll-Teil <code>file</code> verwenden.
+ Das referenzierte Verzeichnis muss eine oder mehrere DER-kodierte Zertifikatsdateien beinhalten.
+ Jede Zertifikatsdatei repr&auml;sentiert einen Vertrauensanker. </li>
+ <li>Element <code>SignerCertsLocation</code>: Dieses optionale Element vom Typ <code>xs:anyURI </code> enth&auml;lt
+ eine relative oder absolute URL, die ein Verzeichnis im lokalen Dateisystem referenziert. Eine
+ relative URL wird relativ zum Pfad jenes Verzeichnisses interpretiert, in dem die zentrale Konfigurationsdatei
+ gespeichert ist. Eine absolute URL muss als Protokoll-Teil <code>file</code> verwenden. Das referenzierte
+ Verzeichnis muss eine oder mehrere DER-kodierte Zertifikatsdateien beinhalten. Jede Zertifikatsdatei
+ repr&auml;sentiert ein explizit erlaubtes Signatorzertifikat. </li>
+ </ul></td>
+ </tr>
+ </table>
+ <h4><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking"></a>2.3.1.3
+ Widerrufspr&uuml;fung</h4>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_enablechecking"></a>2.3.1.3.1 Aktivieren
+ der Widerrufspr&uuml;fung</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:EnableChecking</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob bei der Zertifikats&uuml;berpr&uuml;fung im Zuge einer Signaturpr&uuml;fung auch der
+ Zertifikatsstatus jedes einzelnen Zertifikats des gebildeten Zertifikatspfads &uuml;berpr&uuml;ft werden
+ soll. </p>
+ <p class="remark">Bitte beachten Sie: Die Widerrufspr&uuml;fung ist ein sehr wichtiger Schritt der
+ Zertifikats&uuml;berpr&uuml;fung und somit der Signaturpr&uuml;fung. Eine Deaktivierung sollte nur
+ in begr&uuml;ndeten Ausnahmef&auml;llen in Erw&auml;gung gezogen werden, z.B. f&uuml;r Testsituationen. </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_maxrevocationage"></a>2.3.1.3.2
+ Maximales Alter der Widerrufsinformation </h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:MaxRevocationAge</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:integer</code> gibt an, wie aktuell eine ggf. lokal
+ gespeicherte Widerrufsinformation sein muss, damit sie von MOA SP als g&uuml;ltig angesehen wird. Ist
+ die lokal gespeicherte Widerrufsinformation nicht aktuell genug, wird sie von MOA SP erneut aus dem
+ Internet geladen.</p>
+ <p>Dieser Parameter wird nur ausgewertet, wenn die Widerrufspr&uuml;fung aktiviert ist (siehe Parameter <code>cfg:EnableChecking</code>). </p>
+ <p>Zul&auml;ssige Werte f&uuml;r diesen Parameter sind ganze Zahlen: </p>
+ <ul>
+ <li>Ein beliebiger negativer Wert bedeutet, dass eine Widerrufsinformation jedes Mal, wenn sie ben&ouml;tigt
+ wird, neu aus dem Internet geladen wird. </li>
+ <li>Der Wert <code>0</code> bedeutet, dass eine Widerrufsinformation dann neu geladen wird, wenn
+ das Datum im Feld <code>nextUpdate</code> der entsprechenden Widerrufsliste bereits &uuml;berschritten
+ ist.</li>
+ <li>Ein positiver Wert gibt gibt die Zeitspanne in Millisekunden an, nach der eine ggf. vorhandene
+ lokale Widerrufsinformation sp&auml;testens durch erneutes Laden aus dem Internet aktualisiert
+ wird.</li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_serviceorder"></a>2.3.1.3.3
+ Reihenfolge der Widerrufsdienste</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:ServiceOrder</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element gibt an, in welcher Reihenfolge MOA SP die Widerrufsdienste f&uuml;r die Pr&uuml;fung des
+ Widerrufs f&uuml;r ein Zertifikat kontaktieren soll, wenn f&uuml;r das Zertifikat mehrere unterschiedliche Widerrufsdienste
+ (CRL, OCSP) verf&uuml;gbar sind. Das Element weist folgendes Kindelement auf: </p>
+ <ul>
+ <li><code>cfg:Service</code>: Dieses Element vom Typ <code>xs:token</code> muss genau zwei mal vorkommen. G&uuml;tlige Werte f&uuml;r den
+ Textinhalt des Elements sind <code>OCSP</code> und <code>CRL</code>. Damit kann entweder die Reihenfolge (CRL, OCSP) oder (OCSP,
+ CRL) festgelegt werden. </li>
+ </ul> <p>Wird das Element nicht angegeben, so lautet die von MOA SP dann verwendete Default-Reihenfolge (CRL,
+ OCSP).</p> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving"></a>2.3.1.3.4
+ Archivierung von Widerrufsinformationen</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:EnableArchiving</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>genau einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Der Inhalt dieses Elements vom Typ <code>xs:boolean</code> gibt an, ob mittlerweile ung&uuml;ltig
+ gewordene (i.e. historische) CRL-Widerrufsinformationen von MOA SP archiviert werden soll. </p>
+ <p>Wird dieser
+ Parameter auf den Wert <code>true</code> gesetzt, muss auch der Parameter <code>cfg:Archive</code> (siehe
+ unten) angegeben werden. Zul&auml;ssige Werte f&uuml;r diesen Parameter sind <code>true</code> oder <code>false</code>.</p> </td>
+ </tr>
+ </table>
+
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:ArchiveDuration</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Dieses Element vom Typ <code>xs:nonNegativeInteger</code> gibt (in Tagen) an, wie lange Widerrufsinformationen
+ von MOA SP archiviert werden m&uuml;ssen. Das Element wird von MOA SP nur dann ausgewertet, wenn der
+ Konfigurationsparameter <code>cfg:EnableArchiving</code> auf
+ true gesetzt ist. </p>
+ <p>Wird das Element nicht angegeben, so verwendet MOA SP den Default-Wert von 365 Tagen.</p> </td>
+ </tr>
+ </table>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td> Name </td>
+ <td><code> cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving/cfg:Archive</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal oder einmal </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>Dieses Element gibt an, welches Archiv MOA SP zur Archivierung von mittlerweile ung&uuml;ltig
+ gewordene (i.e. historische) CRL-Widerrufsinformationen verwenden soll, falls der Konfigurationsparameter <code>cfg:EnableArchiving</code> auf
+ <code>true</code> gesetzt ist. Es muss angegeben werden, wenn der
+ Konfigurationsparameter <code>cfg:EnableArchiving</code> auf true gesetzt ist. Das Element weist folgendes
+ Kindelement auf:</p>
+ <ul>
+ <li><code>cfg:DatabaseArchive</code>: Dieses obligatorische Element dient zur Angabe der notwendigen
+ Informationen f&uuml;r die Benutzung eines datenbankbasierten CRL-Archivs durch MOA SP. Das Datenbankarchiv
+ ist die einzige derzeit unterst&uuml;tzte Archivform. Das Element weist folgende Kindelemente auf:
+ <ul>
+ <li> <code>cfg:JDBCURL</code>: Dieses obligatorische Element vom Typ <code>xs:anyURI</code> gibt
+ die JDBC-URL zu jener Datenbank an, in der MOA historische Widerrufsinformationen archivieren
+ soll. Der genaue Aufbau der JDBC-URL ist abh&auml;ngig von der verwendeten Datenbank. Im Fall von
+ PostgreSQL kann folgende URL verwendet werden:
+ <pre>jdbc:postgresql://&lt;host&gt;/&lt;moadb&gt;?user=&lt;moauser&gt;&amp;amp;password=&lt;moapassword&gt;</pre>
+ <p> Die Platzhalter <code>&lt;host&gt;</code>, <code>&lt;moadb&gt;</code>, <code>&lt;moauser&gt;</code> und <code>&lt;moapassword&gt;</code> m&uuml;ssen
+ dabei an die tats&auml;chlich verwendete Datenbank angepasst werden.</p>
+ <p class="remark"> Bitte beachten Sie: Die Kodierung des Zeichens &quot;&amp;&quot; als "&amp;amp;" ist
+ erforderlich, da es andernfalls zu einem Validierungsfehler beim Parsen der XML-Konfigurationsdatei
+ durch MOA kommen w&uuml;rde.</p>
+ <p class="remark"> Bitte beachten Sie: MOA SP legt eigenst&auml;ndig eine passende Tabelle in der angegebenen
+ Datenbank an und bef&uuml;llt diese dann in weiterer Folge. Der in der JDBC-URL angegebene Benutzer
+ muss mit den dazu passenden Rechten ausgestattet sein. </p>
+ </li>
+ <li><p><code>cfg:JDBCDriverClassName</code>: Dieses obligatorische Element vom Typ <code>xs:token</code> gibt den
+ vollst&auml;ndig
+ qualifizierten Java-Klassennamen des JDBC-Treibers an, der von MOA SP zur Ansprache der f&uuml;r
+ die CRL-Archivierung zu verwendenden Datenbank ben&uuml;tzt werden soll.</p>
+ <p class="remark">Bitte beachten Sie: Informationen zum Anlegen einer Datenbank in postgreSQL finden Sie in <a href="../install/install.html#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">Abschnitt
+ 2.2.2.1</a> des Installationshandbuchs.</p>
+ </li>
+ </ul>
+ </li>
+ </ul> </td>
+ </tr>
+ </table>
+ <h5><a name="konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint" id="konfigurationsparameter_sp_certificatevalidation_revocationchecking_distributionpoint"></a>2.3.1.3.5
+ Manuelle Konfiguration von Verteilungspunkten f&uuml;r Widerrufsinformationen</h5>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:DistributionPoint</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft </td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p> Das Element <code>cfg:</code><code>CRLDistributionPoint</code> kann dazu verwendet werden, manuelle
+ Verteilungspunkte f&uuml;r Widerrufsinformationen einer bestimmten CA zu konfigurieren. </p>
+ <p>Dies macht f&uuml;r veraltete Zertifikate Sinn, die nicht den aktuellen Vorgaben aus dem PKIX RFC 3280 entsprechen und im Zertifikat selbst keine Zertifikatserweiterung mit einem solchen Verteilungspunkt enthalten.</p>
+ <p>Weiters kann diese manuelle Konfiguration verwendet werden, wenn die in einem Zertifikat enthaltenen Verteilungspunkte f&uuml;r eine bestimmte CA durch einen manuellen Eintrag &uuml;berschrieben werden soll (etwa weil die im Zertifikat enthaltenen Verteilungspunkte in Form von ldap-URLs angegeben sind, MOA SP aber der Zugriff auf ldap-URLs per Firewall-Einstellungen untersagt ist; dann k&ouml;nnte man stattdessen manuell eine (lokale) http-URL als Verteilungspunkt angeben, die von MOA SP dann aufgel&ouml;st werden kann). </p>
+ <p>Das Element weist folgende Kind-Elemente auf:</p>
+ <ul>
+ <li>Element <code>cfg:CAIssuerDN</code>: Dieses Element enth&auml;lt als Textinhalt vom Typ <code>xs:string</code> den
+ Namen jener CA, die das Zertifikat ausgestellt hat, dessen Widerruf mit Hilfe des zu konfigurierenden
+ Verteilungspunktes gepr&uuml;ft werden soll. Um zu diesem Wert zu kommen, k&ouml;nnen Sie auch
+ hier das Script <code>certtool</code> (vergleiche Abschnitt<a href="#konfigurationsparameter_ss_keygroup"> 2.2.2</a>)
+ verwenden, in dem Sie es f&uuml;r das Zertifikat anwenden, dessen Widerruf mit Hilfe des zu konfigurierenden
+ Verteilungspunktes gepr&uuml;ft werden soll.</li>
+ <li>Element <code>cfg:CRLDP</code>: Dieses Element verweist auf einen Verteilungspunkt, an dem eine
+ Widerrufsliste abgeholt werden kann. Es weist folgende Kind-Elemente auf:
+ <ul>
+ <li>Element<code> cfg:Location</code>: Der Wert dieses obligatorischen Elements vom Typ<code> xs:anyURI</code> enth&auml;lt
+ die URL f&uuml;r den zu konfigurierenden Verteilungspunkt. Es werden die Protokolle HTTP, HTTPS
+ und LDAP unterst&uuml;tzt.</li>
+ <li>Element<code> cfg:ReasonCode</code>: Dieses Element vom Typ <code>xs:token</code> kann
+ null mal bis unbeschr&auml;nkt
+ oft vorkommen und enth&auml;lt
+ jeweils einen laut PKIX RFC 3280 m&ouml;glichen Grund eines Widerrufs,
+ f&uuml;r
+ welche die &uuml;ber den zu konfigurierenden Verteilungspunkt zu beziehende Widerrufsliste
+ ausgestellt ist. G&uuml;ltige Gr&uuml;nde sind <code>unused</code>, <code>keyCompromise</code>, <code>cACompromise</code>, <code>affiliationChanged</code>, <code>superseded</code>, <code>cessationOfOperation</code>, <code>certificateHold</code>, <code>privilegeWithdrawn</code> und <code>aACompromise</code>.
+ Wird eine Widerrufsliste f&uuml;r mehrere Gr&uuml;nde ausgestellt, muss also das Element <code>cfg:ReasonCode</code> mehrmals
+ angegeben werden. Wird das Element null mal angegeben, gilt der Verteilungspunkt f&uuml;r alle m&ouml;glichen
+ Widerrufsgr&uuml;nde.</li>
+ </ul>
+ </li>
+ <li>Element <code>cfg:OCSPDP</code>: Dieses Element verweist auf einen Verteilungspunkt, an dem die
+ Widerrufsinformation von einem OCSP-Responder bezogen werden kann. Es weist folgendes Kind-Element
+ auf:
+ <ul>
+ <li></li>
+ </ul>
+ Element<code> cfg:Location</code>: Der Wert dieses obligatorischen Elements vom Typ<code> xs:anyURI</code> enth&auml;lt
+ die URL f&uuml;r den zu konfigurierenden Verteilungspunkt. Es werden die Protokolle HTTP, HTTPS und
+ LDAP unterst&uuml;tzt.</li>
+ </ul>
+ <p>Hinweis: Die Elemente <code>cfg:CRLDP</code> bzw. <code>cfg:OSCPDP</code> k&ouml;nnen beliebig oft als Kinder von <code>cfg:CRLDistributionPoint</code> angegeben
+ werden. Die Reihenfolge spielt dabei keine Rolle. Jedenfalls muss aber eines dieser beiden Elemente
+ angegeben werden. </p></td>
+ </tr>
+ </table>
+
+ <h3><a name="konfigurationsparameter_sp_verifytransformsinfoprofile" id="konfigurationsparameter_sp_verifytransformsinfoprofile"></a>2.3.2 Profil f&uuml;r Transformationen</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:VerifyTransformsInfoProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SP erlaubt die Hinterlegung eines vordefinierten Profils f&uuml;r eine erlaubte Transformationsfolge,
+ deren Einhaltung im Rahmen einer XML-Signaturpr&uuml;fung kontrolliert wird. Im Request
+ zur XML-Signaturpr&uuml;fung reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die
+ gesamten Transformationen explizit anzugeben. </p>
+ <p><code>cfg:VerifyTransformsInfoProfile</code> enth&auml;lt f&uuml;r ein bestimmtes Datenobjekt f&uuml;r
+ eine zu pr&uuml;fende XML-Signatur eine
+ f&uuml;r dieses Datenobjekt erlaubte Transformationsfolge, bestehend aus den anzuwendenden Transformationen,
+ sowie allenfalls f&uuml;r die Durchf&uuml;hrung der Transformationen erlaubte implizite Transformationsparameter
+ (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:</code><code>VerifyTransformsInfoProfile</code> weist folgende obligatorische Kindelemene
+ auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Pr&uuml;fung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>VerifyTransformsInfoProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SP als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:VerifyTransformsInfoProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h3><a name="konfigurationsparameter_sp_supplementprofile" id="konfigurationsparameter_sp_supplementprofile"></a>2.3.3 Profil f&uuml;r Erg&auml;nzungsobjekte</h3>
+ <table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <td>Name</td>
+ <td><code>cfg:SignatureVerification/cfg:SupplementProfile</code></td>
+ </tr>
+ <tr>
+ <td>Gebrauch</td>
+ <td>Null mal bis unbeschr&auml;nkt oft</td>
+ </tr>
+ <tr>
+ <td>Erl&auml;uterung</td>
+ <td><p>MOA SS erlaubt die Hinterlegung eines vordefinierten Profils f&uuml;r ein Erg&auml;nzungsobjekt,
+ das im Rahmen einer XML-Signaturpr&uuml;fung verwendet werden soll. Im Request zur XML-Signaturpr&uuml;fung reicht es dann aus, auf dieses Profil zu referenzieren, anstatt die Informationen zur Signaturumgebung
+ explizit anzugeben. </p>
+ <p><code>cfg:SupplementProfile</code> enth&auml;lt f&uuml;r ein Datenobjekt in der zu pr&uuml;fenden
+ XML-Signatur ein allenfalls f&uuml;r die Durchf&uuml;hrung der vorgegebenen Transformationen notwendiges
+ Erg&auml;nzungsobjekt (z.B. einen zu importierenden Stylesheet f&uuml;r eine XSL-Transformation).</p>
+ <p><code>cfg:</code><code>SupplementProfile</code> weist folgende obligatorische Kindelemene auf: </p>
+ <ul>
+ <li>Element<code> Id</code>: Dieses Element<code></code> vom Typ <code>xs:token</code> enth&auml;lt
+ einen frei w&auml;hlbaren Identifikator f&uuml;r dieses Konfigurationselement, der innerhalb der
+ XML-Konfigurationsdatei eindeutig sein muss. Dieser Identifikator wird im Request zur Pr&uuml;fung
+ der XML-Signatur verwendet, um das hinterlegte Profil zu referenzieren (vergleiche Element <code>moa:</code><code>SupplementProfileID</code>). </li>
+ <li>Element<code></code> <code>Location</code>: Dieses Element<code></code> vom Typ <code>xs:anyURI</code> enth&auml;lt
+ den Namen der XML-Datei, die das hinterlegte Profil beinhaltet. Der Wert enth&auml;lt eine relative
+ oder absolute URI. Eine relative URI wird von MOA SP als File-URI relativ zum Lage jenes Verzeichnisses
+ interpretiert, in dem die zentrale Konfigurationsdatei gespeichert ist. Die XML-Datei muss als
+ Wurzelelement das Element<code> moa:SupplementProfile </code>enthalten.</li>
+ </ul></td>
+ </tr>
+ </table>
+ <h1><a name="beispielkonfigurationen"></a>3 Beispielkonfigurationen</h1>
+ <h2><a name="beispielkonfigurationen_minss" id="beispielkonfigurationen_minss"></a>3.1 Minimale Konfiguration f&uuml;r MOA SS</h2>
+ <p>Nachfolgend finden Sie eine zentrale Konfigurationsdatei mit den minimal notwendigen Eintr&auml;gen f&uuml;r
+ den alleinigen Betrieb von MOA SS. Darin sind als Kinder des Wurzelelements <code>cfg:MOAConfiguration</code> folgende
+ Konfigurationselemente enthalten:</p>
+ <ul>
+ <li>Ein Software-Schl&uuml;sselspeicher (<code>cfg:SignatureCreation/cfg:KeyModules/cfg:SoftwareKeyModule</code>);</li>
+ <li>Eine Schl&uuml;sselgruppe (<code>cfg:SignatureCreation/</code><code>cfg:KeyGroup</code>);</li>
+ <li>Eine Zuordnung dieser Schl&uuml;sselgruppe f&uuml;r einen bestimmten Kunden (<code>cfg:SignatureCreation/cfg:KeyGroupMapping</code>). </li>
+ </ul>
+ <p><a href="../../conf/moa-spss/ss.minimum.config.xml">Minimale Konfiguration f&uuml;r MOA SS</a> </p>
+ <h2><a name="beispielkonfigurationen_minsp" id="beispielkonfigurationen_minsp"></a>3.2 Minimale Konfiguration f&uuml;r MOA SP</h2>
+ <p>Nachfolgend finden Sie eine zentrale Konfigurationsdatei mit den minimal notwendigen Eintr&auml;gen f&uuml;r
+ den alleinigen Betrieb von MOA SP. Darin sind als Kinder des Wurzelelements <code>cfg:MOAConfiguration</code> folgende
+ Konfigurationselemente enthalten:</p>
+ <ul>
+ <li>Einstellungen betreffend die Konstruktion des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathConstruction</code>);</li>
+ <li>Einstellungen betreffend die Validierung des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:PathValidation</code>),
+ unter anderem ein Vertrauensprofil (<code>cfg:TrustProfile</code>);</li>
+ <li>Einstellungen betreffend die Widerrufspr&uuml;fung von Zertifikaten des Zertifikatspfades (<code>cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking</code>) . </li>
+ </ul>
+ <p><a href="../../conf/moa-spss/sp.minimum.config.xml">Minimale Konfiguration f&uuml;r MOA SP</a> </p>
+ <h2><a name="beispielkonfigurationen_typspss" id="beispielkonfigurationen_typspss"></a>3.3 Typische Konfiguration f&uuml;r MOA SP/SS</h2>
+ <p>Nachfolgend finden Sie eine typische zentrale Konfigurationsdatei mit Eintr&auml;gen f&uuml;r den kombinierten Betrieb von MOA SP und SS. Diese Datei wird auch als Konfiguration von MOA SP und SS verwendet, die f&uuml;r das Ausf&uuml;hren der Beispiele des <a href="../usage/usage.html">Anwenderhandbuchs</a> notwendig ist.</p>
+ <p><a href="../../conf/moa-spss/spss.config.xml">Typische Konfiguration f&uuml;r MOA SP/SS</a> </p>
+ <p>&nbsp; </p>
+</body>
+</html>
diff --git a/spss/handbook/handbook/faq/faq.html b/spss/handbook/handbook/faq/faq.html
new file mode 100644
index 000000000..74f26e70a
--- /dev/null
+++ b/spss/handbook/handbook/faq/faq.html
@@ -0,0 +1,126 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - FAQ</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.3</a></p>
+ <p class="subtitle">FAQ</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#allgemeines">Allgemeines</a></p>
+ </li>
+ <li>
+ <p><a href="#uebersicht_fragen">&Uuml;bersicht der Fragen </a></p>
+ </li>
+ <li>
+ <p><a href="#antworten">Antworten</a></p>
+ </li>
+ </ol>
+<hr/>
+ <h1><a name="allgemeines"></a>1 Allgemeines</h1>
+ <p> Dieses Dokument enth&auml;lt eine Reihe von h&auml;ufig gestellten Fragen zu Installation, Konfiguration und Verwendung von MOA Serversignatur (SS) und Signaturpr&uuml;fung (SP). </p>
+ <h1><a name="uebersicht_fragen" id="uebersicht_fragen"></a>2 &Uuml;bersicht der Fragen </h1>
+ <h2> Installation</h2>
+ <ol>
+ <li>Beim Starten von MOA SPSS tritt folgende Exception auf: <code>java.lang.ClassCastException: iaik.asn1.structures.Name</code>. Was kann der Fehler sein? [<a href="#installation_1">Zur Antwort</a>]</li>
+ <li>Ich m&ouml;chte MOA SS/SP in einer Umgebung betreiben, die einen Internet-Zugang nur &uuml;ber einen Proxy erlaubt. Funktioniert das? [<a href="#installation_1">Zur Antwort</a>] </li>
+ </ol>
+ <h2>Konfiguration</h2>
+ <ol>
+ <li>Ich m&ouml;chte gerne die CRL-Archivierung von MOA verwenden, m&ouml;chte aber eine andere als die in der Konfiguration erw&auml;hnte postgreSQL-Datenbank verwenden. Geht das? [<a href="#konfiguration_1">Zur Antwort</a>]</li>
+ <li>Ich m&ouml;chte ein Zertifikat (z.B. einer Zwischen-Zertifizierungsstelle) manuell in den internen Zertifikatsspeicher von MOA SP importieren. Wie funktioniert das? [<a href="#konfiguration_2">Zur Antwort</a>]</li>
+ <li>Meine bestehende Konfigurationsdatei funktioniert mit MOA SP/SS 1.3 oder h&ouml;her nicht mehr. Was ist passiert?
+ [<a href="#konfiguration_3">Zur Antwort</a>] </li>
+ </ol>
+ <h2>Verwendung</h2>
+ <ol>
+ <li>Bei der Pr&uuml;fung einer Signatur liefert die Pr&uuml;fung des Zertifikatsstatus den Code 1. Was kann der Fehler sein? [<a href="#verwendung_1">Zur Antwort</a>] </li>
+ </ol>
+ <h1><a name="antworten" id="antworten"></a>3 Antworten</h1>
+ <h2>Installation</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="installation_1"></a>Beim Starten von MOA SPSS tritt folgende Exception auf: <code>java.lang.ClassCastException: iaik.asn1.structures.Name</code>. Was kann der Fehler sein?</div>
+ <p>Auf Grund einer mangelhaften Implementierung in einigen Versionen des JDK 1.3.1 kann es beim Betrieb von MOA zu folgendem Problem kommen: Sun macht in der Implementierung von <code>PKCS7.getCertificate()</code> einen Downcast vom Interface<code> java.security.Principal</code> auf die eigene Implementierung, was zu einer <span class="term">ClassCastException</span> f&uuml;hrt, wenn der JCE-Provider von Sun nicht an erster Stelle in der List der Security-Provider installiert ist. MOA geht nun aber so vor, dass der JCE-Provider des IAIK an die erste Stelle installiert wird, wenn er zum Zeitpunkt der Konfiguration noch nicht installiert war. Wird dann von irgendeinem ClassLoader der jar-Verifier ben&uuml;tzt, wird <code>PKCS7.getCertificate()</code> verwendet, und es kommt zu einer <span class="term">ClassCastException</span>. </p>
+ <p>Wird MOA &uuml;ber die API-Schnittstelle verwendet, ist ein Workaround die manuelle Installation des IAIK-JCE-Providers nach dem Sun JCE-Provider (etwa an die letzte Stelle), bevor die MOA-Konfiguration aufgerufen wird. Bei Verwendung der Webservices ist die M&ouml;glichkeit der statischen Konfiguration der JCE-Provider mittels Angabe in der Datei <code>$JAVA_HOME/jre/lib/security/java.security</code> der einzige bekannte Workaround. Hierzu m&uuml;ssen die Eintr&auml;ge </p>
+ <pre> security.provider.1=sun.security.provider.Sun
+ security.provider.2=com.sun.rsajca.Provider </pre>
+ <p>durch folgenden Eintrag erg&auml;nzt werden:</p>
+ <pre>security.provider.3=iaik.security.provider.IAIK</pre>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="installation_2" id="installation_2"></a>Ich m&ouml;chte MOA SS/SP in einer Umgebung betreiben, die einen Internet-Zugang nur &uuml;ber einen Proxy erlaubt. Funktioniert das?</div>
+ <p>Ja, zumindest f&uuml;r Zugriffe &uuml;ber HTTP. Sie m&uuml;ssen dazu die nachfolgenden JAVA System-Properties setzen:</p>
+ <pre>http.proxyHost=&lt;proxyhost&gt;
+http.proxyPort=&lt;proxyport&gt;
+http.nonProxyHosts=&quot;&lt;exceptionhosts&gt;&quot;</pre>
+ <p><code>&lt;proxyhost&gt;</code> gibt den Namen oder die IP-Adresse des Proxies an.</p>
+ <p><code>&lt;proxyport&gt;</code> gibt den Port des Proxies an.</p>
+ <p><code>&lt;exceptionhosts&gt;</code> enth&auml;lt eine Liste von Rechnernamen, die nicht &uuml;ber den Proxy laufen sollen. Jedenfalls m&uuml;ssen sie hier <code>localhost</code> angeben. Einzelne Namen sind durch eine Pipe (<code>|</code>) zu trennen. Bitte beachten Sie, dass IP-Addressen nicht angegeben werden d&uuml;rfen, sowie die verpflichtend zu verwendenen Anf&uuml;hrungszeichen.<br>
+ </p>
+ </li>
+ </ol>
+ <h2>Konfiguration</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="konfiguration_1" id="konfiguration_1"></a>Ich m&ouml;chte gerne die CRL-Archivierung von MOA verwenden, m&ouml;chte aber eine andere als die in der Konfiguration erw&auml;hnte postgreSQL-Datenbank verwenden. Geht das?</div>
+ <p>Ja, das ist m&ouml;glich. Wenn Sie eine mySQL-Datenbank verwenden m&ouml;chten, sind folgende Ma&szlig;nahmen zu treffen:</p>
+ <ul>
+ <li><a href="http://www.mysql.com/downloads/api-jdbc.html">Laden</a> Sie den mySQL-JDBC-Connector herunter und f&uuml;gen Sie das im Download enthaltene jar-File <code>mysql-connector-java-3.x.x-stable-bin.jar</code> zum Klassenpfad f&uuml;r MOA SPSS hinzu.</li>
+ <li>Geben Sie im MOA-Konfigurationsfile mit Hilfe des generischen Konfigurationsparameters <code>DataBaseArchiveParameter.JDBCUrl</code> eine g&uuml;ltige JDBC-URL zu Ihrer mySQL-Datenbank angeben. Hinweise zum Format dieser URL f&uuml;r mySQL finden Sie <a href="http://www.mysql.com/documentation/connector-j/index.html">hier</a>. </li>
+ </ul>
+ <p>Wenn Sie eine andere Datenbank verwenden m&ouml;chten, beispielsweise Oracle, gehen Sie sinngem&auml;&szlig; wie oben vor und setzen zus&auml;tzlich noch folgenden Schritt:</p>
+ <ul>
+ <li>Geben Sie im MOA-Konfigurationsfile mit Hilfe des generischen Konfigurationsparameters <code>DataBaseArchiveParameter.JDBCDriverClass</code> den vollst&auml;ndig qualifizierten Klassennamen des JDBC-Treibers an, der die Verbindung zu Ihrer Datenbank herstellt. </li>
+ </ul>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="konfiguration_2" id="konfiguration_2"></a>Ich m&ouml;chte ein Zertifikat (z.B. einer Zwischen-Zertifizierungsstelle) manuell in den internen Zertifikatsspeicher von MOA SP importieren. Wie funktioniert das?</div>
+ <p>Sie k&ouml;nnen f&uuml;r diesen Zweck ein mit MOA SP/SS mitgeliefertes Kommandozeilen-Tool verwenden, das Sie im Verzeichnis <code>$MOA_SPSS_INST/tools</code> finden. Wechseln Sie zu diesem Verzeichnis und rufen Sie die Script-Datei <code>certtools.bat</code> bzw. <code>certtools.sh</code> (je nach Betriebssystem) auf. Achten Sie darauf, dass die Umgebungsvariable <code>$JAVA_HOME</code> korrekt gesetzt ist. Die Syntax f&uuml;r dieses Tool lautet:</p>
+ <pre>certtool -add &lt;cert&gt; &lt;store&gt;</pre>
+ <p><code>&lt;cert&gt;</code> bezeichnet dabei Pfad und Dateiname des zu importierenden X509-Zertifikats. Das Zertifikat muss DER-kodiert vorliegen.</p>
+ <p><code>&lt;store&gt;</code> bezeichnet den Pfad des internen Zertifikatsspeichers von MOA SP. Wenn Sie nach der Installationsanleitung vorgegangen sind, lautet dieser Pfad <code>$CATALINA_HOME/conf/moa-spss/certstore</code>.</p>
+ </li>
+ <li class="faq">
+ <div class="faq-question"><a name="konfiguration_3" id="konfiguration_3"></a>
+ Meine bestehende Konfigurationsdatei
+ funktioniert mit MOA SP/SS 1.3 oder h&ouml;her nicht mehr. Was ist passiert?</div>
+ <p>Mit dem Wechsel auf Version 1.3 verwendet MOA SP/SS ein neues, &uuml;bersichtlicheres Format f&uuml;r die
+ XML-Konfigurationsdatei. </p>
+ <p>Wenn Sie von einer &auml;lteren Version von MOA SP/SS auf die Version 1.3 wechseln und Ihre bestehende
+ Konfiguration beibehalten wollen, steht Ihnen ein einfaches Kommandozeilenwerkzeug zur Verf&uuml;gung, mit
+ dem Sie Ihre Konfigurationsdatei vom bisherigen auf das neue Format migrieren k&ouml;nnen.</p>
+ <p>Informationen zur Verwendung des Werkzeugs finden Sie in <a href="../config/config.html#&#252;bersicht_zentraledatei_aktualisierung">Abschnitt 1.2.1</a> des Konfigurationshandbuchs. </p>
+ </li>
+ </ol>
+ <h2>Verwendung</h2>
+ <ol>
+ <li class="faq"><div class="faq-question"><a name="verwendung_1" id="verwendung_1"></a>Bei der Pr&uuml;fung einer Signatur liefert die Pr&uuml;fung des Zertifikatsstatus den Code 1. Was kann der Fehler sein? </div>
+ <p>Dieser Fehlercode bedeutet: Es konnte keine formal korrekte Zertifikatskette vom Signatorzertifikat zu einem vertrauensw&uuml;rdigen Wurzelzertifikat konstruiert werden. Das kann grunds&auml;tzlich eine der beiden folgenden Ursachen haben:</p>
+ <ul>
+ <li>Keines der Zertifikate in der Kette vom Signatorzertifikat bis zu einem selbstsignierten Wurzelzertifikat ist im anzuwendenden <span class="term">TrustProfile</span> enthalten. </li>
+ <li>Die Zertifikatskette konnte nicht bis zu einem im anzuwendenden <span class="term">TrustProfile</span> enthaltenen vertrauensw&uuml;rdigen Zertifikat gebildet werden. </li>
+ </ul>
+ <p>Pr&uuml;fen Sie also zun&auml;chst, ob sie im anzuwendenden <span class="term">TrustProfile</span> ein passendes vertrauensw&uuml;rdiges Zertifikat konfiguriert haben. Das kann beispielsweise das Zertifikat jener CA sein, die das Signatorzertifikat ausgestellt hat, oder aber auch das Zertifikat einer CA weiter oben in der Hierarchie des Zertifizierungsdiensteanbieters, beispielsweise das selbstsignierte Wurzelzertifikat.</p>
+ <p>Wenn diese Pr&uuml;fung das Problem nicht behebt, gelingt des MOA SP vermutlich nicht, ein f&uuml;r die Bildung der Zertifikatskette notwendiges Zertifikat zu lokalisieren. M&ouml;gliche Gr&uuml;nde sowie L&ouml;sungsm&ouml;glichkeiten daf&uuml;r sind:</p>
+ <ul>
+ <li>Das aktuell letzte Zertifikat in der bereits gebildeten Zertifikatskette besitzt zwar die Zertifikatserweiterung <span class="term">AuthorityInformationAccess</span> mit einem Hinweis auf das n&auml;chste Zertifikat der zu bildenden Kette, das darin per URL referenzierte Zertifikat kann jedoch nicht geladen werden. Pr&uuml;fen Sie daher zun&auml;chst, ob MOA SP/SS per HTTP oder LDAP Zugriffe nach au&szlig;en t&auml;tigen darf. </li>
+ <li>Das aktuell letzte Zertifikat in der bereits gebildeten Zertifikatskette besitzt keine Zertifikatserweiterung <span class="term">AuthorityInformationAccess</span> mit einem Hinweis auf das n&auml;chste Zertifikat der zu bildenden Kette, und auch im internen Zertifikatsspeicher von MOA SP ist das n&auml;chste Zertifikat nicht enthalten. Ist Ihnen das n&auml;chste Zertifikat bekannt (z.B. durch manuellen Download von der Webseite des Zertifizierungsdiensteanbieters), k&ouml;nnen Sie es manuell in den internen Zertifikatsspeicher importieren. Eine Anleitung dazu finden Sie <a href="#konfiguration_2">hier</a>. <br>
+ </li>
+ </ul>
+ </li>
+ </ol>
+</body>
+</html>
diff --git a/spss/handbook/handbook/index.html b/spss/handbook/handbook/index.html
new file mode 100644
index 000000000..4fa5728f6
--- /dev/null
+++ b/spss/handbook/handbook/index.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - &Uuml;bersicht</title>
+ <link rel="stylesheet" href="./common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP) </p>
+ <p class="subtitle">&Uuml;bersicht zur Dokumentation der Version 1.2 </p>
+ <hr/>
+ <dl>
+ <dt><a href="./intro/intro.html">Einf&uuml;hrung</a></dt>
+ <dd>&Uuml;bersicht &uuml;ber die beiden Module.</dd>
+ <dt><a href="./install/install.html">Installation</a></dt>
+ <dd>Detaillierte Anleitung f&uuml;r die Installation. </dd>
+ <dt><a href="./config/config.html">Konfiguration</a></dt>
+ <dd>Erl&auml;uterung aller Konfigurationsoptionen sowie Leitfaden f&uuml;r h&auml;ufige Konfigurationsaufgaben.</dd>
+ <dt><a href="./usage/usage.html">Anwendung</a></dt>
+ <dd>Beispiele zur Verwendung der beiden Module.</dd>
+ <dt><a href="./faq/faq.html">FAQ</a></dt>
+ <dd>H&auml;ufig gestellte Fragen zu Installation, Konfiguration und Anwendung. </dd>
+ </dl>
+</body>
+</html>
diff --git a/spss/handbook/handbook/install/install.html b/spss/handbook/handbook/install/install.html
new file mode 100644
index 000000000..eb287ee8a
--- /dev/null
+++ b/spss/handbook/handbook/install/install.html
@@ -0,0 +1,486 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Installation</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.3</a></p>
+ <p class="subtitle">Installation</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#220;bersicht">&Uuml;bersicht</a></p>
+ </li>
+ <li>
+ <p><a href="#webservice">Webservice</a></p>
+ <ol>
+ <li><a href="#webservice_basisinstallation">Basisinstallation</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_einf&#252;hrung">Einf&uuml;hrung</a></li>
+ <li><a href="#webservice_basisinstallation_installation">Installation</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig">Konfiguration von Apache Tomcat</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpconn">Konfiguration des HTTP Connectors</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpsconn">Konfiguration des HTTPS Connectors</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_moaadmin">Einrichten des MOA SP/SS Administrators</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_installation_spssdeploy">Einsatz des MOA SP/SS Webservices in Tomcat</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatconfig_httpsconn">Starten und Stoppen von Tomcat</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_windows">Unter Windows</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_unix">Unter Unix</a></li>
+ <li><a href="#webservice_basisinstallation_installation_tomcatstartstop_verify">Pr&uuml;fen des erfolgreichen Starts</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_installation_changeonthefly">&Auml;nderung der Konfiguration im laufenden Betrieb</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_basisinstallation_logging">Logging</a>
+ <ol>
+ <li><a href="#webservice_basisinstallation_logging_format">Format der Log-Meldungen</a></li>
+ <li><a href="#webservice_basisinstallation_logging_messages">Wichtige Log-Meldungen</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver">Vorgeschalteter Webserver</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis">Microsoft Internet Information Server (MS IIS)</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_jk">Konfiguration von <span class="term">Jakarta mod_jk</span> im MS IIS</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_tomcat">Konfiguration von Tomcat</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_ssl">Konfiguration von SSL</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache">Apache</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_jk">Konfiguration von <span class="term">Jakarta mod_jk</span> im Apache </a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_tomcat">Konfiguration von Tomcat</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_apache_ssl">Konfiguration von SSL mit <span class="term">mod_SSL</span></a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank">Datenbank</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">PostgreSQL</a> <ol>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_benutzer">Anlegen eines Benutzers und einer Datenbank f&uuml;r MOA SP/SS</a></li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_crls">Archivierung von CRLs</a> </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_logging">Logging</a></li>
+ </ol>
+ </li>
+ <li><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_andere">Andere Datenbanken</a> </li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ </ol>
+ <li><a href="#klassenbibliothek">Klassenbibliothek</a>
+ <ol>
+ <li><a href="#klassenbibliothek_basisinstallation">Basisinstallation</a>
+ <ol>
+ <li><a href="#klassenbibliothek_basisinstallation_einfuehrung">Einf&uuml;hrung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_verwendung">Verwendung</a></li>
+ <li><a href="#klassenbibliothek_basisinstallation_logging">Logging</a></li>
+ </ol>
+ </li>
+ <li><a href="#klassenbibliothek_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a></li>
+ </ol>
+ </li>
+ </ol>
+ <ol type="A">
+ <li><a href="#referenzierte_software">Referenzierte Software</a></li>
+ </ol>
+ <hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht</h1>
+ <p> Die Module Signaturpr&uuml;fung (SP) und Serversignatur (SS) sind als plattformunabh&auml;ngige Module ausgelegt, die entweder als Webservice &uuml;ber HTTP bzw. HTTPS oder als Klassenbibliothek &uuml;ber ein API angesprochen werden k&ouml;nnen. Dieses Handbuch beschreibt die Installation der beiden Module als Webservice oder als Klassenbibliothek, sowie die Einrichtung der Systemumgebung.</p>
+ <h1><a name="webservice"></a>2 Webservice </h1>
+ <p>Dieser Abschnitt beschreibt die Installation von MOA SP/SS als Webservice. Im ersten Unterkapitel wird eine minimale Basisinstallation beschrieben. Das zweite Unterkapitel zeigt eine Reihe von optionalen Erweiterungsm&ouml;glichkeiten auf.</p>
+ <h2><a name="webservice_basisinstallation" id="webservice_basisinstallation"></a>2.1 Basisinstallation</h2>
+ <h3><a name="webservice_basisinstallation_einführung" id="webservice_basisinstallation_einführung"></a>2.1.1 Einf&uuml;hrung </h3>
+ <p> Die Basisinstallation des Webservices stellt einerseits die minimalen Anforderungen f&uuml;r den Betrieb von MOA SP/SS als Webservices dar, andererseits dient sie als Ausgangspunkt f&uuml;r optionale <a href="#webservice_erweiterungsm&#246;glichkeiten">Erweiterungsm&ouml;glichkeiten</a>.</p>
+ <p> Folgende Software ist Voraussetzung f&uuml;r die Basisinstallation des Webservices: </p>
+ <ul>
+ <li><a href="#referenziertesoftware">J2SE 1.3.1 SDK oder J2SE 1.4.2 SDK oder J2SE 5.0 SDK </a></li>
+ <li><a href="#referenziertesoftware">Apache Tomcat 4.1.18 oder h&ouml;her </a></li>
+ </ul>
+ <p>In diesem Betriebs-Szenario wird das MOA SP/SS Webservice in Tomcat zum Einsatz gebracht. Tomcat fungiert gleichzeitig als HTTP- und HTTPS-Endpunkt f&uuml;r das MOA SP/SS Webservice. Beide Protokolle werden direkt in Tomcat konfiguriert. Das MOA SP/SS Webservice verwendet Log4j als Logging Toolkit.</p>
+ <h3><a name="webservice_basisinstallation_installation" id="webservice_basisinstallation_installation"></a>2.1.2 Installation</h3>
+ <h4><a name="webservice_basisinstallation_installation_vorbereitung" id="webservice_basisinstallation_installation_vorbereitung"></a>2.1.2.1 Vorbereitung</h4>
+ <p>Die folgenden Schritte dienen der Vorbereitung der Installation.</p>
+ <dl>
+ <dt>Installation von J2SE SDK</dt>
+ <dd>Installieren Sie <a href="#referenziertesoftware">J2SE 1.3.1 SDK</a> oder <a href="#referenziertesoftware">J2SE 1.4.2 SDK</a> oder <a href="#referenziertesoftware">J2SE 5.0 SDK</a> in ein beliebiges Verzeichnis. Wir empfehlen die Installation von <a href="#referenziertesoftware">J2SE 5.0 SDK</a>. Das Wurzelverzeichnis der J2SE SDK Installation wird im weiteren Verlauf als <code>$JAVA_HOME</code> bezeichnet. </dd>
+ <dt>Installation von Apache Tomcat 4.1</dt>
+ <dd> Installieren Sie <a href="#referenziertesoftware">Apache Tomcat 4.1.18</a> oder h&ouml;her in ein Verzeichnis, das keine Leerzeichen im Pfadnamen enth&auml;lt. Wir empfehlen die Installation von <a href="#referenziertesoftware">Apache Tomcat 4.1.31</a>. Verwenden Sie bitte die zu Ihrem J2SE SDK passende Distribution von Tomcat. Das Wurzelverzeichnis der Tomcat-Installation wird im weiteren Verlauf als <code>$CATALINA_HOME</code> bezeichnet.</dd>
+ <dt>Entpacken der MOA SP/SS Webservice Distribution</dt>
+ <dd> Entpacken Sie die Datei <code>moa-spss-1.2.x.zip</code> in ein beliebiges Verzeichnis. Dieses Verzeichnis wird im weiteren Verlauf als <code>$MOA_SPSS_INST</code> bezeichnet. </dd>
+ <dt>Installation der Krypographiebibliotheken von SIC/IAIK</dt>
+ <dd>
+ <p>Die Installation der Kryptographiebibliotheken von <a href="http://jce.iaik.tugraz.at/" target="_blank">SIC/IAIK</a> ist abh&auml;ngig vom eingesetzten J2SE SDK:</p>
+ <dl>
+ <dt>J2SE 1.3.1 SDK</dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis
+
+
+ <code>$MOA_SPSS_INST/ext13</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>.</dd>
+ <dt>J2SE 1.4.2 SDK oder JSE 5.0 SDK </dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis <code>$MOA_SPSS_INST/ext14</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>. Zus&auml;tzlich m&uuml;ssen Sie die Rechtedateien Ihres J2SE 1.4.2 SDK bzw. J2SE 5.0 SDK austauschen. Laden Sie dazu die <span class="term">Unlimited Strength
+
+
+ Jurisdiction Policy Files</span> von der <a href="http://java.sun.com/j2se/1.4.2/download.html" target="_blank">J2SE 1.4.2 SDK Downloadseite</a> bzw. <a href="http://java.sun.com/j2se/1.5.0/download.html">J2SE 5.0 SDK Downloadseite</a> und folgen Sie der darin enthaltenen Installationsanweisung. </dd>
+ </dl>
+ </dd>
+ </dl>
+ <h4><a name="webservice_basisinstallation_installation_tomcatconfig" id="webservice_basisinstallation_installation_tomcatconfig"></a>2.1.2.2 Konfiguration von Apache Tomcat</h4>
+ <p> Die zentrale Konfigurations-Datei von Tomcat ist <code>$CATALINA_HOME/conf/server.xml</code>. Tomcat wird grunds&auml;tzlich mit einer funktionierenden Default-Konfiguration ausgeliefert, die jedoch einiges an Ballast enth&auml;lt und viele Ports offen l&auml;sst. </p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_httpconn" id="webservice_basisinstallation_installation_tomcatconfig_httpconn"></a>2.1.2.2.1 Konfiguration des HTTP Connectors</h5>
+ <p> Die Datei <code>$MOA_SPSS_INST/tomcat/server.xml</code> enth&auml;lt eine minimale Tomcat-Konfiguration, die ausschlie&szlig;lich den Connector f&uuml;r HTTP auf Port 8080 freischaltet. Durch kopieren dieser Datei nach <code>$CATALINA_HOME/conf/server.xml</code> kann Tomcat mit dieser Konfiguration gestartet werden. Wir empfehlen diese Konfiguration nur f&uuml;r F&auml;lle, in denen das MOA SP/SS Webservice in einer abgeschlossenen Netzwerkumgebung betrieben wird. </p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_httpsconn" id="webservice_basisinstallation_installation_tomcatconfig_httpsconn"></a>2.1.2.2.2 Konfiguration des HTTPS Connectors</h5>
+ <p>Wird das MOA SP/SS Webservice in einer nicht abgeschlossenen Umgebung (z.B. Erreichbarkeit &uuml;ber das Internet) betrieben, ist die gegenseitige Identit&auml;tsfeststellung von Kunde und Webservice essentiell: </p>
+ <ul>
+ <li> Nutzt ein Kunde MOA SP, ist es f&uuml;r ihn wichtig, die Identit&auml;t des Webservice eindeutig feststellen zu k&ouml;nnen, denn er vertraut dem Webservice ja die Pr&uuml;fung einer elektronischen Signatur an.</li>
+ <li>Nutzt ein Kunde MOA SS, ist es f&uuml;r ihn wesentlich, dass nur er Zugriff auf die f&uuml;r ihn vom Webservice verwalteten privaten Schl&uuml;ssel hat, um elektronische Signaturen zu erstellen. Das Webservice muss also die Identit&auml;t des Kunden pr&uuml;fen. </li>
+ </ul>
+ <p>Beide Identit&auml;tspr&uuml;fungen k&ouml;nnen mit hoher Qualit&auml;t vorgenommen werden, wenn die Erreichbarkeit des Webservice auf SSL mit Server- (f&uuml;r MOA SP) bzw. Client- und Serverauthentisierung (f&uuml;r MOA SS) eingeschr&auml;nkt wird. </p>
+ <p>F&uuml;r die dazu notwendige Konfiguration kann die im vorigen Abschnitt besprochene minimale Tomcat-Konfiguration als Ausgangspunkt verwendet werden: Zun&auml;chst ist der HTTP Connector abzuschalten (auszukommentieren). Anschlie&szlig;end ist der HTTPS Connector zu konfigurieren. Das Dokument <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/ssl-howto.html">Tomcat SSL Configuration HOW-TO </a> gibt einen guten &Uuml;berblick dazu. Grob zusammengefasst sind folgende Schritte durchzuf&uuml;hren: </p>
+ <ul>
+ <li>Erstellung eines <span class="term">Server-Keystores</span>, der den privaten Schl&uuml;ssel sowie das zugeh&ouml;rige Zertifikat des Webservices enth&auml;lt, mit dem es sich bei Aufbau einer SSL-Verbindung gegen&uuml;ber dem Kunden ausweist.sowie das dazugeh&ouml;rige ZertiServer-Zertifikat enth&auml;lt. Sie k&ouml;nnen diesen Keystore z.B. mit <code>keytool</code> erstellen, einem Programm, das Ihrem J2SE SDK beiliegt.</li>
+ <li>Erstellung eines <span class="term">Client-Keystores</span>, der die Zertifikate aller Kunden des Webservices enth&auml;lt. Nur Kunden des Webservices, die sich beim Aufbau einer SSL-Verbindung gegen&uuml;ber dem Webservice mit einem im <span class="term">Client-Keystore</span> enthaltenen Zertifikat ausweisen, erhalten grunds&auml;tzlich Zugriff zu den Diensten des Webservices (f&uuml;r die Konfiguration, welcher Kunde welche Schl&uuml;ssel von MOA SS verwenden darf, siehe <a href="../config/config.html#konfigurationsparameter_ss_keygroupmapping">Abschnitt 2.2.3 des Konfigurationshandbuchs</a>). Auch dieser Keystore kann z.B. mit <code>keytool</code> erstellt werden. Dieser Keystore ist optional und braucht nur erstellt zu werden, wenn sich die Kunden gegen&uuml;ber dem Webservice authentisieren m&uuml;ssen. </li>
+ <li>Konfiguration des HTTPS Connectors in <code>$CATALINA_HOME/conf/server.xml</code>.</li>
+ </ul>
+ <p>Die Konfiguration des HTTPS Connectors kann entfallen, wenn Tomcat ein Webserver vorgeschaltet ist, und dieser die SSL-Kommunikation mit dem Kunden &uuml;bernimmt (siehe <a href="#webservice_erweiterungsm&#246;glichkeiten_webserver">Abschnitt 2.2.1</a>).</p>
+ <h5><a name="webservice_basisinstallation_installation_tomcatconfig_moaadmin" id="webservice_basisinstallation_installation_tomcatconfig_moaadmin"></a>2.1.2.2.3 Einrichten des MOA SP/SS Administrators </h5>
+ <p>Das MOA SP/SS Webservice kann <span class="term">remote</span> durch den Aufruf einer speziellen URL des Webservices dazu veranlasst werden, seine Konfiguration neu einzulesen (vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_changeonthefly">2.1.2.5</a>). Der Zugriff auf diese URL ist durch eine Passwort-Abfrage gesch&uuml;tzt, und kann nur von Tomcat-Benutzern aufgerufen werden, denen die Tomcat-Benutzer-Rolle <code>moa-admin</code> zugeordnet wurde.</p>
+ <p> Um diese Benutzer-Rolle und einen oder mehrere Benutzer einzurichten, m&uuml;ssen in der Datei <code>$CATALINA_HOME/conf/tomcat-users.xml </code>unter dem Element <code>&lt;tomcat-users&gt;</code> sinngem&auml;&szlig; folgende Eintr&auml;ge hinzugef&uuml;gt werden: </p>
+ <p>
+ <pre>&lt;role rolename="moa-admin"/&gt;
+&lt;user username="moa-chief" password="openSesam" roles="moa-admin"/&gt; </pre>
+<p>Soll der Aufruf dieser URL niemandem erm&ouml;glicht werden, sind die oben beschriebenen Eintr&auml;ge einfach nicht vorzunehmen.</p>
+
+<h4><a name="webservice_basisinstallation_installation_spssdeploy" id="webservice_basisinstallation_installation_spssdeploy"></a>2.1.2.3 Einsatz des MOA SP/SS Webservices in Tomcat</h4>
+<p> Um das MOA SP/SS Webservice in Tomcat f&uuml;r den Einsatz vorzubereiten, sind folgende Schritte notwendig:</p>
+<ul>
+ <li>Die Datei <code>$MOA_SPSS_INST/moa-spss.war</code> enth&auml;lt das einsatzfertige MOA SP/SS Webarchiv und muss ins Verzeichnis <code>$CATALINA_HOME/webapps</code> kopiert werden. Dort wird sie beim ersten Start von Tomcat automatisch ins Verzeichnis <code>$CATALINA_HOME/webapps/ moa-spss</code> entpackt. </li>
+ <li>Die zentrale Konfigurationsdatei f&uuml;r MOA SP/SS und die zugeh&ouml;rigen Profil-Verzeichnisse m&uuml;ssen in ein beliebiges Verzeichnis im Dateisystem kopiert werden (z.B. <code>$CATALINA_HOME/conf/moa-spss</code>). Eine funktionsf&auml;hige Konfiguration, die als Ausgangspunkt f&uuml;r die Konfiguration des MOA SP/SS Webservices dienen kann, finden Sie <a href="../../conf/moa-spss/spss.config.xml">hier</a>. </li>
+ <li>Wird Tomcat unter J2SE 1.4.x SDK oder höher betrieben, müssen die Dateien <code>xalan.jar</code>, <code>xercesImpl.jar</code> und <code>xmlParserAPIs.jar</code> aus dem Verzeichnis <code>$MOA_SPSS_INST/endorsed14</code> in das Tomcat-Verzeichnis <code>$CATALINA_HOME/common/endorsed</code> kopiert werden. Sind gleichnamige Dateien dort bereits vorhanden, m&uuml;ssen sie &uuml;berschrieben werden. Die ggf. in diesem Verzeichnis vorhandene Datei <code>xml-apis.jar</code> muss gel&ouml;scht werden.</li>
+ <li>Folgende <span class="term">System Properties</span> k&ouml;nnen gesetzt werden (wird beim Starten von Tomcat der <span class="term">Java Virtual Machine</span> in der Umgebungsvariablen <code>CATALINA_OPTS</code> in der Form <code>-D&lt;name&gt;=&lt;wert&gt;</code> &uuml;bergeben):
+ <ul>
+ <li id="klein"><code>moa.spss.server.configuration</code>: Pfad und Name der zentralen Konfigurationsdatei f&uuml;r MOA SP/SS. Eine beispielhafte Konfigurationsdatei finden Sie <a href="../../conf/moa-spss/spss.config.xml">hier</a>. Wird ein relativer Pfad angegeben, wird dieser relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert. Ist diese <span class="term">System Property</span> nicht gesetzt, wird automatisch eine im Webarchiv unter <code>WEB-INF/conf</code> enthaltene Default-Konfiguration herangezogen.</li>
+ <li id="klein"><code>log4j.configuration</code>: URL der Log4j Konfigurationsdatei. Eine beispielhafte Log4j-Konfiguration finden Sie <a href="../../conf/moa-spss/log4j.properties">hier</a>. Wird eine relative URL angegeben, wird diese als File-URL relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert. Ist diese <span class="term">System Property</span> nicht gesetzt, wird automatisch eine im Webarchiv unter <code>WEB-INF/classes</code> enthaltene Default-Konfiguration herangezogen.</li>
+ <li id="klein"><code>moa.node.id</code>: Frei w&auml;hlbarer Name des Rechner-Knotens, auf dem MOA SP/SS l&auml;uft. Der Name des Knotens wird bei Log-Ausgaben von MOA SP/SS angef&uuml;hrt und dient zur Unterscheidung mehrerer gleichzeitig betriebener MOA SP/SS Webservice-Instanzen. </li>
+ <li id="klein"><code>javax.net.ssl.trustStore</code>: Pfad und Dateiname des <span class="term">Truststores</span> f&uuml;r vertrauensw&uuml;rdige SSL Client-Zertifikate (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). Ein relativer Pfad werden relativ zum Startverzeichnis der <span class="term">Java Virtual Machine</span> interpretiert.</li>
+ <li id="klein"><code>javax.net.ssl.trustStorePassword</code>: Passwort f&uuml;r den <span class="term">Truststore</span> (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). </li>
+ <li id="klein"><code>javax.net.ssl.trustStoreType</code>: Truststore-Typ (optional; nur, wenn SSL Client-Authentisierung durchgef&uuml;hrt werden soll). Je nach verwendetem Keystore-Typ muss <code>jks</code> (<span class="term">Java Key Store</span>) oder <code>pkcs12</code> (PKCS#12-Datei) angegeben werden.</li>
+ </ul>
+ </li>
+</ul>
+<h4><a name="webservice_basisinstallation_installation_tomcatstartstop" id="webservice_basisinstallation_installation_tomcatstartstop"></a>2.1.2.4 Starten und Stoppen von Tomcat</h4>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_windows" id="webservice_basisinstallation_installation_tomcatstartstop_windows"></a>2.1.2.4.1 Unter Windows</h5>
+<div id="block">
+ <p>Das Verzeichnis <code>$MOA_SPSS_INST/tomcat/win32</code> enth&auml;lt Script-Dateien zum Starten und Stoppen von Tomcat. Vor der erstmaligen Verwendung der Scripts m&uuml;ssen in den ersten Zeilen die Umgebungsvariablen <code>JAVA_HOME</code> (Basisverzeichnis des eingesetzten J2SE SDK) und <code>CATALINA_HOME</code> (Basisverzeichnis der eingesetzten Tomcat-Installation) angepasst werden. Evtl. m&uuml;ssen Sie auch noch die in den Script-Dateien gesetzten, in Abschnitt 2.1.2.3 besprochenen <span class="term">System Properties</span> anpassen. </p>
+</div>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_unix" id="webservice_basisinstallation_installation_tomcatstartstop_unix"></a>2.1.2.4.2 Unter Unix</h5>
+<p>Zun&auml;chst m&uuml;ssen die in Abschnitt 2.1.2.3 besprochenen <span class="term">System Properties</span> mit Hilfe der Umgebungsvariablen <code>CATALINA_OPTS</code> gesetzt sein. Die Datei <code>$MOA_SPSS_INST/tomcat/unix/moa-env.sh</code> enth&auml;lt ein Beispiel daf&uuml;r. Weiters m&uuml;ssen noch die Umgebungsvariablen <code>JAVA_HOME</code> (Basisverzeichnis des eingesetzten J2SE SDK) und <code>CATALINA_HOME</code> (Basisverzeichnis der eingesetzten Tomcat-Installation) angepasst werden.</p>
+<p>Nun kann Tomcat aus seinem Basisverzeichnis mit </p>
+<pre>bin/catalina.sh start</pre>
+gestartet werden. Das Stoppen von Tomcat erfolgt analog mit
+<pre>bin/catalina.sh stop</pre>
+<h5><a name="webservice_basisinstallation_installation_tomcatstartstop_verify" id="webservice_basisinstallation_installation_tomcatstartstop_verify"></a>2.1.2.4.3 Pr&uuml;fen des erfolgreichen Starts </h5>
+<div id="block">
+ <p>Ein erfolgreicher Start des MOA SP/SS Webservices ist an folgender Log-Meldung ersichtlich: <br>
+ </p>
+</div>
+<pre>INFO | 18 10:09:45,155 | main | TID=startup NID=&lt;null&gt; MSG=MOA Konfiguration erfolgreich geladen
+</pre>
+<p>Bei leichten Fehlern in der Konfiguration geben <code>WARN</code> Log-Meldungen unmittelbar davor Aufschluss &uuml;ber fehlerhafte Konfigurations-Eintr&auml;ge.
+ Nach dem Starten von Tomcat steht das MOA SP/SS Webservice f&uuml;r die Server-Signatur und Signatur-Pr&uuml;fung unter den Endpunkten </p>
+<pre>http://&lt;host&gt;:&lt;port&gt;/moa-spss/services/SignatureCreation
+</pre>
+<p>bzw.
+</p>
+<pre>http://&lt;host&gt;:&lt;port&gt;/moa-spss/services/SignatureVerification
+</pre>
+<p>zur Verf&uuml;gung. Die Verf&uuml;gbarkeit des Services k&ouml;nnen Sie einfach &uuml;berpr&uuml;fen, indem Sie die Endpunkte mit einem Web-Browser aufgerufen; dies sollte nach erfolgreichem Start zur Anzeige einer Informationsseite f&uuml;hren. </p>
+<p>Konnte das MOA SP/SS Webservice nicht ordnungsgem&auml;&szlig; gestartet werden, f&uuml;hrt das zu folgender Log-Meldung:</p>
+<pre>FATAL | 18 10:17:03,475 | main | TID=startup NID=&lt;null&gt; <br> MSG=Fehler beim Lesen der MOA Konfiguration: das Service steht nicht zur Verf&uuml;gung
+</pre>
+In diesem Fall geben die <code>WARN</code> bzw. <code>ERROR</code> Log-Meldungen unmittelbar davor Aufschluss &uuml;ber den genaueren Grund.
+<h4><a name="webservice_basisinstallation_installation_changeonthefly" id="webservice_basisinstallation_installation_changeonthefly"></a>2.1.2.5 &Auml;nderung der Konfiguration im laufenden Betrieb </h4>
+<p> Sie k&ouml;nnen die Konfiguration f&uuml;r MOA SP/SS im laufenden Betrieb aktualisieren, in dem Sie mittels eines Web-Browsers folgende URL aufrufen:</p>
+<pre> http://&lt;host&gt;:&lt;port&gt;/moa-spss/ConfigurationUpdate </pre>
+<p>Damit dies funktioniert, muss in der Konfiguration von Tomcat ein spezieller Benutzer sowie eine spezielle Benutzerrolle eingerichtet werden (vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_tomcatconfig_moaadmin">2.1.2.2.3</a>). </p>
+<h3><a name="webservice_basisinstallation_logging" id="webservice_basisinstallation_logging"></a>2.1.3 Logging </h3>
+<p>Das MOA SP/SS Webservice verwendet <a href="#referenziertesoftware">Jakarta Log4j</a> f&uuml;r die Ausgabe von Log-Meldungen am Bildschirm bzw. in Log-Dateien. Log4j bietet zahlreiche Konfigurationsm&ouml;glichkeiten, die ausf&uuml;hrlich im <a href="#referenziertesoftware">Jakarta Log4j</a> Handbuch beschrieben sind. Unter anderem gibt es die M&ouml;glichkeit, folgende Einstellungen vorzunehmen:
+<ul>
+ <li id="klein">
+ <p>Das verwendete Log-Level (<code>DEBUG</code>, <code>INFO</code>, <code>WARN</code>, <code>ERROR</code>, <code>FATAL</code>);</p>
+ </li>
+ <li id="klein">
+ <p>Name und maximale Gr&ouml;&szlig;e der Log-Datei(en);</p>
+ </li>
+ <li id="klein">
+ <p>Das Aussehen der Log-Eintr&auml;ge.</p>
+ </li>
+</ul>
+ <p>Das MOA SP/SS Webservice verwendet folgende Log-Hierarchien: </p>
+<ul>
+ <li>
+ <p><code>moa.spss.server</code> f&uuml;r alle Log-Meldungen aus dem MOA/SPSS Webservice; </p>
+ </li>
+ <li>
+ <p><code>iaik.server</code> f&uuml;r alle Log-Meldungen aus den SIC/IAIK Kryptographie-Modulen. </p>
+ </li>
+</ul>
+ <p>Eine f&uuml;r MOA SP/SS passende Konfigurationsdatei f&uuml;r Log4j finden Sie <a href="../../conf/moa-spss/log4j.properties">hier</a>. Wird diese Datei als Logging-Konfiguration verwendet, so werden alle Log-Meldungen sowohl in die Konsole, als auch in die Datei <code>moa-spss.log</code> geschrieben. </p>
+ <h4><a name="webservice_basisinstallation_logging_format" id="webservice_basisinstallation_logging_format"></a>2.1.3.1 Format der Log-Meldungen</h4>
+ <p> Anhand einer konkreten Log-Meldung wird das Format der MOA SP/SS Log-Meldungen erl&auml;utert: </p>
+ <pre>INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=node1
+ MSG=Starte neue Transaktion: TID=1049225059594-100, Service=SignatureVerification
+</pre>
+<p> Der Wert <code>INFO</code> besagt, dass die Log-Meldung im Log-Level <code>INFO</code> entstanden ist. Folgende Log-Levels existieren:</p>
+ <ul>
+ <li>
+ <p><code>DEBUG</code>: Log-Meldungen im Log-Level <code>DEBUG</code> geben Auskunft &uuml;ber die innere Arbeitsweise des Systems. Sie sind haupts&auml;chlich f&uuml;r Entwickler interessant.</p>
+ </li>
+ <li>
+ <p><code>INFO</code>: Diese Log-Meldungen geben Status-Informationen &uuml;ber den Ablauf des Webservices, wie z.B. &uuml;ber das Einlangen einer neuen Anfrage.</p>
+ </li>
+ <li>
+ <p><code>WARN</code>: Bei der Ausf&uuml;hrung einer Anfrage sind leichte Fehler aufgetreten. Der Ablauf des Webservices ist nicht weiter beeintr&auml;chtigt.</p>
+ </li>
+ <li>
+ <p><code>ERROR</code>: Die Ausf&uuml;hrung einer Anfrage musste abgebrochen werden. Das Webservice ist davon nicht beeintr&auml;chtigt. </p>
+ </li>
+ <li>
+ <p><code>FATAL</code>: Es ist ein Fehler aufgetreten, der den weiteren Betrieb des Webservices nicht mehr erlaubt.</p>
+ </li>
+ </ul>
+ <p>Der n&auml;chste Wert <code>01 21:25:26,540</code> gibt den Zeitpunkt an, zu dem die Log-Meldung generiert wurde (in diesem Fall den 1. Tag im aktuellen Monat, sowie die genaue Uhrzeit). </p>
+ <p> Der Wert <code>Thread-3</code> bezeichnet den Thread, von dem die Anfrage bearbeitet wird.</p>
+ <p> Der Wert von <code>TID</code> gibt die f&uuml;r jede Anfrage eindeutige Transaktions-ID an. Log-Meldungen, die bei der Abarbeitung dieser Anfrage geschrieben werden, enthalten alle einen Hinweis auf die entsprechende Transaktions-ID.</p>
+ <p> Der Wert von <code>NID</code> gibt den Rechner-Knoten an, auf dem das MOA SP/SS Webservice l&auml;uft (bei <code>NID=&lt;null&gt;</code> ist dieser Wert nicht konfiguriert, vergleiche Abschnitt <a href="#webservice_basisinstallation_installation_spssdeploy">2.1.2.3</a>).</p>
+ <p> Der Rest der Zeile einer Log-Meldung ist der eigentliche Text, mit dem das System bestimmte Informationen anzeigt. Im Fehlerfall ist h&auml;ufig ein Java Stack-Trace angef&uuml;gt, der eine genauere Ursachen-Forschung erm&ouml;glicht.</p>
+ <h4> <a name="webservice_basisinstallation_logging_messages" id="webservice_basisinstallation_logging_messages"></a>2.1.3.2 Wichtige Log-Meldungen</h4>
+ <p> Neben den im Abschnitt <a href="#webservice_basisinstallation_installation_tomcatstartstop_verify">2.1.2.4.3</a> beschriebenen Log-Meldungen, die anzeigen, ob das Service ordnungsgem&auml;&szlig; gestartet wurde, geben nachfolgenden Log-Meldungen Aufschluss &uuml;ber die Abarbeitung von Anfragen. </p>
+ <p>Die Entgegennahme einer Anfrage wird angezeigt durch:
+
+ </p>
+ <pre>INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Starte neue Transaktion: TID=1049225059594-100, Service=SignatureVerification
+INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Aufruf von Adresse=127.0.0.1
+INFO | 01 21:25:26,540 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Client-Zertifikat nicht verf&uuml;gbar</pre>
+ <p> Die dritte Log-Meldung besagt, dass f&uuml;r die Abarbeitung dieser Anfrage kein Client-Zertifikat verf&uuml;gbar ist (entweder, weil die Anfrage &uuml;ber HTTP eingelangt ist, oder weil die SSL Client-Authentisierung nicht eingeschaltet ist). Bei erfolgreicher SSL Client-Authentisierung, gibt beispielsweise folgende Log-Meldung Informationen &uuml;ber das Client-Zertifikat aus:
+ <pre>INFO | 12 13:58:08,772 | Thread-10 | TID=1045054687159-2 NID=&lt;null&gt;
+ MSG=Client-Zertifikat: Subject=CN=Testuser, OU=MOA, O=BRZ, L=Vienna, ST=Vienna, C=AT,
+ Serial=1.039.104.204, Issuer=CN=TestCA, OU=MOA, O=BRZ, L=Vienna, ST=Vienna, C=AT</pre>
+ <p>Eine erfolgreich abgearbeitete Anfrage wird angezeigt durch:
+ </p>
+ <pre>INFO | 01 21:25:53,168 | Thread-3 | TID=1049225059594-106 NID=&lt;null&gt;
+ MSG=Anfrage erfolgreich abgearbeitet</pre>
+ <p>Ein Fehler beim Abarbeiten der Anfrage wird angezeigt durch: </p>
+ <pre>INFO | 01 21:25:27,642 | Thread-3 | TID=1049225059594-100 NID=&lt;null&gt;
+ MSG=Fehler beim Abarbeiten der Anfrage</pre>
+ <div id="block">
+ <p>In diesem Fall gibt der mitgeloggte Stacktrace Auskunft &uuml;ber die Art des Fehlers. Der Aufrufer des MOA SP/SS Webservices bekommt einen Fehlercode sowie eine kurze Beschreibung des Fehlers als Antwort zur&uuml;ck. </p>
+ <p> Die Tats&auml;chlich &uuml;bertragenen Anfragen bzw. Antworten werden aus Effizienzgr&uuml;nden nur im Log-Level <code>DEBUG</code> angezeigt. </p>
+ </div>
+ <h2><a name="webservice_erweiterungsmöglichkeiten" id="webservice_erweiterungsmöglichkeiten"></a>2.2 Erweiterungsm&ouml;glichkeiten</h2>
+<p>Ausgehend von der <a href="#webservice_basisinstallation">Basisinstallation</a> k&ouml;nnen die optionalen Erweiterungen, die in den nachfolgenden Abschnitten beschrieben werden, unabh&auml;ngig und in beliebiger Kombination aufgesetzt werden.</p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_webserver" id="webservice_erweiterungsmöglichkeiten_webserver"></a>2.2.1 Vorgeschalteter Webserver</h3>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_webserver_iis" id="webservice_erweiterungsmöglichkeiten_webserver_iis"></a>2.2.1.1 Microsoft Internet Information Server (MS IIS) </h4>
+ <p>Den MOA SP/SS Webservices kann optional ein MS IIS vorgeschaltet sein. In diesem Fall &uuml;bernimmt der MS IIS die HTTP- bzw. HTTPS-Kommunikation mit dem Aufrufer des Webservices. Die Kommunikation zwischen MS IIS und dem in Tomcat eingerichteten MOA SP/SS Webservice wird durch <span class="term">Jakarta mod_jk</span> durchgef&uuml;hrt. Die angef&uuml;hrten Konfigurationsschritte gehen von einer MS IIS Standard-Installation aus.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_jk" id="webservice_erweiterungsmöglichkeiten_webserver_iis_jk"></a>2.2.1.1.1 Konfiguration von <span class="term">Jakarta mod_jk</span> im MS IIS</h5>
+ <p> F&uuml;r die Kommunikation des MS IIS mit dem im Tomcat eingerichteten MOA SP/SS Webservice wird das <span class="term">ISAPI</span>-Modul von <span class="term">Jakarta mod_jk</span> im MS IIS installiert und konfiguriert. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <span class="term"><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/iis.html" target="_blank">mod_jk</a></span><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/jk/iishowto.html"> IIS HowTo</a>. Beispiele f&uuml;r <code>workers.properties</code> und <code>uriworkermap.properties</code> Dateien liegen im Verzeichnis <code>$MOA_SPSS_INST/tomcat</code> bei.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_tomcat" id="webservice_erweiterungsmöglichkeiten_webserver_iis_tomcat"></a>2.2.1.1.2 Konfiguration von Tomcat</h5>
+ <p> Damit Tomcat die Aufrufe entgegennehmen kann, die von MS IIS mittels <span class="term">Jakarta mod_jk</span> weiterleitet werden, muss in <code>$CATALINA_HOME/conf/server.xml</code> der <span class="term">AJP 1.3 Connector</span> aktiviert werden. Im Gegenzug k&ouml;nnen die Konnektoren f&uuml;r HTTP und HTTPS deaktiviert werden. Das geschieht am einfachsten durch Ein- bzw. Auskommentieren der entsprechenden <code>Connector</code> Konfigurations-Elemente in dieser Datei. Die Datei <code>$MOA_SPSS_INST/tomcat/server.mod_jk.xml</code> enth&auml;lt eine Konfiguration, die ausschlie&szlig;lich den Port f&uuml;r den <span class="term">AJP 1.3 Connector</span> offen l&auml;sst.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_iis_ssl" id="webservice_erweiterungsmöglichkeiten_webserver_iis_ssl"></a>2.2.1.1.3 Konfiguration von SSL</h5>
+ <p> Die Dokumentation zum Einrichten von SSL auf dem MS IIS steht nach Installation des IIS unter http://localhost/iisHelp/ oder aber auch auf den Websiten vo Mircrosoft zur Verf&uuml;gung. </p>
+ <h4><a name="webservice_erweiterungsm&ouml;glichkeiten_webserver_apache" id="webservice_erweiterungsm&ouml;glichkeiten_webserver_apache"></a>2.2.1.2 Apache</h4>
+ <p>Den MOA SP/SS Webservices kann ein Apache Webserver vorgeschaltet sein. Das Prinzip funktioniert wie bei MS IIS, auch hier wird <span class="term">Jakarta mod_jk</span> f&uuml;r die Kommunikation zwischen Webserver und Tomcat eingesetzt. Die angef&uuml;hrten Konfigurationsschritte gehen von einer Standard-Installation des Apache Webservers aus und sind ident f&uuml;r die Versionen 1.3.x und 2.0.x.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_jk" id="webservice_erweiterungsmöglichkeiten_webserver_apache_jk"></a>2.2.1.2.1 Konfiguration von <span class="term">Jakarta mod_jk</span> im Apache </h5>
+ <p>Um das MOA-SPSS Webservice hinter einem Apache Webserver zu betreiben, ist die Konfiguration des Apache-Moduls <span class="term">mod_jk</span> erforderlich. Eine detaillierte Installations- und Konfigurationsanleitung gibt das <span class="term"><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/apache.html" target="_blank">mod_jk</a></span><a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/howto/apache.html" target="_blank"> Apache HowTo</a>. Ein Beispiel f&uuml;r eine <code>workers.properties</code> Datei liegt im Verzeichnis <code>$MOA_SPSS_INST/tomcat</code> bei.</p>
+ <p>Um das MOA SP/SS Webservice dem Apache Webserver bekannt zu machen, sind zumindest folgende Eintr&auml;ge im globalen Kontext der Apache-Konfigurationsdatei notwendig:</p>
+ <pre>LoadModule jk_module /usr/lib/apache/mod_jk.so<br>AddModule jk_module<br>JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories<br>JkWorkersFile conf/workers.properties <br>JkMount /moa-spss/* moaworker </pre>
+ <p>Die Pfad- und Dateinamen k&ouml;nnen je nach existierender Apache Installation geringf&uuml;gig variieren.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_tomcat" id="webservice_erweiterungsmöglichkeiten_webserver_apache_tomcat"></a>2.2.1.2.2 Konfiguration von Tomcat</h5>
+ <p>Die Konfiguration von Tomcat ist analog zu Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_webserver_iis_tomcat">2.2.1.1.2</a> durchzuf&uuml;hren.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_webserver_apache_ssl" id="webservice_erweiterungsmöglichkeiten_webserver_apache_ssl"></a>2.2.1.2.2 Konfiguration von SSL mit <span class="term">mod_SSL</span></h5>
+ <p>Apache kann in Verbindung mit <span class="term">mod_SSL</span> als SSL-Endpunkt f&uuml;r das MOA SP/SS Webservice fungieren. In diesem Fall entf&auml;llt die SSL-Konfiguration in Tomcat, da Apache und Tomcat auch im Fall von SSL Daten via <span class="term">mod_jk</span> austauschen. Eine detaillierte Installations- und Konfigurationsanleitung enth&auml;lt die <a href="http://www.modssl.org/docs/" target="_blank">Online-Dokumentation</a> von <span class="term">mod_SSL</span>.</p>
+ <p>Bei der Verwendung von Client-Authentisierung muss darauf geachtet werden, dass <span class="term">mod_ssl</span> die HTTP-Header mit den Informationen &uuml;ber das Client-Zertifikat exportiert. Dies wird durch Angabe der folgenden Option in der Apache-Konfiguration erreicht: </p>
+ <pre>SSLOptions +ExportCertData +StdEnvVars</pre>
+ <p>Je nach vorhandener SSL-Konfiguration des Apache Webservers kann diese Option im globalen Kontext, im Kontext des Virtual Hosts oder im Kontexts eines Verzeichnisses spezifiziert werden.</p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_datenbank" id="webservice_erweiterungsmöglichkeiten_datenbank"></a>2.2.2 Datenbank</h3>
+ <p>Die MOA SP/SS Module k&ouml;nnen eine Datenbank zum Archivieren von Certificate Revocation Lists (CRLs), sowie zum Abspeichern von Log-Meldungen verwenden. In beiden F&auml;llen wird eine installierte und konfigurierte Datenbank vorausgesetzt.</p>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql"></a>2.2.2.1 PostgreSQL</h4>
+ <p>Eine detaillierte &Uuml;bersicht &uuml;ber die Installation und Konfiguration von <span class="term">PostgreSQL</span> gibt die <a href="http://techdocs.postgresql.org/" target="_blank">Online-Dokumentation</a>. </p>
+ <p class="term">Bitte beachten Sie: Eine M&ouml;glichkeit, PostgreSQL unter MS Windows zu installieren, besteht darin, <a href="http://sources.redhat.com/cygwin/" target="_blank">Cygwin</a> mit dem PostgreSQL-Package zu installieren. Alternative Installationsvarianten werden auf <a href="http://techdocs.postgresql.org/guides/Windows" target="_blank">dieser Seite</a> angef&uuml;hrt.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_benutzer" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_benutzer"></a>2.2.2.1.1 Anlegen eines Benutzers und einer Datenbank f&uuml;r MOA SP/SS</h5>
+ <p>Damit die MOA SP/SS Module eine Verbindung zu <span class="term">PostgreSQL</span> aufbauen kann, m&uuml;ssen der Name eines <span class="term">PostgreSQL</span>-Benutzers und einer <span class="term">PostgreSQL</span>-Datenbank bekannt sein. Sollten diese nicht vorhanden sein, kann mit folgenden Kommandos ein Benutzer namens <code>moa</code> und eine Datenbank namens <code>moadb</code> angelegt werden:</p>
+ <pre>createuser -U postgres -d -A -P moa<br>createdb -U moa moadb</pre>
+ <p>Da die MOA SP/SS Module &uuml;ber <span class="term">JDBC</span> mit der Datenbank kommunizieren, ist in der Folge die Angabe einer <span class="term">JDBC</span>-URL notwendig, welche die Verbindungsparameter enth&auml;lt. Wurden der Benutzer und die Datenbank wie im obigen Beispiel angelegt, ist folgende <span class="term">JDBC</span>-URL anzugeben (Annahme: als Passwort f&uuml;r den Benutzer moa wurde moapass gew&auml;hlt):</p>
+ <pre> jdbc:postgresql://host/moadb?user=moa&amp;password=moapass</pre>
+ <p>Die Zeichen <code>jdbc:postgresql://</code> sind unver&auml;nderliche Bestandteile einer <span class="term">PostgreSQL</span> <span class="term">JDBC</span>-URL. <code>host</code> gibt den Rechner an, auf dem <span class="term">PostgreSQL</span> l&auml;uft. <code>moadb</code> identifiziert den Namen der Datenbank. &Uuml;ber die Parameter <code>user=</code> und <code>pass=</code> werden Benutzername und Passwort f&uuml;r den DB-User bekanntgegeben.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_crls" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_crls"></a>2.2.2.1.2 Archivierung von CRLs</h5>
+ <p>Zum Archivieren von CRLs m&uuml;ssen in der MOA SP/SS Konfigurationsdatei die Kinder des Elements <code>cfg:MOAConfiguration/cfg:SignatureVerification/cfg:CertificateValidation/cfg:RevocationChecking/cfg:Archiving</code> entsprechend
+ konfiguriert werden: </p>
+ <ul>
+ <li><code>cfg:EnableArchiving</code> muss auf den Wert <code>true</code> gesetzt sein;</li>
+ <li><code>cfg:ArchiveDuration</code> muss als nichtnegative Ganzzahl die maximale Archivierungsdauer in Tagen enthalten;</li>
+ <li><code>cfg:Archive</code> muss genau ein Element <code>cfg:DatabaseArchive</code> enthalten, das wiederum aus zwei Elementen
+ bestehen muss:
+ <ul>
+ <li><code>cfg:JDBCURL</code> muss eine g&uuml;ltige JDBC-URL enthalten, mit der auf die Datenbank zur Archivierung
+ zugegriffen werden kann (<span class="remark">Hinweis: da es sich hierbei um einen Eintrag
+ in eine XML-Datei handelt, muss das Zeichen <code>&amp;</code> in der in Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql_benutzer">2.2.2.1.1</a> gezeigten
+ JDBC-URL
+ durch die Zeichenfolge <code>&amp;amp;</code> ersetzt werden.</span>);</li>
+ <li><code>cfg:JDBCDriverClassName</code> muss den vollst&auml;ndig qualifizierten Java-Klassennamen des JDBC-Treibers
+ enthalten. </li>
+ </ul>
+ </li>
+ </ul>
+ <p>Vergleiche auch Abschnitt <a href="../config/config.html#konfigurationsparameter_sp_certificatevalidation_revocationchecking_archiving">2.3.1.3.4</a> im
+ Konfigurationshandbuch.</p>
+ <h5><a name="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_logging" id="webservice_erweiterungsmöglichkeiten_datenbank_postgresql_logging"></a>2.2.2.1.3 Logging</h5>
+ <p>F&uuml;r das Logging in eine <span class="term">PostgreSQL</span> Datenbank mittels <span class="term">Jakarta Log4j</span> muss zun&auml;chst eine Tabelle f&uuml;r die Log-Meldungen angelegt werden. Dies kann mit folgendem SQL-Statement erreicht werden:</p>
+ <pre> create table spss_log (log_time timestamp, log_level varchar(5), log_msg text);</pre>
+ <p>Damit <span class="term">Log4j</span> die Log-Meldungen in diese Datenbanktabelle schreibt, muss die <span class="term">Log4j</span>-Konfiguration adaptiert werden. Die mit MOA SP/SS mitgelieferte, beispielhafte <a href="../../conf/moa-spss/log4j.properties">Log4j-Konfiguration</a> enth&auml;lt bereits die notwendigen Eintr&auml;ge f&uuml;r das Logging in eine PostgreSQL Datenbank, die jedoch standardm&auml;&szlig;ig ausgeschaltet sind. </p>
+ <p>Wie beim Caching von CRLs ist auch hier die Angabe einer <span class="term">JDBC</span>-URL notwendig, damit die MOA SP/SS Module eine Verbindung zur Datenbank aufnehmen k&ouml;nnen.</p>
+ <p><span class="remark">Bitte beachten Sie: Bei Tests hat sich das Logging in eine Datenbank mit Jakarta Log4j als Performance-Engpass herausgestellt. Es wird deshalb empfohlen, dieses Feature mit Bedacht einzusetzen.</span></p>
+ <h4><a name="webservice_erweiterungsmöglichkeiten_datenbank_andere" id="webservice_erweiterungsmöglichkeiten_datenbank_andere"></a>2.2.2.2 Andere Datenbanken </h4>
+ <p>&Uuml;ber die generische Anbindung JDBC k&ouml;nnen auch andere Datenbanken f&uuml;r die Archivierung von CRLs bzw. f&uuml;r die Speicherung der Log-Meldungen eingesetzt werden. Hinweise zu bestimmten Datenbanken finden Sie in den <a href="../faq/faq.html">FAQ</a>. </p>
+ <p>Die in Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank_postgresql">2.2.2.1</a> gemachten Angaben zu Archivierung von CRLs bzw. zur Speicherung von Log-Meldungen gelten sinngem&auml;&szlig;. </p>
+ <h3><a name="webservice_erweiterungsmöglichkeiten_hsm" id="webservice_erweiterungsmöglichkeiten_hsm"></a>2.2.3 Hardware Security Module (HSM)</h3>
+ <p>MOA SS kann f&uuml;r die Erstellung von Signaturen auf die Dienste eines HSM zur&uuml;ckgreifen. Voraussetzung daf&uuml;r ist, dass f&uuml;r das HSM eine Implementierung der Schnittstelle PCKS#11 (PKCS#11-Bibliothek) angeboten wird. </p>
+ <p>F&uuml;r die Einbindung des HSM in MOA SS m&uuml;ssen zun&auml;chst die Bibliotheken aus <code>$MOA_SPSS_INST/pkcs11</code> in ein beliebiges Verzeichnis kopiert werden, welches dann in den Libray-Pfad des jeweiligen Betriebssystems aufgenommen werden muss (Windows: Umgebungsvariable <code>PATH</code>; Linux: Umgebungsvariable <code>LD_LIBRARY_PATH</code>). </p>
+ <p>Der Name der f&uuml;r das HSM spezifischen PKCS#11-Bibliothek muss in der Konfigurationsdatei eingetragen werden (vergleiche Abschnitt <a href="../config/config.html#konfigurationsparameter_ss_keymodules_hardwarekeymodule">2.2.1.1</a> des Konfigurationshandbuchs).</p>
+ <h1><a name="klassenbibliothek"></a>3 Klassenbibliothek</h1>
+ <p>Dieser Abschnitt beschreibt die Verwendung von MOA SP/SS als Klassenbibliothek. Im ersten Unterkapitel wird eine minimale Basisinstallation beschrieben. Das zweite Unterkapitel zeigt eine Reihe von optionalen Erweiterungsm&ouml;glichkeiten auf.</p>
+ <h2><a name="klassenbibliothek_basisinstallation" id="klassenbibliothek_basisinstallation"></a>3.1 Basisinstallation</h2>
+ <h3><a name="klassenbibliothek_basisinstallation_einfuehrung" id="klassenbibliothek_basisinstallation_einfuehrung"></a>3.1.1 Einf&uuml;hrung </h3>
+ <p>Die Basisinstallation der Klassenbibliothek stellt einerseits die minimalen Anforderungen f&uuml;r den Einsatz von MOA SP/SS als Klassenbibliothek dar, andererseits dient sie als Ausgangspunkt f&uuml;r optionale Erweiterungsm&ouml;glichkeiten.</p>
+ <p> Folgende Software ist Voraussetzung f&uuml;r die Basisinstallation der Klassenbibliothek: </p>
+ <ul>
+ <li><a href="#referenziertesoftware">J2SE 1.3.1 JRE</a> oder <a href="#referenziertesoftware">J2SE 1.4.2 JRE</a> oder <a href="#referenziertesoftware">J2SE 5.0 JRE</a> </li>
+ </ul>
+ <h3><a name="klassenbibliothek_basisinstallation_vorbereitung" id="klassenbibliothek_basisinstallation_vorbereitung"></a>3.1.2 Vorbereitung </h3>
+ <p>Die folgenden Schritte dienen der Vorbereitung der Installation.</p>
+ <dl>
+ <dt>Installation von J2SE SDK</dt>
+ <dd>Installieren Sie <a href="#referenziertesoftware">J2SE 1.3.1 SDK</a> oder <a href="#referenziertesoftware">J2SE 1.4.2 SDK</a> oder <a href="#referenziertesoftware">J2SE 5.0 SDK</a> in ein beliebiges Verzeichnis. Wir empfehlen die Installation von <a href="#referenziertesoftware">J2SE 5.0 SDK</a>. Das Wurzelverzeichnis der J2SE SDK Installation wird im weiteren Verlauf als <code>$JAVA_HOME</code> bezeichnet. </dd>
+ <dt>Entpacken der MOA SP/SS Klassenbibliotheks-Distribution</dt>
+ <dd> Entpacken Sie die Datei <code>moa-spss-1.2.x-lib.zip</code> in ein beliebiges Verzeichnis. Dieses Verzeichnis wird im weiteren Verlauf als <code>$MOA_SPSS_INST</code> bezeichnet. </dd>
+ <dt>Installation der Krypographiebibliotheken von SIC/IAIK</dt>
+ <dd>
+ <p>Die Installation der Kryptographiebibliotheken von <a href="http://jce.iaik.tugraz.at/" target="_blank">SIC/IAIK</a> ist abh&auml;ngig vom eingesetzten J2SE SDK:</p>
+ <dl>
+ <dt>J2SE 1.3.1 SDK</dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis <code>$MOA_SPSS_INST/ext13</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>.</dd>
+ <dt>J2SE 1.4.2 SDK oder JSE 5.0 SDK </dt>
+ <dd>Kopieren Sie alle Dateien aus dem Verzeichnis <code>$MOA_SPSS_INST/ext14</code> in das Verzeichnis <code>$JAVA_HOME/jre/lib/ext</code>. Zus&auml;tzlich m&uuml;ssen Sie die Rechtedateien Ihres J2SE 1.4.2 SDK bzw. J2SE 5.0 SDK austauschen. Laden Sie dazu die <span class="term">Unlimited Strength Jurisdiction Policy Files</span> von der <a href="http://java.sun.com/j2se/1.4.2/download.html" target="_blank">J2SE 1.4.2 SDK Downloadseite</a> bzw. <a href="http://java.sun.com/j2se/1.5.0/download.html">J2SE 5.0 SDK Downloadseite</a> und folgen Sie der darin enthaltenen Installationsanweisung. </dd>
+ </dl>
+ </dd>
+ </dl>
+ <h3><a name="klassenbibliothek_basisinstallation_verwendung" id="klassenbibliothek_basisinstallation_verwendung"></a>3.1.3 Verwendung</h3>
+ <p> Um die MOA SP/SS Klassenbibliothek in einer Applikation verwenden zu k&ouml;nnen, m&uuml;ssen die mit MOA SP/SS ausgelieferten Bibliotheken in den Java Klassenpfad der Applikation eingebunden werden. </p>
+ <p>Die nachfolgende Tabelle listet diese Klassenbibliotheken auf; die Eintr&auml;ge in der Spalte Dateien sind relativ zum Verzeichnis <code>$MOA_SPSS_INST</code> zu interpretieren.</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+<tbody><tr>
+<th>Klassenbibliothek</th><th>Version</th><th>Dateien</th>
+
+</tr><tr>
+<td>MOA SP/SS</td>
+<td>1.2.x&nbsp; </td>
+<td><code>moa-spss.jar</code>, <code>moa-common.jar</code></td>
+</tr><tr>
+<td>MOA IAIK</td>
+<td>1.0.7&nbsp; </td>
+<td><p><code>lib/iaik_moa_full.jar</code>, <code>lib/iaik_Pkcs11Wrapper.jar</code>,
+ <code>lib/iaik_cms.jar</code>, <code>lib/iaik_ixsil.jar</code></p>
+ </td>
+</tr><tr>
+<td>JAXP</td><td>1.2_01&nbsp; </td><td><code>lib/jaxp-api.jar</code>, <code>lib/sax.jar</code>, <code>lib/dom.jar</code></td>
+
+</tr><tr>
+<td>Xerces-J</td><td>2.4.0&nbsp; </td><td><code>lib/xercesImpl.jar</code>, <code>lib/xmlParserAPIs.jar</code></td>
+</tr><tr>
+<td>Xalan-J</td><td>2.5.1&nbsp; </td><td><p><code>lib/xalan.jar</code></p>
+ <p class="remark">Bitte beachten Sie: Wenn Sie J2SE 1.4.2 JRE oder J2SE 5.0 JRE verwenden, m&uuml;ssen Sie diese Bibliothek der Java VM als endorsed bekanntgeben. Sie k&ouml;nnen dies tun, indem Sie entweder</p>
+ <ul>
+ <li class="remark">die Bibliothek in das (ggf. vorher anzulegende) Verzeichnis <code>$JAVA_HOME/jre/lib/endorsed/</code> kopieren; oder</li>
+ <li class="remark">die System Property <code>java.endorsed.dirs</code> verwenden, und als Wert den Pfad zu jenem Verzeichnis angeben, in dem Sie die Bibliothek vorhalten (also z.B. <code>java.endorsed.dirs=c:/mylibdir</code>).</li>
+ </ul></td>
+</tr><tr>
+<td>Jaxen</td><td>1.0&nbsp; </td><td><code>lib/jaxen-core.jar</code>, <code>lib/jaxen-dom.jar</code>, <code>lib/saxpath.jar</code></td>
+
+</tr><tr>
+<td>Commons-Logging</td>
+<td>1.0.4&nbsp; </td>
+<td><code>lib/commons-logging-api.jar</code>, <code>lib/commons-logging.jar</code></td>
+</tr><tr>
+<td>Log4j</td><td>1.2.7&nbsp; </td><td><code>lib/log4j-1.2.7.jar</code></td>
+</tr><tr>
+<td>Commons-Discovery</td><td>0.2&nbsp; </td><td><code>lib/commons-discovery.jar</code></td>
+
+</tr><tr>
+<td>JSSE</td><td>1.0.3_01&nbsp; </td>
+<td><p>Diese Bibliotheken ben&ouml;tigen Sie nur, wenn Sie J2SE 1.3.1 verwenden:</p>
+ <p><code>lib/ext13/jsse.jar</code>, <code>lib/ext13/jcert.jar</code>, <code>lib/ext13/jnet.jar</code></p>
+ <p class="remark">Bitte beachten Sie: Diese Bibliotheken ben&ouml;tigen Sie nur, wenn Sie J2SE 1.3.1 verwenden.</p> </td>
+</tr><tr>
+<td>Postgres JDBC2</td><td>7.3&nbsp; </td><td><p><code>lib/pg73jdbc2.jar</code></p>
+ <p><span class="remark">Bitte beachten Sie: Wenn Sie keine Datenbank f&uuml;r MOA SP/SS verwenden (vergleiche </span><a href="#webservice_erweiterungsm&#246;glichkeiten_datenbank">2.2.2</a><span class="remark">), ben&ouml;tigen Sie diese Bibliothek nicht.</span></p></td>
+</tr><tr>
+</tr>
+</tbody></table>
+
+ <h3><a name="klassenbibliothek_basisinstallation_logging" id="klassenbibliothek_basisinstallation_logging"></a>3.1.4 Logging</h3>
+ <p> Die MOA SP/SS Klassenbibliothek verwendet <a href="#referenziertesoftware">Jakarta Log4j</a> f&uuml;r die Ausgabe von Log-Meldungen am Bildschirm bzw. in Log-Dateien. Die im Abschnitt <a href="#webservice_basisinstallation_logging">2.1.3</a> gemachten Aussagen lassen sich gro&szlig;teils auf den Einsatz der MOA SP/SS Klassenbibliothek &uuml;bertragen. </p>
+ <h2><a name="klassenbibliothek_erweiterungsmöglichkeiten" id="klassenbibliothek_erweiterungsmöglichkeiten"></a>3.2 Erweiterungsm&ouml;glichkeiten </h2>
+ <p>Die im Abschnitt <a href="#webservice_erweiterungsm&#246;glichkeiten">2.2</a> angef&uuml;hrten Erweiterungsm&ouml;glichkeiten f&uuml;r die MOA SP/SS Webservices gelten in analoger Weise auch f&uuml;r die Klassenbibliothek.</p>
+ <h1><a name="referenzierte_software"></a>A Referenzierte Software</h1>
+<p>Auf folgende Software-Pakete wird in diesem Handbuch verwiesen:</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Beschreibung</th>
+ </tr>
+ <tr>
+ <td><a href="http://jakarta.apache.org/tomcat/index.html" target="_blank">Apache Tomcat 4.1.x </a></td>
+ <td>Servlet-Container des Apache Jakarta Projekts in der Version 4.1.x </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.3.1/" target="_blank">J2SE 1.3.1 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 1.3.1 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.4.2/" target="_blank">J2SE 1.4.2 SDK/JRE</a></td>
+ <td>Java 2 Standard Edition in der Version 1.4.2 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.5.0/" target="_blank">J2SE 5.0 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 5.0 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://jakarta.apache.org/log4j/" target="_blank">Jakarta Log4J </a></td>
+ <td>Logging Framework des Apache Jakarta Projekts </td>
+ </tr>
+</table>
+</body>
+</html>
diff --git a/spss/handbook/handbook/intro/intro.html b/spss/handbook/handbook/intro/intro.html
new file mode 100644
index 000000000..8b1bc381f
--- /dev/null
+++ b/spss/handbook/handbook/intro/intro.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Einf&uuml;hrung</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.3</a></p>
+ <p class="subtitle">Einf&uuml;hrung</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#allgemeines">Allgemeines</a></p>
+ </li>
+ <li>
+ <p><a href="#ss">Modul Serversignatur (SS) </a></p>
+ </li>
+ <li><a href="#sp">Modul Signaturpr&uuml;fung (SP) </a></li>
+ </ol>
+<hr/>
+ <h1><a name="allgemeines"></a>1 Allgemeines</h1>
+ <p> Die Module Serversignatur (SS) und Signaturpr&uuml;fung (SP) k&ouml;nnen von Anwendungen verwendet werden, um elektronische Signaturen zu erstellen bzw. vorliegende elektronische Signaturen zu &uuml;berpr&uuml;fen.</p>
+ <p> Die Funktionalit&auml;t und der Aufbau der Schnittstelle zu den beiden Modulen ist in der <a href="../spec/MOA-SPSS-1.2.pdf" target="_blank" class="term">Spezifikation MOA SP/SS (V1.2)</a> detailliert beschrieben. Da diese Spezifikation auf der <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term"> Schnittstellenspezifikation des Security-Layers (V 1.1)</a> aufbaut, ist deren Kenntnis zum Verstehen der Schnittstellen zu SS und SP erforderlich. </p>
+ <h1><a name="ss"></a>2 Modul Serversignatur (SS) </h1>
+ <p> Das Modul Serversignatur (SS) dient zum Erstellen von XML-Signaturen in Anlehnung an die <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html"> </a><a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term">Schnittstellenspezifikation des Security-Layers (V 1.1)</a>. Eine Signatur kann entweder rein in Software erstellt werden, oder aber unter Zuhilfenahme eines Hardware Security Modules (HSM), das den privaten Schl&uuml;ssel gesch&uuml;tzt enth&auml;lt und die Signatur berechnet.</p>
+ <p> Der Zugriff auf einzelne Signaturschl&uuml;ssel in MOA SS kann basierend auf dem f&uuml;r TLS-Client-Authentisierung verwendeten Zertifikat eingeschr&auml;nkt werden. </p>
+ <p> Anwendungen k&ouml;nnen das Modul entweder als Web-Service oder &uuml;ber ein Java-API ansprechen. </p>
+ <h1><a name="sp"></a>3 Modul Signaturpr&uuml;fung (SP) </h1>
+ <p> Das Modul Signaturpr&uuml;fung (SP) dient zum &Uuml;berpr&uuml;fen von <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/" target="_blank">XML-Signaturen</a> und <a href="http://www.ietf.org/rfc/rfc2630.txt" target="_blank">CMS-Signaturen</a>. </p>
+ <p>Im Zuge der Verifikation einer XML-Signatur werden die Signatur, gegebenenfalls vorhandene XMLDSIG-Manifeste, als auch die G&uuml;ltigkeit und Anwendbarkeit des Zertifikats &uuml;berpr&uuml;ft. Bei XML-Signaturen kann zus&auml;tzlich &uuml;berpr&uuml;ft werden, ob sie den speziellen Anforderungen <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html" target="_blank" class="term">Schnittstellenspezifikation des Security-Layers (V 1.1)</a> entsprechen (vgl. Signaturmanifest). </p>
+ <p> Anwendungen k&ouml;nnen das Modul entweder als Web-Service oder &uuml;ber ein Java-API ansprechen.</p>
+</body>
+</html>
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf b/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf
new file mode 100644
index 000000000..6709a4081
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.pdf
Binary files differ
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl b/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl
new file mode 100644
index 000000000..cc7aec4dc
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.wsdl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Web Service Description for MOA SP/SS 1.3
+-->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="../resources/schemas/MOA-SPSS-1.3.xsd"/>
+ <message name="CreateXMLSignatureInput">
+ <part name="body" element="moa:CreateXMLSignatureRequest"/>
+ </message>
+ <message name="CreateXMLSignatureOutput">
+ <part name="body" element="moa:CreateXMLSignatureResponse"/>
+ </message>
+ <message name="VerifyCMSSignatureInput">
+ <part name="body" element="moa:VerifyCMSSignatureRequest"/>
+ </message>
+ <message name="VerifyCMSSignatureOutput">
+ <part name="body" element="moa:VerifyCMSSignatureResponse"/>
+ </message>
+ <message name="VerifyXMLSignatureInput">
+ <part name="body" element="moa:VerifyXMLSignatureRequest"/>
+ </message>
+ <message name="VerifyXMLSignatureOutput">
+ <part name="body" element="moa:VerifyXMLSignatureResponse"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="SignatureCreationPortType">
+ <operation name="createXMLSignature">
+ <input message="tns:CreateXMLSignatureInput"/>
+ <output message="tns:CreateXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <portType name="SignatureVerificationPortType">
+ <operation name="verifyCMSSignature">
+ <input message="tns:VerifyCMSSignatureInput"/>
+ <output message="tns:VerifyCMSSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <input message="tns:VerifyXMLSignatureInput"/>
+ <output message="tns:VerifyXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="SignatureCreationBinding" type="tns:SignatureCreationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="createXMLSignature">
+ <soap:operation soapAction="urn:CreateXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verifyCMSSignature">
+ <soap:operation soapAction="urn:VerifyCMSSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <soap:operation soapAction="urn:VerifyXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="SignatureCreationService">
+ <port name="SignatureCreationPort" binding="tns:SignatureCreationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ -->
+ <soap:address location="http://localhost/moa-spss/services/SignatureCreation"/>
+ </port>
+ </service>
+ <service name="SignatureVerificationService">
+ <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ -->
+ <soap:address location="http://localhost/moa-spss/services/SignatureVerification"/>
+ </port>
+ </service>
+</definitions>
diff --git a/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd b/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..9c40d8153
--- /dev/null
+++ b/spss/handbook/handbook/spec/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:nonNegativeInteger" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/spss/handbook/handbook/usage/usage.html b/spss/handbook/handbook/usage/usage.html
new file mode 100644
index 000000000..69e21d5f0
--- /dev/null
+++ b/spss/handbook/handbook/usage/usage.html
@@ -0,0 +1,1236 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
+ <title>MOA SS und SP - Anwendung</title>
+ <link rel="stylesheet" href="../common/MOA.css" type="text/css">
+</head>
+<body bgcolor="white" text="#000000" link="#990000" vlink="#666666" alink="#cc9966">
+ <table class="logoTable" width="100%" border="0" cellspacing="0" cellpadding="10">
+ <tr>
+ <td align="center" class="logoTitle" width="267"><img src="../common/LogoBKA.png" alt="Logo BKA" width="267" height="37" align="left"></td>
+ <td align="center" class="logoTitle">Open Source<br>
+ f&uuml;r das E-Government</td>
+ <td align="center" class="logoTitle" width="123"><img src="../common/LogoMoa4c.jpg" alt="Logo MOA" width="123" height="138" align="right"></td>
+ </tr>
+ </table>
+ <hr/>
+ <p class="title"><a href="../index.html">MOA: Serversignatur (SS) und Signaturpr&uuml;fung (SP), V 1.3</a></p>
+ <p class="subtitle">Anwendung</p>
+ <hr/>
+ <h1>Inhalt</h1>
+ <ol>
+ <li>
+ <p><a href="#&#252;bersicht">&Uuml;bersicht</a></p>
+ </li>
+ <li>
+ <p><a href="#webservice">Verwendung des Webservices</a></p>
+ <ol>
+ <li><a href="#webservice_xmlrequests">XML-Requests</a> <ol>
+ <li><a href="#webservice_xmlrequests_erstellungxml">Erstellung einer XML-Signatur</a> <ol>
+ <li><a href="#webservice_xmlrequests_erstellungxml_simple">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_daten">Angabe der zu signierenden Daten</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_transformationen">Transformationen</a></li>
+ <li><a href="#webservice_xmlrequests_erstellungxml_ergaenzungsobjekte">Erg&auml;nzungsobjekte</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_xmlrequests_pruefungcms">Pr&uuml;fung einer CMS-Signatur </a> <ol>
+ <li><a href="#webservice_xmlrequests_pruefungcms_einfach">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungcms_erweitert">Erweitertes Beispiel</a> </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_xmlrequests_pruefungxml">Pr&uuml;fung einer XML-Signatur </a> <ol>
+ <li><a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_erweitert">Erweitertes Beispiel</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_xmldsigmanifest">Pr&uuml;fung eines XMLDSIG-Manifests</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_ergaenzungsobjekte">Erg&auml;nzungsobjekte</a></li>
+ <li><a href="#webservice_xmlrequests_pruefungxml_signaturmanifest">Signatur-Manifest des Security-Layers</a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#webservice_clients">Webservice-Clients
+ </a> <ol>
+ <li><a href="#webservice_clients_&#252;bersicht">&Uuml;bersicht</a></li>
+ <li><a href="#webservice_clients_gemeinsamkeiten">Gemeinsamkeiten</a></li>
+ <li><a href="#webservice_clients_httpsserverauth">Besonderheiten von <code>HTTPSServerAuth.java</code></a></li>
+ <li><a href="#webservice_clients_httpsclientauth">Besonderheiten von <code>HTTPSClientAuth.java</code></a></li>
+ </ol>
+ </li>
+ </ol>
+ </li>
+ <li><a href="#klassenbibliothek">Verwendung der Klassenbibliothek</a>
+ <ol>
+ <li><a href="#klassenbibliothek_vorbereitung">Vorbereitung</a></li>
+ <li><a href="#klassenbibliothek_allgemeines">Allgemeines</a> </li>
+ <li><a href="#klassenbibliothek_beispiele">Beispiele</a></li>
+ <li><a href="#klassenbibliothek_apidoc">API-Dokumentation</a> </li>
+ </ol>
+ </li>
+ </ol>
+ <ol type="A">
+ <li><a href="#referenzierte_software">Referenzierte Software</a></li>
+ </ol>
+<hr/>
+ <h1><a name="übersicht" id="übersicht"></a>1 &Uuml;bersicht</h1>
+ <p> Die Module Signaturpr&uuml;fung (SP) und Serversignatur (SS) sind als plattformunabh&auml;ngige Module ausgelegt, die entweder als Webservice &uuml;ber HTTP bzw. HTTPS oder als Klassenbibliothek &uuml;ber ein API angesprochen werden k&ouml;nnen. Dieses Handbuch beschreibt die Anwendung der beiden Module auf jede dieser beiden Arten.</p>
+ <h1><a name="webservice"></a>2 Verwendung des Webservices </h1>
+ <p>Dieser Abschnitt beschreibt die Verwendung der Module SP und SS &uuml;ber die Webservice-Schnittstelle. Im ersten Unterabschnitt werden typische XML-Requests zur Signaturerstellung mittels SS bzw. zur Signaturpr&uuml;fung mittels SP vorgestellt, wie sie an das Webservice gesendet werden k&ouml;nnen. Der zweite Unterabschnitt stellt beispielhafte Implementierungen eines Webservice-Clients in Java vor, mit dem die Requests aus dem ersten Unterabschnitt an das Webservice gesendet werden k&ouml;nnen.</p>
+ <h2><a name="webservice_xmlrequests" id="webservice_xmlrequests"></a>2.1 XML-Requests </h2>
+ <p>Dieser Abschnitt stellt typische XML-Requests f&uuml;r die Erstellung einer XML-Signatur mittels SS bzw. zur Pr&uuml;fung einer CMS- bzw. XML-Signatur mittels SP vor. Zu jedem Request wird jeweils auch eine typische Response des Services besprochen. </p>
+ <p class="remark">Bitte beachten Sie: Einige der vorgestellten Requests referenzieren beispielhafte Daten auf <code>localhost</code>, z.B. <code>http://localhost:8080/referencedData/Text.txt</code>. Wenn Sie diese Beispiele ausprobieren m&ouml;chten, m&uuml;ssen Sie daf&uuml;r sorgen, dass MOA SS bzw. SP diese Daten auch tats&auml;chlich aufl&ouml;sen kann. Wenn Sie Ihre Tomcat-Installation auf <code>localhost:8080</code> betreiben, ist es ausreichend, wenn sie die diesem Handbuch beiliegende Webapplikation <code><a href="../../clients/common/referencedData/referencedData.war">referencedData.war</a></code> in das Verzeichnis <code>webapps</code> Ihrer Tomcat-Installation kopieren. Ansonsten m&uuml;ssen Sie zus&auml;tzlich die URLs in den Requests anpassen. </p>
+ <h3><a name="webservice_xmlrequests_erstellungxml" id="webservice_xmlrequests_erstellungxml"></a>2.1.1 Erstellung einer XML-Signatur</h3>
+ <h4><a name="webservice_xmlrequests_erstellungxml_simple" id="webservice_xmlrequests_erstellungxml_simple"></a>2.1.1.1 Einfaches Beispiel</h4>
+ <h5>Request</h5>
+ <p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.xml" target="_blank">CreateXMLSignatureRequest.Simple.xml</a></code> ist ein einfacher XML-Request zur Erzeugung einer XML-Signatur. Sein Aufbau wird nachfolgend analysiert:</p>
+ <pre> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt; </pre>
+ <p><code>KG_allgemein</code> bezeichnet eine Schl&uuml;sselgruppe, aus der SS einen Signaturschl&uuml;ssel selektieren soll und muss einer in der SP/SS-Konfigurationsdatei definierten Schl&uuml;sselgruppe entsprechen. </p>
+ <pre> &lt;SingleSignatureInfo SecurityLayerConformity="false"&gt;</pre>
+ <p> F&uuml;r jedes <code>SingleSignatureInfo</code>Element wird eine eigene XML-Signatur erzeugt. Wird das Attribut <code>SecurityLayerConformity</code> auf <code>true</code> gesetzt, dann wird eine XML-Signatur gem&auml;&szlig; <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20020831/core/Core.html#signaturerstellungNachXMLDSIGAntwort" target="_blank">Security-Layer Spezifikation V1.1 </a> erzeugt; d.h. es werden signierte Properties (Zeitpunkt der Signaturerstellung, das f&uuml;r die Signatur&uuml;berpr&uuml;fung zu verwendende Zertifikat, Metainformationen zu den signierten Datenobjekten) und ein Manifest, das alle implizite Transformationsparameter enth&auml;lt, zur Signatur hinzugef&uuml;gt. </p>
+ <pre> &lt;DataObjectInfo Structure="enveloping"&gt;
+ &lt;DataObject&gt;
+ &lt;XMLContent&gt;Diese Daten werden signiert.&lt;XMLContent&gt;
+ &lt;/DataObject&gt;</pre>
+ <p> </p>
+ <p> F&uuml;r jedes Daten-Objekt, das in die XML-Signatur als <code>dsig:Reference</code> aufgenommen werden soll, muss ein <code>DataObjectInfo</code> Element spezifiziert werden. Das Attribut <code>Structure</code> gibt an, ob die Daten in die Signatur in ein <code>dsig:Object</code> Element integriert werden sollen (<code>Structure="enveloping"</code>), oder &uuml;ber einen URL referenziert werden sollen (<code>Structure="detached"</code>). </p>
+ <p> Im Fall von <code>Structure="enveloping"</code> muss im nachfolgenden <code>DataObject</code> Element entweder das Attribut <code>Reference</code> (enth&auml;lt eine URL, von der SS die Daten beziehen soll) gesetzt sein, oder aber die zu signierenden Daten werden explizit in einem der Elemente <code>Base64Content</code> (enth&auml;lt Daten in Base64 kodierter Form) oder <code>XMLContent</code> (enth&auml;lt Daten als beliebiges XML-Fragment) oder <code>LocRefContent</code> (enth&auml;lt eine URL, von der SS die Daten beziehen soll; in diesem Fall also gleichwertig wie ein gesetztes Attribut <code>Reference</code>) spezifiziert sein. Die Angabe der zu signierenden Daten &uuml;ber das Attribut <code>Reference</code> und gleichzeitig einem der Elemente <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> ist nicht erlaubt.</p>
+ <p>Im Fall von <code>Structure="detached"</code> muss das Attribut <code>Reference</code> im nachfolgenden <code>DataObject</code> Element gesetzt sein. Es enth&auml;lt jene URL, die zur Referenzierung der Daten als Wert von <code>dsig:Reference/@URI</code> in die XML-Signatur aufgenommen wird. Die Angabe eines der Element <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> ist optional. Unterbleibt die Angabe, bezieht SS die Daten von der URL im Attribut <code>Reference</code>. Wird eines der Elemente verwendet, bezieht SS die Daten durch Analyse des angegebenen Elements (siehe obiger Absatz). </p>
+ <p>Im konkreten Beispiel sollen die Daten in ein <code>dsig:Object</code> Element integriert werden (<code>Structure="enveloping"</code>). Die Daten werden mittels <code>XMLContent</code> als XML-Fragment (ein einfacher Textknoten) angegeben.</p>
+ <p>
+ <pre> &lt;CreateTransformsInfoProfile&gt;<br> &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;</pre>
+ Zu jedem Daten-Objekt k&ouml;nnen optional Transformationen (z.B. XPath, XSLT, Base64-Decodierung, etc.) angegeben werden. Werden - wie hier im Beispiel - keine Transformationen angegeben, so muss zumindest der MIME-Type der zu signierenden Daten spezifiziert werden. <p></p>
+ <h5>Response</h5>
+ <p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Simple.resp.xml" target="_blank">CreateXMLSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+ <p>
+ <pre>&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot; <br> xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;SignatureEnvironment&gt;<br> &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&amp;apos;signed-data-1-1-1&amp;apos;)/node())&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ ...
+ &lt;/dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten werden signiert.&lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;<br> &lt;/SignatureEnvironment&gt;<br>&lt;/CreateXMLSignatureResponse&gt;</pre>
+ <p></p>
+ <p><code>CreateXMLSignatureResponse</code> enth&auml;lt je erzeugter Signatur ein Element <code>SignatureEnvironment</code> (in diesem Fall genau ein Element). <code>SignatureEnvironment</code> enth&auml;lt die von SS erzeugte XML-Signatur, die im obigen Request spezifiziert wurde. Man erkennt, dass die XML-Signatur genau ein Daten-Objekt unterzeichnet (ein <code>dsig:Reference</code> Element ist enthalten). Das unterzeichnete Datenobjekt ist in der Signaturstruktur selbst enthalten (<code>enveloping</code>), und zwar in einem <code>dsig:Object</code> Element. </p>
+ <h4><a name="webservice_xmlrequests_erstellungxml_daten" id="webservice_xmlrequests_erstellungxml_daten"></a>2.1.1.2 Angabe der zu signierenden Daten </h4>
+ <h5>Request</h5>
+ <p>Dieses Beispiel stellt die vielf&auml;ltigen M&ouml;glichkeiten vor, wie MOA SS mitgeteilt werden kann, welche Daten signiert (wenn keine Transformationen angegeben werden) bzw. als Eingangsdaten f&uuml;r die Berechnung der Transformationen verwendet werden sollen (wenn Transformationen angegeben werden).</p>
+ <p>Mit <a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.xml" target="_blank"><code>CreateXMLSignatureRequest.Refs.xml</code></a> sollen insgesamt neun Datenobjekte signiert werden:</p>
+ <pre>&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;<br> &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;</pre>
+ <p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+ <pre> &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;true&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;</pre>
+ <p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Weiters sollen die Daten nicht &uuml;ber &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code>, sondern &uuml;ber eine <code>dsig:Reference</code> in einem eigenen <code>dsig:Manifest</code> aufgenommen werden (<code>ChildOfManifest=&quot;true&quot;</code>).</p>
+ <p>Die Daten selbst werden explizit in base64 kodierter Form als Inhalt des Elements <code>Base64Content</code> angegeben. Das Attribut <code>DataObject/@Reference</code> darf nicht angegeben werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und <code>Base64Content</code> verwendet wird.</p>
+ <p>Es werden - wie in allen &uuml;brigen F&auml;llen dieses Beispiels - keine Transformationen angegeben. Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben, da der Inhalt von <code>Base64Content</code> die base64-Kodierung des Texts <code>Diese Daten waren base64 kodiert.</code> ist. </p>
+ <pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;XMLContent&gt;&lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+&lt;/doc:XMLDocument&gt;&lt;/XMLContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+ <p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Diesmal sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+ <p>Die Daten selbst werden explizit als XML-Fragment als Inhalt des Elements <code>XMLContent</code> angegeben. Das Attribut <code>DataObject/@Reference</code> darf nicht angegeben werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und <code>XMLContent</code> verwendet wird.</p>
+ <p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.txt&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Wiederum sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).
+</p>
+<p>Die Daten werden diesmal nicht explizit angegeben, sondern mittels der URL in <code>DataObject/@Reference</code> referenziert. MOA SS versucht diese URL aufzul&ouml;sen, um zu den zu signierenden Daten zu gelangen. <code>Base64Content</code> oder <code>XMLContent</code> oder <code>LocRefContent</code> d&uuml;rfen nicht verwendet werden, da die Daten in der <span class="term">Enveloping</span> Form integriert werden sollen, und bereits <code>DataObject/@Reference</code> eingesetzt wird. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;enveloping&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/Text.txt&lt;/LocRefContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen wiederum in der <span class="term">Enveloping</span> Form in die Signatur integriert werden, d. h. die Daten werden in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur aufgenommen (<code>Structure=&quot;enveloping&quot;</code>). Wiederum sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>). </p>
+<p>Die Daten werden wie im vorhergehenden Fall nicht explizit angegeben, sondern referenziert. Diesmal wird die URL jedoch nicht <code>DataObject/@Reference</code> verwendet, sondern als Textinhalt des Elements <code>LocRefContent</code> (<code>LocRef</code> steht f&uuml;r <span class="term">Location Reference</span>). <code>DataObject/@Reference</code> darf in diesem Fall nicht verwendet werden. Diese Methode ist semantisch v&ouml;llig ident mit dem vorhergehenden Fall. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;true&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen diesmal in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden, d. h. die Daten werden nicht direkt in die Signaturstruktur integriert, sondern lediglich mittels URI im Attribut <code>URI</code> der anzufertigenden <code>dsig:Reference</code> referenziert (<code>Structure=&quot;detached&quot;</code>). Die Daten sollen indirekt &uuml;ber eine <code>dsig:Reference</code> eines <code>dsig:Manifest</code>s aufgenommen werden (<code>ChildOfManifest=&quot;true&quot;</code>). </p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Die Daten selbst hingegen werden im diesem Beispiel explizit in base64 kodierter Form als Inhalt des Elements <code>Base64Content</code> angegeben. MOA SS l&ouml;st also keine URL zur Erlangung der Daten auf, sondern verwendet den Inhalt von <code>Base64Content</code>. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure="detached" ChildOfManifest="false"&gt;
+ &lt;DataObject Reference="NichtAufloesbareReferenz1"&gt;
+ &lt;XMLContent&gt;&lt;doc:XMLDocument xmlns:doc="urn:document"&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId="Para2"&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+&lt;/doc:XMLDocument&gt;&lt;/XMLContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Die Daten sollen auch diesmal in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden, d. h. die Daten werden nicht direkt in die Signaturstruktur integriert, sondern lediglich mittels URI im Attribut <code>URI</code> der anzufertigenden <code>dsig:Reference</code> referenziert (<code>Structure=&quot;detached&quot;</code>). Diesmal sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).
+</p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Die Daten selbst hingegen werden im diesem Beispiel explizit als XML-Fragment in <code>XMLContent</code> angegeben. MOA SS l&ouml;st auch hier keine URL zur Erlangung der Daten auf, sondern verwendet den Inhalt von <code>XMLContent</code>. Zur Verdeutlichung dieses Umstandes wurde die URI in <code>DataObject/@Reference</code> auf einen Wert gesetzt, der von MOA SS ganz sicher nicht aufgel&ouml;st werden kann (<code>NichtAufloesbareReferenz1</code>). </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.txt&quot;&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Wiederum sollen die Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>). </p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Nachdem eine explizite Angabe der Daten mittels <code>Base64Content</code>, <code>XMLContent</code> oder <code>LocRefContent</code> unterbleibt, wird MOA SS versuchen, die URI in <code>dsig:Reference/@URI</code> als URL aufzul&ouml;sen, um so zu den zu signierenden Daten zu gelangen. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;NichtAufloesbareReferenz2&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/Text.txt&lt;/LocRefContent&gt;
+ &lt;/DataObject&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Wiederum sollen die Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+<p>Die URI in <code>DataObject/@Reference</code> enth&auml;lt dabei die URI, die zur Referenzierung in <code>dsig:Reference/@URI</code> aufgenommen werden soll. Den Hinweis, wie MOA SS zu den zu signierenden Daten gelangen soll, ist jedoch in LocRefContent enthalten. MOA SS wird also versuchen, die dort enthaltene URL aufzul&ouml;sen, um zu den zu signierenden Daten zu gelangen. Zur Verdeutlichung dieses Umstandes wurde die URI in <code>DataObject/@Reference</code> auf einen Wert gesetzt, der von MOA SS ganz sicher nicht aufgel&ouml;st werden kann (<code>NichtAufloesbareReferenz2</code>). Diese Art der Datenangabe kann eingesetzt werden, wenn die Daten zum Zeitpunkt der Signaturerstellung von einem anderen Ort bezogen werden m&uuml;ssen, als sp&auml;ter dann bei der Signaturpr&uuml;fung.</p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben.</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot; ChildOfManifest=&quot;false&quot;&gt;
+ &lt;DataObject Reference=&quot;&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Im letzten Fall schlie&szlig;lich sollen wiederum Daten in der <span class="term">Detached</span> Form in die Signatur aufgenommen werden (<code>Structure=&quot;detached&quot;</code>). Wie zuvor sollen die Daten direkt &uuml;ber eine <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> aufgenommen werden (<code>ChildOfManifest=&quot;false&quot;</code>).</p>
+<p>Die Referenz auf die zu signierenden Daten ist wiederum in <code>DataObject/@Reference</code> enthalten; sie verweist diesmal jedoch nicht auf ein externes Dokument, sondern auf das gesamte (XML-)Dokument, in das die zu erstellende Signatur integriert werden soll, und zwar, indem <code>DataObject/@Reference</code> den leeren String (<code>&quot;&quot;</code>) enth&auml;lt. Nachdem dadurch zwangsl&auml;ufig auch die Signatur in den zu signierenden Daten enthalten w&auml;re, wird die Signatur durch die Angabe einer Enveloped Signature Transform aus den zu signierenden Daten herausgenommen, bevor dar&uuml;ber der Hashwert berechnet wird (dsig:Transform).</p>
+<p>Offen bleibt die Frage, wie MOA SS nun wei&szlig;, in welches (XML-)Dokument es die die Signatur integrieren soll. Siehe dazu die Erl&auml;uterungen zum n&auml;chsten Ausschnitts des Requests. </p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>application/xml</code> angegeben.</p>
+<pre>
+ &lt;CreateSignatureInfo&gt;
+ &lt;CreateSignatureEnvironment&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.xml&lt;/LocRefContent&gt;
+ &lt;/CreateSignatureEnvironment&gt;
+ &lt;CreateSignatureEnvironmentProfile&gt;
+ &lt;CreateSignatureLocation Index=&quot;4&quot; xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument&lt;/CreateSignatureLocation&gt;
+ &lt;/CreateSignatureEnvironmentProfile&gt;
+ &lt;/CreateSignatureInfo&gt;
+</pre>
+<p>Das Element <code>CreateSignatureInfo</code> ist grunds&auml;tzlich optional, und muss nur angegeben werden, wenn die zu erstellende Signatur von MOA SS in ein bestehendes XML-Dokument integriert werden soll (was in diesem Beispiel ja der Fall ist).</p>
+<p><code>CreateSignatureEnvironment</code> enth&auml;lt das XML-Dokument, in das die zu erstellende Signatur integriert werden soll. In diesem Beispiel wird dieses Dokument mit Hilfe von <code>LocRefContent</code> referenziert, d. h. MOA SS wird versuchen, die darin enthaltene URL aufzul&ouml;sen, um das XML-Dokument zu erhalten. Alternativ k&ouml;nnte auch <code>Base64Content</code> (explizite Angabe des XML-Dokuments in base64 kodierter Form) oder <code>XMLContent</code> (direkte Angabe des XML-Dokuments im Request) verwendet werden.</p>
+<p><a name="webservice_xmlrequests_erstellungxml_daten_hinweisCreateSignatureLocation"></a><code>CreateSignatureLocation</code> enth&auml;lt die Angabe jener Stelle, an der die Signatur in das XML-Dokument eingesetzt werden soll. Der Inhalt dieses Elements bezeichnet mittels <span class="term">XPath</span>-Ausdruck das <span class="term">Parent</span>-Element der Signatur, der Wert des Attributs <code>CreateSignatureLocation/@Index</code> enth&auml;lt den Offset innerhalb dieses <span class="term">Parent</span>-Elements. Betrachten Sie zur Verdeutlichung das XML-Dokument <a href="../../clients/common/referencedData/XMLDocument.xml" target="_blank"><code>XMLDocument.xml</code></a>, in das die Signatur integriert werden soll: Die Signatur soll unmittelbar nach dem zweiten <code>doc:Paragraph</code> Element in das XML-Dokument eingef&uuml;gt werden. Der Inhalt von <code>CreateSignatureLocation</code> (<code>/doc:XMLDocument</code>) selektiert das zuk&uuml;nftige <span class="term">Parent</span>-Element der Signatur, also <code>doc:XMLDocument</code>. Das Attribut <code>Index</code> enth&auml;lt deshalb den Wert <code>4</code> (und nicht etwa <code>2</code> oder <code>3</code>), da erstens bei <code>0</code> zu z&auml;hlen begonnen wird, und zweitens auch die Text-Knoten, die lediglich Whitespace enthalten, f&uuml;r diesen Offset z&auml;hlen (um diese Textknoten erkennen zu k&ouml;nnen, m&uuml;ssen Sie das XML-Dokument in einem Text-Editor &ouml;ffnen). Beachten Sie weiters, dass das im <span class="term">XPath</span>-Ausdruck verwendete Namespace-Prefix <code>doc</code> im Kontext des Elements <code>CreateSignatureLocation</code> bekannt sein muss. Deshalb enth&auml;lt dieses Element auch die entsprechende Namespace-Deklaration (<code>xmlns:doc=&quot;urn:document&quot;</code>).</p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Refs.resp.xml" target="_blank">CreateXMLSignatureRequest.Refs.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignatureEnvironment&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;&lt;dsig:Signature Id=&quot;signature-1-1&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+</pre>
+<p>Die Antwort enth&auml;lt in <code>SignatureEnvironment</code> das Ergebnis der Signaturerstellung. Nachdem die Signatur in ein bestehendes XML-Dokument integriert werden sollte, enth&auml;lt <code>SignatureEnvironment</code> das Dokument-Element dieses XML-Dokuments (<code>doc:XMLDocument</code>). Man erkennt auch gut, dass die XML-Signatur als f&uuml;nfter Kindknoten (Offset <code>4</code>) von <code>doc:XMLDocument</code> eingef&uuml;gt wurde.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-2&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-2-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;A8ml6/aZKCmj1hONwvLItIwGHoc=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des zweiten <code>DataObjectInfo</code> Elements im Request erstellt. Man erkennt gut den Verweis in <code>dsig:Reference/@URI</code> auf das <code>dsig:Object</code>, das die signierten Daten enth&auml;lt (der XPointer verweist auf s&auml;mtliche Kindknoten jenes Elements, das ein ID-Attribut mit dem Wert <code>signed-data-1-2-1</code> aufweist, des ersten vorkommenden <code>dsig:Object</code>s der Signatur). </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-3&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-3-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des dritten <code>DataObjectInfo</code> Elements im Request erstellt. Die Text-Daten wurden von der angegebenen URL (<code>http://localhost:8080/referencedData/Text.txt</code>) aufgel&ouml;st und in das <code>dsig:Object</code> mit dem ID-Attribut <code>signed-data-1-3-1</code> gesteckt. Um Probleme mit nicht in XML darstellbare Zeichen zu vermeiden, wurde der Text nicht direkt signiert, sondern in base64 kodierter Form in das <code>dsig:Object</code> integriert, und eine Transformation zur base64 Dekodierung spezifiziert. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-4&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-4-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des vierten <code>DataObjectInfo</code> Elements im Request erstellt. Wie schon bei der Beschreibung des Requests angef&uuml;hrt, ist die erstellte<code> dsig:Reference</code> semantisch genau gleich wie die vorhergehende. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-6&quot; URI=&quot;NichtAufloesbareReferenz1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;2b83+NbXDFijHzz+sH0T7fM36sA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des sechsten <code>DataObjectInfo</code> Elements im Request erstellt. Die zu signierenden Daten wurden aus dem <code>XMLContent</code> des Requests entnommen, als Wert von <code>dsig:Reference/@URI</code> wurde der Wert von <code>DataObjectInfo/@Reference</code> &uuml;bernommen. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-7&quot; URI=&quot;http://localhost:8080/referencedData/Text.txt&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des siebenten <code>DataObjectInfo</code> Elements im Request erstellt. Um zu den zu signierenden Daten zu gelangen, wurde von MOA SS die URL in <code>DataObjectInfo/@Reference</code> aufgel&ouml;st. Gleicherma&szlig;en wurde die URL in <code>dsig:Reference/@URI</code> &uuml;bernommen. </p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-8&quot; URI=&quot;NichtAufloesbareReferenz2&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;0P878Dsmtxv5goj+6KgNmj6S/EE=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des achten <code>DataObjectInfo</code> Elements im Request erstellt. Um zu den zu signierenden Daten zu gelangen, wurde von MOA SS die URL in LocRefContent aufgel&ouml;st. In <code>dsig:Reference/@URI</code> wurde der Wert aus <code>DataObjectInfo/@Reference</code> &uuml;bernommen.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-9&quot; URI=&quot;&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;2b83+NbXDFijHzz+sH0T7fM36sA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> wurde auf Grund des neunten <code>DataObjectInfo</code> Elements im Request erstellt. Als zu signierende Daten wurde das XML-Dokument ausgew&auml;hlt, in das die XML-Signatur integriert werden solle. Vor der Berechnung des Hashwerts wurde eine <span class="term">Enveloped Signature</span> Transformation zwischengeschaltet, welche die XML-Struktur der Signatur selbst aus den Hash-Eingangsdaten herausschneidet. </p>
+<pre>
+ &lt;dsig:Reference Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot; URI=&quot;#dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;mNsxUkFoF46XZVBivBo4aasFCTQ=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Diese <code>dsig:Reference</code> verweist auf das <code>dsig:Manifest</code> weiter unten in der XML-Struktur der Signatur. Das <code>dsig:Manifest</code> wurde angelegt, weil bei zwei <code>DataObjectInfo</code>s im Request das Attribut <code>ChildOfManifest</code> auf den Wert <code>true</code> gesetzt wurde.</p>
+<pre>
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-2-1&quot;&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-3-1&quot;&gt;RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=&lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-4-1&quot;&gt;RGllc2UgRGF0ZW4gc2luZCByZWluZXIgVGV4dC4=&lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/dsig:Object&gt;
+</pre>
+<p><code>SignatureValue</code> und <code>KeyInfo</code> werden an dieser Stelle nicht n&auml;her betrachtet.</p>
+<p>Das erste <code>dsig:Object</code> enth&auml;lt die Daten aus dem zweiten <code>DataObjectInfo</code>; das zweite <code>dsig:Object</code> jene aus dem dritten <code>DataObjectInfo</code>; das dritte <code>dsig:Object</code> jene aus dem vierten <code>DataObjectInfo</code>; das vierte <code>dsig:Object</code> schlie&szlig;lich jene aus dem ersten <code>DataObjectInfo</code>.</p>
+<pre>
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-5&quot; URI=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+</pre>
+<p>Das f&uuml;nfte <code>dsig:Object</code> enth&auml;lt das <code>dsig:Manifest</code>, das von MOA SS auf Grund des ersten bzw. f&uuml;nften <code>DataObjectInfo</code> des Requests erstellt wurde. Darin enthalten sind die zum ersten und f&uuml;nten <code>DataObjectInfo</code> korrespondierenden <code>dsig:Reference</code> Elemente. Die Daten f&uuml;r die erste im <code>dsig:Manifest</code> enthaltene <code>dsig:Reference</code> wurden aus dem <code>Base64Content</code> Element des ersten <code>DataObjectInfo</code> entnommen, jene f&uuml;r die zweite <code>dsig:Reference</code> aus dem <code>Base64Content</code> Element des f&uuml;nften <code>DataObjectInfo</code>. Der Wert des <code>URI</code> Attributs der zweiten <code>dsig:Reference</code> wurde aus dem <code>DataObject/@Reference</code> des f&uuml;nften <code>DataObjectInfo</code> &uuml;bernommen. </p>
+<h4><a name="webservice_xmlrequests_erstellungxml_transformationen" id="webservice_xmlrequests_erstellungxml_transformationen"></a>2.1.1.3 Transformationen</h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml" target="_blank"><code>CreateXMLSignatureRequest.Transforms.xml</code></a>) stellt die wichtigsten Transformationen vor, die von MOA SS bei der Erstellung einer Signatur verwendet werden k&ouml;nnen. Eine Transformation bzw. eine Kette mehrerer hintereinandergeschalteter Transformationen werden auf die Referenz-Eingangsdaten (also jene Daten, die in DataObjectInfo/DataObject angegeben werden) angewendet; das Ergebnis flie&szlig;t dann in die Hashwert-Berechnung ein. </p>
+<pre>&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;<br> &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;<br> &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;</pre>
+<p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/Text.b64&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;text/plain&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>F&uuml;r das erste zu signierende Datenobjekt werden die Referenz-Eingangsdaten mittels <code>DataObject/@Reference</code> referenziert, d. h. MOA SS l&ouml;st die darin enthaltene URL auf, um zu den Daten zu gelangen. Es handelt sich dabei um einen <a href="../../clients/common/referencedData/Text.b64" target="_blank">base64 kodierten Text</a>.</p>
+<p>Unterschrieben werden soll nun aber nicht dieser base64 kodierte Text, sondern der entsprechend dekodierte Text. Dies l&auml;sst sich elegant durch die Angabe einer <span class="term"><a href="http://www.w3.org/TR/xmldsig-core/#sec-Base-64" target="_blank">Base64 Decoding</a></span><a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-Base-64" target="_blank"> Transformation</a> bewerkstelligen. Dazu wird als erstes Kindelement von <code>CreateTransformsInfo</code> ein <code>dsig:Transforms</code> Element im Request angegeben. Dieses <code>dsig:Transforms</code> Element nimmt ein oderer mehrere <code>dsig:Transform</code> Elemente auf, wobei jedes <code>dsig:Transform</code> Element f&uuml;r eine Transformation steht. In unserem Fall wird nur eine einzige Transformation ben&ouml;tigt; die Angabe, um welche Transformation es sich handelt, wird durch das Attribut <code>dsig:Transform/@Algorithm</code> angegeben. F&uuml;r die <span class="term">Base64 Decoding</span> Transformation muss der Wert auf <code>http://www.w3.org/2000/09/xmldsig#base64</code> gesetzt werden. Sie ist eine parameterlose Transformation, d. h. <code>dsig:Transform</code> hat keine Kindelemente.</p>
+<p>Der Mime-Type der zu signierenden Daten wird als <code>text/plain</code> angegeben, da ja tats&auml;chlich nach der durchgef&uuml;hrten Transformation dekodierter Text vorliegt, &uuml;ber den dann der Hashwert berechnet wird. </p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;http://localhost:8080/referencedData/XMLDocument.xml&quot;/&gt;
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;
+ &lt;xp2:XPath
+ xmlns:xp2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;
+ xmlns:doc=&quot;urn:document&quot;
+ Filter=&quot;subtract&quot;&gt;/doc:XMLDocument/doc:Paragraph[2]&lt;/xp2:XPath&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot;
+ xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot; xmlns:doc=&quot;urn:document&quot;&gt;
+ &lt;xsl:output encoding=&quot;UTF-8&quot; method=&quot;xml&quot; indent=&quot;yes&quot;/&gt;
+ &lt;xsl:template match=&quot;/doc:XMLDocument&quot;&gt;
+ &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;
+ &lt;head&gt;
+ &lt;title&gt;HTML-Dokument&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;body&gt;
+ &lt;xsl:for-each select=&quot;doc:Paragraph&quot;&gt;
+ &lt;p&gt;
+ &lt;xsl:value-of select=&quot;child::text()&quot;/&gt;
+ &lt;/p&gt;
+ &lt;/xsl:for-each&gt;
+ &lt;/body&gt;
+ &lt;/html&gt;
+ &lt;/xsl:template&gt;
+&lt;/xsl:stylesheet&gt;&lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xhtml+xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+ &lt;/CreateTransformsInfo&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>F&uuml;r das zweite zu signierende Datenobjekt werden die Referenz-Eingangsdaten wiederum mittels <code>DataObject/@Reference</code> referenziert, d. h. MOA SS l&ouml;st die darin enthaltene URL auf, um zu den Daten zu gelangen. Es handelt sich dabei um ein <a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.xml" target="_blank">XML-Dokument</a>.</p>
+<p>Zun&auml;chst soll von diesem XML-Dokument jedoch ein Teil weggeschnitten werden, da er nicht mitsigniert werden soll. F&uuml;r diesen Zweck bietet sich die<a href="http://www.w3.org/TR/2002/REC-xmldsig-filter2-20021108/" target="_blank" class="term"> XPath Filter 2 Transformation</a> an. Das Attribut <code>dsig:Transform/@Algorithm</code> ist dazu auf den Wert <code>http://www.w3.org/2002/06/xmldsig-filter2</code> zu setzen. Diese Transformation ben&ouml;tigt weiters Transformationsparameter. Diese werden als Kindelement <code>xp2:XPath</code> in <code>dsig:Transform</code> angegeben. Das Attribut <code>Filter</code> selektiert den Filtermodus; f&uuml;r das Bespiel wird den Modus <code>subtract</code> ben&ouml;tigt, da ein Teil weggefiltert werden soll. Der Textinhalt von <code>xp2:XPath</code> ist ein XPath-Ausdruck, der den Wurzelknoten jenes Teilbaums selektiert, der weggefiltert werden soll. F&uuml;r das Beispiel soll das zweite <code>doc:Paragraph</code> Element des XML-Dokuments weggefiltert werden. Beachten Sie, dass das im XPath-Ausdruck verwendete Namespace-Prefix <code>doc</code> im Kontext des <code>xp2:XPath</code> Elements deklariert sein muss.</p>
+<p>Als n&auml;chstes soll nun das XML-Dokument mit Hilfe eines Stylesheets in ein XHTML-Dokument &uuml;bergef&uuml;hrt werden. Dazu kann die <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-XSLT" target="_blank" class="term">XSLT Transformation</a> verwendet werden. Das Attribut <code>dsig:Transform/@Algorithm</code> ist dazu auf den Wert <code>http://www.w3.org/TR/1999/REC-xslt-19991116</code> zu setzen. Auch diese Transformation ben&ouml;tigt Transformationsparameter: Als Kindelement von <code>dsig:Transform</code> wird jener Stylesheet angegeben, mit dem die Stylesheet-Transformation ausgef&uuml;hrt werden soll.</p>
+<p>Abschlie&szlig;end soll, wie in der Spezifikation der<span class="term"> XSLT-Transformation</span> <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-XSLT" target="_blank">empfohlen</a>, eine Kanonisierungstransformation angewendet werden. Damit k&ouml;nnen Unterschiede im Output unterschiedlicher XSLT-Engines, wie sie in der Praxis vorkommen, abgefangen werden. Beachten Sie, dass als Voraussetzung dazu die Output-Methode im Stylesheet auf <code>xml</code> festgelegt werden muss (<code>&lt;xsl:output method=&quot;xml&quot;&gt;</code>), denn nur XML-Output kann anschlie&szlig;end kanonisiert werden. Das Attribut <code>dsig:Transform/@Algorithm</code> ist f&uuml;r die <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-c14nAlg" target="_blank"><span class="term">Canonical XML Transformation</span></a> auf den Wert http://www.w3.org/TR/2001/REC-xml-c14n-20010315 zu setzen. Die Transformation ben&ouml;tigt keine Transformationsparameter.</p>
+<p>Das Ergebnis der drei hintereinandergeschalteten Transformationen, welches der Hashwert-Berechnung zuflie&szlig;t, finden Sie <a href="../../clients/webservice/resources/requests/transformResults/CreateXMLSignatureRequest.Transforms.hashinput.ref2.txt" target="_blank">hier</a>. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Transforms.resp.xml" target="_blank">CreateXMLSignatureRequest.Transforms.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;CreateXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignatureEnvironment&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+</pre>
+<p>Die Antwort enth&auml;lt in <code>SignatureEnvironment</code> das Ergebnis der Signaturerstellung. Nachdem die Signatur in kein bestehendes Dokument eingef&uuml;gt werden sollte, enh&auml;lt <code>SignatureEnvironment</code> direkt die erzeugte XML-Signatur (<code>dsig:Signature</code>).</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;http://localhost:8080/referencedData/Text.b64&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#base64&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;a53jOsL7KbyltpByAK87FoMZphI=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Die erste <code>dsig:Reference</code> wurde auf Grund des ersten <code>DataObjectInfo</code> im Request erstellt. Man erkennt dass die URL auf die Referenz-Eingangsdaten (Wert des Attributs <code>dsig:Reference/@URI</code>) aus <code>DataObject/@Reference</code> &uuml;bernommen und eine <span class="term">Base64 Decoding Transformation</span> eingef&uuml;gt w&uuml;rde. Die im Request spezifizierten Transformationen werden also eins zu eins in die XML-Signatur &uuml;bernommen.</p>
+<pre>
+ &lt;dsig:Reference Id=&quot;reference-1-2&quot; URI=&quot;http://localhost:8080/referencedData/XMLDocument.xml&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;
+ &lt;xp2:XPath Filter=&quot;subtract&quot; xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;
+ xmlns:xf2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;
+ xmlns:xp2=&quot;http://www.w3.org/2002/06/xmldsig-filter2&quot;&gt;/doc:XMLDocument/doc:Paragraph[2]&lt;/xp2:XPath&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot;
+ xmlns:doc=&quot;urn:document&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:output encoding=&quot;UTF-8&quot; indent=&quot;yes&quot; method=&quot;xml&quot;/&gt;
+ &lt;xsl:template match=&quot;/doc:XMLDocument&quot;&gt;...&lt;/xsl:template&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;fIPwneCpjVqTXwHMN9DFfx6tJIU=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+</pre>
+<p>Die zweite <code>dsig:Reference</code> wurde auf Grund des zweiten <code>DataObjectInfo</code> im Request erstellt. Man erkennt auch hier gut, dass die URL auf die Referenz-Eingangsdaten (Wert des Attributs <code>dsig:Reference/@URI</code>) aus <code>DataObject/@Reference</code> &uuml;bernommen und die drei Transformationen wie im Request angegeben eingef&uuml;gt wurden. </p>
+<h4><a name="webservice_xmlrequests_erstellungxml_ergaenzungsobjekte"></a>2.1.1.4 Erg&auml;nzungsobjekte </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.xml" target="_blank"><code>CreateXMLSignatureRequest.Supplements.xml</code></a>) stellt die Verwendung von Erg&auml;nzungsobjekten vor. Ein Erg&auml;nzungsobjekt betrifft entweder ein zu signierendes Datum (Zusammenhang mit einem <code>DataObject</code>) oder jenes Dokument, in das eine zu erzeugende Signatur eingef&uuml;gt werden soll (Zusammenhang mit <code>CreateSignatureEnvironment</code>). Es muss dann angegeben werden, wenn in einem zu signierenden Datum bzw. im Einf&uuml;gedokument auf Daten per Referenz verwiesen wird, diese referenzierten Daten aber von MOA SS nicht aufgel&ouml;st werden k&ouml;nnen. Das Erg&auml;nzungsobjekt enth&auml;lt dann genau diese Daten, die nicht von MOA SS aufgel&ouml;st werden k&ouml;nnen.</p>
+<pre>
+&lt;CreateXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;KeyIdentifier&gt;KG_allgemein&lt;/KeyIdentifier&gt;
+ &lt;SingleSignatureInfo SecurityLayerConformity=&quot;false&quot;&gt;
+</pre>
+<p>Die Signatur soll mit dem Schl&uuml;ssel <code>KG_allgemein</code> erstellt werden; jene Elemente, die speziell f&uuml;r eine Security-Layer V1.1 konforme Signatur notwendig sind (vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple" class="term">Einfaches Beispiel</a>), brauchen nicht erstellt zu werden (<code>SecurityLayerConformity=&quot;false&quot;</code>).</p>
+<pre>
+ &lt;DataObjectInfo Structure=&quot;detached&quot;&gt;
+ &lt;DataObject Reference=&quot;#Para2&quot;/&gt;
+</pre>
+<p>Das zu signierende Datum in diesem Beispiel ist ein Teil des Dokuments, in das die zu erstellende Signatur eingef&uuml;gt werden soll. Der Wert des <code>Reference</code> Attributs ist <code>#Para2</code>, das bedeutet, dass jenes Element des Einf&uuml;gedokuments signiert werden soll, das ein ID-Attribut mit dem Wert <code>#Para2</code> aufweist. Damit MOA SS diesen Hinweis auswerten kann, muss es das Einf&uuml;gedokument validierend parsen, denn sonst w&uuml;sste es ja nicht, welche Attribute &uuml;berhaupt ID-Attribute sind. Das zum validierenden Parsen notwendige XML-Schema wird MOA SS in diesem Beispiel &uuml;ber ein Erg&auml;nzungsobjekt zum Einf&uuml;gedokument mitgeteilt (siehe weiter unten). </p>
+<pre>
+ &lt;CreateTransformsInfoProfile&gt;
+ &lt;CreateTransformsInfo&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;XMLDocument.Para.xsl&quot;/&gt;
+&lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;FinalDataMetaInfo&gt;
+ &lt;MimeType&gt;application/xhtml+xml&lt;/MimeType&gt;
+ &lt;/FinalDataMetaInfo&gt;
+</pre>
+<p>Das Beispiel enth&auml;lt als erste Transformation eine <span class="term">XSLT-Transformation</span>. Der als Kindelement von <code>dsig:Transform</code> angegebene Stylesheet verweist dabei mittels <code>xsl:include</code> auf einen weiteren Stylesheet. Dieser weitere Stylesheet kann jedoch von MOA nicht direkt aufgel&ouml;st werden, da er als relative Referenz angegeben wird. Deshalb ist es notwendig, diesen weiteren Stylesheet als Erg&auml;nzungsobjekt zu den signierenden Daten anzugeben:</p>
+<pre>
+ &lt;/CreateTransformsInfo&gt;
+ &lt;Supplement&gt;
+ &lt;Content Reference=&quot;XMLDocument.Para.xsl&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.Para.xsl&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/Supplement&gt;
+ &lt;/CreateTransformsInfoProfile&gt;
+ &lt;/DataObjectInfo&gt;
+</pre>
+<p>Ein Erg&auml;nzungsobjekt f&uuml;r zu signierende Daten wird im entsprechenden <code>DataObjectInfo</code> Element angegeben, und zwar als Inhalt des Elements <code>CreateTransformsInfoProfile/Supplement</code>. Das verpflichtend zu verwendende Attribut <code>Content/@Reference</code> enth&auml;lt dabei die Referenz auf das Erg&auml;nzungsobjekt in exakt jener Schreibweise, wie sie in der <code>xsl:include</code> Direktive vorkommt, hier also <code>XMLDocument.Para.xsl</code>. Das Element <code>Content</code> beinhaltet das Erg&auml;nzungsobjekt so, wie es MOA SS verwenden soll (Elemente <code>Base64Content</code> oder <code>XMLContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>), bzw. enth&auml;lt eine von MOA SS aufl&ouml;sbare Referenz auf das Erg&auml;nzungsobjekt (Element <code>LocRefContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>). Im konkreten Beispiel wird <code>LocRefContent</code> verwendet. </p>
+<pre>
+ &lt;CreateSignatureInfo&gt;
+ &lt;CreateSignatureEnvironment
+ Reference=&quot;http://localhost:8080/referencedData/XMLDocument.withSchemaHint.xml&quot;/&gt;
+ &lt;CreateSignatureEnvironmentProfile&gt;
+ &lt;CreateSignatureLocation
+ Index=&quot;4&quot; xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument&lt;/CreateSignatureLocation&gt;
+</pre>
+<p>Eingef&uuml;gt werden soll die zu erzeugende Signatur in ein <a href="../../clients/common/referencedData/XMLDocument.withSchemaHint.xml" target="_blank">bestehendes Dokument</a>, das MOA SS durch Aufl&ouml;sen der in <code>CreateSignatureEnvironment/@Reference</code> angegebenen URL erh&auml;lt. Eingef&uuml;gt werden soll die Signatur als f&uuml;nfter Kindknoten des Wurzelelements <code>doc:XMLDocument</code>. Beachten Sie wiederum die <a href="#webservice_xmlrequests_erstellungxml_daten_hinweisCreateSignatureLocation">Hinweise</a> zur Z&auml;hlweise f&uuml;r das Attribut <code>Index</code> bzw. zur Deklaration der im XPath-Ausdruck verwendeten Namespace-Deklarationen (hier <code>doc</code>). </p>
+<pre>
+ &lt;Supplement&gt;
+ &lt;Content Reference=&quot;urn:XMLDocument.xsd&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.xsd&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/Supplement&gt;
+ &lt;/CreateSignatureEnvironmentProfile&gt;
+ &lt;/CreateSignatureInfo&gt;
+</pre>
+<p>Wie oben bereits angemerkt, muss MOA SS zur Aufl&ouml;sung der ID-Referenz <code>#Para2</code> das Einf&uuml;gedokument validierend parsen. Im Einf&uuml;gedokument ist zwar nun ein Hinweis auf die dazu notwendige Grammatikinformation in Form eines XML-Schemas enthalten (Attribut <code>xsi:schemaLocation</code> enth&auml;lt den Wert <code>&quot;urn:document urn:XMLDocument.xsd&quot;</code>). Nachdem die darin angegebene URI <code>urn:XMLDocument.xsd</code> jedoch von MOA nicht direkt aufgel&ouml;st werden kann, wird im Request ein Erg&auml;nzungsobjekt zum Einf&uuml;gedokument angegeben (<code>CreateSignatureEnvironmentProfile/Supplement</code>). Das Attribut <code>Content/@Reference</code> enth&auml;lt die Referenz auf das Erg&auml;nzungsobjekt in exakt jener Schreibweise, wie sie im Attribut <code>xsi:schemaLocation</code> angegeben wurde (<code>urn:XMLDocument.xsd</code>). Das Element <code>Content</code> beinhaltet das Erg&auml;nzungsobjekt so, wie es MOA SS verwenden soll (Elemente <code>Base64Content</code> oder <code>XMLContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>), bzw. enth&auml;lt eine von MOA SS aufl&ouml;sbare Referenz auf das Erg&auml;nzungsobjekt (Element <code>LocRefContent</code>, vergleiche <a href="#webservice_xmlrequests_erstellungxml_simple"><span class="term">Einfaches Beispiel</span></a>). Im konkreten Beispiel wird <code>LocRefContent</code> verwendet. </p>
+<p>Beachten Sie bitte, dass die Verwendung von Erg&auml;nzungsobjekten f&uuml;r die Mitteilung von XML-Schemata nur dann funktioniert, wenn die Referenz auf das XML-Schema in der <code>xsi:schemaLocation</code> eine absolute URI ist (also z.B. wie hier <code>urn:XMLDocument.xsd</code> oder auch <code>http://example.org/XMLDocument.xsd</code>, nicht aber z.B. <code>XMLDocument.xsd</code> oder <code>../schemas/XMLDocument.xsd</code>).</p>
+<p>Auch f&uuml;r das Aufl&ouml;sen eines Verweises in einer DTD kann in analoger Weise von Erg&auml;nzungsobjekten Gebrauch gemacht werden. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/CreateXMLSignatureRequest.Supplements.resp.xml" target="_blank">CreateXMLSignatureRequest.Supplements.resp.xml</a></code> ist eine typische Response des SS Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h3><a name="webservice_xmlrequests_pruefungcms" id="webservice_xmlrequests_pruefungcms"></a>2.1.2 Pr&uuml;fung einer CMS-Signatur</h3>
+<h4><a name="webservice_xmlrequests_pruefungcms_einfach" id="webservice_xmlrequests_pruefungcms_einfach"></a>2.1.2.1 Einfaches Beispiel</h4>
+<h5>Request</h5>
+<p>Dieses Beispiel (<a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.xml" target="_blank"><code>VerifyCMSSignatureRequest.Simple.xml</code></a>) ist ein einfacher Request zur Pr&uuml;fung einer CMS-Signatur. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass der nachfolgende Ausschnitt aus dem Request aus Gr&uuml;nden der &Uuml;bersichtlichkeit gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyCMSSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;CMSSignature&gt;MIIHsAYJKo...4sLL6kpOPJaLg==&lt;/CMSSignature&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyCMSSignatureRequest&gt;
+</pre>
+<p>Der Request enth&auml;lt zun&auml;chst in <code>CMSSignature</code> die zu pr&uuml;fende CMS-Signatur, und zwar in base64 kodierter Form. In diesem Beispiel wird davon ausgegangen, dass es sich dabei um eine <span class="term">Enveloping</span> Signature handelt, d. h. dass die signierten Daten als Teil der CMS-Struktur vorhanden sind. F&uuml;r die Behandlung einer <span class="term">Detached</span> Signature sei auf das <a href="#webservice_xmlrequests_pruefungcms_detached">n&auml;chste Beispiel</a> verwiesen.</p>
+<p>Abschlie&szlig;end enth&auml;lt der Request in <code>TrustProfileID</code> die Angabe des Vertrauensprofils, gegen das die Vertrauenspr&uuml;fung des Zertifikats durchgef&uuml;hrt werden soll. Ein Vertrauensprofil mit dem angegebenen Namen muss in der f&uuml;r die Signaturpr&uuml;fung verwendeten Instanz von MOA SP eingerichtet sein. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Simple.resp.xml" target="_blank">VerifyCMSSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyCMSSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;
+ &lt;dsig:X509SubjectName&gt;serialNumber=615536615920,givenName=Gregor,SN=Karlinger,
+CN=Gregor Karlinger,C=AT&lt;/dsig:X509SubjectName&gt;
+ &lt;dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509IssuerName&gt;CN=TrustSignTest-Sig-01,OU=TrustSignTest-Sig-01,
+O=A-Trust Ges. für Sicherheitssysteme im elektr. Datenverkehr GmbH,C=AT&lt;/dsig:X509IssuerName&gt;
+ &lt;dsig:X509SerialNumber&gt;2892&lt;/dsig:X509SerialNumber&gt;
+ &lt;/dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
+ &lt;QualifiedCertificate/&gt;
+ &lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der CMS-Signatur enthaltenen Signatorzertifikat entnommen sind. </p>
+<p><code>dsig:X509SubjectName</code> ist immer vorhanden und enth&auml;lt den Namen des Signators. <code>dsig:X509IssuerSerial</code> ist ebenfalls immer vorhanden und enth&auml;lt den Namen des Austellers des Signatorzertifikats (<code>dsig:X509IssuerName</code>) sowie die Seriennummer des Zertifikats (<code>dsig:X509SerialNumber</code>). Auch <code>dsig:X509Certificate</code> ist immer vorhanden und enth&auml;lt das Signatorzertifikat in base64 kodierter Form. </p>
+<p>Optional vorhanden ist das inhaltslose Element <code>QualifiedCertificate</code>, und zwar dann, wenn es sich beim Signatorzertifikat um ein qualifiziertes Zertifikat handelt. Ebenfalls optional vorhanden ist schlie&szlig;lich - in diesem Beispiel nicht ersichtlich - das Element <code>PublicAuthority</code>, und zwar dann, wenn das Signatorzertifikat die &ouml;sterreichspezifische Zertifikatserweiterung <a href="http://www.cio.gv.at/it-infrastructure/pki/" target="_blank">Verwaltungseigenschaft</a> aufweist. Ist in dieser Zertifikatserweiterung das Verwaltungskennzeichen mitkodiert, wird dieses Kennzeichen als Textinhalt des optionalen Elements <code>PublicAuthority/Code</code> geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p> Anschlie&szlig;end an <code>SignerInfo</code> enth&auml;lt die Response mit <code>SignatureCheck/Code</code> das Resultat der kryptographischen Pr&uuml;fung der Signatur. In unserem Beispiel ist dort der Wert <code>0</code> enthalten, d. h. die Signatur konnte erfolgreich validiert werden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;1&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+</pre>
+<p>Abschlie&szlig;end enth&auml;lt die Response mit <code>CertificateCheck/Code</code> das Resultat der Pr&uuml;fung des Signatorzertifikats. Zun&auml;chst pr&uuml;ft MOA SP, ob ausgehend vom Signatorzertifikat eine Zertifikatskette zu einem im zugeh&ouml;rigen Vertrauensprofil konfigurierten sog. <span class="term">Trust Anchor</span> gebildet werden kann. Gelingt dies, wird die G&uuml;ltigkeit jedes Zertifikats dieser Kette &uuml;berpr&uuml;ft. In unserem Beispiel enth&auml;lt <code>Code</code> den Wert <code>1</code>, d. h. MOA SP konnte die oben erl&auml;uterte Zertifikatskette nicht bilden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<h4><a name="webservice_xmlrequests_pruefungcms_erweitert" id="webservice_xmlrequests_pruefungcms_erweitert"></a>2.1.2.2 Erweitertes Beispiel</h4>
+<h5>Request</h5>
+<p>Dieses erweiterte Beispiel zur Pr&uuml;fung einer CMS-Signatur (<a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.xml" target="_blank"><code>VerifyCMSSignatureRequest.Extended.xml</code></a>) demonstriert die Pr&uuml;fung mehrerer Signatoren einer CMS-Signatur, die Angabe des Pr&uuml;fzeitpunkts sowie die Pr&uuml;fung einer <span class="term">Detached Signature</span>, d. h. einer Signatur, in der die signierten Daten nicht enthalten sind und daher extra angegeben werden m&uuml;ssen. </p>
+<pre>
+&lt;VerifyCMSSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ Signatories=&quot;1&quot;&gt;
+ &lt;DateTime&gt;2004-08-17T08:00:00+02:00&lt;/DateTime&gt;
+ &lt;CMSSignature&gt;MIIHiwYJKoZI...kfiwsvqSk48lou&lt;/CMSSignature&gt;
+ &lt;DataObject&gt;
+ &lt;Content&gt;
+ &lt;Base64Content&gt;RGllc2UgRGF0ZW4gd2FyZW4gYmFzZTY0IGtvZGllcnQu&lt;/Base64Content&gt;
+ &lt;/Content&gt;
+ &lt;/DataObject&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyCMSSignatureRequest&gt;
+</pre>
+<p> Liegt eine zu pr&uuml;fende CMS-Signatur vor, die von mehreren Unterzeichnenden signiert worden ist, kann das Attribut <code>VerifyCMSSignatureRequest/@Signatories</code> verwendet werden, um jene Unterzeichnenden auszuw&auml;hlen, deren Unterschriften von MOA SP gepr&uuml;ft werden sollen. Der Default-Wert f&uuml;r dieses optionale Attribut ist <code>1</code>. Soll nicht die Unterschrift allein des ersten Unterzeichnenden gepr&uuml;ft werden, muss das Attribut explizit angegeben werden. Es enth&auml;lt dann eine oder mehrere Ganzzahlwerte, getrennt durch Leerzeichen. Jede Ganzzahl bezeichnet einen Unterzeichnenden, wobei die Reihenfolge der Auflistung der Unterzeichner in der CMS-Signatur entspricht. Der Wert <code>&quot;1 3&quot;</code> w&uuml;rde beispielsweise aussagen, dass MOA SP die Unterschrift des ersten sowie des dritten Unterzeichnenden pr&uuml;fen soll.</p>
+<p>Mit dem optionalen Element <code>DateTime</code> kann der Zeitpunkt der Signaturpr&uuml;fung explizit vorgegeben werden. Inhalt dieses Elements ist die Angabe von Datum und Uhrzeit entsprechend dem XML-Schema Datentyp <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime" target="_blank"><span class="term">dateTime</span></a>. Enth&auml;lt der angegebene Zeitpunkt keinen Zeitzonen-Offset zur UTC, wird der Zeitpunkt als lokale Zeit des Servers interpretiert, auf dem MOA SP l&auml;uft. Wird <code>DateTime</code> nicht angegeben, versucht MOA SP, den Zeitpunkt der Signaturerstellung aus der Signatur zu ermitteln (anhand des Signaturattributs <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#ref-etsicms" target="_blank" class="term">SigningTime</a>). Enth&auml;lt die Signatur keinen Zeitpunkt der Signaturerstellung, verwendet MOA SP die aktuelle Systemzeit des Servers, auf dem es l&auml;uft. </p>
+<p>Das optionale Element <code>DataObject</code> muss dann angegeben werden, wenn eine <span class="term">Detached Signature</span> gepr&uuml;ft werden soll, d. h. wenn in der CMS-Signatur die signierten Daten nicht mitkodiert sind. In <code>DataObject/Content/Base64Content</code> sind in einem solchen Fall diese Daten in base64 kodierter Form bereit zu stellen.</p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyCMSSignatureRequest.Extended.resp.xml" target="_blank">VerifyCMSSignatureRequest.Extended.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h3><a name="webservice_xmlrequests_pruefungxml"></a>2.1.3 Pr&uuml;fen einer XML-Signatur</h3>
+<h4><a name="webservice_xmlrequests_pruefungxml_einfach"></a>2.1.3.1 Einfaches Beispiel</h4>
+<h5>Request</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.xml" target="_blank">VerifyXMLSignatureRequest.Simple.xml</a></code> ist ein einfacher XML-Request zur Pr&uuml;fung einer XML-Signatur. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod
+ Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;tLODyeiWFbAkQKwhrR23jtcgu4k=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;...&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten werden signiert.&lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt jenes XML-Dokument, das die zu pr&uuml;fende XML-Signatur enth&auml;lt. Auch hier stehen eine Reihe von M&ouml;glichkeiten zur Verf&uuml;gung, dieses XML-Dokument anzugeben. Im Beispiel wurde das Element <code>XMLContent</code> verwendet; alternativ stehen die Elemente <code>Base64Content</code> und <code>LocRefContent</code> bzw. gleichwertig zu <code>LocRefContent</code> das Attribut <code>Reference</code> zur Verf&uuml;gung.</p>
+<p>Im konkreten Beispiel enth&auml;lt das angegebene XML-Dokument direkt als Root-Element die zu pr&uuml;fende Signatur (<code>dsig:Signature</code>). Es handelt sich dabei um eine <span class="term">Enveloping Signature</span>, d. h. die signierten Daten sind in einem <code>dsig:Object</code> als Teil der XML-Struktur der Signatur kodiert. Tats&auml;chlich signiert ist hier die Zeichenkette <code>Diese Daten werden signiert.</code></p>
+<pre>
+ &lt;VerifySignatureLocation
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> enth&auml;lt als Text den XPath-Ausdruck zur Selektion der XML-Signatur innerhalb des zu pr&uuml;fenden XML-Dokuments. Die Auswertung des XPath-Ausdrucks muss genau ein Element <code>dsig:Signature</code> ergeben. Bitte beachten Sie, dass im Kontext des Elements <code>VerifySignatureLocation</code> alle im XPath-Ausdruck verwendeten Namespace-Pr&auml;fixe bekannt sein m&uuml;ssen (hier das Pr&auml;fix <code>dsig</code>). </p>
+<pre>
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das Element <code>TrustProfileID</code> schlie&szlig;lich enth&auml;lt den Bezeichner des Vertrauensprofils, gegen das die Zertifikatspr&uuml;fung von MOA SP durchgef&uuml;hrt wird. Ein Vertrauensprofil enth&auml;lt die Zertifikate jene Zertifizierungsdiensteanbieter, denen als Aussteller von Signatorzertifikaten vertraut wird. Ein Vertrauensprofil mit dem gew&auml;hlten Namen (hier <code>Test-Signaturdienste</code>) muss in der Konfiguration von MOA SP hinterlegt sein. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Simple.resp.xml" target="_blank">VerifyXMLSignatureRequest.Simple.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;
+ &lt;dsig:X509SubjectName&gt;CN=Test: Signaturdienst aller Kunden: ECDSA (P192v1),OU=Technik und Standards,
+ O=Stabsstelle IKT-Strategie des Bundes,C=AT&lt;/dsig:X509SubjectName&gt;
+ &lt;dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509IssuerName&gt;CN=Test CA - Signaturdienste,OU=Technik und Standards,
+ O=Stabstelle IKT-Strategie des Bundes,C=AT&lt;/dsig:X509IssuerName&gt;
+ &lt;dsig:X509SerialNumber&gt;9&lt;/dsig:X509SerialNumber&gt;
+ &lt;/dsig:X509IssuerSerial&gt;
+ &lt;dsig:X509Certificate&gt;...&lt;/dsig:X509Certificate&gt;
+ &lt;PublicAuthority&gt;
+ &lt;Code&gt;BKA-IKT&lt;/Code&gt;
+ &lt;/PublicAuthority&gt;
+ &lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind. </p>
+<p><code>dsig:X509SubjectName</code> ist immer vorhanden und enth&auml;lt den Namen des Signators. <code>dsig:X509IssuerSerial</code> ist ebenfalls immer vorhanden und enth&auml;lt den Namen des Austellers des Signatorzertifikats (<code>dsig:X509IssuerName</code>) sowie die Seriennummer des Zertifikats (<code>dsig:X509SerialNumber</code>). Auch <code>dsig:X509Certificate</code> ist ist immer vorhanden und enth&auml;lt das Signatorzertifikat in base64 kodierter Form. </p>
+<p>Optional vorhanden - in diesem Beispiel nicht ersichtlich - ist das inhaltslose Element <code>QualifiedCertificate</code>, und zwar dann, wenn es sich beim Signatorzertifikat um ein qualifiziertes Zertifikat handelt. Ebenfalls optional vorhanden ist schlie&szlig;lich das Element <code>PublicAuthority</code>, und zwar dann, wenn das Signatorzertifikat die &ouml;sterreichspezifische Zertifikatserweiterung <a href="http://www.cio.gv.at/it-infrastructure/pki/" target="_blank">Verwaltungseigenschaft</a> aufweist. Ist in dieser Zertifikatserweiterung das Verwaltungskennzeichen mitkodiert, wird dieses Kennzeichen als Textinhalt des optionalen Elements <code>PublicAuthority/Code</code> geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p> Anschlie&szlig;end an <code>SignerInfo</code> enth&auml;lt die Response mit <code>SignatureCheck/Code</code> das Resultat der kryptographischen Pr&uuml;fung der Signatur. In unserem Beispiel ist dort der Wert <code>0</code> enthalten, d. h. die Signatur konnte erfolgreich validiert werden. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachXMLDSIGAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+</pre>
+<p>Abschlie&szlig;end enth&auml;lt die Response mit <code>CertificateCheck/Code</code> das Resultat der Pr&uuml;fung des Signatorzertifikats. Zun&auml;chst pr&uuml;ft MOA SP, ob ausgehend vom Signatorzertifikat eine Zertifikatskette zu einem im zugeh&ouml;rigen Vertrauensprofil konfigurierten sog. <span class="term">Trust Anchor</span> gebildet werden kann. Gelingt dies, wird die G&uuml;ltigkeit jedes Zertifikats dieser Kette &uuml;berpr&uuml;ft. In unserem Beispiel enth&auml;lt <code>Code</code> den Wert <code>0</code>, d. h. MOA SP konnte die Kette bilden, und alle Zertifikate der Kette sind g&uuml;ltig. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachCMSAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_erweitert"></a>2.1.3.2 Erweitertes Beispiel </h4>
+<h5>Request</h5>
+<p>Dieses erweiterte Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.xml" target="_blank"><code>VerifyXMLSignatureRequest.Enveloped.xml</code></a>) demonstriert die Pr&uuml;fung einer <span class="term">Enveloped Signature</span>, d. h. einer Signatur, die in ein XML-Dokument integriert ist, die Angabe des Pr&uuml;fzeitpunkts sowie die Anweisung an MOA SP, in der Response die von der Signatur abgedeckten Daten zu retournieren.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;DateTime&gt;2004-08-18T17:00:00+02:00&lt;/DateTime&gt;
+</pre>
+<p>Mit dem optionalen Element <code>DateTime</code> kann der Zeitpunkt der Signaturpr&uuml;fung explizit vorgegeben werden. Inhalt dieses Elements ist die Angabe von Datum und Uhrzeit entsprechend dem XML-Schema Datentyp <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#dateTime" target="_blank"><span class="term">dateTime</span></a>. Enth&auml;lt der angegebene Zeitpunkt keinen Zeitzonen-Offset zur UTC, wird der Zeitpunkt als lokale Zeit des Servers interpretiert, auf dem MOA SP l&auml;uft. Wird <code>DateTime</code> nicht angegeben, versucht MOA SP, den Zeitpunkt der Signaturerstellung aus der Signatur zu ermitteln (anhand des Signaturattributs <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#ref-etsicms" target="_blank" class="term">SigningTime</a>). Enth&auml;lt die Signatur keinen Zeitpunkt der Signaturerstellung, verwendet MOA SP die aktuelle Systemzeit des Servers, auf dem es l&auml;uft.</p>
+<pre>
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment Reference=&quot;http://localhost:8080/referencedData/XMLDocument.signed.xml&quot;/&gt;
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt in diesem Fall mit dem Attribut <code>Reference</code> eine Referenz auf das XML-Dokument (<code><a href="../../clients/common/referencedData/XMLDocument.signed.xml" target="_blank">XMLDocument.signed.xml</a></code>), das die zu pr&uuml;fende Signatur beinhaltet. Als Textinhalt von <code>VerifySignatureLocation</code> ist ein XPath-Ausdruck angegeben, der die zu pr&uuml;fende Signatur innerhalb des XML-Dokuments ausw&auml;hlt. Bitte beachten Sie, dass im Kontext des Elements <code>VerifySignatureLocation</code> alle im XPath-Ausdruck verwendeten Namespace-Pr&auml;fixe bekannt sein m&uuml;ssen (hier die Pr&auml;fixe <code>doc</code> und <code>dsig</code>). </p>
+<pre>
+ &lt;ReturnHashInputData/&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Durch Angabe des optionalen, leeren Elements <code>ReturnHashInputData</code> wird MOA SP angewiesen, im Response jene Daten zur&uuml;ckzuliefern, die von der Signatur abgedeckt sind, d. h. tats&auml;chlich signiert wurden (siehe unten). Diese Information ist f&uuml;r die MOA SP verwendende Anwendung essentiell, da sie wissen muss, ob tats&auml;chlich die von ihr geforderten Daten signiert wurden. Wird <code>HashInputData</code> im Request nicht angegeben, muss die Anwendung selbst die Signatur analysieren, um diese Information zu erhalten. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Enveloped.resp.xml" target="_blank">VerifyXMLSignatureRequest.Enveloped.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;...&lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;HashInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;Base64Content&gt;PGRvYzp...hNTERvY3VtZW50Pg==&lt;/Base64Content&gt;
+ &lt;/HashInputData&gt;
+</pre>
+<p>Wurde im Request - so wie in diesem Beispiel - das Element <code>ReturnHashInputData</code> angegeben, enth&auml;lt
+ die Response nach <code>SignerInfo</code> f&uuml;r jede <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> der
+ XML-Signatur (bzw. auch f&uuml;r jede <code>dsig:Reference</code> aus einem <code>dsig:Manifest</code>, auf
+ das mittels des Attributs <code>Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot;</code> in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen
+ wird; solche Manifeste kommen aber in diesem Beispiel nicht vor) ein Element <code>HashInputData</code>.</p>
+<p>Die Reihenfolge der <code>HashInputData</code>-Elemente
+ entspricht der Reihenfolge der <code>dsig:Reference</code>-Elemente in <code>dsig:SignedInfo</code> der
+ XML-Signatur (enth&auml;lt die XML-Signatur auch <code>dsig:Manifest</code>-Elemente, auf die jeweils in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen wird, werden zuerst <code>HashInputData</code>-Elemente f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ aus <code>dsig:SignedInfo</code> und anschlie&szlig;end <code>HashInputData</code>-Elemente f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ aus den einzelnen <code>dsig:Manifest</code>-Elementen geliefert). </p>
+<p>Das Attribut PartOf weist mit dem Wert SignedInfo darauf hin, dass die <code>dsig:Reference</code>,
+f&uuml;r welche die Hasheingangsdaten gelten, Teil von <code>dsig:SignedInfo</code> ist (f&uuml;r eine <code>dsig:Reference</code> aus
+einem <code>dsig:SignedInfo</code> w&uuml;rde der gelieferte Wert <code>XMLDSIGManifest</code> lauten; weiters
+w&uuml;rde<code> HashInputData</code> in einem solchen Fall ein weiteres Attribut
+
+
+<code>ReferringSigReference</code> aufweisen, dessen Wert die Nummer jener <code>dsig:Reference</code> aus <code>dsig:SignedInfo </code>als
+positive Ganzzahl repr&auml;sentiert, die auf das beinhaltende <code>dsig:Manifest</code> verweist.). </p>
+<p>Der Inhalt wird dabei stets mittels <code>Base64Content</code> in
+ base64-kodierter Form geliefert.</p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Die Elemente <code>SignatureCheck</code> und <code>CertificateCheck</code> enthalten die Resultate der kryptographischen Pr&uuml;fung der Signatur sowie der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_xmldsigmanifest"></a>2.1.3.3 Pr&uuml;fung eines XMLDSIG-Manifests </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.xml" target="_blank"><code>VerifyXMLSignatureRequest.XMLDSigManifest.xml</code></a>) demonstriert die Pr&uuml;fung eines in der XML-Signatur vorhandenden <a href="http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/#sec-Manifest" target="_blank">Manifests nach XMLDSig</a>. Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;dsig:Signature xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot; Id=&quot;signature-1-1&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ &lt;dsig:CanonicalizationMethod Algorithm=&quot;http://www.w3.org/TR/2001/REC-xml-c14n-20010315&quot;/&gt;
+ &lt;dsig:SignatureMethod
+ Algorithm=&quot;http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1&quot;/&gt;
+ &lt;dsig:Reference Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot; URI=&quot;#dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;nUUaW6OtcsNvV/QhqmkU2QXT1Mw=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;315gCwZI...OXFwr+&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object Id=&quot;signed-data-1-1-1&quot;&gt;Diese Daten sind signiert.&lt;/dsig:Object&gt;
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;dsig-manifest-1-1&quot;&gt;
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#xpointer(id(&apos;signed-data-1-1-1&apos;)/node())&quot;&gt;
+ &lt;dsig:DigestMethod Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#sha1&quot;/&gt;
+ &lt;dsig:DigestValue&gt;EYxznGxNRAIcHQeUsj+zsK+uaHA=&lt;/dsig:DigestValue&gt;
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt als <code>XMLContent</code> die zu pr&uuml;fende XML-Signatur. Man erkennt, dass sich die einzige <code>dsig:Reference</code> im <code>dsig:SignedInfo</code> der XML-Signatur auf ein Manifest nach XMLDSig bezieht (erkennbar am Attribut <code>Type</code>, das auf den Wert <code>http://www.w3.org/2000/09/xmldsig#Manifest</code> gesetzt ist). Im Response (siehe unten) werden wir deshalb ein eigenes Resultat f&uuml;r die Manifest-Pr&uuml;fung erhalten.</p>
+<p>Das Manifest selbst ist in einem <code>dsig:Object</code>, also innerhalb der XML-Struktur der XML-Signatur kodiert. Es enth&auml;lt eine <code>dsig:Reference</code>, welche sich auf die Zeichenkette <code>Diese Daten sind signiert.</code> bezieht.</p>
+<pre>
+ &lt;VerifySignatureLocation&gt;//dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus. Das Element <code>TrustProfileID</code> w&auml;hlt das Vertrauensprofil aus, gegen das die Zertifikatspr&uuml;fung durchgef&uuml;hrt werden soll. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml" target="_blank">VerifyXMLSignatureRequest.XMLDSigManifest.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;
+ &lt;dsig:X509Data&gt;...&lt;/dsig:X509Data&gt;
+ &lt;/SignerInfo&gt;
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>). Das Element<code> SignatureCheck</code> enth&auml;lt das Resultat der kryptographischen Pr&uuml;fung der Signatur (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;XMLDSIGManifestCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;Info&gt;
+ &lt;ReferringSigReference&gt;1&lt;/ReferringSigReference&gt;
+ &lt;/Info&gt;
+ &lt;/XMLDSIGManifestCheck&gt;
+</pre>
+<p>Neu ist in dieser Response das an <code>SignatureCheck</code> anschlie&szlig;ende Element <code>XMLDSIGManifestCheck</code>. Ein oder mehrere solche Elemente werden immer dann zur&uuml;ckgeliefert, wenn in <code>dsig:SignedInfo</code> der XML-Signatur <code>dsig:Reference</code> Elemente existieren, die sich auf ein Manifest nach XMLDSIG beziehen (siehe oben). Je solcher <code>dsig:Reference</code> enth&auml;lt die Antwort ein korrespondierendes Element <code>XMLDSIGManifestCheck</code>, im konkreten Beispiel als eines.</p>
+<p>Das Element <code>Code</code> gibt das Ergebnis der durchgef&uuml;hrten Pr&uuml;fung des XMLDSIG-Manifests an. In diesem Fall bedeutet <code>0</code>, dass die Pr&uuml;fung jeder <code>dsig:Reference </code>im <code>dsig:Manifest</code> (im konkreten Beispiel also genau einer <code>dsig:Reference</code>) erfolgreich durchgef&uuml;hrt werden konnte. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturpruefungNachXMLDSIGAntwort" target="_blank">Security-Layer 1.2</a>.</p>
+<p>Das Element <code>Info/ReferringSigReference</code> enth&auml;lt als Textinhalt die Nummer jenes <code>dsig:Reference</code> Elements in <code>dsig:SignedInfo</code> der XML-Signatur, welches auf das untersuchte Manifest nach XMLDSIG verweist, wobei mit <code>1</code> zu z&auml;hlen begonnen wird.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Das Element<code> CertificateCheck</code> enth&auml;lt das Resultat der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_ergaenzungsobjekte"></a>2.3.1.4 Erg&auml;nzungsobjekte </h4>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.xml" target="_blank"><code>VerifyXMLSignatureRequest.Supplements.xml</code></a>) demonstriert die Verwendung von Erg&auml;nzungsobjekten. Ein Erg&auml;nzungsobjekt betrifft entweder ein signiertes Datum (Zusammenhang mit einem <code>dsig:Reference</code> der XML-Signatur) oder jenes Dokument, in dem sich die zu pr&uuml;fende XML-Signatur befindet (Zusammenhang mit <code>VerifySignatureEnvironment</code>). Es muss dann angegeben werden, wenn auf ein signiertes Datum bzw. in einem signierten Datum bzw. in dem die XML-Signatur enthaltenden XML-Dokument auf weitere Daten per Referenz verwiesen wird, diese Referenz aber von MOA SP nicht aufgel&ouml;st werden kann. Das Erg&auml;nzungsobjekt enth&auml;lt dann genau diese Daten die nicht von MOA SS aufgel&ouml;st werden k&ouml;nnen.</p>
+<p>Bitte beachten Sie, dass der dargestellte Request zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;doc:XMLDocument ... xsi:schemaLocation=&quot;urn:document urn:XMLDocument.xsd&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;dsig:Signature Id=&quot;signature-1-1&quot; xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#Para2&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;5rXIIkbP/djWmTgQEICy...0Sf8jvnz+d&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt das XML-Dokument mit der zu pr&uuml;fenden XML-Signatur. </p>
+<p>Man erkennt, dass das Attribut <code>dsig:Reference/@URI</code> das Element<code> doc:Paragraph</code> mit dem auf den Wert <code>Para2</code> gesetzten ID-Attribut <code>ParaId</code> referenziert. MOA kann jedoch den Umstand, dass es sich bei <code>doc:Paragraph/@ParaId</code> um ein ID-Attribut handelt, nur dann erkennen, wenn es das XML-Dokument validierend parst. Der dazu n&ouml;tige Verweis auf das passende XML-Schema ist zwar mit dem Attribut <code>xsi:schemaLocation</code> vorhanden, jedoch handelt es sich dabei mit <code>urn:XMLDocument.xsd</code> um eine nicht aufl&ouml;sbare Referenz. Deshalb wird im Request ein passendes Erg&auml;nzungsobjekt ben&ouml;tigt (siehe unten).</p>
+<p>Weiters erkennt man, dass <code>dsig:Reference</code> ein XSLT-Transformation enth&auml;lt. Im darin kodierten Stylesheet-Parameter (<code>dsig:Transform/xsl:stylesheet</code>) wird ein weiterer Stylesheet inkludiert (<code>XMLDocument.Para.xsl</code>). Diese Referenz ist aber wiederum f&uuml;r MOA SP nicht aufl&ouml;sbar. Auch hier wird also ein passendes Erg&auml;nzungsobjekt ben&ouml;tigt (siehe unten). </p>
+<pre>
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus.</p>
+<pre>
+ &lt;SupplementProfile&gt;
+ &lt;Content Reference=&quot;XMLDocument.Para.xsl&quot;&gt;
+ &lt;LocRefContent&gt;http://localhost:8080/referencedData/XMLDocument.Para.xsl&lt;/LocRefContent&gt;
+ &lt;/Content&gt;
+ &lt;/SupplementProfile&gt;
+</pre>
+<p>Das erste Element <code>SupplementProfile</code> enth&auml;lt nun das Erg&auml;nzungsobjekt f&uuml;r den oben beschriebenen inkludierten Stylesheet. <code>Content/@Reference</code> enth&auml;lt die Referenz genau so, wie sie oben im Attribut <code>xsl:stylesheet/@href</code> angegeben wurde. Im Inhalt von <code>Content</code> werden entweder explizit jene Daten angegeben, die von MOA statt des Aufl&ouml;sens der Referenz verwendet werden sollen (<code>Base64Content</code> oder<code> XMLContent</code>), oder aber es wird - wie im konkreten Beispiel - <code></code>mit <code>LocRefContent</code> eine aufl&ouml;sbare Referenz f&uuml;r diese Daten an MOA SP &uuml;bergeben. </p>
+<pre>
+ &lt;SupplementProfile&gt;
+ &lt;Content Reference=&quot;urn:XMLDocument.xsd&quot;&gt;
+ &lt;XMLContent&gt;
+ &lt;xs:schema targetNamespace=&quot;urn:document&quot; xmlns:xs=&quot;http://www.w3.org/2001/XMLSchema&quot;
+ xmlns=&quot;urn:document&quot; elementFormDefault=&quot;qualified&quot; attributeFormDefault=&quot;unqualified&quot;&gt;
+ ...
+ &lt;/xs:schema&gt;
+ &lt;/XMLContent&gt;
+ &lt;/Content&gt;
+ &lt;/SupplementProfile&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Das zweite Element <code>SupplementProfile</code> enth&auml;lt analog das Erg&auml;nzungsobjekt f&uuml;r das oben beschriebene XML-Schema. <code>Content/@Reference</code> enth&auml;lt die Referenz genau so, wie sie oben im Attribut <code>xsi:schemaLocation</code> angegeben wurde. </p>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.Supplements.resp.xml" target="_blank">VerifyXMLSignatureRequest.Supplements.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Er wird an dieser Stelle nicht n&auml;her analysiert, da er keine f&uuml;r das Thema des Beispiels relevanten Besonderheiten aufweist.</p>
+<h4><a name="webservice_xmlrequests_pruefungxml_signaturmanifest" id="webservice_xmlrequests_pruefungxml_signaturmanifest"></a>2.1.3.5 Signatur-Manifest des Security-Layers </h4>
+<h5>Request</h5>
+<p>Dieses Beispiel zur Pr&uuml;fung einer XML-Signatur (<a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.xml" target="_blank"><code>VerifyXMLSignatureRequest.SigManifest.xml</code></a>) demonstriert die &Uuml;berpr&uuml;fung des Zusammenhangs zwischen den <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#glossar_Referenz-Eingangsdaten" target="_blank">Referenz-Eingangsdaten</a> und den <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#glossar_Hash-Eingangsdaten" target="_blank">Hash-Eingangsdaten</a> f&uuml;r die <code>dsig:Reference</code>-Elemente einer XML-Signatur. Mit Hilfe dieser Pr&uuml;fung kann eine Anwendung feststellen, ob bei der Erstellung einer XML-Signatur jene Transformationen bzw. auch jene inkludierten Stylesheets (vgl. <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturerstellungNachXMLDSIGAntwortImplTransParam" target="_blank">Implizite Transformationsparameter</a>) einer XSLT-Transformation angewendet wurden, welche die Anwendung vorgegeben hat. Bei erfolgreicher Pr&uuml;fung dieses Zusammenhangs kann die Anwendung die Referenz-Eingangsdaten einer <code>dsig:Reference</code> als gesichert ansehen, obwohl eigentlich die Hash-Eingangsdaten durch die Signatur gesichert sind. Dies ist jenen F&auml;llen sinnvoll, in denen die Anwendung grunds&auml;tzlich mit XML-Daten arbeitet, diese Daten jedoch f&uuml;r das Signieren durch eine Person in ein f&uuml;r diese Person verst&auml;ndliches Format wie z.B. HTML umgewandelt werden sollen.</p>
+<pre>
+&lt;VerifyXMLSignatureRequest
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;VerifySignatureInfo&gt;
+ &lt;VerifySignatureEnvironment&gt;
+ &lt;XMLContent&gt;
+ &lt;doc:XMLDocument xmlns:doc=&quot;urn:document&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
+ xsi:schemaLocation=&quot;urn:document http://localhost:8080/referencedData/XMLDocument.xsd&quot;&gt;
+ &lt;doc:Paragraph&gt;Ich bin der erste Absatz in diesem Dokument.&lt;/doc:Paragraph&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot;&gt;Und ich bin der zweite Absatz in diesem Dokument.
+Ich habe weiters ein eigenens ID-Attribut bekommen.&lt;/doc:Paragraph&gt;
+ &lt;dsig:Signature xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot; Id=&quot;signature-1-1&quot;&gt;
+ &lt;dsig:SignedInfo&gt;
+ ...
+ &lt;dsig:Reference Id=&quot;reference-1-1&quot; URI=&quot;#Para2&quot;&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference
+ Type=&quot;http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest&quot;
+ URI=&quot;#manifest-1-1&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;dsig:Reference Type=&quot;http://uri.etsi.org/01903/v1.1.1#SignedProperties&quot; ...&gt;...&lt;/dsig:Reference&gt;
+ &lt;/dsig:SignedInfo&gt;
+ &lt;dsig:SignatureValue&gt;jnXc/X+hUY...uBxo9q&lt;/dsig:SignatureValue&gt;
+ &lt;dsig:KeyInfo&gt;...&lt;/dsig:KeyInfo&gt;
+ &lt;dsig:Object&gt;
+ &lt;dsig:Manifest Id=&quot;manifest-1-1&quot;&gt;
+ &lt;dsig:Reference URI=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;&gt;
+ ...
+ &lt;/dsig:Reference&gt;
+ &lt;/dsig:Manifest&gt;
+ &lt;/dsig:Object&gt;
+ &lt;dsig:Object Id=&quot;etsi-signed-1-1&quot;&gt;
+ &lt;etsi:QualifyingProperties Target=&quot;#signature-1-1&quot; xmlns:etsi=&quot;http://uri.etsi.org/01903/v1.1.1#&quot;&gt;
+ ...
+ &lt;/etsi:QualifyingProperties&gt;
+ &lt;/dsig:Object&gt;
+ &lt;/dsig:Signature&gt;
+ &lt;/doc:XMLDocument&gt;
+ &lt;/XMLContent&gt;
+ &lt;/VerifySignatureEnvironment&gt;
+</pre>
+<p>Das Element <code>VerifySignatureEnvironment</code> enth&auml;lt das XML-Dokument mit der zu pr&uuml;fenden XML-Signatur. Die XML-Signatur wurde von einer B&uuml;rgerkarten-Umgebung erstellt. Man erkennt, dass das Element <code>dsig:SignedInfo</code> der XML-Signatur drei <code>dsig:Reference</code>-Elemente enth&auml;lt. </p>
+<p>Die erste <code>dsig:Reference</code> bezieht sich auf die eigentlich signierten Nutzdaten. Das zweite <code>doc:Paragraph</code>-Element stellt die Referenz-Eingangsdaten f&uuml;r diese <code>dsig:Reference</code> dar, welche mit Hilfe einer XSLT-Transformation in ein kleines HTML-Dokument &uuml;bergef&uuml;hrt wird, wor&uuml;ber dann der Hashwert der dsig:Reference gebildet wird (Hash-Eingangsdaten).</p>
+<p>Die zweite <code>dsig:Reference</code> bezieht sich auf das von der B&uuml;rgerkarten-Umgebung angefertigte Signaturmanifest. Das Signaturmanifest ist vorhanden, weil die XSLT-Transformation der ersten <code>dsig:Reference</code> einen weiteren Stylesheet inkludiert, und die Daten dieses weiteren Stylesheets ansonsten nicht von der XML-Signatur abgedeckt w&auml;ren (vgl. <a href="http://www.buergerkarte.at/konzept/securitylayer/spezifikation/20040514/core/Core.html#signaturerstellungNachXMLDSIGAntwortImplTransParam" target="_blank">Implizite Transformationsparameter</a>). Das Signaturmanifest enth&auml;lt eine einzige <code>dsig:Reference</code>, die den inkludierten Stylesheet referenziert und so in die XML-Signatur einbindet.</p>
+<p>Die dritte <code>dsig:Reference</code> bezieht sich auf die von der B&uuml;rgerkarten-Umgebung angefertigten Signatureigenschaften, die hier nicht n&auml;her betrachtet werden. </p>
+<pre>
+ &lt;VerifySignatureLocation xmlns:doc=&quot;urn:document&quot;&gt;/doc:XMLDocument/dsig:Signature&lt;/VerifySignatureLocation&gt;
+ &lt;/VerifySignatureInfo&gt;
+</pre>
+<p>Das Element <code>VerifySignatureLocation</code> w&auml;hlt die zu pr&uuml;fende Signatur innerhalb des in <code>VerifySignatureEnvironment</code> angegebenen XML-Dokuments aus.</p>
+<pre>
+ &lt;SignatureManifestCheckParams ReturnReferenceInputData=&quot;true&quot;&gt;
+ &lt;ReferenceInfo&gt;
+ &lt;VerifyTransformsInfoProfile&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/TR/1999/REC-xslt-19991116&quot;&gt;
+ &lt;xsl:stylesheet version=&quot;1.0&quot; xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&gt;
+ &lt;xsl:include href=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/xsl:stylesheet&gt;
+ &lt;/dsig:Transform&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2001/10/xml-exc-c14n#&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;TransformParameter URI=&quot;http://localhost:8080/referencedData/XMLDocument.Para.xsl&quot;/&gt;
+ &lt;/VerifyTransformsInfoProfile&gt;
+ &lt;VerifyTransformsInfoProfile&gt;
+ &lt;dsig:Transforms&gt;
+ &lt;dsig:Transform Algorithm=&quot;http://www.w3.org/2000/09/xmldsig#enveloped-signature&quot;/&gt;
+ &lt;/dsig:Transforms&gt;
+ &lt;/VerifyTransformsInfoProfile&gt;
+ &lt;/ReferenceInfo&gt;
+ &lt;/SignatureManifestCheckParams&gt;
+ &lt;TrustProfileID&gt;Test-Signaturdienste&lt;/TrustProfileID&gt;
+&lt;/VerifyXMLSignatureRequest&gt;
+</pre>
+<p>Mit Angabe des optionalen Elements <code>SignatureManifestCheckParams</code> wird MOA SP angewiesen, den oben skizzierten Zusammenhang zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten zu &uuml;berpr&uuml;fen. Wird das Attribut <code>ReturnReferenceInputData</code> wie im Beispiel auf den Wert <code>true</code> gesetzt, liefert MOA SP in der Response die Hash-Eingangsdaten f&uuml;r alle Referenzen in <code>dsig:SignedInfo</code> der XML-Signatur an die Anwendung zur&uuml;ck, was in der Regel von der Anwendung wohl gew&uuml;nscht wird, wenn MOA SP schon den Zusammenhang zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten pr&uuml;fen soll.</p>
+<p>Die Pr&uuml;fung des Zusammenhangs untergliedert sich in zwei Teilpr&uuml;fungen:</p>
+<ul>
+ <li>&Uuml;berpr&uuml;fung, ob jede <code>dsig:Reference</code> in <code>dsig:SignedInfo</code> der Signatur eine vorgegebene Transformationskette inkludiert;</li>
+ <li>&Uuml;berpr&uuml;fung, ob die in der vorgegebenen Transformationskette ggf. enthaltenen inkludierten Stylesheets (implizite Transformationsparameter) durch ein Signaturmanifest mitsigniert sind.</li>
+</ul>
+<p>Damit MOA SP die erste Teilpr&uuml;fung durchf&uuml;hren kann, muss in <code>SignatureManifestCheckParams</code> je <code>dsig:Reference</code> Element in <code>dsig:SignedInfo</code> der XML-Signatur ein Element <code>ReferenceInfo</code> angeben. Ausgenommen sind <code>dsig:Reference</code>-Elemente, die auf ein Signaturmanifest (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest</code>), auf ein XMLDSIG-Manifest (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://www.w3.org/2000/09/xmldsig#Manifest</code>) oder auf Signatureigenschaften (Attribut <code>Type</code> ist gesetzt und hat den Wert <code>http://uri.etsi.org/01903/v1.1.1#SignedProperties</code>) verweisen. </p>
+<p>Das Element <code>ReferenceInfo</code> enth&auml;lt eine oder mehrere erlaubte Transformationsketten, die jeweils durch ein Element <code>VerifyTransformsInfoProfile/dsig:Transforms</code> repr&auml;sentiert werden. Im konkreten Beispiel werden f&uuml;r die einzige zu pr&uuml;fende <code>dsig:Reference</code> zwei erlaubte Transformationsketten angegeben. Die Transformationen in der <code>dsig:Reference</code> m&uuml;ssen einer dieser beiden Ketten entsprechen; im konkreten Beispiel entsprechen sie der ersten. </p>
+<p>Nachdem die erste erlaubte Transformationskette eine XSLT-Transformation mit einem inkludierten Stylesheet enth&auml;lt, muss MOA SP auch &uuml;berpr&uuml;fen, ob dieser inkludierte Stylesheet korrekt durch ein Signaturmanifest mitunterschrieben wurde. Nachdem wichtig ist, dass nicht irgendein beliebiger Stylesheet verwendet und mitunterschrieben wurde, sondern genau jener, den die Anwendung bei der Signaturerstellung vorgegeben hat, muss die Anwendung MOA SP mitteilen, welcher Stylesheet das sein muss. Die Anwendung verwendet dazu das Element <code>VerifyTransformsInfoProfile/TransformParameter</code>. Das Attribut <code>TransformParameter/@URI</code> enth&auml;lt die Referenz auf den Stylesheet genau so, wie er im Stylesheet-Parameter der zu pr&uuml;fenden Signatur verwendet wird (<code>dsig:Transform/xsl:stylesheet/xsl:inlcude/@href</code>). F&uuml;r den Inhalt dieses Elements hat die Anwendung drei M&ouml;glichkeiten: </p>
+<ul>
+ <li>Die Anwendung l&auml;sst den Inhalt leer. Dies wird sie dann machen, wenn sie darauf vertrauen kann, dass die Aufl&ouml;sung der in <code>TransformParameter/@URI</code> angegebenen Referenz bei der Signaturpr&uuml;fung zum gleichen Resultat f&uuml;hrt wie seinerzeit beim Erstellen der Signatur (z.B. weil die Referenz auf einen Webserver unter Kontrolle der Anwendung zeigt);</li>
+ <li>Die Anwendung gibt im Element <code>TransformParameter/Base64Content</code> explizit den inkludierten Stylesheet an. MOA SP verwendet dann diesen Stylesheet, um den Hashwert der <code>dsig:Reference</code> im Signaturmanifest zu kontrollieren;</li>
+ <li>Die Anwendung gibt im Element <code>TransformParameter/Hash </code>den Hashwert des inkludierten Stylesheets an. MOA SP l&ouml;st dann die Referenz in <code>dsig:Transform/xsl:stylesheet/xsl:inlcude/@href</code> auf und stellt sicher, dass der &uuml;ber das Aufl&ouml;sungsergebnis gebildete Hashwert jenem in <code>TransformParameter/Hash </code>entspricht. Diese M&ouml;glichkeit wird die Anwendung dann verwenden, wenn es sich um einen sehr umfangreichen Stylesheet handelt, der nicht im Request mit&uuml;bertragen werden soll.</li>
+</ul>
+<h5>Response</h5>
+<p><code><a href="../../clients/webservice/resources/requests/VerifyXMLSignatureRequest.SigManifest.resp.xml" target="_blank">VerifyXMLSignatureRequest.SigManifest.resp.xml</a></code> ist eine typische Response des SP Webservices auf den obigen Request. Sein Aufbau wird nachfolgend analysiert. Bitte beachten Sie, dass die dargestellte Response zur bessernen Lesbarkeit einger&uuml;ckt und gek&uuml;rzt wurde. </p>
+<pre>
+&lt;VerifyXMLSignatureResponse
+ xmlns=&quot;http://reference.e-government.gv.at/namespace/moa/20020822#&quot;
+ xmlns:dsig=&quot;http://www.w3.org/2000/09/xmldsig#&quot;&gt;
+ &lt;SignerInfo&gt;...&lt;/SignerInfo&gt;
+</pre>
+<p>Die Response enth&auml;lt zun&auml;chst in <code>SignerInfo/dsig:X509Data</code> Informationen &uuml;ber den Signator, die aus dem in der XML-Signatur enthaltenen Signatorzertifikat entnommen sind (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>). </p>
+<pre>
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;doc:Paragraph ParaId=&quot;Para2&quot; xmlns:doc=&quot;urn:document&quot;
+ xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;...&lt;/doc:Paragraph&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;dsig:Manifest Id=&quot;manifest-1-1&quot; xmlns:doc=&quot;urn:document&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
+ ...
+ &lt;/dsig:Manifest&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+ &lt;ReferenceInputData PartOf=&quot;SignedInfo&quot;&gt;
+ &lt;XMLContent xml:space=&quot;preserve&quot;&gt;
+ &lt;etsi:SignedProperties xmlns:doc=&quot;urn:document&quot;
+ xmlns:etsi=&quot;http://uri.etsi.org/01903/v1.1.1#&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;&gt;
+ ...
+ &lt;/etsi:SignedProperties&gt;
+ &lt;/XMLContent&gt;
+ &lt;/ReferenceInputData&gt;
+</pre>
+<p>Nachdem im Request spezifiziert wurde, dass in der Response die Referenzeingangsdaten f&uuml;r alle <code>dsig:Reference</code>-Elemente
+ von <code>dsig:SignedInfo</code> (bzw. auch f&uuml;r jede <code>dsig:Reference</code> aus einem <code>dsig:Manifest</code>,
+ auf das mittels des Attributs <code>Type=&quot;http://www.w3.org/2000/09/xmldsig#Manifest&quot;</code> in einer <code>dsig:Reference</code> aus <code>dsig:SignedInfo</code> verwiesen
+ wird; solche Manifeste kommen aber in diesem Beispiel nicht vor) der gepr&uuml;ften
+ XML-Signatur &uuml;bermittelt
+ werden sollen, enth&auml;lt
+ die Response nach <code>SignerInfo</code> drei <code>ReferenceInputData</code>-Elemente. Das erste <code>ReferenceInputData</code>-Element
+ enth&auml;lt das zuvor besprochene <code>doc:Paragraph</code> Element, das zweite das Signaturmanifest, das
+ dritte die Signatureigenschaften. Das Attribut <code>PartOf</code> jedes Elements weist mit dem Wert <code>SignedInfo</code> darauf hin,
+ dass die <code>dsig:Reference</code>, f&uuml;r welche die Referenzeingangsdaten gelten, Teil von <code>dsig:SignedInfo</code> ist. </p>
+<pre>
+ &lt;SignatureCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureCheck&gt;
+</pre>
+<p>Das Element<code> SignatureCheck</code> enth&auml;lt das Resultat der kryptographischen Pr&uuml;fung der Signatur (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<pre>
+ &lt;SignatureManifestCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/SignatureManifestCheck&gt;
+</pre>
+<p>Das Element <code>SignatureManifestCheck</code> enh&auml;lt das Resultat der Pr&uuml;fung des Zusammenhangs zwischen Referenz-Eingangsdaten und Hash-Eingangsdaten. Der Kode <code>0</code> im konkreten Beispiel bedeutet, dass alle Referenzen die in der Anfrage zur &Uuml;berpr&uuml;fung der XML-Signatur gemachten Einschr&auml;nkungen bez&uuml;glich der erlaubten Transformationskette(n) einhalten, sowie dass die Anforderungen hinsichtlich des Signaturmanifests werden eingehalten. F&uuml;r eine &Uuml;bersicht der m&ouml;glichen Kodes siehe die <a href="../spec/MOA-SPSS-1.2.pdf" target="_blank">Spezifikation zu MOA SP/SS</a>, Abschnitt 5.1.3.1.4.</p>
+<pre>
+ &lt;CertificateCheck&gt;
+ &lt;Code&gt;0&lt;/Code&gt;
+ &lt;/CertificateCheck&gt;
+&lt;/VerifyXMLSignatureResponse&gt;
+</pre>
+<p>Das Element<code> CertificateCheck</code> enth&auml;lt das Resultat der Zertifikatspr&uuml;fung (siehe <a href="#webservice_xmlrequests_pruefungxml_einfach">Einfaches Beispiel</a>).</p>
+<h2><a name="webservice_clients" id="webservice_clients"></a>2.2 Webservice-Clients</h2>
+<p><a href="#webservice_xmlrequests">Abschnitt 2.1</a> bespricht eine Reihe von typischen XML-Requests, die &uuml;ber die Webservice-Schnittstelle an MOA SP/SS gesendet werden k&ouml;nnen, um entweder Signaturen zu erstellen (MOA SS) oder Signaturen zu pr&uuml;fen (MOA SP). Dieser Abschnitt zeigt die Verwendung des prototypischen Webservice-Clients, der mit dieser Dokumentation zu MOA SP/SS ausgeliefert wird.</p>
+<h3><a name="webservice_clients_übersicht" id="webservice_clients_übersicht"></a>2.2.1 &Uuml;bersicht</h3>
+<p>Der Webservice-Client existiert in drei Varianten, wobei jede Variante in einer eigenen Java-Klasse implementiert ist:</p>
+<ul>
+ <li>Der einfache Client (<code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTP.java">HTTP.java</a></code>) arbeitet ohne Authentifikation. Er pr&uuml;ft weder die Authentizit&auml;t des verwendeten MOA-Webservices, noch identifiziert er sich selbst gegen&uuml;ber dem MOA-Webservice.</li>
+ <li>Der Client mit Server-Authentisierung (<code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code>) pr&uuml;ft die Authentizit&auml;t des verwendeten MOA-Websservices an Hand dessen SSL-Serverzertifikats, identifiziert sich selbst jedoch nicht gegen&uuml;ber dem MOA-Webservice.</li>
+ <li>Der Client mit Client- und Server-Authentisierung (<code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java">HTTPSClientAuth.java</a></code>) pr&uuml;ft einerseits die Authentizit&auml;t des verwendeten MOA-Websservices an Hand dessen SSL-Serverzertifikats; andererseits weist er sich selbst mittels eines SSL-Client-Zertifikats gegen&uuml;ber dem MOA-Webservice aus. </li>
+</ul>
+<p>Welcher der drei Varianten des Webservice-Clients zum Einsatz kommen soll, h&auml;ngt von der Art ab, wie das MOA-Webservice betrieben wird, d.h. ob es Server- bzw. Client-Authentisierung unterst&uuml;tzt bzw. verlangt. Befinden sich sowohl MOA-Webservice als auch der Webservice-Client im gleichen, abgeschotteten Netzwerk, kann auch eine Kommunikation ohne Authenifikation in Betracht gezogen werden. Ansonsten wird der Standardfall wohl der Betrieb mit Server-Authentisierung (Verwendung von MOA SP) bzw. mit Server- und Client-Authentisierung (Verwendung von MOA SS) sein.</p>
+<p class="remark">Hinweis: Das <a href="../../">Wurzelverzeichnis</a> dieses Handbuchs stellt ein komplettes und sofort verwendbares Eclipse Projekt dar. </p>
+<h3><a name="webservice_clients_gemeinsamkeiten" id="webservice_clients_gemeinsamkeiten"></a>2.2.2 Gemeinsamkeiten</h3>
+<p>Dieser Abschnitt beschreibt die Gemeinsamkeiten aller drei Varianten des Webservice-Clients. </p>
+<p>Zun&auml;chst einmal ben&ouml;tigen alle drei Varianten die folgenden Java-Bibliotheken, die im Ordner <a href="../../clients/webservice/lib/">clients/webservice/lib/</a> dieses Handbuchs bereits enthalten sind:</p>
+<table class="fixedwidth" border="1" cellpadding="2">
+ <TBODY>
+ <TR>
+ <TH>Java-Bibliothek</TH>
+ <TH>Bemerkung</TH>
+ </TR><TR>
+ <TD><a href="#referenzierte_software">J2SE</a></TD>
+ <TD> J2SE 1.3.1 SDK oder J2SE 1.4.2 SDK oder J2SE 5.0 SDK. </TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">Apache Xerces</a></TD>
+ <TD>XML-Parser, Version 2.0.2 oder h&ouml;her; nicht n&ouml;tig wenn JDSE 1.4.2 oder h&ouml;her verwendet wird. </TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">AXIS Framework</a></TD>
+ <TD>Webservice-Framework, Version 1.1.</TD>
+ </TR>
+ <TR>
+ <TD><a href="#referenzierte_software">JSSE</a></TD>
+ <TD>Java Secure Socket Extension, Version 1.0.3 oder h&ouml;her; nur notwendig f&uuml;r die Varianten <code>HTTPServerAuth</code> und <code>HTTPClientAuth</code>.</TD>
+ </TR>
+ </TBODY>
+</TABLE>
+<p>Weiters ist allen drei Varianten der folgende Kern-Ablauf gemeinsam:</p>
+<ol>
+ <li>Der Webservice-Client liest einen vorbereiteten MOA-XML-Request (z. B. einen der in <a href="#webservice_xmlrequests">Abschnitt 2.1</a> gezeigten) vom Dateisystem ein.</li>
+ <li>Der Webservice-Client erstellt einen SOAP-Request mit dem vom Dateisystem gelesenen MOA-XML-Request als Nutzlast.</li>
+ <li>Der Webservice-Client sendet den erstellten SOAP-Request &uuml;ber HTTP an MOA SP/SS. </li>
+ <li>Der Webservice-Client empf&auml;ngt die SOAP-Response von MOA SP/SS.</li>
+ <li>Der Webservice-Client extrahiert die Nutzlast des SOAP-Responses (d. h. die zum MOA-XML-Request aus Schritt 1 passende MOA-XML-Response), gibt diese auf die Konsole aus und speichert sie im Dateisystem. </li>
+</ol>
+<p>Konfiguriert werden k&ouml;nnen alle drei Varianten mit Hilfe von zwei Kommandozeilen-Parametern:</p>
+<ol>
+ <li>Der erste Kommandozeilenparameter gibt an, ob MOA SS (Wert <code>sign</code>) oder MOA SP (Wert <code>verify</code>) kontaktiert werden soll. </li>
+ <li>Der zweite Kommandozeilenparameter enth&auml;lt Pfad und Dateiname einer Java-Properties-Datei, die die weiteren Konfigurationsparameter f&uuml;r den Webservice-Client enth&auml;lt. Ein relativer Pfad wird als relativ zum Arbeitsverzeichnis der Java Virtual Machine interpretiert. Genaue Infos zu den m&ouml;glichen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation der jeweiligen Variante des Webservice-Clients. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</li>
+</ol>
+<h3><a name="webservice_clients_httpsserverauth" id="webservice_clients_httpsserverauth"></a>2.2.3 Besonderheiten von <code>HTTPSServerAuth.java</code></h3>
+<p>Diese Variante des Webservice-Clients verwendet JSSE, um im Schritt 3 des Kernablaufs aus <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> eine SSL-Verbindung mit Server-Authentifizierung zum MOA SP/SS Server aufzubauen. In dieser SSL-Verbindung sendet der Webservice-Client dann den erstellten SOAP-Request &uuml;ber HTTPS.</p>
+<p>Die Konfiguration von JSSE (Speicher f&uuml;r die vertrauensw&uuml;rdigen Serverzertifikate, Typ dieses Speichers, Passwort f&uuml;r diesen Speicher) wird mittels zus&auml;tzlicher Parameter in der in <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> besprochenen Java-Properties-Datei vorgenommen. Genaue Infos zu diesen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation von <code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code>. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</p>
+<p>Falls Sie Probleme beim SSL-Verbindungsaufbau zwischen Webservice-Client und MOA SP/SS Webservice haben, empfiehlt sich die Aktivierung des JSSE Loggings. Das Setzen der daf&uuml;r notwendigen Java System Property ist im Quellcode von <code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSServerAuth.java">HTTPSServerAuth.java</a></code> bereits enthalten, jedoch auskommentiert. Suchen Sie einfach nach dem String <code>javax.net.debug</code>, um zur entsprechenden Stelle im Quellcode zu gelangen. </p>
+<h3><a name="webservice_clients_httpsclientauth" id="webservice_clients_httpsclientauth"></a>2.2.4 Besonderheiten von <code>HTTPSClientAuth.java</code> </h3>
+<p>Diese Variante des Webservice-Clients verwendet JSSE, um im Schritt 3 des Kernablaufs aus <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> eine SSL-Verbindung mit Server- und Client-Authentifizierung zum MOA SP/SS Server aufzubauen. In dieser SSL-Verbindung sendet der Webservice-Client dann den erstellten SOAP-Request &uuml;ber HTTPS.</p>
+<p>Die gegen&uuml;ber <a href="#webservice_clients_httpsserverauth">Abschnitt 2.2.3</a> zus&auml;tzlich notwendige Konfiguration von JSSE (Speicher f&uuml;r das SSL-Client-Zertifikat sowie den dazugeh&ouml;rigen privaten Schl&uuml;ssel, Typ dieses Speichers, Passwort f&uuml;r diesen Speicher) wird mittels zus&auml;tzlicher Parameter in der in <a href="#webservice_clients_gemeinsamkeiten">Abschnitt 2.2.2</a> besprochenen Java-Properties-Datei vorgenommen. Genaue Infos zu diesen Konfigurationsparametern entnehmen Sie bitte der Quellcodedokumentation von <code><a href="../../clients/webservice/src/at/gv/egovernment/moa/spss/handbook/clients/webservice/HTTPSClientAuth.java">HTTPSClientAuth.java</a></code>. <a href="../../clients/webservice/conf/http.properties"><code>http.properties</code></a> enth&auml;lt eine auf dieses Handbuch abgestimmte Konfiguration.</p>
+<p>Beachten Sie bitte auch den Hinweis zum JSSE Logging aus <a href="#webservice_clients_httpsserverauth">Abschnitt 2.2.3</a>.</p>
+<h1><a name="klassenbibliothek" id="klassenbibliothek"></a>3 Verwendung der Klassenbibliothek</h1>
+<p>Neben dem Betrieb von MOA SP/SS als Webservice ist als Alternative auch die Verwendung von MOA SP/SS als Klassenbibliothek m&ouml;glich, also die direkte Einbindung in ein Java-Programm unter Verwendung des Application Programmers Interface (API) von MOA SP/SS. </p>
+<h2><a name="klassenbibliothek_vorbereitung" id="klassenbibliothek_vorbereitung"></a>3.1 Vorbereitung</h2>
+<p>Um das API von MOA SP/SS verwenden zu k&ouml;nnen, m&uuml;ssen einerseits die MOA-Bibliotheken selbst, andererseits eine Reihe von unterst&uuml;tzenden Bibliotheken in den Klassenpfad aufgenommen werden. Eine &Uuml;bersicht dazu finden Sie im Installationshandbuch im <a href="../install/install.html#klassenbibliothek">Abschnitt 3</a>.
+<h2><a name="klassenbibliothek_allgemeines" id="klassenbibliothek_allgemeines"></a>3.2 Allgemeines </h2>
+<p>Der strukturelle Aufbau der API entspricht weitgehend der Struktur eines MOA-XML-Requests. Es werden daher in diesem Abschnitt nur zwei grundlegende Beispiele gebracht; f&uuml;r komplexere Aufgaben k&ouml;nnen die XML-Beispiele aus <a href="#webservice_xmlrequests">Abschnitt 2.1</a> als Vorlage verwendet und einfach in die &quot;API-Welt&quot; &uuml;bertragen werden.
+<h2><a name="klassenbibliothek_beispiele" id="klassenbibliothek_beispiele"></a>3.3 Beispiele </h2>
+<p>Dieses Handbuch enth&auml;lt zwei Beispiele f&uuml;r die Verwendung der API von MOA SP/SS:
+<ol>
+ <li><code><a href="../../clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/CreateXMLSignature.java">CreateXMLSignature.java</a></code>: Erstellung einer einfachen XML-Signatur; dieses Beispiel entspricht dem MOA-XML-Request aus <a href="#webservice_xmlrequests_erstellungxml_simple">Abschnitt 2.1.1.1</a>. <br>
+ Die Konfiguration der API erfolgt &uuml;ber Kommandozeilenparameter (Lage der Konfigurationsdatei f&uuml;r MOA SP/SS, Lage der Konfigurationsdatei f&uuml;r das Logging mit Log4j). Detaillierte Informationen dazu finden Sie in der Quellcodedokumentation des Beispiels. </li>
+ <li><code><a href="../../clients/api/src/at/gv/egovernment/moa/spss/handbook/clients/api/VerifyXMLSignature.java">VerifyXMLSignature.java</a></code>: Pr&uuml;fung einer einfachen XML-Signatur; dieses Beispiel entspricht dem MOA-XML-Request aus <a href="#webservice_xmlrequests_pruefungxml_einfach">Abschnitt 2.1.3.1</a>. <br>
+ Die Konfiguration der API erfolgt &uuml;ber Kommandozeilenparameter (Lage der Konfigurationsdatei f&uuml;r MOA SP/SS, Lage der Konfigurationsdatei f&uuml;r das Logging mit Log4j). Detaillierte Informationen dazu finden Sie in der Quellcodedokumentation des Beispiels. <br>
+ Die Auswahl der zu pr&uuml;fenden Signatur erfolgt ebenfalls per Kommandozeilenparameter. Detaillierte Informationen dazu finden Sie ebenfalls in der Quellcodedokumentation des Beispiels. </li>
+</ol>
+<h2><a name="klassenbibliothek_apidoc" id="klassenbibliothek_apidoc"></a>3.4 API-Dokumentation </h2>
+<p>F&uuml;r die vollst&auml;ndige Dokumentation des API von MOA SP/SS sei auf die <a href="../../api-doc/index.html">Java Doc der API</a> verwiesen.
+<p>
+<h1><a name="referenzierte_software" id="referenzierte_software"></a>A Referenzierte Software</h1>
+<p>Auf folgende Software-Pakete wird in diesem Handbuch verwiesen:</p>
+<table class="fixedWidth" border="1" cellpadding="2">
+ <tbody>
+ <tr>
+ <th scope="col">Name</th>
+ <th scope="col">Beschreibung</th>
+ </tr>
+ <tr>
+ <td><a href="http://xml.apache.org/xerces2-j/">Apache Xerces 2</a> </td>
+ <td>XML-Parser aus dem Apache Project</td>
+ </tr>
+ <tr>
+ <td><a href="http://xml.apache.org/axis/">Apache Axis</a></td>
+ <td>Webservice-Framework aus dem Apache Project</td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.3.1/" target="_blank">J2SE 1.3.1 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 1.3.1 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.4.2/" target="_blank">J2SE 1.4.2 SDK/JRE</a></td>
+ <td>Java 2 Standard Edition in der Version 1.4.2 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/j2se/1.5.0/" target="_blank">J2SE 5.0 SDK/JRE</a> </td>
+ <td>Java 2 Standard Edition in der Version 5.0 (Software Development Kit bzw. Java Runtime Environment) </td>
+ </tr>
+ <tr>
+ <td><a href="http://java.sun.com/products/jsse/">JSSE</a></td>
+ <td>Java Secure Socket Extension </td>
+ </tr>
+ </tbody>
+</table>
+<p>&nbsp;</p>
+</body>
+</html>
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml b/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml
new file mode 100644
index 000000000..e6035b8be
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/server.mod_jk.xml
@@ -0,0 +1,166 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="10" debug="0" connectionTimeout="0"
+ useURIValidationHack="false"
+ protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
+ -->
+
+ <!-- Define an AJP 1.3 Connector on port 8009 -->
+ <Connector className="org.apache.ajp.tomcat4.Ajp13Connector"
+ port="8009" minProcessors="5" maxProcessors="75"
+ acceptCount="10" debug="0"/>
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Replace the above Realm with one of the following to get a Realm
+ stored in a database and accessed via JDBC -->
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/server.xml b/spss/server/serverlib/resources/data/deploy/tomcat/server.xml
new file mode 100644
index 000000000..3e5966ca9
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/server.xml
@@ -0,0 +1,169 @@
+<!-- Alternate Example-less Configuration File -->
+<!-- Note that component elements are nested corresponding to their
+ parent-child relationships with each other -->
+
+<!-- A "Server" is a singleton element that represents the entire JVM,
+ which may contain one or more "Service" instances. The Server
+ listens for a shutdown command on the indicated port.
+
+ Note: A "Server" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+<Server port="8005" shutdown="SHUTDOWN" debug="0">
+
+
+ <!-- Uncomment this entry to enable JMX MBeans support -->
+<!--
+ <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
+ debug="0" port="-1" login="admin" password="admin"/>
+-->
+
+
+ <!-- A "Service" is a collection of one or more "Connectors" that share
+ a single "Container" (and therefore the web applications visible
+ within that Container). Normally, that Container is an "Engine",
+ but this is not required.
+
+ Note: A "Service" is not itself a "Container", so you may not
+ define subcomponents such as "Valves" or "Loggers" at this level.
+ -->
+
+ <!-- Define the Tomcat Stand-Alone Service -->
+ <Service name="Tomcat-Standalone">
+
+ <!-- A "Connector" represents an endpoint by which requests are received
+ and responses are returned. Each Connector passes requests on to the
+ associated "Container" (normally an Engine) for processing.
+
+ By default, a non-SSL HTTP/1.1 Connector is established on port 8080.
+ You can also enable an SSL HTTP/1.1 Connector on port 8443 by
+ following the instructions below and uncommenting the second Connector
+ entry. SSL support requires the following steps (see the SSL Config
+ HOWTO in the Tomcat 4.0 documentation bundle for more detailed
+ instructions):
+ * Download and install JSSE 1.0.2 or later, and put the JAR files
+ into "$JAVA_HOME/jre/lib/ext".
+ * Execute:
+ %JAVA_HOME%\bin\keytool -genkey -alias tomcat -keyalg RSA (Windows)
+ $JAVA_HOME/bin/keytool -genkey -alias tomcat -keyalg RSA (Unix)
+ with a password value of "changeit" for both the certificate and
+ the keystore itself.
+
+ By default, DNS lookups are enabled when a web application calls
+ request.getRemoteHost(). This can have an adverse impact on
+ performance, so you can disable it by setting the
+ "enableLookups" attribute to "false". When DNS lookups are disabled,
+ request.getRemoteHost() will return the String version of the
+ IP address of the remote client.
+ -->
+
+ <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8080" minProcessors="5" maxProcessors="75"
+ enableLookups="true" redirectPort="8443"
+ acceptCount="100" debug="0" connectionTimeout="20000"
+ useURIValidationHack="false" disableUploadTimeout="true" />
+ <!-- Note : To disable connection timeouts, set connectionTimeout value
+ to -1 -->
+
+ <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
+ <!--
+ <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
+ port="8443" minProcessors="5" maxProcessors="75"
+ enableLookups="uri"
+ acceptCount="100" debug="0" scheme="https" secure="true"
+ useURIValidationHack="false" disableUploadTimeout="true">
+ <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
+ clientAuth="false" protocol="TLS"/>
+ </Connector>
+ -->
+
+ <!-- An Engine represents the entry point (within Catalina) that processes
+ every request. The Engine implementation for Tomcat stand alone
+ analyzes the HTTP headers included with the request, and passes them
+ on to the appropriate Host (virtual host). -->
+
+ <!-- Define the top level container in our container hierarchy -->
+ <Engine name="Standalone" defaultHost="localhost" debug="0">
+
+ <!-- The request dumper valve dumps useful debugging information about
+ the request headers and cookies that were received, and the response
+ headers and cookies that were sent, for all requests received by
+ this instance of Tomcat. If you care only about requests to a
+ particular virtual host, or a particular application, nest this
+ element inside the corresponding <Host> or <Context> entry instead.
+
+ For a similar mechanism that is portable to all Servlet 2.3
+ containers, check out the "RequestDumperFilter" Filter in the
+ example application (the source for this filter may be found in
+ "$CATALINA_HOME/webapps/examples/WEB-INF/classes/filters").
+
+ Request dumping is disabled by default. Uncomment the following
+ element to enable it. -->
+ <!--
+ <Valve className="org.apache.catalina.valves.RequestDumperValve"/>
+ -->
+
+ <!-- Global logger unless overridden at lower levels -->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ prefix="catalina_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Because this Realm is here, an instance will be shared globally -->
+
+ <Realm className="org.apache.catalina.realm.MemoryRealm" />
+
+ <!-- Define the default virtual host -->
+ <Host name="localhost" debug="0" appBase="webapps"
+ unpackWARs="true" autoDeploy="true">
+
+ <!-- Normally, users must authenticate themselves to each web app
+ individually. Uncomment the following entry if you would like
+ a user to be authenticated the first time they encounter a
+ resource protected by a security constraint, and then have that
+ user identity maintained across *all* web applications contained
+ in this virtual host. -->
+ <!--
+ <Valve className="org.apache.catalina.authenticator.SingleSignOn"
+ debug="0"/>
+ -->
+
+ <!-- Access log processes all requests for this virtual host. By
+ default, log files are created in the "logs" directory relative to
+ $CATALINA_HOME. If you wish, you can specify a different
+ directory with the "directory" attribute. Specify either a relative
+ (to $CATALINA_HOME) or absolute path to the desired directory.
+ -->
+ <Valve className="org.apache.catalina.valves.AccessLogValve"
+ directory="logs" prefix="localhost_access_log." suffix=".txt"
+ pattern="common"/>
+
+ <!-- Logger shared by all Contexts related to this virtual host. By
+ default (when using FileLogger), log files are created in the "logs"
+ directory relative to $CATALINA_HOME. If you wish, you can specify
+ a different directory with the "directory" attribute. Specify either a
+ relative (to $CATALINA_HOME) or absolute path to the desired
+ directory.-->
+ <Logger className="org.apache.catalina.logger.FileLogger"
+ directory="logs" prefix="localhost_log." suffix=".txt"
+ timestamp="true"/>
+
+ <!-- Define properties for each web application. This is only needed
+ if you want to set non-default properties, or have web application
+ document roots in places other than the virtual host's appBase
+ directory. -->
+
+ <!-- Tomcat Root Context -->
+ <!--
+ <Context path="" docBase="ROOT" debug="0"/>
+ -->
+
+ </Host>
+
+ </Engine>
+
+ </Service>
+
+</Server>
+
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh b/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh
new file mode 100644
index 000000000..49d6723a3
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/unix/moa-env.sh
@@ -0,0 +1,12 @@
+MOA_START=`pwd`
+
+CONFIG_OPT=-Dmoa.spss.server.configuration=$MOA_START/conf/moa-spss/spss.config.xml
+LOGGING_OPT=-Dlog4j.configuration=file:$MOA_START/conf/moa-spss/log4j.properties
+# NODE_ID_OPT=-Dmoa.node-id=node1
+# TRUST_STORE_OPT=-Djavax.net.ssl.trustStore=truststore.jks
+# TRUST_STORE_PASS_OPT=-Djavax.net.ssl.trustStorePassword=changeit
+# TRUST_STORE_TYPE_OPT=-Djavax.net.ssl.trustStoreType=jks
+
+export CATALINA_OPTS="$CONFIG_OPT $LOGGING_OPT $NODE_ID_OPT $TRUST_STORE_OPT $TRUST_STORE_PASS_OPT $TRUST_STORE_TYPE_OPT"
+
+echo CATALINA_OPTS=$CATALINA_OPTS
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties b/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties
new file mode 100644
index 000000000..673acf65d
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/uriworkermap.properties
@@ -0,0 +1,4 @@
+# a sample mod_jk uriworkermap.properties file for mapping
+# MOA SP/SS web service requests to workers
+
+/moa-spss/*=moaworker \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat b/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat
new file mode 100644
index 000000000..b7d740d12
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/win32/startTomcat.bat
@@ -0,0 +1,27 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+set MOA_SPSS_CFG_HOME=%CATALINA_HOME%\conf\moa-spss
+
+set PARAM_SPSSCONFIG=-Dmoa.spss.server.configuration=%MOA_SPSS_CFG_HOME%\spss.config.xml
+set PARAM_LOGGING=-Dlog4j.configuration=file:%MOA_SPSS_CFG_HOME%\log4j.properties
+set PARAM_NODEID=-Dmoa.node-id=Node1
+set PARAMS_MOA=%PARAM_SPSSCONFIG% %PARAM_LOGGING% %PARAM_NODEID%
+
+rem set PARAM_TRUST_STORE=-Djavax.net.ssl.trustStore=truststore.jks
+rem set PARAM_TRUST_STORE_PASS=-Djavax.net.ssl.trustStorePassword=changeit
+rem set PARAM_TRUST_STORE_TYPE=-Djavax.net.ssl.trustStoreType=jks
+rem set PARAMS_SSL=%PARAM_TRUST_STORE% %PARAM_TRUST_STORE_PASS% %PARAM_TRUST_STORE_TYPE%
+
+set CATALINA_OPTS=%PARAMS_MOA% %PARAMS_SSL%
+
+cd %CATALINA_HOME%
+bin\catalina.bat start \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat b/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat
new file mode 100644
index 000000000..09dd83f2d
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/win32/stopTomcat.bat
@@ -0,0 +1,13 @@
+rem ----------------------------------------------------------------------------------------------
+rem Modify these entries according to your needs
+
+rem JDK home directory (no trailing path separator)
+set JAVA_HOME=<jdk home directory>
+
+rem Tomcat 4.1.x home directory (no trailing path separator)
+set CATALINA_HOME=<Tomcat 4.1.x home directory>
+
+rem ----------------------------------------------------------------------------------------------
+
+cd %CATALINA_HOME%
+bin\catalina.bat stop \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties b/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties
new file mode 100644
index 000000000..9350ddc77
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tomcat/workers.properties
@@ -0,0 +1,6 @@
+# a sample workers.properties file defining a single mod_jk worker
+
+worker.list=moaworker
+worker.moaworker.type=ajp13
+worker.moaworker.host=localhost
+worker.moaworker.port=8009
diff --git a/spss/server/serverlib/resources/data/deploy/tools/certtool.bat b/spss/server/serverlib/resources/data/deploy/tools/certtool.bat
new file mode 100644
index 000000000..0504211b8
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tools/certtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the CertTool class
+rem
+rem Author: Patrick Peck
+rem Version: $Id: certtool.bat,v 1.6 2003/05/08 11:46:29 peck Exp $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CERTTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%iaik_moa_full.jar;%TOOLSPATH%iaik_jce_full.jar;%TOOLSPATH%iaik_ecc.jar;%TOOLSPATH%log4j-1.2.7.jar
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CERTTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tools/certtool.sh b/spss/server/serverlib/resources/data/deploy/tools/certtool.sh
new file mode 100644
index 000000000..c7ff374f4
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tools/certtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the CertTool class
+#
+# Author:Patrick Peck
+# Version: $Id: certtool.sh,v 1.9 2003/06/23 16:01:27 peck Exp $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CERTOOL=at.gv.egovernment.moa.spss.server.tools.CertTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/iaik_moa_full.jar:$TOOLSPATH/iaik_jce_full.jar:$TOOLSPATH/iaik_ecc.jar:$TOOLSPATH/log4j-1.2.7.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CERTOOL $*
diff --git a/spss/server/serverlib/resources/data/deploy/tools/configtool.bat b/spss/server/serverlib/resources/data/deploy/tools/configtool.bat
new file mode 100644
index 000000000..868df11f0
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tools/configtool.bat
@@ -0,0 +1,25 @@
+@echo off
+
+rem
+rem Script to invoke the ConfigTool class
+rem
+rem Author: Gregor Karlinger
+rem Version: $Id: $
+rem
+
+
+if %OS%=="Windows_NT" @setlocal
+
+set CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+set TOOLSPATH=%~p0
+set CLASSPATH=%TOOLSPATH%tools.jar;%TOOLSPATH%xalan.jar;
+
+if "%JAVA_HOME%"=="" goto noJavaHome
+%JAVA_HOME%\bin\java.exe -classpath %CLASSPATH% %CONFIGTOOL% %1 %2 %3 %4 %5 %6 %7 %8 %9
+goto end
+
+:noJavaHome
+echo error: JAVA_HOME not defined
+
+:end
+if %OS%=="Windows_NT" @endlocal \ No newline at end of file
diff --git a/spss/server/serverlib/resources/data/deploy/tools/configtool.sh b/spss/server/serverlib/resources/data/deploy/tools/configtool.sh
new file mode 100644
index 000000000..f7f29bae1
--- /dev/null
+++ b/spss/server/serverlib/resources/data/deploy/tools/configtool.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+#
+# Script to invoke the ConfigTool class
+#
+# Author: Gregor Karlinger
+# Version: $Id: $
+#
+
+
+if [ -z "$JAVA_HOME" ]; then
+ echo "error: JAVA_HOME not defined";
+ exit;
+fi
+
+CONFIGTOOL=at.gv.egovernment.moa.spss.server.tools.ConfigTool
+TOOLSPATH=`dirname $PWD/$0`
+CLASSPATH=$TOOLSPATH/tools.jar:$TOOLSPATH/xalan.jar
+
+$JAVA_HOME/bin/java -classpath $CLASSPATH $CONFIGTOOL $*
diff --git a/spss/server/serverlib/resources/licenses/Apache-2.0.txt b/spss/server/serverlib/resources/licenses/Apache-2.0.txt
new file mode 100644
index 000000000..57bc88a15
--- /dev/null
+++ b/spss/server/serverlib/resources/licenses/Apache-2.0.txt
@@ -0,0 +1,202 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
diff --git a/spss/server/serverlib/resources/licenses/IAIK-License.txt b/spss/server/serverlib/resources/licenses/IAIK-License.txt
new file mode 100644
index 000000000..c0db63b22
--- /dev/null
+++ b/spss/server/serverlib/resources/licenses/IAIK-License.txt
@@ -0,0 +1,13 @@
+IAIK MOA Runtime Lizenz
+
+Stiftung SIC gewährt dem Lizenznehmer eine nicht-exklusive, nicht-übertragbare
+Runtime Lizenz für die "IAIK MOA" Module im Kontext von MOA SP/SS und MOA ID.
+Alle Versuche, Teile oder die kompletten IAIK Crypto Toolkits, die zusammen
+mit dem MOA Produktbündel ausgeliefert werden, für andere Zwecke als jenem
+für Applikationen im MOA Kontext zu verwenden, sind nicht erlaubt. Auch weitere
+Versuche, die sich auf die Entwicklung von Anwendungen , oder aber darüber hinaus
+auf die Schaffung eines eigenen Toolkits, oder die Aufnahme in ein weiters
+weiteres Toolkit beziehen, sind nicht erlaubt.
+Die hier beschriebene Runtime Lizenz ist nicht übertragbar auf weitere
+Vertragspartner des Kunden, Personen, Organisationen oder Unternehmen
+außerhalb der Organisation des Lizenznehmers.
diff --git a/spss/server/serverlib/resources/licenses/Jaxen.txt b/spss/server/serverlib/resources/licenses/Jaxen.txt
new file mode 100644
index 000000000..bef65a520
--- /dev/null
+++ b/spss/server/serverlib/resources/licenses/Jaxen.txt
@@ -0,0 +1,40 @@
+Copyright 2003 (C) The Werken Company. All Rights Reserved.
+
+ Redistribution and use of this software and associated documentation
+ ("Software"), with or without modification, are permitted provided
+ that the following conditions are met:
+
+ 1. Redistributions of source code must retain copyright
+ statements and notices. Redistributions must also contain a
+ copy of this document.
+
+ 2. Redistributions in binary form must reproduce the
+ above copyright notice, this list of conditions and the
+ following disclaimer in the documentation and/or other
+ materials provided with the distribution.
+
+ 3. The name "jaxen" must not be used to endorse or promote
+ products derived from this Software without prior written
+ permission of The Werken Company. For written permission,
+ please contact bob@werken.com.
+
+ 4. Products derived from this Software may not be called "jaxen"
+ nor may "jaxen" appear in their names without prior written
+ permission of The Werken Company. "jaxen" is a registered
+ trademark of The Werken Company.
+
+ 5. Due credit should be given to The Werken Company.
+ (http://jaxen.werken.com/).
+
+ THIS SOFTWARE IS PROVIDED BY THE WERKEN COMPANY AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+ THE WERKEN COMPANY OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/spss/server/serverlib/resources/licenses/PostgreSQL-JDBC.txt b/spss/server/serverlib/resources/licenses/PostgreSQL-JDBC.txt
new file mode 100644
index 000000000..30d54d778
--- /dev/null
+++ b/spss/server/serverlib/resources/licenses/PostgreSQL-JDBC.txt
@@ -0,0 +1,26 @@
+Copyright (c) 1997-2005, PostgreSQL Global Development Group
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+3. Neither the name of the PostgreSQL Global Development Group nor the names
+ of its contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java
new file mode 100644
index 000000000..0d7abd1d3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAApplicationException.java
@@ -0,0 +1,41 @@
+package at.gv.egovernment.moa.spss;
+/**
+ * Base class of application specific MOA exceptions.
+ *
+ * Application exceptions are exceptions that originate from application
+ * code (e.g. inconsistent data provided by the user, no permission to access
+ * certain resources, etc.)
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOAApplicationException extends MOAException {
+
+ /**
+ * Create a new <code>MOAApplicationException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * exception.
+ * @param parameters Additional message parameters.
+ */
+ public MOAApplicationException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a new <code>MOAApplicationException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * <code>MOAApplicationException</code>.
+ * @param parameters Additional message parameters.
+ * @param wrapped The exception wrapped by this
+ * <code>MOAApplicationException</code>.
+ */
+ public MOAApplicationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java
new file mode 100644
index 000000000..f9eb12d63
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOAException.java
@@ -0,0 +1,161 @@
+package at.gv.egovernment.moa.spss;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * Base class of MOA specific exceptions.
+ *
+ * This class has the ability to wrap other exceptions which may be seen
+ * as the root cause for this exception. A similar mechanism is in place
+ * since JDK1.4 (see the <code>getClause()</code> method) but will not be used
+ * because of required compatibility with JDK1.3.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class MOAException extends Exception {
+ /** The message ID. */
+ private String messageId;
+ /** The wrapped <code>Throwable</code>. */
+ private Throwable wrapped;
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ */
+ public MOAException(String messageId, Object[] parameters) {
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ }
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ * @param wrapped The exception wrapped by the created
+ * <code>MOAException</code>.
+ */
+ public MOAException(String messageId, Object[] parameters, Throwable wrapped) {
+
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Returns the message ID of this exception.
+ *
+ * @return The message ID as provided in the constructor.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the exception wrapped by this <code>MOAException</code>.
+ *
+ * @return The exception wrapped by this exception. Possibly
+ * <code>null</code>, if none was provided at construction time.
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * Convert this <code>MOAException</code> to an <code>ErrorResponse</code>
+ * element from the MOA namespace.
+ *
+ * @return An <code>ErrorResponse</code> element, containing the subelements
+ * <code>ErrorCode</code> and <code>Info</code> required by the MOA schema.
+ */
+ public Element toErrorResponse() {
+ DocumentBuilder builder;
+ DOMImplementation impl;
+ Document doc;
+ Element errorResponse;
+ Element errorCode;
+ Element info;
+
+ // create a new document
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ impl = builder.getDOMImplementation();
+ } catch (ParserConfigurationException e) {
+ return null;
+ }
+
+ // build the ErrorResponse element
+ doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null);
+ errorResponse = doc.getDocumentElement();
+
+ // add MOA namespace declaration
+ errorResponse.setAttributeNS(
+ Constants.XMLNS_NS_URI,
+ "xmlns",
+ Constants.MOA_NS_URI);
+
+ // build the child elements
+ errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode");
+ errorCode.appendChild(doc.createTextNode(messageId));
+ info = doc.createElementNS(Constants.MOA_NS_URI, "Info");
+ info.appendChild(doc.createTextNode(getMessage()));
+ errorResponse.appendChild(errorCode);
+ errorResponse.appendChild(info);
+ return errorResponse;
+ }
+
+ /**
+ * Print a stack trace of this exception to <code>System.err</code>.
+ *
+ * @see java.lang.Throwable#printStackTrace()
+ */
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stack trace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stacktrace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java
new file mode 100644
index 000000000..0ff175b50
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOARuntimeException.java
@@ -0,0 +1,163 @@
+package at.gv.egovernment.moa.spss;
+import java.io.PrintStream;
+import java.io.PrintWriter;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * Base class of MOA specific runtime exceptions.
+ *
+ * This class has the ability to wrap other exceptions which may be seen
+ * as the root cause for this exception. A similar mechanism is in place
+ * since JDK1.4 (see the <code>getClause()</code> method) but will not be used
+ * because of required compatibility with JDK1.3.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOARuntimeException extends RuntimeException {
+ /** The message ID. */
+ private String messageId;
+ /** The wrapped <code>Throwable</code>. */
+ private Throwable wrapped;
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ */
+ public MOARuntimeException(String messageId, Object[] parameters) {
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ }
+
+ /**
+ * Create a <code>MOAException</code>.
+ *
+ * @param messageId The message ID of the message contained in the created
+ * <code>MOAException</code>.
+ * @param parameters The parameters needed to fill in the message arguments.
+ * @param wrapped The exception wrapped by the created
+ * <code>MOAException</code>.
+ */
+ public MOARuntimeException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(MessageProvider.getInstance().getMessage(messageId, parameters));
+ this.messageId = messageId;
+ this.wrapped = wrapped;
+ }
+
+ /**
+ * Returns the message ID of this exception.
+ *
+ * @return The message ID as provided in the constructor.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the exception wrapped by this <code>MOARuntimeException</code>.
+ *
+ * @return The exception wrapped by this exception. Possibly
+ * <code>null</code>, if none was provided at construction time.
+ */
+ public Throwable getWrapped() {
+ return wrapped;
+ }
+
+ /**
+ * Convert this <code>MOARuntimeException</code> to an <code>ErrorResponse</code>
+ * element from the MOA namespace.
+ *
+ * @return An <code>ErrorResponse</code> element, containing the subelements
+ * <code>ErrorCode</code> and <code>Info</code> required by the MOA schema.
+ */
+ public Element toErrorResponse() {
+ DocumentBuilder builder;
+ DOMImplementation impl;
+ Document doc;
+ Element errorResponse;
+ Element errorCode;
+ Element info;
+
+ // create a new document
+ try {
+ builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ impl = builder.getDOMImplementation();
+ } catch (ParserConfigurationException e) {
+ return null;
+ }
+
+ // build the ErrorResponse element
+ doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null);
+ errorResponse = doc.getDocumentElement();
+
+ // add MOA namespace declaration
+ errorResponse.setAttributeNS(
+ Constants.XMLNS_NS_URI,
+ "xmlns",
+ Constants.MOA_NS_URI);
+
+ // build the child elements
+ errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode");
+ errorCode.appendChild(doc.createTextNode(messageId));
+ info = doc.createElementNS(Constants.MOA_NS_URI, "Info");
+ info.appendChild(doc.createTextNode(getMessage()));
+ errorResponse.appendChild(errorCode);
+ errorResponse.appendChild(info);
+ return errorResponse;
+ }
+
+ /**
+ * Print a stack trace of this exception to <code>System.err</code>.
+ *
+ * @see java.lang.Throwable#printStackTrace()
+ */
+ public void printStackTrace() {
+ printStackTrace(System.err);
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stack trace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintStream)
+ */
+ public void printStackTrace(PrintStream s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+ /**
+ * Print a stack trace of this exception, including the wrapped exception.
+ *
+ * @param s The stream to write the stacktrace to.
+ * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter)
+ */
+ public void printStackTrace(PrintWriter s) {
+ super.printStackTrace(s);
+ if (getWrapped() != null) {
+ s.print("Caused by: ");
+ getWrapped().printStackTrace(s);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java
new file mode 100644
index 000000000..5a49b6852
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/MOASystemException.java
@@ -0,0 +1,40 @@
+package at.gv.egovernment.moa.spss;
+/**
+ * Base class of technical MOA exceptions.
+ *
+ * Technical exceptions are exceptions that originate from system failure (e.g.,
+ * a database connection fails, a component is not available, etc.)
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MOASystemException extends MOAException {
+
+ /**
+ * Create a new <code>MOASystemException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * exception.
+ * @param parameters Additional message parameters.
+ */
+ public MOASystemException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a new <code>MOASystemException</code>.
+ *
+ * @param messageId The identifier of the message associated with this
+ * <code>MOASystemException</code>.
+ * @param parameters Additional message parameters.
+ * @param wrapped The exception wrapped by this
+ * <code>MOASystemException</code>.
+ */
+ public MOASystemException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java
new file mode 100644
index 000000000..a0efa8924
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/Configurator.java
@@ -0,0 +1,60 @@
+package at.gv.egovernment.moa.spss.api;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+import at.gv.egovernment.moa.spss.MOAException;
+
+/**
+ * Configures the SP/SS API.
+ *
+ * Also handles dynamic configuration updates.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class Configurator {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.init.ConfiguratorImpl";
+
+ /** The single instance of this class. */
+ private static Configurator instance = null;
+
+ public static synchronized Configurator getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (Configurator) discover.newInstance(
+ Configurator.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Initialize the SP/SS configuration.
+ *
+ * Only a single call to this method will have an effect. Use
+ * <code>update()</code> for reflecting changes in the configuration instead.
+ *
+ * @throws MOAException An error occurred updating the SP/SS configuration.
+ */
+ public abstract void init() throws MOAException;
+
+ /**
+ * Update the SP/SS configuration.
+ *
+ * This will only have an effect after the system has been initialized once
+ * using <code>init()</code>.
+ *
+ * @throws MOAException An error occurred updating the SP/SS configuration.
+ */
+ public abstract void update() throws MOAException;
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
new file mode 100644
index 000000000..e306127b3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SPSSFactory.java
@@ -0,0 +1,1012 @@
+package at.gv.egovernment.moa.spss.api;
+
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * An abstract factory for creating MOA SP/SS API objects.
+ *
+ * Use <code>getInstance()</code> to get a concrete factory instance. Using
+ * this instance, concrete MOA SP/SS API object can be created.
+ *
+ * @author Patrick Peck
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public abstract class SPSSFactory {
+
+ /** The default implementation of this class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.api.impl.SPSSFactoryImpl";
+
+ /** The single instance of this class. */
+ private static SPSSFactory instance = null;
+
+ /**
+ * Returns the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized SPSSFactory getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SPSSFactory) discover.newInstance(
+ SPSSFactory.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ //
+ // Factory methods for creating XML signatures
+ //
+
+ /**
+ * Create a new <code>CreateXMLSignatureRequest</code> object.
+ *
+ * @param keyIdentifier The identifier for the key group to use for signing.
+ * @param singleSignatureInfos A <code>List</code> of
+ * <code>SingleSignatureInfo</code> objects containing information about a
+ * single signature to be created.
+ * @return The <code>CreateXMLSignatureRequest</code> containing the above
+ * data.
+ *
+ * @pre keyIdentifier != null && keyIdentifier.length() > 0
+ * @pre singleSignatureInfos != null
+ * @pre forall Object o in singleSignatureInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.SingleSignatureInfo
+ * @post return != null
+ */
+ public abstract CreateXMLSignatureRequest createCreateXMLSignatureRequest(
+ String keyIdentifier,
+ List singleSignatureInfos);
+
+ /**
+ * Create a new <code>SingleSignatureInfo</code> object.
+ *
+ * @param dataObjectInfos The data objects that will be signed (including
+ * transformations).
+ * @param createSignatureInfo Information about the signature environment. May
+ * be <code>null</code>.
+ * @param securityLayerConform If <code>true</code>, a Security Layer conform
+ * signature manifest is created, otherwise not.
+ * @return The <code>SingleSignatureInfo</code> containing the above data.
+ *
+ * @pre dataObjectInfos != null && dataObjectInfos.size() > 0
+ * @pre forall Object o in dataObjectInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo
+ * @post return != null
+ */
+ public abstract SingleSignatureInfo createSingleSignatureInfo(
+ List dataObjectInfos,
+ CreateSignatureInfo createSignatureInfo, boolean securityLayerConform);
+
+ /**
+ * Create a new <code>DataObjectInfo</code> object.
+ *
+ * @param structure The type of signature to create.
+ * @param childOfManifest If <code>true</code>, references will be returned
+ * as children of an XMLDsig manifest. Otherwise, they will be returned as
+ * children of the signature itself.
+ * @param dataObject The data object that will be signed.
+ * @param createTransformsInfoProfile Additional transformations to apply
+ * to the data object.
+ * @return The <code>DataObjectInfo</code> containing the above data.
+ *
+ * @pre DataObjectInfo.STRUCTURE_DETACHED.equals(structure) ||
+ * DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)
+ * @pre dataObject != null
+ * @pre createTransformsInfoProfile != null
+ * @post return != null
+ */
+ public abstract DataObjectInfo createDataObjectInfo(
+ String structure,
+ boolean childOfManifest,
+ Content dataObject,
+ CreateTransformsInfoProfile createTransformsInfoProfile);
+
+ /**
+ * Create a new <code>CreateTransformsInfoProfile</code> object containing a
+ * reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature creation.
+ * @return The <code>CreateTransformsInfoProfile</code> containing the given
+ * profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID);
+
+ /**
+ * Create a new <code>CreateTransformsInfoProfile</code> object by providing
+ * the profile data explicitly.
+ *
+ * @param transformsInfo The transformations to apply to the associated
+ * data object.
+ * @param supplements Supplemental information for the transformation. May be
+ * <code>null</code>.
+ * @return The <code>CreateTransformsInfoProfile</code> containing the above
+ * data.
+ *
+ * @pre transformsInfo != null
+ * @pre supplements != null implies
+ * forall Object o in supplements |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @post return != null
+ */
+ public abstract CreateTransformsInfoProfile createCreateTransformsInfoProfile(
+ CreateTransformsInfo transformsInfo,
+ List supplements);
+
+ /**
+ * Create a new <code>CreateTransformsInfo</code> object.
+ *
+ * @param transforms The <code>Transform</code>s to apply to the associated
+ * data object. May be <code>null</code>.
+ * @param finalDataMetaInfo Information about the type of the transformed
+ * data.
+ * @return The <code>CreateTransformsInfo</code> containing the above data.
+ *
+ * @pre transforms != null implies transforms.size > 0
+ * @pre transforms != null implies
+ * forall Object o in transforms |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Transform
+ * @pre finalDataMetaInfo != null
+ * @post return != null
+ */
+ public abstract CreateTransformsInfo createCreateTransformsInfo(
+ List transforms,
+ MetaInfo finalDataMetaInfo);
+
+ /**
+ * Create a new <code>CreateSignatureInfo</code> object.
+ *
+ * @param createSignatureEnvironment The signature environment that will
+ * contain the signature.
+ * @param createSignatureEnvironmentProfile Additional information about
+ * the signture environment.
+ * @return The <code>CreateSignatureInfo</code> containing the above data.
+ *
+ * @pre createSignatureEnvironment != null
+ * @pre createSignatureEnvironmentProfile != null
+ * @post return != null
+ */
+ public abstract CreateSignatureInfo createCreateSignatureInfo(
+ Content createSignatureEnvironment,
+ CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile);
+
+ /**
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object
+ * containing a reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature creation.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> containing
+ * the given profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID);
+
+ /**
+ * Create a new <code>CreateSignatureEnvironmentProfile</code> object by
+ * providing the profile data explicitly.
+ *
+ * @param createSignatureLocation The location where the signature will be
+ * inserted.
+ * @param supplements Additional information about the signature environment.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> containing the
+ * above data.
+ *
+ * @pre createSignatureLocation != null
+ * @pre supplements != null
+ * @pre forall Object o in supplements |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation
+ * @post return != null
+ */
+ public abstract CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(
+ CreateSignatureLocation createSignatureLocation,
+ List supplements);
+
+ /**
+ * Create a new <code>CreateSignatureLocation</code> object.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * parent element within the signature environment.
+ * @param index The index of the node, after which the signature will be
+ * inserted.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * while evaluating the XPath expression.
+ * @return The <code>CreateSignatureLocation</code> containing the above data.
+ *
+ * @pre xPathExpression != null
+ * @pre index >= 0
+ * @pre namespaceDeclarations != null
+ */
+ public abstract CreateSignatureLocation createCreateSignatureLocation(
+ String xPathExpression,
+ int index,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>CreateXMLSignatureResponse</code> object.
+ *
+ * @param responseElements The elements of the response, either
+ * <code>SignatureEnvironmentResponse</code> objects, or
+ * <code>ErrorResponse</code> objects.
+ * @return The new <code>CreateXMLSignatureResponse</code> containing the
+ * above data.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureResponseElement
+ * @post return != null
+ */
+ public abstract CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements);
+
+ /**
+ * Create a new <code>SignatureEnvironmentResponse</code> object.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * signature.
+ * @return The <code>SignatureEnvironmentResponse</code> containing the
+ * <code>signatureEnvironment</code>.
+ *
+ * @pre signatureEnvironment != null
+ * @post return != null
+ */
+ public abstract SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment);
+
+ /**
+ * Create a new <code>ErrorResponse</code> object.
+ *
+ * @param code The numerical error code.
+ * @param info Verbose error information.
+ * @return The new <code>ErrorResponse</code> containing the above data.
+ *
+ * @pre code > 0
+ * @pre info != null
+ * @post return != null
+ */
+ public abstract ErrorResponse createErrorResponse(int code, String info);
+
+ //
+ // Factory methods for verifying CMS signatures
+ //
+
+ /**
+ * Create a new <code>VerifyCMSSignatureRequest</code> object.
+ *
+ * @param signatories The indexes of the signatories whose signature is to
+ * be verified.
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param cmsSignature The CMS signature.
+ * @param dataObject The signed data. May be <code>null</code>.
+ * @param trustProfileID The ID of the trust profile containing the trusted
+ * root certificates.
+ * @return The <code>VerifyCMSSignatureRequest</code> containing the above
+ * data.
+ *
+ * @pre signatories != null && signatories.length > 0
+ * @pre signaturies != VerifyCMSSignatureRequest.ALL_SIGNATORIES implies
+ * for (int i = 0; i < signatories.length; i++)
+ * signatories[i] >= 1
+ * @pre cmsSignature != null
+ * @pre trustProfileID != null && trustProfileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID);
+
+ /**
+ * Create a new <code>CMSDataObject</code> object from data at a given URI.
+ *
+ * @param metaInfo Type information about the <code>CMSDataObject</code>.
+ * May be <code>null</code>.
+ * @param content The CMS content containing the data.
+ * @return The new <code>CMSDataObject</code> containing the data.
+ *
+ * @pre referenceURI != null
+ * @pre content != null
+ * @post return != null
+ */
+ public abstract CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ CMSContent content);
+
+ /**
+ * Create a new <code>CMSContent</code> object from the data contained at the
+ * given URI.
+ *
+ * @param referenceURI The URI identifying the data. Must be resolvable.
+ * @return The <code>CMSContent</code> containing a reference to the signed
+ * data.
+ *
+ * @pre referenceURI != null
+ * @post return != null
+ */
+ public abstract CMSContent createCMSContent(String referenceURI);
+
+ /**
+ * Create a new <code>CMSContent</code> object from a byte stream.
+ *
+ * @param binaryContent The byte stream containing the signed data.
+ * @return The new <code>CMSContent</code> containing the data from the
+ * byte stream.
+ *
+ * @pre binaryContent != null
+ * @post return != null
+ */
+ public abstract CMSContent createCMSContent(InputStream binaryContent);
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponse</code> object.
+ *
+ * @param responseElements Verification information about each signature.
+ * @return The new <code>VerifyCMSSignatureResponse</code> containing the
+ * status of signature verification for each signature contained in the
+ * request.
+ *
+ * @pre responseElements != null && responseElements.size() > 0
+ * @pre forall Object o in responseElements |
+ * o instanceof at.gv.egovernment.moa.spss.api.cmssign.VerifyCMSSignatureResponseElement
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements);
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponseElement</code> object.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param signatureCheck Result of the singature value check.
+ * @param certificateCheck Result of the certificate status check.
+ * @return The new <code>VerifyCMSSignatureResponseElement</code> containing
+ * the above data.
+ *
+ * @pre signerInfo != null && signatureCheck != null &&
+ * certificateCheck != null
+ * @post return != null
+ */
+ public abstract VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(
+ SignerInfo signerInfo,
+ CheckResult signatureCheck,
+ CheckResult certificateCheck);
+
+ //
+ // Factory methods for verifying XML signatures
+ //
+
+ /**
+ * Create a new <code>VerifyXMLSignatureRequest</code> object.
+ *
+ * @param dateTime The date for which the verification is to be performed.
+ * May be <code>null</code>.
+ * @param verifySignatureInfo Information about the signature environment and
+ * the location of the signature.
+ * @param supplementProfiles Supplemental information for the signature
+ * environment. May be <code>null</code>.
+ * @param signatureManifestParams Additional information for checking the
+ * signature manifest. May be <code>null</code>.
+ * @param returnHashInputData If <code>true</code>, hash input data will
+ * be returned in the response, otherwise not.
+ * @param trustProfileID The ID of the trust profile containing the trusted
+ * root certificates.
+ * @return The new <code>VerifyXMLSignatureRequest</code> containing the
+ * above data.
+ *
+ * @pre verifySignatureInfo != null
+ * @pre supplementProfiles != null implies
+ * forall Object o in supplementProfiles |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile
+ * @pre trustProfileID != null && trustProfileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID);
+
+ /**
+ * Create a new <code>VerifySignatureInfo</code> object.
+ *
+ * @param verifySignatureEnvironment The signature environment containing
+ * the signature to be verified.
+ * @param verifySignatureLocation The location of the signature within the
+ * signature environment.
+ * @return The new <code>VerifySignatureInfo</code> containing the above data.
+ *
+ * @pre verifySignatureEnvironment != null
+ * @pre verifySignatureLocation != null
+ * @post return != null
+ */
+ public abstract VerifySignatureInfo createVerifySignatureInfo(
+ Content verifySignatureEnvironment,
+ VerifySignatureLocation verifySignatureLocation);
+
+ /**
+ * Create a new <code>VerifySignatureLocation</code> object.
+ *
+ * @param xPathExpression The XPath expression to select the signature
+ * element within the signature environment.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * while evaluating the XPath expression.
+ * @return The new <code>VerifySignatureLocation</code> containing the above
+ * data.
+ *
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract VerifySignatureLocation createVerifySignatureLocation(
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>SupplementProfile</code> object containing a reference
+ * to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature verification.
+ * @return The <code>SupplementProfile</code> containing the profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract SupplementProfile createSupplementProfile(String profileID);
+
+ /**
+ * Create a new <code>SupplementProfile</code> object by providing the profile
+ * data explicitly.
+ *
+ * @param supplementProfile The profile data.
+ * @return The <code>SupplementProfile</code> containing the profile data.
+ */
+ public abstract SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile);
+
+ /**
+ * Create a new <code>SignatureManifestCheckParams</code> object.
+ *
+ * @param referenceInfos Information for checking the validity of a
+ * a reference.
+ * @param returnReferenceInputData If <code>true</code>, the input data to
+ * the calculation of reference digest values will be returned in the
+ * response, otherwise not.
+ * @return The <code>SignatureManifestCheckParams</code> containing the
+ * above data.
+ *
+ * @pre referenceInfos != null && referenceInfos.size() > 0
+ * @pre forall Object o in referenceInfos |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo
+ * @post return != null
+ */
+ public abstract SignatureManifestCheckParams createSignatureManifestCheckParams(
+ List referenceInfos,
+ boolean returnReferenceInputData);
+
+ /**
+ * Create a new <code>ReferenceInfo</code> object.
+ *
+ * @param verifyTransformsInfoProfiles The transformation profiles valid for
+ * the associated reference.
+ * @return The <code>ReferenceInfo</code> containing the transformation
+ * profiles.
+ *
+ * @pre verifyTransformsInfoProfiles != null &&
+ * verifyTransformsInfoProfiles.size() > 0
+ * @pre forall Object o in verifyTransformsInfoProfiles |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile
+ * @post return != null
+ */
+ public abstract ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles);
+
+ /**
+ * Create a new <code>VerifyTransformsInfoProfile</code> object containing
+ * a reference to a locally stored profile.
+ *
+ * @param profileID The profile ID to resolve during signature verification.
+ * @return The <code>VerifyTransformsInfoProfile</code> containing the
+ * given profile ID.
+ *
+ * @pre profileID != null && profileID.length() > 0
+ * @post return != null
+ */
+ public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID);
+
+ /**
+ * Create a new <code>VerifyTransformsInfoProfile</code> object by providing
+ * the profile data explicitly.
+ *
+ * @param transforms A valid chain of transformations for the reference.
+ * May be <code>null</code>.
+ * @param transformParameters Additional transformation information.
+ * @return The <code>VerifyTransformsInfoProfile</code> containing the above
+ * data.
+ *
+ * @pre transforms != null implies
+ * (transforms.size() > 0 &&
+ * forall Object o in transforms | o instanceof Transform)
+ * @pre transformParameters != null implies
+ * forall Object o in transformParameters |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter
+ * @post return != null
+ */
+ public abstract VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(
+ List transforms,
+ List transformParameters);
+
+ /**
+ * Create a new <code>TransformParameter</code> object with the data
+ * contained at the given URI.
+ *
+ * @param URI The URI identifying the data. The URI will be resolved during
+ * signature verification.
+ * @return The <code>TransformParameter</code> containing the URI of the
+ * data.
+ *
+ * @pre URI != null
+ * @post return != null
+ */
+ public abstract TransformParameter createTransformParameter(String URI);
+
+ /**
+ * Creata a new <code>TransformParameter</code> object containing the
+ * binary data.
+ *
+ * @param URI The URI identifying the data.
+ * @param binaryData The binary data.
+ * @return The <code>TransformParameter</code> containig the binary data.
+ *
+ * @pre URI != null
+ * @pre binary != null
+ * @post return != null
+ */
+ public abstract TransformParameter createTransformParameter(
+ String URI,
+ InputStream binaryData);
+
+ /**
+ * Create a new <code>TransformParameter</code> object containing the hash
+ * value of the transformation data.
+ *
+ * @param URI The URI identifying the data. It will be resolved during
+ * signature verification.
+ * @param digestMethod The digest method used for calculating the digest
+ * value.
+ * @param digestValue The hash value of the transformation data.
+ * @return The <code>TransformParameter</code> containing the above data.
+ *
+ * @pre URI != null
+ * @pre digestMethod != null
+ * @pre digestValue != null
+ */
+ public abstract TransformParameter createTransformParameter(
+ String URI,
+ String digestMethod,
+ byte[] digestValue);
+
+ /**
+ * Create a new <code>VerifyXMLSignatureResponse</code> object.
+ *
+ * @param signerInfo Information about the signer certificate.
+ * @param hashInputDatas The signed data objects. May be <code>null</code>.
+ * @param referenceInputDatas The reference input data objects.
+ * May be <code>null</code>.
+ * @param signatureCheck Status information about the signature check.
+ * @param signatureManifestCheck Status information about the signature
+ * manifest check.
+ * @param xmlDsigManifestChecks Status information about each XMLDsig manifest
+ * check.
+ * @param certificateCheck Status information about the signer certificate
+ * check.
+ * @return The <code>VerifyXMLSignatureResponse</code> containing the above
+ * data.
+ *
+ * @pre signerInfo != null
+ * @pre hashInputDatas != null implies
+ * forall Object o in hashInputDatas |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre referenceInputDatas != null implies
+ * forall Object o in referenceInputDatas |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.Content
+ * @pre signatureCheck != null
+ * @pre xmlDsigManifestChecks != null implies
+ * forall Object o in xmlDsigManifestChecks |
+ * o instanceof at.gv.egovernment.moa.spss.api.xmlverifyManifestRefsCheckResult
+ * @pre certificateCheck != null
+ * @post return != null
+ */
+ public abstract VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(
+ SignerInfo signerInfo,
+ List hashInputDatas,
+ List referenceInputDatas,
+ ReferencesCheckResult signatureCheck,
+ ReferencesCheckResult signatureManifestCheck,
+ List xmlDsigManifestChecks,
+ CheckResult certificateCheck);
+
+ /**
+ * Create a new <code>ReferencesCheckResult</code> object.
+ *
+ * @param code The status code.
+ * @param info Additional information about the reference check.
+ * @return The <code>ReferencesCheckResult</code> containing the above data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract ReferencesCheckResult createReferencesCheckResult(
+ int code,
+ ReferencesCheckResultInfo info);
+
+ /**
+ * Create a new <code>ReferencesCheckResultInfo</code> object.
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check result.
+ * May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
+ * @return The <code>ReferencesCheckResultInfo</code> containing the above
+ * data.
+ *
+ * @post return != null
+ */
+ public abstract ReferencesCheckResultInfo createReferencesCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences);
+
+ /**
+ * Create a new <code>ManifestRefsCheckResult</code> object.
+ *
+ * @param code The status code.
+ * @param info Additional information about the manifest check. May be
+ * <code>null</code>.
+ * @return The <code>ManifestRefsCheckResult</code> containing the above
+ * data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract ManifestRefsCheckResult createManifestRefsCheckResult(
+ int code,
+ ManifestRefsCheckResultInfo info);
+
+ /**
+ * Create a new <code>ManifestRefsCheckResultInfo</code> object.
+ *
+ * @param anyOtherInfo Arbitrary XML content describing the check result.
+ * May be <code>null</code>.
+ * @param failedReferences The indexes of the failed references. May be
+ * <code>null</code>.
+ * @param referringSigReference The index of the reference in the signature.
+ * @return The <code>ManifestRefsCheckResultInfo</code> containing the
+ * above data.
+ *
+ * @pre referringSigReference > 0
+ * @post return != null
+ */
+ public abstract ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences,
+ int referringSigReference);
+
+ //
+ // Factory methods for common objects
+ //
+
+ /**
+ * Create a new <code>Content</code> object referencing data via a URI.
+ *
+ * @param referenceURI The URI pointing to the content.
+ * @return The <code>Content</code> object containing the reference.
+ *
+ * @pre referenceURI != null && referenceURI.length() > 0
+ * @post return != null
+ */
+ public abstract Content createContent(String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing binary data.
+ *
+ * @param binaryData An <code>InputStream</code> containing the binary data.
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre binaryData != null
+ * @post return != null
+ */
+ public abstract Content createContent(
+ InputStream binaryData,
+ String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing location reference data.
+ *
+ * @param locationReferenceURI a URI pointing to the actual remote location of the content.
+ *
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ *
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre locationReferenceURI != null
+ * @post return != null
+ */
+ public abstract Content createContent(
+ String locationReferenceURI,
+ String referenceURI);
+
+ /**
+ * Create a new <code>Content</code> object containing XML data.
+ *
+ * @param xmlData The XML data contained in the new <code>Content</code>.
+ * @param referenceURI An URI identifying the data. May be <code>null</code>.
+ * @return The <code>Content</code> object containing the data.
+ *
+ * @pre xmlData != null
+ * @post return != null
+ */
+ public abstract Content createContent(NodeList xmlData, String referenceURI);
+
+ /**
+ * Create a new <code>XMLDataObjectAssociation</code> object.
+ *
+ * @param metaInfo Information about the content type. May be
+ * <code>null</code>.
+ * @param content The <code>Content</code> object containing the data.
+ * @return The <code>XMLDataObjectAssociation</code> containing the above
+ * data.
+ *
+ * @pre content != null
+ * @pre content.getContentType() == Content.CONTENT_XML ||
+ * content.getContentType() == Contetn.CONTENT_BINARY
+ * @pre content.getReference() != null
+ * @post return != null
+ */
+ public abstract XMLDataObjectAssociation createXMLDataObjectAssociation(
+ MetaInfo metaInfo,
+ Content content);
+
+ /**
+ * Create a new <code>MetaInfo</code> object.
+ *
+ * @param mimeType The MIME type part of the meta information.
+ * @param description Descriptive meta information. May be <code>null</code>.
+ * @param otherInfo XML meta information. May be <code>null</code>.
+ * @param type Type information for XML signature creation. May be <code>null</code>.
+ * @return The <code>MetaInfo</code> object containing the above data.
+ *
+ * @pre mimeType != null && mimeType.length() > 0
+ * @pre otherInfo != null implies
+ * forall Node n in otherInfo | n.getNodeType() == Node.ELEMENT
+ */
+ public abstract MetaInfo createMetaInfo(
+ String mimeType,
+ String description,
+ NodeList otherInfo,
+ String type);
+
+ /**
+ * Create a <code>CanonicalizationTransform</code> type of <code>Transform</code>.
+ *
+ * @param algorithmURI The algorithm URI of the canonicalization.
+ * @return The created <code>CanonicalizationTransform</code> object.
+ *
+ * @pre CanonicalizationTransform.CANONICAL_XML.equals(algorithmURI) ||
+ * CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
+ * @post return != null
+ */
+ public abstract Transform createCanonicalizationTransform(String algorithmURI);
+
+ /**
+ * Create an <code>ExclusiveCanonicalizationTransform</code> type of
+ * <code>Transform</code>.
+ *
+ * @param algorithmURI The algorithm URI of the exclusive canonicalization.
+ * @param inclusiveNamespacePrefixes The prefixes of the namespaces to
+ * treat according to canonical XML.
+ * @return The new <code>ExclusiveCanonicalizationTransform</code>
+ *
+ * @pre ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(algorithmURI) ||
+ * ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS.equals(algorithmURI)
+ * @pre inclusiveNamespacePrefixes != null
+ * @pre forall Object o in inclusiveNamespacePrefixes | o instanceof String
+ * @post return != null
+ */
+ public abstract Transform createExclusiveCanonicalizationTransform(
+ String algorithmURI,
+ List inclusiveNamespacePrefixes);
+
+ /**
+ * Create a <code>Base64Transform</code> type of <code>Transform</code>.
+ *
+ * @return A <code>Transform</code> denoting a Base64 decoding.
+ *
+ * @post return != null
+ */
+ public abstract Transform createBase64Transform();
+
+ /**
+ * Create a <code>EnvelopedSignatureTransform</code> type of
+ * <code>Transform</code>.
+ *
+ * @return A <code>Transform</code> denoting an enveloped signature.
+ *
+ * @post return != null
+ */
+ public abstract Transform createEnvelopedSignatureTransform();
+
+ /**
+ * Create an <code>XSLTTransform</code> type of <code>Transform</code>.
+ *
+ * @param styleSheet The XSLT stylesheet contained in the
+ * <code>Transform</code>.
+ * @return A <code>Transform</code> containing the XSLT stylesheet.
+ *
+ * @post return != null
+ */
+ public abstract Transform createXSLTTransform(Element styleSheet);
+
+ /**
+ * Create an <code>XPathTransform</code> type of <code>Transform</code>.
+ *
+ * @param xPathExpression The XPath expression to use in the created
+ * <code>Transform</code>.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to
+ * apply on evaluation of the XPath expression.
+ * @return The <code>XPathTransform</code> containing the above data.
+ *
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract Transform createXPathTransform(
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>XPathFilter2Transform</code> type of
+ * <code>Transform</code>.
+ *
+ * @param xPathFilters The filters contained in the newly created
+ * <code>XPathFilter2Transform</code>.
+ * @return The <code>XPathFilter2Transform</code> containing the given
+ * filters.
+ *
+ * @pre xPathFilters != null &&
+ * forall Object o in xPathFilters |
+ * o instanceof at.gv.egovernment.moa.spss.api.common.XPathFilter
+ * @post return != null
+ */
+ public abstract Transform createXPathFilter2Transform(List xPathFilters);
+
+ /**
+ * Create a new <code>XPathFilter</code> object.
+ *
+ * @param filterType The type of filter.
+ * @param xPathExpression The XPath expression contained in this filter.
+ * @param namespaceDeclarations The namespace prefix to URI mapping to apply
+ * on evaluation of the XPath expression.
+ * @return The <code>XPathFilter</code> containing the above data.
+ *
+ * @pre XPathFilter.SUBTRACT_TYPE.equals(filterType) ||
+ * XPathFilter.INTERSECT_TYPE.equals(filterType) ||
+ * XPathFilter.UNION_TYPE.equals(filterType)
+ * @pre xPathExpression != null
+ * @pre namespaceDeclarations != null
+ * @post return != null
+ */
+ public abstract XPathFilter createXPathFilter(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations);
+
+ /**
+ * Create a new <code>CheckResult</code> object.
+ *
+ * @param code The check code.
+ * @param info Verbose information about the check. May be <code>null</code>.
+ * @return The <code>CheckResult</code> containing the above data.
+ *
+ * @pre code >= 0
+ * @post return != null
+ */
+ public abstract CheckResult createCheckResult(int code, NodeList info);
+
+ /**
+ * Create a new <code>SignerInfo</code> object.
+ *
+ * @param signerCertificate The signer certificate in binary form.
+ * @param qualifiedCertificate <code>true</code>, if the signer certificate is
+ * a qualified certificate, otherwise <code>false</code>.
+ * @param publicAuthority <code>true</code>, if the signer certificate is a
+ * public authority certificate, otherwise <code>false</code>.
+ * @param publicAuthorityID The identification of the public authority
+ * (if <code>publicAuthority</code> is <code>true</code>). May be
+ * <code>null</code>.
+ * @return The <code>SignerInfo</code> containing the above data.
+ *
+ * @pre signerCertSubjectName != null
+ * @pre signerCertIssuerSerial != null
+ * @pre signerCertificate != null
+ */
+ public abstract SignerInfo createSignerInfo(
+ X509Certificate signerCertificate,
+ boolean qualifiedCertificate,
+ boolean publicAuthority,
+ String publicAuthorityID);
+
+ /**
+ * Create a new <code>X509IssuerSerial</code> object.
+ *
+ * @param issuerName The distinguished name of the issuer.
+ * @param issuerSerial The certificate serial number.
+ * @return The <code>X509IssuerSerial</code> containing the above data.
+ *
+ * @pre issuerName != null
+ * @pre issuerSerial != null
+ */
+ public abstract X509IssuerSerial createX509IssuerSerial(
+ String issuerName,
+ BigInteger issuerSerial);
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java
new file mode 100644
index 000000000..a84ca2a83
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureCreationService.java
@@ -0,0 +1,57 @@
+package at.gv.egovernment.moa.spss.api;
+
+import at.gv.egovernment.moa.spss.MOAException;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * Interface providing functions for signature creation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class SignatureCreationService {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.invoke.SignatureCreationServiceImpl";
+
+ /** The single instance of this class. */
+ private static SignatureCreationService instance = null;
+
+ /**
+ * Get an instance of the <code>SignatureCreationService</code>.
+ *
+ * @return A concrete instance of the <code>SignatureCreationService</code>.
+ */
+ public static synchronized SignatureCreationService getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SignatureCreationService) discover.newInstance(
+ SignatureCreationService.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Create an XML signature.
+ *
+ * @param request Information on how to create the signature.
+ * @return A <code>CreateXMLSignatureResponse</code> containing the
+ * signature.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract CreateXMLSignatureResponse createXMLSignature(CreateXMLSignatureRequest request)
+ throws MOAException;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java
new file mode 100644
index 000000000..d0fcb029a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/SignatureVerificationService.java
@@ -0,0 +1,69 @@
+package at.gv.egovernment.moa.spss.api;
+
+import org.apache.commons.discovery.tools.DiscoverClass;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Interface providing functions for verifying signatures.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class SignatureVerificationService {
+
+ /** The default implementation class. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.invoke.SignatureVerificationServiceImpl";
+
+ /** The single instance of this class. */
+ private static SignatureVerificationService instance = null;
+
+ /**
+ * Get an instance of the <code>SignatureVerificationService</code>.
+ *
+ * @return A concrete instance of the
+ * <code>SignatureVerificationService</code>.
+ */
+ public static synchronized SignatureVerificationService getInstance() {
+ if (instance == null) {
+ try {
+ DiscoverClass discover = new DiscoverClass();
+ instance =
+ (SignatureVerificationService) discover.newInstance(
+ SignatureVerificationService.class,
+ DEFAULT_IMPLEMENTATION);
+ } catch (Exception e) {
+ // this can not happen since we provide a valid default
+ // implementation
+ }
+ }
+ return instance;
+ }
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request Detailed information on the verification that should be
+ * performed.
+ * @return A <code>VerifyCMSSignatureResponse</code> object that contains
+ * information about the performed verification.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException;
+ /**
+ * Verfiy an XML Signature.
+ *
+ * @param request information on the verification that should be performed.
+ * @return A <code>VerifyXMLSignatureResponse</code> object that contains
+ * information about the performed verification.
+ * @throws MOAException Error in server side MOA module.
+ */
+ public abstract VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
new file mode 100644
index 000000000..b4ecb3937
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContent.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Base class for objects containing CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContent {
+ /**
+ * Indicates that this object contains a reference to the CMS content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+ /**
+ * Indicates that this object contains the CMS content explicitly.
+ */
+ public static final int EXPLICIT_CONTENT = 1;
+
+ /**
+ * Gets the type of the contained content.
+ *
+ * @return The type of content, either <code>REFERENCE_CONTENT</code> or
+ * <code>EXPLICIT_CONTENT</code>.
+ */
+ public int getContentType();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
new file mode 100644
index 000000000..58c2b0259
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentExcplicit.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary CMS content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentExcplicit extends CMSContent {
+ /**
+ * Gets the content as a stream.
+ *
+ * @return A stream containing the binary content.
+ */
+ public InputStream getBinaryContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
new file mode 100644
index 000000000..7c4e6d913
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSContentReference.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+/**
+ * Encapsulates CMS content that is referenced by an URI.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSContentReference extends CMSContent {
+ /**
+ * Gets the reference URI from wher the content can be retrieved.
+ *
+ * @return The reference URI.
+ */
+ public String getReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
new file mode 100644
index 000000000..37f6fd396
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/CMSDataObject.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * A data object used for verification of CMS signatures.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CMSDataObject {
+ /**
+ * Gets the meta information of the content.
+ *
+ * @return An object containig the meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content of the data object.
+ *
+ * @return The actual content.
+ */
+ public CMSContent getContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
new file mode 100644
index 000000000..6d1f389af
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureRequest.java
@@ -0,0 +1,52 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.io.InputStream;
+import java.util.Date;
+
+/**
+ * Object that encapsulates a request to verify a CMS signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureRequest {
+ /**
+ * Indicates, that signature checks for all signatories must be returned.
+ */
+ public static int[] ALL_SIGNATORIES = new int[] { -1 };
+ /**
+ * Gets the positions of signatories whose signature must be verified.
+ *
+ * @return The positions of signatories.
+ */
+ public int[] getSignatories();
+ /**
+ * Gets the date and time for which the signature verification has to
+ * be performed.
+ *
+ * @return Date and time for which the signature verification has
+ * to be performed.
+ */
+ public Date getDateTime();
+ /**
+ * Gets the binary CMS signature.
+ *
+ * @return An <code>InputStream</code> from which the binary CMS signature
+ * can be read.
+ */
+ public InputStream getCMSSignature();
+ /**
+ * Gets the data object necessary for the verification.
+ *
+ * @return The data object necessary for verification.
+ */
+ public CMSDataObject getDataObject();
+ /**
+ * Gets the profile ID of trusted certificates to be used for signature
+ * verification.
+ *
+ * @return The profile ID of trusted certificates.
+ */
+ public String getTrustProfileId();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
new file mode 100644
index 000000000..5f2e6d255
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponse.java
@@ -0,0 +1,21 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import java.util.List;
+
+
+/**
+ * Object that encapsulates the response on a request to verify a CMS
+ * signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponse {
+ /**
+ * Gets the response elements.
+ *
+ * @return The response elements.
+ */
+ public List getResponseElements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
new file mode 100644
index 000000000..49ddb9419
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/cmsverify/VerifyCMSSignatureResponseElement.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.spss.api.cmsverify;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Contains detailed information about the verification of a signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyCMSSignatureResponseElement {
+ /**
+ * Gets a SignerInfo element according to CMS.
+ *
+ * @return The SignerInfo element according to CMS.
+ */
+ public SignerInfo getSignerInfo();
+ /**
+ * Gets the result of the signature verification.
+ *
+ * @return The result of the signature verification.
+ */
+ public CheckResult getSignatureCheck();
+ /**
+ * Gets the result of the certificate verification.
+ *
+ * @return The result of the certificate verification.
+ */
+ public CheckResult getCertificateCheck();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
new file mode 100644
index 000000000..94785727d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Base64Transform.java
@@ -0,0 +1,13 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * A <code>Transform</code> performing a Base64 decoding.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Base64Transform extends Transform {
+ /** Algorithm URI of the Base64 <code>Transform</code> type. */
+ public static final String BASE64_DECODING =
+ "http://www.w3.org/2000/09/xmldsig#base64";
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
new file mode 100644
index 000000000..352461e52
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CanonicalizationTransform.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CanonicalizationTransform extends Transform {
+ /** Algorithm URI of canonical XML. */
+ public static final String CANONICAL_XML = Constants.C14N_URI;
+ /** Algorithm URI of canonical XML with comments. */
+ public static final String CANONICAL_XML_WITH_COMMENTS =
+ Constants.C14N_WITH_COMMENTS_URI;
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java
new file mode 100644
index 000000000..974483d82
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/CheckResult.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating the result of a signature verification.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CheckResult {
+ /**
+ * Gets the result code.
+ *
+ * @return The result code.
+ */
+ public int getCode();
+ /**
+ * Gets descriptive information.
+ *
+ * @return Descriptive information.
+ */
+ public NodeList getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java
new file mode 100644
index 000000000..0777c3d65
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Content.java
@@ -0,0 +1,47 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Encapsulates content data.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public interface Content {
+
+ /**
+ * Indicates that this object contains a URI reference to some content.
+ */
+ public static final int REFERENCE_CONTENT = 0;
+
+ /**
+ * Indicates that this object contains binary content.
+ */
+ public static final int BINARY_CONTENT = 1;
+
+ /**
+ * Indicates that this object contains XML content.
+ */
+ public static final int XML_CONTENT = 2;
+
+ /**
+ * Indicates that this object contains a location reference content.
+ */
+ public static final int LOCREF_CONTENT = 3;
+
+ /**
+ * Gets the type of content contained in this object.
+ *
+ * @return The type of content, one of <code>BINARY_CONTENT</code>, <code>XML_CONTENT</code>, <code>
+ * REFERENCE_CONTENT</code> or <code>LOCREF_CONTENT</code>.
+ */
+ public int getContentType();
+
+ /**
+ * Gets the reference to the content data (a URI).
+ *
+ * @return The reference to the content data.
+ */
+ public String getReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
new file mode 100644
index 000000000..664afa406
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentBinary.java
@@ -0,0 +1,21 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates binary content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentBinary extends Content {
+ /**
+ * Get the binary content.
+ *
+ * @return An <code>InputStream</code> from which the binary content can
+ * be read.
+ */
+ public InputStream getBinaryContent();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java
new file mode 100644
index 000000000..f640f2b92
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentLocRef.java
@@ -0,0 +1,17 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Encapsulates location reference content.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public interface ContentLocRef extends Content
+{
+ /**
+ * Gets the location reference URI pointing to the actual remote location of the content.
+ *
+ * @return the location reference URI.
+ */
+ public String getLocationReferenceURI();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java
new file mode 100644
index 000000000..c10f0c2f8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentReference.java
@@ -0,0 +1,11 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Content containing a reference to content data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ContentReference extends Content {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java
new file mode 100644
index 000000000..ad5930452
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ContentXML.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Encapsulates arbitrary XML content.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ContentXML extends Content {
+ /**
+ * Gets the XML content stored in this object.
+ *
+ * @return The XML content.
+ */
+ public NodeList getXMLContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
new file mode 100644
index 000000000..862cb84da
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ElementSelector.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A class containing data for selecting single elements using an XPath
+ * expression.
+ *
+ * Derived classes are used to point to the <code>CreateSignatureLocation</code>
+ * and the <code>VerifySignatureLocation</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ElementSelector {
+ /**
+ * Gets the XPath expression pointing to a single element.
+ *
+ * @return The XPath expression to select the signature parent element.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets the namespace prefix to URI mapping to use when evaluating the XPath.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
new file mode 100644
index 000000000..f951e35c0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/EnvelopedSignatureTransform.java
@@ -0,0 +1,15 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * An enveloped signature type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface EnvelopedSignatureTransform extends Transform {
+ /**
+ * Algorithm URI of the enveloped signature type of <code>Transform</code>.
+ */
+ public static final String ENVELOPED_SIGNATURE =
+ "http://www.w3.org/2000/09/xmldsig#enveloped-signature";
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
new file mode 100644
index 000000000..369270259
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/ExclusiveCanonicalizationTransform.java
@@ -0,0 +1,27 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * An exclusive canonicalization type of <code>Transform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ExclusiveCanonicalizationTransform extends Transform {
+ /** Algorithm URI of exclusive canonical XML. */
+ public static final String EXCLUSIVE_CANONICAL_XML = Constants.EXC_C14N_URI;
+ /** Algorithm URI of exclusive canonical XML with comments. */
+ public static final String EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS =
+ Constants.EXC_C14N_WITH_COMMENTS_URI;
+
+ /**
+ * Sets the namespace prefixes that are handled in the same manner as in
+ * canonical XML.
+ *
+ * @return The inclusive namespace prefixes.
+ */
+ public List getInclusiveNamespacePrefixes();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java
new file mode 100644
index 000000000..fd2b69c6d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/InputData.java
@@ -0,0 +1,47 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Interface specifying accessors for two attributes needed for returning
+ * <code>HashInputData</code> and <code>ReferenceInputData</code> information
+ * as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public interface InputData extends Content
+{
+ /**
+ * Possible value returned by {@link #getPartOf}.
+ */
+ public static String CONTAINER_SIGNEDINFO_ = "SignedInfo";
+
+ /**
+ * Possible value returned by {@link #getPartOf}.
+ */
+ public static String CONTAINER_XMLDSIGMANIFEST_ = "XMLDSIGManifest";
+
+ /**
+ * Value returned by {link getReferringReferenceNumber}, signalling that the
+ * attribute is not used.
+ */
+ public static int REFERER_NONE_ = -1;
+
+ /**
+ * Returns a <code>String</code> signalling what kind of container the
+ * XMLDSIG <code>Reference</code> this <code>InputData</code> belongs
+ * to is part of.
+ *
+ * @return the kind of container.
+ */
+ public String getPartOf();
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this method
+ * returns a positive int value signalling the particular <code>Reference</code>
+ * of the XMLDSIG <code>SignedInfo</code> referring to the XMLDSIGManifest or
+ * SignatureManifest respectively.
+ */
+ public int getReferringReferenceNumber();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
new file mode 100644
index 000000000..56a1793af
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/MetaInfo.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Object encapsulating descriptive meta information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface MetaInfo {
+ /**
+ * Gets the mime type of the associated object.
+ *
+ * @return The mimetype of the associated object.
+ */
+ public String getMimeType();
+ /**
+ * Gets the descriptive information (URI).
+ *
+ * @return URI referencing the descriptive information.
+ */
+ public String getDescription();
+ /**
+ * Gets the elemental informations.
+ *
+ * @return The elemental informations.
+ */
+ public NodeList getAnyElements();
+ /**
+ * Gets the XML signature creation type information of the associated object.
+ *
+ * @return the XML signature creation type information of the associated object.
+ */
+ public String getType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
new file mode 100644
index 000000000..c3b4aaadc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/SignerInfo.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.security.cert.X509Certificate;
+
+
+/**
+ * Contains information about the signer.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignerInfo {
+ /**
+ * Gets the signer certificate.
+ *
+ * @return The signer certificate.
+ */
+ public X509Certificate getSignerCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is qualified.
+ *
+ * @return <code>true</code>, if the certificate is qualified, otherwise
+ * <code>false</code>.
+ */
+ public boolean isQualifiedCertificate();
+ /**
+ * Checks, whether the certificate contained in this object is a
+ * public authority certificate.
+ *
+ * @return <code>true</code>, if the certificate is a public authority
+ * certificate, otherwise <code>false</code>.
+ */
+ public boolean isPublicAuthority();
+ /**
+ * Gets the public authority ID, if the certificate contained in this
+ * object is from a public authority.
+ *
+ * @return The public authority ID.
+ */
+ public String getPublicAuhtorityID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java
new file mode 100644
index 000000000..49a4e7c35
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/Transform.java
@@ -0,0 +1,16 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+/**
+ * Base class for XMLDsig <code>Transform</code> elements.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface Transform {
+ /**
+ * Gets the algorithm URI of this <code>Transform</code>.
+ *
+ * @return The algorithm URI of this <code>Transform</code>.
+ */
+ public String getAlgorithmURI();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
new file mode 100644
index 000000000..d2ea88968
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/X509IssuerSerial.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.math.BigInteger;
+
+/**
+ * Contains an X.509 issuer distinguished name/serial number pair.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface X509IssuerSerial {
+ /**
+ * Gets the issuer distinguished name.
+ *
+ * @return The issuer distinguished name.
+ */
+ public String getX509IssuerName();
+ /**
+ * Gets the issuer serial number.
+ *
+ * @return The issuer serial number.
+ */
+ public BigInteger getX509SerialNumber();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
new file mode 100644
index 000000000..e1e034222
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XMLDataObjectAssociation.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+
+/**
+ * Object encapsulating arbitrary content and optional descriptive meta
+ * information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface XMLDataObjectAssociation {
+ /**
+ * Gets descriptive meta information.
+ *
+ * @return The descriptive meta information.
+ */
+ public MetaInfo getMetaInfo();
+ /**
+ * Gets the actual content.
+ *
+ * @return The content of this association.
+ */
+ public Content getContent();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
new file mode 100644
index 000000000..247776ce0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * An XPath expression set operation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter {
+ /** Subtract this filter's node set from the resulting node set. */
+ public static final String SUBTRACT_TYPE = "subtract";
+ /** Intersect this filter's node set with the resulting node set. */
+ public static final String INTERSECT_TYPE = "intersect";
+ /** Compute the union of this filter's node set and the resulting node set. */
+ public static final String UNION_TYPE = "union";
+
+ /**
+ * Gets the type of this <code>XPathFilter</code>.
+ *
+ * @return The type of this <code>XPathFilter</code>.
+ */
+ public String getFilterType();
+ /**
+ * Gets the XPath expression for selecting the nodes.
+ *
+ * @return The XPath expression for selecting the nodes.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
new file mode 100644
index 000000000..335d37dbf
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathFilter2Transform.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.List;
+
+/**
+ * An XPath type of <code>Transform</code> containing multiple filters for
+ * performing set operations on XPath selections.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathFilter2Transform extends Transform {
+ /** Algorithm URI for the XPath Filter2 <code>Transform</code>. */
+ public static final String XPATH_FILTER2 =
+ "http://www.w3.org/2002/06/xmldsig-filter2";
+
+ /**
+ * Gets the <code>XPathFilter</code>s contained in this
+ * <code>XPathFilter2Transform</code>.
+ *
+ * @return The <code>XPathFilter</code>s.
+ */
+ public List getFilters();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
new file mode 100644
index 000000000..f1cc1a2bc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XPathTransform.java
@@ -0,0 +1,30 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import java.util.Map;
+
+/**
+ * A <code>Transform</code> performing an XPath selection.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XPathTransform extends Transform {
+ /** Algorithm URI of the XPath <code>Transform</code>. */
+ public static final String XPATH =
+ "http://www.w3.org/TR/1999/REC-xpath-19991116";
+
+ /**
+ * Gets the XPath expression used for selection.
+ *
+ * @return The XPath expression used for selection.
+ */
+ public String getXPathExpression();
+ /**
+ * Gets The namespace prefix to URI mapping used during evaluation of the
+ * XPath expression.
+ *
+ * @return The namespace prefix to URI mapping.
+ */
+ public Map getNamespaceDeclarations();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
new file mode 100644
index 000000000..7f44bb060
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/common/XSLTTransform.java
@@ -0,0 +1,23 @@
+package at.gv.egovernment.moa.spss.api.common;
+
+import org.w3c.dom.Element;
+
+/**
+ * A <code>Transform</code> containing an XSLT stylesheet.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface XSLTTransform extends Transform {
+ /** Algorithm URI for the XSLT type of <code>Transform</code>. */
+ public static final String XSLT =
+ "http://www.w3.org/TR/1999/REC-xslt-19991116";
+
+ /**
+ * Gets the XSLT stylesheet element used for the transformation.
+ *
+ * @return The XSLT stylesheet element used for the transformation.
+ */
+ public Element getStylesheet();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java
new file mode 100644
index 000000000..4af075da2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/Base64TransformImpl.java
@@ -0,0 +1,22 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Base64Transform;
+
+/**
+ * Default implementation of <code>Base64Transform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class Base64TransformImpl
+ extends TransformImpl
+ implements Base64Transform {
+
+ /**
+ * Create a new <code>Base64TransformImpl</code> object.
+ */
+ public Base64TransformImpl() {
+ setAlgorithmURI(BASE64_DECODING);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java
new file mode 100644
index 000000000..dd700cf21
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentExplicitImpl.java
@@ -0,0 +1,40 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+
+/**
+ * Default implementation of <code>CMSContentExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSContentExplicitImpl implements CMSContentExcplicit {
+
+ /** The binary content, as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param content The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream content) {
+ this.binaryContent = content;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return EXPLICIT_CONTENT
+ */
+ public int getContentType() {
+ return EXPLICIT_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java
new file mode 100644
index 000000000..f9c080a0d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSContentReferenceImpl.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentReference;
+
+/**
+ * Default implementation of <code>CMSContentReference</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSContentReferenceImpl implements CMSContentReference {
+
+ /** The reference pointing to the actual data. */
+ private String reference;
+
+ /**
+ * Sets the reference URI.
+ *
+ * @param referenceURI The URI pointing to the content data.
+ */
+ public void setReference(String referenceURI) {
+ this.reference = referenceURI;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+ /**
+ * Gets the content type.
+ *
+ * @return REFERENCE_CONTENT
+ */
+ public int getContentType() {
+ return REFERENCE_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java
new file mode 100644
index 000000000..6eec4e847
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CMSDataObjectImpl.java
@@ -0,0 +1,46 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Default implementation of <code>CMLSDataObject</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CMSDataObjectImpl implements CMSDataObject {
+
+ /** The <code>MetaInfo</code> associated with the CMS data object. */
+ private MetaInfo metaInfo;
+ /** The <code>CMSContent</code> contained in this data object. */
+ private CMSContent cmsContent;
+
+ /**
+ * Sets the meta information associated with the CMS data object.
+ *
+ * @param metaInfo The meta information.
+ */
+ public void setMetaInfo(MetaInfo metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public MetaInfo getMetaInfo() {
+ return metaInfo;
+ }
+
+ /**
+ * Sets the data of this <code>CMSDataObject</code>.
+ *
+ * @param cmsContent The actual data of this <code>CMSDataObject</code>.
+ */
+ public void setContent(CMSContent cmsContent) {
+ this.cmsContent = cmsContent;
+ }
+
+ public CMSContent getContent() {
+ return cmsContent;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java
new file mode 100644
index 000000000..cf446d1b4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CanonicalizationTransformImpl.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+
+/**
+ * Default implementation of <code>CanonicalizationTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CanonicalizationTransformImpl
+ extends TransformImpl
+ implements CanonicalizationTransform {
+
+ /**
+ * Create a new <code>CanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI Algorithm URI of the canonicalization
+ * <code>Transform</code> type.
+ */
+ public CanonicalizationTransformImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java
new file mode 100644
index 000000000..2acb12e51
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CheckResultImpl.java
@@ -0,0 +1,52 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+
+/**
+ * Default implementation of <code>CheckResult</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CheckResultImpl implements CheckResult {
+ /** The result code. */
+ private int code;
+
+ /** Additional information. */
+ private NodeList info;
+
+ /**
+ * Sets a result code.
+ *
+ * @param code The result code.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.CheckResult#getCode()
+ */
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets a descriptive information.
+ *
+ * @param info The descriptive information.
+ */
+ public void setInfo(NodeList info) {
+ this.info = info;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.CheckResult#getInfo()
+ */
+ public NodeList getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java
new file mode 100644
index 000000000..bbed6bf8b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentBinaryImpl.java
@@ -0,0 +1,40 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+
+/**
+ * Default implementation of <code>ContentBinary</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ContentBinaryImpl extends ContentImpl implements ContentBinary {
+
+ /** The binary content as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param binaryContent The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream binaryContent) {
+ this.binaryContent = binaryContent;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return BINARY_CONTENT
+ */
+ public int getContentType() {
+ return BINARY_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java
new file mode 100644
index 000000000..7f331d2cd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentImpl.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Default base class for <code>Content</code> implementations.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class ContentImpl implements Content {
+ /** The reference pointing to the content data. */
+ private String reference;
+
+ /**
+ * Sets the reference pointing to the content data.
+ *
+ * @param referenceURI The URI of the content data.
+ */
+ public void setReference(String referenceURI) {
+ this.reference = referenceURI;
+ }
+
+ public String getReference() {
+ return reference;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java
new file mode 100644
index 000000000..902f7bd72
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentLocRefImpl.java
@@ -0,0 +1,44 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.ContentLocRef;
+
+/**
+ * Default implementation of <code>ContentLocRef</code>.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ContentLocRefImpl extends ContentImpl implements ContentLocRef
+{
+ /**
+ * The location reference URI pointing to the actual remote location of the content.
+ */
+ private String locationReferenceURI_;
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentLocRef#getLocationReference()
+ */
+ public String getLocationReferenceURI()
+ {
+ return locationReferenceURI_;
+ }
+
+ /**
+ * Sets the location reference URI pointing to the actual remote location of the content.
+ *
+ * @param locationReferenceURI the location reference URI.
+ */
+ public void setLocationReferenceURI(String locationReferenceURI)
+ {
+ locationReferenceURI_ = locationReferenceURI;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return LOCREF_CONTENT.
+ */
+ public int getContentType() {
+ return LOCREF_CONTENT;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java
new file mode 100644
index 000000000..50609aa0e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentReferenceImpl.java
@@ -0,0 +1,24 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.ContentReference;
+
+/**
+ * Default implementation of <code>ContentReference</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ContentReferenceImpl
+ extends ContentImpl
+ implements ContentReference {
+
+ /**
+ * Gets the type of content.
+ *
+ * @return REFERENCE_CONTENT
+ */
+ public int getContentType() {
+ return REFERENCE_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java
new file mode 100644
index 000000000..c03f5edde
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ContentXMLImpl.java
@@ -0,0 +1,40 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+
+/**
+ * Default implementation of <code>ContentXML</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ContentXMLImpl extends ContentImpl implements ContentXML {
+
+ /** The nodes making up the XML content. */
+ private NodeList xmlContent;
+
+ /**
+ * Sets the nodes making up the XML content.
+ *
+ * @param xmlContent The XML content.
+ */
+ public void setXMLContent(NodeList xmlContent) {
+ this.xmlContent = xmlContent;
+ }
+
+ public NodeList getXMLContent() {
+ return xmlContent;
+ }
+
+ /**
+ * Gets the type of content.
+ *
+ * @return XML_CONTENT
+ */
+ public int getContentType() {
+ return XML_CONTENT;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java
new file mode 100644
index 000000000..22e4cd61d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileExplicitImpl.java
@@ -0,0 +1,66 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+
+/**
+ * Default implementation of
+ * <codeCreateSignatureEnvironmentProfileExplicit</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateSignatureEnvironmentProfileExplicitImpl
+ implements CreateSignatureEnvironmentProfileExplicit {
+
+ /** The insertion location of the signature to be created. */
+ private CreateSignatureLocation createSignatureLocation;
+
+ /** Supplemental information for evaluating the signature environment. */
+ private List supplements;
+
+ /**
+ * Sets the insertion location of the signature to be created.
+ *
+ * @param createSignatureLocation The insertion location of the signature to
+ * be created.
+ */
+ public void setCreateSignatureLocation(CreateSignatureLocation createSignatureLocation) {
+ this.createSignatureLocation = createSignatureLocation;
+ }
+
+ public CreateSignatureLocation getCreateSignatureLocation() {
+ return createSignatureLocation;
+ }
+
+ /**
+ * Sets the supplemental information for evaluating the signature
+ * environment.
+ *
+ * @param supplements The supplemental information.
+ */
+ public void setSupplements(List supplements) {
+ this.supplements =
+ supplements != null
+ ? Collections.unmodifiableList(new ArrayList(supplements))
+ : null;
+ }
+
+ public List getSupplements() {
+ return supplements;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE
+ */
+ public int getCreateSignatureEnvironmentProfileType() {
+ return EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java
new file mode 100644
index 000000000..1c7dc6439
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureEnvironmentProfileIDImpl.java
@@ -0,0 +1,39 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileID;
+
+/**
+ * Default implementation of <code>CreateSignatureEnvironmentProfileID</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateSignatureEnvironmentProfileIDImpl
+ implements CreateSignatureEnvironmentProfileID {
+
+ /** The profile ID. */
+ private String createSignatureEnvironmentProfileID;
+
+ /**
+ * Sets the profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setCreateSignatureEnvironmentProfileID(String profileID) {
+ this.createSignatureEnvironmentProfileID = profileID;
+ }
+
+ public String getCreateSignatureEnvironmentProfileID() {
+ return createSignatureEnvironmentProfileID;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return ID_CREATESIGNATUREENVIRONMENTPROFILE
+ */
+ public int getCreateSignatureEnvironmentProfileType() {
+ return ID_CREATESIGNATUREENVIRONMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java
new file mode 100644
index 000000000..097af7fff
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureInfoImpl.java
@@ -0,0 +1,50 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+
+/**
+ * Default implementation of <code>CreateSignatureInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateSignatureInfoImpl implements CreateSignatureInfo {
+
+ /** The signature environment that will contain the newly created
+ * signature. */
+ private Content createSignatureEnvironment;
+
+ /** Additional information about the signature environment. */
+ private CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile;
+
+ /**
+ * Sets the signature environment that will contain the newly created
+ * signature.
+ *
+ * @param createSignatureEnvironment The signature environment.
+ */
+ public void setCreateSignatureEnvironment(Content createSignatureEnvironment) {
+ this.createSignatureEnvironment = createSignatureEnvironment;
+ }
+
+ public Content getCreateSignatureEnvironment() {
+ return createSignatureEnvironment;
+ }
+
+ /**
+ * Sets the signature environment profile containing additional information
+ * about the signature environment.
+ *
+ * @param profile The signature environment profile.
+ */
+ public void setCreateSignatureEnvironmentProfile(CreateSignatureEnvironmentProfile profile) {
+ this.createSignatureEnvironmentProfile = profile;
+ }
+
+ public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile() {
+ return createSignatureEnvironmentProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java
new file mode 100644
index 000000000..c0b36f505
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateSignatureLocationImpl.java
@@ -0,0 +1,31 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+
+/**
+ * Default implementation of <code>CreateSignatureLocation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateSignatureLocationImpl
+ extends ElementSelectorImpl
+ implements CreateSignatureLocation {
+
+ /** The index of the newly created signature. */
+ private int index;
+
+ /**
+ * Sets the index of the newly created signature.
+ *
+ * @param index The index of the newly created signature.
+ */
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java
new file mode 100644
index 000000000..ff4108248
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoImpl.java
@@ -0,0 +1,51 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+
+/**
+ * Default implementation of <code>CreateTransformsInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoImpl implements CreateTransformsInfo {
+ /** The dsig:Transforms. */
+ private List transforms;
+ /** Meta information about the data resulting from the transforms. */
+ private MetaInfo finalDataMetaInfo;
+
+ /**
+ * Sets the transforms.
+ *
+ * @param transforms The transforms.
+ */
+ public void setTransforms(List transforms) {
+ this.transforms =
+ transforms != null
+ ? Collections.unmodifiableList(new ArrayList(transforms))
+ : null;
+ }
+
+ public List getTransforms() {
+ return transforms;
+ }
+
+ /**
+ * Sets the meta information about the data resulting from the transforms.
+ *
+ * @param finalDataMetaInfo The meta information.
+ */
+ public void setFinalDataMetaInfo(MetaInfo finalDataMetaInfo) {
+ this.finalDataMetaInfo = finalDataMetaInfo;
+ }
+
+ public MetaInfo getFinalDataMetaInfo() {
+ return finalDataMetaInfo;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java
new file mode 100644
index 000000000..508b6c083
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileExplicitImpl.java
@@ -0,0 +1,62 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+
+/**
+ * Default implementation of <code>CreateTransformsInfoProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoProfileExplicitImpl
+ implements CreateTransformsInfoProfileExplicit {
+
+ /** Transformation information. */
+ private CreateTransformsInfo transformsInfo;
+ /** Additional data for the transformations. */
+ private List supplements = new ArrayList();
+
+ /**
+ * Sets the transformation information.
+ *
+ * @param transformsInfo The transformation information.
+ */
+ public void setCreateTransformsInfo(CreateTransformsInfo transformsInfo) {
+ this.transformsInfo = transformsInfo;
+ }
+
+ public CreateTransformsInfo getCreateTransformsInfo() {
+ return transformsInfo;
+ }
+
+ /**
+ * Sets the additional data for the transformations.
+ *
+ * @param supplements The additional data.
+ */
+ public void setSupplements(List supplements) {
+ this.supplements =
+ supplements != null
+ ? Collections.unmodifiableList(new ArrayList(supplements))
+ : null;
+ }
+
+ public List getSupplements() {
+ return supplements;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return EXPLICIT_CREATETRANSFORMSINFOPROFILE
+ */
+ public int getCreateTransformsInfoProfileType() {
+ return EXPLICIT_CREATETRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java
new file mode 100644
index 000000000..5cd1fcc48
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateTransformsInfoProfileIDImpl.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID;
+
+/**
+ * Default implementation of <code>CreateTransformsInfoProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateTransformsInfoProfileIDImpl
+ implements CreateTransformsInfoProfileID {
+
+ /** The profile ID. */
+ private String createTransformsID;
+
+ /**
+ * Sets the profile ID.
+ * @param createTransformsID The profile ID.
+ */
+ public void setCreateTransformsInfoProfileID(String createTransformsID) {
+ this.createTransformsID = createTransformsID;
+ }
+
+ public String getCreateTransformsInfoProfileID() {
+ return createTransformsID;
+ }
+
+ /**
+ * Gets the type of profile.
+ *
+ * @return ID_CREATETRANSFORMSINFOPROFILE
+ */
+ public int getCreateTransformsInfoProfileType() {
+ return ID_CREATETRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java
new file mode 100644
index 000000000..08f94cc31
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureRequestImpl.java
@@ -0,0 +1,53 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+
+/**
+ * Default implementation of <code>CreateXMLSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestImpl
+ implements CreateXMLSignatureRequest {
+
+ /** The identifier for selecting the private keys for creating the signature.*/
+ private String keyIdentifier;
+ /** Information for creating a single signature. */
+ private List singleSignatureInfos = new ArrayList();
+
+ /**
+ * Sets the identifier for selecting the private keys for creating the
+ * signature.
+ *
+ * @param keyIdentifier The identifier for selecting the private keys.
+ */
+ public void setKeyIdentifier(String keyIdentifier) {
+ this.keyIdentifier = keyIdentifier;
+ }
+
+ public String getKeyIdentifier() {
+ return keyIdentifier;
+ }
+
+ /**
+ * Sets the information for creating single signatures.
+ *
+ * @param singleSignaureInfos The information for creating single signatures.
+ */
+ public void setSingleSignatureInfos(List singleSignaureInfos) {
+ this.singleSignatureInfos =
+ singleSignaureInfos != null
+ ? Collections.unmodifiableList(new ArrayList(singleSignaureInfos))
+ : null;
+ }
+
+ public List getSingleSignatureInfos() {
+ return singleSignatureInfos;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java
new file mode 100644
index 000000000..590258e30
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/CreateXMLSignatureResponseImpl.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * Default implementation of <code>CreateXMLSignatureResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseImpl
+ implements CreateXMLSignatureResponse {
+
+ /** The elements contained in the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Sets the elements contained in the response.
+ *
+ * @param responseElements The response elements.
+ */
+ public void setResponseElements(List responseElements) {
+ this.responseElements =
+ responseElements != null
+ ? Collections.unmodifiableList(new ArrayList(responseElements))
+ : null;
+ }
+
+ public List getResponseElements() {
+ return responseElements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java
new file mode 100644
index 000000000..8ab2241de
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/DataObjectInfoImpl.java
@@ -0,0 +1,79 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+
+/**
+ * Default implementation of <code>DataObjectInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class DataObjectInfoImpl implements DataObjectInfo {
+ /** The signature structure type. */
+ private String stucture;
+ /** Whether a reference will be placed in the signature itself or in the
+ * manifest */
+ private boolean childOfManifest;
+ /** The data object to be signed. */
+ private Content dataObject;
+ /** The profile containing additional information for the transformations. */
+ private CreateTransformsInfoProfile createTransformsInfoProfile;
+
+ /**
+ * Sets the signature structure type.
+ *
+ * @param structure The signature structure type.
+ */
+ public void setStructure(String structure) {
+ this.stucture = structure;
+ }
+
+ public String getStructure() {
+ return stucture;
+ }
+
+ /**
+ * Sets whether a reference will be placed in the signature itself or in the
+ * manifest.
+ *
+ * @param childOfManifest Whether to put the reference in the signature of
+ * in the manifest.
+ */
+ public void setChildOfManifest(boolean childOfManifest) {
+ this.childOfManifest = childOfManifest;
+ }
+
+ public boolean isChildOfManifest() {
+ return childOfManifest;
+ }
+
+ /**
+ * Sets the data object to be signed.
+ *
+ * @param dataObject The data object to be signed.
+ */
+ public void setDataObject(Content dataObject) {
+ this.dataObject = dataObject;
+ }
+
+ public Content getDataObject() {
+ return dataObject;
+ }
+
+ /**
+ * Sets additional information for the transformations.
+ *
+ * @param profile The profile containing additional information for the
+ * transformations.
+ */
+ public void setCreateTransformsInfoProfile(CreateTransformsInfoProfile profile) {
+ this.createTransformsInfoProfile = profile;
+ }
+
+ public CreateTransformsInfoProfile getCreateTransformsInfoProfile() {
+ return createTransformsInfoProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java
new file mode 100644
index 000000000..e460bd584
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ElementSelectorImpl.java
@@ -0,0 +1,47 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Default implementation of <code>ElementSelector</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ElementSelectorImpl implements ElementSelector {
+ /** The XPath expression pointing to the element. */
+ private String xPathExpression;
+ /** The namespace declarations to apply for evaluating the XPath */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Sets the XPath expression pointing to the element.
+ *
+ * @param xPathExpression XPath expression pointing to the element.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets namespace declarations to apply for evaluating the XPath.
+ *
+ * @param namespaceDeclarations The namespace declarations to apply for
+ * evaluating the XPath.
+ */
+ public void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java
new file mode 100644
index 000000000..a1be3d86a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/EnvelopedSignatureTransformImpl.java
@@ -0,0 +1,22 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+
+/**
+ * Default implementation of <code>EnvelopedSignatureTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class EnvelopedSignatureTransformImpl
+ extends TransformImpl
+ implements EnvelopedSignatureTransform {
+
+ /**
+ * Create a <code>EnvelopedSignatureTransformImpl</code>.
+ */
+ public EnvelopedSignatureTransformImpl() {
+ setAlgorithmURI(ENVELOPED_SIGNATURE);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java
new file mode 100644
index 000000000..d7047ab44
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ErrorResponseImpl.java
@@ -0,0 +1,52 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+
+/**
+ * Default implementation of <code>ErrorResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ErrorResponseImpl implements ErrorResponse {
+ /** The error code. */
+ private int code;
+ /** Verbose error message. */
+ private String info;
+
+ /**
+ * Sets the error code.
+ *
+ * @param code The error code.
+ */
+ public void setErrorCode(int code) {
+ this.code = code;
+ }
+
+ public int getErrorCode() {
+ return code;
+ }
+
+ /**
+ * Sets the verbose error information.
+ *
+ * @param info The verbose error information.
+ */
+ public void setInfo(String info) {
+ this.info = info;
+ }
+
+ public String getInfo() {
+ return info;
+ }
+
+ /**
+ * Gets the response type.
+ *
+ * @return ERROR_RESPONSE
+ */
+ public int getResponseType() {
+ return ERROR_RESPONSE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java
new file mode 100644
index 000000000..bf21c8634
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ExclusiveCanonicalizationTransformImpl.java
@@ -0,0 +1,48 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+
+/**
+ * Default implementation of <code>ExclusiveCanonicalizationTransform</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExclusiveCanonicalizationTransformImpl
+ extends TransformImpl
+ implements ExclusiveCanonicalizationTransform {
+
+ /** The namespaces to treat according to canonical XML. */
+ private List inclusiveNamespacePrefixes;
+
+ /**
+ * Create a <code>ExclusiveCanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI The algorithm URI identifying the transformation
+ * algorithm.
+ */
+ public ExclusiveCanonicalizationTransformImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+ /**
+ * Sets the namespaces to treat according to canonical XML.
+ * @param inclusiveNamespacePrefixes The namespaces to treat according to
+ * canonical XML.
+ */
+ public void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) {
+ this.inclusiveNamespacePrefixes =
+ inclusiveNamespacePrefixes != null
+ ? Collections.unmodifiableList(new ArrayList(inclusiveNamespacePrefixes))
+ : null;
+ }
+
+ public List getInclusiveNamespacePrefixes() {
+ return inclusiveNamespacePrefixes;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java
new file mode 100644
index 000000000..42d61559e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataBinaryImpl.java
@@ -0,0 +1,99 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+
+/**
+ * Content wrapper decorating a binary content with two additional attributes
+ * needed for returning <code>HashInputData</code> and <code>ReferenceInputData
+ * </code> information as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public class InputDataBinaryImpl implements ContentBinary, InputData
+{
+ /**
+ * The wrapped <code>Content</code>.
+ */
+ protected ContentBinary wrapped_;
+
+ /**
+ * This attribute signals what kind of container the XMLDSIG <code>Reference</code>
+ * this <code>InputData</code> belongs to is part of.
+ */
+ protected String partOf_;
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute
+ * (a positive int) signals the particular <code>Reference</code> of the XMLDSIG
+ * <code>SignedInfo</code> referring to the XMLDSIGManifest or SignatureManifest
+ * respectively.
+ */
+ protected int referringReferenceNumber_;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param wrapped The wrapped <code>Content</code>. Must be of type {@link Content#BINARY_CONTENT}.
+ *
+ * @param partOf see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ */
+ public InputDataBinaryImpl(Content wrapped, String partOf, int referringReferenceNumber) throws MOARuntimeException
+ {
+ if (wrapped.getContentType() != Content.BINARY_CONTENT) throw new MOARuntimeException("9901", null);
+
+ wrapped_ = (ContentBinary) wrapped;
+ partOf_ = partOf;
+ referringReferenceNumber_ = referringReferenceNumber;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType()
+ */
+ public int getContentType()
+ {
+ return wrapped_.getContentType();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getReference()
+ */
+ public String getReference()
+ {
+ return wrapped_.getReference();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentBinary#getBinaryContent()
+ */
+ public InputStream getBinaryContent()
+ {
+ return wrapped_.getBinaryContent();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf()
+ */
+ public String getPartOf()
+ {
+ return partOf_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber()
+ */
+ public int getReferringReferenceNumber()
+ {
+ return referringReferenceNumber_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java
new file mode 100644
index 000000000..029a402f5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/InputDataXMLImpl.java
@@ -0,0 +1,99 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.MOARuntimeException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+
+/**
+ * Content wrapper decorating an XML content with two additional attributes
+ * needed for returning <code>HashInputData</code> and <code>ReferenceInputData
+ * </code> information as part of <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @author Gregor Karlinger
+ *
+ * @version $Id$
+ */
+public class InputDataXMLImpl implements ContentXML, InputData
+{
+ /**
+ * The wrapped <code>ContentXML</code>.
+ */
+ protected ContentXML wrapped_;
+
+ /**
+ * This attribute signals what kind of container the XMLDSIG <code>Reference</code>
+ * this <code>InputData</code> belongs to is part of.
+ */
+ protected String partOf_;
+
+ /**
+ * If this <code>InputData</code> belongs to an XMLDSIG <code>Reference</code>
+ * being part of either a XMLDSIGManifest or a SignatureManifest, this attribute
+ * (a positive int) signals the particular <code>Reference</code> of the XMLDSIG
+ * <code>SignedInfo</code> referring to the XMLDSIGManifest or SignatureManifest
+ * respectively.
+ */
+ protected int referringReferenceNumber_;
+
+ /**
+ * Creates a new instance.
+ *
+ * @param wrapped The wrapped <code>ContentBinary</code>. Must be of type {@link Content#XML_CONTENT}.
+ *
+ * @param partOf see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ */
+ public InputDataXMLImpl(Content wrapped, String partOf, int referringReferenceNumber)
+ {
+ if (wrapped.getContentType() != Content.XML_CONTENT) throw new MOARuntimeException("9901", null);
+
+ wrapped_ = (ContentXML) wrapped;
+ partOf_ = partOf;
+ referringReferenceNumber_ = referringReferenceNumber;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getContentType()
+ */
+ public int getContentType()
+ {
+ return wrapped_.getContentType();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.Content#getReference()
+ */
+ public String getReference()
+ {
+ return wrapped_.getReference();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.ContentXML#getXMLContent()
+ */
+ public NodeList getXMLContent()
+ {
+ return wrapped_.getXMLContent();
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getPartOf()
+ */
+ public String getPartOf()
+ {
+ return partOf_;
+ }
+
+ /**
+ * @see at.gv.egovernment.moa.spss.api.common.InputData#getReferringReferenceNumber()
+ */
+ public int getReferringReferenceNumber()
+ {
+ return referringReferenceNumber_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java
new file mode 100644
index 000000000..9174e3a46
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultImpl.java
@@ -0,0 +1,44 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+
+/**
+ * Default implementation of <code>ManifestRefsCheckResult</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ManifestRefsCheckResultImpl implements ManifestRefsCheckResult {
+ /** The numerical check code. */
+ private int code;
+ /** Additional information about the check. */
+ private ManifestRefsCheckResultInfo info;
+
+ /**
+ * Sets the check code.
+ *
+ * @param code A numerical representation of the result of the manifest check.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets a reference to the manifest.
+ *
+ * @param info The reference to the manifest.
+ */
+ public void setInfo(ManifestRefsCheckResultInfo info) {
+ this.info = info;
+ }
+
+ public ManifestRefsCheckResultInfo getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java
new file mode 100644
index 000000000..0071a14f3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ManifestRefsCheckResultInfoImpl.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+
+/**
+ * Default implementation of <code>ManifestRefsCheckResultInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ManifestRefsCheckResultInfoImpl
+ extends ReferencesCheckResultInfoImpl
+ implements ManifestRefsCheckResultInfo {
+
+ /** The position of the signature reference containing the reference to the
+ * manifest being described by this object.*/
+ private int referringSignatureReference;
+
+ /**
+ * Sets the position of the signature reference containing the reference to
+ * the manifest being described by this object.
+ * @param referringSignatureReference The position of the signature reference.
+ */
+ public void setReferringSignatureReference(int referringSignatureReference) {
+ this.referringSignatureReference = referringSignatureReference;
+ }
+
+ public int getReferringSignatureReference() {
+ return referringSignatureReference;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java
new file mode 100644
index 000000000..93aceb033
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/MetaInfoImpl.java
@@ -0,0 +1,75 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Default implementation of <code>MetaInfo</code>.
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class MetaInfoImpl implements MetaInfo {
+ /** Information about the MIME type. */
+ private String mimeType;
+ /** URI pointing to a description of the content. */
+ private String description;
+ /** Descriptive XML content. */
+ private NodeList anyElements;
+ /** Type information for XML signature creation */
+ private String type;
+
+ /**
+ * Sets the MIME type.
+ *
+ * @param mimeType The MIME type to set.
+ */
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Sets the URI pointing to a description of the content.
+ *
+ * @param description The URI pointing to a description of the content.
+ */
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ /**
+ * Sets descriptive XML content.
+ *
+ * @param anyElements The elements to set.
+ */
+ public void setAnyElements(NodeList anyElements) {
+ this.anyElements = anyElements;
+ }
+
+ public NodeList getAnyElements() {
+ return anyElements;
+ }
+
+ /**
+ * Sets the XML signature creation type information.
+ *
+ * @param type the XML signature creation type information to set.
+ */
+ public void setType(String type) {
+ this.type = type;
+ }
+
+ public String getType() {
+ return type;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java
new file mode 100644
index 000000000..923a4bce1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferenceInfoImpl.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+
+/**
+ * Default implementation of <code>ReferenceInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class ReferenceInfoImpl implements ReferenceInfo {
+ /** Profile containing the transforms allowed in the signature. */
+ private List verifyTransformsInfoProfiles;
+
+ /**
+ * Sets the transforms profile used for verifying the transforms contained
+ * in the signature.
+ *
+ * @param verifyTransformsInfoProfiles The profiles containing the transforms
+ * allowed in the signature.
+ */
+ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) {
+ this.verifyTransformsInfoProfiles =
+ verifyTransformsInfoProfiles != null
+ ? Collections.unmodifiableList(
+ new ArrayList(verifyTransformsInfoProfiles))
+ : null;
+ }
+
+ public List getVerifyTransformsInfoProfiles() {
+ return verifyTransformsInfoProfiles;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java
new file mode 100644
index 000000000..6bb4d30ac
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultImpl.java
@@ -0,0 +1,46 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+
+/**
+ * Default implementation of <code>ReferencesCheckResult</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ReferencesCheckResultImpl implements ReferencesCheckResult {
+ /** The check code. */
+ private int code;
+ /** Additional information about the reference check. */
+ private ReferencesCheckResultInfo info;
+
+ /**
+ * Sets the check code.
+ *
+ * @param code A numerical representation of the result of the reference
+ * check.
+ */
+ public void setCode(int code) {
+ this.code = code;
+ }
+
+ public int getCode() {
+ return code;
+ }
+
+ /**
+ * Sets additional information about the reference check.
+ *
+ * @param manifestRefsCheckResultInfo Additional information about the
+ * reference check.
+ */
+ public void setInfo(ReferencesCheckResultInfo manifestRefsCheckResultInfo) {
+ this.info = manifestRefsCheckResultInfo;
+ }
+
+ public ReferencesCheckResultInfo getInfo() {
+ return info;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java
new file mode 100644
index 000000000..a21b417ae
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/ReferencesCheckResultInfoImpl.java
@@ -0,0 +1,46 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+
+/**
+ * Default implementation of <code>ReferencesCheckResultInfo</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ReferencesCheckResultInfoImpl
+ implements ReferencesCheckResultInfo {
+
+ /** Additional information about the references check. */
+ private NodeList anyOtherInfo;
+ /** The indexes of the failed references. */
+ private int[] failedReferences = new int[0];
+
+ /**
+ * Sets additional information about the references check.
+ * @param anyOtherInfo Additional information about the references check.
+ */
+ public void setAnyOtherInfo(NodeList anyOtherInfo) {
+ this.anyOtherInfo = anyOtherInfo;
+ }
+
+ public NodeList getAnyOtherInfo() {
+ return anyOtherInfo;
+ }
+
+ /**
+ * Sets the indexes of the failed references.
+ *
+ * @param failedReferences The indexes of the failed references.
+ */
+ public void setFailedReferences(int[] failedReferences) {
+ this.failedReferences = failedReferences;
+ }
+
+ public int[] getFailedReferences() {
+ return failedReferences;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java
new file mode 100644
index 000000000..bf15bf37e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SPSSFactoryImpl.java
@@ -0,0 +1,568 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Default implementation of <code>SPSSFactory</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SPSSFactoryImpl extends SPSSFactory {
+
+ public CreateXMLSignatureRequest createCreateXMLSignatureRequest(
+ String keyIdentifier,
+ List singleSignatureInfos) {
+ CreateXMLSignatureRequestImpl createXMLSignatureRequest =
+ new CreateXMLSignatureRequestImpl();
+ createXMLSignatureRequest.setKeyIdentifier(keyIdentifier);
+ createXMLSignatureRequest.setSingleSignatureInfos(singleSignatureInfos);
+ return createXMLSignatureRequest;
+ }
+
+ public SingleSignatureInfo createSingleSignatureInfo(
+ List dataObjectInfos,
+ CreateSignatureInfo createSignatureInfo,
+ boolean securityLayerConform) {
+ SingleSignatureInfoImpl singleSignatureInfo = new SingleSignatureInfoImpl();
+ singleSignatureInfo.setDataObjectInfos(dataObjectInfos);
+ singleSignatureInfo.setCreateSignatureInfo(createSignatureInfo);
+ singleSignatureInfo.setSecurityLayerConform(securityLayerConform);
+ return singleSignatureInfo;
+ }
+ public DataObjectInfo createDataObjectInfo(
+ String structure,
+ boolean childOfManifest,
+ Content dataObject,
+ CreateTransformsInfoProfile createTransformsInfoProfile) {
+ DataObjectInfoImpl dataObjectInfo = new DataObjectInfoImpl();
+ dataObjectInfo.setStructure(structure);
+ dataObjectInfo.setChildOfManifest(childOfManifest);
+ dataObjectInfo.setDataObject(dataObject);
+ dataObjectInfo.setCreateTransformsInfoProfile(createTransformsInfoProfile);
+ return dataObjectInfo;
+ }
+
+ public CreateTransformsInfoProfile createCreateTransformsInfoProfile(String profileID) {
+
+ CreateTransformsInfoProfileIDImpl createTransformsInfoProfile =
+ new CreateTransformsInfoProfileIDImpl();
+ createTransformsInfoProfile.setCreateTransformsInfoProfileID(profileID);
+ return createTransformsInfoProfile;
+ }
+
+ public CreateTransformsInfoProfile createCreateTransformsInfoProfile(
+ CreateTransformsInfo transformsInfo,
+ List supplements) {
+ CreateTransformsInfoProfileExplicitImpl createTransformsInfoProfile =
+ new CreateTransformsInfoProfileExplicitImpl();
+ createTransformsInfoProfile.setCreateTransformsInfo(transformsInfo);
+ createTransformsInfoProfile.setSupplements(supplements);
+ return createTransformsInfoProfile;
+ }
+
+ public CreateTransformsInfo createCreateTransformsInfo(
+ List transforms,
+ MetaInfo finalDataMetaInfo) {
+ CreateTransformsInfoImpl createTransformsInfo =
+ new CreateTransformsInfoImpl();
+
+ createTransformsInfo.setTransforms(transforms);
+ createTransformsInfo.setFinalDataMetaInfo(finalDataMetaInfo);
+ return createTransformsInfo;
+ }
+
+ public CreateSignatureInfo createCreateSignatureInfo(
+ Content createSignatureEnvironment,
+ CreateSignatureEnvironmentProfile createSignatureEnvironmentProfile) {
+ CreateSignatureInfoImpl createSignatureInfo = new CreateSignatureInfoImpl();
+ createSignatureInfo.setCreateSignatureEnvironment(
+ createSignatureEnvironment);
+ createSignatureInfo.setCreateSignatureEnvironmentProfile(
+ createSignatureEnvironmentProfile);
+ return createSignatureInfo;
+ }
+
+ public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(
+ CreateSignatureLocation createSignatureLocation,
+ List supplements) {
+ CreateSignatureEnvironmentProfileExplicitImpl createSignatureEnvironmentProfile =
+ new CreateSignatureEnvironmentProfileExplicitImpl();
+ createSignatureEnvironmentProfile.setCreateSignatureLocation(
+ createSignatureLocation);
+ createSignatureEnvironmentProfile.setSupplements(supplements);
+ return createSignatureEnvironmentProfile;
+ }
+
+ public CreateSignatureLocation createCreateSignatureLocation(
+ String signatureLocationXPath,
+ int signatureLocationIndex,
+ Map namespaceDeclarations) {
+ CreateSignatureLocationImpl createSignatureLocation =
+ new CreateSignatureLocationImpl();
+ createSignatureLocation.setIndex(signatureLocationIndex);
+ createSignatureLocation.setNamespaceDeclarations(namespaceDeclarations);
+ createSignatureLocation.setXPathExpression(signatureLocationXPath);
+ return createSignatureLocation;
+ }
+
+ public CreateSignatureEnvironmentProfile createCreateSignatureEnvironmentProfile(String profileID) {
+ CreateSignatureEnvironmentProfileIDImpl createSignatureEnvironmentProfile =
+ new CreateSignatureEnvironmentProfileIDImpl();
+ createSignatureEnvironmentProfile.setCreateSignatureEnvironmentProfileID(
+ profileID);
+ return createSignatureEnvironmentProfile;
+ }
+
+ public CreateXMLSignatureResponse createCreateXMLSignatureResponse(List responseElements) {
+ CreateXMLSignatureResponseImpl createXMLSignatureResponse =
+ new CreateXMLSignatureResponseImpl();
+ createXMLSignatureResponse.setResponseElements(responseElements);
+ return createXMLSignatureResponse;
+ }
+
+ public SignatureEnvironmentResponse createSignatureEnvironmentResponse(Element signatureEnvironment) {
+ SignatureEnvironmentResponseImpl signatureEnvironmentResponse =
+ new SignatureEnvironmentResponseImpl();
+ signatureEnvironmentResponse.setSignatureEnvironment(signatureEnvironment);
+ return signatureEnvironmentResponse;
+ }
+
+ public ErrorResponse createErrorResponse(int code, String info) {
+ ErrorResponseImpl errorResponse = new ErrorResponseImpl();
+ errorResponse.setErrorCode(code);
+ errorResponse.setInfo(info);
+ return errorResponse;
+ }
+
+ public VerifyCMSSignatureRequest createVerifyCMSSignatureRequest(
+ int[] signatories,
+ Date dateTime,
+ InputStream cmsSignature,
+ CMSDataObject dataObject,
+ String trustProfileID) {
+ VerifyCMSSignatureRequestImpl verifyCMSSignatureRequest =
+ new VerifyCMSSignatureRequestImpl();
+ verifyCMSSignatureRequest.setDateTime(dateTime);
+ verifyCMSSignatureRequest.setCMSSignature(cmsSignature);
+ verifyCMSSignatureRequest.setDataObject(dataObject);
+ verifyCMSSignatureRequest.setTrustProfileId(trustProfileID);
+ verifyCMSSignatureRequest.setSignatories(signatories);
+ return verifyCMSSignatureRequest;
+ }
+
+ public CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ CMSContent content) {
+
+ CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl();
+ cmsDataObject.setMetaInfo(metaInfo);
+ cmsDataObject.setContent(content);
+
+ return cmsDataObject;
+ }
+
+ public CMSContent createCMSContent(InputStream binaryContent) {
+ CMSContentExplicitImpl cmsContent = new CMSContentExplicitImpl();
+
+ cmsContent.setBinaryContent(binaryContent);
+ return cmsContent;
+ }
+
+ public CMSContent createCMSContent(String referenceURI) {
+ CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl();
+
+ cmsContent.setReference(referenceURI);
+ return cmsContent;
+ }
+
+
+ public CMSDataObject createCMSDataObject(
+ MetaInfo metaInfo,
+ String referenceURI) {
+ CMSDataObjectImpl cmsDataObject = new CMSDataObjectImpl();
+ CMSContentReferenceImpl cmsContent = new CMSContentReferenceImpl();
+ cmsDataObject.setMetaInfo(metaInfo);
+ cmsContent.setReference(referenceURI);
+ return cmsDataObject;
+ }
+
+ public VerifyCMSSignatureResponse createVerifyCMSSignatureResponse(List responseElements) {
+ VerifyCMSSinatureResponseImpl verifyCMSSignatureResponse =
+ new VerifyCMSSinatureResponseImpl();
+ verifyCMSSignatureResponse.setResponseElements(responseElements);
+ return verifyCMSSignatureResponse;
+ }
+
+ public VerifyCMSSignatureResponseElement createVerifyCMSSignatureResponseElement(
+ SignerInfo signerInfo,
+ CheckResult signatureCheck,
+ CheckResult certificateCheck) {
+ VerifyCMSSignatureResponseElementImpl verifyCMSSignatureResponseElement =
+ new VerifyCMSSignatureResponseElementImpl();
+ verifyCMSSignatureResponseElement.setSignerInfo(signerInfo);
+ verifyCMSSignatureResponseElement.setSignatureCheck(signatureCheck);
+ verifyCMSSignatureResponseElement.setCertificateCheck(certificateCheck);
+ return verifyCMSSignatureResponseElement;
+ }
+
+ public VerifyXMLSignatureRequest createVerifyXMLSignatureRequest(
+ Date dateTime,
+ VerifySignatureInfo verifySignatureInfo,
+ List supplementProfiles,
+ SignatureManifestCheckParams signatureManifestParams,
+ boolean returnHashInputData,
+ String trustProfileID) {
+ VerifyXMLSignatureRequestImpl verifyXMLSignatureRequest =
+ new VerifyXMLSignatureRequestImpl();
+ verifyXMLSignatureRequest.setDateTime(dateTime);
+ verifyXMLSignatureRequest.setSignatureInfo(verifySignatureInfo);
+ verifyXMLSignatureRequest.setSupplementProfiles(supplementProfiles);
+ verifyXMLSignatureRequest.setSignatureManifestCheckParams(
+ signatureManifestParams);
+ verifyXMLSignatureRequest.setReturnHashInputData(returnHashInputData);
+ verifyXMLSignatureRequest.setTrustProfileId(trustProfileID);
+ return verifyXMLSignatureRequest;
+ }
+
+ public VerifySignatureInfo createVerifySignatureInfo(
+ Content verifySignatureEnvironment,
+ VerifySignatureLocation verifySignatureLocation) {
+ VerifySignatureInfoImpl verifySignatureInfo = new VerifySignatureInfoImpl();
+ verifySignatureInfo.setVerifySignatureEnvironment(
+ verifySignatureEnvironment);
+ verifySignatureInfo.setVerifySignatureLocation(verifySignatureLocation);
+ return verifySignatureInfo;
+ }
+
+ public VerifySignatureLocation createVerifySignatureLocation(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ VerifySignatureLocationImpl verifySignatureLocation =
+ new VerifySignatureLocationImpl();
+ verifySignatureLocation.setXPathExpression(xPathExpression);
+ verifySignatureLocation.setNamespaceDeclarations(namespaceDeclarations);
+ return verifySignatureLocation;
+ }
+
+ public SupplementProfile createSupplementProfile(String profileID) {
+ SupplementProfileIDImpl supplementProfileID = new SupplementProfileIDImpl();
+ supplementProfileID.setSupplementProfileID(profileID);
+ return supplementProfileID;
+ }
+
+ public SupplementProfile createSupplementProfile(XMLDataObjectAssociation supplementProfile) {
+ SupplementProfileExplicitImpl supplementProfileExplicit =
+ new SupplementProfileExplicitImpl();
+ supplementProfileExplicit.setSupplementProfile(supplementProfile);
+ return supplementProfileExplicit;
+ }
+
+ public SignatureManifestCheckParams createSignatureManifestCheckParams(
+ List referenceInfos,
+ boolean returnReferenceInputData) {
+ SignatureManifestCheckParamsImpl signatureManifestCheckParams =
+ new SignatureManifestCheckParamsImpl();
+ signatureManifestCheckParams.setReferenceInfos(referenceInfos);
+ signatureManifestCheckParams.setReturnReferenceInputData(
+ returnReferenceInputData);
+ return signatureManifestCheckParams;
+ }
+
+ public ReferenceInfo createReferenceInfo(List verifyTransformsInfoProfiles) {
+ ReferenceInfoImpl referenceInfo = new ReferenceInfoImpl();
+ referenceInfo.setVerifyTransformsInfoProfiles(verifyTransformsInfoProfiles);
+ return referenceInfo;
+ }
+
+ public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(
+ List transforms,
+ List transformParameters) {
+ VerifyTransformsInfoProfileExplicitImpl verifyTransformsInfoProfile =
+ new VerifyTransformsInfoProfileExplicitImpl();
+
+ verifyTransformsInfoProfile.setTransforms(transforms);
+ verifyTransformsInfoProfile.setTransformParameters(transformParameters);
+
+ return verifyTransformsInfoProfile;
+ }
+
+ public VerifyTransformsInfoProfile createVerifyTransformsInfoProfile(String profileID) {
+ VerifyTransformsInfoProfileIDImpl verifyTransformsInfoProfile =
+ new VerifyTransformsInfoProfileIDImpl();
+ verifyTransformsInfoProfile.setVerifyTransformsInfoProfileID(profileID);
+ return verifyTransformsInfoProfile;
+ }
+
+
+ public TransformParameter createTransformParameter(String URI, String digestMethod, byte[] digestValue) {
+ TransformPatameterHashImpl transformParameter =
+ new TransformPatameterHashImpl();
+ transformParameter.setURI(URI);
+ transformParameter.setDigestMethod(digestMethod);
+ transformParameter.setDigestValue(digestValue);
+ return transformParameter;
+ }
+
+ public TransformParameter createTransformParameter(
+ String URI,
+ InputStream binaryData) {
+ TransformParameterBinaryImpl transformParameter =
+ new TransformParameterBinaryImpl();
+ transformParameter.setURI(URI);
+ transformParameter.setBinaryContent(binaryData);
+ return transformParameter;
+ }
+
+ public TransformParameter createTransformParameter(String URI) {
+ TransformParameterURIImpl transformParameter =
+ new TransformParameterURIImpl();
+ transformParameter.setURI(URI);
+ return transformParameter;
+ }
+
+ public VerifyXMLSignatureResponse createVerifyXMLSignatureResponse(
+ SignerInfo signerInfo,
+ List hashInputDatas,
+ List referenceInputDatas,
+ ReferencesCheckResult signatureCheck,
+ ReferencesCheckResult signatureManifestCheck,
+ List xmlDsigManifestChecks,
+ CheckResult certificateCheck) {
+ VerifyXMLSignatureResponseImpl verifyXMLSignatureResponse =
+ new VerifyXMLSignatureResponseImpl();
+ verifyXMLSignatureResponse.setSignerInfo(signerInfo);
+ verifyXMLSignatureResponse.setHashInputDatas(hashInputDatas);
+ verifyXMLSignatureResponse.setReferenceInputDatas(referenceInputDatas);
+ verifyXMLSignatureResponse.setSignatureCheck(signatureCheck);
+ verifyXMLSignatureResponse.setSignatureManifestCheck(
+ signatureManifestCheck);
+ verifyXMLSignatureResponse.setXMLDsigManifestChecks(xmlDsigManifestChecks);
+ verifyXMLSignatureResponse.setCertificateCheck(certificateCheck);
+ return verifyXMLSignatureResponse;
+ }
+
+ public ReferencesCheckResult createReferencesCheckResult(
+ int code,
+ ReferencesCheckResultInfo info) {
+ ReferencesCheckResultImpl referencesCheckResult =
+ new ReferencesCheckResultImpl();
+ referencesCheckResult.setCode(code);
+ referencesCheckResult.setInfo(info);
+ return referencesCheckResult;
+ }
+
+ public ReferencesCheckResultInfo createReferencesCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences) {
+ ReferencesCheckResultInfoImpl referencesCheckResultInfo =
+ new ReferencesCheckResultInfoImpl();
+ referencesCheckResultInfo.setAnyOtherInfo(anyOtherInfo);
+ referencesCheckResultInfo.setFailedReferences(failedReferences);
+ return referencesCheckResultInfo;
+ }
+
+ public ManifestRefsCheckResult createManifestRefsCheckResult(
+ int code,
+ ManifestRefsCheckResultInfo info) {
+ ManifestRefsCheckResultImpl manifestRefsCheckResult =
+ new ManifestRefsCheckResultImpl();
+ manifestRefsCheckResult.setCode(code);
+ manifestRefsCheckResult.setInfo(info);
+ return manifestRefsCheckResult;
+ }
+
+ public ManifestRefsCheckResultInfo createManifestRefsCheckResultInfo(
+ NodeList anyOtherInfo,
+ int[] failedReferences,
+ int referringSigReference) {
+ ManifestRefsCheckResultInfoImpl manifestRefsCheckResultInfo =
+ new ManifestRefsCheckResultInfoImpl();
+ manifestRefsCheckResultInfo.setAnyOtherInfo(anyOtherInfo);
+ manifestRefsCheckResultInfo.setReferringSignatureReference(
+ referringSigReference);
+ manifestRefsCheckResultInfo.setFailedReferences(failedReferences);
+ return manifestRefsCheckResultInfo;
+ }
+
+ public Content createContent(InputStream binaryData, String referenceURI) {
+ ContentBinaryImpl content = new ContentBinaryImpl();
+ content.setBinaryContent(binaryData);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(String locationReferenceURI, String referenceURI) {
+ ContentLocRefImpl content = new ContentLocRefImpl();
+ content.setLocationReferenceURI(locationReferenceURI);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(String referenceURI) {
+ ContentReferenceImpl content = new ContentReferenceImpl();
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public Content createContent(NodeList xmlData, String referenceURI) {
+ ContentXMLImpl content = new ContentXMLImpl();
+ content.setXMLContent(xmlData);
+ content.setReference(referenceURI);
+ return content;
+ }
+
+ public XMLDataObjectAssociation createXMLDataObjectAssociation(
+ MetaInfo metaInfo,
+ Content xmlContent) {
+ XMLDataObjectAssociationImpl xmlDataObjectAssociation =
+ new XMLDataObjectAssociationImpl();
+ xmlDataObjectAssociation.setMetaInfo(metaInfo);
+ xmlDataObjectAssociation.setContent(xmlContent);
+ return xmlDataObjectAssociation;
+ }
+
+ public MetaInfo createMetaInfo(
+ String mimeType,
+ String description,
+ NodeList otherInfo,
+ String type) {
+ MetaInfoImpl metaInfo = new MetaInfoImpl();
+ metaInfo.setMimeType(mimeType);
+ metaInfo.setDescription(description);
+ metaInfo.setAnyElements(otherInfo);
+ metaInfo.setType(type);
+ return metaInfo;
+ }
+
+ public Transform createCanonicalizationTransform(String algorithmURI) {
+ CanonicalizationTransformImpl transform = new CanonicalizationTransformImpl(algorithmURI);
+ return transform;
+ }
+
+ public Transform createExclusiveCanonicalizationTransform(String algorithmURI, List inclusiveNamespacePrefixes) {
+ ExclusiveCanonicalizationTransformImpl transform = new ExclusiveCanonicalizationTransformImpl(algorithmURI);
+ transform.setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes);
+ return transform;
+ }
+
+ public Transform createBase64Transform() {
+ Base64TransformImpl transform = new Base64TransformImpl();
+ return transform;
+ }
+
+ public Transform createEnvelopedSignatureTransform() {
+ EnvelopedSignatureTransformImpl transform =
+ new EnvelopedSignatureTransformImpl();
+ return transform;
+ }
+
+ public Transform createXSLTTransform(Element styleSheet) {
+ XSLTransformImpl transform = new XSLTransformImpl();
+ transform.setStylesheet(styleSheet);
+ return transform;
+ }
+
+ public Transform createXPathTransform(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ XPathTransformImpl transform = new XPathTransformImpl();
+ transform.setXPathExpression(xPathExpression);
+ transform.setNamespaceDelcarations(namespaceDeclarations);
+ return transform;
+ }
+
+ public Transform createXPathFilter2Transform(List xPathFilters) {
+ XPathFilter2TransformImpl transform = new XPathFilter2TransformImpl();
+ transform.setFilters(xPathFilters);
+ return transform;
+ }
+
+ public XPathFilter createXPathFilter(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations) {
+ XPathFilterImpl xPathFilter = new XPathFilterImpl();
+ xPathFilter.setFilterType(filterType);
+ xPathFilter.setXPathExpression(xPathExpression);
+ xPathFilter.setNamespaceDelcarations(namespaceDeclarations);
+ return xPathFilter;
+ }
+
+ public CheckResult createCheckResult(int code, NodeList info) {
+ CheckResultImpl checkResult = new CheckResultImpl();
+ checkResult.setCode(code);
+ checkResult.setInfo(info);
+ return checkResult;
+ }
+
+ public SignerInfo createSignerInfo(
+ X509Certificate signerCertificate,
+ boolean qualifiedCertificate,
+ boolean publicAuthority,
+ String publicAuthorityID) {
+ SignerInfoImpl signerInfo = new SignerInfoImpl();
+ signerInfo.setSignerCertificate(signerCertificate);
+ signerInfo.setQualifiedCertificate(qualifiedCertificate);
+ signerInfo.setPublicAuthority(publicAuthority);
+ signerInfo.setPublicAuhtorityID(publicAuthorityID);
+ return signerInfo;
+ }
+
+ public X509IssuerSerial createX509IssuerSerial(
+ String issuerName,
+ BigInteger serialNumber) {
+ X509IssuerSerialImpl x509IssuerSerial = new X509IssuerSerialImpl();
+ x509IssuerSerial.setX509IssuerName(issuerName);
+ x509IssuerSerial.setX509SerialNumber(serialNumber);
+ return x509IssuerSerial;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java
new file mode 100644
index 000000000..57d30ad3b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureEnvironmentResponseImpl.java
@@ -0,0 +1,41 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * Default implementation of <code>SignatureEnvironmentResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignatureEnvironmentResponseImpl
+ implements SignatureEnvironmentResponse {
+
+ /** The signature environment containing the XML signature. */
+ private Element signatureEnvironment;
+
+ /**
+ * Sets the XML structure which contains the signature.
+ *
+ * @param signatureEnvironment A general XML structure containing the signature.
+ */
+ public void setSignatureEnvironment(Element signatureEnvironment) {
+ this.signatureEnvironment = signatureEnvironment;
+ }
+
+ public Element getSignatureEnvironment() {
+ return signatureEnvironment;
+ }
+
+ /**
+ * Gets the type of <code>CreateXMLSignatureResponseElement</code>.
+ *
+ * @return SIGNATURE_ENVIRONMENT_RESPONSE
+ */
+ public int getResponseType() {
+ return SIGNATURE_ENVIRONMENT_RESPONSE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java
new file mode 100644
index 000000000..5924f8447
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignatureManifestCheckParamsImpl.java
@@ -0,0 +1,52 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+
+/**
+ * Default implementation of <code>SignatureManifestCheckParams</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignatureManifestCheckParamsImpl
+ implements SignatureManifestCheckParams {
+
+ /** Referential information. */
+ private List referenceInfos;
+ /** Whether to return the signature source data. */
+ private boolean returnReferenceInputData = true;
+
+ /**
+ * Sets the referantial information.
+ *
+ * @param referenceInfos The referential information.
+ */
+ public void setReferenceInfos(List referenceInfos) {
+ this.referenceInfos =
+ referenceInfos != null
+ ? Collections.unmodifiableList(new ArrayList(referenceInfos))
+ : null;
+ }
+
+ public List getReferenceInfos() {
+ return referenceInfos;
+ }
+
+ /**
+ * Sets whether to return signature source data.
+ *
+ * @param returnReferenceInputData Whether to return signature source data.
+ */
+ public void setReturnReferenceInputData(boolean returnReferenceInputData) {
+ this.returnReferenceInputData = returnReferenceInputData;
+ }
+
+ public boolean getReturnReferenceInputData() {
+ return returnReferenceInputData;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java
new file mode 100644
index 000000000..277f1a008
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SignerInfoImpl.java
@@ -0,0 +1,81 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.security.cert.X509Certificate;
+
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Default implementation of <code>SignerInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SignerInfoImpl implements SignerInfo {
+
+ /** The signer certificate. */
+ private X509Certificate signerCertificate;
+ /** Determines, whether <code>signerCertificate</code> is a qualified
+ * certificate. */
+ private boolean qualifiedCertificate;
+ /** Determines, whether <code>signerCertificate</code> is from a public
+ * authority. */
+ private boolean publicAuthority;
+ /** The public authority ID of the <code>signerCertificate</code>. */
+ private String publicAuthorityID;
+
+ /**
+ * Sets the signer certificate.
+ *
+ * @param signerCertificate The signer certificate.
+ */
+ public void setSignerCertificate(X509Certificate signerCertificate) {
+ this.signerCertificate = signerCertificate;
+ }
+
+ public X509Certificate getSignerCertificate() {
+ return signerCertificate;
+ }
+
+ /**
+ * Sets, whether the certificate contained in this object is qualified or not.
+ *
+ * @param qualifiedCertificate Is <code>true</code>, if the certificate is
+ * qualified, otherwise <code>false</code>.
+ */
+ public void setQualifiedCertificate(boolean qualifiedCertificate) {
+ this.qualifiedCertificate = qualifiedCertificate;
+ }
+
+ public boolean isQualifiedCertificate() {
+ return qualifiedCertificate;
+ }
+
+ /**
+ * Sets, whether the certificate contained in this object is an
+ * e-government certificate or not.
+ *
+ * @param publicAuthority Is <code>true</code>, if the certificate is
+ * public authority certificate, otherwise <code>false</code>.
+ */
+ public void setPublicAuthority(boolean publicAuthority) {
+ this.publicAuthority = publicAuthority;
+ }
+
+ public boolean isPublicAuthority() {
+ return publicAuthority;
+ }
+
+ /**
+ * Sets the public authority ID of the signer certificate.
+ *
+ * @param publicAuhtorityID The public authority ID of the signer certificate.
+ */
+ public void setPublicAuhtorityID(String publicAuhtorityID) {
+ this.publicAuthorityID = publicAuhtorityID;
+ }
+
+ public String getPublicAuhtorityID() {
+ return publicAuthorityID;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java
new file mode 100644
index 000000000..b50a65c68
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SingleSignatureInfoImpl.java
@@ -0,0 +1,49 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SingleSignatureInfoImpl implements SingleSignatureInfo {
+
+ private List dataObjectInfos = new ArrayList();
+
+ private CreateSignatureInfo createSignatureInfo;
+
+ private boolean securityLayerConform = true;
+
+ public void setDataObjectInfos(List dataObjectInfos) {
+ this.dataObjectInfos =
+ dataObjectInfos != null
+ ? Collections.unmodifiableList(new ArrayList(dataObjectInfos))
+ : null;
+ }
+
+ public List getDataObjectInfos() {
+ return dataObjectInfos;
+ }
+
+ public void setCreateSignatureInfo(CreateSignatureInfo createSignatureInfo) {
+ this.createSignatureInfo = createSignatureInfo;
+ }
+
+ public CreateSignatureInfo getCreateSignatureInfo() {
+ return createSignatureInfo;
+ }
+
+ public void setSecurityLayerConform(boolean securityLayerConform) {
+ this.securityLayerConform = securityLayerConform;
+ }
+
+ public boolean isSecurityLayerConform() {
+ return securityLayerConform;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java
new file mode 100644
index 000000000..78723fec2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileExplicitImpl.java
@@ -0,0 +1,39 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+
+/**
+ * Default implementation of <code>SupplementProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SupplementProfileExplicitImpl implements SupplementProfileExplicit {
+
+ /** Supplemental information for verifying a signature. */
+ private XMLDataObjectAssociation supplement;
+
+ /**
+ * Sets the supplemental information for verifying a signature.
+ *
+ * @param supplement The supplemental information for verifying a signature.
+ */
+ public void setSupplementProfile(XMLDataObjectAssociation supplement) {
+ this.supplement = supplement;
+ }
+
+ public XMLDataObjectAssociation getSupplementProfile() {
+ return supplement;
+ }
+
+ /**
+ * Gets the type of <code>SupplementProfile</code>.
+ *
+ * @return EXPLICIT_SUPPLEMENTPROFILE
+ */
+ public int getSupplementProfileType() {
+ return EXPLICIT_SUPPLEMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java
new file mode 100644
index 000000000..320827fad
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/SupplementProfileIDImpl.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileID;
+
+/**
+ * Default implementation of <code>SupplementProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class SupplementProfileIDImpl implements SupplementProfileID {
+ /** The profile ID. */
+ private String profileID;
+
+ /**
+ * Sets the <code>SupplementProfile</code> profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setSupplementProfileID(String profileID) {
+ this.profileID = profileID;
+ }
+
+ public String getSupplementProfileID() {
+ return profileID;
+ }
+
+ /**
+ * Gets the type of <code>SupplementProfile</code>.
+ *
+ * @return ID_SUPPLEMENTPROFILE
+ */
+ public int getSupplementProfileType() {
+ return ID_SUPPLEMENTPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java
new file mode 100644
index 000000000..51c7a543f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformImpl.java
@@ -0,0 +1,26 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Transform;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformImpl implements Transform {
+ /** The URI identifying the transformation algorithm. */
+ private String algorithmURI;
+
+ /**
+ * Sets the URI identifying the transformation algorithm.
+ *
+ * @param algorithmURI The URI identifying the transformation algorithm.
+ */
+ public void setAlgorithmURI(String algorithmURI) {
+ this.algorithmURI = algorithmURI;
+ }
+
+ public String getAlgorithmURI() {
+ return algorithmURI;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java
new file mode 100644
index 000000000..2901fb1bb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterBinaryImpl.java
@@ -0,0 +1,42 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterBinary;
+
+/**
+ * Default implementation of <code>TransformParameterBinary</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformParameterBinaryImpl
+ extends TransformParameterImpl
+ implements TransformParameterBinary {
+
+ /** The binary content as a stream. */
+ private InputStream binaryContent;
+
+ /**
+ * Sets the binary content as a stream.
+ *
+ * @param binaryContent The binary content as a stream.
+ */
+ public void setBinaryContent(InputStream binaryContent) {
+ this.binaryContent = binaryContent;
+ }
+
+ public InputStream getBinaryContent() {
+ return binaryContent;
+ }
+
+ /**
+ * Gets the <code>TransformParameter</code> type.
+ *
+ * @return BINARY_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return BINARY_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java
new file mode 100644
index 000000000..9fe60638e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterImpl.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+/**
+ * Default base implementation of <code>TransformParameter</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class TransformParameterImpl {
+ /** An URI identifying the <code>TransformParameter</code>. */
+ private String uri;
+
+ /**
+ * Sets the URI identifying the <code>TransformParameter</code>.
+ * @param uri The URI identifying the <code>TransformParameter</code>.
+ */
+ public void setURI(String uri) {
+ this.uri = uri;
+ }
+
+ public String getURI() {
+ return uri;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java
new file mode 100644
index 000000000..25449504c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformParameterURIImpl.java
@@ -0,0 +1,24 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterURI;
+
+/**
+ * Default implementation of <code>TransformParameterURI</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformParameterURIImpl
+ extends TransformParameterImpl
+ implements TransformParameterURI {
+
+ /**
+ * Gets the type of <code>TransformParameter</code>.
+ *
+ * @return URI_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return URI_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java
new file mode 100644
index 000000000..a7843e68c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/TransformPatameterHashImpl.java
@@ -0,0 +1,54 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterHash;
+
+/**
+ * Default implementation of <code>TransformParameterHash</code>
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class TransformPatameterHashImpl
+ extends TransformParameterImpl
+ implements TransformParameterHash {
+
+ /** The method used to calculate the digest value. */
+ private String digestMethod;
+ /** The digest value. */
+ private byte[] digestValue;
+
+ /**
+ * Sets method used to calculate the digest value.
+ * @param digestMethod The method used to calculate the digest value.
+ */
+ public void setDigestMethod(String digestMethod) {
+ this.digestMethod = digestMethod;
+ }
+
+ public String getDigestMethod() {
+ return digestMethod;
+ }
+
+ /**
+ * Sets the digest value.
+ *
+ * @param digestValue The digest value.
+ */
+ public void setDigestValue(byte[] digestValue) {
+ this.digestValue = digestValue;
+ }
+
+ public byte[] getDigestValue() {
+ return digestValue;
+ }
+
+ /**
+ * Gets the type of <code>TransformParameter</code>.
+ *
+ * @return HASH_TRANSFORMPARAMETER
+ */
+ public int getTransformParameterType() {
+ return HASH_TRANSFORMPARAMETER;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java
new file mode 100644
index 000000000..a3c37aaef
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureRequestImpl.java
@@ -0,0 +1,93 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.io.InputStream;
+import java.util.Date;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestImpl
+ implements VerifyCMSSignatureRequest {
+
+ /** The indexes of the signatories whose signature should be verified. */
+ private int[] signatories;
+ /** The profile ID of trusted certificates. */
+ private String trustProfileId;
+ /** The data object necessary for signature verification. */
+ private CMSDataObject dataObject;
+ /** The CMS signature to verify. */
+ private InputStream cmsSignature;
+ /** The date for which to verify the signature. */
+ private Date dateTime;
+
+ /**
+ * Sets the indexes of the signatories whose signature should be verified.
+ *
+ * @param signatories The indexes of the signatories whose signature should be
+ * verified.
+ */
+ public void setSignatories(int[] signatories) {
+ this.signatories = signatories;
+ }
+
+ public int[] getSignatories() {
+ return signatories;
+ }
+
+ /**
+ * Sets the date for which to verify the signature.
+ *
+ * @param dateTime The date for which to verify the signature.
+ */
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ public Date getDateTime() {
+ return dateTime;
+ }
+
+ /**
+ * Sets the CMS signature to verify.
+ * @param signature The CMS signature to verify.
+ */
+ public void setCMSSignature(InputStream signature) {
+ this.cmsSignature = signature;
+
+ }
+
+ public InputStream getCMSSignature() {
+ return cmsSignature;
+ }
+
+ /**
+ * Sets the data object necessary for signature verification.
+ * @param dataObject The data object necessary for signature verification.
+ */
+ public void setDataObject(CMSDataObject dataObject) {
+ this.dataObject = dataObject;
+ }
+
+ public CMSDataObject getDataObject() {
+ return dataObject;
+ }
+
+ /**
+ * Sets the profile ID of trusted certificates.
+ * @param trustProfileId The profile ID of trusted certificates.
+ */
+ public void setTrustProfileId(String trustProfileId) {
+ this.trustProfileId = trustProfileId;
+ }
+
+ public String getTrustProfileId() {
+ return trustProfileId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java
new file mode 100644
index 000000000..40dc04683
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSignatureResponseElementImpl.java
@@ -0,0 +1,62 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureResponseElement</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseElementImpl
+ implements VerifyCMSSignatureResponseElement {
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+ /** Information about the signature check. */
+ private CheckResult signatureCheck;
+ /** Information about the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Sets a SignerInfo element according to CMS.
+ *
+ * @param signerInfo The SignerInfo element according to CMS.
+ */
+ public void setSignerInfo(SignerInfo signerInfo) {
+ this.signerInfo = signerInfo;
+ }
+
+ public SignerInfo getSignerInfo() {
+ return signerInfo;
+ }
+
+ /**
+ * Sets a result of the signature verification.
+ *
+ * @param signatureCheck The result of the signature verification.
+ */
+ public void setSignatureCheck(CheckResult signatureCheck) {
+ this.signatureCheck = signatureCheck;
+ }
+
+ public CheckResult getSignatureCheck() {
+ return signatureCheck;
+ }
+
+ /**
+ * Sets a result of the certificate verification.
+ *
+ * @param certificateCheck The result of the certificate verification.
+ */
+ public void setCertificateCheck(CheckResult certificateCheck) {
+ this.certificateCheck = certificateCheck;
+ }
+
+ public CheckResult getCertificateCheck() {
+ return certificateCheck;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java
new file mode 100644
index 000000000..f258380e0
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyCMSSinatureResponseImpl.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+
+/**
+ * Default implementation of <code>VerifyCMSSignatureResponse</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyCMSSinatureResponseImpl
+ implements VerifyCMSSignatureResponse {
+
+ /** The elements contained in the response. */
+ private List responseElements;
+
+ /**
+ * Sets the elements contained in the response.
+ *
+ * @param responseElements The elements contained in the response.
+ */
+ public void setResponseElements(List responseElements) {
+ this.responseElements =
+ responseElements != null
+ ? Collections.unmodifiableList(new ArrayList(responseElements))
+ : null;
+ }
+
+ public List getResponseElements() {
+ return responseElements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java
new file mode 100644
index 000000000..2653e2fd2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureInfoImpl.java
@@ -0,0 +1,47 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+
+/**
+ * Default implementation of <code>VerifySignatureInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifySignatureInfoImpl implements VerifySignatureInfo {
+ /** The location of the signature to be verified. */
+ private VerifySignatureLocation verifySignatureLocation;
+ /** The environment containing the signature to be verified. */
+ private Content verifySignatureEnvironment;
+
+ /**
+ * Sets the location of the signature to be verified.
+ *
+ * @param verifySignatureLocation The location of the signature to be
+ * verified.
+ */
+ public void setVerifySignatureLocation(VerifySignatureLocation verifySignatureLocation) {
+ this.verifySignatureLocation = verifySignatureLocation;
+ }
+
+ public VerifySignatureLocation getVerifySignatureLocation() {
+ return verifySignatureLocation;
+ }
+
+ /**
+ * Sets the signature environment containing the signature to be verified.
+ *
+ * @param verifySignatureEnvironment The signature environment containing the
+ * signature to be verified.
+ */
+ public void setVerifySignatureEnvironment(Content verifySignatureEnvironment) {
+ this.verifySignatureEnvironment = verifySignatureEnvironment;
+ }
+
+ public Content getVerifySignatureEnvironment() {
+ return verifySignatureEnvironment;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java
new file mode 100644
index 000000000..933e42987
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifySignatureLocationImpl.java
@@ -0,0 +1,15 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+
+/**
+ * Default implementation of <code>VerifySignatureLocation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifySignatureLocationImpl
+ extends ElementSelectorImpl
+ implements VerifySignatureLocation {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java
new file mode 100644
index 000000000..594f9c246
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsDataImpl.java
@@ -0,0 +1,36 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+
+/**
+ * Default implementation of <codeReferenceInfo</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsDataImpl implements ReferenceInfo {
+ /** Information about the transformations contained in the signature. */
+ private List verifyTransformsInfoProfiles;
+
+ /**
+ * Sets the information about the transformations contained in the signature.
+ *
+ * @param verifyTransformsInfoProfiles The profiles containing transformation
+ * information.
+ */
+ public void setVerifyTransformsInfoProfiles(List verifyTransformsInfoProfiles) {
+ this.verifyTransformsInfoProfiles =
+ verifyTransformsInfoProfiles != null
+ ? Collections.unmodifiableList(
+ new ArrayList(verifyTransformsInfoProfiles))
+ : null;
+ }
+
+ public List getVerifyTransformsInfoProfiles() {
+ return verifyTransformsInfoProfiles;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java
new file mode 100644
index 000000000..d9a864499
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileExplicitImpl.java
@@ -0,0 +1,61 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+
+/**
+ * Default implementation of <code>VerifyTransformsInfoProfileExplicit</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsInfoProfileExplicitImpl
+ implements VerifyTransformsInfoProfileExplicit {
+
+ /** The transforms contained in this profile. */
+ private List transforms;
+ /** Additional information for the transforms. */
+ private List transformParameters = new ArrayList();
+
+ /**
+ * Sets the transforms contained in this profile.
+ *
+ * @param transforms The transforms contained in this profile.
+ */
+ public void setTransforms(List transforms) {
+ this.transforms =
+ transforms != null
+ ? Collections.unmodifiableList(new ArrayList(transforms))
+ : null;
+ }
+
+ public List getTransforms() {
+ return transforms;
+ }
+
+ /**
+ * Sets additional information for the transforms.
+ *
+ * @param transformParameters Additional information for the transforms.
+ */
+ public void setTransformParameters(List transformParameters) {
+ this.transformParameters = new ArrayList(transformParameters);
+ }
+
+ public List getTransformParameters() {
+ return transformParameters;
+ }
+
+ /**
+ * Gets the type of <code>VerifyTransformsInfoProfile</code>.
+ *
+ * @return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE
+ */
+ public int getVerifyTransformsInfoProfileType() {
+ return EXPLICIT_VERIFYTRANSFORMSINFOPROFILE;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java
new file mode 100644
index 000000000..fb1f10cea
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyTransformsInfoProfileIDImpl.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileID;
+
+/**
+ * Default implementation of <code>VerifyTransformsInfoProfileID</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyTransformsInfoProfileIDImpl implements VerifyTransformsInfoProfileID {
+
+ /** The profile ID. */
+ private String verifyTransformsInfoProfileID;
+
+ /**
+ * Sets the profile ID.
+ *
+ * @param profileID The profile ID.
+ */
+ public void setVerifyTransformsInfoProfileID(String profileID) {
+ this.verifyTransformsInfoProfileID = profileID;
+ }
+
+ public String getVerifyTransformsInfoProfileID() {
+ return verifyTransformsInfoProfileID;
+ }
+
+ /**
+ * Gets the type of <code>VerifyTransformsInfoProfile</code>.
+ *
+ * @return ID_VERIFYTRANSFORMSINFOPROFILE
+ */
+ public int getVerifyTransformsInfoProfileType() {
+ return ID_VERIFYTRANSFORMSINFOPROFILE;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java
new file mode 100644
index 000000000..26d7def4c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureRequestImpl.java
@@ -0,0 +1,113 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Date;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * Default implementation of <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestImpl
+ implements VerifyXMLSignatureRequest {
+ /** Date and time for signature verification. */
+ private Date dateTime;
+ /** The signature to be verified. */
+ private VerifySignatureInfo verifySignatureInfo;
+ /** Supplemental information about the singature. */
+ private List supplementProfiles;
+ /** Additional parameters for checking the signature manifest. */
+ private SignatureManifestCheckParams signatureManifestCheckParams;
+ /** Whether to return the hash input data. */
+ private boolean returnHashInputData;
+ /** The profile ID of the trust profile containing the trusted certificates.
+ */
+ private String trustProfileId;
+
+ /**
+ * Sets the date and time for signature verification.
+ *
+ * @param dateTime The date and time for signature verification.
+ */
+ public void setDateTime(Date dateTime) {
+ this.dateTime = dateTime;
+ }
+
+ public Date getDateTime() {
+ return dateTime;
+ }
+
+ /**
+ * Sets the signature to be verified.
+ *
+ * @param signatureInfo The signature to be verified.
+ */
+ public void setSignatureInfo(VerifySignatureInfo signatureInfo) {
+ this.verifySignatureInfo = signatureInfo;
+ }
+
+ public VerifySignatureInfo getSignatureInfo() {
+ return verifySignatureInfo;
+ }
+
+ /**
+ * Sets supplemental information about the singature.
+ * @param supplementProfiles
+ */
+ public void setSupplementProfiles(List supplementProfiles) {
+ this.supplementProfiles =
+ supplementProfiles != null
+ ? Collections.unmodifiableList(new ArrayList(supplementProfiles))
+ : null;
+ }
+
+ public List getSupplementProfiles() {
+ return supplementProfiles;
+ }
+
+ /**
+ * Sets supplemental information about the singature.
+ * @param params Supplemental information about the singature.
+ */
+ public void setSignatureManifestCheckParams(SignatureManifestCheckParams params) {
+ this.signatureManifestCheckParams = params;
+ }
+
+ public SignatureManifestCheckParams getSignatureManifestCheckParams() {
+ return signatureManifestCheckParams;
+ }
+
+ /**
+ * Sets whether to return hash input data.
+ *
+ * @param returnSignedData Whether to return hash input data.
+ */
+ public void setReturnHashInputData(boolean returnSignedData) {
+ this.returnHashInputData = returnSignedData;
+ }
+
+ public boolean getReturnHashInputData() {
+ return returnHashInputData;
+ }
+
+ /**
+ * Sets the profile ID of trusted certificates.
+ *
+ * @param trustProfileId The profile ID of trusted certificates.
+ */
+ public void setTrustProfileId(String trustProfileId) {
+ this.trustProfileId = trustProfileId;
+ }
+
+ public String getTrustProfileId() {
+ return trustProfileId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java
new file mode 100644
index 000000000..989dbfb4a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/VerifyXMLSignatureResponseImpl.java
@@ -0,0 +1,141 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseImpl
+ implements VerifyXMLSignatureResponse {
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+
+ /**
+ * The hash input data objects. The list consists of {@link at.gv.egovernment.moa.spss.api.common.InputData}s.
+ * */
+ private List hashInputDatas = new ArrayList();
+
+ /**
+ * The reference input data objects. The list consists of {@link at.gv.egovernment.moa.spss.api.common.InputData}s.
+ * */
+ private List referenceInputDatas = new ArrayList();
+
+ /** Information about the signature check. */
+ private ReferencesCheckResult signatureCheck;
+ /** Information about the signature manifest check. */
+ private ReferencesCheckResult signatureManifestCheck;
+ /** Information about the XMLDsig manifest check. */
+ private List xmlDsigManifestChecks = new ArrayList();
+ /** Information about the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Sets information about the signer certificate.
+ *
+ * @param signerInfo Information about the signer certificate.
+ */
+ public void setSignerInfo(SignerInfo signerInfo) {
+ this.signerInfo = signerInfo;
+ }
+
+ public SignerInfo getSignerInfo() {
+ return signerInfo;
+ }
+
+ /**
+ * Sets data signed by the signatory.
+ *
+ * @param hashInputDatas The signed datas.
+ */
+ public void setHashInputDatas(List hashInputDatas) {
+ this.hashInputDatas =
+ hashInputDatas != null
+ ? Collections.unmodifiableList(new ArrayList(hashInputDatas))
+ : null;
+ }
+
+ public List getHashInputDatas() {
+ return hashInputDatas;
+ }
+
+ /**
+ * Sets the source data elements.
+ *
+ * @param referenceInputDatas The source data elements.
+ */
+ public void setReferenceInputDatas(List referenceInputDatas) {
+ this.referenceInputDatas =
+ referenceInputDatas != null
+ ? Collections.unmodifiableList(new ArrayList(referenceInputDatas))
+ : null;
+ }
+
+ public List getReferenceInputDatas() {
+ return referenceInputDatas;
+ }
+
+ /**
+ * Sets the result of the signature verification.
+ *
+ * @param signatureCheck The result of the signature verification.
+ */
+ public void setSignatureCheck(ReferencesCheckResult signatureCheck) {
+ this.signatureCheck = signatureCheck;
+ }
+
+ public ReferencesCheckResult getSignatureCheck() {
+ return signatureCheck;
+ }
+
+ /**
+ * Sets the result of the signature manifest verification.
+ *
+ * @param signatureManifestCheck The result of the signature manifest verification.
+ */
+ public void setSignatureManifestCheck(ReferencesCheckResult signatureManifestCheck) {
+ this.signatureManifestCheck = signatureManifestCheck;
+ }
+
+ public ReferencesCheckResult getSignatureManifestCheck() {
+ return signatureManifestCheck;
+ }
+
+ /**
+ * Sets the result of the certification verification.
+ *
+ * @param certificateCheck The result of the certificate verification.
+ */
+ public void setCertificateCheck(CheckResult certificateCheck) {
+ this.certificateCheck = certificateCheck;
+ }
+
+ public CheckResult getCertificateCheck() {
+ return certificateCheck;
+ }
+
+ /**
+ * Sets the XMLDSigManifestChecks.
+ *
+ * @param xmlDsigManifestChecks The XMLDSigManifestChecks.
+ */
+ public void setXMLDsigManifestChecks(List xmlDsigManifestChecks) {
+ this.xmlDsigManifestChecks =
+ xmlDsigManifestChecks != null
+ ? Collections.unmodifiableList(new ArrayList(xmlDsigManifestChecks))
+ : null;
+ }
+
+ public List getXMLDsigManifestChecks() {
+ return xmlDsigManifestChecks;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java
new file mode 100644
index 000000000..e6d644fd9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/X509IssuerSerialImpl.java
@@ -0,0 +1,45 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.math.BigInteger;
+
+import at.gv.egovernment.moa.spss.api.common.X509IssuerSerial;
+
+/**
+ * Default implementation of <code>X509IssuerSerial</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class X509IssuerSerialImpl implements X509IssuerSerial {
+ /** The certificate serial number. */
+ private BigInteger x509SerialNumber;
+ /** The certificate issuer DN. */
+ private String x509IssuerName;
+
+ /**
+ * Sets the issuer distinguished name.
+ *
+ * @param x509IssuerName The issuer distinguished name.
+ */
+ public void setX509IssuerName(String x509IssuerName) {
+ this.x509IssuerName = x509IssuerName;
+ }
+
+ public String getX509IssuerName() {
+ return x509IssuerName;
+ }
+
+ /**
+ * Sets the certificate serial number.
+ *
+ * @param x509SerialNumber The issuer serial number.
+ */
+ public void setX509SerialNumber(BigInteger x509SerialNumber) {
+ this.x509SerialNumber = x509SerialNumber;
+ }
+
+ public BigInteger getX509SerialNumber() {
+ return x509SerialNumber;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java
new file mode 100644
index 000000000..b603c3367
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XMLDataObjectAssociationImpl.java
@@ -0,0 +1,45 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Default implementation of <code>XMLDataObjectAssociation</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XMLDataObjectAssociationImpl implements XMLDataObjectAssociation {
+
+ /** Meta information about the <code>Content</code> object. */
+ private MetaInfo metaInfo;
+ /** The actual data contained in this object. */
+ private Content content;
+
+ /**
+ * Sets meta information about the <code>Content</code> object.
+ * @param metaInfo Meta information about the <code>Content</code> object.
+ */
+ public void setMetaInfo(MetaInfo metaInfo) {
+ this.metaInfo = metaInfo;
+ }
+
+ public MetaInfo getMetaInfo() {
+ return metaInfo;
+ }
+
+ /**
+ * Sets the actual data contained in this object.
+ *
+ * @param content The actual data contained in this object.
+ */
+ public void setContent(Content content) {
+ this.content = content;
+ }
+
+ public Content getContent() {
+ return content;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java
new file mode 100644
index 000000000..a96a8f161
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilter2TransformImpl.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+
+/**
+ * Default implementation of <code>XPathFilter2Transform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathFilter2TransformImpl
+ extends TransformImpl
+ implements XPathFilter2Transform {
+
+ /** The XPath filters. */
+ private List filters;
+
+ /**
+ * Create a new <code>XPathFilter2TransformImpl</code> object.
+ */
+ public XPathFilter2TransformImpl() {
+ setAlgorithmURI(XPATH_FILTER2);
+ }
+
+ /**
+ * Sets the XPath filters contained in this
+ * <code>XPathFilter2Transform</code>.
+ *
+ * @param filters The XPath filters contained in this
+ * <code>XPathFilter2Transform</code>.
+ */
+ public void setFilters(List filters) {
+ this.filters = new ArrayList(filters);
+ }
+
+ public List getFilters() {
+ return filters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java
new file mode 100644
index 000000000..72d91bc58
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathFilterImpl.java
@@ -0,0 +1,64 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+
+/**
+ * Default implementation of <code>XPathFilter</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathFilterImpl implements XPathFilter {
+ /** The type of filter. */
+ private String filterType;
+ /** The XPath expression of the filter. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to while evaluating the XPath
+ * expression. */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Sets the type of filter.
+ *
+ * @param filterType The type of filter.
+ */
+ public void setFilterType(String filterType) {
+ this.filterType = filterType;
+ }
+
+ public String getFilterType() {
+ return filterType;
+ }
+
+ /**
+ * Sets the XPath expression of the filter.
+ *
+ * @param xPathExpression The XPath expression of the filter.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets the namespace prefix to URI mapping to while evaluating the XPath
+ * expression.
+ *
+ * @param namespaceDeclarations The namespace prefix to URI mapping to while
+ * evaluating the XPath expression.
+ */
+ public void setNamespaceDelcarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java
new file mode 100644
index 000000000..1c9817ecc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XPathTransformImpl.java
@@ -0,0 +1,59 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+
+/**
+ * Default implementation of <code>XPathTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XPathTransformImpl
+ extends TransformImpl
+ implements XPathTransform {
+
+ /** The XPath expression to evaluate. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to while evaluating the XPath
+ * expression. */
+ private Map namespaceDeclarations = new HashMap();
+
+ /**
+ * Create a new <code>XPathTransformImpl</code> object.
+ */
+ public XPathTransformImpl() {
+ setAlgorithmURI(XPATH);
+ }
+
+ /**
+ * Sets the XPath expression to evaluate.
+ *
+ * @param xPathExpression The XPath expression to evaluate.
+ */
+ public void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Sets the namespace prefix to URI mapping to while evaluating the XPath
+ * expression.
+ *
+ * @param namespaceDeclarations The namespace prefix to URI mapping to while
+ * evaluating the XPath expression.
+ */
+ public void setNamespaceDelcarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java
new file mode 100644
index 000000000..c6ddc0fd6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/impl/XSLTransformImpl.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.api.impl;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+
+/**
+ * Default implementation of <code>XSLTTransform</code>.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class XSLTransformImpl extends TransformImpl implements XSLTTransform {
+ /** The XSLT stylesheet to apply. */
+ private Element styleSheet;
+
+ /**
+ * Create a new <code>XSLTransformImpl</code> object.
+ */
+ public XSLTransformImpl() {
+ setAlgorithmURI(XSLT);
+ }
+
+ /**
+ * Sets the XSLT stylesheet to apply.
+ *
+ * @param styleSheet The XSLT stylesheet to apply.
+ */
+ public void setStylesheet(Element styleSheet) {
+ this.styleSheet = styleSheet;
+ }
+
+ public Element getStylesheet() {
+ return styleSheet;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java
new file mode 100644
index 000000000..319d3ac9d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParser.java
@@ -0,0 +1,288 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * A parser to parse <code>CreateXMLSignatureRequest</code> DOM trees into
+ * <code>CreateXMLSignatureRequest</code> API objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestParser {
+
+ //
+ // XPath expresssions to select elements in the CreateXMLSignatureRequest
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String KEY_IDENTIFIER_XPATH =
+ "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "KeyIdentifier";
+ private static final String SINGLE_SIGNATURE_INFO_XPATH =
+ "/" + MOA + "CreateXMLSignatureRequest/" + MOA + "SingleSignatureInfo";
+ private static final String DATA_OBJECT_INFO_XPATH = MOA + "DataObjectInfo";
+ private static final String DATA_OBJECT_XPATH = MOA + "DataObject";
+ private static final String CREATE_SIGNATURE_INFO_XPATH =
+ MOA + "CreateSignatureInfo";
+ private static final String CREATE_TRANSFORMS_INFO_PROFILE_XPATH =
+ (MOA + "CreateTransformsInfoProfile | ")
+ + (MOA + "CreateTransformsInfoProfileID");
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_XPATH =
+ MOA + "CreateSignatureEnvironment";
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH =
+ (MOA + "CreateSignatureEnvironmentProfile | ")
+ + (MOA + "CreateSignatureEnvironmentProfileID");
+ private static final String SL_CONFORM_ATTR_NAME = "SecurityLayerConformity";
+
+ /** The factory to create API objects. */
+ private SPSSFactory factory;
+
+ /**
+ * Create a new <code>CreateXMLSignatureRequestParser</code>.
+ */
+ public CreateXMLSignatureRequestParser() {
+ this.factory = SPSSFactory.getInstance();
+ }
+
+ /**
+ * Parse a <code>CreateXMLSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>CreateXMLSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>CreateXMLSignatureRequest</code> API object containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public CreateXMLSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ List singleSignatureInfos = parseSingleSignatureInfos(requestElem);
+ String keyIdentifier =
+ XPathUtils.getElementValue(requestElem, KEY_IDENTIFIER_XPATH, null);
+
+ return factory.createCreateXMLSignatureRequest(
+ keyIdentifier,
+ singleSignatureInfos);
+ }
+
+ /**
+ * Parse all <code>SingleSignatureInfo</code> elements of the
+ * <code>CreateXMLSignatureRequest</code>.
+ *
+ * @param requestElem The <code>CreateXMLSignatureRequest</code> to parse.
+ * @return A <code>List</code> of <code>SingleSignatureInfo</code> API
+ * objects.
+ * @throws MOAApplicationException An error occurred parsing on of the
+ * <code>SingleSignatureInfo</code> elements.
+ */
+ private List parseSingleSignatureInfos(Element requestElem)
+ throws MOAApplicationException {
+
+ List singleSignatureInfos = new ArrayList();
+ NodeIterator sigInfoElems =
+ XPathUtils.selectNodeIterator(requestElem, SINGLE_SIGNATURE_INFO_XPATH);
+ Element sigInfoElem;
+
+ while ((sigInfoElem = (Element) sigInfoElems.nextNode()) != null) {
+ singleSignatureInfos.add(parseSingleSignatureInfo(sigInfoElem));
+ }
+
+ return singleSignatureInfos;
+ }
+
+ /**
+ * Parse a <code>SingleSignatureInfo</code> DOM element.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element to
+ * parse.
+ * @return A <code>SingleSignatureInfo</code> API object containing the
+ * information of <code>sigInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>SingleSignatureInfo</code>.
+ */
+ private SingleSignatureInfo parseSingleSignatureInfo(Element sigInfoElem)
+ throws MOAApplicationException {
+
+ List dataObjectInfos = parseDataObjectInfos(sigInfoElem);
+ CreateSignatureInfo createSignatureInfo =
+ parseCreateSignatureInfo(sigInfoElem);
+ boolean securityLayerConform;
+
+ if (sigInfoElem.hasAttribute(SL_CONFORM_ATTR_NAME)) {
+ securityLayerConform =
+ BoolUtils.valueOf(sigInfoElem.getAttribute(SL_CONFORM_ATTR_NAME));
+ } else {
+ securityLayerConform = true;
+ }
+
+ return factory.createSingleSignatureInfo(
+ dataObjectInfos,
+ createSignatureInfo,
+ securityLayerConform);
+ }
+
+ /**
+ * Parse the <code>DataObjectInfo</code> DOM elements contained in the given
+ * <code>SingleSignatureInfo</code> DOM element.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element
+ * whose <code>DataObjectInfo</code>s to parse.
+ * @return A <code>List</code> of <code>DataObjectInfo</code> API objects
+ * containing the data from the <code>DataObjectInfo</code> DOM elements.
+ * @throws MOAApplicationException An error occurred parsing one of the
+ * <code>DataObjectInfo</code>s.
+ */
+ private List parseDataObjectInfos(Element sigInfoElem)
+ throws MOAApplicationException {
+
+ List dataObjectInfos = new ArrayList();
+ NodeIterator dataObjInfoElems =
+ XPathUtils.selectNodeIterator(sigInfoElem, DATA_OBJECT_INFO_XPATH);
+ Element dataObjInfoElem;
+
+ while ((dataObjInfoElem = (Element) dataObjInfoElems.nextNode()) != null) {
+ dataObjectInfos.add(parseDataObjectInfo(dataObjInfoElem));
+ }
+ return dataObjectInfos;
+ }
+
+ /**
+ * Parse a <code>DataObjectInfo</code> DOM element.
+ *
+ * @param dataObjInfoElem The <code>DataObjectInfo</code> DOM element to
+ * parse.
+ * @return A <code>DataObjectInfo</code> API element containing the data
+ * from <code>dataObjInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>DataObjectInfo</code>.
+ */
+ private DataObjectInfo parseDataObjectInfo(Element dataObjInfoElem)
+ throws MOAApplicationException {
+
+ String structure = dataObjInfoElem.getAttribute("Structure");
+ Element dataObjectElem =
+ (Element) XPathUtils.selectSingleNode(dataObjInfoElem, DATA_OBJECT_XPATH);
+ Content dataObject = RequestParserUtils.parseContent(dataObjectElem);
+ CreateTransformsInfoProfile createTransformsInfoProfile =
+ parseCreateTransformsInfoProfile(dataObjInfoElem);
+ boolean childOfManifest;
+
+ if (dataObjInfoElem.hasAttribute("ChildOfManifest")) {
+ childOfManifest =
+ BoolUtils.valueOf(dataObjInfoElem.getAttribute("ChildOfManifest"));
+ } else {
+ childOfManifest = false;
+ }
+
+ return factory.createDataObjectInfo(
+ structure,
+ childOfManifest,
+ dataObject,
+ createTransformsInfoProfile);
+ }
+
+ /**
+ * Parse a <code>CreateTransformsInfoProfile</code> DOM element.
+ *
+ * @param dataObjInfoElem The <code>DataObjectInfo</code> DOM element
+ * containing the <code>CreateTransformsInfoProfile</code>.
+ * @return The <code>CreateTransformsInfoProfile</code> API object containing
+ * the profile found in <code>dataObjInfoElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateTransformsInfoProfile</code>.
+ */
+ private CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element dataObjInfoElem)
+ throws MOAApplicationException {
+
+ Element profileElem =
+ (Element) XPathUtils.selectSingleNode(
+ dataObjInfoElem,
+ CREATE_TRANSFORMS_INFO_PROFILE_XPATH);
+
+ if ("CreateTransformsInfoProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ return profileParser.parseCreateTransformsInfoProfile(profileElem);
+
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ return factory.createCreateTransformsInfoProfile(profileID);
+ }
+ }
+
+ /**
+ * Parse the <code>CreateSignatureInfo</code> DOM element contained in
+ * a <code>SingleSignatureInfo</code>.
+ *
+ * @param sigInfoElem The <code>SingleSignatureInfo</code> DOM element
+ * containing the <code>CreateSignatureInfo</code> to be parsed.
+ * @return A <code>CreateSignatureInfo</code> API object containing the
+ * data from the <code>CreateSignatureInfo</code> DOM element, or
+ * <code>null</code>, if none was found.
+ */
+ private CreateSignatureInfo parseCreateSignatureInfo(Element sigInfoElem) {
+ Element createInfoElem =
+ (Element) XPathUtils.selectSingleNode(
+ sigInfoElem,
+ CREATE_SIGNATURE_INFO_XPATH);
+
+ if (createInfoElem != null) {
+ Element environmentElem =
+ (Element) XPathUtils.selectSingleNode(
+ createInfoElem,
+ CREATE_SIGNATURE_ENVIRONMENT_XPATH);
+ Content environment = RequestParserUtils.parseContent(environmentElem);
+ CreateSignatureEnvironmentProfile environmentProfile =
+ parseCreateSignatureEnvironmentProfile(createInfoElem);
+
+ return factory.createCreateSignatureInfo(environment, environmentProfile);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Parse the <code>CreateSignatureEnvironmentProfile</code> contained in
+ * the given <code>CreateSignatureInfo</code> DOM element.
+ *
+ * @param createInfoElem <code>CreateSignatureInfo</code> DOM element to
+ * parse.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> contained
+ * in the given <code>CreateSignatureInfo</code> DOM element..
+ */
+ private CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element createInfoElem) {
+ Element profileElem =
+ (Element) XPathUtils.selectSingleNode(
+ createInfoElem,
+ CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH);
+
+ if ("CreateSignatureEnvironmentProfile"
+ .equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ return profileParser.parseCreateSignatureEnvironmentProfile(profileElem);
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ return factory.createCreateSignatureEnvironmentProfile(profileID);
+ }
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..eec9c4882
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureResponseBuilder.java
@@ -0,0 +1,119 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * Convert a <code>CreateXMLSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseBuilder {
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>CreateXMLSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>CreateXMLSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public CreateXMLSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("CreateXMLSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>CreateXMLSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>CreateXMLSignatureResponse</code> API object.
+ *
+ * @param response The <code>CreateXMLSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>CreateXMLSignatureResponse</code>
+ * DOM element.
+ */
+ public Document build(CreateXMLSignatureResponse response) {
+ Iterator iter;
+
+ for (iter = response.getResponseElements().iterator(); iter.hasNext();) {
+ CreateXMLSignatureResponseElement responseElement =
+ (CreateXMLSignatureResponseElement) iter.next();
+
+ switch (responseElement.getResponseType()) {
+ case CreateXMLSignatureResponseElement.SIGNATURE_ENVIRONMENT_RESPONSE :
+ SignatureEnvironmentResponse envResponse =
+ (SignatureEnvironmentResponse) responseElement;
+ addSignatureEnvironment(envResponse);
+ break;
+
+ case CreateXMLSignatureResponseElement.ERROR_RESPONSE :
+ ErrorResponse errorResponse = (ErrorResponse) responseElement;
+ addErrorResponse(errorResponse);
+ break;
+ }
+
+ }
+
+ return responseDoc;
+ }
+
+ /**
+ * Add a <code>SignatureEnvironment</code> element to the response.
+ *
+ * @param envResponse The content to put under the
+ * <code>SignatureEnvironment</code> element. This should either be a
+ * <code>dsig:Signature</code> element (in case of a detached signature) or
+ * the signature environment containing the signature (in case of
+ * an enveloping signature).
+ */
+ private void addSignatureEnvironment(SignatureEnvironmentResponse envResponse) {
+ Element content = envResponse.getSignatureEnvironment();
+ Node importedSignature = responseDoc.importNode(content, true);
+ Element signatureEnvironment =
+ responseDoc.createElementNS(MOA_NS_URI, "SignatureEnvironment");
+ signatureEnvironment.appendChild(importedSignature);
+ responseElem.appendChild(signatureEnvironment);
+ }
+
+ /**
+ * Add a <code>ErrorResponse</code> element to the response.
+ *
+ * @param errorResponse The API object containing the information to put into
+ * the <code>ErrorResponse</code> DOM element.
+ */
+ private void addErrorResponse(ErrorResponse errorResponse) {
+ Element errorElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ErrorResponse");
+ Element errorCodeElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ErrorCode");
+ Element infoElem = responseDoc.createElementNS(MOA_NS_URI, "Info");
+ String errorCodeStr = Integer.toString(errorResponse.getErrorCode());
+
+ errorCodeElem.appendChild(responseDoc.createTextNode(errorCodeStr));
+ errorElem.appendChild(errorCodeElem);
+ infoElem.appendChild(responseDoc.createTextNode(errorResponse.getInfo()));
+ errorElem.appendChild(errorCodeElem);
+ errorElem.appendChild(infoElem);
+ responseElem.appendChild(errorElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java
new file mode 100644
index 000000000..66c08e0ab
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ProfileParser.java
@@ -0,0 +1,285 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+
+/**
+ * Parse the various profile elements contained in the MOA web service requests
+ * and given as separate files in the MOA configuration.
+ *
+ * The profiles parsed must be schema valid according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ProfileParser {
+
+ //
+ // XPath expressions to select parts of the profiles
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String CREATE_TRANSFORMS_XPATH =
+ MOA + "CreateTransformsInfo/" + DSIG + "Transforms";
+ private static final String FINAL_DATA_META_INFO_XPATH =
+ MOA + "CreateTransformsInfo/" + MOA + "FinalDataMetaInfo";
+ private static final String CREATE_SIGNATURE_LOCATION_XPATH =
+ MOA + "CreateSignatureLocation";
+ private static final String SUPPLEMENT_XPATH = MOA + "Supplement";
+ private static final String VERIFY_TRANSFORMS_XPATH = DSIG + "Transforms";
+ private static final String TRANSFORM_PARAMETER_XPATH =
+ MOA + "TransformParameter";
+ private static final String TRANSFORM_PARAMETER_CONTENT_XPATH =
+ MOA + "Base64Content | " + MOA + "Hash";
+ private static final String DIGEST_METHOD_XPATH = DSIG + "DigestMethod";
+ private static final String DIGEST_VALUE_XPATH = DSIG + "DigestValue";
+
+ /** The factory used to create API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse a <code>CreateTransformsInfoProfile</code> DOM element.
+ *
+ * @param profileElem The <code>CreateTransformsInfoProfile</code> element
+ * to parse.
+ * @return The <code>CreateTransformsInfoProfile</code> API object containing
+ * the data from the <code>profileElem</code>.
+ * @throws MOAApplicationException An error occurred parsing the DOM element.
+ */
+ public CreateTransformsInfoProfile parseCreateTransformsInfoProfile(Element profileElem)
+ throws MOAApplicationException {
+ CreateTransformsInfo createTransformsInfo =
+ parseCreateTransformsInfo(profileElem);
+ List supplements = parseSupplements(profileElem);
+
+ return factory.createCreateTransformsInfoProfile(
+ createTransformsInfo,
+ supplements);
+ }
+
+ /**
+ * Parse the <code>CreateTransformsInfo</code> DOM element contained in a
+ * <code>CreateTransformsInfoProfile</code>.
+ *
+ * @param profileElem The <code>CreateTransformsInfoProfile</code> DOM
+ * element containing the <code>CreateTransformsInfo</code>.
+ * @return The <code>CreateTransformsInfo</code> API object containinig the
+ * data from the <code>CreateTransformsInfo</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateTransformsInfo</code> DOM element.
+ */
+ private CreateTransformsInfo parseCreateTransformsInfo(Element profileElem)
+ throws MOAApplicationException {
+
+ Element transformsElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ CREATE_TRANSFORMS_XPATH);
+ Element metaInfoElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ FINAL_DATA_META_INFO_XPATH);
+ MetaInfo finalDataMetaInfo;
+ List transforms;
+
+ // parse the dsig:Transforms
+ if (transformsElem != null) {
+ TransformParser transformsParser = new TransformParser();
+ transforms = transformsParser.parseTransforms(transformsElem);
+ } else {
+ transforms = null;
+ }
+
+ // parse the meta info
+ finalDataMetaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem);
+
+ return factory.createCreateTransformsInfo(transforms, finalDataMetaInfo);
+ }
+
+ /**
+ * Parse a <code>CreateSignatureEnvironmentProfile</code> DOM element.
+ *
+ * @param profileElem The <code>CreateSignatureEnvironmentProfile</code>
+ * DOM element to parse.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> API object
+ * containing the data from the <code>profileElem</code>.
+ */
+ public CreateSignatureEnvironmentProfile parseCreateSignatureEnvironmentProfile(Element profileElem) {
+ CreateSignatureLocation createSignatureLocation =
+ parseCreateSignatureLocation(profileElem);
+ List supplements = parseSupplements(profileElem);
+
+ return factory.createCreateSignatureEnvironmentProfile(
+ createSignatureLocation,
+ supplements);
+ }
+
+ /**
+ * Parse a <code>CreateSignatureLocation</code> DOM element contained in
+ * a <code>CreateSignatureEnvironmentProfile</code>.
+ *
+ * @param profileElem The <code>CreateSignatureEnvironmentProfile</code> DOM
+ * element containing the <code>CreateSignatureLocation</code>.
+ * @return The <code>CreateSignatureLocation</code> API object containing
+ * the data from the <code>CreateSignatureLocation</code> DOM element.
+ */
+ private CreateSignatureLocation parseCreateSignatureLocation(Element profileElem) {
+ Element locationElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ CREATE_SIGNATURE_LOCATION_XPATH);
+ String xPathExpression = DOMUtils.getText(locationElem);
+ Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem);
+ String indexStr = locationElem.getAttribute("Index");
+ int index = Integer.parseInt(indexStr);
+
+ return factory.createCreateSignatureLocation(
+ xPathExpression,
+ index,
+ namespaceDeclarations);
+ }
+
+ /**
+ * Parse all <code>Supplement</code> DOM elements contained in a given
+ * parent DOM element.
+ *
+ * @param supplementsParentElem The DOM element being the parent of the
+ * <code>Supplement</code>s.
+ * @return A <code>List</code> of <code>Supplement</code> API objects
+ * containing the data from the <code>Supplement</code> DOM elements.
+ */
+ private List parseSupplements(Element supplementsParentElem) {
+ List supplements = new ArrayList();
+ NodeIterator supplementElems =
+ XPathUtils.selectNodeIterator(supplementsParentElem, SUPPLEMENT_XPATH);
+ Element supplementElem;
+
+ while ((supplementElem = (Element) supplementElems.nextNode()) != null) {
+ XMLDataObjectAssociation supplement =
+ RequestParserUtils.parseXMLDataObjectAssociation(supplementElem);
+ supplements.add(supplement);
+ }
+ return supplements;
+ }
+
+ /**
+ * Parse a <code>SupplementProfile</code> DOM element.
+ *
+ * @param profileElem The <code>SupplementProfile</code> DOM element to parse.
+ * @return The <code>SupplementProfile</code> API object containing the
+ * data from the <code>SupplementProfile</code> DOM element.
+ */
+ public SupplementProfile parseSupplementProfile(Element profileElem) {
+ XMLDataObjectAssociation supplementProfile =
+ RequestParserUtils.parseXMLDataObjectAssociation(profileElem);
+
+ return factory.createSupplementProfile(supplementProfile);
+ }
+
+ /**
+ * Parse a <code>VerifyTransformsInfoProfile</code> DOM element.
+ *
+ * @param profileElem The <code>VerifyTransformsInfoProfile</code> DOM
+ * element to parse.
+ * @return A <code>VerifyTransformsInfoProfile</code> API object containing
+ * the information from the <code>VerifyTransformsInfoProfile</code> DOM
+ * element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>VerifyTransformsInfoProfile</code>.
+ */
+ public VerifyTransformsInfoProfile parseVerifyTransformsInfoProfile(Element profileElem)
+ throws MOAApplicationException {
+ Element transformsElem =
+ (Element) XPathUtils.selectSingleNode(
+ profileElem,
+ VERIFY_TRANSFORMS_XPATH);
+ List transforms = null;
+ NodeIterator paramElems =
+ XPathUtils.selectNodeIterator(profileElem, TRANSFORM_PARAMETER_XPATH);
+ Element paramElem;
+ List transformParameters = new ArrayList();
+
+ // parse the dsig:Transforms
+ if (transformsElem != null) {
+ TransformParser transformsParser = new TransformParser();
+ transforms = transformsParser.parseTransforms(transformsElem);
+ }
+
+ // parse the TransformParameter elements
+ while ((paramElem = (Element) paramElems.nextNode()) != null) {
+ transformParameters.add(parseTransformParameter(paramElem));
+ }
+
+ return factory.createVerifyTransformsInfoProfile(
+ transforms,
+ transformParameters);
+ }
+
+ /**
+ * Parse a <code>TransformParameter</code> DOM element.
+ *
+ * @param paramElem The <code>TransformParameter</code> DOM element to
+ * parse.
+ * @return The <code>TransformParameter</code> API object containing the
+ * information from the <code>TransformParameter</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>TransformParameter</code> DOM element.
+ */
+ private TransformParameter parseTransformParameter(Element paramElem)
+ throws MOAApplicationException {
+ String uri = paramElem.getAttribute("URI");
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(
+ paramElem,
+ TRANSFORM_PARAMETER_CONTENT_XPATH);
+
+ if (contentElem == null) {
+ return factory.createTransformParameter(uri);
+ } else if ("Base64Content".equals(contentElem.getLocalName())) {
+ String base64Str = DOMUtils.getText(contentElem);
+ InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true);
+
+ return factory.createTransformParameter(uri, binaryContent);
+ } else { // "Hash".equals(contentElem.getLocalName())
+ String digestMethodStr =
+ XPathUtils.getElementValue(contentElem, DIGEST_METHOD_XPATH, "");
+ String digestValueStr =
+ XPathUtils.getElementValue(contentElem, DIGEST_VALUE_XPATH, "");
+ byte[] digestValue = null;
+
+ try {
+ digestValue = Base64Utils.decode(digestValueStr, true);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2270", null);
+ }
+ return factory.createTransformParameter(
+ uri,
+ digestMethodStr,
+ digestValue);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java
new file mode 100644
index 000000000..9e8c7d0e2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/RequestParserUtils.java
@@ -0,0 +1,157 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.text.ParseException;
+import java.util.Date;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.DateTimeUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Utility methods for parsing XML requests definied in the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RequestParserUtils {
+ //
+ // XPath expressions for parsing parts of a request
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String REFERENCE_ATTR_NAME = "Reference";
+ private static final String MIME_TYPE_XPATH = MOA + "MimeType";
+ private static final String DESCRIPTION_XPATH = MOA + "Description";
+ private static final String TYPE_XPATH = MOA + "Type";
+ private static final String XML_ASSOC_CONTENT_XPATH = MOA + "Content";
+ private static final String CONTENT_XPATH =
+ MOA + "Base64Content | " + MOA + "XMLContent |" + MOA + "LocRefContent";
+ private static final String ANY_OTHER_XPATH =
+ "*[namespace-uri() != \"" + Constants.MOA_NS_URI + "\"]";
+
+ /**
+ * Parse a <code>XMLDataObjectAssociationType</code> kind of DOM element.
+ *
+ * @param assocElem The <code>XMLDataObjectAssociationType</code> kind of
+ * DOM elmeent to parse.
+ * @return The <code>XMLDataObjectAssociation</code> API object containing
+ * the data from the <code>XMLDataObjectAssociationType</code> DOM element.
+ */
+ public static XMLDataObjectAssociation parseXMLDataObjectAssociation(Element assocElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ MetaInfo metaInfo = parseMetaInfo(assocElem);
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(assocElem, XML_ASSOC_CONTENT_XPATH);
+ Content content = parseContent(contentElem);
+
+ return factory.createXMLDataObjectAssociation(metaInfo, content);
+ }
+
+ /**
+ * Parse a <code>MetaInfoType</code> kind of DOM element.
+ *
+ * @param metaInfoElem The <code>MetaInfoType</code> kind of DOM element.
+ * @return The <code>MetaInfo</code> API object containing the data from
+ * the <code>metaInfoElem</code>.
+ */
+ public static MetaInfo parseMetaInfo(Element metaInfoElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ String mimeType =
+ XPathUtils.getElementValue(metaInfoElem, MIME_TYPE_XPATH, null);
+ String description =
+ XPathUtils.getElementValue(metaInfoElem, DESCRIPTION_XPATH, null);
+ NodeList anyOther =
+ XPathUtils.selectNodeList(metaInfoElem, ANY_OTHER_XPATH);
+ String type =
+ XPathUtils.getElementValue(metaInfoElem, TYPE_XPATH, null);
+
+ return factory.createMetaInfo(mimeType, description, anyOther, type);
+ }
+
+ /**
+ * Parse a <code>ContentOptionalRefType</code> or
+ * <code>ContentRequiredRefType</code> kind of DOM element.
+ * @param contentParentElem The DOM element being the parent of the
+ * content element.
+ * @return The <code>Content</code> API object containing the data from
+ * the given DOM element.
+ */
+ public static Content parseContent(Element contentParentElem) {
+ SPSSFactory factory = SPSSFactory.getInstance();
+ String referenceURI =
+ contentParentElem.hasAttribute(REFERENCE_ATTR_NAME)
+ ? contentParentElem.getAttribute(REFERENCE_ATTR_NAME)
+ : null;
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(contentParentElem, CONTENT_XPATH);
+
+ if (contentElem == null) {
+ return factory.createContent(referenceURI);
+ }
+
+ if ("Base64Content".equals(contentElem.getLocalName())) {
+ String base64String = DOMUtils.getText(contentElem);
+ return factory.createContent(
+ Base64Utils.decodeToStream(base64String, true),
+ referenceURI);
+ } else if ("LocRefContent".equals(contentElem.getLocalName())) {
+ String locationReferenceURI = DOMUtils.getText(contentElem);
+ return factory.createContent(
+ locationReferenceURI,
+ referenceURI);
+ } else { // "XMLContent".equals(contentElem.getLocalName())
+ return factory.createContent(
+ contentElem.getChildNodes(),
+ referenceURI);
+ }
+ }
+
+ /**
+ * Get the signing time from a Verfiy(CMS|XML)SignatureRequest.
+ *
+ * @param requestElem A <code>Verify(CMS|XML)SignatureRequest</code> DOM
+ * element.
+ * @param dateTimeXPath The XPath to lookup the <code>DateTime</code> element
+ * within the request.
+ * @return Date The date and time corresponding to the <code>DateTime</code>
+ * element in the request. If no <code>DateTime</code> element exists in the
+ * request, <code>null</code> is returned.
+ * @throws MOAApplicationException An error occurred during a parsing the
+ * <code>DateTime</code> element or creating the return value.
+ */
+ public static Date parseDateTime(Element requestElem, String dateTimeXPath)
+ throws MOAApplicationException {
+
+ Element dateTimeElem;
+ String dateTimeText;
+
+ // select the DateTime element
+ dateTimeElem =
+ (Element) XPathUtils.selectSingleNode(requestElem, dateTimeXPath);
+
+ // parse a date from the element value
+ if (dateTimeElem != null) {
+ dateTimeText = DOMUtils.getText(dateTimeElem);
+ try {
+ return DateTimeUtils.parseDateTime(dateTimeText);
+ } catch (ParseException e) {
+ throw new MOAApplicationException(
+ "1104",
+ new Object[] { dateTimeText });
+ }
+ } else {
+ return null;
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java
new file mode 100644
index 000000000..44134a70c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/ResponseBuilderUtils.java
@@ -0,0 +1,206 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.security.cert.CertificateEncodingException;
+import java.security.cert.X509Certificate;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.DOMImplementation;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+/**
+ * Utility methods used by the verious <code>ResponseBuilder</code> classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class ResponseBuilderUtils {
+ //
+ // shortcuts to various XML namespace constants
+ //
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String DSIG_NS_URI = Constants.DSIG_NS_URI;
+ private static final String XMLNS_NS_URI = Constants.XMLNS_NS_URI;
+
+ /**
+ * Create a response element with all the namespaces set.
+ *
+ * @param responseName The name of the response root element.
+ * @return A DOM document containing the response root element and predefined
+ * MOA, DSIG and XML namespace declarations.
+ * @throws MOASystemException An error building the response document.
+ */
+ public static Document createResponse(String responseName)
+ throws MOASystemException {
+
+ try {
+ DocumentBuilder docBuilder =
+ DocumentBuilderFactory.newInstance().newDocumentBuilder();
+ DOMImplementation impl = docBuilder.getDOMImplementation();
+ Document response;
+ Element root;
+ String attrValue;
+
+ response = impl.createDocument(MOA_NS_URI, responseName, null);
+ root = response.getDocumentElement();
+
+ // add namespace prefix declarations
+ root.setAttributeNS(XMLNS_NS_URI, "xmlns", MOA_NS_URI);
+ attrValue = "xmlns:" + Constants.DSIG_PREFIX;
+ root.setAttributeNS(XMLNS_NS_URI, attrValue, DSIG_NS_URI);
+
+ return response;
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("2200", null, e);
+ }
+ }
+
+ /**
+ * Add a <code>SignerInfo</code> element to the response.
+ *
+ * @param response The response document, in order to create new elements in
+ * it.
+ * @param root The root element into which the <code>SignerInfo</code> element
+ * will be inserted.
+ * @param cert The signer certificate to add.
+ * @param isQualified Indicates, whether <code>cert</code> is a qualified
+ * certificate.
+ * @param isPublicAuthority Indicates, whether <code>cert</code> is
+ * certificate owned by a public authority.
+ * @param publicAuthorityID Information about the public authority owning
+ * <code>cert</code>. Must not be <code>null</code>, if
+ * <code>isPublicAuthority ! = null</code>.
+ * @throws MOAApplicationException An error occurred reading data from the
+ * certificate.
+ */
+ public static void addSignerInfo(
+ Document response,
+ Element root,
+ X509Certificate cert,
+ boolean isQualified,
+ boolean isPublicAuthority,
+ String publicAuthorityID)
+ throws MOAApplicationException {
+
+ Element signerInfoElem = response.createElementNS(MOA_NS_URI, "SignerInfo");
+ Element x509DataElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509Data");
+ Element x509IssuerSerialElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerSerial");
+ Element x509IssuerElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509IssuerName");
+ String issuer = cert.getIssuerDN().getName();
+ Element x509SerialNumberElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509SerialNumber");
+ String serialNumber = cert.getSerialNumber().toString();
+ Element x509SubjectNameElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509SubjectName");
+ Element x509CertificateElem =
+ response.createElementNS(DSIG_NS_URI, DSIG + "X509Certificate");
+ Element qualifiedCertificateElem =
+ isQualified
+ ? response.createElementNS(MOA_NS_URI, "QualifiedCertificate")
+ : null;
+ Element publicAuthorityElem =
+ isPublicAuthority
+ ? response.createElementNS(MOA_NS_URI, "PublicAuthority")
+ : null;
+ Element codeElem =
+ publicAuthorityID != null
+ ? response.createElementNS(MOA_NS_URI, "Code")
+ : null;
+
+ // fill in text
+ x509IssuerElem.appendChild(response.createTextNode(issuer));
+ x509SerialNumberElem.appendChild(response.createTextNode(serialNumber));
+ try {
+ RFC2253NameParser parser =
+ new RFC2253NameParser(cert.getSubjectDN().getName());
+ String subjectRfc2253 = parser.parse().getRFC2253String();
+ x509SubjectNameElem.appendChild(response.createTextNode(subjectRfc2253));
+ } catch (RFC2253NameParserException e) {
+ x509SubjectNameElem.appendChild(
+ response.createTextNode(cert.getSubjectDN().getName()));
+ }
+ try {
+ x509CertificateElem.appendChild(
+ response.createTextNode(Base64Utils.encode(cert.getEncoded())));
+ } catch (CertificateEncodingException e) {
+ throw new MOAApplicationException("2245", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2245", null, e);
+ }
+
+ // build structure
+ x509DataElem.appendChild(x509SubjectNameElem);
+ x509IssuerSerialElem.appendChild(x509IssuerElem);
+ x509IssuerSerialElem.appendChild(x509SerialNumberElem);
+ x509DataElem.appendChild(x509IssuerSerialElem);
+ x509DataElem.appendChild(x509CertificateElem);
+ if (isQualified) {
+ x509DataElem.appendChild(qualifiedCertificateElem);
+ }
+ if (isPublicAuthority) {
+ x509DataElem.appendChild(publicAuthorityElem);
+ if (publicAuthorityID != null) {
+ codeElem.appendChild(response.createTextNode(publicAuthorityID));
+ publicAuthorityElem.appendChild(codeElem);
+ }
+ }
+ signerInfoElem.appendChild(x509DataElem);
+ root.appendChild(signerInfoElem);
+ }
+
+ /**
+ * Add an element containing <code>Code</code> and <code>Info</code>
+ * subelements.
+ *
+ * @param response The response document, in order to create new elements in
+ * it.
+ * @param root The root element into which to insert the newly created
+ * element.
+ * @param elementName The name of the newly created element.
+ * @param code The content of the <code>Code</code> subelement.
+ * @param info The content of the <code>Info</code> subelement.
+ */
+ public static void addCodeInfoElement(
+ Document response,
+ Element root,
+ String elementName,
+ int code,
+ NodeList info) {
+
+ Element codeInfoElem = response.createElementNS(MOA_NS_URI, elementName);
+ Element codeElem = response.createElementNS(MOA_NS_URI, "Code");
+ Element infoElem;
+ int i;
+
+ codeElem.appendChild(response.createTextNode(Integer.toString(code)));
+ codeInfoElem.appendChild(codeElem);
+ if (info != null) {
+ infoElem = response.createElementNS(MOA_NS_URI, "Info");
+
+ for (i = 0; i < info.getLength(); i++) {
+ infoElem.appendChild(info.item(i).cloneNode(true));
+ }
+ codeInfoElem.appendChild(infoElem);
+ }
+ root.appendChild(codeInfoElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java
new file mode 100644
index 000000000..2d01f2a0f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/TransformParser.java
@@ -0,0 +1,246 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Base64Transform;
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+
+/**
+ * A parser to parse XMLDsig <code>Transform</code> DOM elements into their
+ * MOA SPSS API representation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformParser {
+ //
+ // XPath expressions for selecting information from the DOM tree
+ //
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+ private static final String DSIG_FILTER2 =
+ Constants.DSIG_FILTER2_PREFIX + ":";
+ private static final String XSLT = Constants.XSLT_PREFIX + ":";
+ private static final String EC = Constants.DSIG_EC_PREFIX + ":";
+ private static final String TRANSFORM_XPATH = DSIG + "Transform";
+ private static final String XPATH_XPATH = DSIG + "XPath";
+ private static final String XSLT_ELEMENT_XPATH = XSLT + "stylesheet";
+ private static final String XPATH2_XPATH =
+ (DSIG_FILTER2 + "XPath[@Filter=\"intersect\"] | ")
+ + (DSIG_FILTER2 + "XPath[@Filter=\"subtract\"] | ")
+ + (DSIG_FILTER2 + "XPath[@Filter=\"union\"]");
+ private static final String INCLUSIVE_NAMESPACES_XPATH =
+ EC + "InclusiveNamespaces";
+
+ /**
+ * The <code>SPSSFactory</code> to use for creating new API objects.
+ */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse an XMLDsig <code>Transforms</code> DOM element.
+ *
+ * @param transformsElem The <code>Transforms</code> DOM element to parse.
+ * @return A <code>List</code> of <code>Transform</code> API objects
+ * containing the data from the individual <code>Transform</code> DOM
+ * elements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transforms</code> DOM element.
+ */
+ public List parseTransforms(Element transformsElem)
+ throws MOAApplicationException {
+ List transforms = new ArrayList();
+ NodeIterator transformElems =
+ XPathUtils.selectNodeIterator(transformsElem, TRANSFORM_XPATH);
+ Element transformElem;
+ Transform transform;
+
+ while ((transformElem = (Element) transformElems.nextNode()) != null) {
+ transform = parseTransform(transformElem);
+ transforms.add(transform);
+ }
+
+ return transforms;
+ }
+
+ /**
+ * Parse an XMLDsig <code>Transform</code> DOM element.
+ *
+ * @param transformElem <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object containing the data
+ * from the <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ public Transform parseTransform(Element transformElem)
+ throws MOAApplicationException {
+
+ String algorithmUri = transformElem.getAttribute("Algorithm");
+
+ if (CanonicalizationTransform.CANONICAL_XML.equals(algorithmUri)
+ || CanonicalizationTransform.CANONICAL_XML_WITH_COMMENTS.equals(
+ algorithmUri)) {
+ return factory.createCanonicalizationTransform(algorithmUri);
+ } else if (
+ ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML.equals(
+ algorithmUri)
+ || ExclusiveCanonicalizationTransform
+ .EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS
+ .equals(
+ algorithmUri)) {
+ return parseExclusiveC14nTransform(algorithmUri, transformElem);
+ } else if (Base64Transform.BASE64_DECODING.equals(algorithmUri)) {
+ return factory.createBase64Transform();
+ } else if (
+ EnvelopedSignatureTransform.ENVELOPED_SIGNATURE.equals(algorithmUri)) {
+ return factory.createEnvelopedSignatureTransform();
+ } else if (XPathTransform.XPATH.equals(algorithmUri)) {
+ return parseXPathTransform(transformElem);
+ } else if (XPathFilter2Transform.XPATH_FILTER2.equals(algorithmUri)) {
+ return parseXPathFilter2Transform(transformElem);
+ } else if (XSLTTransform.XSLT.equals(algorithmUri)) {
+ return parseXSLTTransform(transformElem);
+ } else {
+ throw new MOAApplicationException("1108", new Object[] { algorithmUri });
+ }
+ }
+
+ /**
+ * Parse an exclusive canonicalization type of transform.
+ *
+ * @param algorithmUri The algorithm URI of the canonicalization algorithm.
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return An <code>ExclusiveCanonicalizationTransform</code> API object
+ * containing the data from the <code>transformElem</code>.
+ */
+ private Transform parseExclusiveC14nTransform(
+ String algorithmUri,
+ Element transformElem)
+ {
+
+ Element inclusiveNamespacesElem =
+ (Element) XPathUtils.selectSingleNode(
+ transformElem,
+ INCLUSIVE_NAMESPACES_XPATH);
+
+ List inclusiveNamespaces = new ArrayList();
+ if (inclusiveNamespacesElem != null)
+ {
+ StringTokenizer tokenizer = new StringTokenizer(inclusiveNamespacesElem.getAttribute("PrefixList"));
+ while (tokenizer.hasMoreTokens())
+ {
+ inclusiveNamespaces.add(tokenizer.nextToken());
+ }
+ }
+ return factory.createExclusiveCanonicalizationTransform(
+ algorithmUri,
+ inclusiveNamespaces);
+ }
+
+ /**
+ * Parse an <code>XPath</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXPathTransform(Element transformElem)
+ throws MOAApplicationException {
+ Element xPathElem =
+ (Element) XPathUtils.selectSingleNode(transformElem, XPATH_XPATH);
+ Map nsDecls;
+
+ if (xPathElem == null) {
+ throw new MOAApplicationException("2202", null);
+ }
+
+ nsDecls = DOMUtils.getNamespaceDeclarations(xPathElem);
+ nsDecls.remove("");
+
+ return factory.createXPathTransform(DOMUtils.getText(xPathElem), nsDecls);
+ }
+
+ /**
+ * Parse an <code>XPathFilter2</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXPathFilter2Transform(Element transformElem)
+ throws MOAApplicationException {
+ List filters = new ArrayList();
+ NodeIterator iter =
+ XPathUtils.selectNodeIterator(transformElem, XPATH2_XPATH);
+ Element filterElem;
+
+ while ((filterElem = (Element) iter.nextNode()) != null) {
+ String filterAttr = filterElem.getAttribute("Filter");
+ String filterType;
+ String expression;
+ Map nsDecls;
+
+ if (filterAttr.equals("intersect")) {
+ filterType = XPathFilter.INTERSECT_TYPE;
+ } else if (filterAttr.equals("subtract")) {
+ filterType = XPathFilter.SUBTRACT_TYPE;
+ } else {
+ filterType = XPathFilter.UNION_TYPE;
+ }
+
+ expression = DOMUtils.getText(filterElem);
+ nsDecls = DOMUtils.getNamespaceDeclarations(filterElem);
+ nsDecls.remove("");
+ filters.add(factory.createXPathFilter(filterType, expression, nsDecls));
+ }
+ if (filters.size() == 0) {
+ throw new MOAApplicationException("2216", null);
+ }
+
+ return factory.createXPathFilter2Transform(filters);
+ }
+
+ /**
+ * Parse an <code>XSLT</code> type of <code>Transform</code>.
+ *
+ * @param transformElem The <code>Transform</code> DOM element to parse.
+ * @return The <code>Transform</code> API object representation of the
+ * <code>Transform</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>Transform</code> DOM element.
+ */
+ private Transform parseXSLTTransform(Element transformElem)
+ throws MOAApplicationException {
+ Element xsltElem =
+ (Element) XPathUtils.selectSingleNode(transformElem, XSLT_ELEMENT_XPATH);
+
+ if (xsltElem == null) {
+ throw new MOAApplicationException("2215", null);
+ }
+
+ return factory.createXSLTTransform(xsltElem);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java
new file mode 100644
index 000000000..74d14b7cc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParser.java
@@ -0,0 +1,169 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.StringTokenizer;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * A parser to parse <code>VerifyCMSSignatureRequest</code> DOM trees into
+ * <code>VerifyCMSSignatureRequest</code> API objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestParser {
+
+ //
+ // XPath expressions for selecting parts of the DOM message
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DATE_TIME_XPATH = MOA + "DateTime";
+ private static final String CMS_SIGNATURE_XPATH = MOA + "CMSSignature";
+ private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID";
+ private static final String DATA_OBJECT_XPATH = MOA + "DataObject";
+ private static final String META_INFO_XPATH = MOA + "MetaInfo";
+ private static final String CONTENT_XPATH = MOA + "Content";
+ private static final String BASE64_CONTENT_XPATH = MOA + "Base64Content";
+
+ /** The <code>SPSSFactory</code> for creating new API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /**
+ * Parse a <code>VerifyCMSSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>VerifyCMSSignatureRequest</code> API objects containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public VerifyCMSSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ int[] signatories = parseSignatories(requestElem);
+ Date dateTime =
+ RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH);
+ String cmsSignatureStr =
+ XPathUtils.getElementValue(requestElem, CMS_SIGNATURE_XPATH, "");
+ CMSDataObject dataObject = parseDataObject(requestElem);
+ String trustProfileID =
+ XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null);
+ InputStream cmsSignature =
+ Base64Utils.decodeToStream(cmsSignatureStr, true);
+
+ return factory.createVerifyCMSSignatureRequest(
+ signatories,
+ dateTime,
+ cmsSignature,
+ dataObject,
+ trustProfileID);
+ }
+
+ /**
+ * Parse the <code>Signatories</code> attribute contained in the
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> DOM element.
+ * @return The signatories contained in the given
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ */
+ private int[] parseSignatories(Element requestElem) {
+ String signatoriesStr = requestElem.getAttribute("Signatories");
+
+ if ("all".equals(signatoriesStr)) {
+ return VerifyCMSSignatureRequest.ALL_SIGNATORIES;
+ } else {
+ StringTokenizer tokenizer = new StringTokenizer(signatoriesStr);
+ List signatoriesList = new ArrayList();
+ int[] signatories;
+
+ // put the signatories into a List
+ while (tokenizer.hasMoreTokens()) {
+ try {
+ signatoriesList.add(new Integer(tokenizer.nextToken()));
+ } catch (NumberFormatException e) {
+ // this cannot occur if the request has been validated
+ }
+ }
+
+ // convert the List into an int array
+ signatories = CollectionUtils.toIntArray(signatoriesList);
+
+ return signatories;
+ }
+ }
+
+ /**
+ * Parse a the <code>DataObject</code> DOM element contained in a given
+ * <code>VerifyCMSSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyCMSSignatureRequest</code> DOM element
+ * to parse.
+ * @return The <code>CMSDataObject</code> API object containing the data
+ * from the <code>DataObject</code> DOM element.
+ */
+ private CMSDataObject parseDataObject(Element requestElem) {
+ Element dataObjectElem =
+ (Element) XPathUtils.selectSingleNode(requestElem, DATA_OBJECT_XPATH);
+
+ if (dataObjectElem != null) {
+ Element metaInfoElem =
+ (Element) XPathUtils.selectSingleNode(dataObjectElem, META_INFO_XPATH);
+ MetaInfo metaInfo = null;
+ Element contentElem =
+ (Element) XPathUtils.selectSingleNode(dataObjectElem, CONTENT_XPATH);
+ CMSContent content = parseContent(contentElem);
+
+ if (metaInfoElem != null) {
+ metaInfo = RequestParserUtils.parseMetaInfo(metaInfoElem);
+ }
+
+ return factory.createCMSDataObject(metaInfo, content);
+ } else {
+ return null;
+ }
+
+ }
+
+ /**
+ * Parse the content contained in a <code>CMSContentBaseType</code> kind of
+ * DOM element.
+ *
+ * @param contentElem The <code>CMSContentBaseType</code> kind of element to
+ * parse.
+ * @return A <code>CMSDataObject</code> API object containing the data
+ * from the given DOM element.
+ */
+ private CMSContent parseContent(Element contentElem) {
+ Element base64ContentElem =
+ (Element) XPathUtils.selectSingleNode(contentElem, BASE64_CONTENT_XPATH);
+
+ if (base64ContentElem != null) {
+ String base64Str = DOMUtils.getText(base64ContentElem);
+ InputStream binaryContent = Base64Utils.decodeToStream(base64Str, true);
+ return factory.createCMSContent(binaryContent);
+ } else {
+ return factory.createCMSContent(
+ contentElem.getAttribute("Reference"));
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java
new file mode 100644
index 000000000..3fc8f223d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureResponseBuilder.java
@@ -0,0 +1,101 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.Iterator;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Convert a <code>VerifyCMSSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseBuilder {
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>VerifyCMSSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>VerifyCMSSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public VerifyCMSSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("VerifyCMSSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>VerifyCMSSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>VerifyCMSSignatureResponse</code> API object.
+ *
+ * @param response The <code>VerifyCMSSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>VerifyCMSSignatureResponse</code>
+ * DOM element.
+ * @throws MOAApplicationException An error occurred building the response.
+ */
+ public Document build(VerifyCMSSignatureResponse response)
+ throws MOAApplicationException {
+
+ Iterator iter;
+
+ for (iter = response.getResponseElements().iterator(); iter.hasNext();) {
+ VerifyCMSSignatureResponseElement responseElement =
+ (VerifyCMSSignatureResponseElement) iter.next();
+ addResponseElement(responseElement);
+ }
+
+ return responseDoc;
+ }
+
+ /**
+ * Add an element to the response.
+ *
+ * @param responseElement The element to add to the response.
+ * @throws MOAApplicationException An error occurred adding the element.
+ */
+ private void addResponseElement(VerifyCMSSignatureResponseElement responseElement)
+ throws MOAApplicationException {
+
+ SignerInfo signerInfo = responseElement.getSignerInfo();
+ CheckResult signatureCheck = responseElement.getSignatureCheck();
+ CheckResult certCheck = responseElement.getCertificateCheck();
+
+ ResponseBuilderUtils.addSignerInfo(
+ responseDoc,
+ responseElem,
+ signerInfo.getSignerCertificate(),
+ signerInfo.isQualifiedCertificate(),
+ signerInfo.isPublicAuthority(),
+ signerInfo.getPublicAuhtorityID());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "SignatureCheck",
+ signatureCheck.getCode(),
+ signatureCheck.getInfo());
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "CertificateCheck",
+ certCheck.getCode(),
+ certCheck.getInfo());
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java
new file mode 100644
index 000000000..e736af522
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParser.java
@@ -0,0 +1,275 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestParser {
+
+ //
+ // XPath expressions for parsing parts of the request
+ //
+ private static final String MOA = Constants.MOA_PREFIX + ":";
+ private static final String DATE_TIME_XPATH = MOA + "DateTime";
+ private static final String RETURN_HASH_INPUT_DATA_XPATH =
+ MOA + "ReturnHashInputData";
+ private static final String TRUST_PROFILE_ID_XPATH = MOA + "TrustProfileID";
+ private static final String VERIFY_SIGNATURE_ENVIRONMENT_XPATH =
+ MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureEnvironment";
+ private static final String VERIFY_SIGNATURE_LOCATION_XPATH =
+ MOA + "VerifySignatureInfo/" + MOA + "VerifySignatureLocation";
+ private static final String SUPPLEMENT_PROFILE_XPATH =
+ MOA + "SupplementProfile | " + MOA + "SupplementProfileID";
+ private static final String SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH =
+ MOA + "SignatureManifestCheckParams";
+ private static final String VERIFY_TRANSFORMS_INFO_PROFILE_XPATH =
+ (MOA + "VerifyTransformsInfoProfile | ")
+ + (MOA + "VerifyTransformsInfoProfileID");
+ private static final String REFERENCE_INFO_XPATH = MOA + "ReferenceInfo";
+
+ /** The <code>SPSSFactory</code> for creating new API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+
+ /**
+ * Parse a <code>VerifyXMLSignatureRequest</code> DOM element, as defined
+ * by the MOA schema.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> to parse. The
+ * request must have been successfully parsed against the schema for this
+ * method to succeed.
+ * @return A <code>VerifyXMLSignatureRequest</code> API object containing
+ * the data from the DOM element.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public VerifyXMLSignatureRequest parse(Element requestElem)
+ throws MOAApplicationException {
+
+ Date dateTime =
+ RequestParserUtils.parseDateTime(requestElem, DATE_TIME_XPATH);
+ VerifySignatureInfo verifySignatureInfo =
+ parseVerifySignatureInfo(requestElem);
+ List supplementProfiles = parseSupplementProfiles(requestElem);
+ SignatureManifestCheckParams signatureManifestCheckParams =
+ parseSignatureManifestCheckParams(requestElem);
+ boolean returnHashInputData =
+ XPathUtils.selectSingleNode(requestElem, RETURN_HASH_INPUT_DATA_XPATH)
+ != null;
+ String trustProfileID =
+ XPathUtils.getElementValue(requestElem, TRUST_PROFILE_ID_XPATH, null);
+
+ return factory.createVerifyXMLSignatureRequest(
+ dateTime,
+ verifySignatureInfo,
+ supplementProfiles,
+ signatureManifestCheckParams,
+ returnHashInputData,
+ trustProfileID);
+ }
+
+ /**
+ * Parse the <code>VerifySignatureInfo</code> DOM element contained in
+ * the <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element
+ * containing the <code>VerifySignatureInfo</code> DOM element.
+ * @return The <code>VerifySignatureInfo</code> API object containing the
+ * data from the DOM element.
+ */
+ private VerifySignatureInfo parseVerifySignatureInfo(Element requestElem) {
+ Element verifySignatureEnvironmentElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ VERIFY_SIGNATURE_ENVIRONMENT_XPATH);
+ Content verifySignatureEnvironment =
+ RequestParserUtils.parseContent(verifySignatureEnvironmentElem);
+ VerifySignatureLocation verifySignatureLocation =
+ parseVerifySignatureLocation(requestElem);
+
+ return factory.createVerifySignatureInfo(
+ verifySignatureEnvironment,
+ verifySignatureLocation);
+ }
+
+ /**
+ * Parse the <code>VerifySignatureLocation</code> DOM element contained
+ * in the given <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequst</code> DOM element.
+ * @return The <code>VerifySignatureLocation</code> API object containing the
+ * data from the DOM element.
+ */
+ private VerifySignatureLocation parseVerifySignatureLocation(Element requestElem) {
+ Element locationElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ VERIFY_SIGNATURE_LOCATION_XPATH);
+ String xPathExpression = DOMUtils.getText(locationElem);
+ Map namespaceDeclarations = DOMUtils.getNamespaceDeclarations(locationElem);
+
+ return factory.createVerifySignatureLocation(
+ xPathExpression,
+ namespaceDeclarations);
+ }
+
+ /**
+ * Parse the supplement profiles contained in the given
+ * <code>VerifyXMLSignatureRequest</code> DOM element.
+ *
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @return A <code>List</code> of <code>SupplementProfile</code> API objects
+ * containing the data from the <code>SupplementProfile</code> DOM elements.
+ */
+ private List parseSupplementProfiles(Element requestElem) {
+ List supplementProfiles = new ArrayList();
+ NodeIterator profileElems =
+ XPathUtils.selectNodeIterator(requestElem, SUPPLEMENT_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileElems.nextNode()) != null) {
+ SupplementProfile profile;
+
+ if ("SupplementProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ profile = profileParser.parseSupplementProfile(profileElem);
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ profile = factory.createSupplementProfile(profileID);
+ }
+ supplementProfiles.add(profile);
+ }
+ return supplementProfiles;
+ }
+
+ /**
+ * Parse the <code>SignatureManifestCheckParams</code> DOM element contained
+ * in the given <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @param requestElem The <code>VerifyXMLSignatureRequest</code> DOM element.
+ * @return The <code>SignatureManifestCheckParams</code> API object containing
+ * the data from the <code>SignatureManifestCheckParams</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>SignatureManifestCheckParams</code> DOM element.
+ */
+ private SignatureManifestCheckParams parseSignatureManifestCheckParams(Element requestElem)
+ throws MOAApplicationException {
+ Element paramsElem =
+ (Element) XPathUtils.selectSingleNode(
+ requestElem,
+ SIGNATURE_MANIFEST_CHECK_PARAMS_XPATH);
+
+ if (paramsElem != null) {
+ String returnReferenceInputDataStr =
+ paramsElem.getAttribute("ReturnReferenceInputData");
+ boolean returnReferencInputData =
+ BoolUtils.valueOf(returnReferenceInputDataStr);
+ List referenceInfos = parseReferenceInfos(paramsElem);
+
+ return factory.createSignatureManifestCheckParams(
+ referenceInfos,
+ returnReferencInputData);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Parse the <code>ReferenceInfo</code> DOM elements contained in a
+ * <code>SignatureManifestCheckParams</code> DOM element.
+ *
+ * @param paramsElem The <code>SignatureManifestCheckParams</code> DOM element
+ * containing the <code>ReferenceInfo</code> DOM elements.
+ * @return A <code>List</code> of <code>RefernceInfo</code> API objects
+ * containing the data from the <code>ReferenceInfo</code> DOM elements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>ReferenceInfo</code> DOM elements.
+ */
+ private List parseReferenceInfos(Element paramsElem)
+ throws MOAApplicationException {
+
+ List referenceInfos = new ArrayList();
+ NodeIterator refInfoElems =
+ XPathUtils.selectNodeIterator(paramsElem, REFERENCE_INFO_XPATH);
+ Element refInfoElem;
+
+ while ((refInfoElem = (Element) refInfoElems.nextNode()) != null) {
+ ReferenceInfo referenceInfo = parseReferenceInfo(refInfoElem);
+
+ referenceInfos.add(referenceInfo);
+ }
+
+ return referenceInfos;
+ }
+
+ /**
+ * Parse a <code>ReferenceInfo</code> DOM element.
+ *
+ * @param refInfoElem The <code>ReferenceInfo</code> DOM element to parse.
+ * @return The <code>ReferenceInfo</code> API object containing the data
+ * from the given <code>ReferenceInfo</code> DOM element.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>ReferenceInfo</code> DOM element.
+ */
+ private ReferenceInfo parseReferenceInfo(Element refInfoElem)
+ throws MOAApplicationException {
+ List profiles = parseVerifyTransformsInfoProfiles(refInfoElem);
+ return factory.createReferenceInfo(profiles);
+ }
+
+ /**
+ * Parse the <code>VerifyTransformsInfoProfile</code> DOM elements contained
+ * in a <code>ReferenceInfo</code> DOM element.
+ *
+ * @param refInfoElem <code>ReferenceInfo</code> DOM element containing
+ * the <code>VerifyTransformsInfoProfile</code> DOM elements.
+ * @return A <code>List</code> of <code>VerifyTransformsInfoProfile</code>
+ * API objects containing the profile data.
+ * @throws MOAApplicationException An error occurred building the
+ * <code>VerifyTransformsInfoProfile</code>s.
+ */
+ private List parseVerifyTransformsInfoProfiles(Element refInfoElem)
+ throws MOAApplicationException {
+
+ List profiles = new ArrayList();
+ NodeIterator profileElems =
+ XPathUtils.selectNodeIterator(
+ refInfoElem,
+ VERIFY_TRANSFORMS_INFO_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileElems.nextNode()) != null) {
+ if ("VerifyTransformsInfoProfile".equals(profileElem.getLocalName())) {
+ ProfileParser profileParser = new ProfileParser();
+ profiles.add(
+ profileParser.parseVerifyTransformsInfoProfile(profileElem));
+ } else {
+ String profileID = DOMUtils.getText(profileElem);
+ profiles.add(factory.createVerifyTransformsInfoProfile(profileID));
+ }
+ }
+ return profiles;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..960d9571d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureResponseBuilder.java
@@ -0,0 +1,310 @@
+package at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * Convert a <code>VerifyXMLSignatureResponse</code> API object into its
+ * XML representation, according to the MOA XML schema.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseBuilder {
+ private static final String MOA_NS_URI = Constants.MOA_NS_URI;
+
+ /** The XML document containing the response element. */
+ private Document responseDoc;
+ /** The response <code>VerifyXMLSignatureResponse</code> DOM element. */
+ private Element responseElem;
+
+ /**
+ * Create a new <code>VerifyXMLSignatureResponseBuilder</code>:
+ *
+ * @throws MOASystemException An error occurred setting up the resulting
+ * XML document.
+ */
+ public VerifyXMLSignatureResponseBuilder() throws MOASystemException {
+ responseDoc =
+ ResponseBuilderUtils.createResponse("VerifyXMLSignatureResponse");
+ responseElem = responseDoc.getDocumentElement();
+ }
+
+ /**
+ * Build a document containing a <code>VerifyXMLSignatureResponse</code>
+ * DOM element being the XML representation of the given
+ * <code>VerifyXMLSignatureResponse</code> API object.
+ *
+ * @param response The <code>VerifyXMLSignatureResponse</code> to convert
+ * to XML.
+ * @return A document containing the <code>VerifyXMLSignatureResponse</code>
+ * DOM element.
+ * @throws MOAApplicationException An error occurred building the response.
+ */
+ public Document build(VerifyXMLSignatureResponse response)
+ throws MOAApplicationException {
+
+ Iterator iter;
+ List responseData;
+
+ // add the SignerInfo
+ ResponseBuilderUtils.addSignerInfo(
+ responseDoc,
+ responseElem,
+ response.getSignerInfo().getSignerCertificate(),
+ response.getSignerInfo().isQualifiedCertificate(),
+ response.getSignerInfo().isPublicAuthority(),
+ response.getSignerInfo().getPublicAuhtorityID());
+
+ // add HashInputData elements
+ responseData = response.getHashInputDatas();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ InputData inputData = (InputData) iter.next();
+ addContent("HashInputData", inputData);
+ }
+ }
+
+ // add ReferenceInputData elements
+ responseData = response.getReferenceInputDatas();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ InputData inputData = (InputData) iter.next();
+ addContent("ReferenceInputData", inputData);
+ }
+ }
+
+ // add the SignatureCheck
+ addReferencesCheckResult("SignatureCheck", response.getSignatureCheck());
+
+ // add the SignatureManifestCheck
+ if (response.getSignatureManifestCheck() != null) {
+ addReferencesCheckResult(
+ "SignatureManifestCheck",
+ response.getSignatureManifestCheck());
+ }
+
+ // add the XMLDsigManifestChecks
+ responseData = response.getXMLDsigManifestChecks();
+ if (responseData != null && !responseData.isEmpty()) {
+ for (iter = responseData.iterator(); iter.hasNext();) {
+ ManifestRefsCheckResult checkResult =
+ (ManifestRefsCheckResult) iter.next();
+ addManifestRefsCheckResult("XMLDSIGManifestCheck", checkResult);
+ }
+ }
+
+ // add the CertificateCheck
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ "CertificateCheck",
+ response.getCertificateCheck().getCode(),
+ response.getCertificateCheck().getInfo());
+
+ return responseDoc;
+ }
+
+ /**
+ * Add an element of type <code>ContentBaseType</code> to the response.
+ *
+ * @param elementName The name of the element.
+ *
+ * @param inputData The <code>InputData</code> to add. Based on the type of
+ *
+ * the <code>InputData</code>, either a <code>Base64Content</code> element
+ * or a <code>XMLContent</code> subelement will be added. An <code>
+ * InputDataBinaryImpl</code> will be added as a <code>Base64Content</code>
+ * child element. An<code>InputDataXMLImpl</code> will be added as <code>
+ * XMLContent</code> child element.
+ *
+ * @throws MOAApplicationException An error occurred adding the content.
+ */
+ private void addContent(String elementName, InputData inputData)
+ throws MOAApplicationException {
+
+ Element contentElem = responseDoc.createElementNS(MOA_NS_URI, elementName);
+
+ contentElem.setAttributeNS(null, "PartOf", inputData.getPartOf());
+ if (inputData.getReferringReferenceNumber() != InputData.REFERER_NONE_)
+ contentElem.setAttributeNS(
+ null,
+ "ReferringSigReference",
+ Integer.toString(inputData.getReferringReferenceNumber()));
+
+ switch (inputData.getContentType()) {
+ case Content.XML_CONTENT :
+ ContentXML contentXml = (ContentXML) inputData;
+ NodeList nodes = contentXml.getXMLContent();
+ Element xmlElem;
+ int i;
+
+ xmlElem = responseDoc.createElementNS(MOA_NS_URI, "XMLContent");
+ //xmlElem.setAttributeNS(XML_NS_URI, "xml:space", "preserve");
+ xmlElem.setAttribute("xml:space", "preserve");
+
+ for (i = 0; i < nodes.getLength(); i++) {
+ xmlElem.appendChild(responseDoc.importNode(nodes.item(i), true));
+ }
+ contentElem.appendChild(xmlElem);
+ responseElem.appendChild(contentElem);
+ break;
+ case Content.BINARY_CONTENT :
+ Element binaryElem =
+ responseDoc.createElementNS(MOA_NS_URI, "Base64Content");
+ ContentBinary contentBinary = (ContentBinary) inputData;
+ String base64Str;
+
+ try {
+ base64Str = Base64Utils.encode(contentBinary.getBinaryContent());
+ } catch (IOException e) {
+ throw new MOAApplicationException("2200", null, e);
+ }
+ binaryElem.appendChild(responseDoc.createTextNode(base64Str));
+ contentElem.appendChild(binaryElem);
+ responseElem.appendChild(contentElem);
+ break;
+ }
+ }
+
+ /**
+ * Add a <code>ReferencesCheckResult</code> to the response.
+ *
+ * @param elementName The DOM element name to use.
+ * @param checkResult The <code>ReferencesCheckResult</code> to add.
+ */
+ private void addReferencesCheckResult(
+ String elementName,
+ ReferencesCheckResult checkResult) {
+
+ NodeList info = null;
+
+ if (checkResult.getInfo() != null) {
+ DocumentFragment fragment = responseDoc.createDocumentFragment();
+ NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo();
+ int[] failedReferences = checkResult.getInfo().getFailedReferences();
+
+ if (anyOtherInfo != null) {
+ addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo());
+ }
+
+ if (failedReferences != null) {
+ addFailedReferences(fragment, failedReferences);
+ }
+
+ info = fragment.getChildNodes();
+ }
+
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ elementName,
+ checkResult.getCode(),
+ info);
+ }
+
+
+ /**
+ * Add a <code>ManifestRefsCheckResult</code> to the response.
+ *
+ * @param elementName The DOM element name to use.
+ * @param checkResult The <code>ManifestRefsCheckResult</code> to add.
+ */
+ private void addManifestRefsCheckResult(
+ String elementName,
+ ManifestRefsCheckResult checkResult) {
+
+ DocumentFragment fragment = responseDoc.createDocumentFragment();
+ NodeList anyOtherInfo = checkResult.getInfo().getAnyOtherInfo();
+ int[] failedReferences = checkResult.getInfo().getFailedReferences();
+ Element referringSigRefElem;
+ String referringSigRefStr;
+
+ // add any other elements
+ if (anyOtherInfo != null) {
+ addAnyOtherInfo(fragment, checkResult.getInfo().getAnyOtherInfo());
+ }
+
+ // add the failed references
+ if (failedReferences != null) {
+ addFailedReferences(fragment, failedReferences);
+ }
+
+ // add the ReferringSigReference
+ referringSigRefElem =
+ responseDoc.createElementNS(MOA_NS_URI, "ReferringSigReference");
+ referringSigRefStr =
+ Integer.toString(checkResult.getInfo().getReferringSignatureReference());
+ referringSigRefElem.appendChild(
+ responseDoc.createTextNode(referringSigRefStr));
+ fragment.appendChild(referringSigRefElem);
+
+ // add XMLDSIGManifestCheckResult to the response
+ ResponseBuilderUtils.addCodeInfoElement(
+ responseDoc,
+ responseElem,
+ elementName,
+ checkResult.getCode(),
+ fragment.getChildNodes());
+ }
+
+ /**
+ * Add arbitrary XML content to a DOM <code>DocumentFragment</code>.
+ *
+ * @param fragment The fragment to add the XML content to.
+ * @param anyOtherInfo The XML content to add.
+ */
+ private void addAnyOtherInfo(
+ DocumentFragment fragment,
+ NodeList anyOtherInfo) {
+
+ int i;
+
+ for (i = 0; i < anyOtherInfo.getLength(); i++) {
+ fragment.appendChild(responseDoc.importNode(anyOtherInfo.item(i), true));
+ }
+ }
+
+ /**
+ * Add the failed references as <code>FailedReference</code> DOM elements to
+ * the fragment.
+ *
+ * @param fragment The DOM document fragment to add the
+ * <code>FailedReference</code> elements to.
+ * @param failedReferences The indexes of the failed references.
+ */
+ private void addFailedReferences(
+ DocumentFragment fragment,
+ int[] failedReferences) {
+ Element failedReferenceElem;
+ int i;
+
+ for (i = 0; i < failedReferences.length; i++) {
+ failedReferenceElem =
+ responseDoc.createElementNS(MOA_NS_URI, "FailedReference");
+ failedReferenceElem.appendChild(
+ responseDoc.createTextNode(Integer.toString(failedReferences[i])));
+ fragment.appendChild(failedReferenceElem);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java
new file mode 100644
index 000000000..425c410ad
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfile.java
@@ -0,0 +1,30 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for signature environment profile data used in XML signature
+ * creation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfile {
+ /**
+ * Indicates that the profile data is given explicitly.
+ */
+ public static int EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE = 0;
+ /**
+ * Indicates that the profile data is stored in the configuration and resolved
+ * using an ID.
+ */
+ public static int ID_CREATESIGNATUREENVIRONMENTPROFILE = 1;
+
+ /**
+ * Gets the type of this object.
+ *
+ * @return The type of <code>CreateSignatureEnvironmentProfile</code> denoted
+ * by this object. Either
+ * <code>EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE</code> or
+ * <code>ID_CREATESIGNATUREENVIRONMENTPROFILE</code>.
+ */
+ public int getCreateSignatureEnvironmentProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java
new file mode 100644
index 000000000..6aebd102b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileExplicit.java
@@ -0,0 +1,30 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * A <code>CreateSignatureEnvironmentProfile</code> containing the profile
+ * data explicitly.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfileExplicit
+ extends CreateSignatureEnvironmentProfile {
+
+ /**
+ * Gets the location and index of where to insert the signature into the
+ * signature environment.
+ *
+ * @return The location and index of the signature in the signature
+ * environment.
+ */
+ public CreateSignatureLocation getCreateSignatureLocation();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplements();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java
new file mode 100644
index 000000000..1c0d87adc
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureEnvironmentProfileID.java
@@ -0,0 +1,20 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * A <code>CreateSignatureEnvironmentProfile</code> containing a profile ID
+ * pointing to locally stored profile data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureEnvironmentProfileID
+ extends CreateSignatureEnvironmentProfile {
+
+ /**
+ * Gets the profile ID.
+ *
+ * @return The profile ID.
+ */
+ public String getCreateSignatureEnvironmentProfileID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java
new file mode 100644
index 000000000..5ceae4d0a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureInfo.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates a signature object used during signature creation.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateSignatureInfo {
+ /**
+ * Gets the XML structure where the signature will be inserted.
+ *
+ * @return The XML structure where the signature will be inserted.
+ */
+ public Content getCreateSignatureEnvironment();
+ /**
+ * Gets the supplemental data for the signature environment.
+ *
+ * @return The supplemental data for the signature envoronment.
+ */
+ public CreateSignatureEnvironmentProfile getCreateSignatureEnvironmentProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java
new file mode 100644
index 000000000..81374ceaa
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateSignatureLocation.java
@@ -0,0 +1,23 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Specifies where to insert the newly created signature.
+ *
+ * An XPath expression is used to select the signature parent element. An
+ * additional index specifies the node index after which to insert the
+ * signature into the parent element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface CreateSignatureLocation extends ElementSelector {
+ /**
+ * Gets the node index, after which the signature will be inserted into the
+ * parent elemen.
+ *
+ * @return The index of the node after which the signature will be inserted.
+ */
+ public int getIndex();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java
new file mode 100644
index 000000000..94152434e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfo.java
@@ -0,0 +1,27 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+
+/**
+ * Encapsulates information used for the transformation of the data object.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfo {
+ /**
+ * Gets the XMLDSig transforms.
+ *
+ * @return A <code>List</code> of <code>Transform</code> objects.
+ */
+ public List getTransforms();
+ /**
+ * Gets meta information about the data resulting from the transformation.
+ *
+ * @return Meta information about the resulting data.
+ */
+ public MetaInfo getFinalDataMetaInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java
new file mode 100644
index 000000000..40acfd317
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfile.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for transformation informations used in signature creation.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfile {
+ /**
+ * Indicates transformation information given explicitly.
+ */
+ public static final int EXPLICIT_CREATETRANSFORMSINFOPROFILE = 0;
+ /**
+ * Indicates transformation information given as an ID.
+ */
+ public static final int ID_CREATETRANSFORMSINFOPROFILE = 1;
+
+ /**
+ * Gets the type of profile information this object contains.
+ *
+ * @return The type of transformation information, either
+ * <code>EXPLICIT_CREATETRANSFORMSINFOPROFILE</code> or
+ * <code>ID_CREATETRANSFORMSINFOPROFILE</code>.
+ */
+ public int getCreateTransformsInfoProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java
new file mode 100644
index 000000000..aeb74445f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileExplicit.java
@@ -0,0 +1,26 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Encapsulates explicit transformation informations.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfileExplicit
+ extends CreateTransformsInfoProfile {
+ /**
+ * Gets the transformation information of the data object.
+ *
+ * @return Transformation information of the data object.
+ */
+ public CreateTransformsInfo getCreateTransformsInfo();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java
new file mode 100644
index 000000000..3631ead29
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateTransformsInfoProfileID.java
@@ -0,0 +1,18 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Encapsulates transformation information given via an identifier.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateTransformsInfoProfileID
+ extends CreateTransformsInfoProfile {
+ /**
+ * Gets the ID of the transformation.
+ *
+ * @return The transformation profile ID.
+ */
+ public String getCreateTransformsInfoProfileID();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java
new file mode 100644
index 000000000..b8157fdfb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureRequest.java
@@ -0,0 +1,26 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+
+/**
+ * Object that encapsulates a request to create an XML Signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureRequest {
+ /**
+ * Gets the identifier for the keys to be used for the signature.
+ *
+ * @return The identifier for the keys to be used.
+ */
+ public String getKeyIdentifier();
+ /**
+ * Gets the information of the singleSignatureInfo elements.
+ *
+ * @return The information of singleSignatureInfo elements.
+ */
+ public List getSingleSignatureInfos();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java
new file mode 100644
index 000000000..6bf54e6a5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponse.java
@@ -0,0 +1,20 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Object that encapsulates the response on to a
+ * <code>CreateXMLSignatureRequest</code> to create an XML signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureResponse {
+ /**
+ * Gets the response elements.
+ *
+ * @return The response elements.
+ */
+ public List getResponseElements();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java
new file mode 100644
index 000000000..2162d82fd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/CreateXMLSignatureResponseElement.java
@@ -0,0 +1,29 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+/**
+ * Base class for <code>SignatureEnvironmentResponse</code> and
+ * <code>ErrorResponse</code> elements in a
+ * <code>CreateXMLSignatureResponse</code>.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface CreateXMLSignatureResponseElement {
+ /**
+ * Indicates that this object contains a <code>SignatureEnvironment</code>.
+ */
+ public static final int SIGNATURE_ENVIRONMENT_RESPONSE = 0;
+ /**
+ * Indicates that this objet contains an <code>ErrorResponse</code>.
+ */
+ public static final int ERROR_RESPONSE = 1;
+
+ /**
+ * Gets the type of response object.
+ *
+ * @return The type of response object, either
+ * <code>SIGNATURE_ENVIRONMENT_RESPONSE</code> or <code>ERROR_RESPONSE</code>.
+ */
+ public int getResponseType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java
new file mode 100644
index 000000000..43d49c587
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/DataObjectInfo.java
@@ -0,0 +1,48 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates information required to create a single signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface DataObjectInfo {
+ /**
+ * Indicates that a detached signature will be created.
+ */
+ public static final String STRUCTURE_DETACHED = "detached";
+ /**
+ * Indicates that an enveloping signature will be created.
+ */
+ public static final String STRUCTURE_ENVELOPING = "enveloping";
+
+ /**
+ * Gets the structure of the signature.
+ *
+ * @return The structure of the signature.
+ */
+ public String getStructure();
+ /**
+ * Checks whether a refercence will be placed in the signature itself or
+ * in the manifest.
+ *
+ * @return <code>true</code> if a reference will be placed in the manifest,
+ * <code>false</code> if it will be placed in the signature.
+ */
+ public boolean isChildOfManifest();
+ /**
+ * Gets information related to a single data object.
+ *
+ * @return Information related to a single data object.
+ */
+ public Content getDataObject();
+ /**
+ * Gets information for the transformation of the data object.
+ *
+ * @return The transformation information.
+ */
+ public CreateTransformsInfoProfile getCreateTransformsInfoProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java
new file mode 100644
index 000000000..30fa4fb52
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/ErrorResponse.java
@@ -0,0 +1,24 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+
+/**
+ * Object containing detailed error information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ErrorResponse extends CreateXMLSignatureResponseElement {
+ /**
+ * Gets the error code.
+ *
+ * @return The error code.
+ */
+ public int getErrorCode();
+ /**
+ * Gets verbose error information.
+ *
+ * @return Verbose error information.
+ */
+ public String getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java
new file mode 100644
index 000000000..449349a68
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SignatureEnvironmentResponse.java
@@ -0,0 +1,20 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import org.w3c.dom.Element;
+
+/**
+ * Contains the signature if the signature creation was successful.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignatureEnvironmentResponse
+ extends CreateXMLSignatureResponseElement {
+ /**
+ * Gets the XML structure which contains the signature.
+ *
+ * @return A general XML structure containing the signature.
+ */
+ public Element getSignatureEnvironment();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java
new file mode 100644
index 000000000..9c74c5157
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlsign/SingleSignatureInfo.java
@@ -0,0 +1,32 @@
+package at.gv.egovernment.moa.spss.api.xmlsign;
+
+import java.util.List;
+
+/**
+ * Encapsulates data to create a single signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SingleSignatureInfo {
+ /**
+ * Gets the dataObjectInfo information.
+ *
+ * @return The dataObjectInfo information.
+ */
+ public List getDataObjectInfos();
+ /**
+ * Gets the signature object.
+ *
+ * @return The signature object used during signature creation.
+ */
+ public CreateSignatureInfo getCreateSignatureInfo();
+ /**
+ * Check whether a Security Layer conform signature manifest will be created.
+ *
+ * @return <code>true</code>, if a Security Layer conform signature manifest
+ * will be created, <code>false</code> otherwise.
+ */
+ public boolean isSecurityLayerConform();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java
new file mode 100644
index 000000000..1984ba349
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResult.java
@@ -0,0 +1,24 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Contains the results of manifest checks according to XMLDsig.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ManifestRefsCheckResult {
+ /**
+ * Gets the check code.
+ *
+ * @return A numerical representation of the result of the manifest check.
+ */
+ public int getCode();
+ /**
+ * Gets the reference to the manifest.
+ *
+ * @return The reference to the manifest.
+ */
+ public ManifestRefsCheckResultInfo getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java
new file mode 100644
index 000000000..258840162
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ManifestRefsCheckResultInfo.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Encapsulates information referring to the manifest of the check.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ManifestRefsCheckResultInfo extends ReferencesCheckResultInfo {
+ /**
+ * Gets the position of the signature reference containing the
+ * reference to the manifest being described by this object.
+ *
+ * @return The position of the signature reference.
+ */
+ public int getReferringSignatureReference();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java
new file mode 100644
index 000000000..4c644583b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferenceInfo.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Contains transformation parameters which are locally available.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface ReferenceInfo {
+ /**
+ * Gets the transformation info.
+ *
+ * @return The transformation info.
+ */
+ public List getVerifyTransformsInfoProfiles();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java
new file mode 100644
index 000000000..7b5488613
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResult.java
@@ -0,0 +1,23 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Contains information about the verification status of references contained
+ * in the signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ReferencesCheckResult {
+ /**
+ * Gets the check code.
+ *
+ * @return A numerical representation of the result of the reference check.
+ */
+ public int getCode();
+ /**
+ * Gets the additional information about the result.
+ *
+ * @return Additional information about the result.
+ */
+ public ReferencesCheckResultInfo getInfo();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java
new file mode 100644
index 000000000..be21b61c2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/ReferencesCheckResultInfo.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import org.w3c.dom.NodeList;
+
+/**
+ * Additional information contained in a <code>ReferencesCheckResult</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface ReferencesCheckResultInfo {
+ /**
+ * Gets the additional info of the failed <code>dsig:reference</code> element.
+ *
+ * @return The info elements.
+ */
+ public NodeList getAnyOtherInfo();
+ /**
+ * Gets the positions of the failed signature references containing the
+ * references to the manifests being described by this object.
+ *
+ * @return The positions of the failed signature references.
+ */
+ public int[] getFailedReferences();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java
new file mode 100644
index 000000000..8f0efacf3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SignatureManifestCheckParams.java
@@ -0,0 +1,26 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Contains parameters used to check the signature manifest.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SignatureManifestCheckParams {
+ /**
+ * Gets the referential information.
+ *
+ * @return The referential information.
+ */
+ public List getReferenceInfos();
+ /**
+ * Gets information on whether signature source data should be returned.
+ *
+ * @return <code>true</code>, if signature source data should be returned,
+ * otherwise <code>false</code>.
+ */
+ public boolean getReturnReferenceInputData();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java
new file mode 100644
index 000000000..569e691ca
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfile.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Base class for supplementary information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfile {
+ /**
+ * Indicates that this object contains explicit supplementary information.
+ */
+ public static final int EXPLICIT_SUPPLEMENTPROFILE = 0;
+ /**
+ * Indicates that this object contains a profile id where supplementary
+ * information can be found.
+ */
+ public static final int ID_SUPPLEMENTPROFILE = 1;
+
+ /**
+ * Gets the type of supplementary information contained in this object.
+ *
+ * @return The type of supplementary information contained in this object,
+ * either <code>EXPLICIT_SUPPLEMENT</code> or <code>ID_SUPPLEMENT</code>.
+ */
+ public int getSupplementProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java
new file mode 100644
index 000000000..7dd37a2d1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileExplicit.java
@@ -0,0 +1,19 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+
+/**
+ * Encapsulates explicit supplementary information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfileExplicit extends SupplementProfile {
+ /**
+ * Gets the supplemental object.
+ *
+ * @return The supplemental object.
+ */
+ public XMLDataObjectAssociation getSupplementProfile();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java
new file mode 100644
index 000000000..5b5083be9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/SupplementProfileID.java
@@ -0,0 +1,18 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates supplementary information stored in a profile.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface SupplementProfileID extends SupplementProfile {
+ /**
+ * Gets the id of the profile where the supplementary information can be
+ * found.
+ *
+ * @return The profile id.
+ */
+ public String getSupplementProfileID();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java
new file mode 100644
index 000000000..3e173e0cd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameter.java
@@ -0,0 +1,40 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Object encapsulating transform parameters either as a URI, binary or
+ * hashed.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameter {
+ /**
+ * Indicates that this object contains a transform parameter given as
+ * a URI.
+ */
+ public static final int URI_TRANSFORMPARAMETER = 0;
+ /**
+ * Indicates that this object contains binary transform parameter.
+ */
+ public static final int BINARY_TRANSFORMPARAMETER = 1;
+ /**
+ * Indicatest that this object contains a binary hash of the transform
+ * parameter.
+ */
+ public static final int HASH_TRANSFORMPARAMETER = 2;
+
+ /**
+ * Gets the type of transform parameter contained in this object.
+ *
+ * @return The type of transform parameter, being one of
+ * <code>URI_TRANSFORMPARAMETER</code>, <code>BINARY_TRANSFORMPARAMETER</code>
+ * or <code>HASH_TRANSFORMPARAMETER</code>.
+ */
+ public int getTransformParameterType();
+ /**
+ * Gets the transform parameter URI.
+ *
+ * @return The transform parameter URI.
+ */
+ public String getURI();}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java
new file mode 100644
index 000000000..600227dfd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterBinary.java
@@ -0,0 +1,21 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.io.InputStream;
+
+/**
+ * Encapsulates a binary transform parameter.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterBinary extends TransformParameter {
+ /**
+ * Gets the binary transform parameter.
+ *
+ * @return An <code>InputStream</code> from which the binary content can
+ * be read.
+ */
+ public InputStream getBinaryContent();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java
new file mode 100644
index 000000000..ec45ea4f4
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterHash.java
@@ -0,0 +1,26 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+
+/**
+ * Contains a hash of the transform parameter.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterHash extends TransformParameter {
+ /**
+ * Gets the method used for calculating the digest value.
+ *
+ * @return The digest method.
+ */
+ public String getDigestMethod();
+ /**
+ * Gets the binary hash of the transform parameter.
+ *
+ * @return A binary representation of the hash.
+ */
+ public byte[] getDigestValue();
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java
new file mode 100644
index 000000000..4a6f0a58f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/TransformParameterURI.java
@@ -0,0 +1,12 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates a transform parameter given as a URI.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface TransformParameterURI extends TransformParameter {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java
new file mode 100644
index 000000000..386651c47
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureInfo.java
@@ -0,0 +1,27 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.Content;
+
+/**
+ * Encapsulates a signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifySignatureInfo {
+ /**
+ * Gets the content of the <code>VerifySignatureEnvironment</code> element.
+ *
+ * @return A <code>MOAElement</code> containing the
+ * <code>VerifySignatureEnvironment</code> in a DOM-like structure.
+ */
+ public Content getVerifySignatureEnvironment();
+ /**
+ * Gets the location of the signature.
+ *
+ * @return The location of the signature within the signature environment.
+ */
+ public VerifySignatureLocation getVerifySignatureLocation();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java
new file mode 100644
index 000000000..f05e3e889
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifySignatureLocation.java
@@ -0,0 +1,13 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Specifies where to find the signature to be verified.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public interface VerifySignatureLocation extends ElementSelector {
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java
new file mode 100644
index 000000000..909fc58a2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfile.java
@@ -0,0 +1,28 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Object for explicitly specifying a transformation path.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfile {
+ /**
+ * Indicates that this object contains the transformation path explicitly.
+ */
+ public static final int EXPLICIT_VERIFYTRANSFORMSINFOPROFILE = 0;
+ /**
+ * Indicatest that this object contains a transformation info id.
+ */
+ public static final int ID_VERIFYTRANSFORMSINFOPROFILE = 1;
+
+ /**
+ * Gets the type of transformation information contained in this object.
+ *
+ * @return The type of transformation information, either
+ * <code>EXPLICIT_VERIFYTRANSFORMSINFOPROFILE</code> or
+ * <code>ID_VERIFYTRANSFORMSINFOPROFILE</code>.
+ */
+ public int getVerifyTransformsInfoProfileType();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java
new file mode 100644
index 000000000..ff19683da
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileExplicit.java
@@ -0,0 +1,25 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+/**
+ * Encapsulates explicit transformation information.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfileExplicit extends VerifyTransformsInfoProfile {
+ /**
+ * Gets the XMLDSig transforms element.
+ *
+ * @return The <code>List</code> of <code>Transform</code>s.
+ */
+ public List getTransforms();
+ /**
+ * Gets the transformation parameters.
+ *
+ * @return The transformation parameters.
+ */
+ public List getTransformParameters();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java
new file mode 100644
index 000000000..0df3664da
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyTransformsInfoProfileID.java
@@ -0,0 +1,18 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+/**
+ * Encapsulates transformation info id for signature verification.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyTransformsInfoProfileID extends VerifyTransformsInfoProfile {
+ /**
+ * Gets the identifier referencing the transformation info.
+ *
+ * @return The identifier referencing the transformation info.
+ */
+ public String getVerifyTransformsInfoProfileID();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java
new file mode 100644
index 000000000..eb71f500b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureRequest.java
@@ -0,0 +1,55 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.Date;
+import java.util.List;
+
+
+/**
+ * Object that encapsulates a request to verify an XML signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyXMLSignatureRequest {
+ /**
+ * Gets the date and time for which the signature verification has to
+ * be performed.
+ *
+ * @return Date and time for which the signature verification has
+ * to be performed.
+ */
+ public Date getDateTime();
+ /**
+ * Gets the signature to be verified.
+ *
+ * @return The signature to be verified.
+ */
+ public VerifySignatureInfo getSignatureInfo();
+ /**
+ * Gets the supplemental information.
+ *
+ * @return The supplemental information.
+ */
+ public List getSupplementProfiles();
+ /**
+ * Gets parameters for Security Layer signature verification.
+ *
+ * @return Parameters for Security Layer signature verification.
+ */
+ public SignatureManifestCheckParams getSignatureManifestCheckParams();
+ /**
+ * Checks, whether actually signed data shall be returned.
+ *
+ * @return <code>true</code>, if signed data will be returned,
+ * otherwise <code>false</code>.
+ */
+ public boolean getReturnHashInputData();
+ /**
+ * Gets the profile id of the set of trusted certificates to be used for
+ * signature verification.
+ *
+ * @return The id of the trusted certificates.
+ */
+ public String getTrustProfileId();
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java
new file mode 100644
index 000000000..14ac71e67
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/api/xmlverify/VerifyXMLSignatureResponse.java
@@ -0,0 +1,60 @@
+package at.gv.egovernment.moa.spss.api.xmlverify;
+
+import java.util.List;
+
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * Object that encapsulates the response on a request to verify an XML
+ * signature.
+ *
+ * @author Patrick Peck
+ * @author Stephan Grill
+ * @version $Id$
+ */
+public interface VerifyXMLSignatureResponse {
+ /**
+ * Gets a <code>SignerInfo</code> element according to XMLDSig.
+ *
+ * @return A <code>SignerInfo</code> element according to XMLDSig.
+ */
+ public SignerInfo getSignerInfo();
+ /**
+ * Gets datas signed by the signatory.
+ *
+ * @return The signed datas.
+ */
+ public List getHashInputDatas();
+ /**
+ * Gets source datas elements.
+ *
+ * @return The source datas elements.
+ */
+ public List getReferenceInputDatas();
+ /**
+ * Gets the result of the signature verification.
+ *
+ * @return The result of the signature verification.
+ */
+ public ReferencesCheckResult getSignatureCheck();
+ /**
+ * Gets the result of the signature manifest verification.
+ *
+ * @return The result of the signature manifest verification.
+ */
+ public ReferencesCheckResult getSignatureManifestCheck();
+ /**
+ * Gets XMLDSigManifestCheck elements.
+ *
+ * @return The XMLDSigManifestCheck elements.
+ */
+ public List getXMLDsigManifestChecks();
+ /**
+ * Gets the result of the certification verification.
+ *
+ * @return The result of the certificate verification.
+ */
+ public CheckResult getCertificateCheck();
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm
new file mode 100644
index 000000000..9b17bbf91
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/overview.htm
@@ -0,0 +1,155 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html>
+<head>
+</head>
+<body bgcolor="white">
+
+MOA SP/SS API documentation overview.
+
+
+<h2>Using the MOA SP/SS API</h2>
+
+<h3>Invoking the services</h3>
+In general, invoking the MOA SP/SS API involves the following steps:
+<ol>
+<li>Set the <code>moa.spss.server.configuration</code> system property to point
+to the main MOA SP/SS configuration file. This needs to be done only once per
+JVM instance. You may also call
+{@link at.gv.egovernment.moa.spss.api.Configurator#init} at this point to
+pre-initialize MOA SP/SS (if not, it is done automatically upon service
+invocation).</li>
+<li>Create an instance of the service to be used
+({@link at.gv.egovernment.moa.spss.api.SignatureCreationService} or
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService}),
+via its <code>getInstance()</code> method.</li>
+<li>Create an instance of the
+{@link at.gv.egovernment.moa.spss.api.SPSSFactory}, via its
+{@link at.gv.egovernment.moa.spss.api.SPSSFactory#getInstance} method.</li>
+<li>Use the <code>create...</code> methods of the <code>SPSSFactory</code> to
+create the desired {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} or
+{@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} object.
+</li>
+<li>Call one of the service methods:
+{@link at.gv.egovernment.moa.spss.api.SignatureCreationService#createXMLSignature(at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest) <code>createXMLSignature()</code>},
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyCMSSignature(at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest) <code>verifyCMSSignature()</code>} or
+{@link at.gv.egovernment.moa.spss.api.SignatureVerificationService#verifyXMLSignature(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest) <code>verifyXMLSignature()</code>}.
+</li>
+<li>Analyze the result of the service call, given as a
+{@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse} or
+{@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}.
+In case of an error, a {@link at.gv.egovernment.moa.spss.MOAException}
+is thrown by the service. Please be aware that errors during signature creation
+are reported as part of a <code>CreateXMLSignatureResponse</code>.
+</ol>
+
+<h3>Creating MOA SP/SS API objects</h3>
+<p>
+Invoking the MOA SP/SS API <code>Service</code> classes involves creating
+a <code>Request</code> object using the {@link at.gv.egovernment.moa.spss.api.SPSSFactory SPSSFactory}.
+Object creation using the <code>SPSSFactory</code> is always bottom-up, meaning
+that in order to create an object all of its components must have been created
+before.
+</p>
+<p>
+The names of the MOA SP/SS API classes have been chosen to correspond to the
+MOA SP/SS schema elements. The structure of the classes (i.e., their fields)
+also corresponds to the structure of the respective MOA SP/SS schema elements.
+However, a few classes escape this naming convention, mainly because the
+corresponding schema elements contain <code>xsd:choice</code> components:
+<ul>
+<li>The various <code>Profile</code> classes have subclasses called
+<code>ProfileID</code> and <code>ProfileExplicit</code>
+(e.g., {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID} and
+{@link at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit}),
+so that the profile can be given either as an ID (which is to be resolved from the
+MOA SP/SS configuration) or explicitly.</li>
+<li>The classes {@link at.gv.egovernment.moa.spss.api.common.Content},
+{@link at.gv.egovernment.moa.spss.api.cmsverify.CMSContent} and
+{@link at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter} have
+subclasses specifying the type of content they actually contain. E.g.,
+{@link at.gv.egovernment.moa.spss.api.common.ContentBinary} will contain
+a byte stream.</li>
+</ul>
+
+</p>
+<p>
+For clarity, the MOA SP/SS API classes have been organized in several packages
+listed in the following table:
+</p>
+
+<table border=1 cellspacing=0 cellpadding=5>
+<tr>
+ <td>Package</td><td>Purpose</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.xmlsign}</td>
+ <td>Components of the {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.cmsverify}</td>
+ <td>Components of the
+ {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.xmlverify}</td>
+ <td>Components of the
+ {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest} and
+ {@link at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse}</td>
+</tr>
+<tr>
+ <td>{@link at.gv.egovernment.moa.spss.api.common}</td>
+ <td>Common components used across the classes of the above packages</td>
+</tr>
+</table>
+
+<h3>Converting MOA SP/SS API objects to and from DOM trees</h3>
+The package {@link at.gv.egovernment.moa.spss.api.xmlbind} contains helper
+classes to:
+<ul>
+<li>Parse a DOM tree containing a <code>CreateXMLSignatureRequest</code>,
+<code>VerifyCMSSignatureRequest</code> or
+<code>VerifyCMSSignatureRequest</code> into its respective MOA SP/SS API object
+representation. For example, to parse a <code>CreateXMLSignatureRequest</code>
+DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser#parse(org.w3c.dom.Element) CreateXMLSignatureRequestParser.parse()}
+method can be used. <br />
+<b>Note:</b> The DOM tree of the request must be derived from a schema valid
+XML document. Otherwise, unexpected behaviour will almost certainly result.</li>
+<li>Build a <code>CreateXMLSignatureResponse</code>,
+<code>VerifyCMSSignatureResponse</code> or a
+<code>VerifyXMLSignatureResponse</code> DOM tree from the respective MOA SP/SS
+API object. For example, to build a <code>VerifyXMLSignatureResponse</code>
+DOM tree, the {@link at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder#build(at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse) VerifyXMLSignatureResponseBuilder.build()}
+can be used.<br />
+<b>Note:</b>The serialized DOM tree will be schema valid.
+</li>
+</ul>
+The DOM trees can easily be read from and written to XML byte streams using
+the methods in the {@link at.gv.egovernment.moa.util.DOMUtils} class.
+<br />
+
+<h3>Utilities and Logging</h3>
+<p> The packages {@link at.gv.egovernment.moa.util} and
+{@link at.gv.egovernment.moa.spss.util} contain utility classes developed for
+the MOA SP/SS implementation. Since the classes contained in these packages are
+tailored towards the MOA SP/SS implementation, they are far from being complete
+in the sense of providing a utility class library. Therefore, they may or may
+not prove useful in the context of your application. Their interfaces may also
+change in future releases.
+</p>
+
+<p>The package {@link at.gv.egovernment.moa.logging} contains classes for
+logging messages to the MOA SP/SS log hierarchy via the
+{@link at.gv.egovernment.moa.logging.Logger} class.
+</p>
+
+<h3>Related Documentation</h3>
+
+See also the <a href="../moa_spss/sp-anwendung.htm#API">API example</a> in the
+MOA SP/SS documentation.
+
+</body>
+</html> \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java
new file mode 100644
index 000000000..bd78012ef
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/CRLDistributionPoint.java
@@ -0,0 +1,165 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+
+import java.util.HashMap;
+import java.util.Map;
+import java.util.StringTokenizer;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class representing a CRL distribution point.
+ *
+ * @author Sven Aigner
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CRLDistributionPoint
+ extends DistributionPoint
+ implements iaik.pki.revocation.CRLDistributionPoint
+{
+
+ private static Map RC_MAPPING = new HashMap();
+
+ static {
+
+ // create the mapping between reason code strings and their integer values
+ RC_MAPPING.put(
+ "unused",
+ new Integer(iaik.asn1.structures.DistributionPoint.unused));
+ RC_MAPPING.put(
+ "keyCompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.keyCompromise));
+ RC_MAPPING.put(
+ "cACompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.cACompromise));
+ RC_MAPPING.put(
+ "affiliationChanged",
+ new Integer(iaik.asn1.structures.DistributionPoint.affiliationChanged));
+ RC_MAPPING.put(
+ "superseded",
+ new Integer(iaik.asn1.structures.DistributionPoint.superseded));
+ RC_MAPPING.put(
+ "cessationOfOperation",
+ new Integer(iaik.asn1.structures.DistributionPoint.cessationOfOperation));
+ RC_MAPPING.put(
+ "certificateHold",
+ new Integer(iaik.asn1.structures.DistributionPoint.certificateHold));
+ RC_MAPPING.put(
+ "privilegeWithdrawn",
+ new Integer(iaik.asn1.structures.DistributionPoint.privilegeWithdrawn));
+ RC_MAPPING.put(
+ "aACompromise",
+ new Integer(iaik.asn1.structures.DistributionPoint.aACompromise));
+ }
+
+ /**
+ * The name of the CA issuing the CRL referred to by this DP.
+ */
+ private String issuerName_;
+
+ /**
+ * The reason codes applicable for the distribution point.
+ */
+ private int reasonCodes;
+
+ /**
+ * Create a <code>CRLDistributionPoint</code>.
+ *
+ * @param issuerName The name of the CA issuing the CRL referred to by this DP.
+ *
+ * @param uri The URI of the distribution point.
+ *
+ * @param reasonCodeStr A list of reason codes (a space-separated enumeration).
+ */
+ public CRLDistributionPoint(String issuerName, String uri, String reasonCodeStr)
+ {
+ super(uri);
+ issuerName_ = issuerName;
+ this.reasonCodes = extractReasonCodes(reasonCodeStr);
+ }
+
+ /**
+ * @see DistributionPoint#getType()
+ */
+ public String getType()
+ {
+ return RevocationSourceTypes.CRL;
+ }
+
+ /**
+ * Convert a list of reason codes provided as a <code>String</code> to a
+ * binary representation.
+ *
+ * @param reasonCodeStr A <code>String</code> containing a blank-separated,
+ * textual representation of reason codes.
+ * @return int A binary representation of reason codes.
+ * @see iaik.asn1.structures.DistributionPoint
+ */
+ private int extractReasonCodes(String reasonCodeStr) {
+ int codes = 0;
+ StringTokenizer tokenizer = new StringTokenizer(reasonCodeStr);
+ String token;
+ Integer reasonCode;
+
+ while (tokenizer.hasMoreTokens()) {
+ token = tokenizer.nextToken();
+ reasonCode = (Integer) RC_MAPPING.get(token);
+ if (reasonCode != null) {
+ codes |= reasonCode.intValue();
+ } else {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.warn(
+ new LogMsg(msg.getMessage("config.07", new Object[] { token })));
+ }
+ }
+
+ // If reasonCodeStr is empty, set all possible reason codes
+ if (codes == 0) codes =
+ iaik.asn1.structures.DistributionPoint.unused |
+ iaik.asn1.structures.DistributionPoint.keyCompromise |
+ iaik.asn1.structures.DistributionPoint.cACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged |
+ iaik.asn1.structures.DistributionPoint.superseded |
+ iaik.asn1.structures.DistributionPoint.cessationOfOperation |
+ iaik.asn1.structures.DistributionPoint.certificateHold |
+ iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
+ iaik.asn1.structures.DistributionPoint.aACompromise;
+
+ return codes;
+ }
+
+ /**
+ * Return a binary representation of the reason codes of this distribution
+ * point.
+ *
+ * @return The binary representation of the reason codes.
+ */
+ public int getReasonCodes() {
+ return reasonCodes;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this distribution point.
+ *
+ * @return The <code>String</code> representation of this distribution point.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return "(DistributionPoint - "
+ + ("URI<" + getUri())
+ + ("> REASONCODES<" + getReasonCodes() + ">)");
+ }
+
+ /**
+ * @see iaik.pki.revocation.CRLDistributionPoint#getIssuerName()
+ */
+ public String getIssuerName()
+ {
+ return issuerName_;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java
new file mode 100644
index 000000000..4c2b3aea3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationException.java
@@ -0,0 +1,34 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+/**
+ * Exception signalling an error in the configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationException extends MOASystemException {
+
+ /**
+ * Create a <code>ConfigurationException</code>.
+ *
+ * @see at.gv.egovernment.moa.spss.MOAException#MOAException(String, Object[])
+ */
+ public ConfigurationException(String messageId, Object[] parameters) {
+ super(messageId, parameters);
+ }
+
+ /**
+ * Create a <code>ConfigurationException</code>.
+ * @see at.gv.egovernment.moa.spss.MOAException#MOAException(String, Object[], Throwable)
+ */
+ public ConfigurationException(
+ String messageId,
+ Object[] parameters,
+ Throwable wrapped) {
+
+ super(messageId, parameters, wrapped);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
new file mode 100644
index 000000000..14ceb71cd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationPartsBuilder.java
@@ -0,0 +1,1239 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.math.BigInteger;
+import java.net.MalformedURLException;
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import org.xml.sax.SAXException;
+
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class that builds configuration data from a DOM based representation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationPartsBuilder {
+
+ //
+ // XPath namespace prefix shortcuts
+ //
+
+ private static final String CONF = Constants.MOA_CONFIG_PREFIX + ":";
+ private static final String DSIG = Constants.DSIG_PREFIX + ":";
+
+ //
+ // chaining mode constants appearing in the configuration file
+ //
+
+ private static final String CM_CHAINING = "chaining";
+ private static final String CM_PKIX = "pkix";
+
+ //
+ // XPath expressions to select certain parts of the configuration
+ //
+
+ private static final String ROOT = "/" + CONF + "MOAConfiguration/";
+
+ private static final String DIGEST_METHOD_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "XMLDSig/"
+ + CONF + "DigestMethodAlgorithm";
+ private static final String C14N_ALGORITHM_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "XMLDSig/"
+ + CONF + "CanonicalizationAlgorithm";
+ private static final String HARDWARE_CRYPTO_MODULE_XPATH =
+ ROOT + CONF + "Common/"
+ + CONF + "HardwareCryptoModule";
+ private static final String HARDWARE_KEY_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyModules/"
+ + CONF + "HardwareKeyModule";
+ private static final String SOFTWARE_KEY_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyModules/"
+ + CONF + "SoftwareKeyModule";
+ private static final String KEYGROUP_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyGroup";
+ private static final String KEYGROUP_MAPPING_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "KeyGroupMapping";
+ private static final String ISSUER_XPATH =
+ DSIG + "X509IssuerName";
+ private static final String SERIAL_XPATH =
+ DSIG + "X509SerialNumber";
+ private static final String CERTSTORE_LOCATION_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "CertificateStore/"
+ + CONF + "DirectoryStore/"
+ + CONF + "Location";
+ private static final String AUTO_ADD_CERTIFICATES_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "AutoAddCertificates";
+ private static final String USE_AUTHORITY_INFO_ACCESS_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathConstruction/"
+ + CONF + "UseAuthorityInformationAccess";
+ private static final String CHAINING_MODES_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathValidation/"
+ + CONF + "ChainingMode";
+ private static final String CHAINING_MODES_DEFAULT_XPATH =
+ CHAINING_MODES_XPATH + "/"
+ + CONF + "DefaultMode";
+ private static final String TRUST_ANCHOR_XPATH =
+ CHAINING_MODES_XPATH + "/"
+ + CONF + "TrustAnchor";
+ private static final String TRUST_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "PathValidation/"
+ + CONF + "TrustProfile";
+ private static final String DISTRIBUTION_POINTS_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "DistributionPoint";
+ private static final String ENABLE_REVOCATION_CHECKING_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "EnableChecking";
+ private static final String MAX_REVOCATION_AGE_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "MaxRevocationAge";
+ private static final String REVOCATION_SERVICEORDER_XPATH_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "ServiceOrder/"
+ + CONF + "Service";
+ private static final String ENABLE_ARCHIVING_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "EnableArchiving";
+ private static final String CRL_ARCHIVE_DURATION_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "ArchiveDuration";
+ private static final String ACHIVE_JDBC_URL_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "Archive/"
+ + CONF + "DatabaseArchive/"
+ + CONF + "JDBCURL";
+ private static final String ACHIVE_JDBC_DRIVER_CLASS_ =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "CertificateValidation/"
+ + CONF + "RevocationChecking/"
+ + CONF + "Archiving/"
+ + CONF + "Archive/"
+ + CONF + "DatabaseArchive/"
+ + CONF + "JDBCDriverClassName";
+ private static final String CREATE_TRANSFORMS_INFO_PROFILE_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "CreateTransformsInfoProfile";
+ private static final String CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH =
+ ROOT + CONF + "SignatureCreation/"
+ + CONF + "CreateSignatureEnvironmentProfile";
+ private static final String VERIFY_TRANSFORMS_INFO_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "VerifyTransformsInfoProfile";
+ private static final String SUPPLEMENT_PROFILE_XPATH =
+ ROOT + CONF + "SignatureVerification/"
+ + CONF + "SupplementProfile";
+
+ //
+ // default values for configuration parameters
+ //
+
+ /** The accepted canonicalization algorithm URIs, as an array */
+ private static final String[] ACCEPTED_C14N_ALGORITHMS_ARRAY =
+ {
+ Constants.C14N_URI,
+ Constants.C14N_WITH_COMMENTS_URI,
+ Constants.EXC_C14N_URI,
+ Constants.EXC_C14N_WITH_COMMENTS_URI };
+
+ /** The accepted canonicalization algorithm URIs, as a Set */
+ private static final Set ACCEPTED_C14N_ALGORITHMS =
+ new HashSet(Arrays.asList(ACCEPTED_C14N_ALGORITHMS_ARRAY));
+
+ /** Default canonicalization algorithm, if none/illegal has been configured */
+ private static final String C14N_ALGORITHM_DEFAULT = Constants.C14N_URI;
+
+ /** The accepted digest method algorithm URIs, as an array */
+ private static final String[] ACCEPTED_DIGEST_ALGORITHMS_ARRAY =
+ { Constants.SHA1_URI };
+
+ /** The accepted digest method algorithm URIs, as a Set */
+ private static final Set ACCEPTED_DIGEST_ALGORITHMS =
+ new HashSet(Arrays.asList(ACCEPTED_DIGEST_ALGORITHMS_ARRAY));
+
+ /** Default digest algorithm URI, if none/illegal has been configured */
+ private static final String DIGEST_ALGORITHM_DEFAULT = Constants.SHA1_URI;
+
+ /** The root element of the MOA configuration */
+ private Element configElem;
+
+ /**
+ * The directory containing the underlying configuration file.
+ */
+ private File configRoot_;
+
+ /** Whether any warnings were encountered building the configuration. */
+ private List warnings = new ArrayList();
+
+ /**
+ * Create a new <code>ConfigurationPartsBuilder</code>.
+ *
+ * @param configElem The root element of the MOA configuration.
+ *
+ * @param configRoot The directory containing the underlying configuration file.
+ */
+ public ConfigurationPartsBuilder(Element configElem, File configRoot)
+ {
+ this.configElem = configElem;
+ configRoot_ = configRoot;
+ }
+
+ /**
+ * Returns the root element of the MOA configuration.
+ *
+ * @return The root element of the MOA configuration.
+ */
+ public Element getConfigElem() {
+ return configElem;
+ }
+
+ /**
+ * Returns the directory containing the underlying configuration file.
+ *
+ * @return the directory containing the underlying configuration file.
+ */
+ public File getConfigRoot()
+ {
+ return configRoot_;
+ }
+
+ /**
+ * Returns the warnings encountered during building the configuration.
+ *
+ * @return A <code>List</code> of <code>String</code>s, containing the
+ * warning messages.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Returns the digest method algorithm name.
+ *
+ * @return The digest method algorithm name from the configuration.
+ */
+ public String getDigestMethodAlgorithmName()
+ {
+ String digestMethod = getElementValue(getConfigElem(), DIGEST_METHOD_XPATH, null);
+
+ if (digestMethod == null || !ACCEPTED_DIGEST_ALGORITHMS.contains(digestMethod))
+ {
+ info(
+ "config.23",
+ new Object[] { "DigestMethodAlgorithm", DIGEST_ALGORITHM_DEFAULT });
+ digestMethod = DIGEST_ALGORITHM_DEFAULT;
+ }
+
+ return digestMethod;
+ }
+
+ /**
+ * Returns the canonicalization algorithm name.
+ *
+ * @return The canonicalization algorithm name from the configuration.
+ */
+ public String getCanonicalizationAlgorithmName()
+ {
+ String c14nAlgorithm = getElementValue(getConfigElem(), C14N_ALGORITHM_XPATH, null);
+
+ if (c14nAlgorithm == null || !ACCEPTED_C14N_ALGORITHMS.contains(c14nAlgorithm))
+ {
+ info(
+ "config.23",
+ new Object[] { "CanonicalizationAlgorithm", C14N_ALGORITHM_DEFAULT });
+ c14nAlgorithm = C14N_ALGORITHM_DEFAULT;
+ }
+
+ return c14nAlgorithm;
+ }
+
+ /**
+ * Build the configured hardware crypto modules.
+ *
+ * @return The hardware crypto modules from the configuration.
+ */
+ public List buildHardwareCryptoModules()
+ {
+ List modules = new ArrayList();
+ NodeIterator modIter = XPathUtils.selectNodeIterator(
+ getConfigElem(),
+ HARDWARE_CRYPTO_MODULE_XPATH);
+
+ Element modElem;
+ while ((modElem = (Element) modIter.nextNode()) != null) {
+ String name = getElementValue(modElem, CONF + "Name", null);
+ String slotId = getElementValue(modElem, CONF + "SlotId", null);
+ String userPIN = getElementValue(modElem, CONF + "UserPIN", null);
+ HardwareCryptoModule module = new HardwareCryptoModule(name, slotId, userPIN);
+ modules.add(module);
+ }
+
+ return modules;
+ }
+
+ /**
+ * Build the configured hardware keys.
+ *
+ * @param keyModules The keyModules that the configuration already knows about. To
+ * prevent multiple key modules with the same ID.
+ * @return The hardware keys contained in the configuration.
+ */
+ public List buildHardwareKeyModules(List keyModules)
+ {
+ Set existingIds = toIdSet(keyModules);
+ List hardwareKeys = new ArrayList();
+ NodeIterator hkIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), HARDWARE_KEY_XPATH);
+ Element keyElem;
+
+ while ((keyElem = (Element) hkIter.nextNode()) != null)
+ {
+ String id = getElementValue(keyElem, CONF + "Id", null);
+ String name = getElementValue(keyElem, CONF + "Name", null);
+ String slotId = getElementValue(keyElem, CONF + "SlotId", null);
+ String userPIN = getElementValue(keyElem, CONF + "UserPIN", null);
+
+ if (existingIds.contains(id))
+ {
+ warn(
+ "config.04",
+ new Object[] { "Hardware- oder SoftwareKeyModule", id });
+ }
+ else
+ {
+ KeyModule key = new HardwareKeyModule(id, name, slotId, userPIN);
+ hardwareKeys.add(key);
+ existingIds.add(id);
+ }
+
+ }
+
+ return hardwareKeys;
+ }
+
+ /**
+ * Build the configured software keys.
+ *
+ * @param keyModules The keyModules that the configuration already knows about. To
+ * prevent multiple key modules with the same ID.
+ *
+ * @return The software keys contained in the configuration.
+ */
+ public List buildSoftwareKeyModules(List keyModules)
+ {
+ Set existingIds = toIdSet(keyModules);
+ List softwareKeys = new ArrayList();
+ NodeIterator skIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), SOFTWARE_KEY_XPATH);
+
+ Element keyElem;
+ while ((keyElem = (Element) skIter.nextNode()) != null)
+ {
+ String id = getElementValue(keyElem, CONF + "Id", null);
+ String fileName = getElementValue(keyElem, CONF + "FileName", null);
+ String passWord = getElementValue(keyElem, CONF + "Password", null);
+
+ if (existingIds.contains(id))
+ {
+ warn(
+ "config.04",
+ new Object[] { "Hardware- oder SoftwareKeyModule", id });
+ }
+ else
+ {
+ File keyFile;
+ KeyModule key;
+
+ // make keyFile absolute
+ keyFile = new File(fileName);
+ if (!keyFile.isAbsolute()) {
+ keyFile = new File(configRoot_, fileName);
+ }
+
+ // check for existence
+ if (!keyFile.exists() || keyFile.isDirectory()) {
+ warn("config.25", new Object[] { id, keyFile.getAbsolutePath()});
+ } else {
+ // create a new key module
+ key = new SoftwareKeyModule(id, keyFile.getAbsolutePath(), passWord);
+ softwareKeys.add(key);
+ existingIds.add(id);
+ }
+ }
+ }
+
+ return softwareKeys;
+ }
+
+ /**
+ * Build the key group configuration.
+ *
+ * @param keyModules The <code>KeyModule</code>s that the configuration
+ * knows about. Used to check for errors in the configuration.
+ * @return The mapping between key group IDs and key groups.
+ */
+ public Map buildKeyGroups(List keyModules)
+ {
+ Set keyModuleIds = toIdSet(keyModules);
+ Map keyGroups = new HashMap();
+ NodeIterator kgIter;
+ Element keyGroupElem;
+
+ // select all KeyGroup elements and build the KeyGroup objects from them
+ kgIter = XPathUtils.selectNodeIterator(getConfigElem(), KEYGROUP_XPATH);
+ while ((keyGroupElem = (Element) kgIter.nextNode()) != null)
+ {
+ String keyGroupId = getElementValue(keyGroupElem, CONF + "Id", null);
+ Set keyGroupEntries =
+ buildKeyGroupEntries(keyGroupId, keyModuleIds, keyGroupElem);
+ KeyGroup keyGroup = new KeyGroup(keyGroupId, keyGroupEntries);
+
+ if (keyGroups.containsKey(keyGroupId))
+ {
+ warn("config.04", new Object[] { "KeyGroup", keyGroupId });
+ }
+ else
+ {
+ keyGroups.put(keyGroup.getId(), keyGroup);
+ }
+ }
+
+ return keyGroups;
+ }
+
+ /**
+ * Return the set of IDs contained in the given <code>KeyModule</code>s.
+ *
+ * @param keyModules The <code>KeyModule</code>s from which to extract the
+ * IDs.
+ * @return The IDs from the given <code>KeyModule</code>s.
+ */
+ private Set toIdSet(List keyModules) {
+ Set ids = new HashSet();
+ Iterator iter;
+
+ for (iter = keyModules.iterator(); iter.hasNext();) {
+ KeyModule keyModule = (KeyModule) iter.next();
+ ids.add(keyModule.getId());
+ }
+
+ return ids;
+ }
+
+ /**
+ * Build the key entries belonging to a key group.
+ *
+ * @param keyGroupId The ID of the key group we are building here. Passed
+ * for logging purposes.
+ * @param keyModuleIds The IDs of the <code>HardwareKeyModule</code>s and
+ * <code>SoftwareKeyModule</code>s that exist in the configuration.
+ * @param keyGroupElem The <code>KeyGroup</code> DOM element to parse.
+ * @return A <code>Set</code> of <code>KeyGroupEntry</code> objects.
+ */
+ private Set buildKeyGroupEntries(
+ String keyGroupId,
+ Set keyModuleIds,
+ Element keyGroupElem) {
+
+ Set entries = new HashSet();
+ NodeIterator keyEntryIter;
+ Element keyEntryElem;
+
+ // select all Key elements and put them into the Map
+ keyEntryIter = XPathUtils.selectNodeIterator(keyGroupElem, CONF + "Key");
+ while ((keyEntryElem = (Element) keyEntryIter.nextNode()) != null)
+ {
+ String keyModuleId = getElementValue(keyEntryElem, CONF + "KeyModuleId", "");
+ Element keyCertElem = (Element) XPathUtils.selectSingleNode(keyEntryElem, CONF + "KeyCertIssuerSerial");
+ IssuerAndSerial issuerSerial = buildIssuerAndSerial(keyCertElem);
+
+ if (!keyModuleIds.contains(keyModuleId)) {
+ warn("config.26", new Object[] { keyGroupId, keyModuleId });
+ } else if (issuerSerial != null) {
+ KeyGroupEntry entry = new KeyGroupEntry(keyModuleId, issuerSerial);
+ entries.add(entry);
+ }
+ }
+ return entries;
+ }
+
+ /**
+ * Build the key group mapping.
+ *
+ * @param keyGroups The available key groups.
+ * @param anonymous The <code>IssuerAndSerial</code> to be used for key group
+ * mappings not protected by a certificate.
+ * @return The key group mapping.
+ */
+ public Map buildKeyGroupMappings(Map keyGroups, IssuerAndSerial anonymous) {
+ Map mappings = new HashMap();
+ NodeIterator mappingIter;
+ Element mappingElem;
+
+ // select all KeyGroupMapping elements
+ mappingIter =
+ XPathUtils.selectNodeIterator(getConfigElem(), KEYGROUP_MAPPING_XPATH);
+
+ // build the mapping for each KeyGroupMapping element
+ while ((mappingElem = (Element) mappingIter.nextNode()) != null)
+ {
+ Element issuerSerialElem = (Element) XPathUtils.selectSingleNode(mappingElem, CONF + "CustomerId");
+
+ // build the IssuerAndSerial who has access to the key groups
+ IssuerAndSerial issuerAndSerial;
+ if (issuerSerialElem != null)
+ {
+ issuerAndSerial = buildIssuerAndSerial(issuerSerialElem);
+ }
+ else
+ {
+ // IssuerSerial element: the keygroup is generally available
+ issuerAndSerial = anonymous;
+ }
+
+ // add the key groups to the mappings
+ if (issuerAndSerial != null) {
+ Map groups = (Map) mappings.get(issuerAndSerial);
+ NodeIterator keyGroupIter;
+ Element keyGroupElem;
+
+ if (groups == null)
+ {
+ // no mapping exist -> build one
+ groups = new HashMap();
+ mappings.put(issuerAndSerial, groups);
+ }
+
+ // select the available key groups and add them to the mapping
+ keyGroupIter = XPathUtils.selectNodeIterator(mappingElem, CONF + "KeyGroupId");
+ while ((keyGroupElem = (Element) keyGroupIter.nextNode()) != null)
+ {
+ String keyGroupId = getElementValue(keyGroupElem, ".", null);
+ KeyGroup keyGroup = (KeyGroup) keyGroups.get(keyGroupId);
+
+ if (keyGroup != null)
+ {
+ groups.put(keyGroupId, keyGroup);
+ } else
+ {
+ warn("config.00", new Object[] { keyGroupId });
+ }
+ }
+ }
+ }
+
+ return mappings;
+ }
+
+ /**
+ * Returns the default chaining mode from the configuration.
+ *
+ * @return The default chaining mode.
+ */
+ public String getDefaultChainingMode()
+ {
+ String defaultChaining = getElementValue(
+ getConfigElem(),
+ CHAINING_MODES_DEFAULT_XPATH,
+ CM_PKIX);
+
+ return translateChainingMode(defaultChaining);
+
+ }
+
+ /**
+ * Build the chaining modes for all configured trust anchors.
+ *
+ * @return The mapping from trust anchors to chaining modes.
+ */
+ public Map buildChainingModes()
+ {
+ Map chainingModes = new HashMap();
+ NodeIterator trustIter = XPathUtils.selectNodeIterator(getConfigElem(), TRUST_ANCHOR_XPATH);
+
+ Element trustAnchorElem;
+ while ((trustAnchorElem = (Element) trustIter.nextNode()) != null)
+ {
+ IssuerAndSerial issuerAndSerial = buildIssuerAndSerial(
+ (Element)XPathUtils.selectSingleNode(trustAnchorElem, CONF + "Identification"));
+ String mode = getElementValue(trustAnchorElem, CONF + "Mode", null);
+
+ if (issuerAndSerial != null)
+ {
+ chainingModes.put(issuerAndSerial, translateChainingMode(mode));
+ }
+ }
+
+ return chainingModes;
+ }
+
+ /**
+ * Build an <code>IssuerAndSerial</code> from the DOM representation.
+ *
+ * @param root The root element (being of type <code>dsig:
+ * X509IssuerSerialType</code>.
+ * @return The issuer and serial number contained in the <code>root</code>
+ * element or <code>null</code> if could not be built for any reason.
+ */
+ private IssuerAndSerial buildIssuerAndSerial(Element root) {
+ String issuer = getElementValue(root, ISSUER_XPATH, null);
+ String serial = getElementValue(root, SERIAL_XPATH, null);
+
+ if (issuer != null && serial != null) {
+ try {
+ RFC2253NameParser nameParser = new RFC2253NameParser(issuer);
+ Principal issuerDN = nameParser.parse();
+
+ return new IssuerAndSerial(issuerDN, new BigInteger(serial));
+ } catch (RFC2253NameParserException e) {
+ warn("config.16", new Object[] { issuer, serial }, e);
+ return null;
+ } catch (NumberFormatException e) {
+ warn("config.16", new Object[] { issuer, serial }, e);
+ return null;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Translate the chaining mode from the configuration file to one used in the
+ * IAIK MOA API.
+ *
+ * @param chainingMode The chaining mode from the configuration.
+ * @return The chaining mode as provided by the <code>ChainingModes</code>
+ * interface.
+ * @see iaik.pki.pathvalidation.ChainingModes
+ */
+ private String translateChainingMode(String chainingMode) {
+ if (chainingMode.equals(CM_CHAINING)) {
+ return ChainingModes.CHAIN_MODE;
+ } else if (chainingMode.equals(CM_PKIX)) {
+ return ChainingModes.PKIX_MODE;
+ } else {
+ return ChainingModes.PKIX_MODE;
+ }
+ }
+
+ /**
+ * Build the distribution points mapping.
+ *
+ * @return The mapping from certificate authorities to distribution points.
+ */
+ public Map buildDistributionPoints()
+ {
+ Map dPs = new HashMap();
+ NodeIterator dPIter;
+ Element dPElem;
+
+ // select all DistributionPoint elements
+ dPIter = XPathUtils.selectNodeIterator(getConfigElem(), DISTRIBUTION_POINTS_XPATH);
+
+ // build the mapping of CA name to distribution points
+ while ((dPElem = (Element) dPIter.nextNode()) != null) {
+ String caIssuerDNText = getElementValue(dPElem, CONF + "CAIssuerDN", "");
+ RFC2253NameParser nameParser = new RFC2253NameParser(caIssuerDNText);
+ NodeIterator cRLDPIter = XPathUtils.selectNodeIterator(dPElem, CONF + "CRLDP");
+ NodeIterator oCSPDPPIter = XPathUtils.selectNodeIterator(dPElem, CONF + "OCSPDP");
+
+ try
+ {
+ String caIssuerDN = nameParser.parse().getName();
+
+ // check, if a mapping exists or make a new mapping
+ Set dPsForCA = (Set) dPs.get(caIssuerDN);
+ if (dPsForCA == null)
+ {
+ dPsForCA = new HashSet();
+ dPs.put(caIssuerDN, dPsForCA);
+ }
+
+ // add the CRL distribution points of this CA to the set
+ Element cRLDPElem;
+ while ((cRLDPElem = (Element) cRLDPIter.nextNode()) != null)
+ {
+ CRLDistributionPoint cRLDP = (CRLDistributionPoint) buildDistributionPoint(cRLDPElem, caIssuerDN);
+ dPsForCA.add(cRLDP);
+ }
+
+ // add the OCSP distribution points of this CA to the set
+ Element oCSPPElem;
+ while ((oCSPPElem = (Element) oCSPDPPIter.nextNode()) != null)
+ {
+ OCSPDistributionPoint oCSPDP = (OCSPDistributionPoint) buildDistributionPoint(oCSPPElem, null);
+ dPsForCA.add(oCSPDP);
+ }
+}
+ catch (RFC2253NameParserException e)
+ {
+ warn("config.13", new Object[] { caIssuerDNText }, e);
+ }
+
+ }
+
+ return dPs;
+ }
+
+ /**
+ * Build a distribution point from the DOM representation.
+ *
+ * @param dpElem The root element of the distribution point.
+ *
+ * @param issuerName The name of the CA issuing the CRL referred to by this DP, or <code>null</code>
+ * if this DP refers to an OCSP responder.
+ *
+ * @return The distribution point.
+ */
+ private DistributionPoint buildDistributionPoint(Element dpElem, String issuerName)
+ {
+ String uri = getElementValue(dpElem, CONF + "Location", null);
+
+ if ("CRLDP".equals(dpElem.getLocalName()))
+ {
+ NodeIterator reasonCodesIter = XPathUtils.selectNodeIterator(dpElem, CONF + "ReasonCode");
+ Element reasonCodeElem;
+ StringBuffer reasonCodesSB = new StringBuffer();
+ while ((reasonCodeElem = (Element)reasonCodesIter.nextNode()) != null)
+ {
+ if (reasonCodesSB.length() > 0) reasonCodesSB.append(" ");
+ reasonCodesSB.append(getElementValue(reasonCodeElem, ".", "").trim());
+ }
+ return new CRLDistributionPoint(issuerName, uri, reasonCodesSB.toString());
+ }
+ else
+ {
+ return new OCSPDistributionPoint(uri);
+ }
+ }
+
+ /**
+ * Return the CRL archive duration.
+ *
+ * @return The value of the CRL archive duration setting from the configuration, or <code>0</code> if
+ * no value is set in the configuration.
+ */
+ public int getRevocationArchiveDuration()
+ {
+ String archiveDuration = getElementValue(getConfigElem(), CRL_ARCHIVE_DURATION_XPATH, null);
+ try
+ {
+ return Integer.parseInt(archiveDuration);
+ }
+ catch (NumberFormatException e)
+ {
+ warn("config.01", null);
+ return 365;
+ }
+ }
+
+ /**
+ * Build the <code>CreateTransformsInfoProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildCreateTransformsInfoProfiles()
+ {
+ return loadProfiles(CREATE_TRANSFORMS_INFO_PROFILE_XPATH, "CreateTransformsInfoProfile");
+ }
+
+ /**
+ * Build the <code>CreateSignatureEnvironmentProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildCreateSignatureEnvironmentProfiles()
+ {
+ return loadProfiles(CREATE_SIGNATURE_ENVIRONMENT_PROFILE_XPATH, "CreateSignatureEnvironmentProfile");
+ }
+
+ /**
+ * Build the <code>VerifyTransformsInfoProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildVerifyTransformsInfoProfiles()
+ {
+ return loadProfiles(VERIFY_TRANSFORMS_INFO_PROFILE_XPATH, "VerifyTransformsInfoProfile");
+ }
+
+ /**
+ * Build the <code>SupplementProfile</code>s.
+ *
+ * @return The mapping from profile ID to profile.
+ */
+ public Map buildSupplementProfiles()
+ {
+ return loadProfiles(SUPPLEMENT_PROFILE_XPATH, "SupplementProfile");
+ }
+
+ /**
+ * Load a profile mapping.
+ *
+ * @param xpath The XPath to select the profiles from the configuration.
+ *
+ * @param profileRoot The name of the profile root element.
+ *
+ * @return Map The profile ID to profile mapping.
+ */
+ private Map loadProfiles(String xpath, String profileRoot)
+ {
+ Map profiles = new HashMap();
+ NodeIterator profileIter = XPathUtils.selectNodeIterator(getConfigElem(), xpath);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileIter.nextNode()) != null)
+ {
+ String id = getElementValue(profileElem, CONF + "Id", null);
+ String fileName = getElementValue(profileElem, CONF + "Location", null);
+
+ if (profiles.containsKey(id))
+ {
+ warn("config.04", new Object[] { profileRoot, id });
+ }
+ else
+ {
+ try
+ {
+ File profileFile = new File(fileName);
+
+ // make profileFile absolute
+ if (!profileFile.isAbsolute()) profileFile = new File(configRoot_, fileName);
+
+ // load the profile
+ info("config.22", new Object[] { profileRoot, id, profileFile.getAbsoluteFile()});
+ Element profile = loadProfile(profileFile);
+
+ if (profile.getTagName().equals(profileRoot))
+ {
+ profiles.put(id, profile);
+ }
+ else
+ {
+ warn("config.02", new Object[] { profileRoot, id, fileName });
+ }
+ } catch (ConfigurationException e) {
+ warn("config.03", new Object[] { profileRoot, id });
+ }
+ }
+ }
+
+ return profiles;
+ }
+
+ /**
+ * Load a profile from a file.
+ *
+ * @param root The absolute directory path of the main configuration file.
+ * @param profileFile The file containing the profile.
+ * @return The profile in its DOM representation.
+ * @throws ConfigurationException An error occurred loading the profile.
+ */
+ private Element loadProfile(File profileFile) throws ConfigurationException {
+
+ Element profile;
+
+ try {
+ profile = parseXml(new FileInputStream(profileFile));
+ } catch (Exception e) {
+ throw new ConfigurationException("config.12", null, e);
+ }
+
+ return profile;
+ }
+
+ /**
+ * Bulid the trust profile mapping.
+ *
+ * @return The profile ID to profile mapping.
+ */
+ public Map buildTrustProfiles()
+ {
+ Map trustProfiles = new HashMap();
+ NodeIterator profileIter = XPathUtils.selectNodeIterator(getConfigElem(), TRUST_PROFILE_XPATH);
+ Element profileElem;
+
+ while ((profileElem = (Element) profileIter.nextNode()) != null)
+ {
+ String id = getElementValue(profileElem, CONF + "Id", null);
+ String trustAnchorsLocStr = getElementValue(profileElem, CONF + "TrustAnchorsLocation", null);
+ String signerCertsLocStr = getElementValue(profileElem, CONF + "SignerCertsLocation", null);
+
+ URI trustAnchorsLocURI = null;
+ try
+ {
+ trustAnchorsLocURI = new URI(trustAnchorsLocStr);
+ if (!trustAnchorsLocURI.isAbsolute()) { // make it absolute to the config file
+ trustAnchorsLocURI = new URI(configRoot_.toURL() + trustAnchorsLocStr);
+ }
+ }
+ catch (URIException e) {
+ warn("config.14", new Object[] { "uri", id, trustAnchorsLocStr }, e);
+ continue;
+ }
+ catch (MalformedURLException e)
+ {
+ warn("config.15", new Object[] {id}, e);
+ continue;
+ }
+
+ File profileDir = new File(trustAnchorsLocURI.getPath());
+ if (!profileDir.exists() || !profileDir.isDirectory()) {
+ warn("config.27", new Object[] { "uri", id });
+ continue;
+ }
+
+ if (trustProfiles.containsKey(id)) {
+ warn("config.04", new Object[] { "TrustProfile", id });
+ continue;
+ }
+
+ URI signerCertsLocURI = null;
+ if (signerCertsLocStr != null && !"".equals(signerCertsLocStr))
+ {
+ try
+ {
+ signerCertsLocURI = new URI(signerCertsLocStr);
+ if (!signerCertsLocURI.isAbsolute()) signerCertsLocURI = new URI(configRoot_.toURL() + signerCertsLocStr);
+
+ File signerCertsDir = new File(signerCertsLocURI.getPath());
+ if (!signerCertsDir.exists() || !signerCertsDir.isDirectory()) {
+ warn("config.27", new Object[] { "signerCertsUri", id });
+ continue;
+ }
+ }
+ catch (URIException e) {
+ warn("config.14", new Object[] { "signerCertsUri", id, trustAnchorsLocStr }, e);
+ continue;
+ }
+ catch (MalformedURLException e) {
+ warn("config.15", new Object[] {id}, e);
+ continue;
+ }
+ }
+
+ signerCertsLocStr = (signerCertsLocURI != null) ? signerCertsLocURI.toString() : null;
+ TrustProfile profile = new TrustProfile(id, trustAnchorsLocURI.toString(), signerCertsLocStr);
+ trustProfiles.put(id, profile);
+ }
+
+ return trustProfiles;
+ }
+
+ /**
+ * Returns the location of the certificate store.
+ *
+ * @return the location of the certificate store.
+ */
+ public String getCertStoreLocation()
+ {
+ String certStoreLocStr = getElementValue(getConfigElem(), CERTSTORE_LOCATION_XPATH, null);
+ File certStoreLocFile;
+
+ // No value specified in configuration file: Set it to a reasonable (absolute) default
+ if (certStoreLocStr == null)
+ return new File(configRoot_, "certstore").getAbsolutePath();
+
+ // Make cert store location an absolute value
+ certStoreLocFile = new File(certStoreLocStr);
+ if (!certStoreLocFile.isAbsolute())
+ {
+ certStoreLocFile = new File(configRoot_, certStoreLocStr);
+ }
+
+ // Check if cert store location exists, eventually try to create it
+ if (!certStoreLocFile.isDirectory())
+ {
+ boolean created = false;
+ try
+ {
+ created = certStoreLocFile.mkdirs();
+ }
+ finally
+ {
+ if (!created)
+ {
+ warn("config.32", new Object[] { certStoreLocFile.getAbsolutePath() });
+ }
+ }
+ }
+
+ return certStoreLocFile.getAbsolutePath();
+ }
+
+ //
+ // various utility methods
+ //
+
+ /**
+ * Parse a configuration XML file.
+ *
+ * @param inputStream The stream from which to read the XML data.
+ * @return The DOM representation of the XML data.
+ * @throws ParserConfigurationException XML parser not configured properly.
+ * @throws SAXException An error parsing the XML file.
+ * @throws IOException An error reading the stream.
+ */
+ private static Element parseXml(InputStream inputStream)
+ throws ParserConfigurationException, SAXException, IOException {
+ return DOMUtils
+ .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null)
+ .getDocumentElement();
+ }
+
+ /**
+ * Return the value of an element located by an XPath.
+ *
+ * @param root The root element from which to evaluate the <code>xpath</code>.
+ * @param xpath The XPath pointing to the element.
+ * @param def The default value, if no element can be found with the given
+ * <code>xpath</code>.
+ * @return The element value or <code>def</code>, if the element cannot be
+ * found.
+ */
+ private String getElementValue(Element root, String xpath, String def) {
+
+ Element elem = (Element) XPathUtils.selectSingleNode(root, xpath);
+ return elem != null ? DOMUtils.getText(elem) : def;
+ }
+
+ /**
+ * Return the value of an attribute located by an XPath.
+ *
+ * @param root The root element from which to evaluate the <code>xpath</code>.
+ * @param xpath The XPath pointing to the attribute.
+ * @param def The default value, if no attribute can be found with the given
+ * <code>xpath</code>.
+ * @return The element value or <code>def</code>, if the attribute cannot be
+ * found.
+ */
+ private String getAttributeValue(Element root, String xpath, String def) {
+ Attr attr = (Attr) XPathUtils.selectSingleNode(root, xpath);
+ return attr != null ? attr.getValue() : def;
+ }
+
+ /**
+ * Log an info message.
+ *
+ * @param messageId The message ID.
+ * @param parameters Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @param t An exception being the cause of the warning.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args, Throwable t) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt), t);
+ warnings.add(txt);
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ *
+ * @return whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationArchiving()
+ {
+ String enableArchiving = getElementValue(getConfigElem(), ENABLE_ARCHIVING_XPATH, null);
+ return Boolean.valueOf(enableArchiving).booleanValue();
+ }
+
+ /**
+ * Returns the JDBC URL for the revocation archive database.
+ *
+ * @return the JDBC URL for the revocation archive database, or <code>null</code, if the corresponding
+ * parameter is not set in the configuration.
+ */
+ public String getRevocationArchiveJDBCURL()
+ {
+ String jDBCURL = getElementValue(getConfigElem(), ACHIVE_JDBC_URL_, null);
+ return jDBCURL;
+ }
+
+ /**
+ * Returns the JDBC driver class name for the revocation archive database.
+ *
+ * @return the JDBC driver class name for the revocation archive database, or <code>null</code,
+ * if the corresponding parameter is not set in the configuration.
+ */
+ public String getRevocationArchiveJDBCDriverClass()
+ {
+ String jDBCDriverClass = getElementValue(getConfigElem(), ACHIVE_JDBC_DRIVER_CLASS_, null);
+ return jDBCDriverClass;
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationChecking()
+ {
+ String enableChecking = getElementValue(getConfigElem(), ENABLE_REVOCATION_CHECKING_XPATH_, null);
+ return Boolean.valueOf(enableChecking).booleanValue();
+ }
+
+ /**
+ * Returns the maximum age of a revocation information for considering it
+ * still as valid.
+ *
+ * @return the maximum age of a revocation information for considering it
+ * still as valid.
+ */
+ public long getMaxRevocationAge()
+ {
+ String maxRevocationAge = getElementValue(getConfigElem(), MAX_REVOCATION_AGE_XPATH_, null);
+ if (maxRevocationAge == null) return 0;
+ return Long.valueOf(maxRevocationAge).longValue();
+ }
+
+ /**
+ * Returns the service order for revocation checking.
+ *
+ * @return the service order for revocation checking. Valid array entries are
+ * {@link RevocationSourceTypes#OCSP} and {@link RevocationSourceTypes#CRL}.
+ * An empty array will be returned if no service order is specified in the
+ * configuration.
+ */
+ public String[] getServiceOrder()
+ {
+ ArrayList list = new ArrayList();
+ NodeIterator serviceIter = XPathUtils.selectNodeIterator(getConfigElem(), REVOCATION_SERVICEORDER_XPATH_);
+ Element currentServiceNode;
+ while ((currentServiceNode = (Element)serviceIter.nextNode()) != null)
+ {
+ list.add(getElementValue(currentServiceNode, ".", null));
+ }
+ Object[] serviceOrder = list.toArray();
+ String[] returnValue = new String[serviceOrder.length];
+ for (int i = 0; i < serviceOrder.length; i++)
+ {
+ if (((String)serviceOrder[i]).equalsIgnoreCase(RevocationSourceTypes.CRL)) {
+ returnValue[i] = RevocationSourceTypes.CRL;
+ } else if (((String)serviceOrder[i]).equalsIgnoreCase(RevocationSourceTypes.OCSP)) {
+ returnValue[i] = RevocationSourceTypes.OCSP;
+ }
+
+ }
+ return returnValue;
+ }
+
+ /**
+ * Returns whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ *
+ * @return whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ public boolean getUseAuthorityInfoAccess()
+ {
+ String useAIA = getElementValue(getConfigElem(), USE_AUTHORITY_INFO_ACCESS_XPATH_, null);
+ return Boolean.valueOf(useAIA).booleanValue();
+ }
+
+ /**
+ * Returns whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ *
+ * @return whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ public boolean getAutoAddCertificates()
+ {
+ String autoAdd = getElementValue(getConfigElem(), AUTO_ADD_CERTIFICATES_XPATH_, null);
+ return Boolean.valueOf(autoAdd).booleanValue();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
new file mode 100644
index 000000000..57f06326a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/ConfigurationProvider.java
@@ -0,0 +1,689 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.math.BigInteger;
+import java.net.URL;
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class providing access to the MOA configuration data.
+ *
+ * <p>Configuration data is read from an XML file, whose location is given by
+ * the <code>moa.spss.server.configuration</code> system property.</p>
+ * <p>This class implements the Singleton pattern. The <code>reload()</code>
+ * method can be used to update the configuration data. Therefore, it is not
+ * guaranteed that consecutive calls to <code>getInstance()</code> will return
+ * the same <code>ConfigurationProvider</code> all the time. During the
+ * processing of a web service request, the current
+ * <code>TransactionContext</code> should be used to obtain the
+ * <code>ConfigurationProvider</code> local to that request.</p>
+ *
+ * @author Patrick Peck
+ * @author Sven Aigner
+ * @version $Id$
+ */
+public class ConfigurationProvider
+{
+ /**
+ * The name of the system property which contains the file name of the
+ * configuration file.
+ */
+ public static final String CONFIG_PROPERTY_NAME =
+ "moa.spss.server.configuration";
+
+ /**
+ * A fake <code>IssuerAndSerial</code> object for storing KeyGroup information
+ * accessible by all clients.
+ */
+ private static final IssuerAndSerial ANONYMOUS_ISSUER_SERIAL =
+ new IssuerAndSerial(new Name(), new BigInteger("0"));
+
+ /** Singleton instance. <code>null</code>, if none has been created. */
+ private static ConfigurationProvider instance;
+
+ //
+ // configuration data
+ //
+
+ /** The warnings generated when building the configuration. */
+ private List warnings = new ArrayList();
+
+ /** The default digest method algorithm name */
+ private String digestMethodAlgorithmName;
+
+ /** The default canonicalization algorithm name */
+ private String canonicalizationAlgorithmName;
+
+ /**
+ * A <code>List</code> of <code>HardwareCryptoModule</code> objects for
+ * configuring hardware modules.
+ */
+ private List hardwareCryptoModules;
+
+ /**
+ * A <code>List</code> of <code>HardwareKey</code> objects containing the
+ * configuration data for hardware keys.
+ */
+ private List hardwareKeyModules;
+
+ /**
+ * A <code>List</code> of <code>SoftwareKey</code> objects containing the
+ * configuration data for software keys.
+ */
+ private List softwareKeyModules;
+
+ /**
+ * A <code>Map</code> which contains a KeyGroupId (a <code>String</code>) to
+ * KeyGroup mapping.
+ */
+ private Map keyGroups;
+
+ /**
+ * A <code>Map</code> which contains the <code>IssuerAndSerial</code> to
+ * <code>KeyGroup</code> mapping.
+ */
+ private Map keyGroupMappings;
+
+ /** The default chaining mode. */
+ private String defaultChainingMode;
+
+ /**
+ * A <code>Map</code> which contains the <code>IssuerAndSerial</code> to
+ * chaining mode (a <code>String</code>) mapping.
+ */
+ private Map chainingModes;
+
+ /**
+ * A <code>Map</code> which contains the CAIssuerDN (a <code>String</code>)
+ * to distribution points (a <code>Set</code> of
+ * <code>DistributionPoint</code>s) mapping.
+ */
+ private Map distributionPoints;
+
+ /**
+ * The CRL archive duration.
+ */
+ private int cRLArchiveDuration;
+
+ /**
+ * Indicates whether revocation information should be archived.
+ */
+ private boolean enableRevocationArchiving_;
+
+ /**
+ * The location of the certificate store.
+ */
+ private String certStoreLocation_;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * CreateSignatureEnvironmentProfile Ids (<code>String</code>) to
+ * CreateSignatureEnvironmentProfile elements (an <code>Element</code>).
+ */
+ private Map createSignatureEnvironmentProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * CreateTransformsInfoProfile Ids (<code>String</code>) to
+ * CreateTransformsInfoProfile elements (an <code>Element</code>).
+ */
+ private Map createTransformsInfoProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * VerifyTransformsInfoProfile Ids (<code>String</code>) to
+ * VerifyTransformsInfoProfile elements (an <code>Element</code>).
+ */
+ private Map verifyTransformsInfoProfiles;
+
+ /**
+ * A <code>Map</code> which contains a mapping from
+ * SupplementProfile Ids (<code>String</code>) to SupplementProfile elements
+ * (an <code>Element</code>).
+ */
+ private Map supplementProfiles;
+
+ /**
+ * A <code>Map</code> which contains a TrustProfile Id (a <code>String</code>
+ * to trust profile (a <code>TrustProfile</code>) mapping.
+ */
+ private Map trustProfiles;
+
+ /**
+ * The JDBC URL for the revocation archive database.
+ */
+ private String revocationArchiveJDBCURL_;
+
+ /**
+ * The JDBC driver class name for the revocation archive database.
+ */
+ private String revocationArchiveJDBCDriverClass_;
+
+ /**
+ * Indicates whether revocation checking should be done.
+ */
+ private boolean enableRevocationChecking_;
+
+ /**
+ * The maximum age of a revocation information for considering it still as valid.
+ */
+ private long maxRevocationAge_;
+
+ /**
+ * The service order for revocation checking.
+ */
+ private String[] serviceOrder_;
+
+ /**
+ * Indicates whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ private boolean autoAddCertificates_;
+
+ /**
+ * Indicates whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ private boolean useAuthorityInfoAccess_;
+
+ /**
+ * Return the single instance of configuration data.
+ *
+ * @return MOAConfigurationProvider The current configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized ConfigurationProvider getInstance()
+ throws ConfigurationException {
+
+ if (instance == null) {
+ reload();
+ }
+ return instance;
+ }
+
+ /**
+ * Reload the configuration data and set it if successful.
+ *
+ * @return MOAConfigurationProvider The loaded configuration data.
+ * @throws ConfigurationException Failure to load the configuration data.
+ */
+ public static synchronized ConfigurationProvider reload()
+ throws ConfigurationException {
+ String fileName = System.getProperty(CONFIG_PROPERTY_NAME);
+
+ if (fileName == null) {
+ // find out where we are running and use the configuration provided
+ // under WEB-INF/conf/moa-spss/MOA-SPSSConfiguration
+ URL url = ConfigurationProvider.class.getResource("/");
+ fileName =
+ new File(url.getPath()).getParent()
+ + "/conf/moa-spss/MOA-SPSSConfiguration.xml";
+ info("config.05", new Object[] { CONFIG_PROPERTY_NAME });
+ }
+
+ instance = new ConfigurationProvider(fileName);
+ return instance;
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ *
+ * @param fileName The name of the configuration file.
+ * @throws ConfigurationException An error occurred loading the configuration.
+ */
+ public ConfigurationProvider(String fileName) throws ConfigurationException {
+ load(fileName);
+ }
+
+ /**
+ * Load the configuration data from XML file with the given name and build
+ * the internal data structures representing the MOA configuration.
+ *
+ * @param fileName The name of the XML file to load.
+ * @throws ConfigurationException The MOA configuration could not be
+ * read/built.
+ */
+ private void load(String fileName) throws ConfigurationException {
+ FileInputStream stream = null;
+ File configFile;
+ File configRoot;
+ Element configElem;
+ ConfigurationPartsBuilder builder;
+ List allKeyModules;
+
+
+ // load the main config file
+ try {
+ configFile = new File(fileName);
+ configRoot = new File(configFile.getParent());
+ info("config.21", new Object[] { configFile.getAbsoluteFile()});
+ stream = new FileInputStream(fileName);
+ configElem = DOMUtils.parseXmlValidating(new FileInputStream(fileName));
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.10", null, t);
+ }
+
+ // build the internal datastructures
+ try {
+ builder = new ConfigurationPartsBuilder(configElem, configRoot);
+ digestMethodAlgorithmName = builder.getDigestMethodAlgorithmName();
+ canonicalizationAlgorithmName =
+ builder.getCanonicalizationAlgorithmName();
+ hardwareCryptoModules = builder.buildHardwareCryptoModules();
+ hardwareKeyModules =
+ builder.buildHardwareKeyModules(Collections.EMPTY_LIST);
+ softwareKeyModules =
+ builder.buildSoftwareKeyModules(hardwareKeyModules);
+ allKeyModules = new ArrayList(hardwareKeyModules);
+ allKeyModules.addAll(softwareKeyModules);
+ keyGroups = builder.buildKeyGroups(allKeyModules);
+ keyGroupMappings =
+ builder.buildKeyGroupMappings(keyGroups, ANONYMOUS_ISSUER_SERIAL);
+ defaultChainingMode = builder.getDefaultChainingMode();
+ chainingModes = builder.buildChainingModes();
+ useAuthorityInfoAccess_ = builder.getUseAuthorityInfoAccess();
+ autoAddCertificates_ = builder.getAutoAddCertificates();
+ trustProfiles = builder.buildTrustProfiles();
+ distributionPoints = builder.buildDistributionPoints();
+ enableRevocationChecking_ = builder.getEnableRevocationChecking();
+ maxRevocationAge_ = builder.getMaxRevocationAge();
+ serviceOrder_ = builder.getServiceOrder();
+ enableRevocationArchiving_ = builder.getEnableRevocationArchiving();
+ cRLArchiveDuration = builder.getRevocationArchiveDuration();
+ revocationArchiveJDBCURL_ = builder.getRevocationArchiveJDBCURL();
+ revocationArchiveJDBCDriverClass_ = builder.getRevocationArchiveJDBCDriverClass();
+ certStoreLocation_ = builder.getCertStoreLocation();
+ createTransformsInfoProfiles = builder.buildCreateTransformsInfoProfiles();
+ createSignatureEnvironmentProfiles = builder.buildCreateSignatureEnvironmentProfiles();
+ verifyTransformsInfoProfiles = builder.buildVerifyTransformsInfoProfiles();
+ supplementProfiles = builder.buildSupplementProfiles();
+ warnings = new ArrayList(builder.getWarnings());
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.11", null, t);
+ } finally {
+ try {
+ if (stream != null) {
+ stream.close();
+ }
+ } catch (IOException e) {
+ // don't complain about this
+ }
+ }
+ }
+
+ /**
+ * Returns the warnings encountered during building the configuration.
+ *
+ * @return A <code>List</code> of <code>String</code>s, containing the
+ * warning messages.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Return the name of the digest algorithm used during signature creation.
+ *
+ * @return The digest method algorithm name, or an empty <code>String</code>,
+ * if none has been configured.
+ */
+ public String getDigestMethodAlgorithmName() {
+ return digestMethodAlgorithmName;
+ }
+
+ /**
+ * Return the name of the canonicalization algorithm used during signature
+ * creation.
+ *
+ * @return The canonicalization algorithm name, or an empty
+ * <code>String</code> if none has been configured.
+ */
+ public String getCanonicalizationAlgorithmName() {
+ return canonicalizationAlgorithmName;
+ }
+
+ /**
+ * Return the configured hardware crypto modules.
+ *
+ * @return A <code>List</code> of <code>HardwareCryptoModule</code> objects
+ * containing the hardware crypto module configurations.
+ */
+ public List getHardwareCryptoModules() {
+ return hardwareCryptoModules;
+ }
+
+ /**
+ * Return the hardware key modules configuration.
+ *
+ * @return A <code>List</code> of <code>HardwareKeyModule</code> objects
+ * containing the configuration of the hardware key modules.
+ */
+ public List getHardwareKeyModules() {
+ return hardwareKeyModules;
+ }
+
+ /**
+ * Return the software key module configuration.
+ *
+ * @return A <code>List</code> of <code>SoftwareKeyModule</code> objects
+ * containing the configuration of the software key modules.
+ */
+ public List getSoftwareKeyModules() {
+ return softwareKeyModules;
+ }
+
+ /**
+ * Return the key group mapping.
+ *
+ * @return A mapping from key group ID (a <code>String</code>) to
+ * <code>KeyGroup</code> mapping.
+ */
+ public Map getKeyGroups() {
+ return keyGroups;
+ }
+
+ /**
+ * Return the set of <code>KeyGroupEntry</code>s of a given key group, which a
+ * client (identified by an issuer/serial pair) may access.
+ *
+ * @param issuer The issuer of the client certificate.
+ * @param serial The serial number of the client certificate.
+ * @param keyGroupId The ID of the key group.
+ * @return A <code>Set</code> of all the <code>KeyGroupEntry</code>s in the
+ * given key group, if the user may access them. Returns <code>null</code>, if
+ * the user may not access the given key group or if the key group does not
+ * exist.
+ */
+ public Set getKeyGroupEntries(
+ Principal issuer,
+ BigInteger serial,
+ String keyGroupId) {
+
+ IssuerAndSerial issuerAndSerial;
+ Map mapping;
+
+ if (issuer == null && serial == null) {
+ issuerAndSerial = ANONYMOUS_ISSUER_SERIAL;
+ } else {
+ issuerAndSerial = new IssuerAndSerial(issuer, serial);
+ }
+
+ mapping = (Map) keyGroupMappings.get(issuerAndSerial);
+ if (mapping != null) {
+ KeyGroup keyGroup = (KeyGroup) mapping.get(keyGroupId);
+
+ if (keyGroup != null) {
+ return keyGroup.getKeyGroupEntries();
+ }
+ }
+
+ // If no key group is available for a client identified by a certificate,
+ // try to find a key group in the anonymous key group mapping
+ if (issuer != null || serial != null)
+ {
+ mapping = (Map) keyGroupMappings.get(ANONYMOUS_ISSUER_SERIAL);
+ if (mapping != null)
+ {
+ KeyGroup keyGroup = (KeyGroup) mapping.get(keyGroupId);
+ if (keyGroup != null) return keyGroup.getKeyGroupEntries();
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Return the chaining mode for a given trust anchor.
+ *
+ * @param trustAnchor The trust anchor for which the chaining mode should be
+ * returned.
+ * @return The chaining mode for the given trust anchor. If the trust anchor
+ * has not been configured separately, the system default will be returned.
+ */
+ public String getChainingMode(X509Certificate trustAnchor) {
+ Principal issuer = trustAnchor.getIssuerDN();
+ BigInteger serial = trustAnchor.getSerialNumber();
+ IssuerAndSerial issuerAndSerial = new IssuerAndSerial(issuer, serial);
+
+ String mode = (String) chainingModes.get(issuerAndSerial);
+ return mode != null ? mode : defaultChainingMode;
+ }
+
+ /**
+ * Return the distribution points for a given CA.
+ *
+ * @param cert The certificate for which the distribution points should be
+ * looked up. The issuer information is used to perform the lookup.
+ *
+ * @return A <code>Set</code> of <code>DistributionPoint</code> objects. The
+ * set will be empty, if no distribution points have been configured
+ * for this certificate.
+ */
+ public Set getDistributionPoints(X509Certificate cert)
+ {
+ try {
+ RFC2253NameParser nameParser =
+ new RFC2253NameParser(cert.getIssuerDN().toString());
+ String caIssuerDN = nameParser.parse().getName();
+ Set dps = (Set) distributionPoints.get(caIssuerDN);
+
+ if (dps == null) {
+ return Collections.EMPTY_SET;
+ }
+ return dps;
+ } catch (RFC2253NameParserException e) {
+ return Collections.EMPTY_SET;
+ }
+ }
+
+ /**
+ * Return the CRL archive duration.
+ *
+ * @return The duration of how long to keep CRL archive entries (measured in
+ * days).
+ */
+ public int getCRLArchiveDuration() {
+ return cRLArchiveDuration;
+ }
+
+ /**
+ * Returns whether revocation information should be archived.
+ *
+ * @return whether revocation information should be archived.
+ */
+ public boolean getEnableRevocationArchiving()
+ {
+ return enableRevocationArchiving_;
+ }
+
+ /**
+ * Returns the location of the certificate store.
+ *
+ * @return the location of the certificate store.
+ */
+ public String getCertStoreLocation()
+ {
+ return certStoreLocation_;
+ }
+
+ /**
+ * Return a <code>CreateTransformsInfoProfile</code> with the given ID.
+ *
+ * @param id The <code>CreateTransformsInfoProfile</code> ID.
+ * @return The <code>CreateTransformsInfoProfile</code> with the given
+ * ID or <code>null</code>, if none exists.
+ */
+ public Element getCreateTransformsInfoProfile(String id) {
+ return (Element) createTransformsInfoProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>CreateSignatureEnvironmentProfile</code> with the given ID.
+ *
+ * @param id The <code>CreateSignatureEnvironmentProfile</code> ID.
+ * @return The <code>CreateSignatureEnvironmentProfile</code> with the given
+ * ID or <code>null</code>, if none exists.
+ */
+ public Element getCreateSignatureEnvironmentProfile(String id) {
+ return (Element) createSignatureEnvironmentProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>VerifyTransformsInfoProfile</code> with the given ID.
+ *
+ * @param id The <code>VerifyTransformsInfoProfile</code> ID.
+ * @return The <code>VerifyTransformsInfoProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public Element getVerifyTransformsInfoProfile(String id) {
+ return (Element) verifyTransformsInfoProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>SupplementProfile</code> with the given ID.
+ *
+ * @param id The <code>SupplementProfile</code> ID.
+ * @return The <code>SupplementProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public Element getSupplementProfile(String id) {
+ return (Element) supplementProfiles.get(id);
+ }
+
+ /**
+ * Return a <code>TrustProfile</code> with the given ID.
+ *
+ * @param id The <code>TrustProfile</code> ID.
+ * @return The <code>TrustProfile</code> with the given ID or
+ * <code>null</code>, if none exists.
+ */
+ public TrustProfile getTrustProfile(String id) {
+ return (TrustProfile) trustProfiles.get(id);
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param parameters Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+
+ /**
+ * Returns the JDBC URL for the revocation archive database.
+ *
+ * @return the JDBC URL for the revocation archive database.
+ */
+ public String getRevocationArchiveJDBCURL()
+ {
+ return revocationArchiveJDBCURL_;
+ }
+
+ /**
+ * Returns the JDBC driver class name for the revocation archive database.
+ *
+ * @return the JDBC driver class name for the revocation archive database.
+ */
+ public String getRevocationArchiveJDBCDriverClass()
+ {
+ return revocationArchiveJDBCDriverClass_;
+ }
+
+ /**
+ * Returns whether revocation checking should be done.
+ *
+ * @return whether revocation checking should be done.
+ */
+ public boolean getEnableRevocationChecking()
+ {
+ return enableRevocationChecking_;
+ }
+
+ /**
+ * Returns the maximum age of a revocation information for considering it
+ * still as valid.
+ *
+ * @return the maximum age of a revocation information for considering it
+ * still as valid.
+ */
+ public long getMaxRevocationAge()
+ {
+ return maxRevocationAge_;
+ }
+
+ /**
+ * Returns the service order for revocation checking.
+ *
+ * @return the service order for revocation checking. Valid array entries are
+ * {@link RevocationSourceTypes#OCSP} and {@link RevocationSourceTypes#CRL}.
+ */
+ public String[] getServiceOrder()
+ {
+ return serviceOrder_;
+ }
+
+ /**
+ * Returns whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ *
+ * @return whether certificates found during certificate path construction
+ * should be added to the certificate store.
+ */
+ public boolean getAutoAddCertificates()
+ {
+ return autoAddCertificates_;
+ }
+
+ /**
+ * Returns whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ *
+ * @return whether the certificate extension Authority Info Access should
+ * be used during certificate path construction.
+ */
+ public boolean getUseAuthorityInfoAccess()
+ {
+ return useAuthorityInfoAccess_;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java
new file mode 100644
index 000000000..5c0646449
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/DistributionPoint.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Abstract base class for distribution points.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ * */
+public abstract class DistributionPoint implements iaik.pki.revocation.DistributionPoint
+{
+ /**
+ * The distribution point URI.
+ */
+ private String uri_;
+
+ /**
+ * Create a <code>DistributionPoint</code> with a URI.
+ *
+ * @param uri The URI of the distribution point.
+ */
+ public DistributionPoint(String uri)
+ {
+ uri_ = uri;
+ }
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getType()
+ */
+ public abstract String getType();
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getUri()
+ */
+ public String getUri()
+ {
+ return uri_;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java
new file mode 100644
index 000000000..62e8d63a6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareCryptoModule.java
@@ -0,0 +1,60 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Contains configuration data for a hardware crypto module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareCryptoModule {
+ /** The name of the module. */
+ private String name;
+ /** The slod ID of the module. */
+ private String slotID;
+ /** The user PIN of the module. */
+ private String userPIN;
+
+ /**
+ * Create a new <code>HardwareCryptoModule</code>.
+ *
+ * @param name The name of this <code>HardwareCryptoModule</code>.
+ * @param slotID The slot ID of this <code>HardwareCryptoModule</code>.
+ * @param userPIN The user PIN to access this
+ * <code>HardwareCryptoModule</code>.
+ */
+ public HardwareCryptoModule(String name, String slotID, String userPIN) {
+ this.name = name;
+ this.slotID = slotID;
+ this.userPIN = userPIN;
+ }
+
+ /**
+ * Returns the name of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The name of this <code>HardwareCryptoModule</code>.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Returns the slot ID of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The slot ID.
+ */
+ public String getSlotID() {
+ return slotID;
+ }
+
+
+ /**
+ * Returns the user PIN of this <code>HardwareCryptoModule</code>.
+ *
+ * @return The user PIN used to access the module.
+ */
+ public String getUserPIN() {
+ return userPIN;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java
new file mode 100644
index 000000000..622c8d110
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/HardwareKeyModule.java
@@ -0,0 +1,59 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class that contains information about a hardware key module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareKeyModule extends KeyModule {
+ /** The name of the module. */
+ private String name;
+ /** The slod ID of the module. */
+ private String slotID;
+ /** The user PIN of the module. */
+ private String userPIN;
+
+ /**
+ * Create a new <code>HardwareKey</code>.
+ *
+ * @param id The key module ID.
+ * @param name The name of the key.
+ * @param slotID The slot ID of the key within the hardware module. May be
+ * <code>null</code>.
+ * @param userPIN The user PIN to access the key.
+ */
+ public HardwareKeyModule(String id, String name, String slotID, String userPIN) {
+ super(id);
+ this.name = name;
+ this.slotID = slotID;
+ this.userPIN = userPIN;
+ }
+
+ /**
+ * Return the name of this <code>HardwareKey</code>.
+ *
+ * @return The name of this <code>HardwareKey</code>.
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Return the slot ID of this <code>HardwareKey</code>.
+ *
+ * @return The slot ID of this <code>HardwareKey</code>.
+ */
+ public String getSlotID() {
+ return slotID;
+ }
+
+ /**
+ * Return the user PIN to access this <code>HardwareKey</code>.
+ *
+ * @return The user PIN to access this <code>HardwareKey</code>.
+ */
+ public String getUserPIN() {
+ return userPIN;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
new file mode 100644
index 000000000..0814c90d6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/IssuerAndSerial.java
@@ -0,0 +1,125 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.math.BigInteger;
+import java.security.Principal;
+
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+
+/**
+ * A class containing the issuer and serial number of a certificate, which can
+ * be used to uniquely identify the certificate.
+ *
+ * The issuer is contained as an RFC2253 encoded <code>String</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IssuerAndSerial {
+
+ /** The issuer distinguished name. */
+ private String issuerDN;
+ /** The certificate serial number. */
+ private BigInteger serial;
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * The name of the issuer is converted to RFC2253. If it cannot be parsed, the
+ * DN contained in the <code>issuer</code> is set.
+ *
+ * @param issuer The isser of a certificate.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(Principal issuer, BigInteger serial) {
+ String issuerDN = null;
+ if (issuer instanceof Name) {
+ try {
+ issuerDN = ((Name)issuer).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ // do nothing
+ }
+ }
+ if (issuerDN == null) {
+ RFC2253NameParser parser = new RFC2253NameParser(issuer.getName());
+ try {
+ issuerDN = ((Name)parser.parse()).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ issuerDN = issuer.getName();
+ }
+ }
+ this.serial = serial;
+ this.issuerDN = issuerDN;
+ }
+
+ /**
+ * Create an <code>IssuerAndSerial</code> object.
+ *
+ * @param issuerDN The issuer distinguished name. Should be an RFC2253 name.
+ * @param serial The serial number of the certificate.
+ */
+ public IssuerAndSerial(String issuerDN, BigInteger serial) {
+ this.issuerDN = issuerDN;
+ this.serial = serial;
+ }
+
+ /**
+ * Return the issuer DN in RFC2253 format.
+ *
+ * @return The issuer part of this object.
+ */
+ public String getIssuerDN() {
+ return issuerDN;
+ }
+
+ /**
+ * Return the serial number.
+ *
+ * @return The serial number of this object.
+ */
+ public BigInteger getSerial() {
+ return serial;
+ }
+
+ /**
+ * Compare this <code>IssuerAndSerial</code> to another object.
+ *
+ * @param other The object to compare this <code>IssuerAndSerial</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>IssuerAndSerial</code> object and the <code>issuer</code> and
+ * <code>serial</code> fields are both equal. <code>false</code> otherwise.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof IssuerAndSerial) {
+ IssuerAndSerial ias = (IssuerAndSerial) other;
+ return getIssuerDN().equals(ias.getIssuerDN())
+ && getSerial().equals(ias.getSerial());
+ }
+ return false;
+ }
+
+ /**
+ * Return the hash code of this <code>IssuerAndSerial</code>.
+ *
+ * @return The hash code of this <code>IssuerAndSerial</code>.
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return issuerDN.hashCode() ^ serial.hashCode();
+ }
+
+ /**
+ * Return a <code>String</code> representation of this
+ * <code>IssuerAndSerial</code> object.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return ("(IssuerAndSerial - Issuer<" + getIssuerDN())
+ + ("> Serial<" + serial.toString() + ">)");
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
new file mode 100644
index 000000000..5fd108e1a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroup.java
@@ -0,0 +1,69 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * A collection of <code>KeyGroupEntry</code>s with its own ID.
+ *
+ * @author Sven Aigner
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyGroup {
+
+ /** The keys belonging to this key group. */
+ private Set keyGroupEntries;
+ /** The key group ID. */
+ private String id;
+
+ /**
+ * Create a <code>KeyGroup</code>.
+ *
+ * @param id The ID of this <code>KeyGroup</code>.
+ * @param keyGroupEntries The keys belonging to this <code>KeyGroup</code>.
+ */
+ public KeyGroup(String id, Set keyGroupEntries) {
+ this.id = id;
+ this.keyGroupEntries = keyGroupEntries;
+ }
+
+ /**
+ * Return the <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
+ *
+ * @return The <code>KeyEntry</code>s contained in this <code>KeyGroup</code>.
+ */
+ public Set getKeyGroupEntries() {
+ return keyGroupEntries;
+ }
+
+ /**
+ * Return the ID of this <code>KeyGroup</code>.
+ *
+ * @return The <code>KeyGroup</code> ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this <code>KeyGroup</code>.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ StringBuffer sb = new StringBuffer();
+ Iterator i;
+
+ if (getKeyGroupEntries() != null) {
+ i = getKeyGroupEntries().iterator();
+
+ while (i.hasNext()) {
+ sb.append(" " + i.next());
+ }
+ }
+ return "(KeyGroup - ID:" + id + " " + sb.toString() + ")";
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java
new file mode 100644
index 000000000..2e39d6aa3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyGroupEntry.java
@@ -0,0 +1,106 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import java.math.BigInteger;
+
+/**
+ * A class containing information about an entry in a key group.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyGroupEntry {
+ /** The module ID of the key. */
+ private String moduleID;
+ /** The issuer DN of the certificate identifying the key. */
+ private String issuerDN;
+ /** The serial number of the certificate identifying the key. */
+ private BigInteger serialNumber;
+
+ /**
+ * Create a new <code>KeyGroupEntry</code>.
+ *
+ * @param moduleID The key module ID to which this entry belongs to.
+ * @param issuerAndSerial The issuer and serial number which uniquely
+ * identifies a certificate within the key module.
+ */
+ public KeyGroupEntry(String moduleID, IssuerAndSerial issuerAndSerial) {
+ this.moduleID = moduleID;
+ this.issuerDN = issuerAndSerial.getIssuerDN();
+ this.serialNumber = issuerAndSerial.getSerial();
+ }
+
+ /**
+ * Create a new <code>KeyGroupEntry</code>.
+ *
+ * @param moduleID The key module ID to which this entry belongs to.
+ * @param issuerDN The isser DN of the certificate within the key module.
+ * @param serialNumber The serial number of the certificate within the key
+ * module.
+ */
+ public KeyGroupEntry(
+ String moduleID,
+ String issuerDN,
+ BigInteger serialNumber) {
+ this.moduleID = moduleID;
+ this.issuerDN = issuerDN;
+ this.serialNumber = serialNumber;
+ }
+
+ /**
+ * Return the key module ID to which this <code>KeyGroupEntry</code> belongs
+ * to.
+ *
+ * @return The key module ID.
+ */
+ public String getModuleID() {
+ return moduleID;
+ }
+
+ /**
+ * Return the issuer DN of this <code>KeyGroupEntry</code> for identifying the
+ * certificate within the key module.
+ *
+ * @return The issuer DN of the certificate.
+ */
+ public String getIssuerDN() {
+ return issuerDN;
+ }
+
+ /**
+ * Return the serial number of this <code>KeyGroupEntry</code> for identifying
+ * the certificate within the key module.
+ *
+ * @return The serial number of the certificate.
+ */
+ public BigInteger getSerialNumber() {
+ return serialNumber;
+ }
+
+ /**
+ * Compare this <code>KeyGroupEntry</code> to another.
+ *
+ * @param other The <code>KeyGroupEntry</code> to compare to.
+ * @return <code>true</code>, if module ID, isser DN and serial number of
+ * <code>other</code> match the ones contained in this object, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof KeyGroupEntry) {
+ KeyGroupEntry entry = (KeyGroupEntry) other;
+ return getModuleID().equals(entry.getModuleID())
+ && getIssuerDN().equals(entry.getIssuerDN())
+ && getSerialNumber().equals(entry.getSerialNumber());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getModuleID().hashCode()
+ ^ getIssuerDN().hashCode()
+ ^ getSerialNumber().hashCode();
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java
new file mode 100644
index 000000000..412516d82
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/KeyModule.java
@@ -0,0 +1,41 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class that contains information about a key module.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class KeyModule {
+
+ /** The key module ID. */
+ private String id;
+
+ /**
+ * Create a <code>Key</code> object.
+ *
+ * @param id The key module ID.
+ */
+ public KeyModule(String id) {
+ this.id = id;
+ }
+
+ /**
+ * Return the key ID.
+ *
+ * @return The key ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return a <code>String</code> representation of this <code>Key</code>.
+ *
+ * @return The <code>String</code> representation.
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return "(Key - Id<" + id + ">)";
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java
new file mode 100644
index 000000000..e4509ac97
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/OCSPDistributionPoint.java
@@ -0,0 +1,33 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+
+/**
+ * A class representing a CRL distribution point.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class OCSPDistributionPoint
+ extends DistributionPoint
+ implements iaik.pki.revocation.DistributionPoint
+{
+ /**
+ * Create a <code>OCSPDistributionPoint</code> with a URI.
+ *
+ * @param uri The URI of the ocsp distribution point.
+ */
+ public OCSPDistributionPoint(String uri)
+ {
+ super(uri);
+ }
+
+ /**
+ * @see iaik.pki.revocation.DistributionPoint#getType()
+ */
+ public String getType()
+ {
+ return RevocationSourceTypes.OCSP;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java
new file mode 100644
index 000000000..479e98ca5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/SoftwareKeyModule.java
@@ -0,0 +1,48 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * A class containing information about a software key, stored in PKCS12 format.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SoftwareKeyModule extends KeyModule {
+ /** The name of the file containing the keys. */
+ private String fileName;
+ /** The password for accessing the file. */
+ private String passWord;
+
+ /**
+ * Create a new <code>SoftwareKey</code>.
+ *
+ * @param id The key ID.
+ * @param fileName The name of the PKCS12 keystore file containing the key.
+ * @param passWord The password to access the keystore file.
+ */
+ public SoftwareKeyModule(String id, String fileName, String passWord) {
+ super(id);
+ this.fileName = fileName;
+ this.passWord = passWord;
+ }
+
+ /**
+ * Return the name of the PKCS12 keystore file containing this
+ * <code>SoftwareKey</code>.
+ *
+ * @return The name of the PKCS12 keystore file.
+ */
+ public String getFileName() {
+ return fileName;
+ }
+
+ /**
+ * Return the password to access the keystore file.
+ *
+ * @return The password to access the keystore file.
+ */
+ public String getPassWord() {
+ return passWord;
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java
new file mode 100644
index 000000000..929d5ce2b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/config/TrustProfile.java
@@ -0,0 +1,58 @@
+package at.gv.egovernment.moa.spss.server.config;
+
+/**
+ * Information about a trust profile.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TrustProfile {
+ /** The ID of the trust profile. */
+ private String id;
+ /** The URI giving the location of the trust profile. */
+ private String uri;
+ /** The URI giving the location of the allowed signer certificates. */
+ private String signerCertsUri;
+
+ /**
+ * Create a <code>TrustProfile</code>.
+ *
+ * @param id The ID of the <code>TrustProfile</code> to create.
+ * @param uri The URI of the <code>TrustProfile</code> to create.
+ * @param signerCertsUri The URI of the location of the allowed signer
+ * certificates of the <code>TrustProfile</code> to create.
+ */
+ public TrustProfile(String id, String uri, String signerCertsUri) {
+ this.id = id;
+ this.uri = uri;
+ this.signerCertsUri = signerCertsUri;
+ }
+
+ /**
+ * Return the ID of this <code>TrustProfile</code>.
+ *
+ * @return The <code>TrustProfile</code> ID.
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * Return the URI of this <code>TrustProfile</code>.
+ *
+ * @return The URI of <code>TrustProfile</code>.
+ */
+ public String getUri() {
+ return uri;
+ }
+
+ /**
+ * Return the URI giving the location of the allowed signer certificates
+ * of this <code>TrustProfile</code>.
+ *
+ * @return The URI of <code>TrustProfile</code>.
+ */
+ public String getSignerCertsUri() {
+ return signerCertsUri;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java
new file mode 100644
index 000000000..eaee58d3f
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/cmsverify/CMSSignatureVerificationProfileImpl.java
@@ -0,0 +1,37 @@
+package at.gv.egovernment.moa.spss.server.iaik.cmsverify;
+
+import iaik.pki.PKIProfile;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+
+/**
+ * An implementation of the <code>CMSSignatureVerificationProfile</code>
+ * interface.
+ *
+ * @see iaik.server.modules.cmsverify.CMSSignatureVerificationProfile
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationProfileImpl
+ implements CMSSignatureVerificationProfile {
+
+ /** The profile for validating the certificate. */
+ private PKIProfile certificateValidationProfile;
+
+ /**
+ * @see iaik.server.modules.cmsverify.CMSSignatureVerificationProfile#getCertificateValidationProfile()
+ */
+ public PKIProfile getCertificateValidationProfile() {
+ return certificateValidationProfile;
+ }
+
+ /**
+ * Sets the profile for validating the signer certificate.
+ *
+ * @param certificateValidationProfile The certificate validation profile to
+ * set.
+ */
+ public void setCertificateValidationProfile(PKIProfile certificateValidationProfile) {
+ this.certificateValidationProfile = certificateValidationProfile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..713891714
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractKeyModuleConfigurationImpl.java
@@ -0,0 +1,36 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.keys.KeyModuleConfiguration;
+
+/**
+ * Base implementation class for the <code>KeyModuleConfiguration</code>
+ * interface and the interfaces derived from it.
+ *
+ * @see iaik.server.modules.keys.KeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class AbstractKeyModuleConfigurationImpl
+ implements KeyModuleConfiguration {
+
+ /** The module ID. */
+ private String moduleID;
+
+ /**
+ * Creata new <code>AbstractKeyModuleConfigurationImpl</code>.
+ *
+ * @param moduleID The key module ID of this
+ * <code>KeyModuleConfiguration</code>.
+ */
+ public AbstractKeyModuleConfigurationImpl(String moduleID) {
+ this.moduleID = moduleID;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.KeyModuleConfiguration#getModuleID()
+ */
+ public String getModuleID() {
+ return moduleID;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java
new file mode 100644
index 000000000..88d53d6ad
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/AbstractObservableConfiguration.java
@@ -0,0 +1,48 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.pki.store.observer.NotificationData;
+import iaik.pki.store.observer.Observable;
+import iaik.pki.store.observer.Observer;
+
+/**
+ * A base class for observable configuration data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class AbstractObservableConfiguration implements Observable {
+
+ /** The observers registered with this <code>Observable</code>. */
+ private List observers = new ArrayList();
+
+ /**
+ * @see iaik.pki.store.observer.Observable#addObserver(iaik.pki.store.observer.Observer)
+ */
+ public void addObserver(Observer observer) {
+ observers.add(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#removeObserver(iaik.pki.store.observer.Observer)
+ */
+ public boolean removeObserver(Observer observer) {
+ return observers.remove(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData)
+ */
+ public void notify(NotificationData data) {
+ Iterator iter = observers.iterator();
+
+ for (iter = observers.iterator(); iter.hasNext();) {
+ Observer observer = (Observer) iter.next();
+ observer.notify(data);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java
new file mode 100644
index 000000000..bf56d437c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ArchiveConfigurationImpl.java
@@ -0,0 +1,97 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import iaik.pki.store.revocation.archive.ArchiveParameter;
+import iaik.pki.store.revocation.archive.ArchiveTypes;
+
+import java.sql.Driver;
+import java.sql.DriverManager;
+import java.util.Enumeration;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ArchiveConfiguration</code> interface
+ * using configuration data provided by the MOA configuration file.
+ *
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ArchiveConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements ArchiveConfiguration {
+
+ /** The configuration parameters of the archive. */
+ private ArchiveParameter archiveParameters;
+
+ /**
+ * Create a new <code>ArchiveConfigurationImpl</code>.
+ *
+ * @param config The MOA configuration from which the configuration data is being read.
+ */
+ public ArchiveConfigurationImpl(ConfigurationProvider config)
+ {
+ String jdbcUrl = config.getRevocationArchiveJDBCURL();
+ this.archiveParameters = new DataBaseArchiveParameterImpl(jdbcUrl);
+
+ // Register JDBC driver class
+ if (jdbcUrl != null)
+ {
+ String jdbcDriverClass = config.getRevocationArchiveJDBCDriverClass();
+ try
+ {
+ Class.forName(jdbcDriverClass);
+ }
+ catch (ClassNotFoundException e)
+ {
+ // TODO 20030709 GK Improve exception handling
+ throw new RuntimeException("JDBC driver class \"" + jdbcDriverClass + " could not be found.");
+ }
+
+ Enumeration regDrivers = DriverManager.getDrivers();
+ boolean isRegistered = false;
+ while (regDrivers.hasMoreElements())
+ {
+ Object currentDriver = regDrivers.nextElement();
+ if (jdbcDriverClass.equals(currentDriver.getClass().getName())) isRegistered = true;
+ }
+ if (!isRegistered)
+ {
+ // Workaround for a driver which does not register itselve at invocation of Class.forName(drvname)
+ try
+ {
+ DriverManager.registerDriver((Driver)Class.forName(jdbcDriverClass).newInstance());
+ }
+ catch (Exception e)
+ {
+ // TODO 20030709 GK Improve exception handling
+ throw new RuntimeException("Registering JDBC driver \"" + jdbcDriverClass + " failed.");
+ }
+ }
+ }
+ }
+
+ /**
+ * Return the type of archive.
+ *
+ * This will always return <code>ArchiveTypes.DATABASE</code>.
+ * @return <code>ArchiveTypes.DATABASE</code>.
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration#getType()
+ */
+ public String getType() {
+ return ArchiveTypes.DATABASE;
+ }
+
+ /**
+ * Return the <code>ArchiveParameters</code> describing this
+ * <code>ArchiveConfiguration</code>.
+ *
+ * @return The archive parameters.
+ * @see iaik.pki.store.revocation.archive.ArchiveConfiguration#getArchiveParameters()
+ */
+ public ArchiveParameter getArchiveParameters() {
+ return archiveParameters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
new file mode 100644
index 000000000..71b8680c8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CRLRetriever.java
@@ -0,0 +1,69 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.logging.TransactionId;
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.RevocationInfoRetriever;
+import iaik.pki.store.revocation.RevocationSource;
+import iaik.pki.store.revocation.RevocationStoreException;
+import iaik.pki.ldap.Handler;
+
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.util.Collection;
+import java.util.Date;
+
+import at.gv.egovernment.moa.logging.Logger;
+
+/**
+ * A customized implementation of {@link iaik.pki.store.revocation.RevocationInfoRetriever}. Will be used
+ * instead of the default implementation {@link iaik.pki.store.revocation.CRLRetriever} to overcome a
+ * classloader problem in connection with the {@link java.net.URL} class in a Tomcat deployment environment.
+ *
+ * @author Gregor Karlinger
+ * @version $$
+ */
+public class CRLRetriever implements RevocationInfoRetriever
+{
+ public void update(RevocationSource source, Collection supplementalRequestData, TransactionId tid)
+ throws RevocationStoreException
+ {
+ if (source == null)
+ {
+ throw new NullPointerException("RevocationSource parameter mustn't be null.");
+ }
+ Logger.info("Downloading crl from " + source.getUri());
+ if (!source.getType().equals(RevocationSourceTypes.CRL))
+ {
+ throw new RevocationStoreException(
+ source.getType() + " not supported",
+ null,
+ getClass().getName() + ":1");
+ }
+ try
+ {
+ URL crlUrl;
+ try
+ {
+ crlUrl = new URL(source.getUri());
+ }
+ catch (MalformedURLException e)
+ {
+ // Workaround for classloader problem with deployment in Tomcat 4.1
+ URLStreamHandler handler = new Handler();
+ crlUrl = new URL(null, source.getUri(), handler);
+ }
+
+ InputStream crlInputStream = crlUrl.openStream();
+ source.readFrom(crlInputStream, tid);
+ source.setDownloadTime(new Date());
+ crlInputStream.close();
+ }
+ catch (Exception iox)
+ {
+ Logger.warn("Cannot retrieve crl", iox);
+ throw new RevocationStoreException("Cannot retrieve CRL", iox, getClass().getName() + ":1");
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java
new file mode 100644
index 000000000..e6e084e11
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/CertStoreConfigurationImpl.java
@@ -0,0 +1,50 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.certstore.CertStoreParameters;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>CertStoreConfiguration</code> interface based
+ * on MOA configuration data.
+ *
+ * @see iaik.pki.store.certstore.CertStoreConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertStoreConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements CertStoreConfiguration {
+
+ /** The configuration parameters of the <code>CertStore</code>. */
+ private CertStoreParameters[] parameters;
+
+ /**
+ * Create a new <code>CertStoreConfigurationImpl</code>.
+ *
+ * @param config The MOA configuration from which the configuration data is
+ * being read.
+ */
+ public CertStoreConfigurationImpl(ConfigurationProvider config)
+ {
+ String certStoreRoot = config.getCertStoreLocation();
+
+ DirectoryCertStoreParameters dirParameters = new DirectoryCertStoreParametersImpl(
+ "MOA Directory CertStore",
+ certStoreRoot,
+ true,
+ false);
+
+ parameters = new CertStoreParameters[] { dirParameters };
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreConfiguration#getParameters()
+ */
+ public CertStoreParameters[] getParameters() {
+ return parameters;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java
new file mode 100644
index 000000000..7aa4cbe4b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImpl.java
@@ -0,0 +1,121 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.logging.LoggerConfig;
+import iaik.pki.PKIConfiguration;
+import iaik.server.ConfigurationData;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+
+/**
+ * An implementation of the <code>ConfigurationData</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.server.ConfigurationData
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationDataImpl implements ConfigurationData {
+ /** PKI configuration data. */
+ private PKIConfiguration pkiConfiguration;
+ /** Crypto modules configuration data. */
+ private List cryptoModuleConfigurations;
+ /** Key modules configuration data. */
+ private List keyModuleConfigurations;
+ /** Logging configuration data. */
+ private LoggerConfig loggerConfig;
+
+ /**
+ * Create a new <code>ConfigurationDataImpl</code>.
+ *
+ * @param config The underlying MOA configuration data.
+ */
+ public ConfigurationDataImpl(ConfigurationProvider config) {
+ this.pkiConfiguration = new PKIConfigurationImpl(config);
+ this.cryptoModuleConfigurations = buildCryptoModuleConfigurations(config);
+ this.keyModuleConfigurations = buildKeyModuleConfigurations(config);
+ this.loggerConfig = new LoggerConfigImpl();
+ }
+
+ /**
+ * Build the list of <code>CryptoModuleConfiguration</code>s.
+ *
+ * @param config The underlying MOA configuration data.
+ * @return The list of <code>CryptoModuleConfiguration</code>s configured in
+ * the MOA configuration.
+ */
+ private List buildCryptoModuleConfigurations(ConfigurationProvider config) {
+ List modules = new ArrayList();
+ Iterator iter = config.getHardwareCryptoModules().iterator();
+
+ while (iter.hasNext()) {
+ HardwareCryptoModule module = (HardwareCryptoModule) iter.next();
+ modules.add(new HardwareCryptoModuleConfigurationImpl(module));
+ }
+
+ return modules;
+ }
+
+ /**
+ * Build the list of <code>KeyModuleConfiguration</code>s.
+ *
+ * @param config The underlying MOA configuration data.
+ * @return The list of <code>KeyModuleConfiguration</code>s configured in the
+ * MOA configuration.
+ */
+ private List buildKeyModuleConfigurations(ConfigurationProvider config) {
+ List keys = new ArrayList();
+ Iterator iter;
+
+ // add the hardware keys
+ iter = config.getHardwareKeyModules().iterator();
+ while (iter.hasNext()) {
+ HardwareKeyModule key = (HardwareKeyModule) iter.next();
+ keys.add(new HardwareKeyModuleConfigurationImpl(key));
+ }
+
+ // add the software keys
+ iter = config.getSoftwareKeyModules().iterator();
+ while (iter.hasNext()) {
+ SoftwareKeyModule key = (SoftwareKeyModule) iter.next();
+ keys.add(new SoftwareKeyModuleConfigurationImpl(key));
+ }
+
+ return keys;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getPKIConfiguration()
+ */
+ public PKIConfiguration getPKIConfiguration() {
+ return pkiConfiguration;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getCryptoModuleConfigurations()
+ */
+ public List getCryptoModuleConfigurations() {
+ return cryptoModuleConfigurations;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getKeyModuleConfigurations()
+ */
+ public List getKeyModuleConfigurations() {
+ return keyModuleConfigurations;
+ }
+
+ /**
+ * @see iaik.server.ConfigurationData#getLoggerConfig()
+ */
+ public LoggerConfig getLoggerConfig() {
+ return loggerConfig;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java
new file mode 100644
index 000000000..d67523944
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DataBaseArchiveParameterImpl.java
@@ -0,0 +1,33 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter;
+
+/**
+ * An implementation of the <code>DataBaseArchiveParameter</code> interface.
+ *
+ * @see iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataBaseArchiveParameterImpl implements DataBaseArchiveParameter {
+
+ /** The JDBC URL for accessing the archive. */
+ private String jDBCUrl;
+
+ /**
+ * Create a new <code>DataBaseArchiveParameterImpl</code>.
+ *
+ * @param jDBCUrl The JDBC URL of the archive.
+ */
+ public DataBaseArchiveParameterImpl(String jDBCUrl) {
+ this.jDBCUrl = jDBCUrl;
+ }
+
+ /**
+ * @see iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter#getJDBCUrl()
+ */
+ public String getJDBCUrl() {
+ return jDBCUrl;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java
new file mode 100644
index 000000000..2b00d6766
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/DirectoryCertStoreParametersImpl.java
@@ -0,0 +1,81 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+
+/**
+ * An implementation of the <code>DirectoryCertStoreParameters</code> interface.
+ *
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DirectoryCertStoreParametersImpl
+ implements DirectoryCertStoreParameters {
+
+ /** The root directory of the <code>CertStore</code>. */
+ private String rootDirectory;
+ /** Whether a new directory may be created. */
+ private boolean createNew;
+ /** The <code>CertStore</code> ID. */
+ private String id;
+ /** Whether the <code>CertStore</code> is read-only. */
+ private boolean readOnly;
+
+ /**
+ * Create a new <code>DirectoryCertStoreParameterImpl</code>.
+ *
+ * @param id The <code>CertStore</code> ID.
+ * @param rootDirectory The root directory of the <code>CertStore</code>.
+ * @param createNew Whether a new directory may be created.
+ * @param readOnly Whether the <code>CertStore</code> is read-only.
+ */
+ public DirectoryCertStoreParametersImpl(
+ String id,
+ String rootDirectory,
+ boolean createNew,
+ boolean readOnly) {
+
+ this.id = id;
+ this.rootDirectory = rootDirectory;
+ this.createNew = createNew;
+ this.readOnly = readOnly;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#getRootDirectory()
+ */
+ public String getRootDirectory() {
+ return rootDirectory;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#createNew()
+ */
+ public boolean createNew() {
+ return createNew;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#getId()
+ */
+ public String getId() {
+ return id;
+ }
+
+ /**
+ * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return readOnly;
+ }
+
+ /**
+ * @return <code>CertStoreTypes.DIRECTORY</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#getType()
+ */
+ public String getType() {
+ return CertStoreTypes.DIRECTORY;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java
new file mode 100644
index 000000000..3c8f4c002
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareCryptoModuleConfigurationImpl.java
@@ -0,0 +1,51 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.crypto.HardwareCryptoModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+
+/**
+ * An implementation of the <code>HardwareCryptoModuleConfiguration</code>
+ * wrapping a <code>HardwareCryptoModule</code> from the MOA configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareCryptoModuleConfigurationImpl
+ implements HardwareCryptoModuleConfiguration {
+
+ /** The wrapped <code>HardwareCryptoModule</code>. */
+ private HardwareCryptoModule module;
+
+ /**
+ * Create a new <code>HardwareCryptoModuleConfigurationImpl</code>.
+ *
+ * @param module The <code>HardwareCryptoModule</code> from the underlying MOA
+ * configuration.
+ */
+ public HardwareCryptoModuleConfigurationImpl(HardwareCryptoModule module) {
+ this.module = module;
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getModuleName()
+ */
+ public String getModuleName() {
+ return module.getName();
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getSlotID()
+ */
+ public String getSlotID() {
+ return module.getSlotID();
+ }
+
+ /**
+ * @see iaik.server.modules.crypto.HardwareCryptoModuleConfiguration#getUserPIN()
+ */
+ public char[] getUserPIN() {
+ return module.getUserPIN().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..d905588c6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/HardwareKeyModuleConfigurationImpl.java
@@ -0,0 +1,55 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.server.modules.keys.HardwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+
+/**
+ * An implementation of the <code>HardwareKeyModuleConfiguration</code>
+ * interface wrapping a <code>HardwareKeyModule</code> from the MOA
+ * configuration.
+ *
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class HardwareKeyModuleConfigurationImpl
+ extends AbstractKeyModuleConfigurationImpl
+ implements HardwareKeyModuleConfiguration {
+
+ /** The wrapped <code>HardwareKeyModule</code>. */
+ private HardwareKeyModule keyModule;
+
+ /**
+ * Create a new <code>HardwareKeyModuleConfigurationImpl</code>.
+ *
+ * @param keyModule The <code>HardwareKeyModule</code> from the underlying
+ * MOA configuration.
+ */
+ public HardwareKeyModuleConfigurationImpl(HardwareKeyModule keyModule) {
+ super(keyModule.getId());
+ this.keyModule = keyModule;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getModuleName()
+ */
+ public String getModuleName() {
+ return keyModule.getName();
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getSlotID()
+ */
+ public String getSlotID() {
+ return keyModule.getSlotID();
+ }
+
+ /**
+ * @see iaik.server.modules.keys.HardwareKeyModuleConfiguration#getUserPIN()
+ */
+ public char[] getUserPIN() {
+ return keyModule.getUserPIN().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java
new file mode 100644
index 000000000..2508b7946
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfigurator.java
@@ -0,0 +1,173 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.RevocationFactory;
+import iaik.pki.store.revocation.RevocationSourceStore;
+import iaik.pki.store.truststore.TrustStoreFactory;
+import iaik.server.ConfigurationData;
+import iaik.server.Configurator;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.KeyGroup;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class responsible for configuring the IAIK MOA modules.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikConfigurator {
+
+ /** The warnings encountered during configuration. */
+ private List warnings = new ArrayList();
+
+ /**
+ * Configure the IAIK MOA subsystem.
+ *
+ *
+ * @param moaConfig The underlying MOA configuration.
+ * @throws ConfigurationException An error occurred configuring the IAIK
+ * MOA subsystem.
+ */
+ public void configure(ConfigurationProvider moaConfig)
+ throws ConfigurationException {
+ ConfigurationData configData = new ConfigurationDataImpl(moaConfig);
+
+ warnings = new ArrayList();
+
+ try {
+ TransactionId transId = new TransactionId("IaikConfigurator");
+ Configurator.init(configData, transId);
+
+ // Set customized CRL retriever to overcome a classloader problem when MOA is deployed in Tomcat
+ RevocationSourceStore rss = RevocationFactory.getInstance(transId).getRevocationSourceStore();
+ rss.setRetriever(new CRLRetriever(), RevocationSourceTypes.CRL);
+ if ((moaConfig.getSoftwareKeyModules().size() > 0) || (moaConfig.getHardwareKeyModules().size() > 0)) {
+ dumpKeyEntryIDs();
+ }
+ checkKeyGroupConfig(moaConfig);
+ TrustStoreFactory.reset();
+ } catch (iaik.server.ConfigurationException e) {
+ throw new ConfigurationException("config.08", null, e);
+ } catch (Throwable t) {
+ throw new ConfigurationException("config.08", null, t);
+ }
+ }
+
+ /**
+ * Return the warnings encountered during configuration.
+ *
+ * @return The warnings.
+ */
+ public List getWarnings() {
+ return warnings;
+ }
+
+ /**
+ * Dump all <code>KeyEntryID</code>s contained in the configured
+ * <code>KeyModule</code>s to the log file.
+ */
+ private void dumpKeyEntryIDs() {
+ MessageProvider msg = MessageProvider.getInstance();
+ KeyModule module = KeyModuleFactory.getInstance(new TransactionId("dump"));
+ Set keyEntryIds = module.getPrivateKeyEntryIDs();
+ Iterator iter;
+
+ for (iter = keyEntryIds.iterator(); iter.hasNext();) {
+ KeyEntryID keyEntryId = (KeyEntryID) iter.next();
+ Logger.info(
+ new LogMsg(msg.getMessage("config.19", new Object[] { keyEntryId })));
+ }
+ }
+
+ /**
+ * Check that each key group entry in each key group can be resolved to a
+ * KeyEntryID.
+ *
+ * Logs a warning for each key group entry that cannot be resolved.
+ *
+ * @param moaConfig The MOA configuration to check.
+ */
+ private void checkKeyGroupConfig(ConfigurationProvider moaConfig) {
+ Map keyGroups = moaConfig.getKeyGroups();
+ Iterator iter;
+
+ for (iter = keyGroups.values().iterator(); iter.hasNext();) {
+ KeyGroup keyGroup = (KeyGroup) iter.next();
+ Set keyGroupEntries = keyGroup.getKeyGroupEntries();
+ Iterator kgIter;
+
+ for (kgIter = keyGroupEntries.iterator(); kgIter.hasNext();) {
+ KeyGroupEntry entry = (KeyGroupEntry) kgIter.next();
+
+ if (!findKeyEntryID(entry)) {
+ warn(
+ "config.31",
+ new Object[] {
+ keyGroup.getId(),
+ entry.getModuleID(),
+ entry.getIssuerDN(),
+ entry.getSerialNumber()});
+ }
+ }
+ }
+ }
+
+ /**
+ * Find out that a certain KeyGroupEntry could be resolved to a KeyEntryID
+ * by the Configurator.
+ *
+ * @param keyGroupEntry The key group entry to find.
+ * @return <code>true</code>, if the <code>keyGroupEntry</code> could be
+ * resolved to a <code>KeyEntryID</code>; otherwise <code>false</code>.
+ */
+ private boolean findKeyEntryID(KeyGroupEntry keyGroupEntry) {
+ KeyModule module = KeyModuleFactory.getInstance(new TransactionId("check"));
+ Set keyEntryIDs = module.getPrivateKeyEntryIDs();
+ Iterator iter;
+
+ for (iter = keyEntryIDs.iterator(); iter.hasNext();) {
+ KeyEntryID entry = (KeyEntryID) iter.next();
+
+ if (entry.getCertificateIssuer().equals(keyGroupEntry.getIssuerDN())
+ && entry.getCertificateSerialNumber().equals(
+ keyGroupEntry.getSerialNumber())
+ && entry.getModuleID().equals(keyGroupEntry.getModuleID())) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
+ * Log a warning.
+ *
+ * @param messageId The message ID.
+ * @param args Additional parameters for the message.
+ * @see at.gv.egovernment.moa.spss.server.util.MessageProvider
+ */
+ private void warn(String messageId, Object[] args) {
+ MessageProvider msg = MessageProvider.getInstance();
+ String txt = msg.getMessage(messageId, args);
+
+ Logger.warn(new LogMsg(txt));
+ warnings.add(txt);
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java
new file mode 100644
index 000000000..9679e8d18
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/LoggerConfigImpl.java
@@ -0,0 +1,34 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.util.Properties;
+
+import iaik.logging.LogConfigurationException;
+import iaik.logging.LoggerConfig;
+
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+/**
+ * Default implementation of the <code>LoggerConfig</code> interface.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class LoggerConfigImpl implements LoggerConfig {
+
+ /** The implementation of iaik.logging.LogFactory. */
+ private static final String DEFAULT_IMPLEMENTATION =
+ "at.gv.egovernment.moa.spss.server.logging.IaikLogFactory";
+
+ public String getFactory() {
+ return DEFAULT_IMPLEMENTATION;
+ }
+
+ public Properties getProperties() throws LogConfigurationException {
+ return new Properties();
+ }
+
+ public String getNodeId() {
+ return LoggingContextManager.getInstance().getLoggingContext().getNodeID();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java
new file mode 100644
index 000000000..1c42cc4af
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/PKIConfigurationImpl.java
@@ -0,0 +1,80 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.PKIConfiguration;
+import iaik.pki.pathvalidation.ValidationConfiguration;
+import iaik.pki.revocation.RevocationConfiguration;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>PKIConfiguration</code> interface using data
+ * from the MOA configuration.
+ *
+ * @see iaik.pki.PKIConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class PKIConfigurationImpl implements PKIConfiguration {
+ /** The <code>CertStore</code> configuration. */
+ private CertStoreConfiguration certStoreConfiguration;
+ /** The revocation checking configuration. */
+ private RevocationConfiguration revocationConfiguration;
+ /** The revocation archive configuration. */
+ private ArchiveConfiguration archiveConfiguration;
+ /** The certificate validation configuration. */
+ private ValidationConfiguration validationConfiguration;
+
+ /**
+ * Create a new <code>PKIConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration which will be used to build
+ * the configuration data contained in this object.
+ */
+ public PKIConfigurationImpl(ConfigurationProvider config) {
+
+ this.certStoreConfiguration = new CertStoreConfigurationImpl(config);
+ this.revocationConfiguration = new RevocationConfigurationImpl(config);
+
+ boolean archiveInfo = config.getEnableRevocationArchiving();
+ if (archiveInfo)
+ {
+ this.archiveConfiguration = new ArchiveConfigurationImpl(config);
+ }
+ else
+ {
+ this.archiveConfiguration = null;
+ }
+
+ this.validationConfiguration = new ValidationConfigurationImpl(config);
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getCertStoreConfiguration()
+ */
+ public CertStoreConfiguration getCertStoreConfiguration() {
+ return certStoreConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getRevocationConfiguration()
+ */
+ public RevocationConfiguration getRevocationConfiguration() {
+ return revocationConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getArchiveConfiguration()
+ */
+ public ArchiveConfiguration getArchiveConfiguration() {
+ return archiveConfiguration;
+ }
+
+ /**
+ * @see iaik.pki.PKIConfiguration#getValidationConfiguration()
+ */
+ public ValidationConfiguration getValidationConfiguration() {
+ return validationConfiguration;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java
new file mode 100644
index 000000000..bccb04a09
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/RevocationConfigurationImpl.java
@@ -0,0 +1,53 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import iaik.pki.revocation.RevocationConfiguration;
+
+import java.security.cert.X509Certificate;
+import java.util.Date;
+import java.util.Set;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>RevocationConfiguration</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.pki.revocation.RevocationConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements RevocationConfiguration {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>RevocationConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration containing the configuration
+ * data.
+ */
+ public RevocationConfigurationImpl(ConfigurationProvider config) {
+ this.config = config;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#getAlternativeDistributionPoints
+ */
+ public Set getAlternativeDistributionPoints(X509Certificate cert, X509Certificate issuer, Date date)
+ {
+ return config.getDistributionPoints(cert);
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationConfiguration#archiveRevocationInfo(java.lang.String, java.lang.String)
+ */
+ public boolean archiveRevocationInfo(String type, String uri)
+ {
+ return config.getEnableRevocationArchiving();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java
new file mode 100644
index 000000000..343f096ef
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/SoftwareKeyModuleConfigurationImpl.java
@@ -0,0 +1,75 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.InputStream;
+
+import iaik.server.modules.keys.ConfigurationException;
+import iaik.server.modules.keys.SoftwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * An implementation of the <code>SoftwareKeyModuleConfiguration</code> wrapping
+ * a <code>SoftwareKeyModule</code> from the MOA configuration.
+ *
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SoftwareKeyModuleConfigurationImpl
+ extends AbstractKeyModuleConfigurationImpl
+ implements SoftwareKeyModuleConfiguration {
+
+ /** The wrapped <code>SoftwareKeyModule</code>. */
+ private SoftwareKeyModule keyModule;
+
+ /**
+ * Create a new <code>SoftwareKeyModuleConfigurationImpl</code>.
+ *
+ * @param keyModule The <code>SoftwareKeyModule</code> from the underlying MOA
+ * configuration.
+ */
+ public SoftwareKeyModuleConfigurationImpl(SoftwareKeyModule keyModule) {
+ super(keyModule.getId());
+ this.keyModule = keyModule;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreTypeName()
+ */
+ public String getKeyStoreTypeName() {
+ return KEY_STORE_TYPE_NAME_PKCS12;
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreAsStream()
+ */
+ public InputStream getKeyStoreAsStream() {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ try {
+ String message =
+ msg.getMessage("config.18", new Object[] { keyModule.getFileName()});
+ Logger.info(new LogMsg(message));
+ return new FileInputStream(keyModule.getFileName());
+ } catch (FileNotFoundException e) {
+ String message =
+ msg.getMessage("config.09", new Object[] { keyModule.getFileName()});
+
+ throw new ConfigurationException(message, e, null);
+ }
+ }
+
+ /**
+ * @see iaik.server.modules.keys.SoftwareKeyModuleConfiguration#getKeyStoreAuthenticationData()
+ */
+ public char[] getKeyStoreAuthenticationData() {
+ return keyModule.getPassWord().toCharArray();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java
new file mode 100644
index 000000000..f6fbad215
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/config/ValidationConfigurationImpl.java
@@ -0,0 +1,56 @@
+package at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.security.cert.X509Certificate;
+import java.security.spec.AlgorithmParameterSpec;
+
+import iaik.pki.pathvalidation.ValidationConfiguration;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ValidationConfiguration</code> interface using
+ * MOA configuration data.
+ *
+ * @see iaik.pki.pathvalidation.ValidationConfiguration
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ValidationConfigurationImpl
+ extends AbstractObservableConfiguration
+ implements ValidationConfiguration {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>ValidationConfigurationImpl</code>.
+ *
+ * @param config The underlying MOA configuration data.
+ */
+ public ValidationConfigurationImpl(ConfigurationProvider config) {
+ this.config = config;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getChainingMode(java.security.cert.X509Certificate)
+ */
+ public String getChainingMode(X509Certificate cert) {
+ return config.getChainingMode(cert);
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsSpec(java.security.cert.X509Certificate)
+ */
+ public AlgorithmParameterSpec getPublicKeyParamsAsSpec(X509Certificate cert) {
+ return null;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationConfiguration#getPublicKeyParamsAsCert(java.security.cert.X509Certificate)
+ */
+ public X509Certificate getPublicKeyParamsAsCert(X509Certificate cert) {
+ return null;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
new file mode 100644
index 000000000..76f03ae07
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/PKIProfileImpl.java
@@ -0,0 +1,116 @@
+package at.gv.egovernment.moa.spss.server.iaik.pki;
+
+import iaik.pki.PKIProfile;
+import iaik.pki.pathvalidation.ValidationProfile;
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.store.truststore.TrustStoreProfile;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation.ValidationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.revocation.RevocationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore.TrustStoreProfileImpl;
+
+/**
+ * Implementation of the <code>PKIProfile</code> interface containing
+ * information needed for certificate path validation. It uses configuration
+ * data from the MOA configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class PKIProfileImpl implements PKIProfile {
+
+ /** Profile information for revocation checking. */
+ private RevocationProfile revocationProfile;
+ /** Profile information about the trust profile to use. */
+ private TrustStoreProfile trustStoreProfile;
+ /** Profile information about the certificate validation. */
+ private ValidationProfile validationProfile;
+ /** The <code>ConfigurationProvider</code> to read the MOA configuration data
+ * from. */
+ private ConfigurationProvider config;
+
+ /**
+ * Create a new <code>PKIProfileImpl</code>.
+ *
+ * @param config The MOA configuration providing configuration data about
+ * certificate path validation.
+ * @param trustProfileID The trust profile ID denoting the location of the
+ * trust store.
+ * @throws MOAApplicationException An error occurred building the profile.
+ */
+ public PKIProfileImpl(ConfigurationProvider config, String trustProfileID)
+ throws MOAApplicationException {
+
+ this.config = config;
+ setRevocationProfile(new RevocationProfileImpl(config));
+ setTrustStoreProfile(new TrustStoreProfileImpl(config, trustProfileID));
+ setValidationProfile(new ValidationProfileImpl(config));
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#autoAddCertificates()
+ */
+ public boolean autoAddCertificates()
+ {
+ return useAuthorityInfoAccess() ? true : config.getAutoAddCertificates();
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getRevocationProfile()
+ */
+ public RevocationProfile getRevocationProfile() {
+ return revocationProfile;
+ }
+
+ /**
+ * Sets the <code>RevocationProfile</code>.
+ *
+ * @param revocationProfile The <code>RevocationProfile</code> used for
+ * revocation checking.
+ */
+ protected void setRevocationProfile(RevocationProfile revocationProfile) {
+ this.revocationProfile = revocationProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getTrustStoreProfile()
+ */
+ public TrustStoreProfile getTrustStoreProfile() {
+ return trustStoreProfile;
+ }
+
+ /**
+ * Sets the <code>TrustStoreProfile</code>.
+ *
+ * @param trustStoreProfile The <code>TrustStoreProfile</code>.
+ */
+ protected void setTrustStoreProfile(TrustStoreProfile trustStoreProfile) {
+ this.trustStoreProfile = trustStoreProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#getValidationProfile()
+ */
+ public ValidationProfile getValidationProfile() {
+ return validationProfile;
+ }
+
+ /**
+ * Sets the <code>ValidationProfile</code>.
+ *
+ * @param validationProfile The <code>ValidationProfile</code> to set.
+ */
+ protected void setValidationProfile(ValidationProfile validationProfile) {
+ this.validationProfile = validationProfile;
+ }
+
+ /**
+ * @see iaik.pki.PKIProfile#useAuthorityInfoAccess()
+ */
+ public boolean useAuthorityInfoAccess()
+ {
+ return config.getUseAuthorityInfoAccess();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
new file mode 100644
index 000000000..a4d7ea7fa
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/pathvalidation/ValidationProfileImpl.java
@@ -0,0 +1,107 @@
+package at.gv.egovernment.moa.spss.server.iaik.pki.pathvalidation;
+
+import iaik.pki.pathvalidation.ValidationProfile;
+
+import java.util.Collections;
+import java.util.Set;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>ValidationProfile</code> interface providing
+ * information about certificat path validation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ValidationProfileImpl implements ValidationProfile {
+
+ /** The <code>ConfigurationProvider</code> to read the configuration data
+ * from. */
+ private ConfigurationProvider config;
+ private boolean initialAnyPolicyInhibit;
+ private boolean initialExplicitPolicy;
+ private boolean initialPolicyMappingInhibit;
+ private Set initialPolicySet;
+ private boolean nameConstraintsProcessing;
+ private boolean policyProcessing;
+
+ /**
+ * Create a new <code>ValidationProfileImpl</code> object.
+ *
+ * This objects's fields are preset to the following values:
+ *
+ * <ul>
+ * <li><code>initialAnyPolicyInhibit = true</code></li>
+ * <li><code>initialExplicitPoliy = true</code></li>
+ * <li><code>initialPolicyMappingInhibit = true</code></li>
+ * <li><code>initialPolicySet = empty</code></li>
+ * <li><code>policyProcessing = false</code></li>
+ * <li><code>nameConstraintsProcessing = false</code></li>
+ * <li><code>revocationChecking = false</code></li>
+ * </ul>
+ *
+ * @param config MOA configuration data for additional configuration
+ * information (currently unused).
+ */
+ public ValidationProfileImpl(ConfigurationProvider config) {
+ this.config = config;
+ initialAnyPolicyInhibit = true;
+ initialExplicitPolicy = true;
+ initialPolicyMappingInhibit = true;
+ initialPolicySet = Collections.EMPTY_SET;
+ policyProcessing = false;
+ nameConstraintsProcessing = false;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialAnyPolicyInhibit()
+ */
+ public boolean getInitialAnyPolicyInhibit() {
+ return initialAnyPolicyInhibit;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialExplicitPolicy()
+ */
+ public boolean getInitialExplicitPolicy() {
+ return initialExplicitPolicy;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicyMappingInhibit()
+ */
+ public boolean getInitialPolicyMappingInhibit() {
+ return initialPolicyMappingInhibit;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getInitialPolicySet()
+ */
+ public Set getInitialPolicySet() {
+ return initialPolicySet;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getPolicyProcessing()
+ */
+ public boolean getPolicyProcessing() {
+ return policyProcessing;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getNameConstraintsProcessing()
+ */
+ public boolean getNameConstraintsProcessing() {
+ return nameConstraintsProcessing;
+ }
+
+ /**
+ * @see iaik.pki.pathvalidation.ValidationProfile#getRevocationChecking()
+ */
+ public boolean getRevocationChecking()
+ {
+ return config.getEnableRevocationChecking();
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
new file mode 100644
index 000000000..c8809b0d8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/revocation/RevocationProfileImpl.java
@@ -0,0 +1,64 @@
+package at.gv.egovernment.moa.spss.server.iaik.pki.revocation;
+
+import java.security.cert.X509Certificate;
+
+import iaik.pki.revocation.RevocationProfile;
+import iaik.pki.revocation.RevocationSourceTypes;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * An implementation of the <code>RevocationProfile</code> interface providing
+ * information about revocation status checking, based on MOA configuration
+ * data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationProfileImpl implements RevocationProfile {
+ /** The default service order. */
+ private static final String[] DEFAULT_SERVICE_ORDER =
+ { RevocationSourceTypes.CRL, RevocationSourceTypes.OCSP };
+ /** The <code>ConfigurationProvider</code> to read the MOA configuration data
+ * from. */
+ private ConfigurationProvider config;
+ /** The OCSP request hash algorithm. Currently only "SHA" is supported. */
+ private static final String oCSPRequestHashAlgorithm = "SHA";
+
+ /**
+ * Create a new <code>RevocationProfileImpl</code>.
+ *
+ * @param config The MOA configuration data.
+ */
+ public RevocationProfileImpl(ConfigurationProvider config) {
+ this.config = config;
+ // currently only "SHA" is supported
+// this.oCSPRequestHashAlgorithm = "";
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getMaxRevocationAge(String)
+ */
+ public long getMaxRevocationAge(String distributionPointUri)
+ {
+ return config.getMaxRevocationAge();
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getOCSPRequestHashAlgorithm()
+ */
+ public String getOCSPRequestHashAlgorithm() {
+ return oCSPRequestHashAlgorithm;
+ }
+
+ /**
+ * @see iaik.pki.revocation.RevocationProfile#getPreferredServiceOrder(java.security.cert.X509Certificate)
+ */
+ public String[] getPreferredServiceOrder(X509Certificate cert)
+ {
+ String[] serviceOrder = config.getServiceOrder();
+ if (serviceOrder == null || serviceOrder.length == 0) return DEFAULT_SERVICE_ORDER;
+ return serviceOrder;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
new file mode 100644
index 000000000..c49f7fe8c
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/pki/store/truststore/TrustStoreProfileImpl.java
@@ -0,0 +1,135 @@
+package at.gv.egovernment.moa.spss.server.iaik.pki.store.truststore;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.pki.store.truststore.TrustStoreProfile;
+import iaik.pki.store.truststore.TrustStoreTypes;
+import iaik.pki.store.observer.NotificationData;
+import iaik.pki.store.observer.Observer;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+
+/**
+ * An implementation of the <code>TrustStoreProfile</code> interface, using data
+ * from the MOA configuration.
+ *
+ * @see iaik.pki.store.truststore.TrustStoreProfile
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TrustStoreProfileImpl implements TrustStoreProfile {
+
+ /** The observers of this profile. */
+ private List observers = new ArrayList();
+
+ /**
+ * The trust profile identifier.
+ */
+ private String id_;
+
+ /** The type of the trust profile. */
+ private String type;
+ /** The URI of the trust profile.*/
+ private String URI;
+
+ /**
+ * Create a new <code>TrustStoreProfileImpl</code>.
+ *
+ * @param config The MOA configuration data, from which trust store
+ * configuration data is read.
+ * @param trustProfileId The trust profile id on which this
+ * <code>TrustStoreProfile</code> is based.
+ * @throws MOAApplicationException The <code>trustProfileId</code> could not
+ * be found in the MOA configuration.
+ */
+ public TrustStoreProfileImpl(
+ ConfigurationProvider config,
+ String trustProfileId)
+ throws MOAApplicationException {
+
+ TrustProfile tp = (TrustProfile) config.getTrustProfile(trustProfileId);
+ if (tp != null)
+ {
+ id_ = trustProfileId;
+ setURI(tp.getUri());
+ setType(TrustStoreTypes.DIRECTORY);
+ }
+ else
+ {
+ throw new MOAApplicationException("2203", new Object[] { trustProfileId });
+ }
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getType()
+ */
+ public String getType() {
+ return type;
+ }
+
+ /**
+ * Sets the the trust store type.
+ *
+ * @param type The trust store type to set.
+ */
+ protected void setType(String type) {
+ this.type = type;
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getURI()
+ */
+ public String getURI() {
+ return URI;
+ }
+
+ /**
+ * Sets the trust store URI.
+ *
+ * @param URI The trust store URI to set.
+ */
+ protected void setURI(String URI) {
+ this.URI = URI;
+ }
+
+ //
+ // Methods of iaik.pki.store.observer.Observable interface
+ //
+
+ /**
+ * @see iaik.pki.store.observer.Observable#addObserver(iaik.pki.store.observer.Observer)
+ */
+ public void addObserver(Observer observer) {
+ observers.add(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#removeObserver(iaik.pki.store.observer.Observer)
+ */
+ public boolean removeObserver(Observer observer) {
+ return observers.remove(observer);
+ }
+
+ /**
+ * @see iaik.pki.store.observer.Observable#notify(iaik.pki.store.observer.NotificationData)
+ */
+ public void notify(NotificationData notificationData) {
+ for (Iterator iter = observers.iterator(); iter.hasNext();) {
+ Observer observer = (Observer) iter.next();
+ observer.notify(notificationData);
+ }
+ }
+
+ /**
+ * @see iaik.pki.store.truststore.TrustStoreProfile#getId()
+ */
+ public String getId()
+ {
+ return id_;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
new file mode 100644
index 000000000..e076fe1eb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/Base64TransformationImpl.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Base64Transformation;
+
+/**
+ * An implementation of the <code>Base64Transformation</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class Base64TransformationImpl
+ extends TransformationImpl
+ implements Base64Transformation {
+
+ /**
+ * Create a new <code>Base64TransformationImpl</code>.
+ *
+ * @see java.lang.Object#Object()
+ */
+ public Base64TransformationImpl() {
+ setAlgorithmURI(Base64Transformation.BASE64_DECODING);
+ }
+
+ /**
+ * Compare this <code>Base64Transformation</code> to another.
+ *
+ * @param other The object to compare this<code>Base64Transformation</code>
+ * to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>Base64Transformation</code> and the algorithm URIs match, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof Base64Transformation) {
+ Base64Transformation transform = (Base64Transformation) other;
+ return getAlgorithmURI().equals(transform.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
new file mode 100644
index 000000000..921b10cb6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteArrayDataObjectImpl.java
@@ -0,0 +1,54 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
+
+import iaik.server.modules.xml.BinaryDataObject;
+
+/**
+ * A <code>BinaryDataObject</code> encapsulating Base64 data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ByteArrayDataObjectImpl
+ extends DataObjectImpl
+ implements BinaryDataObject {
+
+ /** The binary data contained in this <code>BinaryDataObject</code>. */
+ private byte[] bytes;
+
+ /**
+ * Create a new <code>ByteArrayDataObjectImpl</code>.
+ *
+ * @param bytes The binary data contained in this
+ * <code>BinaryDataObject</code>.
+ */
+ public ByteArrayDataObjectImpl(byte[] bytes) {
+ setBytes(bytes);
+ }
+
+ /**
+ * Set the Base64 data.
+ *
+ * @param bytes The binary data contained in this
+ * <code>BinaryDataObject</code>.
+ */
+ public void setBytes(byte[] bytes) {
+ this.bytes = bytes;
+ }
+
+ /**
+ * Return the binary data encoded in the Base64 <code>String</code> as a
+ * stream.
+ *
+ * @return The binary data contained in this object, as a
+ * <code>InputStream</code>. Repeated calls to this function will return a
+ * new stream to the Base64 data.
+ * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
+ */
+ public InputStream getInputStream() {
+ return new ByteArrayInputStream(bytes);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
new file mode 100644
index 000000000..ce400e61a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ByteStreamDataObjectImpl.java
@@ -0,0 +1,49 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.InputStream;
+
+import iaik.server.modules.xml.BinaryDataObject;
+
+/**
+ * A <code>BinaryDataObject</code> encapsulating binary data from a stream.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ByteStreamDataObjectImpl
+ extends DataObjectImpl
+ implements BinaryDataObject {
+
+ /** The <code>InputStream</code> containing the binary data. */
+ private InputStream inputStream;
+
+ /**
+ * Create a new <code>ByteStreamDataObjectImpl</code>.
+ *
+ * @param inputStream The stream from which to read the binary data.
+ */
+ public ByteStreamDataObjectImpl(InputStream inputStream) {
+ setInputStream(inputStream);
+ }
+
+ /**
+ * Set the input stream from which to read the binary data.
+ *
+ * @param inputStream The input stream from which to read the binary data.
+ */
+ public void setInputStream(InputStream inputStream) {
+ this.inputStream = inputStream;
+ }
+
+ /**
+ * Return the binary data from this object as a stream.
+ *
+ * @return The stream containing the binary data. Calling this function
+ * repeatedly will always return the same <code>InputStream</code>.
+ * @see iaik.server.modules.xml.BinaryDataObject#getInputStream()
+ */
+ public InputStream getInputStream() {
+ return inputStream;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
new file mode 100644
index 000000000..a597b214d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/CanonicalizationImpl.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Canonicalization;
+
+/**
+ * An implementation of the <code>CanonicalizationTransform</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CanonicalizationImpl
+ extends TransformationImpl
+ implements Canonicalization {
+
+ /**
+ * Create a new <code>CanonicalizationTransformImpl</code> object.
+ *
+ * @param algorithmURI The canonicalization algorithm URI.
+ */
+ public CanonicalizationImpl(String algorithmURI) {
+ setAlgorithmURI(algorithmURI);
+ }
+
+ /**
+ * Compare this object to another <code>Canonicalization</code>.
+ *
+ * @param other The object to compare this
+ * <code>Canonicalization</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>Canonicalization</code> and the algorithm URIs match, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof Canonicalization) {
+ Canonicalization c14n = (Canonicalization) other;
+ return getAlgorithmURI().equals(c14n.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
new file mode 100644
index 000000000..875d82613
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/DataObjectImpl.java
@@ -0,0 +1,87 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.DataObject;
+
+/**
+ * Abstract base implementation for the classes derived from
+ * <code>DataObject</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class DataObjectImpl implements DataObject {
+
+ /** The MIME type of the data object. */
+ private String mimeType;
+ /** The refernce ID. */
+ private String referenceID;
+ /** The URI of the type. */
+ private String typeURI;
+ /** The URI identifying the data. */
+ private String URI;
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getMimeType()
+ */
+ public String getMimeType() {
+ return mimeType;
+ }
+
+ /**
+ * Set the mime type.
+ *
+ * @param mimeType The mime type to set.
+ */
+ public void setMimeType(String mimeType) {
+ this.mimeType = mimeType;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getReferenceID()
+ */
+ public String getReferenceID() {
+ return referenceID;
+ }
+
+ /**
+ * Set the reference ID.
+ *
+ * @param referenceID The reference ID.
+ */
+ public void setReferenceID(String referenceID) {
+ this.referenceID = referenceID;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getTypeURI()
+ */
+ public String getTypeURI() {
+ return typeURI;
+ }
+
+ /**
+ * Set the type URI.
+ *
+ * @param typeURI The type URI.
+ */
+ public void setTypeURI(String typeURI) {
+ this.typeURI = typeURI;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.DataObject#getURI()
+ */
+ public String getURI() {
+ return URI;
+ }
+
+ /**
+ * Set the URI.
+ *
+ * @param URI The URI.
+ */
+ public void setURI(String URI) {
+ this.URI = URI;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
new file mode 100644
index 000000000..41a47d0a1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/EnvelopedSignatureTransformationImpl.java
@@ -0,0 +1,42 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+
+/**
+ * An implementation of the <code>EnvelopedSignatureTransformation</code>
+ * <code>Transformation</code> type.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class EnvelopedSignatureTransformationImpl
+ extends TransformationImpl
+ implements EnvelopedSignatureTransformation {
+
+ /**
+ * Create a new <code>EnvelopedSignatureTransformationImpl</code>.
+ */
+ public EnvelopedSignatureTransformationImpl() {
+ setAlgorithmURI(EnvelopedSignatureTransformation.ENVELOPED_SIGNATURE);
+ }
+
+ /**
+ * Compare this object to another <code>EnvelopedSignatureTransformation</code>.
+ *
+ * @param other The object to compare this
+ * <code>EnvelopedSignatureTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>EnvelopedSignatureTransformation</code>, otherwise
+ * <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof EnvelopedSignatureTransformation) {
+ EnvelopedSignatureTransformation transform =
+ (EnvelopedSignatureTransformation) other;
+ return getAlgorithmURI().equals(transform.getAlgorithmURI());
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
new file mode 100644
index 000000000..b38fbe128
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/ExclusiveCanonicalizationImpl.java
@@ -0,0 +1,76 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.List;
+
+import iaik.server.modules.xml.ExclusiveCanonicalization;
+
+/**
+ * An implementation of the <code>ExclusiveCanonicalization</code> type
+ * of <code>Transformation</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExclusiveCanonicalizationImpl
+ extends TransformationImpl
+ implements ExclusiveCanonicalization {
+
+ /** The prefixes of the namespaces to treat according to canonical XML. */
+ private List inclusiveNamespacePrefixes;
+
+ /**
+ * Create a new <code>ExclusiveCanonicalizationImpl</code> object.
+ *
+ * @param algorithmURI The exclusive canonicalization algorithm URI.
+ * @param inclusiveNamespacePrefixes The namespace prefixes to be processed
+ * according to canonical XML.
+ */
+ public ExclusiveCanonicalizationImpl(
+ String algorithmURI,
+ List inclusiveNamespacePrefixes) {
+ setAlgorithmURI(algorithmURI);
+ setInclusiveNamespacePrefixes(inclusiveNamespacePrefixes);
+ }
+
+ /**
+ * Sets the namespace prefixes to be processed according to canonical XML.
+ *
+ * @param inclusiveNamespacePrefixes The prefixes of the namespaces to treat
+ * according to canonical XML.
+ */
+ protected void setInclusiveNamespacePrefixes(List inclusiveNamespacePrefixes) {
+ this.inclusiveNamespacePrefixes = inclusiveNamespacePrefixes;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.ExclusiveCanonicalization#getInclusiveNamespacePrefixes()
+ */
+ public List getInclusiveNamespacePrefixes() {
+ return inclusiveNamespacePrefixes;
+ }
+
+ /**
+ * Compare this object to another <code>CanonicalizationTransform</code>.
+ *
+ * @param other The object to compare this
+ * <code>ExclusiveCanonicalization</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>ExclusiveCanonicalization</code> and the algorithm URIs match,
+ * otherwise <code>false</code>.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof ExclusiveCanonicalization) {
+ ExclusiveCanonicalization eC14n =
+ (ExclusiveCanonicalization) other;
+ boolean algURIEquals = getAlgorithmURI().equals(eC14n.getAlgorithmURI());
+ boolean inclNSPrefs =
+ (getInclusiveNamespacePrefixes() == null || getInclusiveNamespacePrefixes().isEmpty())
+ ? eC14n.getInclusiveNamespacePrefixes() == null || eC14n.getInclusiveNamespacePrefixes().isEmpty()
+ : getInclusiveNamespacePrefixes().equals(eC14n.getInclusiveNamespacePrefixes());
+ return algURIEquals && inclNSPrefs;
+ }
+ return false;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
new file mode 100644
index 000000000..19ca3dadf
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/SigningTimeImpl.java
@@ -0,0 +1,34 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Date;
+
+import iaik.server.modules.xml.SigningTime;
+
+/**
+ * An implementation of the <code>SigningTime</code> <code>Property</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SigningTimeImpl implements SigningTime {
+
+ /** The signing time. */
+ private Date signingTime;
+
+ /**
+ * Create a new <code>SigningTimeImpl</code>.
+ *
+ * @param signingTime The signing time.
+ */
+ public SigningTimeImpl(Date signingTime) {
+ this.signingTime = signingTime;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.SigningTime#getSigningTime()
+ */
+ public Date getSigningTime() {
+ return signingTime;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
new file mode 100644
index 000000000..59a414b69
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/TransformationImpl.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import iaik.server.modules.xml.Transformation;
+
+/**
+ * Base implementation class for <code>Transformation</code> derived classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public abstract class TransformationImpl implements Transformation {
+
+ /** The algorithm URI identifying the transformation algorithm. */
+ private String algorithmURI;
+
+ /**
+ * @see iaik.server.modules.xml.Transformation#getAlgorithmURI()
+ */
+ public String getAlgorithmURI() {
+ return algorithmURI;
+ }
+
+ /**
+ * Sets the algorithm URI.
+ *
+ * @param algorithmURI The algorithm URI to set.
+ */
+ protected void setAlgorithmURI(String algorithmURI) {
+ this.algorithmURI = algorithmURI;
+ }
+
+ /**
+ * Returns the hash code of the algorithm URI. Should be overridden if a
+ * transformation distinguishes itself from others by more than just the
+ * algorithm URI.
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getAlgorithmURI().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
new file mode 100644
index 000000000..bc31d694e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLDataObjectImpl.java
@@ -0,0 +1,46 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.Element;
+
+import iaik.server.modules.xml.XMLDataObject;
+
+/**
+ * A <code>DataObject</code> containing a single DOM element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLDataObjectImpl
+ extends DataObjectImpl
+ implements XMLDataObject {
+
+ /** The XML data contained in this <code>XMLDataObject</code>. */
+ private Element element;
+
+ /**
+ * Create a new <code>XMLDataObjectImpl</code>.
+ *
+ * @param element The DOM element contained in this
+ * <code>XMLDataObject</code>.
+ */
+ public XMLDataObjectImpl(Element element) {
+ setElement(element);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLDataObject#getElement()
+ */
+ public Element getElement() {
+ return element;
+ }
+
+ /**
+ * Set the DOM element contained in this <code>XMLDataObject</code>.
+ *
+ * @param element The DOM element to set.
+ */
+ public void setElement(Element element) {
+ this.element = element;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
new file mode 100644
index 000000000..c855a922a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLNodeListDataObjectImpl.java
@@ -0,0 +1,47 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.NodeList;
+
+import iaik.server.modules.xml.XMLNodeListDataObject;
+
+/**
+ * A <code>DataObject</code> containing a list of DOM nodes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLNodeListDataObjectImpl
+ extends DataObjectImpl
+ implements XMLNodeListDataObject {
+
+ /** The nodes contained in this <code>XMLNodeListDataObject</code>. */
+ private NodeList nodeList;
+
+ /**
+ * Create a new <code>XMLNodeListDataObjectImpl</code>.
+ *
+ * @param nodeList The list of DOM nodes contained in this
+ * <code>XMLNodeListDataObject</code>.
+ */
+ public XMLNodeListDataObjectImpl(NodeList nodeList) {
+ setNodeList(nodeList);
+ }
+
+ /**
+ * Set the list of DOM nodes contained in this
+ * <code>XMLNodeListDataObject</code>.
+ *
+ * @param nodeList The list of DOM nodes to set.
+ */
+ public void setNodeList(NodeList nodeList) {
+ this.nodeList = nodeList;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLNodeListDataObject#getNodeList()
+ */
+ public NodeList getNodeList() {
+ return nodeList;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
new file mode 100644
index 000000000..4fca907f3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XMLSignatureImpl.java
@@ -0,0 +1,43 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import org.w3c.dom.Element;
+
+import iaik.server.modules.xml.XMLSignature;
+
+/**
+ * An object containing an XMLDsig signature in the form of a
+ * <code>dsig:Signature</code> DOM element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureImpl implements XMLSignature {
+ /** The signature DOM element. */
+ private Element element;
+
+ /**
+ * Create a new <code>XMLSignatureImpl</code>.
+ *
+ * @param element The <code>dsig:Signature</code> DOM element.
+ */
+ public XMLSignatureImpl(Element element) {
+ setElement(element);
+ }
+
+ /**
+ * Set the <code>dsig:Signature</code> DOM element.
+ *
+ * @param element The <code>dsig:Signature</code> element to set.
+ */
+ public void setElement(Element element) {
+ this.element = element;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XMLSignature#getElement()
+ */
+ public Element getElement() {
+ return element;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
new file mode 100644
index 000000000..034d4b653
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2FilterImpl.java
@@ -0,0 +1,116 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Map;
+
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPath2Transformation.XPath2Filter;
+
+/**
+ * An object encapsulating an XPath-Filter2 expression.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPath2FilterImpl implements XPath2Filter {
+
+ /** The type of this filter. */
+ private String filterType;
+ /** The XPath expression of this filter. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to use for evaluating the XPath. */
+ private Map namespaceDeclarations;
+
+ /**
+ * Create a new <code>XPath2FilterImpl</code> object.
+ *
+ * @param filterType The type of filter. Must be one of the filter type
+ * constants declared in <code>iaik.server.modules.xml.XPath2Transformation.XPath2Filter</code>
+ * @param xPathExpression The XPath expression belonging to this filter.
+ * @param namespaceDeclarations The namespace declarations visible for this
+ * XPath2Filter.
+ */
+ public XPath2FilterImpl(
+ String filterType,
+ String xPathExpression,
+ Map namespaceDeclarations) {
+
+ setFilterType(filterType);
+ setXPathExpression(xPathExpression);
+ setNamespaceDeclarations(namespaceDeclarations);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getFilterType()
+ */
+ public String getFilterType() {
+ return filterType;
+ }
+
+ /**
+ * Set the filter type.
+ *
+ * @param filterType The filter type to set.
+ */
+ protected void setFilterType(String filterType) {
+ this.filterType = filterType;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getXPathExpression()
+ */
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * Set the XPath expression.
+ *
+ * @param xPathExpression The XPath expression to set.
+ */
+ protected void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation.XPath2Filter#getNamespaceDeclarations()
+ */
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+ /**
+ * Set the namespace declarations.
+ *
+ * @param namespaceDeclarations The mapping between namespace prefixes and
+ * their associated URI.
+ */
+ protected void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ /**
+ * Compare this object to another.
+ *
+ * @param other The object to compare this <code>XPath2Filter</code> to.
+ * @return <code>true</code>, if <code>other</code> is a
+ * <code>XPath2Filter</code> and the filter types match and the XPath
+ * expressions match. Otherwise <code>false</code> is returned.
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPath2Transformation.XPath2Filter) {
+ XPath2Filter filter = (XPath2Transformation.XPath2Filter) other;
+ return getFilterType().equals(filter.getFilterType())
+ && getXPathExpression().equals(filter.getXPathExpression());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getXPathExpression().hashCode() * 31 + getFilterType().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
new file mode 100644
index 000000000..c7496c2cd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPath2TransformationImpl.java
@@ -0,0 +1,82 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.server.modules.xml.XPath2Transformation;
+
+/**
+ * An object encapsulating a <code>Transformation</code> containing several
+ * XPath-Filter2 expressions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPath2TransformationImpl
+ extends TransformationImpl
+ implements XPath2Transformation {
+
+ /** The filters contained in this <code>XPath2Transformation</code> */
+ private List xPathFilters = new ArrayList();
+
+ /**
+ * Create a new <code>XPath2TransformationImpl</code>.
+ *
+ * The list of XPath-Filter2 expression is initially empty.
+ */
+ public XPath2TransformationImpl() {
+ setAlgorithmURI(XPath2Transformation.XPATH2);
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPath2Transformation#getXPathFilters()
+ */
+ public List getXPathFilters() {
+ return xPathFilters;
+ }
+
+ /**
+ * Add an XPath-Filter2 expression to the list of filters.
+ *
+ * @param filter The filter to add.
+ */
+ public void addXPathFilter(XPath2Filter filter) {
+ xPathFilters.add(filter);
+ }
+
+ /**
+ * Compare this <code>XPath2Transformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XPath2Transformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XPath2Transformation</code> and <code>getXPathFilters()</code> equals
+ * <code>other.getXPathFilters()</code>. Otherwise <code>false</code> is
+ * returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPath2Transformation) {
+ XPath2Transformation transform = (XPath2Transformation) other;
+
+ return getXPathFilters().equals(transform.getXPathFilters());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ Iterator iter = getXPathFilters().iterator();
+ int hashCode = 0;
+
+ while (iter.hasNext()) {
+ hashCode ^= iter.next().hashCode();
+ }
+
+ return hashCode;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
new file mode 100644
index 000000000..ccedbadb2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XPathTransformationImpl.java
@@ -0,0 +1,98 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.util.Map;
+
+import iaik.server.modules.xml.XPathTransformation;
+
+/**
+ * A <code>Transformation</code> containing an XPath expression.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XPathTransformationImpl
+ extends TransformationImpl
+ implements XPathTransformation {
+
+ /** The XPath expression. */
+ private String xPathExpression;
+ /** The namespace prefix to URI mapping to use for XPath evaluation. */
+ private Map namespaceDeclarations;
+
+ /**
+ * Create a new <code>XPathTransformationImpl</code>.
+ *
+ * The namespace declarations are initialized empty.
+ *
+ * @param xPathExpression The XPath expression this object will contain.
+ * @param namespaceDeclarations The namespace declarations visible for this
+ * XPath.
+ */
+ public XPathTransformationImpl(
+ String xPathExpression,
+ Map namespaceDeclarations) {
+
+ setAlgorithmURI(XPathTransformation.XPATH);
+ setXPathExpression(xPathExpression);
+ setNamespaceDeclarations(namespaceDeclarations);
+ }
+
+ /**
+ * Set the XPath expression.
+ *
+ * @param xPathExpression The XPath expression.
+ */
+ protected void setXPathExpression(String xPathExpression) {
+ this.xPathExpression = xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPathTransformation#getXPathExpression()
+ */
+ public String getXPathExpression() {
+ return xPathExpression;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XPathTransformation#getNamespaceDeclarations()
+ */
+ public Map getNamespaceDeclarations() {
+ return namespaceDeclarations;
+ }
+
+ /**
+ * Set the namespace declarations.
+ *
+ * @param namespaceDeclarations The mapping between namespace prefixes and
+ * their associated URI.
+ */
+ protected void setNamespaceDeclarations(Map namespaceDeclarations) {
+ this.namespaceDeclarations = namespaceDeclarations;
+ }
+
+ /**
+ * Compare this <code>XPathTransformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XPathTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XPathTransformation</code> and if this object contains the same XPath
+ * expression as <code>other</code>. Otherwise <code>false</code> is returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XPathTransformation) {
+ XPathTransformation transform = (XPathTransformation) other;
+ return getXPathExpression().equals(transform.getXPathExpression());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ return getXPathExpression().hashCode();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
new file mode 100644
index 000000000..d38da650b
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xml/XSLTTransformationImpl.java
@@ -0,0 +1,168 @@
+package at.gv.egovernment.moa.spss.server.iaik.xml;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import iaik.ixsil.algorithms.CanonicalizationAlgorithm;
+import iaik.ixsil.algorithms.CanonicalizationAlgorithmImplExclusiveCanonicalXML;
+import iaik.ixsil.exceptions.AlgorithmException;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.util.NodeListAdapter;
+import at.gv.egovernment.moa.util.StreamUtils;
+import at.gv.egovernment.moa.util.XPathException;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+
+/**
+ * A <code>Transformation</code> containing an XSLT transformation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XSLTTransformationImpl
+ extends TransformationImpl
+ implements XSLTTransformation {
+
+ /** The XSLT stylesheet. */
+ private Element styleSheetElement;
+ /** The hash code of the canonicalized stylesheet. If calculated, this value
+ * should be != 0. */
+ private int hashCode;
+
+ /**
+ * Create a new <code>XSLTTransformationImpl</code> object.
+ *
+ * @param styleSheetElement The XSLT stylesheet element.
+ */
+ public XSLTTransformationImpl(Element styleSheetElement) {
+ setAlgorithmURI(XSLTTransformation.XSLT);
+ setStyleSheetElement(styleSheetElement);
+ }
+
+ /**
+ * Set the XSLT stylesheet element.
+ *
+ * @param styleSheetElement The XSLT stylesheet element to set.
+ */
+ protected void setStyleSheetElement(Element styleSheetElement) {
+ this.styleSheetElement = styleSheetElement;
+ this.hashCode = 0;
+ }
+
+ /**
+ * @see iaik.server.modules.xml.XSLTTransformation#getStylesheetElement()
+ */
+ public Element getStylesheetElement() {
+ return styleSheetElement;
+ }
+
+ /**
+ * Compare this <code>XSLTTransformation</code> to another.
+ *
+ * @param other The object to compare this
+ * <code>XSLTTransformation</code> to.
+ * @return <code>true</code>, if <code>other</code> is an
+ * <code>XSLTTransformation</code> and if the canonicalized representations of
+ * the stylesheets contained in <code>this</code> and <code>other</code>
+ * match. Otherwise, <code>false</code> is returned.
+ * @see java.lang.Object#equals(Object)
+ */
+ public boolean equals(Object other) {
+ if (other instanceof XSLTTransformation) {
+ XSLTTransformation xslt = (XSLTTransformation) other;
+
+ return compareElements(
+ getStylesheetElement(),
+ xslt.getStylesheetElement());
+ }
+ return false;
+ }
+
+ /**
+ * @see java.lang.Object#hashCode()
+ */
+ public int hashCode() {
+ if (hashCode == 0) {
+ hashCode = calculateHashCode(getStylesheetElement());
+ }
+ return hashCode;
+ }
+
+ /**
+ * Calculate the hash code for a DOM element by canonicalizing it.
+ *
+ * @param element The DOM element for which the hash code is to be calculated.
+ * @return int The hash code, or <code>0</code>, if it could not be
+ * calculated.
+ */
+ private static int calculateHashCode(Element element) {
+ try {
+ InputStream is = canonicalize(element);
+ byte[] buf = new byte[256];
+ int hashCode = 1;
+ int length;
+ int i;
+
+ while ((length = is.read(buf)) > 0) {
+ for (i = 0; i < length; i++) {
+ hashCode += buf[i] * 31 + i;
+ }
+ }
+ is.close();
+ return hashCode;
+ } catch (AlgorithmException e) {
+ return 0;
+ } catch (IOException e) {
+ return 0;
+ }
+ }
+
+ /**
+ * Compare two DOM elements by canonicalizing their contents and comparing the
+ * resulting byte stream.
+ *
+ * @param elem1 The 1st element to compare.
+ * @param elem2 The 2nd element to compare.
+ * @return boolean <code>true</code>, if the elements are considered equal
+ * after canonicalization. Otherwise <code>false</code> is returned.
+ */
+ private static boolean compareElements(Element elem1, Element elem2) {
+ try {
+ InputStream is1 = canonicalize(elem1);
+ InputStream is2 = canonicalize(elem2);
+ return StreamUtils.compareStreams(is1, is2);
+ } catch (AlgorithmException e) {
+ return false;
+ } catch (IOException e) {
+ return false;
+ }
+ }
+
+ /**
+ * Canonicalize a DOM element.
+ *
+ * @param element The element to canonicalize.
+ * @return InputStream A stream with the canonicalized data.
+ * @throws AlgorithmException An error occurred canonicalizing the element.
+ */
+ private static InputStream canonicalize(Element element)
+ throws AlgorithmException {
+ CanonicalizationAlgorithm c14n =
+ new CanonicalizationAlgorithmImplExclusiveCanonicalXML();
+ NodeList nodeList;
+
+ try {
+ nodeList = XPathUtils.selectNodeList(element, XPathUtils.ALL_NODES_XPATH);
+ } catch (XPathException e) {
+ nodeList = new NodeListAdapter(Collections.EMPTY_LIST);
+ }
+ c14n.setInput(nodeList);
+ return c14n.canonicalize();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java
new file mode 100644
index 000000000..a14b83b7d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/DataObjectTreatmentImpl.java
@@ -0,0 +1,150 @@
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import java.util.List;
+
+import iaik.server.modules.xmlsign.DataObjectTreatment;
+
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+
+/**
+ * An object encapsulating how to treat an associated <code>DataObject</code>
+ * when creating a signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataObjectTreatmentImpl implements DataObjectTreatment {
+ /** The final content MIME type. */
+ private String finalContentType;
+ /** The name of the hash algorithm. */
+ private String hashAlgorithmName;
+ /** This transformations to apply to the associated data object. */
+ private List transformationList;
+ /** Supplemental information for the transformations. */
+ private List transformationSupplements;
+ /** Whether to include the associated data object in the signature. */
+ private boolean includedInSignature;
+ /** Whether to include the associated data object in the manifest. */
+ private boolean referenceInManifest;
+ /** The object ID generator. */
+ private IdGenerator objIdGen;
+
+ /**
+ * Create a new <code>DataObjectTreatmentImpl</code>.
+ *
+ * @param objIdGen The <code>IdGenerator</code> for unique object IDs.
+ */
+ public DataObjectTreatmentImpl(IdGenerator objIdGen) {
+ this.objIdGen = objIdGen;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getFinalContentType()
+ */
+ public String getFinalContentType() {
+ return finalContentType;
+ }
+
+ /**
+ * Sets the final content type.
+ *
+ * @param finalContentType The final content type to set (a MIME-type type of
+ * <code>String</code>).
+ */
+ public void setFinalContentType(String finalContentType) {
+ this.finalContentType = finalContentType;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getHashAlgorithmName()
+ */
+ public String getHashAlgorithmName() {
+ return hashAlgorithmName;
+ }
+
+ /**
+ * Sets the hash algorithm name.
+ *
+ * @param hashAlgorithmName The hash algorithm name to set.
+ */
+ public void setHashAlgorithmName(String hashAlgorithmName) {
+ this.hashAlgorithmName = hashAlgorithmName;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#isIncludedInSignature()
+ */
+ public boolean isIncludedInSignature() {
+ return includedInSignature;
+ }
+
+ /**
+ * Sets whether the associated <code>DataObject</code> is to be included in
+ * the signature.
+ *
+ * @param includedInSignature If <code>true</code>, the associated
+ * <code>DataObject</code> will be included in the signature, otherwise not.
+ */
+ public void setIncludedInSignature(boolean includedInSignature) {
+ this.includedInSignature = includedInSignature;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#isReferenceInManifest()
+ */
+ public boolean isReferenceInManifest() {
+ return referenceInManifest;
+ }
+
+ /**
+ * Sets whether the associated <code>DataObject</code> is
+ * to be included in the <code>dsig:Manifest</code>.
+ *
+ * @param referenceInManifest If <code>true</code>, the associated
+ * <code>DataObject</code> will be included in the manifest, otherwise not.
+ */
+ public void setReferenceInManifest(boolean referenceInManifest) {
+ this.referenceInManifest = referenceInManifest;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getTransformationList()
+ */
+ public List getTransformationList() {
+ return transformationList;
+ }
+
+ /**
+ * Set the list of transformations for the associated <code>DataObject</code>.
+ *
+ * @param transformationList The transformations to set.
+ */
+ public void setTransformationList(List transformationList) {
+ this.transformationList = transformationList;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getTransformationSupplements()
+ */
+ public List getTransformationSupplements() {
+ return transformationSupplements;
+ }
+
+ /**
+ * Sets the transformation supplements for the associated
+ * <code>DataObject</code>.
+ *
+ * @param transformationSupplements The transformation supplements to set.
+ */
+ public void setTransformationSupplements(List transformationSupplements) {
+ this.transformationSupplements = transformationSupplements;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.DataObjectTreatment#getDsigDataObjectID()
+ */
+ public String getDsigDataObjectID() {
+ return objIdGen.uniqueId();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java
new file mode 100644
index 000000000..fb3ff4931
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureCreationProfileImpl.java
@@ -0,0 +1,279 @@
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import java.util.List;
+import java.util.Set;
+
+import iaik.server.modules.algorithms.SignatureAlgorithms;
+import iaik.server.modules.keys.AlgorithmUnavailableException;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+import iaik.server.modules.keys.UnknownKeyException;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+
+/**
+ * An object providing auxiliary information for creating an XML signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationProfileImpl
+ implements XMLSignatureCreationProfile {
+
+ /** The transformations to apply to a data object. */
+ private List dataObjectTreatmentList;
+ /** The set of keys available to the signing process. */
+ private Set keySet;
+ /** The type URI of the signature manifest. */
+ private String securityLayerManifestTypeURI;
+ /** Whether the created signature is to be Security Layer conform. */
+ private boolean securityLayerConform;
+ /** Where to insert the signature into the signature environment. */
+ private XMLSignatureInsertionLocation signatureInsertionLocation;
+ /** The signature structur type. */
+ private String signatureStructureType;
+ /** The type of <code>Canonicalization</code> to use for the signed info. */
+ private Canonicalization signedInfoCanonicalization;
+ /** Properties to be signed during signature creation. */
+ private List signedProperties;
+ /** The ID generator for signature IDs. */
+ private IdGenerator signatureIDGenerator;
+ /** The ID generator for manifst IDs. */
+ private IdGenerator manifestIDGenerator;
+ /** The ID generator for XMLDsig manifest IDs. */
+ private IdGenerator dsigManifestIDGenerator;
+ /** The ID generator for signed property IDs. */
+ private IdGenerator propertyIDGenerator;
+
+ /**
+ * Create a new <code>XMLSignatureCreationProfileImpl</code>.
+ *
+ * @param createProfileCount Provides external information about the
+ * number of calls to the signature creation module, using the same request.
+ * @param reservedIDs The set of IDs that must not be used while generating
+ * new IDs.
+ */
+ public XMLSignatureCreationProfileImpl(
+ int createProfileCount,
+ Set reservedIDs) {
+ signatureIDGenerator =
+ new IdGenerator("signature-" + createProfileCount, reservedIDs);
+ manifestIDGenerator =
+ new IdGenerator("manifest-" + createProfileCount, reservedIDs);
+ dsigManifestIDGenerator =
+ new IdGenerator("dsig-manifest-" + createProfileCount, reservedIDs);
+ propertyIDGenerator =
+ new IdGenerator("etsi-signed-" + createProfileCount, reservedIDs);
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getDataObjectTreatmentList()
+ */
+ public List getDataObjectTreatmentList() {
+ return dataObjectTreatmentList;
+ }
+
+ /**
+ * Sets the list of <code>DataObjectTreatment</code>s.
+ *
+ * @param dataObjectTreatmentList The <code>DataObjectTreatment</code>s to
+ * set.
+ */
+ public void setDataObjectTreatmentList(List dataObjectTreatmentList) {
+ this.dataObjectTreatmentList = dataObjectTreatmentList;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getKeySet()
+ */
+ public Set getKeySet() {
+ return keySet;
+ }
+
+ /**
+ * Set the set of <code>KeyEntryID</code>s which may be used for signature
+ * creation.
+ *
+ * @param keySet The set of <code>KeyEntryID</code>s to set.
+ */
+ public void setKeySet(Set keySet) {
+ this.keySet = keySet;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSecurityLayerManifestTypeURI()
+ */
+ public String getSecurityLayerManifestTypeURI() {
+ return securityLayerManifestTypeURI;
+ }
+
+ /**
+ * Set the SecurityLayerManifestTypeURI.
+ *
+ * @param securityLayerManifestTypeURI The SecurityLayerManifestTypeURI to
+ * set.
+ */
+ public void setSecurityLayerManifestTypeURI(String securityLayerManifestTypeURI) {
+ this.securityLayerManifestTypeURI = securityLayerManifestTypeURI;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureAlgorithmName(KeyEntryID)
+ */
+ public String getSignatureAlgorithmName(KeyEntryID selectedKeyID)
+ throws AlgorithmUnavailableException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ TransactionId tid = new TransactionId(context.getTransactionID());
+ KeyModule module = KeyModuleFactory.getInstance(tid);
+ Set algorithms;
+
+ try {
+ algorithms = module.getSupportedSignatureAlgorithms(selectedKeyID);
+ } catch (UnknownKeyException e) {
+ throw new AlgorithmUnavailableException(
+ "Unknown key entry: " + selectedKeyID,
+ e,
+ null);
+ }
+
+ if (algorithms.contains(SignatureAlgorithms.MD2_WITH_RSA) // TODO retournierten Algorithmus abhängig von der Schlüssellänge machen (bei längeren Schlüsseln SHA256 statt SHA1)
+ || algorithms.contains(SignatureAlgorithms.MD5_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.RIPEMD128_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.RIPEMD160_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.SHA1_WITH_RSA)
+ || algorithms.contains(SignatureAlgorithms.SHA256_WITH_RSA)) {
+
+ return SignatureAlgorithms.SHA1_WITH_RSA;
+ } else if (
+ algorithms.contains(SignatureAlgorithms.ECDSA)) {
+ return SignatureAlgorithms.ECDSA;
+ } else if (
+ algorithms.contains(SignatureAlgorithms.DSA)) {
+ return SignatureAlgorithms.DSA;
+ } else {
+ throw new AlgorithmUnavailableException(
+ "No algorithm for key entry: " + selectedKeyID,
+ null,
+ null);
+ }
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureInsertionLocation()
+ */
+ public XMLSignatureInsertionLocation getSignatureInsertionLocation() {
+ return signatureInsertionLocation;
+ }
+
+ /**
+ * Set the location where the signature is to be inserted into the signature
+ * parent.
+ *
+ * @param signatureInsertionLocation The location to set.
+ */
+ public void setSignatureInsertionLocation(XMLSignatureInsertionLocation signatureInsertionLocation) {
+ this.signatureInsertionLocation = signatureInsertionLocation;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureStructureType()
+ */
+ public String getSignatureStructureType() {
+ return signatureStructureType;
+ }
+
+ /**
+ * Set the signature structure type.
+ * @param signatureStructureType The signature structure type to set.
+ */
+ public void setSignatureStructureType(String signatureStructureType) {
+ this.signatureStructureType = signatureStructureType;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedInfoCanonicalization()
+ */
+ public Canonicalization getSignedInfoCanonicalization() {
+ return signedInfoCanonicalization;
+ }
+
+ /**
+ * Sets the canonicalization method to use for the SignedInfo object.
+ *
+ * @param signedInfoCanonicalization The canonicalization method to set.
+ */
+ public void setSignedInfoCanonicalization(Canonicalization signedInfoCanonicalization) {
+ this.signedInfoCanonicalization = signedInfoCanonicalization;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedProperties()
+ */
+ public List getSignedProperties() {
+ return signedProperties;
+ }
+
+ /**
+ * Set the signed properties.
+ *
+ * @param signedProperties The signed properties to set.
+ */
+ public void setSignedProperties(List signedProperties) {
+ this.signedProperties = signedProperties;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#isSecurityLayerConform()
+ */
+ public boolean isSecurityLayerConform() {
+ return securityLayerConform;
+ }
+
+ /**
+ * Sets the security layer conformity.
+ *
+ * @param securityLayerConform <code>true</code>, if the created signature
+ * is to be conform to the Security Layer specification.
+ */
+ public void setSecurityLayerConform(boolean securityLayerConform) {
+ this.securityLayerConform = securityLayerConform;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignatureID()
+ */
+ public String getSignatureID() {
+ return signatureIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSecurityLayerManifestID()
+ */
+ public String getSecurityLayerManifestID() {
+ return manifestIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getDsigManifestID()
+ */
+ public String getDsigManifestID() {
+ return dsigManifestIDGenerator.uniqueId();
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureCreationProfile#getSignedPropertiesID()
+ */
+ public String getSignedPropertiesID() {
+ return propertyIDGenerator.uniqueId();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java
new file mode 100644
index 000000000..d55f61303
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlsign/XMLSignatureInsertionLocationImpl.java
@@ -0,0 +1,45 @@
+package at.gv.egovernment.moa.spss.server.iaik.xmlsign;
+
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+/**
+ * An object giving the location of where the signature will be
+ * inserted into the parent element.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureInsertionLocationImpl
+ implements XMLSignatureInsertionLocation {
+
+ /** Where to put the signature into the signature parent element. */
+ private int signatureChildIndex;
+
+ /**
+ * Create a new <code>XMLSignatureInsertLocationImpl</code>.
+ *
+ * @param signatureChildIndex The position index at which to append the
+ * signature to the parent element.
+ */
+ public XMLSignatureInsertionLocationImpl(int signatureChildIndex) {
+ setSignatureChildIndex(signatureChildIndex);
+ }
+
+ /**
+ * @see iaik.server.modules.xmlsign.XMLSignatureInsertionLocation#getSignatureChildIndex()
+ */
+ public int getSignatureChildIndex() {
+ return signatureChildIndex;
+ }
+
+ /**
+ * Sets the position index at which to append the signature to the parent
+ * element.
+ *
+ * @param signatureChildIndex The position index to set.
+ */
+ public void setSignatureChildIndex(int signatureChildIndex) {
+ this.signatureChildIndex = signatureChildIndex;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java
new file mode 100644
index 000000000..216596dc3
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/iaik/xmlverify/XMLSignatureVerificationProfileImpl.java
@@ -0,0 +1,131 @@
+package at.gv.egovernment.moa.spss.server.iaik.xmlverify;
+
+import java.util.List;
+
+import iaik.pki.PKIProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+
+/**
+ * An object providing auxiliary information for verifying an XML signature.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationProfileImpl
+ implements XMLSignatureVerificationProfile {
+
+ /** Whether to check the Security Layer manifest. */
+ private boolean checkSecurityLayerManifest;
+ /** Whether to check the XMLDsig manifest. */
+ private boolean checkXMLDsigManifests;
+ /** The profile for validating the signer certificate. */
+ private PKIProfile certificateValidationProfile;
+ /** Supplements for the transformations. */
+ private List transformationSupplements;
+ /** Whether to include hash input data in the response. */
+ private boolean includeHashInputData;
+ /** Whether to include reference input data in the response. */
+ private boolean includeReferenceInputData;
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkSecurityLayerManifest()
+ */
+ public boolean checkSecurityLayerManifest() {
+ return checkSecurityLayerManifest;
+ }
+
+ /**
+ * Set whether to check the references in the Security Layer manifest.
+ *
+ * @param checkSecurityLayerManifest <code>true</code>, if the references
+ * in the Security Layer manifest must be checked.
+ */
+ public void setCheckSecurityLayerManifest(boolean checkSecurityLayerManifest) {
+ this.checkSecurityLayerManifest = checkSecurityLayerManifest;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#checkXMLDsigManifests()
+ */
+ public boolean checkXMLDsigManifests() {
+ return checkXMLDsigManifests;
+ }
+
+ /**
+ * Sets whether to check the references of all XML Dsig manifests.
+ *
+ * @param checkXMLDSigManifests <code>true</code>, if the references in the
+ * XML Dsig manifest must be checked.
+ */
+ public void setCheckXMLDsigManifests(boolean checkXMLDSigManifests) {
+ this.checkXMLDsigManifests = checkXMLDSigManifests;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getCertificateValidationProfile()
+ */
+ public PKIProfile getCertificateValidationProfile() {
+ return certificateValidationProfile;
+ }
+
+ /**
+ * Sets the profile for validating the signer certificate.
+ *
+ * @param certificateValidationProfile The certificate validation profile to
+ * set.
+ */
+ public void setCertificateValidationProfile(PKIProfile certificateValidationProfile) {
+ this.certificateValidationProfile = certificateValidationProfile;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#getTransformationSupplements()
+ */
+ public List getTransformationSupplements() {
+ return transformationSupplements;
+ }
+
+ /**
+ * Sets the transformation supplements.
+ *
+ * @param transformationSupplements The transformation supplements to set.
+ */
+ public void setTransformationSupplements(List transformationSupplements) {
+ this.transformationSupplements = transformationSupplements;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeHashInputData()
+ */
+ public boolean includeHashInputData() {
+ return includeHashInputData;
+ }
+
+ /**
+ * Set whether to include the hash input data in the result.
+ *
+ * @param includeHashInputData If <code>true</code>, the hash input data
+ * will be returned in the result.
+ */
+ public void setIncludeHashInputData(boolean includeHashInputData) {
+ this.includeHashInputData = includeHashInputData;
+ }
+
+ /**
+ * @see iaik.server.modules.xmlverify.XMLSignatureVerificationProfile#includeReferenceInputData()
+ */
+ public boolean includeReferenceInputData() {
+ return includeReferenceInputData;
+ }
+
+ /**
+ * Set whether to include the reference input data in the result.
+ *
+ * @param includeReferenceInputData If <code>true</code>, the reference
+ * input data will be included in the result.
+ */
+ public void setIncludeReferenceInputData(boolean includeReferenceInputData) {
+ this.includeReferenceInputData = includeReferenceInputData;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java
new file mode 100644
index 000000000..caf17db66
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/ConfiguratorImpl.java
@@ -0,0 +1,42 @@
+package at.gv.egovernment.moa.spss.server.init;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+
+/**
+ * Default implementation of <code>Configurator</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfiguratorImpl extends Configurator {
+ /** whether the configuration has been initialized */
+ private boolean initialized = false;
+
+ public void init() throws MOAException {
+ if (!initialized) {
+ SystemInitializer.init();
+ initialized = true;
+ }
+ }
+
+ public void update() throws MOAException {
+ if (!initialized) {
+ return;
+ }
+
+ try {
+ // reconfigure the system
+ ConfigurationProvider config = ConfigurationProvider.reload();
+ new IaikConfigurator().configure(config);
+ } catch (MOAException e) {
+ throw e;
+ } catch (Throwable t) {
+ throw new ConfigurationException("", null, t);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java
new file mode 100644
index 000000000..4871ac4fe
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/init/SystemInitializer.java
@@ -0,0 +1,129 @@
+package at.gv.egovernment.moa.spss.server.init;
+
+import java.io.IOException;
+import java.security.Security;
+
+import javax.net.ssl.SSLSocketFactory;
+
+import org.apache.axis.AxisProperties;
+
+import iaik.ixsil.init.IXSILInit;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.service.RevocationArchiveCleaner;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * MOA SP/SS web service initialization.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SystemInitializer {
+ /** Interval between archive cleanups in seconds */
+ private static final long ARCHIVE_CLEANUP_INTERVAL = 60 * 60; // 1h
+ /** The MOA SP/SS logging hierarchy. */
+ private static final String LOGGING_HIERARCHY = "moa.spss.server";
+ /** Whether XML schema grammars have been initialized. */
+ private static boolean grammarsInitialized = false;
+
+ /**
+ * Initialize the MOA SP/SS webservice.
+ */
+ public static void init() {
+ MessageProvider msg = MessageProvider.getInstance();
+ ClassLoader cl = SystemInitializer.class.getClassLoader();
+ Thread archiveCleaner;
+
+ // set up the MOA SPSS logging hierarchy
+ Logger.setHierarchy(LOGGING_HIERARCHY);
+
+ // set up a logging context for logging the startup
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext("startup"));
+
+ // load some jsse classes so that the integrity of the jars can be verified
+ // before the iaik jce is installed as the security provider
+ // this workaround is only needed when sun jsse is used in conjunction with
+ // iaik-jce (on jdk1.3)
+ try {
+ cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar
+ } catch (ClassNotFoundException e) {
+ Logger.warn(msg.getMessage("init.03", null), e);
+ }
+
+ // set up SUN JSSE SSL
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ SSLSocketFactory.getDefault();
+
+
+// AxisProperties.setProperty("enableNamespacePrefixOptimization","false");
+// AxisProperties.setProperty("disablePrettyXML", "true");
+// AxisProperties.setProperty("axis.doAutoTypes", "true");
+
+ // initialize preparsed Xerces grammar pool for faster XML
+ // parsing/validating
+ try {
+ if (!grammarsInitialized) {
+ Class clazz = SystemInitializer.class;
+ // preparse XML schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.XML_SCHEMA_LOCATION),
+ Constants.XML_NS_URI);
+ // preparse XMLDsig Filter2 schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.DSIG_FILTER2_SCHEMA_LOCATION),
+ Constants.DSIG_FILTER2_NS_URI);
+ // preparse XMLDsig schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.DSIG_SCHEMA_LOCATION),
+ Constants.DSIG_NS_URI);
+ // preparse MOA schema
+ DOMUtils.addSchemaToPool(
+ clazz.getResourceAsStream(Constants.MOA_SCHEMA_LOCATION),
+ Constants.MOA_NS_URI);
+ grammarsInitialized = true;
+ }
+ } catch (IOException e) {
+ Logger.warn(new LogMsg(msg.getMessage("init.04", null)), e);
+ }
+
+ // initialize configuration
+ try {
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ new IaikConfigurator().configure(config);
+ Logger.info(new LogMsg(msg.getMessage("init.01", null)));
+ } catch (MOAException e) {
+ Logger.fatal(new LogMsg(msg.getMessage("init.00", null)), e);
+ }
+
+ // set IXSIL debug output
+ IXSILInit.setPrintDebugLog(
+ Logger.isDebugEnabled(IaikLog.IAIK_LOG_HIERARCHY));
+
+ // start the archive cleanup thread
+ archiveCleaner =
+ new Thread(new RevocationArchiveCleaner(ARCHIVE_CLEANUP_INTERVAL));
+ archiveCleaner.setName("RevocationArchiveCleaner");
+ archiveCleaner.setDaemon(true);
+ archiveCleaner.setPriority(Thread.MIN_PRIORITY);
+ archiveCleaner.start();
+
+ // unset the startup logging context
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
new file mode 100644
index 000000000..f7a322d11
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvoker.java
@@ -0,0 +1,221 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationModule;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationModuleFactory;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+import iaik.server.modules.cmsverify.CMSSignatureVerificationResult;
+
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContent;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentReference;
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSDataObject;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A class providing an interface to the
+ * <code>CMSSignatureVerificationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.cmsverify.CMSSignatureVerificationModule</code>
+ * from a <code>VerifyCMSSignatureRequest</code>. The result of the invocation
+ * is integrated into a <code>VerifyCMSSignatureResponse</code> returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationInvoker {
+
+ /** The single instance of this class. */
+ private static CMSSignatureVerificationInvoker instance = null;
+
+ /**
+ * Return the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized CMSSignatureVerificationInvoker getInstance() {
+ if (instance == null) {
+ instance = new CMSSignatureVerificationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>CMSSignatureVerificationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected CMSSignatureVerificationInvoker() {
+ }
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing the
+ * CMS signature, as well as additional data needed for verification.
+ * @return Element A <code>VerifyCMSSignatureResponse</code> containing the
+ * answer to the <code>VerifyCMSSignatureRequest</code>.
+ * @throws MOAException An error occurred while processing the request.
+ */
+ public VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException {
+ CMSSignatureVerificationProfileFactory profileFactory =
+ new CMSSignatureVerificationProfileFactory(request);
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ InputStream signature;
+ InputStream signedContent = null;
+ CMSSignatureVerificationProfile profile;
+ Date signingTime;
+ List results;
+ CMSSignatureVerificationResult result;
+ int[] signatories;
+ InputStream input;
+ byte[] buf = new byte[256];
+
+ // get the signature
+ signature = request.getCMSSignature();
+
+ try {
+ // get the signed content
+ signedContent = getSignedContent(request);
+
+ // build the profile
+ profile = profileFactory.createProfile();
+
+ // get the signing time
+ signingTime = request.getDateTime();
+
+ // verify the signature
+ CMSSignatureVerificationModule module =
+ CMSSignatureVerificationModuleFactory.getInstance();
+
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ module.init(
+ signature,
+ signedContent,
+ profile,
+ new TransactionId(context.getTransactionID()));
+ input = module.getInputStream();
+
+ while (input.read(buf) > 0);
+ results = module.verifySignature(signingTime);
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IOException e) {
+ throw new MOAApplicationException("2244", null, e);
+ } catch (MOAException e)
+ {
+ throw e;
+ }
+ finally
+ {
+ try
+ {
+ if (signedContent != null) signedContent.close();
+ }
+ catch (Throwable t)
+ {
+ // Intentionally do nothing here
+ }
+ }
+
+ // build the response: for each signatory add the result to the response
+ signatories = request.getSignatories();
+ if (signatories == VerifyCMSSignatureRequest.ALL_SIGNATORIES) {
+ Iterator resultIter;
+
+ for (resultIter = results.iterator(); resultIter.hasNext();) {
+ result = (CMSSignatureVerificationResult) resultIter.next();
+ responseBuilder.addResult(result);
+ }
+ } else {
+ int i;
+
+ for (i = 0; i < signatories.length; i++) {
+ int sigIndex = signatories[i] - 1;
+
+ try {
+ result =
+ (CMSSignatureVerificationResult) results.get(signatories[i] - 1);
+ responseBuilder.addResult(result);
+ } catch (IndexOutOfBoundsException e) {
+ throw new MOAApplicationException(
+ "2249",
+ new Object[] { new Integer(sigIndex)});
+ }
+ }
+ }
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Get the signed content contained either in the request itself or given as a
+ * reference to external data.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing the
+ * signed content (or the reference to the signed content).
+ * @return InputStream A stream providing the signed content data, or
+ * <code>null</code> if no signed content was provided with the request.
+ * @throws MOAApplicationException An error occurred building the stream.
+ */
+ private InputStream getSignedContent(VerifyCMSSignatureRequest request)
+ throws MOAApplicationException {
+
+ CMSDataObject dataObj;
+ CMSContent content;
+
+ // select the Content element
+ dataObj = request.getDataObject();
+ if (dataObj == null) {
+ return null;
+ }
+ content = dataObj.getContent();
+
+ // build the content data
+ switch (content.getContentType()) {
+ case CMSContent.EXPLICIT_CONTENT :
+ return ((CMSContentExcplicit) content).getBinaryContent();
+ case CMSContent.REFERENCE_CONTENT :
+ String reference = ((CMSContentReference) content).getReference();
+ if (!"".equals(reference)) {
+ ExternalURIResolver resolver = new ExternalURIResolver();
+ return resolver.resolve(reference);
+ } else {
+ return null;
+ }
+ default :
+ return null;
+ }
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java
new file mode 100644
index 000000000..442921850
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationProfileFactory.java
@@ -0,0 +1,61 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.server.modules.cmsverify.CMSSignatureVerificationProfile;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.cmsverify.CMSSignatureVerificationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.pki.PKIProfileImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A factory to create a <code>CMSSignatureVerificationProfile</code> from a
+ * <code>VerifyCMSSignatureRequest</code> and the current MOA configuration
+ * data.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationProfileFactory {
+
+ /** The <code>VerifyCMSSignatureRequest</code> to draw profile data from. */
+ private VerifyCMSSignatureRequest request;
+
+ /**
+ * Create a new <code>CMSSignatureVerificationProfileFactory</code>.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> to draw profile
+ * data from.
+ */
+ public CMSSignatureVerificationProfileFactory(VerifyCMSSignatureRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * Create a <code>CMSSignatureVerificationProfile</code> from the given
+ * request and the current MOA configuration.
+ *
+ * @return The <code>CMSSignatureVerificationProfile</code> for the
+ * <code>request</code>, based on the current configuration.
+ * @throws MOAException An error occurred creating the profile.
+ */
+ public CMSSignatureVerificationProfile createProfile()
+ throws MOAException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CMSSignatureVerificationProfileImpl profile =
+ new CMSSignatureVerificationProfileImpl();
+ String trustProfileID;
+
+ // set the certificate validation profile
+ trustProfileID = request.getTrustProfileId();
+ profile.setCertificateValidationProfile(
+ new PKIProfileImpl(config, trustProfileID));
+
+ return profile;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..6302cadfd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/CreateXMLSignatureResponseBuilder.java
@@ -0,0 +1,71 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.ErrorResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.SignatureEnvironmentResponse;
+
+/**
+ * A class to build a <code>CreateXMLSignatureResponse</code>.
+ *
+ * <p>The methods <code>addSignature()</code> and <code>addError()</code> may be
+ * called in any combination to add <code>SignatureEnvironment</code> and
+ * <code>ErrorResponse</code> elements to the response. One of these functions
+ * must be called at least once to produce a
+ * <code>CreateXMLSignatureResponse</code>.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>CreateXMLSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureResponseBuilder {
+
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+ /** The elements to add to the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Get the <code>CreateXMLSignatureResponse</code> built so far.
+ *
+ * @return The <code>CreateXMLSignatureResponse</code> built so far.
+ */
+ public CreateXMLSignatureResponse getResponse() {
+ return factory.createCreateXMLSignatureResponse(responseElements);
+ }
+
+ /**
+ * Add a <code>SignatureEnvironment</code> element to the response.
+ *
+ * @param signatureEnvironment The content to put under the
+ * <code>SignatureEnvironment</code> element. This should either be a
+ * <code>dsig:Signature</code> element (in case of a detached signature) or
+ * the signature environment containing the signature (in case of
+ * an enveloping signature).
+ */
+ public void addSignatureEnvironment(Element signatureEnvironment) {
+ SignatureEnvironmentResponse responseElement =
+ factory.createSignatureEnvironmentResponse(signatureEnvironment);
+ responseElements.add(responseElement);
+ }
+
+ /**
+ * Add a <code>ErrorResponse</code> element to the response.
+ *
+ * @param errorCode The error code.
+ * @param info Additional information about the error.
+ */
+ public void addError(String errorCode, String info) {
+ ErrorResponse errorResponse =
+ factory.createErrorResponse(Integer.parseInt(errorCode), info);
+ responseElements.add(errorResponse);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java
new file mode 100644
index 000000000..1386d5c2d
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactory.java
@@ -0,0 +1,892 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.xml.sax.EntityResolver;
+import org.xml.sax.SAXException;
+
+import iaik.ixsil.util.URI;
+import iaik.ixsil.util.XPointerReferenceResolver;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.EntityResolverChain;
+import at.gv.egovernment.moa.util.MOAEntityResolver;
+import at.gv.egovernment.moa.util.MOAErrorHandler;
+import at.gv.egovernment.moa.util.StreamEntityResolver;
+import at.gv.egovernment.moa.util.StreamUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.ContentBinary;
+import at.gv.egovernment.moa.spss.api.common.ContentLocRef;
+import at.gv.egovernment.moa.spss.api.common.ContentXML;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterBinary;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteArrayDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteStreamDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.DataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLNodeListDataObjectImpl;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A class to create <code>DataObject</code>s contained in different
+ * locations of the MOA XML request format.
+ *
+ * @author Patrick Peck
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class DataObjectFactory {
+
+ /** The single instance of this class. */
+ private static DataObjectFactory instance = null;
+
+ /**
+ * Return the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized DataObjectFactory getInstance() {
+ if (instance == null) {
+ instance = new DataObjectFactory();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>DataObjectFactory</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected DataObjectFactory() {
+ }
+
+ /**
+ * Return the signature environment, i.e., the root element of the
+ * document, into which the signature will be inserted (if created) or which
+ * contains the signature (if verified).
+ *
+ * @param content The <code>Content</code> object containing the signature
+ * environment.
+ * @param supplements Additional schema or DTD information.
+ * @return The signature environment or <code>null</code>, if no
+ * signature environment exists.
+ * @throws MOASystemException A system error occurred building the signature
+ * environment (see message for details).
+ * @throws MOAApplicationException An error occurred building the signature
+ * environment (see message for details).
+ */
+ public XMLDataObject createSignatureEnvironment(
+ Content content,
+ List supplements)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ EntityResolver entityResolver;
+ byte[] contentBytes;
+
+ // check for content and reference not being set at the same time
+ checkAllowContentAndReference(content, false);
+
+ // build the EntityResolver for validating parsing
+ if (supplements == null || supplements.isEmpty()) {
+ entityResolver = new MOAEntityResolver();
+ } else {
+ EntityResolverChain chain = new EntityResolverChain();
+
+ chain.addEntityResolver(buildSupplementEntityResolver(supplements));
+ chain.addEntityResolver(new MOAEntityResolver());
+ entityResolver = chain;
+ }
+
+ // convert the content into a byte array
+ try {
+ switch (content.getContentType()) {
+ case Content.BINARY_CONTENT :
+ {
+ InputStream is = ((ContentBinary) content).getBinaryContent();
+ contentBytes = StreamUtils.readStream(is);
+ break;
+ }
+ case Content.LOCREF_CONTENT:
+ {
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ InputStream is = null;
+ try
+ {
+ is = uriResolver.resolve(locRefURI);
+ contentBytes = StreamUtils.readStream(is);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3203", new Object[]{reference, locRefURI}, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ break;
+ }
+ case Content.REFERENCE_CONTENT :
+ {
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ InputStream is = null;
+ try
+ {
+ is = uriResolver.resolve(reference);
+ contentBytes = StreamUtils.readStream(is);
+ }
+ catch (Exception e)
+ {
+ throw e;
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ break;
+ }
+ case Content.XML_CONTENT :
+ {
+ Element element =
+ checkForSingleElement(((ContentXML) content).getXMLContent());
+ contentBytes = DOMUtils.serializeNode(element, "UTF-8");
+ break;
+ }
+ default :
+ contentBytes = null; // this will not happen
+ }
+ } catch (MOAApplicationException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new MOAApplicationException("2219", null);
+ }
+
+ // try to parse validating
+ try {
+ ByteArrayInputStream is = new ByteArrayInputStream(contentBytes);
+ Document doc =
+ DOMUtils.parseDocument(
+ is,
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null,
+ entityResolver,
+ new MOAErrorHandler());
+
+ return new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ // never mind, we'll try non-validating
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.info(new LogMsg(msg.getMessage("invoker.00", null)));
+ }
+
+ // try to parse non-validating
+ try {
+ ByteArrayInputStream is = new ByteArrayInputStream(contentBytes);
+ Document doc = DOMUtils.parseDocument(is, false, null, null);
+ return new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ throw new MOAApplicationException("2218", null);
+ }
+ }
+
+ /**
+ * Create an <code>XMLDataObject</code> from the given signature environment.
+ *
+ * @param signatureEnvironment The signature environment contained in the
+ * result.
+ * @param uri The URI identifying the data. This must be either the empty
+ * URI, an URI starting with <code>"#xpointer"</code>, <code>"#xmlns"</code>
+ * or <code>"#element"</code>; or an URI starting with <code>"#"</code> and
+ * followed by an element ID.
+ * @param referenceID The reference ID to set for the data object.
+ * @return A data object containing the signature environment.
+ */
+ public DataObject createFromSignatureEnvironment(
+ Element signatureEnvironment,
+ String uri,
+ String referenceID)
+ throws MOAApplicationException {
+
+ DataObjectImpl dataObject = null;
+
+ if ("".equals(uri)) {
+ dataObject = new XMLDataObjectImpl(signatureEnvironment);
+ } else if (
+ uri.startsWith("#xpointer")
+ || uri.startsWith("#xmlns")
+ || uri.startsWith("#element")) {
+ try {
+ XPointerReferenceResolver resolver = new XPointerReferenceResolver();
+ URI uriObj = new URI(uri);
+ NodeList nodes =
+ resolver.resolveForest(
+ uriObj,
+ signatureEnvironment.getOwnerDocument(),
+ null);
+ dataObject = new XMLNodeListDataObjectImpl(nodes);
+ } catch (Exception e) {
+ throw new MOAApplicationException("2237", new Object[] { uri });
+ }
+ } else if (uri.startsWith("#")) {
+ String id = uri.substring(1);
+ Element refElem =
+ signatureEnvironment.getOwnerDocument().getElementById(id);
+
+ if (refElem == null) {
+ throw new MOAApplicationException("2237", new Object[] { id });
+ }
+ dataObject = new XMLDataObjectImpl(refElem);
+ }
+
+ dataObject.setReferenceID(referenceID);
+ dataObject.setURI(uri);
+
+ return dataObject;
+ }
+
+ /**
+ * Build a <code>StreamEntityResolver</code> from a <code>List</code> of
+ * supplements.
+ *
+ * @param supplements The supplements, given as
+ * <code>XMLDataObjectAssociation</code>s.
+ * @return A <code>StreamEntityResolver</code> mapping the supplements by
+ * their reference URI to an <code>InputStream</code> of their respective
+ * content.
+ */
+ private static StreamEntityResolver buildSupplementEntityResolver(List supplements)
+ throws MOAApplicationException
+ {
+ Map entities = new HashMap();
+ Iterator iter;
+
+ for (iter = supplements.iterator(); iter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) iter.next();
+ Content content = supplement.getContent();
+ String reference = content.getReference();
+
+ switch (content.getContentType()) {
+ case Content.BINARY_CONTENT :
+ {
+ entities.put(reference, ((ContentBinary) content).getBinaryContent());
+ break;
+ }
+ case Content.LOCREF_CONTENT:
+ {
+ ExternalURIResolver uriResolver = new ExternalURIResolver();
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ InputStream contentIS = null;
+ InputStream uriStream = null;
+ try
+ {
+ uriStream = uriResolver.resolve(locRefURI);
+ byte[] contentBytes = StreamUtils.readStream(uriStream);
+ contentIS = new ByteArrayInputStream(contentBytes);
+ }
+ catch (Exception e)
+ {
+ throw new MOAApplicationException("3202", new Object[]{reference, locRefURI}, e);
+ }
+ finally
+ {
+ closeInputStream(uriStream);
+ }
+ entities.put(reference, contentIS);
+ break;
+ }
+ case Content.XML_CONTENT :
+ {
+ // serialize the first element node that is found in the supplement
+ // and make it available as a stream
+ NodeList nodes = ((ContentXML) content).getXMLContent();
+ int i = 0;
+
+ // find the first element node
+ while (i < nodes.getLength()
+ && nodes.item(i).getNodeType() != Node.ELEMENT_NODE)
+ i++;
+
+ // serialize the node
+ if (i < nodes.getLength()) {
+ try
+ {
+ byte[] serialized = DOMUtils.serializeNode(nodes.item(i), "UTF-8");
+ entities.put(reference, new ByteArrayInputStream(serialized));
+ }
+ catch (Exception e)
+ {
+ throw new MOAApplicationException("2281", new Object[]{reference}, e);
+ }
+ }
+ break;
+ }
+ }
+ }
+
+ return new StreamEntityResolver(entities);
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>Content</code> object.
+ *
+ * @param content The <code>Content</code> object containing the data.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param referenceID The reference ID to set in the resulting
+ * <code>DataObject</code>. May be <code>null</code>.
+ * @param allowContentAndReference If <code>true</code>, then
+ * <code>content</code> is allowed to contain both a <code>Reference</code>
+ * attribute and content. Otherwise, either a <code>Reference</code>
+ * attribute or content must be set.
+ * @param binaryAsXml If <code>true</code>, a content child given as
+ * <code>Base64Content</code> must contain XML data.
+ * @param xmlAsNodeList If <code>true</code>, the children of a
+ * <code>XMLContent</code> child element are returned as a
+ * <code>XMLNodeListDataObject</code>. Otherwise, <code>XMLContent</code> may
+ * only contain a single child node, which must be an element and which is
+ * returned as an <code>XMLDataObject</code>.
+ * @param referenceAsXml If <code>true</code>, then content loaded from the
+ * URI given as the <code>Reference</code> attribute must be XML data.
+ * If <code>false</code>, an attempt is made to parse the data as XML and
+ * return an <code>XMLDataObject</code> but if this fails, a
+ * <code>BinaryDataObject</code> is returned containing a byte stream to the
+ * data.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>content</code>. If <code>base64AsXml==true</code> and
+ * <code>xmlAsNodeList==false</code> and <code>referenceAsXml==true</code>,
+ * then the result can safely be cast to an <code>XMLDataObject</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while opening a reference or parsing the data). See the wrapped
+ * exception for details.
+ */
+ public DataObject createFromContentOptionalRefType(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ String referenceID,
+ boolean allowContentAndReference,
+ boolean binaryAsXml,
+ boolean xmlAsNodeList,
+ boolean referenceAsXml)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ DataObjectImpl dataObject = null;
+
+ checkAllowContentAndReference(content, allowContentAndReference);
+
+ // ok, build the data object; use content first, if available
+ switch (content.getContentType())
+ {
+ case Content.XML_CONTENT :
+ {
+ ContentXML contentXml = (ContentXML) content;
+ dataObject = createFromXmlContent(contentXml, xmlAsNodeList);
+ break;
+ }
+ case Content.BINARY_CONTENT :
+ {
+ ContentBinary contentBinary = (ContentBinary) content;
+ dataObject = createFromBinaryContent(contentBinary, binaryAsXml, false);
+ break;
+ }
+ case Content.LOCREF_CONTENT :
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ try
+ {
+ dataObject = createFromURIImpl(locRefURI, referenceAsXml);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3201", new Object[]{reference, locRefURI}, e);
+ }
+ break;
+ }
+ case Content.REFERENCE_CONTENT :
+ {
+ dataObject = createFromURIImpl(reference, referenceAsXml);
+ break;
+ }
+ }
+
+ // set URI and reference ID
+ dataObject.setURI(reference);
+ dataObject.setReferenceID(referenceID);
+
+ // set Type gathered from corresponding meta information
+ dataObject.setTypeURI(finalDataMetaInfo.getType());
+
+ return dataObject;
+ }
+
+ /**
+ * Check, if content and reference URIs are allowed in the content an throw
+ * an exception if an illegal combination of the two occurs.
+ *
+ * @param content The <code>Content</code> to check.
+ * @param allowContentAndReference Whether explicit content and a reference
+ * are allowed at the same time.
+ * @throws MOAApplicationException If <code>allowContentAndRefernece</code>
+ * is <code>false</code> and both explicit content and reference are set,
+ * an exception is thrown.
+ */
+ private static void checkAllowContentAndReference(
+ Content content,
+ boolean allowContentAndReference)
+ throws MOAApplicationException {
+ String reference = content.getReference();
+
+ // check for content and reference not being set
+ if (content.getContentType() == Content.REFERENCE_CONTENT
+ && reference == null) {
+ String errorCode = allowContentAndReference ? "1111" : "1110";
+ throw new MOAApplicationException(errorCode, null);
+ }
+
+ // if we only allow either content or reference being set at once, check
+ if (!allowContentAndReference
+ && (content.getContentType() != Content.REFERENCE_CONTENT)
+ && (reference != null)) {
+ throw new MOAApplicationException("1110", null);
+ }
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a
+ * <code>XMLDataObjectAssociation</code> object.
+ *
+ * @param xmlDataObjAssoc The <code>XMLDataObjectAssociation</code> object.
+ * @param xmlContentAllowed Whether the content contained in the
+ * <code>xmlDataObjAssoc</code> is allowed to be of type
+ * <code>XML_CONTENT</code>.
+ * @param binaryContentRepeatable If binary content must be provided as a
+ * <code>DataObject</code> that can be read multiple times.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>xmlDataObjAssoc</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while parsing the data). See the wrapped exception for details.
+ */
+ public DataObject createFromXmlDataObjectAssociation(
+ XMLDataObjectAssociation xmlDataObjAssoc,
+ boolean xmlContentAllowed,
+ boolean binaryContentRepeatable)
+ throws MOASystemException, MOAApplicationException {
+
+ Content content = xmlDataObjAssoc.getContent();
+ MetaInfo metaInfo = xmlDataObjAssoc.getMetaInfo();
+ String mimeType = metaInfo != null ? metaInfo.getMimeType() : null;
+ DataObjectImpl dataObject = null;
+
+ switch (content.getContentType())
+ {
+ case Content.XML_CONTENT :
+ {
+ if (xmlContentAllowed)
+ {
+ dataObject = createFromXmlContent((ContentXML) content, true);
+ }
+ else
+ {
+ throw new MOAApplicationException("2280", null);
+ }
+ break;
+ }
+ case Content.BINARY_CONTENT :
+ {
+ dataObject = createFromBinaryContent(
+ (ContentBinary) content,
+ false,
+ binaryContentRepeatable);
+ break;
+ }
+ case Content.LOCREF_CONTENT :
+ {
+ String locRefURI = ((ContentLocRef) content).getLocationReferenceURI();
+ try
+ {
+ dataObject = createFromURIImpl(locRefURI, false);
+ }
+ catch (MOAApplicationException e)
+ {
+ throw new MOAApplicationException("3201", new Object[]{content.getReference(), locRefURI}, e);
+ }
+ break;
+ }
+ }
+
+ dataObject.setURI(content.getReference());
+ dataObject.setMimeType(mimeType);
+ return dataObject;
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>TransformParameter</code>
+ * object.
+ *
+ * @param transformParameter The <code>TransformParameter</code> object
+ * containing the data.
+ * @return A <code>DataObject</code> representing the data in
+ * <code>root</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while opening a reference or parsing the data). See the wrapped
+ * exception for details.
+ */
+ public DataObject createFromTransformParameter(TransformParameter transformParameter)
+ throws MOASystemException, MOAApplicationException {
+
+ DataObjectImpl dataObject;
+
+ switch (transformParameter.getTransformParameterType()) {
+ case TransformParameter.BINARY_TRANSFORMPARAMETER :
+ TransformParameterBinary tpBinary =
+ (TransformParameterBinary) transformParameter;
+
+ try {
+ //dataObject = new ByteArrayDataObjectImpl(Base64Utils.encode(tpBinary.getBinaryContent()));
+ dataObject =
+ new ByteArrayDataObjectImpl(
+ StreamUtils.readStream(tpBinary.getBinaryContent()));
+ } catch (Exception e) {
+ return null;
+ }
+ //dataObject = new ByteStreamDataObjectImpl(tpBinary.getBinaryContent());
+ break;
+ default :
+ // resolve uri and build the content
+ ExternalURIResolver resolver = new ExternalURIResolver();
+ InputStream is = resolver.resolve(transformParameter.getURI());
+ ByteArrayInputStream bis;
+ try
+ {
+ bis = new ByteArrayInputStream(StreamUtils.readStream(is));
+ }
+ catch (IOException e)
+ {
+ throw new MOAApplicationException("2238", new Object[] {transformParameter.getURI()}, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ String contentType = resolver.getContentType();
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ dataObject.setMimeType(contentType);
+ break;
+ }
+
+ dataObject.setURI(transformParameter.getURI());
+
+ return dataObject;
+ }
+
+ /**
+ * Create a <code>DataObject</code> from data located at the given URI.
+ *
+ * @param uri The <code>URI</code> where the data is located. This method uses
+ * an <code>ExternalURIResolver</code> to resolve URIs.
+ * @param asXml If <code>true</code>, a <code>DataObject</code> is only
+ * returned, if the content consists of XML data. If it does not consist of
+ * XML data, an <code>MOAApplicationException</code> will be thrown. If this
+ * parameter is <code>false</code> and the content consists of XML data, this
+ * method will still attempt to parse it.
+ * @return The <code>DataObject</code> contained at the URI.
+ * @throws MOASystemException A system error parsing the XML content.
+ * @throws MOAApplicationException An error occurred on opening, reading or
+ * parsing the data behind the URI.
+ */
+ public DataObject createFromURI(String uri, boolean asXml)
+ throws MOASystemException, MOAApplicationException {
+ return createFromURIImpl(uri, asXml);
+ }
+
+ /**
+ * Create a <code>DataObject</code> from data located at the given URI.
+ *
+ * @param uri The <code>URI</code> where the data is located. This method uses
+ * an <code>ExternalURIResolver</code> to resolve URIs.
+ * @param asXml If <code>true</code>, a <code>DataObject</code> is only
+ * returned, if the content consists of XML data. If it does not consist of
+ * XML data, an <code>MOAApplicationException</code> will be thrown. If this
+ * parameter is <code>false</code> and the content type is detected as being
+ * XML data, this method will still attemt to parse it.
+ * @return The <code>DataObject</code> contained at the URI.
+ * @throws MOASystemException A system error parsing the XML content.
+ * @throws MOAApplicationException An error occurred on opening, reading or
+ * parsing the data behind the URI.
+ */
+ private DataObjectImpl createFromURIImpl(String uri, boolean asXml)
+ throws MOASystemException, MOAApplicationException {
+
+ ExternalURIResolver resolver = new ExternalURIResolver();
+ InputStream is = resolver.resolve(uri);
+ String contentType = resolver.getContentType();
+ DataObjectImpl dataObject;
+
+ // read the content
+ if (contentType != null && contentTypeIsXml(contentType)) {
+ Document doc;
+
+ if (asXml) {
+ try {
+ // try parsing non-validating: this has to succeed or we
+ // bail out by throwing an exception
+ is = resolver.resolve(uri);
+ doc = DOMUtils.parseDocument(is, false, null, null);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("1106", null, e);
+ } catch (SAXException e) {
+ throw new MOAApplicationException("2209", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ } else {
+ try {
+ // try parsing non-validating: need not succeed
+ is = resolver.resolve(uri);
+ doc = DOMUtils.parseDocument(is, false, null, null);
+ closeInputStream(is);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (Exception e) {
+ // this is the last chance: return the data as a byte stream
+ is = resolver.resolve(uri);
+ ByteArrayInputStream bis;
+ try
+ {
+ bis = new ByteArrayInputStream(StreamUtils.readStream(is));
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ }
+ catch (IOException e1)
+ {
+ throw new MOAApplicationException("2210", new Object[] { uri }, e1);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ }
+ }
+ }
+ else if (asXml)
+ {
+ // if we need XML data, we're in the wrong place here
+ closeInputStream(is);
+ throw new MOAApplicationException("2211", new Object[] { uri });
+ }
+ else
+ {
+ // content is binary: make it available as a binary input stream
+ ByteArrayInputStream bis;
+ try
+ {
+ bis = new ByteArrayInputStream(StreamUtils.readStream(is));
+ }
+ catch (IOException e)
+ {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ finally
+ {
+ closeInputStream(is);
+ }
+ dataObject = new ByteStreamDataObjectImpl(bis);
+ }
+
+ dataObject.setMimeType(contentType);
+ dataObject.setURI(uri);
+
+ return dataObject;
+ }
+
+ /**
+ * Savely closes the specified input stream.
+ *
+ * @param is The input stream to be closed.
+ */
+ private static void closeInputStream(InputStream is)
+ {
+ try
+ {
+ if (is != null) is.close();
+ }
+ catch (Throwable t)
+ {
+ // Intentionally do nothing here
+ }
+ }
+
+ /**
+ * Determine whether the content type is XML.
+ *
+ * Content types recognized as XML start with <code>text/xml</code> and
+ * <code>application/xml</code>.
+ *
+ * @param contentType The content MIME type.
+ * @return boolean If <code>true</code>, the content type is XML, otherwise
+ * not.
+ */
+ private static boolean contentTypeIsXml(String contentType) {
+ return contentType.startsWith("text/xml")
+ || (contentType.startsWith("application/xml"));
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>ContentXML</code> object.
+ *
+ * @param xmlContent The <code>ContentXML</code> object from
+ * which the <code>DataObject</code> is to be built.
+ * @param xmlAsNodeList If <code>true</code>, the children of
+ * <code>xmlContent</code> are returned as a
+ * <code>XMLNodeListDataObject</code>. Otherwise,
+ * <code>xmlContent</code> may only contain a single child node, which must be
+ * an element and which is returned as an <code>XMLDataObject</code>.
+ * @return A <code>DataObject</code> representing the XML content in
+ * <code>xmlContent</code>.
+ * @throws MOAApplicationException If <code>xmlAsNodeList</code> is
+ * <code>false</code> and <code>xmlContent</code> does not have a single child
+ * element.
+ */
+ private DataObjectImpl createFromXmlContent(
+ ContentXML xmlContent,
+ boolean xmlAsNodeList)
+ throws MOAApplicationException {
+
+ DataObjectImpl dataObject;
+
+ if (xmlAsNodeList) {
+ dataObject = new XMLNodeListDataObjectImpl(xmlContent.getXMLContent());
+ } else {
+ NodeList nodes = xmlContent.getXMLContent();
+ Element element = checkForSingleElement(nodes);
+
+ // build the XMLDataObject
+ dataObject = new XMLDataObjectImpl(element);
+ }
+ return dataObject;
+ }
+
+ /**
+ * Check, that the given <code>NodeList</code> contains a single DOM element
+ * node and return it, otherwise throw an exception.
+ *
+ * @param nodes The <code>NodeList</code> to check for a single element.
+ * @return The single element contained in <code>nodes</code>.
+ * @throws MOAApplicationException Thrown, if <code>nodes</code> does not
+ * contain exactly 1 element node.
+ */
+ private Element checkForSingleElement(NodeList nodes)
+ throws MOAApplicationException {
+
+ Element element = null;
+ int i;
+
+ // check for a single element node
+ for (i = 0; i < nodes.getLength(); i++) {
+ if (nodes.item(i).getNodeType() == Node.ELEMENT_NODE) {
+ if (element == null) {
+ element = (Element) nodes.item(i);
+ } else {
+ throw new MOAApplicationException("1109", null);
+ }
+ }
+ }
+
+ // return the element node
+ if (element == null) {
+ throw new MOAApplicationException("1107", null);
+ } else {
+ return element;
+ }
+ }
+
+ /**
+ * Create a <code>DataObject</code> from a <code>ContentBinary</code> object.
+ *
+ * @param binaryContent The <code>ContentBinary</code> object containing the
+ * data.
+ * @param asXml If <code>true</code>, <code>binaryContent</code> must
+ * contain XML data. Otherwise, a <code>BinaryDataObject</code> will be
+ * returned containing a byte stream to the decoded Base64 data.
+ * @param repeatable If multiple calls to <code>getInputStream()</code> must
+ * repeatedly return the content of the data object.
+ * @return A <code>DataObject</code> representing the content contained in
+ * <code>binaryContent</code>.
+ * @throws MOASystemException An error indicating an internal problem. See the
+ * wrapped exception for details.
+ * @throws MOAApplicationException An error occurred handling the content
+ * (probably while parsing the data). See the wrapped exception for details.
+ */
+ private DataObjectImpl createFromBinaryContent(
+ ContentBinary binaryContent,
+ boolean asXml,
+ boolean repeatable)
+ throws MOASystemException, MOAApplicationException {
+
+ InputStream byteStream = binaryContent.getBinaryContent();
+ DataObjectImpl dataObject;
+
+ if (asXml) {
+ Document doc;
+
+ try {
+ doc = DOMUtils.parseDocument(byteStream, false, null, null);
+ dataObject = new XMLDataObjectImpl(doc.getDocumentElement());
+ } catch (ParserConfigurationException e) {
+ throw new MOASystemException("1106", null, e);
+ } catch (SAXException e) {
+ throw new MOAApplicationException("2209", null, e);
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null, e);
+ }
+ } else {
+ if (repeatable) {
+ try {
+ dataObject =
+ new ByteArrayDataObjectImpl(StreamUtils.readStream(byteStream));
+ } catch (IOException e) {
+ throw new MOAApplicationException("2210", null);
+ }
+ } else {
+ dataObject = new ByteStreamDataObjectImpl(byteStream);
+ }
+ }
+
+ return dataObject;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java
new file mode 100644
index 000000000..106742067
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ExternalURIResolver.java
@@ -0,0 +1,162 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.net.URLConnection;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Resolve external URIs and provide them as a stream.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ExternalURIResolver {
+
+ /** The MIME type of the content currently resolved. */
+ private String contentType;
+
+ /**
+ * Return a stream to data at the given URI.
+ *
+ * This method will try to open an <code>URLConnection</code> to the given
+ * URI. Access to the file system is disallowed.
+ *
+ * @param uriStr The URI to resolve.
+ * @return InputStream The data contained at the URI.
+ * @throws MOAApplicationException An error occurred resolving the URI (e.g.,
+ * the URI is syntactically incorrect or the stream could not be opened).
+ */
+ public InputStream resolve(String uriStr) throws MOAApplicationException {
+ URI uri;
+ URL url;
+ URLConnection connection;
+ InputStream is;
+
+ // build the URI
+ try {
+ uri = new URI(uriStr);
+ } catch (URIException e) {
+ throw new MOAApplicationException("2207", new Object[] { uriStr });
+ }
+
+ // disallow access to local file system
+ if ("".equals(uri.getScheme()) || "file".equals(uri.getScheme())) {
+ throw new MOAApplicationException("2213", new Object[] { uriStr });
+ }
+
+ // if we have local content (SOAP with attachments)
+ if ("formdata".equals(uri.getScheme())) {
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ if (context==null) {
+ //no transaction
+ throw new MOAApplicationException("2282", new Object[] { uri });
+ } else {
+
+ InputStream attachmentIs = context.getAttachmentInputStream(uri);
+ if (attachmentIs != null) {
+ setContentType(context.getAttachmentContentType(uri.getPath()));
+ return attachmentIs;
+ } else {
+ //maybe attachments provided but no suiting attachment found
+ throw new MOAApplicationException("2282", new Object[] { uri });
+ }
+/*
+ try {
+ InputStream attachmentIs = context.getAttachment(uri).getInputStream();
+ if (attachmentIs != null) {
+ setContentType(context.getAttachmentContentType(uri.getPath()));
+ return attachmentIs;
+ } else {
+ //maybe attachments provided but no suiting attachment found
+ throw new MOAApplicationException("2282", new Object[] { uri });
+ }
+ } catch (IOException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ }
+*/
+ }
+ }
+
+ // convert URI to URL
+ try {
+ // create the URL
+ url = new URL(uriStr);
+ } catch (MalformedURLException e) {
+ throw new MOAApplicationException("2214", new Object[] { uriStr });
+ }
+
+ // build the URLConnection
+ try {
+ connection = url.openConnection();
+ if ("http".equals(url.getProtocol())) {
+ HttpURLConnection httpConnection = (HttpURLConnection) connection;
+
+ httpConnection.connect();
+ if (httpConnection.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new MOAApplicationException("2208", new Object[] { uri });
+ }
+ } else if ("https".equals(url.getProtocol())) {
+ /*
+ * this doesn't work because of some interaction between the IAIK
+ * JCE and Sun JSSE that results in an "Invalid AVA format" exception
+ */
+
+ /*
+ HttpsURLConnection httpsConnection = (HttpsURLConnection) connection;
+ InputStream trustStore =
+ getClass().getResourceAsStream(DEFAULT_TRUST_STORE);
+ SSLSocketFactory factory =
+ SSLUtils.getSSLSocketFactory("jks", trustStore, "changeit");
+ httpsConnection.setSSLSocketFactory(factory);
+ httpsConnection.connect();
+ if (httpConnection.getResponseCode() != HttpURLConnection.HTTP_OK) {
+ throw new MOAApplicationException("2208", new Object[] { uri });
+ }
+ */
+ connection.connect();
+ } else {
+ connection.connect();
+ }
+ is = connection.getInputStream();
+ } catch (IOException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ } /*catch (GeneralSecurityException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ }*/
+
+ // set the content type
+ setContentType(connection.getContentType());
+
+ return is;
+ }
+
+ /**
+ * Set the content type of the data at the URI.
+ *
+ * @param contentType The content type to set.
+ */
+ protected void setContentType(String contentType) {
+ this.contentType = contentType;
+ }
+
+ /**
+ * Return the content type of the data detected at the URI from the previous
+ * call of <code>resolve()</code>.
+ *
+ * @return String The content type.
+ */
+ public String getContentType() {
+ return contentType;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
new file mode 100644
index 000000000..60f573e5a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/IaikExceptionMapper.java
@@ -0,0 +1,267 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.lang.reflect.Constructor;
+import java.util.HashMap;
+import java.util.Map;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+
+
+/**
+ * Map an exception from the <code>iaik</code> namespace to a
+ * <code>MOAException</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikExceptionMapper {
+
+ /** The argument classes for <code>MOAException</code>s. */
+ private static final Class[] CONSTRUCTOR_ARGS =
+ new Class[] { String.class, Object[].class, Throwable.class };
+ /** The exception mapping, as an array. */
+ private static final Object[][] MESSAGES =
+ {
+ { iaik.IAIKException.class, "9900", MOASystemException.class },
+ { iaik.IAIKRuntimeException.class, "9901", MOASystemException.class },
+ { iaik.server.modules.xmlsign.XMLSignatureCreationException.class, "2220", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.XMLSignatureCreationRuntimeException.class, "2220", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.InvalidKeyException.class, "2221", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.ManifestException.class, "2222", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.ReferenceException.class, "2223", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.HashUnavailableException.class, "2224", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureAlgorithmException.class, "2225", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureEmbeddingException.class, "2226", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignatureValueException.class, "2227", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignedPropertyException.class, "2228", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SignerCertificateUnavailableException.class, "2229", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.SupplementException.class, "2230", MOAApplicationException.class },
+ { iaik.server.modules.xmlsign.TransformationException.class, "2233", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationRuntimeException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.AlgorithmNotSupportedException.class, "2241", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureParsingException.class, "2242", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.SignerCertificateUnavailableException.class, "2243", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.CMSSignatureVerificationRuntimeException.class, "2247", MOAApplicationException.class },
+ { iaik.server.modules.cmsverify.InitException.class, "2248", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.XMLSignatureVerificationException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.XMLSignatureVerificationRuntimeException.class, "2240", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.AlgorithmNotSupportedException.class, "2241", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.ManifestException.class, "2262", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.PropertiesException.class, "2263", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.ReferenceException.class, "2264", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.HashUnavailableException.class, "2224", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.SignerCertificateUnavailableException.class, "2243", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.SupplementException.class, "2230", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.TransformationException.class, "2265", MOAApplicationException.class },
+ { iaik.server.modules.xmlverify.TransformationParsingException.class, "2269", MOAApplicationException.class }
+ };
+
+ /** The single instance of this class. */
+ private static IaikExceptionMapper instance;
+ /** The exception mapping, as a <code>Map</code> for fast lookup. */
+ private Map messages = new HashMap();
+
+ /**
+ * Get the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized IaikExceptionMapper getInstance() {
+ if (instance == null) {
+ instance = new IaikExceptionMapper();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>IaikExceptionMapper</code>.
+ *
+ * Protected to disallow multple instances.
+ */
+ protected IaikExceptionMapper() {
+ registerMessages();
+ }
+
+ /**
+ * Build the complete <code>IAIKException</code> to message code mapping.
+ */
+ protected void registerMessages() {
+ int i;
+
+ for (i = 0; i < MESSAGES.length; i++) {
+ registerMessage(
+ (Class) MESSAGES[i][0],
+ (String) MESSAGES[i][1],
+ (Class) MESSAGES[i][2]);
+ }
+ }
+
+ /**
+ * Register a single <code>IAIKException</code> to message mapping.
+ *
+ * @param iaikExceptionClass An exception from the <code>iaik</code> package.
+ * @param messageId The corresponding error message id.
+ * @param moaExceptionClass The type of <code>MOAException</code> that the
+ * <code>IAIKException</code> is mapped to (usually
+ * <code>MOAApplicationException</code> or <code>MOASystemException</code>).
+ */
+ protected void registerMessage(
+ Class iaikExceptionClass,
+ String messageId,
+ Class moaExceptionClass) {
+
+ messages.put(
+ iaikExceptionClass,
+ new ExceptionMappingInfo(messageId, moaExceptionClass));
+ }
+
+ /**
+ * Map an <code>IAIKException</code> to a <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKException</code>.
+ */
+ public MOAException map(IAIKException iaikException) {
+ return mapImpl(iaikException);
+ }
+
+ /**
+ * Map an <code>IAIKRuntimeException</code> to a <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKRuntimeException</code>.
+ */
+ public MOAException map(IAIKRuntimeException iaikException) {
+ return mapImpl(iaikException);
+ }
+
+ /**
+ * Map an <code>IAIKException</code> or <code>IAIKRuntimeException</code> to a
+ * <code>MOAException</code>.
+ *
+ * @param iaikException The <code>IAIKException</code> or
+ * <code>IAIKRuntimeException</code> to map.
+ * @return A <code>MOAException</code> containing the message for the
+ * given <code>IAIKRuntimeException</code>.
+ */
+ private MOAException mapImpl(Exception iaikException) {
+ MOAException moaException = createMoaException(iaikException);
+
+ if (moaException == null) {
+ return new MOASystemException("9999", null, iaikException);
+ }
+ return moaException;
+ }
+
+ /**
+ * Create a <code>MOAException</code> from a given <code>IAIKException</code>
+ * by looking it up in the mapping.
+ *
+ * @param iaikException The <code>IAIKException</code> to map.
+ * @return A <code>MOAException</code> with an error code corresponding to
+ * the given <code>IAIKException</code>. Returns <code>null</code>, if no
+ * mapping could be found.
+ */
+ protected MOAException createMoaException(Exception iaikException) {
+ ExceptionMappingInfo info = lookupMessage(iaikException.getClass());
+ Constructor constructor;
+
+ if (info == null) {
+ return null;
+ }
+
+ // instantiate the proper MOAException and return it
+ try {
+ constructor =
+ info.getMoaExceptionClass().getConstructor(CONSTRUCTOR_ARGS);
+ return (MOAException) constructor.newInstance(
+ new Object[] {
+ info.getMessageId(),
+ new Object[] { iaikException.getMessage()},
+ iaikException });
+ } catch (Exception e) {
+ return null;
+ }
+ }
+
+ /**
+ * Recursively look up the message associated with an
+ * <code>IAIKException</code>.
+ *
+ * This method walks up the exception inheritance hierarchy until it finds a
+ * mapping.
+ *
+ * @param iaikExceptionClass The <code>IAIKException</code> to look up.
+ * @return Information about the message id and
+ * <code>MOAException</code> class that the <code>iaikExceptionClass</code>
+ * maps to. If no mapping could be found, <code>null</code> is returned.
+ */
+ protected ExceptionMappingInfo lookupMessage(Class iaikExceptionClass) {
+ ExceptionMappingInfo info;
+
+ // break if
+ if (iaikExceptionClass.equals(Exception.class)) {
+ return null;
+ }
+
+ // look up the exception class
+ info = (ExceptionMappingInfo) messages.get(iaikExceptionClass);
+ if (info == null) {
+ return lookupMessage(iaikExceptionClass.getSuperclass());
+ }
+ return info;
+ }
+
+}
+
+/**
+ * A class containing a mapping from an error message ID to a
+ * <code>MOAException</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class ExceptionMappingInfo {
+ /** The message ID. */
+ private String messageId;
+ /** The <code>MOAException</code> class. */
+ private Class moaExceptionClass;
+
+ /**
+ * Create a new <code>ExceptionMappingInfo</code>.
+ *
+ * @param messageId The message ID.
+ * @param moaExceptionClass The <code>MOAException</code> class.
+ */
+ public ExceptionMappingInfo(String messageId, Class moaExceptionClass) {
+ this.messageId = messageId;
+ this.moaExceptionClass = moaExceptionClass;
+ }
+
+ /**
+ * Return the message ID.
+ *
+ * @return The message ID.
+ */
+ public String getMessageId() {
+ return messageId;
+ }
+
+ /**
+ * Returns the <code>MOAException</code> class that the message ID maps to.
+ *
+ * @return The <code>MOAException</code> class.
+ */
+ public Class getMoaExceptionClass() {
+ return moaExceptionClass;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java
new file mode 100644
index 000000000..0c3b45539
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/InvokerUtils.java
@@ -0,0 +1,63 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.util.XPathException;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.ElementSelector;
+
+/**
+ * Utility methods for invoking the IAIK MOA modules.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class InvokerUtils {
+
+ /**
+ * Select the signature parent element.
+ *
+ * @param root The root DOM element which contains the signature parent
+ * element somewhere in its subtree.
+ * @param location The <code>ElementSelector</code> containing the XPath
+ * expression to select the signature parent element from the document.
+ * It is also contains the namespace prefix to URI mapping.
+ * @return Element The signature parent element.
+ * @throws MOAApplicationException An error occurred evaluating the
+ * <code>location</code>.
+ */
+ public static Element evaluateSignatureLocation(
+ Element root,
+ ElementSelector location)
+ throws MOAApplicationException {
+
+ NodeList nodes;
+
+ try {
+ nodes =
+ XPathUtils.selectNodeList(
+ root,
+ location.getNamespaceDeclarations(),
+ location.getXPathExpression());
+ } catch (XPathException e) {
+ throw new MOAApplicationException(
+ "2212",
+ new Object[] { location.getXPathExpression()},
+ e);
+ }
+
+ if (nodes.getLength() != 1
+ || !(nodes.item(0).getNodeType() == Node.ELEMENT_NODE)) {
+ throw new MOAApplicationException(
+ "2212",
+ new Object[] { location.getXPathExpression()});
+ }
+ return (Element) nodes.item(0);
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java
new file mode 100644
index 000000000..158a3ddb5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ProfileMapper.java
@@ -0,0 +1,249 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.xmlbind.ProfileParser;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileID;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileID;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileID;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfile;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileID;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * Map ProfileID objects to their explicit represantation.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ProfileMapper {
+
+ /** The parser to parse the profiles. */
+ private static ProfileParser profileParser = new ProfileParser();
+
+ /**
+ * Map a <code>CreateTransformsInfoProfile</code> to a
+ * <code>CreateTransformsInfoProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_CREATETRANSFORMSINFOPROFILE</code>, otherwise the profile
+ * that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static CreateTransformsInfoProfileExplicit mapCreateTransformsInfoProfile(
+ CreateTransformsInfoProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getCreateTransformsInfoProfileType()) {
+ case CreateTransformsInfoProfile.EXPLICIT_CREATETRANSFORMSINFOPROFILE :
+ return (CreateTransformsInfoProfileExplicit) profile;
+
+ case CreateTransformsInfoProfile.ID_CREATETRANSFORMSINFOPROFILE :
+ CreateTransformsInfoProfileID profileIdObj =
+ (CreateTransformsInfoProfileID) profile;
+ String profileID = profileIdObj.getCreateTransformsInfoProfileID();
+ Element profileElem = config.getCreateTransformsInfoProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2234", new Object[] { profileID });
+ }
+
+ return (
+ CreateTransformsInfoProfileExplicit) profileParser
+ .parseCreateTransformsInfoProfile(
+ profileElem);
+ }
+ return null; // this will not happen
+ }
+
+ /**
+ * Map a <code>CreateSignatureEnvironmentProfile</code> to a
+ * <code>CreateSignatureEnvironmentProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static CreateSignatureEnvironmentProfileExplicit mapCreateSignatureEnvironmentProfile(
+ CreateSignatureEnvironmentProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getCreateSignatureEnvironmentProfileType()) {
+ case CreateSignatureEnvironmentProfile
+ .EXPLICIT_CREATESIGNATUREENVIRONMENTPROFILE :
+
+ return (CreateSignatureEnvironmentProfileExplicit) profile;
+
+ case CreateSignatureEnvironmentProfile
+ .ID_CREATESIGNATUREENVIRONMENTPROFILE :
+
+ CreateSignatureEnvironmentProfileID profileIdObj =
+ (CreateSignatureEnvironmentProfileID) profile;
+ String profileID =
+ profileIdObj.getCreateSignatureEnvironmentProfileID();
+ Element profileElem =
+ config.getCreateSignatureEnvironmentProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2236", new Object[] { profileID });
+ }
+
+ return (
+ CreateSignatureEnvironmentProfileExplicit) profileParser
+ .parseCreateSignatureEnvironmentProfile(
+ profileElem);
+
+ }
+ return null;
+
+ }
+
+ /**
+ * Map a <code>List</code> of <code>SupplementProfile</code>s to their
+ * explicit representation.
+ *
+ * @param profiles The profiles to map.
+ * @param config The MOA configuration to use for looking up profiles.
+ * @return The mapped profiles.
+ * @throws MOAApplicationException An error occurred mapping one of the
+ * profiles.
+ */
+ public static List mapSupplementProfiles(
+ List profiles,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ List mappedProfiles = new ArrayList();
+ Iterator iter;
+
+ for (iter = profiles.iterator(); iter.hasNext();) {
+ SupplementProfile profile = (SupplementProfile) iter.next();
+ mappedProfiles.add(mapSupplementProfile(profile, config));
+ }
+
+ return mappedProfiles;
+ }
+
+ /**
+ * Map a <code>SupplementProfile</code> to a
+ * <code>SupplementProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_SUPPLEMENTPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static SupplementProfileExplicit mapSupplementProfile(
+ SupplementProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getSupplementProfileType()) {
+ case SupplementProfile.EXPLICIT_SUPPLEMENTPROFILE :
+ return (SupplementProfileExplicit) profile;
+
+ case SupplementProfile.ID_SUPPLEMENTPROFILE :
+ SupplementProfileID profileIdObj = (SupplementProfileID) profile;
+ String profileID = profileIdObj.getSupplementProfileID();
+ Element profileElem = config.getSupplementProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2267", new Object[] { profileID });
+ }
+
+ return (
+ SupplementProfileExplicit) profileParser.parseSupplementProfile(
+ profileElem);
+ }
+
+ return null;
+ }
+
+ /**
+ * Map a <code>List</code> of <code>VerifyTransformsInfoProfile</code>s to
+ * their explicit representation.
+ *
+ * @param profiles The profiles to map.
+ * @param config The MOA configuration to use for looking up profiles.
+ * @return The mapped profiles.
+ * @throws MOAApplicationException An error occurred mapping one of the
+ * profiles.
+ */
+ public static List mapVerifyTransformsInfoProfiles(
+ List profiles,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ List mappedProfiles = new ArrayList();
+ Iterator iter;
+
+ for (iter = profiles.iterator(); iter.hasNext();) {
+ VerifyTransformsInfoProfile profile =
+ (VerifyTransformsInfoProfile) iter.next();
+ mappedProfiles.add(mapVerifyTransformsInfoProfile(profile, config));
+ }
+
+ return mappedProfiles;
+ }
+
+ /**
+ * Map a <code>VerifyTransformsInfoProfile</code> to a
+ * <code>VerifyTransformsInfoProfileExplicit</code>.
+ *
+ * @param profile The profile object to map.
+ * @param config The MOA configuration to use for looking up the profile.
+ * @return <code>profile</code>, if the given profile is of type
+ * <code>EXPLICIT_VERIFYTRANSFORMSINFOPROFILE</code>, otherwise the
+ * profile that is looked up and parsed from the configuration.
+ * @throws MOAApplicationException An error occurred parsing the profile.
+ */
+ public static VerifyTransformsInfoProfileExplicit mapVerifyTransformsInfoProfile(
+ VerifyTransformsInfoProfile profile,
+ ConfigurationProvider config)
+ throws MOAApplicationException {
+
+ switch (profile.getVerifyTransformsInfoProfileType()) {
+ case VerifyTransformsInfoProfile.EXPLICIT_VERIFYTRANSFORMSINFOPROFILE :
+ return (VerifyTransformsInfoProfileExplicit) profile;
+
+ case VerifyTransformsInfoProfile.ID_VERIFYTRANSFORMSINFOPROFILE :
+ VerifyTransformsInfoProfileID profileIdObj =
+ (VerifyTransformsInfoProfileID) profile;
+ String profileID = profileIdObj.getVerifyTransformsInfoProfileID();
+ Element profileElem =
+ config.getVerifyTransformsInfoProfile(profileID);
+
+ if (profileElem == null) {
+ throw new MOAApplicationException("2268", new Object[] { profileID });
+ }
+
+ return (
+ VerifyTransformsInfoProfileExplicit) profileParser
+ .parseVerifyTransformsInfoProfile(
+ profileElem);
+ }
+
+ return null;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java
new file mode 100644
index 000000000..11f05a2f1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/ServiceContextUtils.java
@@ -0,0 +1,51 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A utility class for setting up and tearing down thread-local context
+ * information needed for calling the <code>Invoker</code> classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ServiceContextUtils {
+
+ /**
+ * Set up the thread-local context information needed for calling the various
+ * <code>Invoker</code> classes.
+ *
+ * @throws ConfigurationException An error occurred setting up the
+ * configuration in the <code>TransactionContext</code>.
+ */
+ public static void setUpContexts() throws ConfigurationException {
+ TransactionContextManager txMgr = TransactionContextManager.getInstance();
+ LoggingContextManager logMgr = LoggingContextManager.getInstance();
+ String transactionID = Thread.currentThread().getName();
+
+ if (txMgr.getTransactionContext() == null) {
+ TransactionContext ctx = new TransactionContext(transactionID, null, ConfigurationProvider.getInstance());
+ txMgr.setTransactionContext(ctx);
+ }
+
+ if (logMgr.getLoggingContext() == null) {
+ LoggingContext ctx = new LoggingContext(transactionID);
+ logMgr.setLoggingContext(ctx);
+ }
+ }
+
+ /**
+ * Tear down thread-local context information.
+ */
+ public static void tearDownContexts() {
+ TransactionContextManager.getInstance().setTransactionContext(null);
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java
new file mode 100644
index 000000000..dc5ceb21e
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureCreationServiceImpl.java
@@ -0,0 +1,45 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.Collections;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.api.SignatureCreationService;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+
+/**
+ * An implementation of the <code>SignatureCreationService</code>, using
+ * the <code>XMLSignatureCreationInvoker</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureCreationServiceImpl extends SignatureCreationService {
+
+ /**
+ * Create an XML signature.
+ *
+ * @param request The <code>CreateXMLSignatureRequest</code> containing
+ * information about the signature(s) to create.
+ * @return The created signature(s).
+ * @throws MOAException An error occurred creating the signature(s).
+ */
+ public CreateXMLSignatureResponse createXMLSignature(CreateXMLSignatureRequest request)
+ throws MOAException {
+
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ CreateXMLSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.createXMLSignature(request, Collections.EMPTY_SET);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java
new file mode 100644
index 000000000..94cdea5d9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/SignatureVerificationServiceImpl.java
@@ -0,0 +1,72 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.Configurator;
+import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+
+/**
+ * An implementation of the <code>SignatureVerificationService</code> using
+ * the <code>XMLSignatureVerificationInvoker</code> and the
+ * <code>CMSSignatureVerificationInvoker</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureVerificationServiceImpl
+ extends SignatureVerificationService {
+
+ /**
+ * Verify a CMS signature.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> containing
+ * information about the signature verification.
+ * @return The result of the signature verification.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyCMSSignatureResponse verifyCMSSignature(VerifyCMSSignatureRequest request)
+ throws MOAException {
+
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ VerifyCMSSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.verifyCMSSignature(request);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+ /**
+ * Verify an XML signature.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containinig
+ * information about the signature verification.
+ * @return The result of the signature verification.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException {
+
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ VerifyXMLSignatureResponse response;
+
+ try {
+ Configurator.getInstance().init();
+ ServiceContextUtils.setUpContexts();
+ response = invoker.verifyXMLSignature(request);
+ return response;
+ } finally {
+ ServiceContextUtils.tearDownContexts();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java
new file mode 100644
index 000000000..9984a95a5
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/TransformationFactory.java
@@ -0,0 +1,258 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import iaik.server.modules.xml.Base64Transformation;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+import iaik.server.modules.xml.Transformation;
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPathTransformation;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+import at.gv.egovernment.moa.spss.server.iaik.xml.Base64TransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.CanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.EnvelopedSignatureTransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ExclusiveCanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPath2FilterImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPath2TransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XPathTransformationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XSLTTransformationImpl;
+
+/**
+ * A factory to create <code>Transformation</code> objects from
+ * <code>Transform</code> objects.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformationFactory {
+
+
+ /** The single instance of this class. */
+ private static TransformationFactory instance = null;
+
+ /** Maps <code>XPathFilter</code> filter types to
+ * <code>XPath2Transformation</code> filter types. */
+ private static Map FILTER_TYPE_MAPPING;
+
+ static {
+ FILTER_TYPE_MAPPING = new HashMap();
+
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.INTERSECT_TYPE,
+ XPath2Transformation.XPath2Filter.INTERSECTION);
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.SUBTRACT_TYPE,
+ XPath2Transformation.XPath2Filter.SUBTRACTION);
+ FILTER_TYPE_MAPPING.put(
+ XPathFilter.UNION_TYPE,
+ XPath2Transformation.XPath2Filter.UNION);
+ }
+
+ /**
+ * Get the single instance of the factory.
+ *
+ * @return TransformationFactory The single instance.
+ */
+ public static synchronized TransformationFactory getInstance() {
+ if (instance == null) {
+ instance = new TransformationFactory();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>TransformationFactory</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected TransformationFactory() {
+ }
+
+ /**
+ * Create a <code>Transformation</code> based on a
+ * <code>Transform</code> object.
+ *
+ * @param transform The <code>Transform</code> object to extract
+ * transformation data from.
+ * @return The transformation contained in the <code>transform</code>
+ * object.
+ * @throws MOAApplicationException An error occured creating the
+ * <code>Transformation</code>. See exception message for details.
+ */
+ public Transformation createTransformation(Transform transform)
+ throws MOAApplicationException {
+ String algorithmUri = transform.getAlgorithmURI();
+
+ if (Canonicalization.CANONICAL_XML.equals(algorithmUri)
+ || Canonicalization.CANONICAL_XML_WITH_COMMENTS.equals(algorithmUri)) {
+ return createC14nTransformation(algorithmUri);
+ } else if (
+ Canonicalization.EXCLUSIVE_CANONICAL_XML.equals(algorithmUri)
+ || Canonicalization.EXCLUSIVE_CANONICAL_XML_WITH_COMMENTS.equals(
+ algorithmUri)) {
+
+ return createExclusiveC14nTransformation(
+ (ExclusiveCanonicalizationTransform) transform);
+
+ } else if (Base64Transformation.ALL.contains(algorithmUri)) {
+ return createBase64Transformation();
+ } else if (EnvelopedSignatureTransformation.ALL.contains(algorithmUri)) {
+ return createEnvelopedSignatureTransformation();
+ } else if (XPathTransformation.ALL.contains(algorithmUri)) {
+ return createXPathTransformation((XPathTransform) transform);
+ } else if (XPath2Transformation.ALL.contains(algorithmUri)) {
+ return createXPath2Transformation((XPathFilter2Transform) transform);
+ } else if (XSLTTransformation.ALL.contains(algorithmUri)) {
+ return createXSLTTransformation((XSLTTransform) transform);
+ } else {
+ throw new MOAApplicationException("1108", new Object[] { algorithmUri });
+ }
+ }
+
+ /**
+ * Create a <code>List</code> of <code>Transformation</code>s from a
+ * <code>List</code> of <code>Transform</code>s.
+ *
+ * @param transforms The <code>List</code> containing the
+ * <code>Transform</code>s.
+ * @return The <code>List</code> of <code>Transformation</code>s corresponding
+ * to the <code>transforms</code>.
+ * @throws MOAApplicationException An error occurred building one of the
+ * transformations. See exception message for details.
+ */
+ public List createTransformationList(List transforms)
+ throws MOAApplicationException {
+ List transformationList = new ArrayList();
+ Iterator trIter;
+
+ for (trIter = transforms.iterator(); trIter.hasNext();) {
+ Transform transform = (Transform) trIter.next();
+ transformationList.add(createTransformation(transform));
+ }
+
+ return transformationList;
+ }
+
+ /**
+ * Create a <code>Canonicalization</code>.
+ *
+ * @param algorithmUri The algorithm URI of the canonicalization.
+ * @return The <code>Canonicalization</code>.
+ */
+ private Transformation createC14nTransformation(String algorithmUri) {
+ return new CanonicalizationImpl(algorithmUri);
+ }
+
+ /**
+ * Create a <code>ExclusiveCanonicalization</code>.
+ *
+ * @param transform The <code>ExclusiveCanonicalizationTransform</code>
+ * containing the transformation data.
+ * @return The <code>ExclusiveCanonicalization</code>.
+ */
+ private Transformation createExclusiveC14nTransformation(ExclusiveCanonicalizationTransform transform) {
+ return new ExclusiveCanonicalizationImpl(
+ transform.getAlgorithmURI(),
+ transform.getInclusiveNamespacePrefixes());
+ }
+
+ /**
+ * Create a <code>Base64Transformation</code>.
+ *
+ * @return The <code></code>
+ */
+ private Transformation createBase64Transformation() {
+ return new Base64TransformationImpl();
+ }
+
+ /**
+ * Create an <code>EnvelopedSignatureTransformation</code>.
+ *
+ * @return An <code>EnvelopedSignatureTransformation</code>.
+ */
+ private Transformation createEnvelopedSignatureTransformation() {
+ return new EnvelopedSignatureTransformationImpl();
+ }
+
+ /**
+ * Create an <code>XPathTransformation</code>.
+ *
+ * @param transform The <code>Transform</code> object containing the
+ * XPath transformation.
+ * @return An <code>XPathTransformation</code> corresponding the
+ * transformation given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXPathTransformation(XPathTransform transform)
+ throws MOAApplicationException {
+
+ return new XPathTransformationImpl(
+ transform.getXPathExpression(),
+ transform.getNamespaceDeclarations());
+ }
+
+ /**
+ * Create an <code>XPath2Transformation</code>.
+ *
+ * @param transform The <code>Transform</code> object containing the
+ * XPath filter transformation.
+ * @return An <code>XPath2Transformation</code> corresponding the
+ * transformation given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXPath2Transformation(XPathFilter2Transform transform)
+ throws MOAApplicationException {
+
+ XPath2TransformationImpl xpath2 = new XPath2TransformationImpl();
+ Iterator iter;
+
+ for (iter = transform.getFilters().iterator(); iter.hasNext();) {
+ XPathFilter filter = (XPathFilter) iter.next();
+ String mappedFilterType =
+ (String) FILTER_TYPE_MAPPING.get(filter.getFilterType());
+ XPath2FilterImpl mappedFilter =
+ new XPath2FilterImpl(
+ mappedFilterType,
+ filter.getXPathExpression(),
+ filter.getNamespaceDeclarations());
+ xpath2.addXPathFilter(mappedFilter);
+ }
+
+ if (xpath2.getXPathFilters().size() == 0) {
+ throw new MOAApplicationException("2216", null);
+ }
+
+ return xpath2;
+ }
+
+ /**
+ * Create an <code>XSLTTransformation</code>.
+ *
+ * @param transform The <code>Transform</code> containing the XSLT stylesheet.
+ * @return An <code>XSLTTransformation</code> corresponding the transformation
+ * given in <code>transform</code>.
+ * @throws MOAApplicationException An error occurred creating the
+ * <code>Transformation</code>.
+ */
+ private Transformation createXSLTTransformation(XSLTTransform transform)
+ throws MOAApplicationException {
+
+ return new XSLTTransformationImpl(transform.getStylesheet());
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java
new file mode 100644
index 000000000..55e2e1505
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyCMSSignatureResponseBuilder.java
@@ -0,0 +1,86 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.List;
+
+import iaik.server.modules.cmsverify.CMSSignatureVerificationResult;
+import iaik.server.modules.cmsverify.CertificateValidationResult;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponseElement;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+
+/**
+ * A class to build a <code>VerifyCMSSignatureResponse</code> object.
+ *
+ * <p>Via subsequent calls to <code>addResult()</code> a number of results from
+ * a CMS signature verification can be added to the response.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>VerifyCMSSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureResponseBuilder {
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+ /** The elements making up the response. */
+ private List responseElements = new ArrayList();
+
+ /**
+ * Get the <code>VerifyCMSSignatureResponse</code> built so far.
+ *
+ * @return The <code>VerifyCMSSignatureResponse</code> built so far.
+ */
+ public VerifyCMSSignatureResponse getResponse() {
+ return factory.createVerifyCMSSignatureResponse(responseElements);
+ }
+
+ /**
+ * Add a verification result to the response.
+ *
+ * @param result The result to add.
+ * @throws MOAApplicationException An error occurred adding the result.
+ */
+ public void addResult(CMSSignatureVerificationResult result)
+ throws MOAApplicationException {
+
+ CertificateValidationResult certResult =
+ result.getCertificateValidationResult();
+ int signatureCheckCode =
+ result.getSignatureValueVerificationCode().intValue();
+ int certificateCheckCode = certResult.getValidationResultCode().intValue();
+ VerifyCMSSignatureResponseElement responseElement;
+ SignerInfo signerInfo;
+ CheckResult signatureCheck;
+ CheckResult certificateCheck;
+
+ // add SignerInfo element
+ signerInfo =
+ factory.createSignerInfo(
+ (X509Certificate) certResult.getCertificateChain().get(0),
+ certResult.isQualifiedCertificate(),
+ certResult.isPublicAuthorityCertificate(),
+ certResult.getPublicAuthorityID());
+
+ // add SignatureCheck element
+ signatureCheck = factory.createCheckResult(signatureCheckCode, null);
+
+ // add CertificateCheck element
+ certificateCheck = factory.createCheckResult(certificateCheckCode, null);
+
+ // build the response element
+ responseElement =
+ factory.createVerifyCMSSignatureResponseElement(
+ signerInfo,
+ signatureCheck,
+ certificateCheck);
+ responseElements.add(responseElement);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java
new file mode 100644
index 000000000..d6f58a560
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/VerifyXMLSignatureResponseBuilder.java
@@ -0,0 +1,437 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.ixsil.algorithms.CanonicalizationAlgorithm;
+import iaik.ixsil.algorithms.CanonicalizationAlgorithmImplExclusiveCanonicalXMLWithComments;
+import iaik.server.modules.xml.BinaryDataObject;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLNodeListDataObject;
+import iaik.server.modules.xmlverify.CertificateValidationResult;
+import iaik.server.modules.xmlverify.DsigManifest;
+import iaik.server.modules.xmlverify.HashUnavailableException;
+import iaik.server.modules.xmlverify.ReferenceData;
+import iaik.server.modules.xmlverify.ReferenceInfo;
+import iaik.server.modules.xmlverify.SecurityLayerManifest;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationResult;
+import iaik.x509.X509Certificate;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.InputData;
+import at.gv.egovernment.moa.spss.api.common.SignerInfo;
+import at.gv.egovernment.moa.spss.api.impl.InputDataBinaryImpl;
+import at.gv.egovernment.moa.spss.api.impl.InputDataXMLImpl;
+import at.gv.egovernment.moa.spss.api.xmlverify.ManifestRefsCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.NodeListAdapter;
+
+/**
+ * A class to build a <code>VerifyXMLSignatureResponse</code> object.
+ *
+ * <p>Via a call to <code>addResult()</code> the only result of the
+ * signature verification must be added.</p>
+ *
+ * <p>The <code>getResponseElement()</code> method then returns the
+ * <code>VerifyXMLSignatureResponse</code> built so far.</p>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureResponseBuilder {
+
+ /** The <code>SPSSFactory</code> for creating API objects. */
+ private SPSSFactory factory = SPSSFactory.getInstance();
+
+ /** Information about the signer certificate. */
+ private SignerInfo signerInfo;
+ /** The hash input data. */
+ private List hashInputDatas;
+ /** The reference input data. */
+ private List referenceInputDatas;
+ /** The result of the signature check. */
+ private ReferencesCheckResult signatureCheck;
+ /** The result of the signature manifest check. */
+ private ReferencesCheckResult signatureManifestCheck;
+ /** The result of the XMLDsig manifest check. */
+ private List xmlDsigManifestChecks;
+ /** The result of the certificate check. */
+ private CheckResult certificateCheck;
+
+ /**
+ * Get the <code>VerifyMLSignatureResponse</code> built so far.
+ *
+ * @return The <code>VerifyXMLSignatureResponse</code> built so far.
+ */
+ public VerifyXMLSignatureResponse getResponse() {
+ return factory.createVerifyXMLSignatureResponse(
+ signerInfo,
+ hashInputDatas,
+ referenceInputDatas,
+ signatureCheck,
+ signatureManifestCheck,
+ xmlDsigManifestChecks,
+ certificateCheck);
+ }
+
+ /**
+ * Sets the verification result to the response.
+ *
+ * This method must be called exactly once to ensure a valid
+ * <code>VerifyXMLSignatureResponse</code>.
+ *
+ * @param result The result to set for the response.
+ * @param profile The profile used for verifying the signature.
+ * @param transformsSignatureManifestCheck The overall result for the signature
+ * manifest check.
+ * @param certificateCheck The overall result for the certificate check.
+ * @throws MOAApplicationException An error occurred adding the result.
+ */
+ public void setResult(
+ XMLSignatureVerificationResult result,
+ XMLSignatureVerificationProfile profile,
+ ReferencesCheckResult transformsSignatureManifestCheck,
+ CheckResult certificateCheck)
+ throws MOAApplicationException {
+
+ CertificateValidationResult certResult =
+ result.getCertificateValidationResult();
+ List referenceDataList;
+ ReferenceData referenceData;
+ List dsigManifestList;
+ ReferencesCheckResultInfo checkResultInfo;
+ int[] failedReferences;
+ Iterator iter;
+
+ // create the SignerInfo;
+ signerInfo =
+ factory.createSignerInfo(
+ (X509Certificate) certResult.getCertificateChain().get(0),
+ certResult.isQualifiedCertificate(),
+ certResult.isPublicAuthorityCertificate(),
+ certResult.getPublicAuthorityID());
+
+ // Create HashInputData Content objects
+ referenceDataList = result.getReferenceDataList();
+ if (profile.includeHashInputData()) {
+ hashInputDatas = new ArrayList();
+
+ // Include SignedInfo references
+ addHashInputDatas(
+ hashInputDatas,
+ referenceDataList,
+ InputData.CONTAINER_SIGNEDINFO_,
+ InputData.REFERER_NONE_);
+
+ // Include XMLDSIGManifest references
+ List xMLDSIGManifests = result.getDsigManifestList();
+ for (iter = xMLDSIGManifests.iterator(); iter.hasNext();)
+ {
+ DsigManifest currentMF = (DsigManifest) iter.next();
+ List xMLDSIGMFReferenceDataList = currentMF.getReferenceDataList();
+ addHashInputDatas(
+ hashInputDatas,
+ xMLDSIGMFReferenceDataList,
+ InputData.CONTAINER_XMLDSIGMANIFEST_,
+ currentMF.getReferringReferenceInfo().getReferenceIndex());
+ }
+ }
+
+ // Create the ReferenceInputData Content objects
+ if (profile.includeReferenceInputData()) {
+ referenceInputDatas = new ArrayList();
+
+ // Include SignedInfo references
+ addReferenceInputDatas(
+ referenceInputDatas,
+ referenceDataList,
+ InputData.CONTAINER_SIGNEDINFO_,
+ InputData.REFERER_NONE_);
+
+ // Include XMLDSIGManifest references
+ List xMLDSIGManifests = result.getDsigManifestList();
+ for (iter = xMLDSIGManifests.iterator(); iter.hasNext();)
+ {
+ DsigManifest currentMF = (DsigManifest) iter.next();
+ List xMLDSIGMFReferenceDataList = currentMF.getReferenceDataList();
+ addReferenceInputDatas(
+ referenceInputDatas,
+ xMLDSIGMFReferenceDataList,
+ InputData.CONTAINER_XMLDSIGMANIFEST_,
+ currentMF.getReferringReferenceInfo().getReferenceIndex());
+ }
+ }
+
+ // create the signature check
+ failedReferences = buildFailedReferences(result.getReferenceDataList());
+ checkResultInfo =
+ failedReferences != null
+ ? factory.createReferencesCheckResultInfo(null, failedReferences)
+ : null;
+ signatureCheck =
+ factory.createReferencesCheckResult(
+ result.getSignatureValueVerificationCode().intValue(),
+ checkResultInfo);
+
+ // create the signature manifest check
+ if (profile.checkSecurityLayerManifest())
+ {
+ if (transformsSignatureManifestCheck.getCode() == 1)
+ {
+ // checking the transforms failed
+ signatureManifestCheck = transformsSignatureManifestCheck;
+ }
+ else if (result.isSecurityLayerManifestRequired())
+ {
+ if (!result.containsSecurityLayerManifest())
+ {
+ // required security layer manifest is missing in signature
+ signatureManifestCheck = factory.createReferencesCheckResult(2, null);
+ }
+ else
+ {
+ // security layer manifest exists, so we have to check its validity
+ SecurityLayerManifest slManifest = result.getSecurityLayerManifest();
+ int verificationResult = slManifest.getManifestVerificationResult().intValue();
+
+ if (SecurityLayerManifest.CODE_MANIFEST_VALID.intValue() == verificationResult)
+ {
+ // security layer manifest exists and is free of errors
+ signatureManifestCheck = factory.createReferencesCheckResult(0, null);
+ }
+ else
+ {
+ // security layer manifest exists, but has errors
+ failedReferences = buildFailedReferences(slManifest.getReferenceDataList());
+ checkResultInfo = (failedReferences != null)
+ ? factory.createReferencesCheckResultInfo(null, failedReferences)
+ : null;
+ if (SecurityLayerManifest.CODE_MANIFEST_INCOMPLETE.intValue() == verificationResult)
+ {
+ signatureManifestCheck = factory.createReferencesCheckResult(3, checkResultInfo);
+ }
+ else if (SecurityLayerManifest.CODE_REFERENCE_HASH_INVALID.intValue() == verificationResult)
+ {
+ signatureManifestCheck = factory.createReferencesCheckResult(4, checkResultInfo);
+ }
+ else
+ {
+ // Should not happen
+ throw new RuntimeException("Unexpected result from security layer manifest verification.");
+ }
+ }
+ }
+ }
+ else
+ {
+ // no security layer manifest is required, so the signature manifest check is ok
+ signatureManifestCheck = factory.createReferencesCheckResult(0, null);
+ }
+ }
+
+ // create the xmlDsigManifestCheck
+ if (profile.checkXMLDsigManifests()) {
+ xmlDsigManifestChecks = new ArrayList();
+ dsigManifestList = result.getDsigManifestList();
+ for (iter = dsigManifestList.iterator(); iter.hasNext();) {
+ DsigManifest dsigManifest = (DsigManifest) iter.next();
+ int refIndex =
+ dsigManifest.getReferringReferenceInfo().getReferenceIndex();
+ ManifestRefsCheckResultInfo manifestCheckResultInfo;
+
+ failedReferences =
+ buildFailedReferences(dsigManifest.getReferenceDataList());
+ manifestCheckResultInfo =
+ factory.createManifestRefsCheckResultInfo(
+ null,
+ failedReferences,
+ refIndex);
+ xmlDsigManifestChecks.add(
+ factory.createManifestRefsCheckResult(
+ dsigManifest.getManifestVerificationResult().intValue(),
+ manifestCheckResultInfo));
+ }
+ }
+
+ // create the certificate check
+ this.certificateCheck = certificateCheck;
+ }
+
+ /**
+ * Adds {@link InputData} entries to the specified <code>inputDatas</code> list. The content of the entry will
+ * be created from {@link ReferenceData#getHashInputData()}.
+ *
+ * @param inputDatas The list to be amended.
+ *
+ * @param referenceDataList The list of {@link ReferenceData} objects to be investigated.
+ *
+ * @param containerType The type of container of the {@link InputData} objects to be created.
+ *
+ * @param refererNumber The number of the referring reference for the {@link InputData} objects to be created.
+ *
+ * @throws MOAApplicationException if creating an {@link InputData} fails.
+ */
+ private void addHashInputDatas(List inputDatas, List referenceDataList, String containerType, int refererNumber)
+ throws MOAApplicationException
+ {
+ for (Iterator iter = referenceDataList.iterator(); iter.hasNext();)
+ {
+ ReferenceData referenceData = (ReferenceData) iter.next();
+ inputDatas.add(buildInputData(
+ referenceData.getHashInputData(),
+ containerType,
+ refererNumber));
+ }
+ }
+
+ /**
+ * Adds {@link InputData} entries to the specified <code>inputDatas</code> list. The content of the entry will
+ * be created from {@link ReferenceData#getReferenceInputData()}.
+ *
+ * @param inputDatas The list to be amended.
+ *
+ * @param referenceDataList The list of {@link ReferenceData} objects to be investigated.
+ *
+ * @param containerType The type of container of the {@link InputData} objects to be created.
+ *
+ * @param refererNumber The number of the referring reference for the {@link InputData} objects to be created.
+ *
+ * @throws MOAApplicationException if creating an {@link InputData} fails.
+ */
+ private void addReferenceInputDatas(List inputDatas, List referenceDataList, String containerType, int refererNumber)
+ throws MOAApplicationException
+ {
+ for (Iterator iter = referenceDataList.iterator(); iter.hasNext();)
+ {
+ ReferenceData referenceData = (ReferenceData) iter.next();
+ inputDatas.add(buildInputData(
+ referenceData.getReferenceInputData(),
+ containerType,
+ refererNumber));
+ }
+ }
+
+ /**
+ * Build a <code>InputDataBinaryImpl</code> or an <code>InputDataXMLImpl</code>
+ * object from the given <code>DataObject</code> and the given attributes.
+ *
+ * @param dataObject The <code>DataObject</code> from which to build the result.
+ * Based on the type of this parameter, the type of the result will either be
+ * <code>InputDataBinaryImpl</code> or <code>InputDataXMLImpl</code>.
+ *
+ * @param partof see {@link InputData}
+ *
+ * @param referringReferenceNumber see {@link InputData}
+ *
+ * @return The corresponinding input data implementation.
+ *
+ * @throws MOAApplicationException An error occurred creating the result.
+ */
+ private Content buildInputData(DataObject dataObject, String partOf, int referringReferenceNumber)
+ throws MOAApplicationException {
+
+ if (dataObject instanceof BinaryDataObject) {
+ BinaryDataObject binaryData = (BinaryDataObject) dataObject;
+ return new InputDataBinaryImpl(
+ factory.createContent(binaryData.getInputStream(), null),
+ partOf,
+ referringReferenceNumber);
+ } else if (dataObject instanceof XMLDataObject) {
+ XMLDataObject xmlData = (XMLDataObject) dataObject;
+ List nodes = new ArrayList();
+
+ nodes.add(xmlData.getElement());
+ return new InputDataXMLImpl(
+ factory.createContent(new NodeListAdapter(nodes), null),
+ partOf,
+ referringReferenceNumber);
+ } else { // dataObject instanceof XMLNodeListDataObject
+ // if the data in the NodeList can be converted back to valid XML,
+ // write it as XMLContent; otherwise, write it as Base64Content
+ XMLNodeListDataObject nodeData = (XMLNodeListDataObject) dataObject;
+ NodeList nodes = nodeData.getNodeList();
+
+ if (DOMUtils.checkAttributeParentsInNodeList(nodes)) {
+ // insert as XMLContent
+ try {
+ DocumentFragment fragment = DOMUtils.nodeList2DocumentFragment(nodes);
+
+ return new InputDataXMLImpl(
+ factory.createContent(fragment.getChildNodes(), null),
+ partOf,
+ referringReferenceNumber);
+ } catch (Exception e) {
+ // not successful -> fall through to the Base64Content
+ }
+ }
+
+ // insert canonicalized NodeList as binary content
+ try {
+ CanonicalizationAlgorithm c14n =
+ new CanonicalizationAlgorithmImplExclusiveCanonicalXMLWithComments();
+ InputStream is;
+
+ c14n.setInput(nodes);
+ is = c14n.canonicalize();
+ return new InputDataBinaryImpl(
+ factory.createContent(is, null),
+ partOf,
+ referringReferenceNumber);
+ } catch (Exception e) {
+ throw new MOAApplicationException("2200", null);
+ }
+ }
+ }
+
+ /**
+ * Build the failed references.
+ *
+ * Failed references are references for which the <code>isHashValid()</code>
+ * method returns <code>false</code>.
+ *
+ * @param refInfos A <code>List</code> containing the
+ * <code>ReferenceInfo</code> objects to be checked.
+ * @return The indexes of the failed references.
+ */
+ private int[] buildFailedReferences(List refInfos) {
+ List failedReferencesList = new ArrayList();
+ int i;
+
+ // find out the failed references
+ for (i = 0; i < refInfos.size(); i++) {
+ ReferenceInfo refInfo = (ReferenceInfo) refInfos.get(i);
+
+ try {
+ if (refInfo.isHashCalculated() && !refInfo.isHashValid()) {
+ failedReferencesList.add(new Integer(i + 1));
+ }
+ } catch (HashUnavailableException e) {
+ // nothing to do here because we called refInfo.isHashCalculated first
+ }
+ }
+
+ // convert to an int array
+ if (failedReferencesList.isEmpty()) {
+ return null;
+ } else {
+ int[] failedReferences = CollectionUtils.toIntArray(failedReferencesList);
+
+ return failedReferences;
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java
new file mode 100644
index 000000000..fd207ddea
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvoker.java
@@ -0,0 +1,545 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLSignature;
+import iaik.server.modules.xmlsign.XMLSignatureCreationModule;
+import iaik.server.modules.xmlsign.XMLSignatureCreationModuleFactory;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.XPathUtils;
+
+/**
+ * A class providing an API based interface to the
+ * <code>XMLSignatureCreationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.xmlsign.XMLSignatureCreationModule</code> from a
+ * <code>CreateXMLSignatureRequest</code> given as an API object. The result of
+ * the invocation is integrated into a <code>CreateXMLSignatureResponse</code>
+ * and returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationInvoker {
+
+ /** The single instance of this class. */
+ private static XMLSignatureCreationInvoker instance = null;
+
+ /**
+ * Get the only instance of this class.
+ *
+ * @return The only instance of this class.
+ */
+ public static synchronized XMLSignatureCreationInvoker getInstance() {
+ if (instance == null) {
+ instance = new XMLSignatureCreationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>XMLSignatureCreationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected XMLSignatureCreationInvoker() {
+ }
+
+ /**
+ * Process the <code>CreateXMLSignatureRequest<code> message and invoke the
+ * <code>XMLSignatureCreationModule</code> for every
+ * <code>SingleSignatureInfo</code> contained in the request.
+ *
+ * @param request A <code>CreateXMLSignatureRequest<code> API object
+ * containing the information for creating the signature(s).
+ * @param reserved A <code>Set</code> of reserved object IDs.
+ *
+ * @return A <code>CreateXMLSignatureResponse</code> API object containing
+ * the created signature(s). The response contains either a
+ * <code>SignatureEnvironment</code> or a <code>ErrorResponse</code>
+ * for each <code>SingleSignatureInfo</code> in the request.
+ * @throws MOAException An error occurred during signature creation.
+ */
+ public CreateXMLSignatureResponse createXMLSignature(
+ CreateXMLSignatureRequest request,
+ Set reserved)
+ throws MOAException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ reserved = new HashSet(reserved);
+ XMLSignatureCreationProfileFactory profileFactory =
+ new XMLSignatureCreationProfileFactory(request, reserved);
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ int createCount = 1;
+ IdGenerator refIdGen;
+ XMLSignatureCreationModule module;
+ Iterator singleSignatureInfoIter;
+
+ // create the XMLSignatureCreationModule and configure it
+ module = XMLSignatureCreationModuleFactory.getInstance();
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ // select the SingleSignatureInfo elements
+ singleSignatureInfoIter = request.getSingleSignatureInfos().iterator();
+
+ // iterate over all the SingleSignatureInfo elements in the request
+ while (singleSignatureInfoIter.hasNext()) {
+ SingleSignatureInfo singleSignatureInfo =
+ (SingleSignatureInfo) singleSignatureInfoIter.next();
+ CreateSignatureInfo createSignatureInfo;
+ List dataObjectList;
+ XMLSignatureCreationProfile profile;
+ XMLDataObject signatureEnvironment;
+ XMLDataObject signatureParent;
+ XMLSignature signature;
+ List additionalSignedProperties;
+ Node signatureEnvironmentParent = null;
+ Element requestElement = null;
+
+ try {
+
+ // build the signature environment
+ createSignatureInfo = singleSignatureInfo.getCreateSignatureInfo();
+ if (createSignatureInfo != null) {
+ DataObjectFactory dataObjFactory = DataObjectFactory.getInstance();
+
+ signatureEnvironment =
+ dataObjFactory.createSignatureEnvironment(
+ createSignatureInfo.getCreateSignatureEnvironment(),
+ getCreateSignatureEnvironmentProfileSupplements(singleSignatureInfo));
+ } else {
+ signatureEnvironment = null;
+ }
+
+ HashSet sigInfoReservedIDs = new HashSet();
+ if (signatureEnvironment != null)
+ {
+ // Find Id attributes of existing XML signatures in signature environment
+ HashMap nSMap = new HashMap();
+ String dsp = Constants.DSIG_PREFIX;
+ nSMap.put(dsp, Constants.DSIG_NS_URI);
+ String xPathExpr = "//" + dsp + ":Signature/@Id | //" + dsp + ":Reference/@Id | //"
+ + dsp + ":Object/@Id | //" + dsp + ":Manifest/@Id";
+ NodeList idAttrs = XPathUtils.selectNodeList(signatureEnvironment.getElement(), nSMap, xPathExpr);
+
+ // Add found Id attributes to set of reserved IDs
+ for (int i = 0; i < idAttrs.getLength(); i++) sigInfoReservedIDs.add(idAttrs.item(i).getNodeValue());
+ }
+
+ // create the reference id generator
+ HashSet allReservedIDs = new HashSet(reserved);
+ allReservedIDs.addAll(sigInfoReservedIDs);
+ refIdGen = new IdGenerator("reference-" + createCount++, allReservedIDs);
+
+ // build the list of DataObjects
+ List createTransformsProfiles = profileFactory.getCreateTransformsInfoProfiles(singleSignatureInfo);
+ dataObjectList =
+ buildDataObjectList(
+ singleSignatureInfo,
+ createTransformsProfiles,
+ signatureEnvironment,
+ refIdGen);
+
+ // build the XMLSignatureCreationProfile
+ profile = profileFactory.createProfile(singleSignatureInfo, sigInfoReservedIDs);
+
+ // build the additionalSignedProperties
+ additionalSignedProperties = buildAdditionalSignedProperties();
+
+ // build the signatureParentElement
+ if (signatureEnvironment != null) {
+ signatureParent =
+ buildSignatureParentElement(
+ signatureEnvironment.getElement(),
+ singleSignatureInfo);
+ } else {
+ signatureParent = null;
+ }
+
+ // make the signature environment the root of the document, if it is
+ // not a separate document anyway; this is done to assure that
+ // canonicalization of the signature environment contains the correct
+ // namespace declarations
+ if (signatureEnvironment != null) {
+ Document requestDoc =
+ signatureEnvironment.getElement().getOwnerDocument();
+ requestElement = requestDoc.getDocumentElement();
+ if (requestElement != signatureEnvironment.getElement()) {
+ signatureEnvironmentParent =
+ signatureEnvironment.getElement().getParentNode();
+ requestElement.getOwnerDocument().replaceChild(
+ signatureEnvironment.getElement(),
+ requestElement);
+ }
+ }
+
+ try {
+ // create the signature
+ signature =
+ module.createSignature(
+ dataObjectList,
+ profile,
+ additionalSignedProperties,
+ signatureParent,
+ new TransactionId(context.getTransactionID()));
+
+ // insert the result into the response
+ if (signatureParent != null) {
+ responseBuilder.addSignatureEnvironment(
+ signatureEnvironment.getElement());
+ } else {
+ responseBuilder.addSignatureEnvironment(signature.getElement());
+ }
+
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+
+ responseBuilder.addError(
+ moaException.getMessageId(),
+ moaException.getMessage());
+ Logger.warn(moaException.getMessage(), e);
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+
+ responseBuilder.addError(
+ moaException.getMessageId(),
+ moaException.getMessage());
+ Logger.warn(moaException.getMessage(), e);
+ }
+
+ // swap back in the request as root document
+ if (signatureEnvironment != null) {
+ if (requestElement != signatureEnvironment.getElement()) {
+ requestElement.getOwnerDocument().replaceChild(
+ requestElement,
+ signatureEnvironment.getElement());
+ signatureEnvironmentParent.appendChild(
+ signatureEnvironment.getElement());
+ }
+ }
+
+ } catch (MOAException e) {
+ responseBuilder.addError(e.getMessageId(), e.getMessage());
+ Logger.warn(e.getMessage(), e);
+ }
+
+ }
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Build the list of <code>DataObject</code>s from the given
+ * <code>SingleSignatureInfo</code> object.
+ *
+ * <p>
+ * Only the following cases of <code>DataObject</code>s are
+ * valid in case of an enveloping signature:
+ *
+ * <ul>
+ * <li><code>Reference == null && Content != null</code>: The
+ * <code>Content</code> will be used in the <code>DataObject</code>.</li>
+ * <li><code>Reference != null && Content == null</code>: Resolve the
+ * <code>Reference</code> and use it as <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * Only the following cases of <code>DataObject</code>s are valid in case
+ * of a detached signature:
+ *
+ * <ul>
+ * <li><code>Reference != null && Content == null</code>: Resolve the
+ * <code>Reference</code> and use it as <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * <li><code>Reference != null && Content != null</code>: The
+ * <code>Content</code> will be used in the <code>DataObject</code>.
+ * Set the <code>Reference</code> in the <code>DataObject</code> as well.</li>
+ * </ul>
+ * </p>
+ *
+ * <p>
+ * All other cases will lead to an error.
+ * </p>
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing the <code>DataObjectInfo</code> objects.
+ * @param createTransformsProfiles A list of objects of type {@link CreateTransformsInfoProfileExplicit},
+ * each representing the transforms info profile information for the corresponding <code>DataObject</code>.
+ * @param signatureEnvironment The
+ * @param idGen The ID generator for <code>DataObject</code> references.
+ * @return The <code>List</code> of <code>DataObject</code>s contained in the
+ * given <code>singleSignatureInfo</code>.
+ * @throws MOASystemException A system error occurred building the data
+ * objects.
+ * @throws MOAApplicationException An error occurred building the data
+ * objects.
+ */
+ private List buildDataObjectList(
+ SingleSignatureInfo singleSignatureInfo,
+ List createTransformsProfiles,
+ XMLDataObject signatureEnvironment,
+ IdGenerator idGen)
+ throws MOASystemException, MOAApplicationException {
+
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ List dataObjects = new ArrayList();
+ Iterator dtIter;
+ Iterator ctpIter = createTransformsProfiles.iterator();
+
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();)
+ {
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ String structure = dataObjInfo.getStructure();
+
+ CreateTransformsInfoProfileExplicit transformsProfile =
+ (CreateTransformsInfoProfileExplicit) ctpIter.next();
+ MetaInfo finalDataMetaInfo = transformsProfile.getCreateTransformsInfo().getFinalDataMetaInfo();
+
+ if (DataObjectInfo.STRUCTURE_ENVELOPING.equals(structure)) {
+ dataObjects.add(
+ buildEnvelopingDataObject(
+ dataObjInfo.getDataObject(),
+ finalDataMetaInfo,
+ idGen.uniqueId()));
+ } else if (DataObjectInfo.STRUCTURE_DETACHED.equals(structure)) {
+ dataObjects.add(
+ buildDetachedDataObject(
+ dataObjInfo.getDataObject(),
+ finalDataMetaInfo,
+ signatureEnvironment,
+ idGen.uniqueId()));
+ } else {
+ throw new MOAApplicationException("1103", new Object[] { structure });
+ }
+ }
+
+ return dataObjects;
+
+ }
+
+ /**
+ * Build a <code>DataObject</code> to be used in an enveloping
+ * signature.
+ *
+ * @param content The <code>Content</code> object containing the data object.
+ * <code>ContentOptionalRefType</code>.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param referenceID The reference ID to use in the signature for the
+ * <code>DataObject</code> created.
+ * @return The <code>DataObject</code> representing the data contained in
+ * <code>dataObjectElem</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the <code>DataObject</code>.
+ * @throws MOASystemException A system error occurred during the creation of
+ * the <code>DataObject</code>.
+ */
+ private DataObject buildEnvelopingDataObject(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ String referenceID)
+ throws MOASystemException, MOAApplicationException {
+
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+
+ dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ finalDataMetaInfo,
+ referenceID,
+ false,
+ false,
+ true,
+ false);
+
+ return dataObject;
+ }
+
+ /**
+ * Build a <code>DataObject</code> to be used in a detached signature.
+ *
+ * @param content The <code>Content</code> object containing an the data.
+ * @param finalDataMetaInfo The meta information corresponding with <code>content</code>.
+ * @param signatureEnvironment The signature environment where the signature
+ * will be inserted.
+ * @param referenceID The reference ID to use in the signature for the
+ * <code>DataObject</code> created.
+ * @return The <code>DataObject</code> representing the data contained in
+ * <code>dataObjectElem</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the <code>DataObject</code>.
+ * @throws MOASystemException A system error occurred during the creation of
+ * the <code>DataObject</code>.
+ */
+ private DataObject buildDetachedDataObject(
+ Content content,
+ MetaInfo finalDataMetaInfo,
+ XMLDataObject signatureEnvironment,
+ String referenceID)
+ throws MOASystemException, MOAApplicationException {
+
+ String reference = content.getReference();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+
+ if (reference == null) {
+ throw new MOAApplicationException("1102", null);
+ } else if ("".equals(reference) || reference.startsWith("#")) {
+ dataObject =
+ factory.createFromSignatureEnvironment(
+ signatureEnvironment.getElement(),
+ reference,
+ referenceID);
+ } else {
+ dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ finalDataMetaInfo,
+ referenceID,
+ true,
+ false,
+ true,
+ false);
+ }
+ return dataObject;
+ }
+
+ /**
+ * Build the signature parent element.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * document in which to insert the signature.
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code>
+ * containing the signature parent element.
+ * @return An <code>XMLDataObject</code> containing the signature parent
+ * element or <code>null</code>, if the <code>CreateSignatureInfo</code> is
+ * <code>null</code>.
+ * @throws MOAApplicationException An error occurred during the creation of
+ * the signature parent.
+ */
+ private XMLDataObject buildSignatureParentElement(
+ Element signatureEnvironment,
+ SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+
+ CreateSignatureInfo createInfo =
+ singleSignatureInfo.getCreateSignatureInfo();
+
+ // evaluate the CreateSignatureLocation
+ if (createInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit createProfile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ createInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ CreateSignatureLocation location =
+ createProfile.getCreateSignatureLocation();
+ Element signatureParent =
+ InvokerUtils.evaluateSignatureLocation(signatureEnvironment, location);
+
+ return new XMLDataObjectImpl(signatureParent);
+ } else {
+ return null;
+ }
+ }
+
+ /**
+ * Get the supplements contained in the
+ * <code>CreateSignatureEnvironmentProfile</code> of the given
+ * <code>SingleSignatureInfo</code>.
+ *
+ * @param singleSigInfo The <code>SingleSignatureInfo</code> from which
+ * to extract the supplements.
+ * @return A <code>List</code> of <code>XMLDataObjectAssociation</code>s
+ * or <code>null</code>, if the <code>singleSigInfo</code> does not contain
+ * supplements.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateSignatureEnvironmentProfile</code>.
+ */
+ private List getCreateSignatureEnvironmentProfileSupplements(SingleSignatureInfo singleSigInfo)
+ throws MOAApplicationException {
+ CreateSignatureInfo sigInfo = singleSigInfo.getCreateSignatureInfo();
+
+ if (sigInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit profile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ sigInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ List supplements = profile.getSupplements();
+
+ return supplements;
+ }
+ return null;
+ }
+
+ /**
+ * Build the list of additional signed properties.
+ *
+ * Based on the generic configuration setting
+ * <code>ConfigurationProvider.TEST_SIGNING_TIME_PROPERTY</code>, a
+ * constant <code>SigningTime</code> will be added to the properties.
+ *
+ * @return The <code>List</code> of additional signed properties.
+ */
+ private List buildAdditionalSignedProperties() {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List additionalSignedProperties = Collections.EMPTY_LIST;
+
+ return additionalSignedProperties;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java
new file mode 100644
index 000000000..7ac971da8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationProfileFactory.java
@@ -0,0 +1,455 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.server.modules.algorithms.HashAlgorithms;
+import iaik.server.modules.keys.KeyEntryID;
+import iaik.server.modules.keys.KeyModule;
+import iaik.server.modules.keys.KeyModuleFactory;
+import iaik.server.modules.xmlsign.SignatureStructureTypes;
+import iaik.server.modules.xmlsign.XMLSignatureCreationProfile;
+import iaik.server.modules.xmlsign.XMLSignatureInsertionLocation;
+
+import java.math.BigInteger;
+import java.security.Principal;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.iaik.xml.CanonicalizationImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.DataObjectTreatmentImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.XMLSignatureCreationProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlsign.XMLSignatureInsertionLocationImpl;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.util.IdGenerator;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A factory to create <code>XMLSignatureCreationProfile</code>s from a
+ * <code>CreateXMLSignatureRequest</code>, based on the current MOA
+ * configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationProfileFactory {
+
+ private static Map HASH_ALGORITHM_MAPPING;
+
+ static {
+ HASH_ALGORITHM_MAPPING = new HashMap();
+ HASH_ALGORITHM_MAPPING.put(Constants.SHA1_URI, HashAlgorithms.SHA1);
+ }
+
+ /** The <code>CreateXMLSignatureRequest</code> for which to create the
+ * profile.*/
+ private CreateXMLSignatureRequest request;
+ /** How many profiles have been created based on the same request. */
+ private int createProfileCount;
+ /** The <code>Set</code> of reserved object IDs.*/
+ private Set reserved;
+
+ /**
+ * Create a new <code>XMLSignatureCreationProfileFactory</code>.
+ *
+ * @param request The request for which to create profiles.
+ * @param reserved The <code>Set</code> of reserved object IDs. IDs will
+ * be added during signature creation.
+ */
+ public XMLSignatureCreationProfileFactory(
+ CreateXMLSignatureRequest request,
+ Set reserved) {
+ this.request = request;
+ this.reserved = reserved;
+ createProfileCount = 1;
+ }
+
+ /**
+ * Create a <code>XMLSignatureCreationProfile</code> for the given
+ * <code>SingleSignatureInfo</code> object..
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing information about the creation of a signature.
+ * @param sigInfoReservedIDs The <code>Set</code> of reserved ID attribue values
+ * for the particular <code>singleSignatureInfo</code>.
+ * @return The <code>XMLSignatureCreationProfile</code> containing additional
+ * information for creating an XML signature.
+ * @throws MOASystemException A system error occurred during creation of the
+ * profile. See message for details
+ * @throws MOAApplicationException An application error occurred during
+ * creation of the profile. See message for details.
+ */
+ public XMLSignatureCreationProfile createProfile(SingleSignatureInfo singleSignatureInfo,
+ Set sigInfoReservedIDs) throws MOASystemException, MOAApplicationException {
+
+ HashSet allReservedIDs = new HashSet(reserved);
+ allReservedIDs.addAll(sigInfoReservedIDs);
+
+ XMLSignatureCreationProfileImpl profile =
+ new XMLSignatureCreationProfileImpl(createProfileCount, allReservedIDs);
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CanonicalizationImpl canonicalization;
+ List dataObjectTreatmentList;
+ String keyGroupID;
+ Set keySet;
+ List transformationSupplements;
+ List createTransformsProfiles;
+
+ // build the transformation supplements
+ createTransformsProfiles =
+ getCreateTransformsInfoProfiles(singleSignatureInfo);
+ transformationSupplements =
+ buildTransformationSupplements(createTransformsProfiles);
+
+ // build and set the data object treatment list
+ dataObjectTreatmentList =
+ buildDataObjectTreatmentList(
+ singleSignatureInfo,
+ createTransformsProfiles,
+ transformationSupplements,
+ allReservedIDs);
+ profile.setDataObjectTreatmentList(dataObjectTreatmentList);
+
+ // set the key set
+ keyGroupID = request.getKeyIdentifier();
+ keySet = buildKeySet(keyGroupID);
+ if (keySet == null) {
+ throw new MOAApplicationException("2231", null);
+ } else if (keySet.size() == 0) {
+ throw new MOAApplicationException("2232", null);
+ }
+ profile.setKeySet(keySet);
+
+ // set the Security Layer manifest algorithm name
+ profile.setSecurityLayerManifestTypeURI(Constants.SL_MANIFEST_TYPE_URI);
+
+ // set the structure type
+ if (singleSignatureInfo.getCreateSignatureInfo() != null) {
+ profile.setSignatureStructureType(SignatureStructureTypes.ENVELOPED);
+ } else {
+ profile.setSignatureStructureType(SignatureStructureTypes.DETACHED);
+ }
+
+ // set insertion location
+ profile.setSignatureInsertionLocation(
+ getSignatureInsertionLocationIndex(singleSignatureInfo));
+
+ // set the canonicalization algorithm
+ canonicalization =
+ new CanonicalizationImpl(config.getCanonicalizationAlgorithmName());
+ profile.setSignedInfoCanonicalization(canonicalization);
+
+ // set the signed properties
+ profile.setSignedProperties(Collections.EMPTY_LIST);
+
+ // set security layer conformity
+ profile.setSecurityLayerConform(
+ singleSignatureInfo.isSecurityLayerConform());
+
+ // update the createProfileCount
+ createProfileCount++;
+
+ return profile;
+ }
+
+ /**
+ * Get the <code>List</code> of all <code>CreateTransformsInfoProfile</code>s
+ * contained in all the <code>DataObjectInfo</code>s of the given
+ * <code>SingleSignatureInfo</code>.
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object from
+ * which to extract the <code>CreateTransformsInfoProfile</code>s.
+ * @return All <code>CreateTransformsInfoProfile</code>s of all
+ * <code>DataObjectInfo</code>s of <code>singleSignatureInfo</code>.
+ * @throws MOAApplicationException An error occurred creating one of the
+ * profiles.
+ */
+ List getCreateTransformsInfoProfiles(SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ List profiles = new ArrayList();
+ Iterator dtIter;
+
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();) {
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ CreateTransformsInfoProfileExplicit profile =
+ ProfileMapper.mapCreateTransformsInfoProfile(
+ dataObjInfo.getCreateTransformsInfoProfile(),
+ config);
+ profiles.add(profile);
+ }
+
+ return profiles;
+ }
+
+ /**
+ * Build the <code>List</code> of transformation supplements contained in a
+ * <code>SingleSignatureInfo</code> object.
+ *
+ * @param createTransformsInfoProfiles The
+ * <code>CreateTransformsInfoProfile</code> object from which to extract the
+ * transformation supplements.
+ * @return A <code>List</code> of <code>DataObject</code>s containing the
+ * transformation supplements.
+ * @throws MOASystemException A system error occurred creating one of the
+ * transformation supplements.
+ * @throws MOAApplicationException An error occurred creating one of the
+ * transformation supplements.
+ */
+ private List buildTransformationSupplements(List createTransformsInfoProfiles)
+ throws MOASystemException, MOAApplicationException {
+
+ List transformationSupplements = new ArrayList();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ Iterator iter;
+
+ for (iter = createTransformsInfoProfiles.iterator(); iter.hasNext();) {
+ CreateTransformsInfoProfileExplicit profile =
+ (CreateTransformsInfoProfileExplicit) iter.next();
+ List supplements = profile.getSupplements();
+
+ if (supplements != null) {
+ Iterator supplIter;
+
+ for (supplIter = supplements.iterator(); supplIter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) supplIter.next();
+
+ transformationSupplements.add(
+ factory.createFromXmlDataObjectAssociation(
+ supplement,
+ false,
+ true));
+ }
+ }
+ }
+
+ return transformationSupplements;
+ }
+
+ /**
+ * Build the <code>List</code> of <code>DataObjectTreatment</code>s for the
+ * given <code>SingleSignatureInfo</code> object..
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * from which to exctract the <code>CreateTransformsInfoProfile</code>s
+ * containing the data for the <code>DataObjectTreatment</code>s.
+ * @param createTransformsInfoProfiles The
+ * <code>CreateTransformsInfoProfile</code>s contained in the
+ * <code>singleSignatureInfo</code>.
+ * @param transformationSupplements Additional parameters for
+ * transformations contained in <code>DataObjectTreatment</code>s.
+ * @param reservedIDs The <code>Set</code> of reserved object IDs.
+ * @return A <code>List</code> of <code>DataObjectTreatment</code> objects.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>DataObjectTreatment</code>s.
+ * @throws MOASystemException A system error occurred building one of the
+ * <code>DataObjectTreatment</code>s.
+ */
+ private List buildDataObjectTreatmentList(
+ SingleSignatureInfo singleSignatureInfo,
+ List createTransformsInfoProfiles,
+ List transformationSupplements,
+ Set reservedIDs)
+ throws MOASystemException, MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List treatments = new ArrayList();
+ List dataObjInfos = singleSignatureInfo.getDataObjectInfos();
+ int dataObjectTreatmentCount = 1;
+ String hashAlgorithmName;
+ Iterator dtIter;
+ Iterator prIter;
+
+ prIter = createTransformsInfoProfiles.iterator();
+ for (dtIter = dataObjInfos.iterator(); dtIter.hasNext();) {
+ CreateTransformsInfoProfileExplicit profile =
+ (CreateTransformsInfoProfileExplicit) prIter.next();
+ DataObjectInfo dataObjInfo = (DataObjectInfo) dtIter.next();
+ IdGenerator objIdGen =
+ new IdGenerator(
+ ("signed-data-" + createProfileCount)
+ + ("-" + dataObjectTreatmentCount++),
+ reservedIDs);
+ DataObjectTreatmentImpl treatment = new DataObjectTreatmentImpl(objIdGen);
+
+ treatment.setFinalContentType(
+ profile.getCreateTransformsInfo().getFinalDataMetaInfo().getMimeType());
+ treatment.setTransformationList(buildTransformationList(profile));
+ treatment.setReferenceInManifest(dataObjInfo.isChildOfManifest());
+
+ hashAlgorithmName =
+ (String) HASH_ALGORITHM_MAPPING.get(
+ config.getDigestMethodAlgorithmName());
+ if (hashAlgorithmName == null) {
+ error(
+ "config.17",
+ new Object[] { config.getDigestMethodAlgorithmName()});
+ throw new MOASystemException("2900", null);
+ }
+
+ treatment.setHashAlgorithmName(hashAlgorithmName);
+ treatment.setIncludedInSignature(
+ DataObjectInfo.STRUCTURE_ENVELOPING.equals(dataObjInfo.getStructure()));
+ treatment.setTransformationSupplements(transformationSupplements);
+
+ treatments.add(treatment);
+
+ }
+
+ return treatments;
+ }
+
+ /**
+ * Build the <code>List</code> of transformations contained in a
+ * <code>CreateTransformsInfoProfile</code> object.
+ *
+ * @param profile The <code>CreateTransformsInfoProfile</code> object
+ * from which to extract the <code>Transform</code>s.
+ * @return A <code>List</code> of <code>Transformation</code>s contained in
+ * the given <code>CreateTransformsInfoProfile</code>.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>Transformation</code>s.
+ */
+ private List buildTransformationList(CreateTransformsInfoProfileExplicit profile)
+ throws MOAApplicationException {
+
+ TransformationFactory factory = TransformationFactory.getInstance();
+ List transforms = profile.getCreateTransformsInfo().getTransforms();
+
+ return transforms != null
+ ? factory.createTransformationList(transforms)
+ : Collections.EMPTY_LIST;
+ }
+
+ /**
+ * Build the set of <code>KeyEntryID</code>s available to the given
+ * <code>keyGroupID</code>.
+ *
+ * @param keyGroupID The keygroup ID for which the available keys should be
+ * returned.
+ * @return The <code>Set</code> of <code>KeyEntryID</code>s
+ * identifying the available keys.
+ */
+ private Set buildKeySet(String keyGroupID) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ Set keyGroupEntries;
+
+ // get the KeyGroup entries from the configuration
+ if (context.getClientCertificate() != null) {
+ X509Certificate cert = context.getClientCertificate()[0];
+ Principal issuer = cert.getIssuerDN();
+ BigInteger serialNumber = cert.getSerialNumber();
+
+ keyGroupEntries =
+ config.getKeyGroupEntries(issuer, serialNumber, keyGroupID);
+ } else {
+ keyGroupEntries = config.getKeyGroupEntries(null, null, keyGroupID);
+ }
+
+ // map the KeyGroup entries to a set of KeyEntryIDs
+ if (keyGroupEntries == null) {
+ return null;
+ } else if (keyGroupEntries.size() == 0) {
+ return Collections.EMPTY_SET;
+ } else {
+ KeyModule module =
+ KeyModuleFactory.getInstance(
+ new TransactionId(context.getTransactionID()));
+ Set keyEntryIDs = module.getPrivateKeyEntryIDs();
+ Set keySet = new HashSet();
+ Iterator iter;
+
+ // filter out the keys that do not exist in the IAIK configuration
+ // by walking through the key entries and checking if the exist in the
+ // keyGroupEntries
+ for (iter = keyEntryIDs.iterator(); iter.hasNext();) {
+ KeyEntryID entryID = (KeyEntryID) iter.next();
+ KeyGroupEntry entry =
+ new KeyGroupEntry(
+ entryID.getModuleID(),
+ entryID.getCertificateIssuer(),
+ entryID.getCertificateSerialNumber());
+ if (keyGroupEntries.contains(entry)) {
+ keySet.add(entryID);
+ }
+ }
+ return keySet;
+ }
+ }
+
+ /**
+ * Get the signature location index where the signature will be inserted into
+ * the signature parent element.
+ *
+ * @param singleSignatureInfo The <code>SingleSignatureInfo</code> object
+ * containing the <code>CreateSignatureLocation</code>.
+ * @return The index at which to insert the signature into the signature
+ * environment.
+ * @throws MOAApplicationException An error occurred parsing the
+ * <code>CreateSignatureEnvironmentProfile</code>.
+ */
+ private XMLSignatureInsertionLocation getSignatureInsertionLocationIndex(SingleSignatureInfo singleSignatureInfo)
+ throws MOAApplicationException {
+
+ CreateSignatureInfo createInfo =
+ singleSignatureInfo.getCreateSignatureInfo();
+
+ if (createInfo != null) {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ CreateSignatureEnvironmentProfileExplicit profile =
+ ProfileMapper.mapCreateSignatureEnvironmentProfile(
+ createInfo.getCreateSignatureEnvironmentProfile(),
+ config);
+ int index = profile.getCreateSignatureLocation().getIndex();
+
+ return new XMLSignatureInsertionLocationImpl(index);
+ } else {
+ return new XMLSignatureInsertionLocationImpl(0);
+ }
+ }
+
+ /**
+ * Utility function to issue an error message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void error(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.error(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
new file mode 100644
index 000000000..4642593eb
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvoker.java
@@ -0,0 +1,675 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import iaik.IAIKException;
+import iaik.IAIKRuntimeException;
+import iaik.ixsil.exceptions.URIException;
+import iaik.ixsil.util.URI;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+import iaik.server.modules.xml.XMLSignature;
+import iaik.server.modules.xmlsign.XMLConstants;
+import iaik.server.modules.xmlverify.DsigManifest;
+import iaik.server.modules.xmlverify.ReferenceData;
+import iaik.server.modules.xmlverify.SecurityLayerManifest;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationModule;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationModuleFactory;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+import iaik.server.modules.xmlverify.XMLSignatureVerificationResult;
+import iaik.x509.X509Certificate;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.CheckResult;
+import at.gv.egovernment.moa.spss.api.common.XMLDataObjectAssociation;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResult;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferencesCheckResultInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SupplementProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameterHash;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLSignatureImpl;
+import at.gv.egovernment.moa.spss.server.logging.IaikLog;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.CollectionUtils;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * A class providing a DOM based interface to the
+ * <code>XMLSignatureVerificationModule</code>.
+ *
+ * This class performs the invocation of the
+ * <code>iaik.server.modules.xmlverify.XMLSignatureVerificationModule</code>
+ * from a <code>VerifyXMLSignatureRequest</code> given as a DOM element. The
+ * result of the invocation is integrated into a
+ * <code>VerifyXMLSignatureResponse</code> and returned.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationInvoker {
+
+ /** The single instance of this class. */
+ private static XMLSignatureVerificationInvoker instance = null;
+
+ private static Set FILTERED_REF_TYPES;
+
+ static {
+ FILTERED_REF_TYPES = new HashSet();
+ FILTERED_REF_TYPES.add(DsigManifest.XML_DSIG_MANIFEST_TYPE);
+ FILTERED_REF_TYPES.add(SecurityLayerManifest.SECURITY_LAYER_MANIFEST_TYPE);
+ FILTERED_REF_TYPES.add(
+ SecurityLayerManifest.SECURITY_LAYER_MANIFEST_TYPE_OLD);
+ FILTERED_REF_TYPES.add(
+ XMLConstants.NAMESPACE_ETSI_STRING + "SignedProperties");
+ }
+
+ /**
+ * Get the single instance of this class.
+ *
+ * @return The single instance of this class.
+ */
+ public static synchronized XMLSignatureVerificationInvoker getInstance() {
+ if (instance == null) {
+ instance = new XMLSignatureVerificationInvoker();
+ }
+ return instance;
+ }
+
+ /**
+ * Create a new <code>XMLSignatureCreationInvoker</code>.
+ *
+ * Protected to disallow multiple instances.
+ */
+ protected XMLSignatureVerificationInvoker() {
+ }
+
+ /**
+ * Process the <code>VerifyXMLSignatureRequest<code> message and invoke the
+ * <code>XMLSignatureVerificationModule</code>.
+ *
+ * @param request A <code>VerifyXMLSignatureRequest<code> API object
+ * containing the data for verifying an XML signature.
+ * @return A <code>VerifyXMLSignatureResponse</code> containing the
+ * answert to the <code>VerifyXMLSignatureRequest</code>.
+ * MOA schema definition.
+ * @throws MOAException An error occurred during signature verification.
+ */
+ public VerifyXMLSignatureResponse verifyXMLSignature(VerifyXMLSignatureRequest request)
+ throws MOAException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ LoggingContext loggingCtx =
+ LoggingContextManager.getInstance().getLoggingContext();
+ XMLSignatureVerificationProfileFactory profileFactory =
+ new XMLSignatureVerificationProfileFactory(request);
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ XMLSignatureVerificationResult result;
+ XMLSignatureVerificationProfile profile;
+ ReferencesCheckResult signatureManifestCheck;
+ DataObjectFactory dataObjFactory;
+ XMLDataObject signatureEnvironment;
+ Node signatureEnvironmentParent = null;
+ Element requestElement = null;
+ XMLSignature xmlSignature;
+ Date signingTime;
+ List supplements;
+ List dataObjectList;
+
+ // get the supplements
+ supplements = getSupplements(request);
+
+ // build XMLSignature
+ dataObjFactory = DataObjectFactory.getInstance();
+ signatureEnvironment =
+ dataObjFactory.createSignatureEnvironment(
+ request.getSignatureInfo().getVerifySignatureEnvironment(),
+ supplements);
+ xmlSignature = buildXMLSignature(signatureEnvironment, request);
+
+ // build the list of DataObjects
+ dataObjectList = buildDataObjectList(supplements);
+
+ // build profile
+ profile = profileFactory.createProfile();
+
+ // get the signingTime
+ signingTime = request.getDateTime();
+
+ // make the signature environment the root of the document, if it is not a
+ // separate document anyway; this is done to assure that canonicalization
+ // of the signature environment contains the correct namespace declarations
+ requestElement =
+ signatureEnvironment.getElement().getOwnerDocument().getDocumentElement();
+ if (requestElement != signatureEnvironment.getElement()) {
+ signatureEnvironmentParent =
+ signatureEnvironment.getElement().getParentNode();
+ requestElement.getOwnerDocument().replaceChild(
+ signatureEnvironment.getElement(),
+ requestElement);
+ }
+
+ // verify the signature
+ try {
+ XMLSignatureVerificationModule module =
+ XMLSignatureVerificationModuleFactory.getInstance();
+
+ module.setLog(new IaikLog(loggingCtx.getNodeID()));
+
+ result =
+ module.verifySignature(
+ xmlSignature,
+ dataObjectList,
+ profile,
+ signingTime,
+ new TransactionId(context.getTransactionID()));
+ } catch (IAIKException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ } catch (IAIKRuntimeException e) {
+ MOAException moaException = IaikExceptionMapper.getInstance().map(e);
+ throw moaException;
+ }
+
+ // swap back in the request as root document
+ if (requestElement != signatureEnvironment.getElement()) {
+ requestElement.getOwnerDocument().replaceChild(
+ requestElement,
+ signatureEnvironment.getElement());
+ signatureEnvironmentParent.appendChild(signatureEnvironment.getElement());
+ }
+
+ // check the result
+ signatureManifestCheck =
+ validateSignatureManifest(request, result, profile);
+
+ // Check if signer certificate is in trust profile's allowed signer certificates pool
+ TrustProfile trustProfile = context.getConfiguration().getTrustProfile(request.getTrustProfileId());
+ CheckResult certificateCheck = validateSignerCertificate(result, trustProfile);
+
+ // build the response
+ responseBuilder.setResult(result, profile, signatureManifestCheck, certificateCheck);
+
+ return responseBuilder.getResponse();
+ }
+
+ /**
+ * Checks if the signer certificate matches one of the allowed signer certificates specified
+ * in the provided <code>trustProfile</code>.
+ *
+ * @param result The result produced by the <code>XMLSignatureVerificationModule</code>.
+ *
+ * @param trustProfile The trust profile the signer certificate is validated against.
+ *
+ * @return The overal result of the certificate validation for the signer certificate.
+ *
+ * @throws MOAException if one of the signer certificates specified in the <code>trustProfile</code>
+ * cannot be read from the file system.
+ */
+ private CheckResult validateSignerCertificate(XMLSignatureVerificationResult result, TrustProfile trustProfile)
+ throws MOAException
+ {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ int resultCode = result.getCertificateValidationResult().getValidationResultCode().intValue();
+ if (resultCode == 0 && trustProfile.getSignerCertsUri() != null)
+ {
+ X509Certificate signerCertificate = (X509Certificate) result.getCertificateValidationResult().getCertificateChain().get(0);
+
+ File signerCertsDir = null;
+ try
+ {
+ signerCertsDir = new File(new URI(trustProfile.getSignerCertsUri()).getPath());
+ }
+ catch (URIException e)
+ {
+ throw new MOASystemException("2900", null, e); // Should not happen, already checked at loading the MOA configuration
+ }
+
+ File[] files = signerCertsDir.listFiles();
+ if (files == null) resultCode = 1;
+ int i;
+ for (i = 0; i < files.length; i++)
+ {
+ if (!files[i].isDirectory())
+ {
+ FileInputStream currentFIS = null;
+ try
+ {
+ currentFIS = new FileInputStream(files[i]);
+ }
+ catch (FileNotFoundException e) {
+ throw new MOASystemException("2900", null, e);
+ }
+
+ try
+ {
+ X509Certificate currentCert = new X509Certificate(currentFIS);
+ currentFIS.close();
+ if (currentCert.equals(signerCertificate)) break;
+ }
+ catch (Exception e)
+ {
+ // Simply ignore file if it cannot be interpreted as certificate
+ String logMsg = msg.getMessage("invoker.03", new Object[]{trustProfile.getId(), files[i].getName()});
+ Logger.warn(logMsg);
+ try
+ {
+ currentFIS.close();
+ }
+ catch (IOException e1) {
+ // If clean-up fails, do nothing
+ }
+ }
+ }
+ }
+ if (i >= files.length)
+ {
+ resultCode = 1; // No signer certificate from the trustprofile pool matches the actual signer certificate
+ }
+ }
+
+ SPSSFactory factory = SPSSFactory.getInstance();
+ return factory.createCheckResult(resultCode, null);
+ }
+
+ /**
+ * Select the <code>dsig:Signature</code> DOM element within the signature
+ * environment.
+ *
+ * @param signatureEnvironment The signature environment containing the
+ * <code>dsig:Signature</code>.
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * signature environment.
+ * @return The <code>dsig:Signature</code> element wrapped in a
+ * <code>XMLSignature</code> object.
+ * @throws MOAApplicationException An error occurred locating the
+ * <code>dsig:Signature</code>.
+ */
+ private XMLSignature buildXMLSignature(
+ XMLDataObject signatureEnvironment,
+ VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+
+ VerifySignatureLocation signatureLocation =
+ request.getSignatureInfo().getVerifySignatureLocation();
+ Element signatureParent;
+
+ // evaluate the VerifySignatureLocation to get the signature parent
+ signatureParent =
+ InvokerUtils.evaluateSignatureLocation(
+ signatureEnvironment.getElement(),
+ signatureLocation);
+
+ // check for signatureParent to be a dsig:Signature element
+ if (!"Signature".equals(signatureParent.getLocalName())
+ || !Constants.DSIG_NS_URI.equals(signatureParent.getNamespaceURI())) {
+ throw new MOAApplicationException("2266", null);
+ }
+
+ return new XMLSignatureImpl(signatureParent);
+ }
+
+ /**
+ * Build the supplemental data objects contained in the
+ * <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param supplements A <code>List</code> of
+ * <code>XMLDataObjectAssociation</code>s containing the supplement data.
+ * @return A <code>List</code> of <code>DataObject</code>s representing the
+ * supplemental data objects.
+ * @throws MOASystemException A system error occurred building one of the data
+ * objects.
+ * @throws MOAApplicationException An error occurred building one of the data
+ * objects.
+ */
+ private List buildDataObjectList(List supplements)
+ throws MOASystemException, MOAApplicationException {
+ List dataObjectList = new ArrayList();
+
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ DataObject dataObject;
+ Iterator iter;
+
+ if (supplements != null) {
+ for (iter = supplements.iterator(); iter.hasNext();) {
+ XMLDataObjectAssociation supplement =
+ (XMLDataObjectAssociation) iter.next();
+ dataObject =
+ factory.createFromXmlDataObjectAssociation(supplement, true, false);
+ dataObjectList.add(dataObject);
+ }
+ }
+
+ return dataObjectList;
+
+ }
+
+ /**
+ * Get the supplemental data contained in the
+ * <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * supplemental data.
+ * @return A <code>List</code> of <code>XMLDataObjectAssociation</code>
+ * objects containing the supplemental data.
+ * @throws MOAApplicationException An error occurred resolving one of the
+ * supplement profiles.
+ */
+ private List getSupplements(VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List supplementProfiles = request.getSupplementProfiles();
+
+ List supplements = new ArrayList();
+
+ if (supplementProfiles != null) {
+
+ List mappedProfiles =
+ ProfileMapper.mapSupplementProfiles(supplementProfiles, config);
+ Iterator iter;
+
+ for (iter = mappedProfiles.iterator(); iter.hasNext();) {
+ SupplementProfileExplicit profile =
+ (SupplementProfileExplicit) iter.next();
+ supplements.add(profile.getSupplementProfile());
+ }
+
+ }
+ return supplements;
+ }
+
+ /**
+ * Perform additional validations of the
+ * <code>XMLSignatureVerificationResult</code>.
+ *
+ * <p> In particular, it is verified that:
+ * <ul>
+ * <li>Each <code>ReferenceData</code> object contains transformation
+ * chain that matches one of the <code>Transforms</code> given in the
+ * corresponding <code>SignatureManifestCheckParams/ReferenceInfo</code></li>
+ * <li>The hash values of the <code>TransformParameter</code>s are valid.
+ * </li>
+ * </ul>
+ * </p>
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> containing the
+ * signature to verify.
+ * @param result The result produced by
+ * <code>XMLSignatureVerificationModule</code>.
+ * @param profile The profile used for validating the <code>request</code>.
+ * @return The result of additional validations of the signature manifest.
+ * @throws MOAApplicationException Post-validation of the
+ * <code>XMLSignatureVerificaitonResult</code> failed.
+ */
+ private ReferencesCheckResult validateSignatureManifest(
+ VerifyXMLSignatureRequest request,
+ XMLSignatureVerificationResult result,
+ XMLSignatureVerificationProfile profile)
+ throws MOAApplicationException {
+
+ SPSSFactory factory = SPSSFactory.getInstance();
+ MessageProvider msg = MessageProvider.getInstance();
+
+ // validate that each ReferenceData object contains transforms specified
+ // in the corresponding SignatureManifestCheckParams/ReferenceInfo
+ if (request.getSignatureManifestCheckParams() != null) {
+ List refInfos =
+ request.getSignatureManifestCheckParams().getReferenceInfos();
+ List refDatas = filterReferenceInfos(result.getReferenceDataList());
+ List failedReferencesList = new ArrayList();
+ Iterator refInfoIter;
+ Iterator refDataIter;
+
+ if (refInfos.size() != refDatas.size()) {
+ return factory.createReferencesCheckResult(1, null);
+ }
+
+ refInfoIter = refInfos.iterator();
+ refDataIter =
+ filterReferenceInfos(result.getReferenceDataList()).iterator();
+
+ while (refInfoIter.hasNext()) {
+ ReferenceInfo refInfo = (ReferenceInfo) refInfoIter.next();
+ ReferenceData refData = (ReferenceData) refDataIter.next();
+ List transforms = buildTransformsList(refInfo);
+ boolean found = false;
+ Iterator trIter;
+
+ for (trIter = transforms.iterator(); trIter.hasNext() && !found;) {
+ found = trIter.next().equals(refData.getTransformationList());
+ }
+
+ if (!found) {
+ Integer refIndex = new Integer(refData.getReferenceIndex());
+ String logMsg =
+ msg.getMessage("invoker.01", new Object[] { refIndex });
+
+ failedReferencesList.add(refIndex);
+ Logger.debug(new LogMsg(logMsg));
+ }
+ }
+
+ if (!failedReferencesList.isEmpty()) {
+ // at least one reference failed - return their indexes and check code 1
+ int[] failedReferences =
+ CollectionUtils.toIntArray(failedReferencesList);
+ ReferencesCheckResultInfo checkInfo =
+ factory.createReferencesCheckResultInfo(null, failedReferences);
+
+ return factory.createReferencesCheckResult(1, checkInfo);
+ }
+ }
+
+ // validate the hashes contained in all the ReferenceInfo objects of the
+ // security layer manifest
+ if (request.getSignatureManifestCheckParams() != null
+ && result.containsSecurityLayerManifest()) {
+ Map hashValues = buildTransformParameterHashValues(request);
+ Set transformParameterURIs =
+ buildTransformParameterURIs(profile.getTransformationSupplements());
+ List referenceInfoList =
+ result.getSecurityLayerManifest().getReferenceDataList();
+ Iterator refIter;
+
+ for (refIter = referenceInfoList.iterator(); refIter.hasNext();) {
+ iaik.server.modules.xmlverify.ReferenceInfo ref =
+ (iaik.server.modules.xmlverify.ReferenceInfo) refIter.next();
+ byte[] hash = (byte[]) hashValues.get(ref.getURI());
+
+ if (!transformParameterURIs.contains(ref.getURI())
+ || (hash != null && !Arrays.equals(hash, ref.getHashValue()))) {
+
+ // the transform parameter doesn't exist or the hashs do not match
+ // return the index of the failed reference and check code 1
+ int[] failedReferences = new int[] { ref.getReferenceIndex()};
+ ReferencesCheckResultInfo checkInfo =
+ factory.createReferencesCheckResultInfo(null, failedReferences);
+ String logMsg =
+ msg.getMessage(
+ "invoker.02",
+ new Object[] { new Integer(ref.getReferenceIndex())});
+
+ Logger.debug(new LogMsg(logMsg));
+
+ return factory.createReferencesCheckResult(1, checkInfo);
+ }
+ }
+ }
+
+ return factory.createReferencesCheckResult(0, null);
+ }
+
+ /**
+ * Get all <code>Transform</code>s contained in all the
+ * <code>VerifyTransformsInfoProfile</code>s of the given
+ * <code>ReferenceInfo</code>.
+ *
+ * @param refInfo The <code>ReferenceInfo</code> object containing
+ * the transformations.
+ * @return A <code>List</code> of <code>List</code>s. Each of the
+ * <code>List</code>s contains <code>Transformation</code> objects.
+ * @throws MOAApplicationException An error occurred building one of the
+ * <code>Transformation</code>s.
+ */
+ private List buildTransformsList(ReferenceInfo refInfo)
+ throws MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+ List mappedProfiles =
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config);
+ List transformsList = new ArrayList();
+ TransformationFactory factory = TransformationFactory.getInstance();
+ Iterator iter;
+
+ for (iter = mappedProfiles.iterator(); iter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) iter.next();
+ List transforms = profile.getTransforms();
+
+ if (transforms != null) {
+ transformsList.add(factory.createTransformationList(transforms));
+ }
+ }
+
+ return transformsList;
+ }
+
+ /**
+ * Build the <code>Set</code> of all <code>TransformParameter</code> URIs.
+ *
+ * @param transformParameters The <code>List</code> of
+ * <code>TransformParameter</code>s, as provided to the verification.
+ * @return The <code>Set</code> of all <code>TransformParameter</code> URIs.
+ */
+ private Set buildTransformParameterURIs(List transformParameters) {
+ Set uris = new HashSet();
+ Iterator iter;
+
+ for (iter = transformParameters.iterator(); iter.hasNext();) {
+ DataObject transformParameter = (DataObject) iter.next();
+ uris.add(transformParameter.getURI());
+ }
+
+ return uris;
+ }
+
+ /**
+ * Build a mapping between <code>TransformParameter</code> URIs (a
+ * <code>String</code> and <code>dsig:HashValue</code> (a
+ * <code>byte[]</code>).
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code>.
+ * @return Map The resulting mapping.
+ * @throws MOAApplicationException An error occurred accessing one of
+ * the profiles.
+ */
+ private Map buildTransformParameterHashValues(VerifyXMLSignatureRequest request)
+ throws MOAApplicationException {
+
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ Map hashValues = new HashMap();
+ List refInfos =
+ request.getSignatureManifestCheckParams().getReferenceInfos();
+ Iterator refIter;
+
+ for (refIter = refInfos.iterator(); refIter.hasNext();) {
+ ReferenceInfo refInfo = (ReferenceInfo) refIter.next();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+ List mappedProfiles =
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config);
+ Iterator prIter;
+
+ for (prIter = mappedProfiles.iterator(); prIter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) prIter.next();
+ List trParameters = profile.getTransformParameters();
+ Iterator trIter;
+
+ for (trIter = trParameters.iterator(); trIter.hasNext();) {
+ TransformParameter transformParameter =
+ (TransformParameter) trIter.next();
+ String uri = transformParameter.getURI();
+
+ if (transformParameter.getTransformParameterType()
+ == TransformParameter.HASH_TRANSFORMPARAMETER) {
+ hashValues.put(
+ uri,
+ ((TransformParameterHash) transformParameter).getDigestValue());
+ }
+
+ }
+ }
+ }
+ return hashValues;
+ }
+
+ /**
+ * Filter the <code>ReferenceInfo</code>s returned by the
+ * <code>VerifyXMLSignatureResult</code> for comparison with the
+ * <code>ReferenceInfo</code> elements in the request.
+ *
+ * @param referenceInfos The <code>ReferenceInfo</code>s from the
+ * <code>VerifyXMLSignatureResult</code>.
+ * @return A <code>List</code> of all <code>ReferenceInfo</code>s whose type
+ * is not a XMLDsig manifest, Security Layer manifest, or ETSI signed
+ * property.
+ */
+ private List filterReferenceInfos(List referenceInfos) {
+ List filtered = new ArrayList();
+ Iterator iter;
+
+ for (iter = referenceInfos.iterator(); iter.hasNext();) {
+ iaik.server.modules.xmlverify.ReferenceInfo refInfo =
+ (iaik.server.modules.xmlverify.ReferenceInfo) iter.next();
+ String refType = refInfo.getReferenceType();
+
+ if (refType == null || !FILTERED_REF_TYPES.contains(refType)) {
+ filtered.add(refInfo);
+ }
+ }
+
+ return filtered;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
new file mode 100644
index 000000000..5df13a337
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationProfileFactory.java
@@ -0,0 +1,144 @@
+package at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+
+import iaik.server.modules.xmlverify.XMLSignatureVerificationProfile;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.TransformParameter;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.pki.PKIProfileImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xmlverify.XMLSignatureVerificationProfileImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * A factory to create a <code>XMLSignatureVerificationProfile</code> from a
+ * <code>VerifyXMLSignatureRequest</code>, based on the current MOA
+ * configuration.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationProfileFactory {
+
+ /** The <code>VerifyXMLSignatureRequest</code> for which to create profile
+ * information. */
+ private VerifyXMLSignatureRequest request;
+
+ /**
+ * Create a new <code>XMLSignatureVerificationProfileFactory</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> to extract
+ * profile data from.
+ */
+ public XMLSignatureVerificationProfileFactory(VerifyXMLSignatureRequest request) {
+ this.request = request;
+ }
+
+ /**
+ * Create a <code>XMLSignatureCreationProfile</code> from the
+ * <code>VerifyXMLSignaturesRequest</code> and the current MOA configuration.
+ *
+ * @return The <code>XMLSignatureVerificationProfile</code> containing
+ * additional information for verifying an XML signature.
+ * @throws MOASystemException A system error occurred building the profile.
+ * @throws MOAApplicationException An error occurred building the profile.
+ */
+ public XMLSignatureVerificationProfile createProfile()
+ throws MOASystemException, MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ XMLSignatureVerificationProfileImpl profile =
+ new XMLSignatureVerificationProfileImpl();
+ SignatureManifestCheckParams checkParams;
+ String trustProfileID;
+
+ // set whether to check XMLDsig manifests
+ profile.setCheckXMLDsigManifests(true);
+
+ // set the certificate validation profile
+ trustProfileID = request.getTrustProfileId();
+ profile.setCertificateValidationProfile(
+ new PKIProfileImpl(config, trustProfileID));
+
+ // set whether hash input data is to be included
+ profile.setIncludeHashInputData(request.getReturnHashInputData());
+
+ // set the security layer manifest check parameters
+ // and transformation supplements (if present)
+ checkParams = request.getSignatureManifestCheckParams();
+ profile.setCheckSecurityLayerManifest(true);
+ profile.setIncludeReferenceInputData(checkParams != null ? checkParams.getReturnReferenceInputData() : false);
+ if (checkParams != null) {
+ List transformationSupplements;
+ transformationSupplements = buildTransformationSupplements();
+ profile.setTransformationSupplements(transformationSupplements);
+ } else {
+ profile.setTransformationSupplements(Collections.EMPTY_LIST);
+ }
+
+ return profile;
+ }
+
+ /**
+ * Build supplemental data objects used in the transformations.
+ *
+ * @return A <code>List</code> of <code>DataObject</code>s providing
+ * supplemental data to the transformations.
+ * @throws MOASystemException A system error occurred building one of the
+ * transformations.
+ * @throws MOAApplicationException An error occurred building one of the
+ * transformations.
+ */
+ public List buildTransformationSupplements()
+ throws MOASystemException, MOAApplicationException {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ConfigurationProvider config = context.getConfiguration();
+ SignatureManifestCheckParams checkParams =
+ request.getSignatureManifestCheckParams();
+ List transformsProfiles = new ArrayList();
+ List transformationSupplements = new ArrayList();
+ DataObjectFactory factory = DataObjectFactory.getInstance();
+ List refInfos = checkParams.getReferenceInfos();
+ Iterator refIter;
+ Iterator prIter;
+ Iterator trIter;
+
+ // build the list of all VerifyTransformsInfoProfiles in all ReferenceInfos
+ refInfos = checkParams.getReferenceInfos();
+ for (refIter = refInfos.iterator(); refIter.hasNext();) {
+ ReferenceInfo refInfo = (ReferenceInfo) refIter.next();
+ List profiles = refInfo.getVerifyTransformsInfoProfiles();
+
+ transformsProfiles.addAll(
+ ProfileMapper.mapVerifyTransformsInfoProfiles(profiles, config));
+ }
+
+ // build the DataObjects
+ for (prIter = transformsProfiles.iterator(); prIter.hasNext();) {
+ VerifyTransformsInfoProfileExplicit profile =
+ (VerifyTransformsInfoProfileExplicit) prIter.next();
+ List transformParameters = profile.getTransformParameters();
+
+ for (trIter = transformParameters.iterator(); trIter.hasNext();) {
+ TransformParameter trParam = (TransformParameter) trIter.next();
+ transformationSupplements.add(
+ factory.createFromTransformParameter(trParam));
+ }
+ }
+
+ return transformationSupplements;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java
new file mode 100644
index 000000000..068fab5ca
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLog.java
@@ -0,0 +1,126 @@
+package at.gv.egovernment.moa.spss.server.logging;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import iaik.logging.TransactionId;
+
+/**
+ * An implementation of the <code>iaik.logging.Log</code>
+ * interface that is based on Jakarta Commons-Logging.
+ *
+ * @author Fatemeh Philippi
+ * @version $Id$
+ */
+public class IaikLog implements iaik.logging.Log {
+ /** The hierarchy to log all IAIK output to. */
+ public static final String IAIK_LOG_HIERARCHY = "iaik.server";
+ /** The commons-loggin <code>Log</code> to use for logging the messages. */
+ private static Log log = LogFactory.getLog(IAIK_LOG_HIERARCHY);
+ /** The node ID to use. */
+ private String nodeId;
+
+ /**
+ * Create a new <code>IaikLog</code>.
+ *
+ * @param nodeId The node ID for this <code>Log</code> object.
+ */
+ public IaikLog(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * @see iaik.logging.Log#isDebugEnabled()
+ */
+ public boolean isDebugEnabled() {
+ return log.isDebugEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#debug(TransactionId, Object, Throwable)
+ */
+ public void debug(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.debug(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isInfoEnabled()
+ */
+ public boolean isInfoEnabled() {
+ return log.isInfoEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#info(TransactionId, Object, Throwable)
+ */
+ public void info(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.info(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isWarnEnabled()
+ */
+ public boolean isWarnEnabled() {
+ return log.isWarnEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#warn(TransactionId, Object, Throwable)
+ */
+ public void warn(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.warn(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isErrorEnabled()
+ */
+ public boolean isErrorEnabled() {
+ return log.isErrorEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#error(TransactionId, Object, Throwable)
+ */
+ public void error(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.error(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#isFatalEnabled()
+ */
+ public boolean isFatalEnabled() {
+ return log.isFatalEnabled();
+ }
+
+ /**
+ * @see iaik.logging.Log#fatal(TransactionId, Object, Throwable)
+ */
+ public void fatal(TransactionId transactionId, Object message, Throwable t) {
+ IaikLogMsg msg = new IaikLogMsg(transactionId, nodeId, message);
+
+ log.fatal(msg, t);
+ }
+
+ /**
+ * @see iaik.logging.Log#setNodeId(String)
+ */
+ public void setNodeId(String nodeId) {
+ this.nodeId = nodeId;
+ }
+
+ /**
+ * @see iaik.logging.Log#getNodeId()
+ */
+ public String getNodeId() {
+ return nodeId;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java
new file mode 100644
index 000000000..a0e4def86
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogFactory.java
@@ -0,0 +1,42 @@
+package at.gv.egovernment.moa.spss.server.logging;
+
+import iaik.logging.Log;
+import iaik.logging.LogConfigurationException;
+import iaik.logging.LogFactory;
+
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+/**
+ * An implementation of the <code>iaik.logging.LogFactory</code> abstract
+ * class to log messages to the MOA logging subsystem.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikLogFactory extends LogFactory {
+
+ public Log getInstance(Class clazz) throws LogConfigurationException {
+ return getInstanceImpl();
+ }
+
+ public Log getInstance(String name) throws LogConfigurationException {
+ return getInstanceImpl();
+ }
+
+ /**
+ * Return an instance of <code>iaik.logging.Log</code>.
+ *
+ * @return The <code>iaik.logging.Log</code> object to log messages to.
+ */
+ private Log getInstanceImpl() {
+ String nodeID =
+ LoggingContextManager.getInstance().getLoggingContext().getNodeID();
+
+ return new IaikLog(nodeID);
+ }
+
+ public void release() {
+ // we do not hold any resources
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java
new file mode 100644
index 000000000..75fb388a9
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/IaikLogMsg.java
@@ -0,0 +1,54 @@
+package at.gv.egovernment.moa.spss.server.logging;
+
+import iaik.logging.TransactionId;
+
+/**
+ * A unified message type to log messages from the IAIK subsystem.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikLogMsg {
+
+ /** The transaction ID of this message. */
+ private TransactionId transactionId;
+ /** The node ID of this message. */
+ private String nodeId;
+ /** The message to log. */
+ private Object message;
+
+ /**
+ * Create a <code>IaikLogMsg</code> object.
+ *
+ * @param transactionId The transaction id of the transaction which
+ * generated this log message. May be <code>null</code>.
+ * @param nodeId The node id where this message was generated. May be
+ * <code>null</code>.
+ * @param message The actual message to log. May be <code>null</code>.
+ */
+ public IaikLogMsg(TransactionId transactionId, String nodeId, Object message) {
+ this.transactionId = transactionId;
+ this.nodeId = nodeId;
+ this.message = message;
+ }
+
+
+ /**
+ * Convert this log message to a <code>String</code>.
+ *
+ * @return The <code>String</code> representation of this log message.
+ */
+ public String toString() {
+ StringBuffer msg = new StringBuffer();
+
+ msg.append("TID=");
+ msg.append(transactionId != null ? transactionId.getLogID() : "<null>");
+ msg.append(" NID=");
+ msg.append(nodeId != null ? nodeId : "<null>");
+ msg.append(" MSG=");
+ msg.append(message != null ? message.toString() : "<null>");
+
+ return msg.toString();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java
new file mode 100644
index 000000000..9e0239464
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/logging/TransactionId.java
@@ -0,0 +1,38 @@
+package at.gv.egovernment.moa.spss.server.logging;
+
+/**
+ * An implementation of the <code>iaik.logging.TransactionId</code> interface.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransactionId implements iaik.logging.TransactionId {
+
+ /** The String representation for logging the transaction ID. */
+ private String logID;
+
+ /**
+ * Create a <code>TransactionId</code> object.
+ *
+ * @param logID The transaction id as it should be presented to the logging
+ * subsystem.
+ */
+ public TransactionId(String logID) {
+ this.logID = logID;
+ }
+
+ /**
+ * @see iaik.logging.TransactionId#getLogID()
+ */
+ public String getLogID() {
+ return logID;
+ }
+
+ /**
+ * @see java.lang.Object#toString()
+ */
+ public String toString() {
+ return getLogID();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
new file mode 100644
index 000000000..befbd58dd
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/AxisHandler.java
@@ -0,0 +1,382 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.cert.X509Certificate;
+import java.util.Iterator;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.Message;
+import org.apache.axis.MessageContext;
+import org.apache.axis.attachments.AttachmentPart;
+import org.apache.axis.handlers.BasicHandler;
+import org.apache.axis.transport.http.HTTPConstants;
+import org.apache.axis.utils.Messages;
+import org.apache.axis.utils.XMLUtils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionIDGenerator;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+/**
+ * An handler that is invoked on each web service request and performs some
+ * central message handling.
+ *
+ * Mainly sets up the <code>TransactionContext</code> for the current
+ * transaction (i.e. web service request).
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ * @version $Id$
+ */
+public class AxisHandler extends BasicHandler {
+
+ /** The resource names of the messages to load. */
+ private static final String MOA_SPSS_WSDL_RESOURCE_ = "/resources/wsdl/MOA-SPSS-1.3.wsdl";
+
+ /** The property name for accessing the HTTP request. */
+ private static final String REQUEST_PROPERTY = HTTPConstants.MC_HTTP_SERVLETREQUEST;
+
+ /** The property name for accessing the X509 client certificate chain. */
+ private static final String X509_CERTIFICATE_PROPERTY = "javax.servlet.request.X509Certificate";
+
+ /** The property name for accessing the SOAP action header. */
+ private static final String SOAP_ACTION_HEADER = "soapaction";
+
+ /** URI of the SOAP XML namespace. */
+ public static final String SOAP_NS_URI = "http://schemas.xmlsoap.org/soap/envelope/";
+
+ /** Prefix used for the SOAP XML namespace */
+ public static final String SOAP_PREFIX = "soapenv";
+
+ /** Simple string contains the front part of the enveloping SOAP wrapping */
+ private static final String SOAP_PART_PRE = "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><soapenv:Body>";
+
+ /** Simple string contains the post part of the enveloping SOAP wrapping */
+ private static final String SOAP_PART_POST = "</soapenv:Body></soapenv:Envelope>";
+
+ /**
+ * Handle an invocation of this handler.
+ *
+ * @param msgContext Information about this request/response.
+ * @throws AxisFault An error occurred during processing of the request.
+ * @see org.apache.axis.Handler#invoke(MessageContext)
+ */
+ public void invoke(MessageContext msgContext) throws AxisFault {
+ if (!msgContext.getPastPivot()) {
+ handleRequest(msgContext);
+ } else {
+ handleResponse(msgContext);
+ }
+ }
+
+ /**
+ * This method is called by <code>invoke</code> to handle incoming requests.
+ *
+ * @param msgContext The context as provided to <code>invoke</code>.
+ * @throws AxisFault An error occurred during processing of the request.
+ */
+ private void handleRequest(MessageContext msgContext) throws AxisFault {
+ try {
+ // generate a unique transaction id and build the TransactionContext
+ // for this request
+ HttpServletRequest request =
+ (HttpServletRequest) msgContext.getProperty(REQUEST_PROPERTY);
+
+ X509Certificate[] clientCert =
+ (X509Certificate[]) request.getAttribute(X509_CERTIFICATE_PROPERTY);
+
+ //Configure Axis
+ //msgContext.setProperty(org.apache.axis.SOAPPart.ALLOW_FORM_OPTIMIZATION, Boolean.FALSE);
+
+ Message soapMessage = msgContext.getCurrentMessage();
+
+ ConfigurationProvider configuration =
+ ConfigurationProvider.getInstance();
+
+ Element xmlRequest = null;
+ Element soapPart = DOMUtils.parseDocument(new ByteArrayInputStream(soapMessage.getSOAPPartAsBytes()), false, null, null).getDocumentElement();
+ if (soapPart!=null) {
+ NodeList soapBodies = soapPart.getElementsByTagNameNS(SOAP_NS_URI, "Body");
+ if (soapBodies!=null && soapBodies.getLength()>0) {
+ xmlRequest = (Element) soapBodies.item(0).getFirstChild();
+ }
+ //oder TODO: Evaluierung ob XPATH schneller
+ /*
+ HashMap nSMap = new HashMap();
+ nSMap.put((String)SOAP_PREFIX, SOAP_NS_URI);
+ Element soapBody = (Element) XPathUtils.selectSingleNode(soapPart, nSMap, "/"+SOAP_PREFIX+":Envelope/"+SOAP_PREFIX+":Body");
+ if (soapBody!=null) {
+ xmlRequest= (Element) soapBody.getFirstChild();
+ }
+ */
+ }
+
+ TransactionContext context =
+ new TransactionContext(
+ TransactionIDGenerator.nextID(),
+ clientCert,
+ configuration,
+ xmlRequest,
+ null);
+
+ String soapAction = (String) request.getHeader(SOAP_ACTION_HEADER);
+ if ("\"\"".equals(soapAction)) {
+ // if http soap action header is empty
+ soapAction = msgContext.getTargetService();
+ }
+ context.setRequestName(soapAction);
+
+ int attachmentCount = soapMessage.getAttachmentsImpl().getAttachmentCount();
+ if (attachmentCount>0) {
+
+ // add SOAP attachments to transaction context
+ Iterator iterator = soapMessage.getAttachments();
+ while (iterator.hasNext()) {
+ AttachmentPart attachment = (AttachmentPart)iterator.next();
+ String id = attachment.getContentId();
+ String type = attachment.getContentType();
+
+ //Now get the InputStream (note: we could also get the content with Object content = attachment.getContent();)
+ InputStream is = null;
+ javax.activation.DataHandler datahandler = attachment.getDataHandler();
+ org.apache.axis.attachments.ManagedMemoryDataSource mmds = (org.apache.axis.attachments.ManagedMemoryDataSource)datahandler.getDataSource();
+ if (mmds!=null){
+ is = mmds.getInputStream();
+ }
+ debug("handler.06", new Object[] {id, type});
+ context.addAttachment(id, type, mmds);
+ }
+ }
+
+ setUpContexts(context);
+
+ // log some information about the request
+ info(
+ "handler.00",
+ new Object[] {
+ context.getTransactionID(),
+ msgContext.getTargetService()});
+ info("handler.01", new Object[] { request.getRemoteAddr()});
+ if (clientCert != null) {
+ info(
+ "handler.02",
+ new Object[] {
+ clientCert[0].getSubjectDN(),
+ clientCert[0].getSerialNumber(),
+ clientCert[0].getIssuerDN()});
+
+ } else {
+ info("handler.03", null);
+ }
+ if (Logger.isDebugEnabled()) {
+ String msg = soapMessage.getSOAPPartAsString();
+ Logger.debug(new LogMsg(msg));
+ }
+ } catch (MOASystemException e) {
+ MOASystemException se = new MOASystemException("2900", null, e);
+ AxisFault fault = AxisFault.makeFault(se);
+ fault.setFaultDetail(new Element[] { se.toErrorResponse()});
+ throw fault;
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Logger.info(new LogMsg(t.getStackTrace()));
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+ }
+
+ /**
+ * This method is called by <code>invoke</code> to handle outgoing
+ * responses.
+ *
+ * @param msgContext The context as provided to <code>invoke</code>.
+ * @throws AxisFault An error occurred during processing of the response.
+ */
+ private void handleResponse(MessageContext msgContext) throws AxisFault {
+ String xmlResponseString = null;
+ String soapResponseString = null;
+
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ Element xmlResponse = context.getResponse();
+
+ if (xmlResponse!=null) {
+ try {
+ xmlResponseString = DOMUtils.serializeNode(xmlResponse, true);
+ /*
+ Soll die Antwort nur \n enthalten, so gibt es 2 Möglichkeiten:
+ 1.) höhere Xalan Version und
+ xmlResponseString = DOMUtils.serializeNode(xmlResponse, true, "\n");
+ 2.)
+ OutputFormat serializerFormat = new OutputFormat((Document) xmlResponse.getOwnerDocument());
+ serializerFormat.setLineSeparator("\n");
+ serializerFormat.setIndenting(false);
+ serializerFormat.setPreserveSpace(true);
+ serializerFormat.setOmitXMLDeclaration(true);
+ serializerFormat.setEncoding("UTF-8");
+ ByteArrayOutputStream serializedBytes = new ByteArrayOutputStream();
+ XMLSerializer serializer = new XMLSerializer(serializedBytes, serializerFormat);
+ serializer.serialize(xmlResponse);
+ serializedBytes.close();
+ xmlResponseString = serializedBytes.toString("UTF-8");
+ */
+ soapResponseString = SOAP_PART_PRE + xmlResponseString + SOAP_PART_POST;
+ //override axis response-message
+ msgContext.setResponseMessage(new Message(soapResponseString));
+ } catch (Throwable t) {
+ t.printStackTrace();
+ Logger.info(new LogMsg(t.getStackTrace()));
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ throw fault;
+ }
+
+ } else {
+ //Fallback: if functions do not set the resulting response in the transaction, the original one from axis will be used
+ soapResponseString = msgContext.getCurrentMessage().getSOAPPartAsString();
+ }
+
+ info("handler.04", null);
+ if (Logger.isDebugEnabled()) {
+ Logger.debug(new LogMsg(soapResponseString));
+ }
+ tearDownContexts();
+ }
+
+ /**
+ * Called, when the processing of the web service fails.
+ *
+ * @param msgContext Information about the current request.
+ * @see org.apache.axis.Handler#onFault(org.apache.axis.MessageContext)
+ */
+ public void onFault(MessageContext msgContext) {
+ info("handler.05", null);
+ tearDownContexts();
+ }
+
+ /**
+ * Set up the thread-local contexts (<code>TransactionContext</code> and
+ * <code>LoggingContext</code>).
+ *
+ * @param context The <code>TransactionContext</code> to set for the current
+ * request.
+ */
+ private void setUpContexts(TransactionContext context) {
+ // set the transaction context in the TransactionContextManager
+ TransactionContextManager tcm = TransactionContextManager.getInstance();
+ tcm.setTransactionContext(context);
+
+ // set the logging context in the LoggingContextManager
+ LoggingContextManager lcm = LoggingContextManager.getInstance();
+ LoggingContext lc = new LoggingContext(context.getTransactionID());
+ lcm.setLoggingContext(lc);
+ }
+
+ /**
+ * Tear down the thread-local contexts.
+ */
+ private void tearDownContexts() {
+ TransactionContextManager tcm = TransactionContextManager.getInstance();
+
+ //delete temporary files
+ TransactionContext context = tcm.getTransactionContext();
+ context.cleanAttachmentCache();
+
+ // unset the transaction context
+ tcm.setTransactionContext(null);
+
+ // unset the logging context
+ LoggingContextManager lcm = LoggingContextManager.getInstance();
+ lcm.setLoggingContext(null);
+ }
+
+ /**
+ * Generate the WSDL into the <code>msgContext</code>.
+ *
+ * The code of this method is more or less copied from the
+ * <code>org.apache.axis.handlers.soap.SOAPService</code> class contained in
+ * the 1.1 release of Axis to allow for a missing <code>wsdlFile</code> (so
+ * that a resource by the same name is searched for in the classpath). The
+ * implementation of this method should be obsolete if Axis 1.1 or higher is
+ * used.
+ *
+ * @param msgContext The <code>MessageContext</code> that will contain the
+ * WSDL description of the current web service.
+ * @throws AxisFault An error occurred producing the WSDL.
+ */
+ public void generateWSDL(MessageContext msgContext) throws AxisFault {
+ InputStream instream = null;
+
+ try {
+ String filename = MOA_SPSS_WSDL_RESOURCE_;
+ File file = new File(filename);
+ if (file.exists()) {
+ //if this resolves to a file, load it
+ instream = new FileInputStream(filename);
+ } else {
+ //else load a named resource in our classloader.
+ instream = this.getClass().getResourceAsStream(filename);
+ if (instream == null) {
+ String errorText = Messages.getMessage("wsdlFileMissing", filename);
+ throw new AxisFault(errorText);
+ }
+ }
+ Document doc = XMLUtils.newDocument(instream);
+ msgContext.setProperty("WSDL", doc);
+ } catch (Exception e) {
+ throw AxisFault.makeFault(e);
+ } finally {
+ if (instream != null) {
+ try {
+ instream.close();
+ } catch (IOException e) {
+ // ok to do nothing here
+ }
+ }
+ }
+ }
+
+ /**
+ * Utility function to issue an info message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void info(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.info(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+ /**
+ * Utility function to issue an debug message to the log.
+ *
+ * @param messageId The ID of the message to log.
+ * @param parameters Additional message parameters.
+ */
+ private static void debug(String messageId, Object[] parameters) {
+ MessageProvider msg = MessageProvider.getInstance();
+
+ Logger.debug(new LogMsg(msg.getMessage(messageId, parameters)));
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java
new file mode 100644
index 000000000..7783ed3f6
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ConfigurationServlet.java
@@ -0,0 +1,120 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.init.*;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A servlet to initialize and update the MOA configuration.
+ *
+ * @author Fatemeh Philippi
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationServlet extends HttpServlet {
+ /** The document type of the HTML to generate. */
+ private static final String DOC_TYPE =
+ "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n";
+
+ /**
+ * Handle a HTTP GET request, used to indicated that the MOA
+ * configuration needs to be updated (reloaded).
+ *
+ * @see javax.servlet.http.HttpServlet#doGet(HttpServletRequest, HttpServletResponse)
+ */
+ public void doGet(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+
+ MessageProvider msg = MessageProvider.getInstance();
+ PrintWriter out;
+
+ // set up a logging context for logging the reconfiguration
+ LoggingContextManager.getInstance().setLoggingContext(
+ new LoggingContext("configuration update"));
+
+ response.setContentType("text/html");
+ out = response.getWriter();
+ out.println(DOC_TYPE);
+ out.println("<head><title>MOA configuration update</title></head>");
+ out.println("<body bgcolor=\"#FFFFFF\">");
+ try {
+ // reconfigure the system
+ ConfigurationProvider config = ConfigurationProvider.reload();
+ IaikConfigurator iaikConfigurator = new IaikConfigurator();
+
+ iaikConfigurator.configure(config);
+
+ // print a status message
+ out.println("<p><b>" + msg.getMessage("config.06", null) + "</b></p>");
+ Logger.info(new LogMsg(msg.getMessage("config.06", null)));
+
+ if (!config.getWarnings().isEmpty()) {
+ // print the warnings
+ List allWarnings = new ArrayList();
+ Iterator iter;
+
+ allWarnings.addAll(config.getWarnings());
+ allWarnings.addAll(iaikConfigurator.getWarnings());
+
+ out.println("<p><b>" + msg.getMessage("config.29", null) + "</b></p>");
+ for (iter = allWarnings.iterator(); iter.hasNext();) {
+ out.println(iter.next() + "<br />");
+ }
+ out.println("<p><b>" + msg.getMessage("config.28", null) + "</b></p>");
+ }
+
+ } catch (Throwable t) {
+ out.println("<p><b>" + msg.getMessage("config.20", null) + "</b></p>");
+ out.println("<p><b>" + msg.getMessage("config.28", null) + "</b></p>");
+ Logger.warn(new LogMsg(msg.getMessage("config.20", null)), t);
+ }
+ out.println("</body>");
+
+ out.flush();
+ out.close();
+
+ // tear down the logging context
+ LoggingContextManager.getInstance().setLoggingContext(null);
+ }
+
+ /**
+ * Do the same as <code>doGet</code>.
+ *
+ * @see javax.servlet.http.HttpServlet#doPost(HttpServletRequest, HttpServletResponse)
+ */
+ public void doPost(HttpServletRequest request, HttpServletResponse response)
+ throws ServletException, IOException {
+ doGet(request, response);
+ }
+
+ /**
+ * Perform some initial initialization tasks for the MOA web services
+ * application.
+ *
+ * Does an initial load of the MOA configuration to test if a working web
+ * service can be provided.
+ *
+ * @see javax.servlet.GenericServlet#init()
+ */
+ public void init() throws ServletException {
+ SystemInitializer.init();
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java
new file mode 100644
index 000000000..26d79dbd8
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/RevocationArchiveCleaner.java
@@ -0,0 +1,78 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import iaik.pki.revocation.RevocationSourceTypes;
+import iaik.pki.store.revocation.archive.Archive;
+import iaik.pki.store.revocation.archive.ArchiveFactory;
+
+import java.util.Date;
+
+import at.gv.egovernment.moa.logging.LogMsg;
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.logging.TransactionId;
+import at.gv.egovernment.moa.spss.util.MessageProvider;
+
+/**
+ * A <code>Runnable</code> for periodically cleaning up the revocation archive.
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class RevocationArchiveCleaner implements Runnable {
+
+ /** The inverval between two clean-ups of the revocation archive. */
+ private long archiveCleanupInterval;
+
+ /**
+ * Create a new <code>RevocationArchiveCleaner</code>.
+ *
+ * @param archiveCleanupInterval The interval between two clean-ups of the
+ * revocation archive.
+ */
+ public RevocationArchiveCleaner(long archiveCleanupInterval) {
+ this.archiveCleanupInterval = archiveCleanupInterval;
+ }
+
+ /**
+ * Run the <code>RevocationArchiveCleaner</code> in its own
+ * <code>Thread</code>.
+ */
+ public void run() {
+ while (true) {
+ try {
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ boolean enableArchiving = config.getEnableRevocationArchiving();
+
+ if (enableArchiving)
+ {
+ Archive archive = ArchiveFactory.getInstance().getArchive();
+ long archiveDurationMillis =
+ (long) config.getCRLArchiveDuration() * 86400000;
+
+ // delete old archive data
+ if (archiveDurationMillis > 0) {
+ Date olderThan =
+ new Date(System.currentTimeMillis() - archiveDurationMillis);
+
+ archive.deleteOldArchiveEntries(
+ RevocationSourceTypes.CRL,
+ olderThan,
+ new TransactionId("RevocationArchiveCleaner"));
+ }
+ }
+
+ } catch (Exception e) {
+ MessageProvider msg = MessageProvider.getInstance();
+ Logger.error(new LogMsg(msg.getMessage("init.02", null)), e);
+ }
+
+ // sleep
+ try {
+ Thread.sleep(archiveCleanupInterval * 1000);
+ } catch (InterruptedException e) {
+ // ok to do nothing here
+ }
+
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java
new file mode 100644
index 000000000..4224f5665
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/ServiceUtils.java
@@ -0,0 +1,72 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.io.ByteArrayInputStream;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+
+/**
+ * Helper methods for the Service classes.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ServiceUtils {
+
+ /**
+ * Schema-validate a request.
+ *
+ * @param request The request to validate.
+ * @throws MOAApplicationException An error occurred validating the requst.
+ */
+ public static void validateRequest(Element[] request)
+ throws MOAApplicationException {
+
+ // validate the request
+ try {
+ DOMUtils.validateElement(
+ request[0],
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ } catch (Exception e) {
+ throw new MOAApplicationException(
+ "1100",
+ new Object[] { e.getMessage()},
+ e);
+ }
+ }
+
+ /**
+ * Reparse the request with schema-validation turned on so that ID references
+ * are resolved.
+ *
+ * @param request The request to reparse.
+ * @return The reparsed request.
+ * @throws MOAApplicationException An error occurred parsing the request.
+ */
+ public static Element reparseRequest(Element request)
+ throws MOAApplicationException {
+
+ try {
+ byte[] requestBytes = DOMUtils.serializeNode(request, "UTF-8");
+ Document validatedRequest =
+ DOMUtils.parseDocument(
+ new ByteArrayInputStream(requestBytes),
+ true,
+ Constants.ALL_SCHEMA_LOCATIONS,
+ null);
+ return validatedRequest.getDocumentElement();
+ } catch (Exception e) {
+ throw new MOAApplicationException(
+ "1100",
+ new Object[] { e.getMessage()},
+ e);
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java
new file mode 100644
index 000000000..2d548ea3a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureCreationService.java
@@ -0,0 +1,104 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import java.util.Collections;
+
+import javax.xml.namespace.QName;
+
+import org.apache.axis.AxisFault;
+import org.apache.axis.i18n.Messages;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureCreationInvoker;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.util.Constants;
+import at.gv.egovernment.moa.util.StreamUtils;
+
+/**
+ * The service endpoint for the <code>SignatureCreation</code> web service.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureCreationService {
+
+ /**
+ * Handle a <code>CreateXMLSignatureRequest</code>.
+ *
+ * @param request The <code>CreateXMLSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>CreateXMLSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] CreateXMLSignatureRequest(Element[] request)
+ throws AxisFault {
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ // check that we have a CreateXMLSignatureRequest; if not, create an
+ // AxisFault, just like the org.apache.axis.providers.java.MsgProvider
+ if (!Constants.MOA_SPSS_CREATE_XML_REQUEST.equals(request[0].getLocalName()) ||
+ !Constants.MOA_NS_URI.equals(request[0].getNamespaceURI()))
+ {
+ QName qname =
+ new QName(request[0].getNamespaceURI(), request[0].getLocalName());
+ throw new AxisFault(
+ Messages.getMessage("noOperationForQName", qname.toString())); // TODO GK Operation name does not make it into the error repsonse
+ }
+
+ // handle the request
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ CreateXMLSignatureRequestParser requestParser =
+ new CreateXMLSignatureRequestParser();
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ Element reparsedReq;
+ CreateXMLSignatureRequest requestObj;
+ CreateXMLSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(context.getRequest());
+
+ // convert to API objects
+ requestObj = requestParser.parse(reparsedReq);
+
+ // invoke the core logic
+ responseObj =
+ invoker.createXMLSignature(requestObj, Collections.EMPTY_SET);
+
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+
+ // save response in transaction
+ context.setResponse(response[0]);
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturerstellung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturerstellung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java
new file mode 100644
index 000000000..b335a6e23
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/service/SignatureVerificationService.java
@@ -0,0 +1,151 @@
+package at.gv.egovernment.moa.spss.server.service;
+
+import org.apache.axis.AxisFault;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.MOASystemException;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+import at.gv.egovernment.moa.util.StreamUtils;
+
+/**
+ * The service endpoint for the <code>SignatureVerification</code> web service.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SignatureVerificationService {
+
+ /**
+ * Handle a <code>VerifyCMSSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyCMSSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>VerifyCMSSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] VerifyCMSSignatureRequest(Element[] request)
+ throws AxisFault {
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ VerifyCMSSignatureRequestParser requestParser =
+ new VerifyCMSSignatureRequestParser();
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ Element reparsedReq;
+ VerifyCMSSignatureRequest requestObj;
+ VerifyCMSSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(context.getRequest());
+
+ // convert to API objects
+ requestObj = requestParser.parse(reparsedReq);
+
+ // invoke the core logic
+ responseObj = invoker.verifyCMSSignature(requestObj);
+
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+
+ // save response in transaction
+ context.setResponse(response[0]);
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+
+ /**
+ * Handle a <code>VerifyXMLSignatureRequest</code>.
+ *
+ * @param request The <code>VerifyXMLSignatureRequest</code> to work on
+ * (contained in the 0th element of the array).
+ * @return A <code>VerifyXMLSignatureResponse</code> as the only element of
+ * the <code>Element</code> array.
+ * @throws AxisFault An error occurred during handling of the message.
+ */
+ public Element[] VerifyXMLSignatureRequest(Element[] request)
+ throws AxisFault {
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ Element[] response = new Element[1];
+
+ try {
+ // create a parser and builder for binding API objects to/from XML
+ VerifyXMLSignatureRequestParser requestParser =
+ new VerifyXMLSignatureRequestParser();
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ Element reparsedReq;
+ VerifyXMLSignatureRequest requestObj;
+ VerifyXMLSignatureResponse responseObj;
+
+ //since Axis (1.1 ff) has problem with namespaces we take the raw request stored by the Axishandler.
+ TransactionContext context = TransactionContextManager.getInstance().getTransactionContext();
+ // validate the request
+ reparsedReq = ServiceUtils.reparseRequest(context.getRequest());
+
+ // convert to API objects
+ requestObj = requestParser.parse(reparsedReq);
+
+ // invoke the core logic
+ responseObj = invoker.verifyXMLSignature(requestObj);
+
+ // map back to XML
+ response[0] = responseBuilder.build(responseObj).getDocumentElement();
+
+ // save response in transaction
+ context.setResponse(response[0]);
+
+ } catch (MOAException e) {
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ } catch (Throwable t) {
+ MOASystemException e = new MOASystemException("2900", null, t);
+ AxisFault fault = AxisFault.makeFault(e);
+ fault.setFaultDetail(new Element[] { e.toErrorResponse()});
+ Logger.debug("Anfrage zur Signaturpruefung wurde nicht erfolgreich beendet:"
+ + System.getProperty("line.separator") + StreamUtils.getStackTraceAsString(e));
+ throw fault;
+ }
+
+ return response;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java
new file mode 100644
index 000000000..9fe17eae2
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/CertTool.java
@@ -0,0 +1,242 @@
+package at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.PrintStream;
+import java.security.cert.CertificateException;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.store.certstore.CertStoreException;
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.certstore.directory.DirectoryCertStore;
+import iaik.pki.store.certstore.directory.DirectoryCertStoreParameters;
+import iaik.pki.store.certstore.directory.DirectoryStoreException;
+import iaik.security.ecc.provider.ECCProvider;
+import iaik.security.provider.IAIK;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+/**
+ * A tool to support X509 certificate handling for configuring the MOA SP/SS
+ * service.
+ *
+ * This class provides functions for:
+ * <ul>
+ * <li>printing certificate information</li>
+ * <li>adding certificates to the cert store</li>
+ * </ul>
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertTool {
+
+ /** Error message if the DN cannot be parsed according to RFC2253. */
+ private static final String ILLEGAL_RFC2253_NAME =
+ "Kein gültiger RFC2253-Name";
+
+ /**
+ * Main entry point of the tool.
+ *
+ * @param args The command line arguments. A single argument is expected,
+ * which is the file name of the X509 certificate to inspect.
+ */
+ public static void main(String args[]) {
+ CertTool certTool = new CertTool();
+
+ if (args.length == 2 && "-info".equals(args[0])) {
+ initProviders();
+ certTool.printCertInfo(args[1], System.out);
+ } else if (args.length == 3 && "-add".equals(args[0])) {
+ initProviders();
+ certTool.addCertToCertStore(args[1], args[2]);
+ } else {
+ certTool.printUsage(System.err);
+ }
+ }
+
+ /**
+ * Init the JCE providers, depending on the JDK used.
+ *
+ * Adds the IAIK JCE and IAIK ECC providers.
+ */
+ private static void initProviders() {
+ if (System.getProperty("java.version").startsWith("1.3")) {
+ IAIK.addAsProvider();
+ } else {
+ IAIK.addAsJDK14Provider();
+ }
+ ECCProvider.addAsProvider();
+ }
+
+ /**
+ * Print the information about the certificate.
+ *
+ * This method will output information about the Subject DN, the Issuer DN and
+ * the serial number of the certificate.
+ *
+ * @param certFile The name of the certificate file to inspect.
+ * @param out The stream to print the information to.
+ */
+ public void printCertInfo(String certFile, PrintStream out) {
+ try {
+ InputStream is = new BufferedInputStream(new FileInputStream(certFile));
+ X509Certificate cert = new X509Certificate(is);
+ String issuerDN;
+ String serial;
+ String subjectDN;
+
+ try {
+ subjectDN = ((Name) (cert.getSubjectDN())).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ subjectDN = ILLEGAL_RFC2253_NAME;
+ }
+
+ try {
+ issuerDN = ((Name) (cert.getIssuerDN())).getRFC2253String();
+ } catch (RFC2253NameParserException e) {
+ issuerDN = ILLEGAL_RFC2253_NAME;
+ }
+
+ serial = cert.getSerialNumber().toString();
+
+ out.println("SubjectDN (RFC2253): " + subjectDN);
+ out.println("IssuerDN (RFC2253) : " + issuerDN);
+ out.println("Serial Number : " + serial);
+ } catch (FileNotFoundException e) {
+ System.err.println("Zertifikat nicht gefunden: " + certFile);
+ } catch (IOException e) {
+ System.err.println(
+ "I/O Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (CertificateException e) {
+ System.err.println(
+ "Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (Throwable t) {
+ System.err.println("Allgemeiner Fehler: " + t.getMessage());
+ }
+ }
+
+ /**
+ * Add a certificate to a directory certificate store.
+ *
+ * @param certFile The certificate to add.
+ * @param certStoreRoot The root directory of the certificate store.
+ */
+ public void addCertToCertStore(String certFile, String certStoreRoot) {
+ try {
+ // read the certificate
+ InputStream is = new BufferedInputStream(new FileInputStream(certFile));
+ X509Certificate cert = new X509Certificate(is);
+
+ // initialize the DirectoryCertStore
+ DirectoryCertStore certStore =
+ new DirectoryCertStore(
+ new SimpleDirectoryCertStoreParameters(certStoreRoot),
+ null);
+
+ certStore.storeCertificate(cert, null);
+
+ System.out.println("\nDas Zertifikat wurde erfolreich hinzugefügt.\n");
+
+ } catch (FileNotFoundException e) {
+ System.err.println("Zertifikat nicht gefunden: " + certFile);
+ } catch (IOException e) {
+ System.err.println(
+ "I/O Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (CertificateException e) {
+ System.err.println(
+ "Fehler beim Lesen des Zertifikats: " + e.getMessage());
+ } catch (DirectoryStoreException e) {
+ System.err.println(
+ "Fehler beim Öffnen des Zertifikatsspeichers: " + e.getMessage());
+ } catch (CertStoreException e) {
+ System.err.println(
+ "Fehler beim Hinzufügen des Zertifikats: " + e.getMessage());
+ } catch (Throwable t) {
+ System.err.println("Allgemeiner Fehler: " + t.getMessage());
+ t.printStackTrace();
+ }
+ }
+
+ /**
+ * Print tool usage.
+ *
+ * @param out The <code>PrintStream</code> to print to.
+ */
+ private void printUsage(PrintStream out) {
+ out.println("\nCerttool-Syntax:\n");
+ out.println("-info <X509 Zertifikatsdatei");
+ out.println();
+ out.println("-add <X509 Zertifikatsdatei> <Zertifikatsspeicher>");
+ out.println("\n");
+ }
+
+}
+
+/**
+ * Simple implementation of the <code>DirectoryCertStoreParameters</code>
+ * interface intelligent enough for setting up a simple
+ * <code>DirectoryCertStore</code> in the <code>CertTool</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+class SimpleDirectoryCertStoreParameters
+ implements DirectoryCertStoreParameters {
+
+ /** The cert store root directory. */
+ private String rootDirectory;
+
+ /**
+ * Create a new <code>SimpleDirectoryCertStoreParameters</code> object.
+ *
+ * @param rootDirectory The root directory of the cert store.
+ */
+ public SimpleDirectoryCertStoreParameters(String rootDirectory) {
+ this.rootDirectory = rootDirectory;
+ }
+
+ /**
+ * @return <code>&quot;MOA Directory CertStore&quot;</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#getId()
+ */
+ public String getId() {
+ return "MOA Directory CertStore";
+ }
+
+ /**
+ * @return CertStoreTypes.DIRECTORY
+ * @see iaik.pki.store.certstore.CertStoreParameters#getType()
+ */
+ public String getType() {
+ return CertStoreTypes.DIRECTORY;
+ }
+
+ /**
+ * @return <code>false</code>
+ * @see iaik.pki.store.certstore.CertStoreParameters#isReadOnly()
+ */
+ public boolean isReadOnly() {
+ return false;
+ }
+
+ /**
+ * @return <code>false</code>
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#createNew()
+ */
+ public boolean createNew() {
+ return false;
+ }
+
+ /**
+ * @return The root directory given at construction time.
+ * @see iaik.pki.store.certstore.directory.DirectoryCertStoreParameters#getRootDirectory()
+ */
+ public String getRootDirectory() {
+ return rootDirectory;
+ }
+
+} \ No newline at end of file
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java
new file mode 100644
index 000000000..d5c3b48c1
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/tools/ConfigTool.java
@@ -0,0 +1,59 @@
+package at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerConfigurationException;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.stream.StreamResult;
+import javax.xml.transform.stream.StreamSource;
+
+/**
+ * A tool for converting a MOA SPSS Version 1.0 configuration file into
+ * a Version 1.3 configuration file.
+ *
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigTool
+{
+ public static void main(String[] args)
+ {
+ if (args == null || args.length != 2)
+ {
+ System.out.println("Usage: ConfigTool <MOA.SPSS.1-0.ConfigFile.xml> <MOA.SPSS.1-3.ConfigFile.xml>");
+ System.out.println(" <MOA.SPSS.1-0.ConfigFile.xml> ... Old config file to be transformed");
+ System.out.println(" <MOA.SPSS.1-3.ConfigFile.xml> ... New config file resulting from the transform");
+ System.exit(-1);
+ }
+
+ try
+ {
+ TransformerFactory tFactory = TransformerFactory.newInstance();
+ Transformer transformer = tFactory.newTransformer(new StreamSource(
+ ConfigTool.class.getResourceAsStream("/resources/tools/ConfigurationMapper.xsl")));
+ transformer.transform(new StreamSource(args[0]), new StreamResult(new FileOutputStream(args[1])));
+
+ System.out.println("Successfully mapped configuration file.");
+ }
+ catch (TransformerConfigurationException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" Cannot initialize XSLT transform.");
+ System.err.println(" " + e.getMessage());
+ }
+ catch (FileNotFoundException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" There is a problem with the filename for the new configuration file.");
+ System.err.println(" " + e.getMessage());
+ }
+ catch (TransformerException e)
+ {
+ System.err.println("An error occurred during mapping the configuration file:");
+ System.err.println(" " + e.getMessage());
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java
new file mode 100644
index 000000000..774880d26
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContext.java
@@ -0,0 +1,264 @@
+package at.gv.egovernment.moa.spss.server.transaction;
+
+import iaik.ixsil.util.URI;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.security.cert.X509Certificate;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.Map.Entry;
+
+import org.apache.axis.attachments.ManagedMemoryDataSource;
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+
+/**
+ * Contains information about the current request.
+ *
+ * @author Stefan Knirsch
+ * @author Patrick Peck
+ */
+public class TransactionContext {
+
+ /** The client certificate. */
+ private X509Certificate[] clientCertificate = null;
+ /** The transaction ID. */
+ private String transactionID = null;
+ /** The name of the request. */
+ private String requestName = null;
+ /** The SOAP embedded request */
+ private Element request;
+ /** The response which is to embed by SOAP */
+ private Element response;
+ /** The map pointing to SOAP attachments needed by the request. */
+ private HashMap attachments = null;
+ /** The configuration to use throughout the request. */
+ private ConfigurationProvider configuration = null;
+
+ /**
+ * Create a <code>TransactionContext</code> object.
+ *
+ * @param transactionID A unique ID for this <code>TransactionContext</code>.
+ * @param clientCertificate The client certificate chain.
+ * @param configuration The MOA configuration to use for this transaction.
+ */
+ public TransactionContext(
+ String transactionID,
+ X509Certificate[] clientCertificate,
+ ConfigurationProvider configuration) {
+
+ this.transactionID = transactionID;
+ this.clientCertificate = clientCertificate;
+ this.configuration = configuration;
+ }
+
+ /**
+ * Create a <code>TransactionContext</code> object.
+ *
+ * @param transactionID A unique ID for this <code>TransactionContext</code>.
+ * @param clientCertificate The client certificate chain.
+ * @param configuration The MOA configuration to use for this transaction.
+ * @param attachments to use for this transaction.
+ */
+ public TransactionContext(
+ String transactionID,
+ X509Certificate[] clientCertificate,
+ ConfigurationProvider configuration,
+ Element request,
+ HashMap attachments) {
+
+ this.transactionID = transactionID;
+ this.clientCertificate = clientCertificate;
+ this.configuration = configuration;
+ this.request = request;
+ this.attachments = attachments;
+ }
+
+ /**
+ * Returns the client certificate.
+ *
+ * @return The client certificate chain, if SSL client authentication has been
+ * configured in the web server and has been used by the client. The 0th
+ * element of the array contains the client certificate. <code>null</code>
+ * otherwise.
+ */
+ public X509Certificate[] getClientCertificate() {
+ return clientCertificate;
+ }
+
+ /**
+ * Returns the unique transaction ID.
+ *
+ * @return The transaction ID.
+ */
+ public String getTransactionID() {
+ return transactionID;
+ }
+
+ /**
+ * Returns the name of the request.
+ *
+ * @return The name of the request.
+ */
+ public String getRequestName() {
+ return requestName;
+ }
+
+ /**
+ * Sets the name of the request.
+ *
+ * @param requestName The request name to set.
+ */
+ public void setRequestName(String requestName) {
+ this.requestName = requestName;
+ }
+
+ /**
+ * Sets the the request.
+ *
+ * @param request The request to set.
+ */
+ public void setRequest(Element request) {
+ this.request = request;
+ }
+
+ /**
+ * Returns the request.
+ *
+ * @return The request.
+ */
+ public Element getRequest() {
+ return request;
+ }
+
+ /**
+ * Sets the the response.
+ *
+ * @param response The response to set.
+ */
+ public void setResponse(Element response) {
+ this.response = response;
+ }
+
+ /**
+ * Returns the response.
+ *
+ * @return The response.
+ */
+ public Element getResponse() {
+ return response;
+ }
+
+ /**
+ * Adds an attachment to the transactions list of SOAP attachments.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ * @param contentType MIME type of the SOAP attachment.
+ * @param is Handle to the ManagedMemoryDataSource of the SOAP attachment.
+ */
+ public void addAttachment(String referenceId, String contentType, ManagedMemoryDataSource is) {
+ if (this.attachments == null) this.attachments = new HashMap();
+ Vector entry = new Vector(2);
+ entry.add(contentType);
+ entry.add(is);
+ this.attachments.put(referenceId, entry);
+ }
+
+ /**
+ * Returns the ManagedMemoryDataSource to a specific SOAP attachment identified by referenceId.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ */
+ public ManagedMemoryDataSource getAttachment(String referenceId) {
+ if (attachments==null) {
+ return null;
+ }
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+ //return (InputStream) ( ((ManagedMemoryDataSource)entry.get(1)).getInputStream());
+ return (ManagedMemoryDataSource) entry.get(1);
+ }
+
+ /**
+ * Returns the InputStream to a specific SOAP attachment identified by uri.
+ *
+ * @param uri Identification value for the SOAP attachment.
+ */
+ public InputStream getAttachmentInputStream(URI uri) throws MOAApplicationException {
+ if (attachments==null) {
+ return null;
+ }
+ String referenceId = uri.getPath();
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+
+ InputStream attachmentIs = null;
+ try {
+ attachmentIs = (InputStream) ( ((ManagedMemoryDataSource)entry.get(1)).getInputStream());
+ } catch (IOException e) {
+ throw new MOAApplicationException("2208", new Object[] { uri }, e);
+ }
+
+ return attachmentIs;
+ //If we would return the whole mmds: return (ManagedMemoryDataSource) entry.get(1);
+ }
+
+ /**
+ * Returns the content type to a specific SOAP attachment identified by referenceId.
+ *
+ * @param referenceId Identification value for the SOAP attachment.
+ */
+ public String getAttachmentContentType(String referenceId) {
+ Vector entry = (Vector) attachments.get(referenceId);
+ if (entry==null) {
+ return null;
+ }
+ return (String) entry.get(0);
+ }
+
+ /**
+ * Delete the temporary attachment files.
+ */
+public void cleanAttachmentCache() {
+ if (null==attachments) {
+ return;
+ }
+ Iterator iterator = attachments.entrySet().iterator();
+ while (iterator.hasNext()) {
+ Entry hmEntry = (Entry) iterator.next();
+ Vector entry = (Vector)hmEntry.getValue();
+ ManagedMemoryDataSource mmds = (ManagedMemoryDataSource)entry.get(1);
+ try {
+ if (mmds!=null) {
+ InputStream is = mmds.getInputStream();
+ if (is!=null) is.close();
+ File f = mmds.getDiskCacheFile();
+ if (f!=null) f.delete();
+ mmds.delete();
+ }
+ } catch (IOException e) {
+ // ok to do nothing here
+ }
+ }
+ }
+
+ /**
+ * Returns the <code>ConfigurationProvider</code> associated with this
+ * transaction.
+ *
+ * @return The ConfigurationProvider associated with this transaction.
+ */
+ public ConfigurationProvider getConfiguration() {
+ return configuration;
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java
new file mode 100644
index 000000000..13127c3ae
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionContextManager.java
@@ -0,0 +1,62 @@
+package at.gv.egovernment.moa.spss.server.transaction;
+
+/**
+ * Provides each thread with an instance of <code>TransactionContext</code>.
+ *
+ * The single instance of the <code>TransactionContextManager</code> should be
+ * used to access contextual information for each web service transaction, e.g.
+ * the transaction ID, MOA configuration, client certificate, etc.
+ *
+ * @author Stefan Knirsch
+ * @author Patrick Peck
+ */
+public class TransactionContextManager {
+
+ /** The single instance of <code>TransactionContextManager</code> */
+ private static TransactionContextManager instance = null;
+
+ /** Contains a single <code>TransactionContext</code> for each thread. */
+ private ThreadLocal context = null;
+
+ /**
+ * Get the single instance of <code>TransactionContextManager</code>.
+ *
+ * @return The single instanc of <code>TransactionContextManager</code>.
+ */
+ public static synchronized TransactionContextManager getInstance() {
+ if (instance == null) {
+ instance = new TransactionContextManager();
+ }
+ return instance;
+ }
+
+ /**
+ * Creates a new <code>TransactionContextManager</code>.
+ *
+ * Protected to disallow direct instantiation.
+ */
+ protected TransactionContextManager() {
+ context = new ThreadLocal();
+ }
+
+ /**
+ * Set the <code>TransactionContext</code> for the current thread.
+ *
+ * @param txContext The <code>TransactionContext</code> for this thread.
+ */
+ public void setTransactionContext(TransactionContext txContext) {
+ context.set(txContext);
+ }
+
+ /**
+ * Get the <code>TransactionContext</code> for the current thread.
+ *
+ * @return The <code>TransactionContext</code> for the current thread or
+ * <code>null</code>, if none has been set (or if this method is being invoked
+ * outside the bounds of a transaction).
+ */
+ public TransactionContext getTransactionContext() {
+ return (TransactionContext) context.get();
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java
new file mode 100644
index 000000000..6eb07defe
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/transaction/TransactionIDGenerator.java
@@ -0,0 +1,51 @@
+package at.gv.egovernment.moa.spss.server.transaction;
+
+
+/**
+ * A generator for unique transaction IDs.
+ *
+ * <p>The transaction IDs are of the form "<base>-<counter>", where:
+ * <ul>
+ * <li><code>base</code> is initialized with the system time when this class is
+ * being loaded</li>
+ * <li><code>counter</code> is incremented sequentially on each call to
+ * <code>nextID()</code></li>
+ * </ul>
+ * </p>
+ *
+ * <p> Assuming that it is highly unlikely that MOA servers are started at
+ * exactly the same time instant, the mechanism provided by this class should
+ * guarantee unique transaction IDs across multiple restarts and/or instances of
+ * the server.</p>
+ *
+ * @author Patrick Peck
+ * @author Stefan Knirsch
+ */
+public class TransactionIDGenerator {
+
+ /** Request sequence number. */
+ private static long counter = 0;
+ /** The base value to which to append the sequence number. */
+ private static String base = null;
+
+ /**
+ * Set up the initial base value.
+ */
+ static {
+ synchronized (TransactionIDGenerator.class) {
+ base = Long.toString(System.currentTimeMillis());
+ }
+ }
+
+ /**
+ * Returns the next transaction ID.
+ *
+ * @return The next transaction ID.
+ */
+ public static synchronized String nextID() {
+ counter++;
+
+ return (base + "-" + counter);
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java
new file mode 100644
index 000000000..2dfd22140
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/server/util/IdGenerator.java
@@ -0,0 +1,61 @@
+package at.gv.egovernment.moa.spss.server.util;
+
+import java.util.Set;
+
+/**
+ * Generate unique ID values for various objects in the response.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IdGenerator {
+ /** The base value to append the counter to. */
+ private String base;
+ /** The <code>Set</code> of reserved ID values. */
+ private Set reserved;
+ /** The sequence number. */
+ private int count;
+
+ /**
+ * Create a new <code>IdGenerator</code>.
+ *
+ * @param base A base value to append the IDs to. The creator of this object
+ * should provide a base value, so that appending the counter leads to unique
+ * IDs.
+ * @param reserved The <code>Set</code> of reserved IDs. A call to
+ * <code>uniqueId()</code> will respect the reserved IDs.
+ */
+ public IdGenerator(String base, Set reserved) {
+ this.base = base;
+ this.reserved = reserved;
+ count = 1;
+ }
+
+ /**
+ * Create the next ID value in the sequence.
+ *
+ * @return The next ID value in the sequence.
+ */
+ protected String nextId() {
+ return base + "-" + count++;
+ }
+
+ /**
+ * Create the next unique ID value which is unique in the reserved ID set.
+ *
+ * The created ID is added to the set of reserved IDs.
+ *
+ * @return The next ID value.
+ */
+ public String uniqueId() {
+ String nextId;
+
+ while (reserved.contains(nextId = nextId()));
+
+ reserved.add(nextId);
+
+ return nextId;
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java
new file mode 100644
index 000000000..a6f6c1d4a
--- /dev/null
+++ b/spss/server/serverlib/src/main/java/at/gv/egovernment/moa/spss/util/MessageProvider.java
@@ -0,0 +1,65 @@
+package at.gv.egovernment.moa.spss.util;
+
+import java.util.Locale;
+
+import at.gv.egovernment.moa.util.Messages;
+
+/**
+ * Singleton wrapper around a <code>Messages</code> object.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class MessageProvider {
+
+ /** The resource names of the messages to load. */
+ private static final String[] DEFAULT_MESSAGE_RESOURCES =
+ { "resources/properties/spss_messages" };
+ /** The corresponding message locales. */
+ private static final Locale[] DEFAULT_MESSAGE_LOCALES =
+ new Locale[] { new Locale("de", "AT") };
+ /** The single instance of this class. */
+ private static MessageProvider instance;
+
+ /** The messages provided by the <code>MessageProvider</code>. */
+ private Messages messages;
+
+ /**
+ * Return the single instance of the <code>MessageProvider</code>.
+ *
+ * Intialilizes the <code>MessageProvider</code> with the default message
+ * locations: <code>/resources/properties/spss_messages</code>.
+ *
+ * @return The single <code>MessageProvider</code>.
+ */
+ public static synchronized MessageProvider getInstance() {
+ if (instance == null) {
+ instance =
+ new MessageProvider(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES);
+ }
+ return instance;
+ }
+
+ /**
+ * Create a <code>MessageProvider</code>.
+ *
+ * @param resourceNames The names of the resources containing the messages.
+ * @param locales The corresponding locales.
+ */
+ protected MessageProvider(String[] resourceNames, Locale[] locales) {
+ this.messages = new Messages(resourceNames, locales);
+ }
+
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message.
+ */
+ public String getMessage(String messageId, Object[] parameters) {
+ return messages.getMessage(messageId, parameters);
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/main/resources/properties/spss_messages_de.properties b/spss/server/serverlib/src/main/resources/properties/spss_messages_de.properties
new file mode 100644
index 000000000..febcf01a9
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/properties/spss_messages_de.properties
@@ -0,0 +1,151 @@
+# This file contains exception messages in the standard Java properties
+# format. The messages may contain formatting patterns as definied in the
+# java.text.MessageFormat class.
+
+#
+# Error messages: the key corresponds to the error code
+#
+
+1100=Fehler beim Validieren der Anfrage: {0}
+1101=Bei enveloping Datenobjekten muss entweder Content oder Reference übergeben werden
+1102=Bei detached Datenobjekten darf das Attribut Reference nicht leer sein
+1103=Ungültiger Wert für Attribut Structure im Element DataObjectInfo: {0}
+1104=Ungültiger Wert für DateTime: {0}
+1105=Ungültiger Wert für Attribut Index in Element CreateSignatureLocation: {0}
+1106=Interner Fehler beim Parsen der XML-Daten
+1107=Kein Kind-Element im Element XMLContent gefunden
+1108=Ungültiger Wert für dsig:Algorithm: {0}
+1109=XMLContent darf nur ein Kind-Element enthalten
+1110=Entweder Content oder Reference muss gesetzt sein
+1111=Reference muss gesetzt sein, wenn kein Content angegeben ist
+1112=Bei leerer Reference muss CreateSignatureEnvironment vorhanden sein
+1113=Der Endpunkt akzeptiert keine Anfragen vom Typ: {0}
+
+2200=Fehler beim Erzeugen der Antwort
+2201=Transformations-Algorithmus unbekannt: {0}
+2202=Kein XPath-Element für XPath-Transformation gefunden
+2203=TrustProfileID unbekannt: {0}
+2207=Ungültiges URI-Format: {0}
+2208=Fehler beim Öffnen des Datenobjekts (URI={0})
+2209=Fehler beim Parsen der XML-Daten
+2210=Fehler beim Lesen des Datenobjekts
+2211=Referenzierte Daten können nicht als XML interpretiert werden (URI={0})
+2212=Fehler beim Auswerten des XPath-Ausdrucks: {0}
+2213=Zugriff auf das Dateisystem verweigert (URI={0})
+2214=Ungültiges URL-Format: {0}
+2215=Kein Stylesheet für XSLT-Transformation gefunden
+2216=Kein XPath-Filter2 Element für XPath-Filter2-Transform gefunden
+2217=Kein InclusiveNamespaces Element für Exclusive Canonicalization Transform gefunden
+2218=Das Signature Environment enthält keine validen XML-Daten
+2219=Fehler beim Lesen des Signature Environment
+2220=Allgemeiner Fehler beim Erzeugen der Signatur [{0}]
+2221=Fehler bei der Behandlung des Schlüssels [{0}]
+2222=Fehler beim Erstellen des Manifests [{0}]
+2223=Fehler beim Erstellen der Referenz [{0}]
+2224=Hashwert nicht verfügbar [{0}]
+2225=Signier-Algorithmus wird nicht unterstützt [{0}]
+2226=Fehler beim Einbetten der Signatur [{0}]
+2227=Fehler beim Berechnen des Signaturwertes [{0}]
+2228=Fehler beim Behandeln der SignedProperties [{0}]
+2229=Signator-Zertifikat nicht verfügbar [{0}]
+2230=Fehler beim Auflösen eines Supplements [{0}]
+2231=Die Schlüsselgruppe ist nicht verfügbar
+2232=Die Schlüsselgruppe ist leer
+2233=Fehler beim Durchführen der Transformation [{0}]
+2234=CreateTransformsInfoProfileID nicht vorhanden (ID={0})
+2235=CreateSignatureEnvironment muss entweder Reference oder Content enthalten
+2236=CreateSignatureEnvironmentProfileID nicht vorhanden (ID={0})
+2237=Fehler beim Auflösen der internen Referenz (URI={0})
+2238=Fehler beim Auflösen des Transformationsparameters (URI={0})
+2240=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2241=Algorithmus wird nicht unterstützt [{0}]
+2242=Fehler beim Parsen der CMS Signatur [{0}]
+2243=Signator-Zertifikat nicht verfügbar [{0}]
+2244=Fehler beim Lesen der Signatur-Daten
+2245=Fehler beim Codieren des Signator-Zertifikats
+2246=Fehler beim Umwandeln des SubjectDN des Signator-Zertifikats nach RFC2253: {0}
+2247=Allgemeiner Fehler beim Verifizieren der Signatur [{0}]
+2248=Fehler beim Vorbereiten der Daten [{0}]
+2249=Das Attribut Signatories enthält einen ungültigen Index (Index={0})
+2262=Fehler beim Behandeln des Manifests [{0}]
+2263=Fehler beim Parsen der Properties [{0}]
+2264=Fehler beim Behandeln der Referenz [{0}]
+2265=Fehler beim Durchführen der Transformation [{0}]
+2266=Signatur ist kein dsig:Signature-Element
+2267=SupplementProfileID nicht vorhanden (ID={0})
+2268=VerifyTransformsInfoProfileID nicht vorhanden (ID={0})
+2269=Fehler beim Parsen der Transformation [{0}]
+2270=Fehler beim Decodieren des Hash-Wertes
+2271=Falsche Anzahl an ReferenceInfo Elementen in SignatureManfestCheckParams
+2280=Die Angabe XMLContent wird derzeit nicht unterstützt
+2281=XML-Supplement kann nicht serialisiert werden (Reference="{0}")
+2282=Datenobjekt mit der URI={0} wurde dem Request nicht bereit gestellt
+
+
+2900=Interner Server-Fehler
+
+3201=Objekt kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3202=Supplement für Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+3203=Signaturumgebung kann nicht geladen werden (Reference="{0}", LocRef-URI="{1}")
+
+9900=Nicht klassifizierter Fehler in Subsystem
+9901=Nicht klassifizierter Laufzeitfehler in Subsystem
+9999=Nicht klassifizierter Fehler
+
+
+#
+# Server internal messages
+#
+
+init.00=Fehler beim Lesen der MOA SP/SS Konfiguration: das Service steht nicht zur Verfügung
+init.01=MOA SP/SS Konfiguration erfolgreich geladen
+init.02=Fehler beim Löschen der Archivdaten
+init.03=Fehler beim Aktivieren des IAIK-JCE/JSSE/JDK1.3 Workaround: SSL ist möglicherweise nicht verfügbar
+init.04=Fehler beim Initialisieren des Schema Pools
+
+config.00=Fehler beim Erstellen des KeyGroupMapping: KeyGroup mit id={0} unbekannt - die Erstellung des KeyGroupMapping wird fortgeführt
+config.01=Fehler in der Konfiguration: Wert für maximale Archivierungsdauer von Widerrufsinformationen (ArchiveDuration) nicht konfiguriert oder ungültig
+config.02=Fehler in der Konfiguration: {0} mit id={1}: falscher Profiltyp in Datei {2}
+config.03=Fehler in der Konfiguration: {0} mit id={1} konnte nicht geladen werden
+config.04=Fehler in der Konfiguration: {0} mit id={1} existiert bereits
+config.05=Umgebungsvariable {0} nicht gesetzt: benutze Default-Konfiguration
+config.06=Die MOA SP/SS Konfiguration wurde erfolgreich aktualisiert.
+config.07=Fehler in der Konfiguration: Reason code {0} unbekannt
+config.08=Fehler beim Konfigurieren der IAIK-Module
+config.09=Fehler beim Öffnen der Schlüssel-Datei {0}
+config.10=Fehler beim Einlesen der Konfiguration (siehe Log-Datei für Details)
+config.11=Fehler biem Erstellen der Konfiguration (siehe Log-Datei für Details)
+config.12=Fehler beim Einlesen des Profils
+config.13=Fehler beim Erstellen des CRLDistributionPoint: CAIssuerDN={0} ungültig
+config.14=Das Attribut {0} für das TrustProfile mit id={1} ist ungültig (Wert={2})
+config.15=Fehler beim Erstellen des TrustProfile id={0}: Name des Konfigurations-Verzeichnisses konnte nicht in eine URL umgewandet werden
+config.16=Fehler beim Erstellen von X509IssuerSerial (IssuerName={0}, SerialNumber={1})
+config.17=DigestAlgorithmName unbekannt (AlgorithmName={0})
+config.18=Lade Keystore: {0}
+config.19=Key ID={0}
+config.20=Fehler beim Aktualisieren der MOA SP/SS Konfiguration. Die bestehende Konfiguration wird beibehalten
+config.21=Lade Konfiguration von {0}
+config.22=Lade {0} mit id={1} von Datei {2}
+config.23=MOA SP/SS Konfiguration: {0} nicht gesetzt oder ungültiger Wert, verwende den Default-Wert: {1}
+config.25=Fehler in der Konfiguration: Das SoftwareKeyModule mit id={0} konnte nicht geladen werden, da die Datei {1} nicht existiert oder ein Verzeichnis bezeichnet
+config.26=Fehler beim Erstellen der KeyGroup mit id={0}: KeyModule mit id={1} unbekannt
+config.27=Fehler in der Konfiguration: Das Attribut {0} des TrustProfiles mit id={1} zeigt nicht auf ein existierendes Verzeichnis
+config.28=Einen detaillierten Fehlerbericht entnehmen Sie bitte der Log-Datei.
+config.29=Es sind folgende leichte Fehler aufgetreten:
+config.31=Fehler in der Konfiguration der KeyGroup mit id={0}: Der Schlüssel im KeyModule id={1} mit IssuerName={2} und SerialNumber={3} konnte nicht geladen werden
+config.32=Fehler in der Konfiguration: Verzeichnisangabe für den Zertifikatsspeicher ist ungültig ({0}).
+
+
+handler.00=Starte neue Transaktion: TID={0}, Service={1}
+handler.01=Aufruf von Adresse={0}
+handler.02=Client-Zertifikat: Subject={0}, Serial={1}, Issuer={2}
+handler.03=Client-Zertifikat nicht verfügbar
+handler.04=Anfrage erfolgreich abgearbeitet
+handler.05=Fehler beim Abarbeiten der Anfrage
+handler.06=SOAP Attachment mit der id={0} für Request hinterlegt (MIME Type des Attachments={1})
+handler.07=SOAP Request empfangen: Request={0}
+
+invoker.00=Das Signature Environment konnte nicht validierend geparst werden
+invoker.01=Keine passende Transformationskette gefunden (Index={0})
+invoker.02=Der Hashwert der Transformation stimmt nicht überein (Index={0})
+invoker.03=Signatorzertifikat aus Trustprofile mit id={0} konnte nicht geparst werden (Dateiname={1})
diff --git a/spss/server/serverlib/src/main/resources/security/cacerts b/spss/server/serverlib/src/main/resources/security/cacerts
new file mode 100644
index 000000000..6eeaba418
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/security/cacerts
Binary files differ
diff --git a/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.wsdl b/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.wsdl
new file mode 100644
index 000000000..c5cd8fc0f
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.wsdl
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Web Service Description for MOA SP/SS 1.4
+-->
+<definitions name="MOA" targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:moa="http://reference.e-government.gv.at/namespace/moa/20020822#" xmlns:xsd="http://www.w3.org/1999/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <import namespace="http://reference.e-government.gv.at/namespace/moa/20020822#" location="../resources/schemas/MOA-SPSS-1.3.xsd"/>
+ <message name="CreateXMLSignatureInput">
+ <part name="body" element="moa:CreateXMLSignatureRequest"/>
+ </message>
+ <message name="CreateXMLSignatureOutput">
+ <part name="body" element="moa:CreateXMLSignatureResponse"/>
+ </message>
+ <message name="VerifyCMSSignatureInput">
+ <part name="body" element="moa:VerifyCMSSignatureRequest"/>
+ </message>
+ <message name="VerifyCMSSignatureOutput">
+ <part name="body" element="moa:VerifyCMSSignatureResponse"/>
+ </message>
+ <message name="VerifyXMLSignatureInput">
+ <part name="body" element="moa:VerifyXMLSignatureRequest"/>
+ </message>
+ <message name="VerifyXMLSignatureOutput">
+ <part name="body" element="moa:VerifyXMLSignatureResponse"/>
+ </message>
+ <message name="MOAFault">
+ <part name="body" element="moa:ErrorResponse"/>
+ </message>
+ <portType name="SignatureCreationPortType">
+ <operation name="createXMLSignature">
+ <input message="tns:CreateXMLSignatureInput"/>
+ <output message="tns:CreateXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <portType name="SignatureVerificationPortType">
+ <operation name="verifyCMSSignature">
+ <input message="tns:VerifyCMSSignatureInput"/>
+ <output message="tns:VerifyCMSSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <input message="tns:VerifyXMLSignatureInput"/>
+ <output message="tns:VerifyXMLSignatureOutput"/>
+ <fault name="MOAFault" message="tns:MOAFault"/>
+ </operation>
+ </portType>
+ <binding name="SignatureCreationBinding" type="tns:SignatureCreationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="createXMLSignature">
+ <soap:operation soapAction="urn:CreateXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <binding name="SignatureVerificationBinding" type="tns:SignatureVerificationPortType">
+ <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="verifyCMSSignature">
+ <soap:operation soapAction="urn:VerifyCMSSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ <operation name="verifyXMLSignature">
+ <soap:operation soapAction="urn:VerifyXMLSignatureAction"/>
+ <input>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </input>
+ <output>
+ <soap:body use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </output>
+ <fault name="MOAFault">
+ <soap:fault use="literal" namespace="http://reference.e-government.gv.at/namespace/moa/20020822#"/>
+ </fault>
+ </operation>
+ </binding>
+ <service name="SignatureCreationService">
+ <port name="SignatureCreationPort" binding="tns:SignatureCreationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureCreation"/>
+ -->
+ </port>
+ </service>
+ <service name="SignatureVerificationService">
+ <port name="SignatureVerificationPort" binding="tns:SignatureVerificationBinding">
+ <!--
+ Please note that the location URL must be adapted to the actual service URL.
+ <soap:address location="http://localhost/moa-spss/services/SignatureVerification"/>
+ -->
+ </port>
+ </service>
+</definitions>
diff --git a/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.xsd b/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.xsd
new file mode 100644
index 000000000..756b51279
--- /dev/null
+++ b/spss/server/serverlib/src/main/resources/wsdl/MOA-SPSS-1.3.xsd
@@ -0,0 +1,469 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ MOA SP/SS 1.3 Schema
+-->
+<xsd:schema targetNamespace="http://reference.e-government.gv.at/namespace/moa/20020822#" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.2" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reference.e-government.gv.at/namespace/moa/20020822#">
+ <xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd"/>
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="http://www.w3.org/2001/xml.xsd"/>
+ <!--########## Create XML Signature ###-->
+ <!--### Create XML Signature Request ###-->
+ <xsd:element name="CreateXMLSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="CreateXMLSignatureRequestType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="CreateXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="KeyIdentifier" type="KeyIdentifierType"/>
+ <xsd:element name="SingleSignatureInfo" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ermöglichung der Stapelsignatur durch wiederholte Angabe dieses Elements</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="DataObjectInfo" maxOccurs="unbounded">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="DataObjectInfoType">
+ <xsd:attribute name="ChildOfManifest" type="xsd:boolean" use="optional" default="false"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="CreateSignatureInfo" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe des Signaturorts sowie ggf. sinnvoller Supplements im Zshg. mit der Signaturumgebung, oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateSignatureEnvironmentProfile"/>
+ <xsd:element name="CreateSignatureEnvironmentProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="SecurityLayerConformity" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Create XML Signature Response ###-->
+ <xsd:complexType name="CreateXMLSignatureResponseType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Kardinalität 1..oo erlaubt die Antwort auf eine Stapelsignatur-Anfrage</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="SignatureEnvironment">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung erfolgreich war</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element ref="ErrorResponse"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="CreateXMLSignatureResponse" type="CreateXMLSignatureResponseType"/>
+ <!--########## Verify CMS Signature ###-->
+ <!--### Verifiy CMS Signature Request ###-->
+ <xsd:element name="VerifyCMSSignatureRequest">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="VerifyCMSSignatureRequestType">
+ <xsd:attribute name="Signatories" type="SignatoriesType" use="optional" default="1"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:complexType name="VerifyCMSSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="CMSSignature" type="xsd:base64Binary"/>
+ <xsd:element name="DataObject" type="CMSDataObjectOptionalMetaType" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify CMS Signature Response ###-->
+ <xsd:element name="VerifyCMSSignatureResponse" type="VerifyCMSSignatureResponseType"/>
+ <xsd:complexType name="VerifyCMSSignatureResponseType">
+ <xsd:sequence maxOccurs="unbounded">
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any;publicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="SignatureCheck" type="CheckResultType"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Verify XML Signature ###-->
+ <!--### Verify XML Signature Request ###-->
+ <xsd:element name="VerifyXMLSignatureRequest" type="VerifyXMLSignatureRequestType"/>
+ <xsd:complexType name="VerifyXMLSignatureRequestType">
+ <xsd:sequence>
+ <xsd:element name="DateTime" type="xsd:dateTime" minOccurs="0"/>
+ <xsd:element name="VerifySignatureInfo">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="VerifySignatureEnvironment" type="ContentOptionalRefType"/>
+ <xsd:element name="VerifySignatureLocation" type="xsd:token"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice minOccurs="0" maxOccurs="unbounded">
+ <xsd:element ref="SupplementProfile"/>
+ <xsd:element name="SupplementProfileID" type="xsd:string"/>
+ </xsd:choice>
+ <xsd:element name="SignatureManifestCheckParams" minOccurs="0">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="ReferenceInfo" type="VerifyTransformsDataType" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Pro dsig:Reference-Element in der zu überprüfenden XML-Signatur muss hier ein ReferenceInfo-Element erscheinen. Die Reihenfolge der einzelnen ReferenceInfo Elemente entspricht jener der dsig:Reference Elemente in der XML-Signatur.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ <xsd:attribute name="ReturnReferenceInputData" type="xsd:boolean" use="optional" default="true"/>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="ReturnHashInputData" minOccurs="0"/>
+ <xsd:element name="TrustProfileID" type="xsd:token">
+ <xsd:annotation>
+ <xsd:documentation>mit diesem Profil wird eine Menge von vertrauenswürdigen Wurzelzertifikaten spezifiziert</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--### Verify XML Signature Response ###-->
+ <xsd:element name="VerifyXMLSignatureResponse" type="VerifyXMLSignatureResponseType"/>
+ <xsd:complexType name="VerifyXMLSignatureResponseType">
+ <xsd:sequence>
+ <xsd:element name="SignerInfo" type="dsig:KeyInfoType">
+ <xsd:annotation>
+ <xsd:documentation>only ds:X509Data and ds:RetrievalMethod is supported; QualifiedCertificate is included as X509Data/any; PublicAuthority is included as X509Data/any</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="HashInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferenceInputData" type="InputDataType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="SignatureCheck" type="ReferencesCheckResultType"/>
+ <xsd:element name="SignatureManifestCheck" type="ReferencesCheckResultType" minOccurs="0"/>
+ <xsd:element name="XMLDSIGManifestCheck" type="ManifestRefsCheckResultType" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="CertificateCheck" type="CheckResultType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="ProfileIdentifierType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="InputDataType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentExLocRefBaseType">
+ <xsd:attribute name="PartOf" use="optional" default="SignedInfo">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:token">
+ <xsd:enumeration value="SignedInfo"/>
+ <xsd:enumeration value="XMLDSIGManifest"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ <xsd:attribute name="ReferringSigReference" type="xsd:nonNegativeInteger" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="MimeType" type="MimeTypeType"/>
+ <xsd:element name="Description" type="xsd:anyURI" minOccurs="0"/>
+ <xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="FinalDataMetaInfoType">
+ <xsd:complexContent>
+ <xsd:extension base="MetaInfoType">
+ <xsd:sequence>
+ <xsd:element name="Type" type="xsd:anyURI" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="DataObjectInfoType">
+ <xsd:sequence>
+ <xsd:element name="DataObject">
+ <xsd:complexType>
+ <xsd:complexContent>
+ <xsd:extension base="ContentOptionalRefType"/>
+ </xsd:complexContent>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:choice>
+ <xsd:annotation>
+ <xsd:documentation>Auswahl: Entweder explizite Angabe EINER Transformationskette inklusive ggf. sinnvoller Supplements oder Verweis auf ein benanntes Profil</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="CreateTransformsInfoProfile"/>
+ <xsd:element name="CreateTransformsInfoProfileID" type="ProfileIdentifierType"/>
+ </xsd:choice>
+ </xsd:sequence>
+ <xsd:attribute name="Structure" use="required">
+ <xsd:simpleType>
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="detached"/>
+ <xsd:enumeration value="enveloping"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ </xsd:attribute>
+ </xsd:complexType>
+ <xsd:complexType name="TransformsInfoType">
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="FinalDataMetaInfo" type="FinalDataMetaInfoType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLDataObjectAssociationType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="ContentRequiredRefType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSDataObjectOptionalMetaType">
+ <xsd:sequence>
+ <xsd:element name="MetaInfo" type="MetaInfoType" minOccurs="0"/>
+ <xsd:element name="Content" type="CMSContentBaseType"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="CMSContentBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="AnyChildrenType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ReferencesCheckResultInfoType" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ReferencesCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultType">
+ <xsd:complexContent>
+ <xsd:restriction base="CheckResultType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:nonNegativeInteger"/>
+ <xsd:element name="Info" type="ManifestRefsCheckResultInfoType"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ManifestRefsCheckResultInfoType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:restriction base="AnyChildrenType">
+ <xsd:sequence>
+ <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="FailedReference" type="xsd:positiveInteger" minOccurs="0" maxOccurs="unbounded"/>
+ <xsd:element name="ReferringSigReference" type="xsd:positiveInteger"/>
+ </xsd:sequence>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <!--########## Error Response ###-->
+ <xsd:element name="ErrorResponse" type="ErrorResponseType">
+ <xsd:annotation>
+ <xsd:documentation>Resultat, falls die Signaturerstellung gescheitert ist</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:complexType name="ErrorResponseType">
+ <xsd:sequence>
+ <xsd:element name="ErrorCode" type="xsd:integer"/>
+ <xsd:element name="Info" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <!--########## Auxiliary Types ###-->
+ <xsd:simpleType name="KeyIdentifierType">
+ <xsd:restriction base="xsd:string"/>
+ </xsd:simpleType>
+ <xsd:simpleType name="KeyStorageType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="Software"/>
+ <xsd:enumeration value="Hardware"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:simpleType name="MimeTypeType">
+ <xsd:restriction base="xsd:token"/>
+ </xsd:simpleType>
+ <xsd:complexType name="AnyChildrenType" mixed="true">
+ <xsd:sequence>
+ <xsd:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="XMLContentType" mixed="true">
+ <xsd:complexContent mixed="true">
+ <xsd:extension base="AnyChildrenType">
+ <xsd:attribute ref="xml:space" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:complexType name="ContentExLocRefBaseType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentBaseType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ </xsd:choice>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentOptionalRefType">
+ <xsd:complexContent>
+ <xsd:extension base="ContentBaseType">
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="optional"/>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="ContentRequiredRefType">
+ <xsd:complexContent>
+ <xsd:restriction base="ContentOptionalRefType">
+ <xsd:choice minOccurs="0">
+ <xsd:element name="Base64Content" type="xsd:base64Binary"/>
+ <xsd:element name="XMLContent" type="XMLContentType"/>
+ <xsd:element name="LocRefContent" type="xsd:anyURI"/>
+ </xsd:choice>
+ <xsd:attribute name="Reference" type="xsd:anyURI" use="required"/>
+ </xsd:restriction>
+ </xsd:complexContent>
+ </xsd:complexType>
+ <xsd:complexType name="VerifyTransformsDataType">
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Ein oder mehrere Transformationswege können von der Applikation an MOA mitgeteilt werden. Die zu prüfende Signatur hat zumindest einem dieser Transformationswege zu entsprechen. Die Angabe kann explizit oder als Profilbezeichner erfolgen.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element ref="VerifyTransformsInfoProfile"/>
+ <xsd:element name="VerifyTransformsInfoProfileID" type="xsd:string">
+ <xsd:annotation>
+ <xsd:documentation>Profilbezeichner für einen Transformationsweg</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ <xsd:element name="QualifiedCertificate"/>
+ <xsd:element name="PublicAuthority" type="PublicAuthorityType"/>
+ <xsd:complexType name="PublicAuthorityType">
+ <xsd:sequence>
+ <xsd:element name="Code" type="xsd:string" minOccurs="0"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:simpleType name="SignatoriesType">
+ <xsd:union memberTypes="AllSignatoriesType">
+ <xsd:simpleType>
+ <xsd:list itemType="xsd:positiveInteger"/>
+ </xsd:simpleType>
+ </xsd:union>
+ </xsd:simpleType>
+ <xsd:simpleType name="AllSignatoriesType">
+ <xsd:restriction base="xsd:string">
+ <xsd:enumeration value="all"/>
+ </xsd:restriction>
+ </xsd:simpleType>
+ <xsd:complexType name="CreateSignatureLocationType">
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:token">
+ <xsd:attribute name="Index" type="xsd:integer" use="required"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ <xsd:complexType name="TransformParameterType">
+ <xsd:choice minOccurs="0">
+ <xsd:annotation>
+ <xsd:documentation>Die Angabe des Transformationsparameters (explizit oder als Hashwert) kann unterlassen werden, wenn die Applikation von der Unveränderlichkeit des Inhalts der in "Transformationsparamter", Attribut "URI" angegebenen URI ausgehen kann.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:element name="Base64Content" type="xsd:base64Binary">
+ <xsd:annotation>
+ <xsd:documentation>Der Transformationsparameter explizit angegeben.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ <xsd:element name="Hash">
+ <xsd:annotation>
+ <xsd:documentation>Der Hashwert des Transformationsparameters.</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:DigestMethod"/>
+ <xsd:element ref="dsig:DigestValue"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ <xsd:attribute name="URI" type="xsd:anyURI" use="required"/>
+ </xsd:complexType>
+ <xsd:element name="CreateSignatureEnvironmentProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateSignatureLocation" type="CreateSignatureLocationType"/>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="VerifyTransformsInfoProfile">
+ <xsd:annotation>
+ <xsd:documentation>Explizite Angabe des Transformationswegs</xsd:documentation>
+ </xsd:annotation>
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="dsig:Transforms" minOccurs="0"/>
+ <xsd:element name="TransformParameter" type="TransformParameterType" minOccurs="0" maxOccurs="unbounded">
+ <xsd:annotation>
+ <xsd:documentation>Alle impliziten Transformationsparameter, die zum Durchlaufen der oben angeführten Transformationskette bekannt sein müssen, müssen hier angeführt werden. Das Attribut "URI" bezeichnet den Transformationsparameter in exakt jener Weise, wie er in der zu überprüfenden Signatur gebraucht wird.</xsd:documentation>
+ </xsd:annotation>
+ </xsd:element>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="Supplement" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="SupplementProfile" type="XMLDataObjectAssociationType"/>
+ <xsd:element name="CreateTransformsInfoProfile">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="CreateTransformsInfo" type="TransformsInfoType"/>
+ <xsd:element ref="Supplement" minOccurs="0" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema>
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/AllTests.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/AllTests.java
new file mode 100644
index 000000000..c670b5e55
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/AllTests.java
@@ -0,0 +1,40 @@
+package test.at.gv.egovernment.moa.spss;
+
+import test.at.gv.egovernment.moa.spss.server.iaik.config.ConfigurationDataImplTest;
+import test.at.gv.egovernment.moa.spss.server.iaik.config.IaikConfiguratorTest;
+import test.at.gv.egovernment.moa.spss.server.tools.CertToolTest;
+
+import junit.awtui.TestRunner;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite for all unit tests.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(test.at.gv.egovernment.moa.spss.server.config.AllTests.class);
+ suite.addTestSuite(ConfigurationDataImplTest.class);
+ suite.addTestSuite(IaikConfiguratorTest.class);
+ suite.addTest(
+ test.at.gv.egovernment.moa.spss.server.invoke.AllTests.suite());
+ suite.addTest(test.at.gv.egovernment.moa.spss.api.xmlbind.AllTests.suite());
+ suite.addTestSuite(CertToolTest.class);
+
+ return suite;
+ }
+
+ public static void main(String[] args) {
+ try {
+ TestRunner.run(AllTests.class);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/SPSSTestCase.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/SPSSTestCase.java
new file mode 100644
index 000000000..a585e30a0
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/SPSSTestCase.java
@@ -0,0 +1,82 @@
+package test.at.gv.egovernment.moa.spss;
+
+import java.security.Security;
+
+import test.at.gv.egovernment.moa.MOATestCase;
+
+import at.gv.egovernment.moa.logging.Logger;
+import at.gv.egovernment.moa.logging.LoggingContext;
+import at.gv.egovernment.moa.logging.LoggingContextManager;
+import at.gv.egovernment.moa.util.MessageProvider;
+
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Base class for MOA test cases.
+ *
+ * Provides some utility functions.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class SPSSTestCase extends MOATestCase {
+
+ protected static final String TESTDATA_ROOT = "data/test/";
+
+ /**
+ * Constructor for MOATestCase.
+ * @param arg0
+ */
+ public SPSSTestCase(String name) {
+ super(name);
+ }
+
+ /**
+ * Set up a transaction context with a test configuration.
+ */
+ protected void setUpTransactionContext() throws Exception {
+ System.setProperty(
+ ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ "data/test/conf/moa-spss/MOA-SPSSConfiguration.xml");
+ ConfigurationProvider config = ConfigurationProvider.getInstance();
+ TransactionContext context = new TransactionContext("test", null, config);
+ TransactionContextManager.getInstance().setTransactionContext(context);
+ }
+
+ protected void setUpLoggingContext() throws Exception {
+ LoggingContext context = new LoggingContext("test");
+ LoggingContextManager.getInstance().setLoggingContext(context);
+ }
+
+ /**
+ * Configure the IAIK modules with the current configuration.
+ *
+ * A <code>TransactionContext</code> must have been set up before.
+ */
+ protected void setUpIaikConfiguration() throws Exception {
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+ ClassLoader cl = getClass().getClassLoader();
+ MessageProvider msg = MessageProvider.getInstance();
+
+ try {
+ cl.loadClass("javax.security.cert.Certificate"); // from jcert.jar
+ } catch (ClassNotFoundException e) {
+ Logger.warn(msg.getMessage("init.03", null), e);
+ }
+
+ new IaikConfigurator().configure(context.getConfiguration());
+ }
+
+ protected void setUpSSL() throws Exception {
+ //System.setProperty("javax.net.debug", "all");
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java
new file mode 100644
index 000000000..28f79729e
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/AllTests.java
@@ -0,0 +1,24 @@
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Runs all tests in this package.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(CreateXMLSignatureRequestParserTest.class);
+ suite.addTestSuite(TransformParserTest.class);
+ suite.addTestSuite(VerifyCMSSignatureRequestParserTest.class);
+ suite.addTestSuite(VerifyXMLSignatureRequestParserTest.class);
+
+ return suite;
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java
new file mode 100644
index 000000000..7ce705b01
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/CreateXMLSignatureRequestParserTest.java
@@ -0,0 +1,71 @@
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateSignatureEnvironmentProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.DataObjectInfo;
+import at.gv.egovernment.moa.spss.api.xmlsign.SingleSignatureInfo;
+
+/**
+ * Test the <code>CreateXMLSignatureRequestParser</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CreateXMLSignatureRequestParserTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/CreateXMLSignature/";
+
+ private CreateXMLSignatureRequestParser requestParser;
+
+ public CreateXMLSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ requestParser = new CreateXMLSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorCX2.001.Req.xml")
+ .getDocumentElement();
+ CreateXMLSignatureRequest request = requestParser.parse(requestElem);
+ SingleSignatureInfo sigInfo;
+ DataObjectInfo dataObjInfo;
+ CreateTransformsInfoProfileExplicit transProfile;
+ CreateSignatureEnvironmentProfileExplicit envProfile;
+
+ assertNotNull(request);
+ assertEquals("PKCS12RSAKey1", request.getKeyIdentifier());
+ assertEquals(1, request.getSingleSignatureInfos().size());
+
+ sigInfo = (SingleSignatureInfo) request.getSingleSignatureInfos().get(0);
+ assertEquals(1, sigInfo.getDataObjectInfos().size());
+ assertFalse(sigInfo.isSecurityLayerConform());
+
+ dataObjInfo = (DataObjectInfo) sigInfo.getDataObjectInfos().get(0);
+ assertNotNull(dataObjInfo.getDataObject());
+
+ transProfile =
+ (CreateTransformsInfoProfileExplicit) dataObjInfo
+ .getCreateTransformsInfoProfile();
+ assertNotNull(
+ transProfile.getCreateTransformsInfo().getFinalDataMetaInfo());
+
+ envProfile =
+ (CreateSignatureEnvironmentProfileExplicit) sigInfo
+ .getCreateSignatureInfo()
+ .getCreateSignatureEnvironmentProfile();
+ assertEquals(
+ "//data:Document",
+ envProfile.getCreateSignatureLocation().getXPathExpression());
+ assertEquals(0, envProfile.getCreateSignatureLocation().getIndex());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java
new file mode 100644
index 000000000..f580f86bc
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/TransformParserTest.java
@@ -0,0 +1,113 @@
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.common.CanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.EnvelopedSignatureTransform;
+import at.gv.egovernment.moa.spss.api.common.ExclusiveCanonicalizationTransform;
+import at.gv.egovernment.moa.spss.api.common.XPathFilter2Transform;
+import at.gv.egovernment.moa.spss.api.common.XPathTransform;
+import at.gv.egovernment.moa.spss.api.common.XSLTTransform;
+import at.gv.egovernment.moa.spss.api.xmlbind.TransformParser;
+
+/**
+ * Test the <code>TransformParser</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE = TESTDATA_ROOT + "xml/dsigTransform/";
+
+ private TransformParser transformParser;
+
+ public TransformParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() {
+ transformParser = new TransformParser();
+ }
+
+ public void testParseTransforms() throws Exception {
+ Element transformsElem =
+ parseXml(TESTDATA_BASE + "transforms.xml").getDocumentElement();
+ List transforms = transformParser.parseTransforms(transformsElem);
+
+ assertNotNull(transforms);
+ assertEquals(3, transforms.size());
+
+ }
+
+ public void testParseCanonicalizationTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "canonicalization.xml").getDocumentElement();
+ CanonicalizationTransform transform =
+ (CanonicalizationTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals(
+ CanonicalizationTransform.CANONICAL_XML,
+ transform.getAlgorithmURI());
+ }
+
+ public void testParseExclCanonicalizationTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "exclusiveCanonicalization.xml")
+ .getDocumentElement();
+ ExclusiveCanonicalizationTransform transform =
+ (ExclusiveCanonicalizationTransform) transformParser.parseTransform(
+ transformElem);
+
+ assertNotNull(transform);
+ assertEquals(
+ ExclusiveCanonicalizationTransform.EXCLUSIVE_CANONICAL_XML,
+ transform.getAlgorithmURI());
+ assertEquals(3, transform.getInclusiveNamespacePrefixes().size());
+ }
+
+ public void testParseEnvelopedTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "enveloped.xml").getDocumentElement();
+ EnvelopedSignatureTransform transform =
+ (EnvelopedSignatureTransform) transformParser.parseTransform(
+ transformElem);
+
+ assertNotNull(transform);
+ }
+
+ public void testParseXPathTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xpath.xml").getDocumentElement();
+ XPathTransform transform =
+ (XPathTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals("//ToBeSigned/Data", transform.getXPathExpression());
+ assertEquals(1, transform.getNamespaceDeclarations().size());
+ }
+
+ public void testParseXPathFilter2Transform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xpath2.xml").getDocumentElement();
+ XPathFilter2Transform transform =
+ (XPathFilter2Transform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ assertEquals(3, transform.getFilters().size());
+ }
+
+ public void testParseXSLTTransform() throws Exception {
+ Element transformElem =
+ parseXml(TESTDATA_BASE + "xslt.xml").getDocumentElement();
+ XSLTTransform transform =
+ (XSLTTransform) transformParser.parseTransform(transformElem);
+
+ assertNotNull(transform);
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java
new file mode 100644
index 000000000..4be7667eb
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyCMSSignatureRequestParserTest.java
@@ -0,0 +1,61 @@
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.CMSContentExcplicit;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.common.MetaInfo;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+
+/**
+ * Test the <code>VerifyCMSSignatureRequestParserTest</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyCMSSignatureRequestParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyCMSSignature/";
+
+ private VerifyCMSSignatureRequestParser requestParser;
+
+ public VerifyCMSSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ requestParser = new VerifyCMSSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorVC0.001.Req.xml")
+ .getDocumentElement();
+ VerifyCMSSignatureRequest request = requestParser.parse(requestElem);
+ MetaInfo metaInfo;
+ CMSContentExcplicit content;
+
+ assertNotNull(request);
+ assertEquals(1, request.getSignatories()[0]);
+ assertEquals(
+ DateTimeUtils.parseDateTime("2003-04-04T09:30:47-05:00"),
+ request.getDateTime());
+ assertNotNull(request.getCMSSignature());
+ assertNotNull(request.getDataObject());
+ assertEquals("TrustProfile1", request.getTrustProfileId());
+
+ metaInfo = request.getDataObject().getMetaInfo();
+ assertNotNull(metaInfo);
+ assertEquals("text/plain", metaInfo.getMimeType());
+ assertEquals("http://10.16.46.109/TestDatenGenerator/resources/testDaten.txt", metaInfo.getDescription());
+
+ content = (CMSContentExcplicit) request.getDataObject().getContent();
+ assertNotNull(content.getBinaryContent());
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java
new file mode 100644
index 000000000..3b8e8b00e
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/api/xmlbind/VerifyXMLSignatureRequestParserTest.java
@@ -0,0 +1,81 @@
+package test.at.gv.egovernment.moa.spss.api.xmlbind;
+
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DateTimeUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlverify.ReferenceInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.SignatureManifestCheckParams;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureInfo;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifySignatureLocation;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyTransformsInfoProfileExplicit;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+
+/**
+ * Test the <code>VerifyXMLSignatureRequestParserTest</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class VerifyXMLSignatureRequestParserTest extends SPSSTestCase {
+ private static String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyXMLSignature/";
+
+ private VerifyXMLSignatureRequestParser parser;
+
+ public VerifyXMLSignatureRequestParserTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ parser = new VerifyXMLSignatureRequestParser();
+ }
+
+ public void testParse() throws Exception {
+ Element requestElem =
+ parseXml(TESTDATA_BASE + "TestGeneratorVX.201.Req.xml")
+ .getDocumentElement();
+ VerifyXMLSignatureRequest request = parser.parse(requestElem);
+ VerifySignatureInfo verifySignatureInfo;
+ VerifySignatureLocation verifyLocation;
+ SignatureManifestCheckParams checkParams;
+ ReferenceInfo refInfo;
+ VerifyTransformsInfoProfileExplicit transformsProfile;
+
+ assertNotNull(request);
+ assertEquals(
+ DateTimeUtils.parseDateTime("2003-04-01T12:53:57+01:00"),
+ request.getDateTime());
+ assertFalse(request.getReturnHashInputData());
+ assertEquals("TrustProfile1", request.getTrustProfileId());
+
+ verifySignatureInfo = request.getSignatureInfo();
+ assertNotNull(verifySignatureInfo);
+ assertNotNull(verifySignatureInfo.getVerifySignatureEnvironment());
+
+ verifyLocation = verifySignatureInfo.getVerifySignatureLocation();
+ assertNotNull(verifyLocation);
+ assertEquals("//dsig:Signature", verifyLocation.getXPathExpression());
+ assertEquals(3, verifyLocation.getNamespaceDeclarations().size());
+
+ checkParams = request.getSignatureManifestCheckParams();
+ assertNotNull(checkParams);
+ assertEquals(true, checkParams.getReturnReferenceInputData());
+ assertEquals(1, checkParams.getReferenceInfos().size());
+
+ refInfo = (ReferenceInfo) checkParams.getReferenceInfos().get(0);
+ assertEquals(1, refInfo.getVerifyTransformsInfoProfiles().size());
+
+ transformsProfile =
+ (VerifyTransformsInfoProfileExplicit) refInfo
+ .getVerifyTransformsInfoProfiles()
+ .get(0);
+ assertEquals(1, transformsProfile.getTransforms().size());
+ assertEquals(1, transformsProfile.getTransformParameters().size());
+
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/AllTests.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/AllTests.java
new file mode 100644
index 000000000..131f38c19
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/AllTests.java
@@ -0,0 +1,20 @@
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class AllTests
+{
+ public static Test suite()
+ {
+ TestSuite suite = new TestSuite();
+ suite.addTestSuite(ConfigurationProviderTest1.class);
+ suite.addTestSuite(ConfigurationProviderTest2.class);
+ suite.addTestSuite(ConfigurationProviderTest3.class);
+ return suite;
+ }
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
new file mode 100644
index 000000000..474a387ad
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest1.java
@@ -0,0 +1,377 @@
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.math.BigInteger;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.CRLDistributionPoint;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.HardwareCryptoModule;
+import at.gv.egovernment.moa.spss.server.config.HardwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.KeyGroup;
+import at.gv.egovernment.moa.spss.server.config.KeyGroupEntry;
+import at.gv.egovernment.moa.spss.server.config.OCSPDistributionPoint;
+import at.gv.egovernment.moa.spss.server.config.SoftwareKeyModule;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest1 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.spss.complete-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest1() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ assertEquals(0, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ assertEquals(
+ Constants.C14N_WITH_COMMENTS_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(2, hwcms.size());
+
+ HardwareCryptoModule hwc1 = (HardwareCryptoModule) hwcms.get(0);
+ assertEquals("HWC1_Name", hwc1.getName());
+ assertEquals("HWC1_SlotId", hwc1.getSlotID());
+ assertEquals("HWC1_UserPIN", hwc1.getUserPIN());
+
+ HardwareCryptoModule hwc2 = (HardwareCryptoModule) hwcms.get(1);
+ assertEquals("HWC2_Name", hwc2.getName());
+ assertNull(hwc2.getSlotID());
+ assertEquals("HWC2_UserPIN", hwc2.getUserPIN());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(2, hwkms.size());
+
+ HardwareKeyModule hwk1 = (HardwareKeyModule) hwkms.get(0);
+ assertEquals("HWK1_Id", hwk1.getId());
+ assertEquals("HWK1_Name", hwk1.getName());
+ assertEquals("HWK1_SlotId", hwk1.getSlotID());
+ assertEquals("HWK1_UserPIN", hwk1.getUserPIN());
+
+ HardwareKeyModule hwk2 = (HardwareKeyModule) hwkms.get(1);
+ assertEquals("HWK2_Id", hwk2.getId());
+ assertEquals("HWK2_Name", hwk2.getName());
+ assertNull(hwk2.getSlotID());
+ assertEquals("HWK2_UserPIN", hwk2.getUserPIN());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(2, swkms.size());
+
+ SoftwareKeyModule swk1 = (SoftwareKeyModule) swkms.get(0);
+ assertEquals("SWK1_Id", swk1.getId());
+ assertEquals(CONFIG_BASE_ + "swk/SWK1_FileName.txt", swk1.getFileName().replace('\\', '/'));
+ assertEquals("SWK1_Password", swk1.getPassWord());
+
+ SoftwareKeyModule swk2 = (SoftwareKeyModule) swkms.get(1);
+ assertEquals("SWK2_Id", swk2.getId());
+ assertEquals(CONFIG_BASE_ + "swk/SWK2_FileName.txt", swk2.getFileName().replace('\\', '/'));
+ assertNull(swk2.getPassWord());
+ }
+
+ public void testGetKeyGroups()
+ {
+ Map keyGroups = provider_.getKeyGroups();
+ assertEquals(2, keyGroups.size());
+
+ KeyGroup kg1 = (KeyGroup) keyGroups.get("KG1_Id");
+ assertNotNull(kg1);
+ assertEquals("KG1_Id", kg1.getId());
+
+ Set kg1Entries = kg1.getKeyGroupEntries();
+ assertEquals(2, kg1Entries.size());
+
+ Iterator kg1EntriesIt = kg1Entries.iterator();
+ while(kg1EntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry)kg1EntriesIt.next();
+ if ("HWK1_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=HWK1_Issuer", currentEntry.getIssuerDN());
+ assertEquals(0, currentEntry.getSerialNumber().intValue());
+ }
+ else if ("HWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=HWK2_Issuer", currentEntry.getIssuerDN());
+ assertEquals(1, currentEntry.getSerialNumber().intValue());
+ }
+ else fail("Invalid module identifer found.");
+ }
+
+ KeyGroup kg2 = (KeyGroup) keyGroups.get("KG2_Id");
+ assertNotNull(kg2);
+ assertEquals("KG2_Id", kg2.getId());
+
+ Set kg2Entries = kg2.getKeyGroupEntries();
+ assertEquals(2, kg2Entries.size());
+
+ Iterator kg2EntriesIt = kg1Entries.iterator();
+ while(kg1EntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry)kg2EntriesIt.next();
+ if ("SWK1_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=CN=SWK1_Issuer", currentEntry.getIssuerDN());
+ assertEquals(2, currentEntry.getSerialNumber().intValue());
+ }
+ else if ("SWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ assertEquals("CN=SWK2_Issuer", currentEntry.getIssuerDN());
+ assertEquals(3, currentEntry.getSerialNumber().intValue());
+ }
+ else fail("Invalid module identifer found.");
+ }
+ }
+
+ public void testGetKeyGroupEntries() throws RFC2253NameParserException
+ {
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Customer1_Issuer");
+ Name name = parser.parse();
+ Set kgEntries = provider_.getKeyGroupEntries(name, BigInteger.valueOf(4), "KG1_Id");
+ assertEquals(2, kgEntries.size());
+
+ Iterator kgEntriesIt = kgEntries.iterator();
+ while (kgEntriesIt.hasNext())
+ {
+ KeyGroupEntry currentEntry = (KeyGroupEntry) kgEntriesIt.next();
+ if (!"HWK1_Id".equals(currentEntry.getModuleID()) && !"HWK2_Id".equals(currentEntry.getModuleID()))
+ {
+ fail("Invalid module identifier found.");
+ }
+ }
+ }
+
+ public void testGetChainingMode() throws RFC2253NameParserException
+ {
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Unknown");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(0));
+ assertEquals(ChainingModes.PKIX_MODE, provider_.getChainingMode(cert)); // Default chaining mode
+
+ parser = new RFC2253NameParser("CN=TA1_Issuer");
+ name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(5));
+ assertEquals(ChainingModes.CHAIN_MODE, provider_.getChainingMode(cert));
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(2, dps.size());
+
+ Iterator dpIt = dps.iterator();
+ while (dpIt.hasNext())
+ {
+ CRLDistributionPoint currentDP = (CRLDistributionPoint)dpIt.next();
+ if ("http://crl.myca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.unused |
+ iaik.asn1.structures.DistributionPoint.keyCompromise |
+ iaik.asn1.structures.DistributionPoint.cACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged |
+ iaik.asn1.structures.DistributionPoint.superseded |
+ iaik.asn1.structures.DistributionPoint.cessationOfOperation |
+ iaik.asn1.structures.DistributionPoint.certificateHold |
+ iaik.asn1.structures.DistributionPoint.privilegeWithdrawn |
+ iaik.asn1.structures.DistributionPoint.aACompromise;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else if ("http://crl.myotherca.org".equals(currentDP.getUri()))
+ {
+ int reasonCodes =
+ iaik.asn1.structures.DistributionPoint.aACompromise |
+ iaik.asn1.structures.DistributionPoint.affiliationChanged;
+ assertEquals(reasonCodes, currentDP.getReasonCodes());
+ }
+ else fail("Invalid CRL DP URI found: " + currentDP.getUri());
+ }
+
+ parser = new RFC2253NameParser("CN=DP2_Issuer");
+ name = parser.parse();
+ cert.setIssuerDN(name);
+
+ dps = provider_.getDistributionPoints(cert);
+ assertEquals(1, dps.size());
+
+ OCSPDistributionPoint dpo = (OCSPDistributionPoint) dps.toArray()[0];
+ assertEquals("http://crl.yetanotherca.org", dpo.getUri());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ assertEquals(730, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetEnableRevocationArchiving()
+ {
+ assertFalse(provider_.getEnableRevocationArchiving());
+ }
+
+ public void testGetCertStoreLocation()
+ {
+ assertEquals(
+ CONFIG_BASE_ + "certstore_test",
+ provider_.getCertStoreLocation().replace('\\', '/'));
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertEquals("CreateTransformsInfoProfile", ctip1.getLocalName());
+
+ Element ctip2 = provider_.getCreateTransformsInfoProfile("CTIP_2");
+ assertEquals("CreateTransformsInfoProfile", ctip2.getLocalName());
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertEquals("CreateSignatureEnvironmentProfile", csep.getLocalName());
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertEquals("VerifyTransformsInfoProfile", vtip.getLocalName());
+ }
+
+ public void testGetSupplementProfile()
+ {
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertEquals("SupplementProfile", sp.getLocalName());
+ }
+
+ public void testGetTrustProfile()
+ {
+ TrustProfile tp1 = provider_.getTrustProfile("TP1_Id");
+ assertEquals(
+ "file:/" + CONFIG_BASE_ + "trustprofiles/tp1/anchors",
+ tp1.getUri());
+ assertEquals(
+ "file:/" + CONFIG_BASE_ + "trustprofiles/tp1/signercerts",
+ tp1.getSignerCertsUri());
+
+ TrustProfile tp2 = provider_.getTrustProfile("TP2_Id");
+ assertEquals(
+ "file:" + CONFIG_BASE_ + "trustprofiles/tp2/anchors",
+ tp2.getUri());
+ assertEquals(
+ "file:" + CONFIG_BASE_ + "trustprofiles/tp2/signercerts",
+ tp2.getSignerCertsUri());
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ assertEquals("jdbc://dummy", provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ assertEquals("fully.qualified.classname", provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetEnableRevocationChecking()
+ {
+ assertFalse(provider_.getEnableRevocationChecking());
+ }
+
+ public void testGetMaxRevocationAge()
+ {
+ assertEquals(10000, provider_.getMaxRevocationAge());
+ }
+
+ public void testGetServiceOrder()
+ {
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(2, serviceOrder.length);
+ assertEquals("crl", serviceOrder[0]);
+ assertEquals("ocsp", serviceOrder[1]);
+ }
+
+ public void testGetAutoAddCertificates()
+ {
+ assertFalse(provider_.getAutoAddCertificates());
+ }
+
+ public void testGetUseAuthorityInfoAccess()
+ {
+ assertFalse(provider_.getUseAuthorityInfoAccess());
+ }
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java
new file mode 100644
index 000000000..adf02809b
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest2.java
@@ -0,0 +1,225 @@
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.math.BigInteger;
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.spss.server.config.TrustProfile;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest2 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.ss.noopts-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest2() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ // 3 Warnings should be collected: C14N not found, DigestMethod not found, ArchiveDuration not found
+ assertEquals(3, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.C14N_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ // No hardware crypto modules in config file, check for empty list
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(0, hwcms.size());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(1, hwkms.size());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ // No software key modules in config file, check for empty list
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(0, swkms.size());
+ }
+
+ public void testGetChainingMode() throws RFC2253NameParserException
+ {
+ // Default Chaining Mode not set in configuration, check for default value
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=Unknown");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+ cert.setSerialNumber(BigInteger.valueOf(0));
+ assertEquals(ChainingModes.PKIX_MODE, provider_.getChainingMode(cert));
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ // Element is missing in config file, check if emty list is returned
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(0, dps.size());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(0, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetEnableRevocationArchiving()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertFalse(provider_.getEnableRevocationArchiving());
+ }
+
+ public void testGetCertStoreLocation()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ CONFIG_BASE_ + "certstore",
+ provider_.getCertStoreLocation().replace('\\', '/'));
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertNull(ctip1);
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ // No profile in config file, check for null
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertNull(csep);
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertNull(vtip);
+ }
+
+ public void testGetSupplementProfile()
+ {
+ // No profile in config file, check for null
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertNull(sp);
+ }
+
+ public void testGetTrustProfile()
+ {
+ // No trust profiles config file, check for null
+ TrustProfile tp1 = provider_.getTrustProfile("TP1_Id");
+ assertNull(tp1);
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ // Element is missing in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ // Element is missing in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetEnableRevocationChecking()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getEnableRevocationChecking());
+ }
+
+ public void testGetMaxRevocationAge()
+ {
+ // Element is missing in config file, check for default value
+ assertEquals(0, provider_.getMaxRevocationAge());
+ }
+
+ public void testGetServiceOrder()
+ {
+ // Element is missing in config file, check for empty array
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(0, serviceOrder.length);
+ }
+
+ public void testGetAutoAddCertificates()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getAutoAddCertificates());
+ }
+
+ public void testGetUseAuthorityInfoAccess()
+ {
+ // Element is missing in config file, check for default value
+ assertFalse(provider_.getUseAuthorityInfoAccess());
+ }
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java
new file mode 100644
index 000000000..7da2165cb
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/config/ConfigurationProviderTest3.java
@@ -0,0 +1,166 @@
+package test.at.gv.egovernment.moa.spss.server.config;
+
+import iaik.asn1.structures.Name;
+import iaik.utils.RFC2253NameParser;
+import iaik.utils.RFC2253NameParserException;
+import iaik.x509.X509Certificate;
+
+import java.util.List;
+import java.util.Set;
+
+import junit.framework.TestCase;
+
+import org.w3c.dom.Element;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationException;
+import at.gv.egovernment.moa.spss.server.config.ConfigurationProvider;
+import at.gv.egovernment.moa.util.Constants;
+
+/**
+ * @author Gregor Karlinger
+ * @version $Id$
+ */
+public class ConfigurationProviderTest3 extends TestCase
+{
+ private static final String CONFIG_BASE_ =
+ "e:/cio/projekte/basismodule/wartung/projekt/spss.server/res/test/resources/config/";
+
+ static at.gv.egovernment.moa.spss.server.config.ConfigurationProvider provider_;
+
+ static
+ {
+ System.setProperty(
+ "log4j.configuration",
+ "file:/" + CONFIG_BASE_ + "log4j.properties");
+ System.setProperty(
+ at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.CONFIG_PROPERTY_NAME,
+ CONFIG_BASE_ + "moa.sp.noopts-config.xml");
+ try
+ {
+ ConfigurationProvider.reload();
+ provider_ = at.gv.egovernment.moa.spss.server.config.ConfigurationProvider.getInstance();
+ }
+ catch (ConfigurationException e)
+ {
+ throw new RuntimeException("Fehler beim Setup des Tests: " + e.getMessage());
+ }
+ }
+
+ /**
+ * Constructor for ConfigurationProvider.
+ * @param arg0
+ */
+ public ConfigurationProviderTest3() throws MOAException
+ {
+ super("ConfigurationProvider");
+ }
+
+ public void testGetWarnings()
+ {
+ // 3 Warnings should be collected: C14N not found, DigestMethod not found, ArchiveDuration not found
+ assertEquals(3, provider_.getWarnings().size());
+ }
+
+ public void testGetDigestMethodAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.SHA1_URI,
+ provider_.getDigestMethodAlgorithmName());
+ }
+
+ public void testGetCanonicalizationAlgorithmName()
+ {
+ // Element is missing in config file, check if default value is returned
+ assertEquals(
+ Constants.C14N_URI,
+ provider_.getCanonicalizationAlgorithmName());
+ }
+
+ public void testGetHardwareCryptoModules()
+ {
+ // No hardware crypto modules in config file, check for empty list
+ List hwcms = provider_.getHardwareCryptoModules();
+ assertEquals(0, hwcms.size());
+ }
+
+ public void testGetHardwareKeyModules()
+ {
+ // No hardware key modules in config file, check for empty list
+ List hwkms = provider_.getHardwareKeyModules();
+ assertEquals(0, hwkms.size());
+ }
+
+ public void testGetSoftwareKeyModules()
+ {
+ // No software key modules in config file, check for empty list
+ List swkms = provider_.getSoftwareKeyModules();
+ assertEquals(0, swkms.size());
+ }
+
+ public void testGetDistributionPoints() throws RFC2253NameParserException
+ {
+ // No distribution points in config file, check for emtpy set
+ X509Certificate cert = new X509Certificate();
+ RFC2253NameParser parser = new RFC2253NameParser("CN=DP1_Issuer");
+ Name name = parser.parse();
+ cert.setIssuerDN(name);
+
+ Set dps = provider_.getDistributionPoints(cert);
+ assertEquals(0, dps.size());
+ }
+
+ public void testGetCRLArchiveDuration()
+ {
+ // No archive duration in config file, check for default value
+ assertEquals(0, provider_.getCRLArchiveDuration());
+ }
+
+ public void testGetCreateTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element ctip1 = provider_.getCreateTransformsInfoProfile("CTIP_1");
+ assertNull(ctip1);
+ }
+
+ public void testGetCreateSignatureEnvironmentProfile()
+ {
+ // No profile in config file, check for null
+ Element csep = provider_.getCreateSignatureEnvironmentProfile("CSEP_1");
+ assertNull(csep);
+ }
+
+ public void testGetVerifyTransformsInfoProfile()
+ {
+ // No profile in config file, check for null
+ Element vtip = provider_.getVerifyTransformsInfoProfile("VTIP_1");
+ assertNull(vtip);
+ }
+
+ public void testGetSupplementProfile()
+ {
+ // No profile in config file, check for null
+ Element sp = provider_.getSupplementProfile("SP_1");
+ assertNull(sp);
+ }
+
+ public void testGetRevocationArchiveJDBCURL()
+ {
+ // No archive in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCURL());
+ }
+
+ public void testGetRevocationArchiveJDBCDriverClass()
+ {
+ // No archive in config file, check for null
+ assertNull(provider_.getRevocationArchiveJDBCDriverClass());
+ }
+
+ public void testGetServiceOrder()
+ {
+ // Element is missing in config file, check for empty array
+ String[] serviceOrder = provider_.getServiceOrder();
+ assertEquals(0, serviceOrder.length);
+ }
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java
new file mode 100644
index 000000000..be1090e4a
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/ConfigurationDataImplTest.java
@@ -0,0 +1,149 @@
+package test.at.gv.egovernment.moa.spss.server.iaik.config;
+
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import java.security.cert.CertificateFactory;
+import java.security.cert.X509Certificate;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.asn1.structures.DistributionPoint;
+import iaik.pki.PKIConfiguration;
+import iaik.pki.pathvalidation.ChainingModes;
+import iaik.pki.pathvalidation.ValidationConfiguration;
+import iaik.pki.revocation.CRLDistributionPoint;
+import iaik.pki.revocation.RevocationConfiguration;
+import iaik.pki.store.certstore.CertStoreConfiguration;
+import iaik.pki.store.certstore.CertStoreTypes;
+import iaik.pki.store.revocation.archive.ArchiveConfiguration;
+import iaik.pki.store.revocation.archive.db.DataBaseArchiveParameter;
+import iaik.server.ConfigurationData;
+import iaik.server.modules.keys.HardwareKeyModuleConfiguration;
+import iaik.server.modules.keys.SoftwareKeyModuleConfiguration;
+
+import at.gv.egovernment.moa.spss.server.iaik.config.ConfigurationDataImpl;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Tests the <code>ConfigurationDataImpl</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class ConfigurationDataImplTest extends SPSSTestCase {
+
+ private ConfigurationData config;
+ private X509Certificate iaikCert;
+
+ public ConfigurationDataImplTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ TransactionContext context;
+
+ setUpTransactionContext();
+ context = TransactionContextManager.getInstance().getTransactionContext();
+
+ config = new ConfigurationDataImpl(context.getConfiguration());
+
+ KeyStore ks = KeyStore.getInstance("JKS", "SUN");
+ ks.load(
+ new FileInputStream(TESTDATA_ROOT + "security/server.keystore"),
+ "changeit".toCharArray());
+
+ CertificateFactory certFactory = CertificateFactory.getInstance("X.509");
+ Collection certs =
+ certFactory.generateCertificates(
+ new FileInputStream(
+ TESTDATA_ROOT
+ + "conf/moa-spss/trustprofiles/TrustProfile1/IAIKRoot.cer"));
+ iaikCert = (X509Certificate) certs.toArray()[0];
+
+ }
+
+ public void testGetPKIConfiguration() {
+ PKIConfiguration pkiConfig = config.getPKIConfiguration();
+ ArchiveConfiguration archiveConfig = pkiConfig.getArchiveConfiguration();
+ CertStoreConfiguration certStoreConfig =
+ pkiConfig.getCertStoreConfiguration();
+ RevocationConfiguration revocationConfig =
+ pkiConfig.getRevocationConfiguration();
+ ValidationConfiguration validationConfig =
+ pkiConfig.getValidationConfiguration();
+ DataBaseArchiveParameter archiveParam;
+ Set distributionPoints;
+ Iterator iter;
+ boolean found;
+
+ // test archive parameters
+ archiveParam =
+ (DataBaseArchiveParameter) archiveConfig.getArchiveParameters();
+ assertEquals(
+ archiveParam.getJDBCUrl(),
+ "jdbc:postgresql://10.16.46.108/moa?user=moa&password=moatest");
+
+ // test cert store configuration
+ assertEquals(1, certStoreConfig.getParameters().length);
+ assertEquals(
+ CertStoreTypes.DIRECTORY,
+ certStoreConfig.getParameters()[0].getType());
+
+ // test revocation configuration
+ distributionPoints =
+ revocationConfig.getAlternativeDistributionPoints(iaikCert, null, new Date());
+ assertEquals(3, distributionPoints.size());
+ found = false;
+ for (iter = distributionPoints.iterator(); iter.hasNext();) {
+ CRLDistributionPoint dp = (CRLDistributionPoint) iter.next();
+ if (dp.getUri().equals("http://www.iaik.at/testCA/iaik_test_sig.crl")) {
+ found =
+ dp.getReasonCodes()
+ == (DistributionPoint.keyCompromise
+ | DistributionPoint.affiliationChanged);
+ }
+ }
+ assertTrue(found);
+
+ // test validation configuration
+ assertEquals(
+ ChainingModes.PKIX_MODE,
+ validationConfig.getChainingMode(iaikCert));
+ }
+
+ /*
+ public void testGetCryptoModuleConfigurations() {
+ List cryptoConfigs = config.getCryptoModuleConfigurations();
+ HardwareCryptoModuleConfiguration moduleConfig;
+
+ assertEquals(2, cryptoConfigs.size());
+ moduleConfig = (HardwareCryptoModuleConfiguration) cryptoConfigs.get(0);
+ assertEquals("Module1", moduleConfig.getModuleName());
+ assertEquals("Slot1", moduleConfig.getSlotID());
+ assertEquals("PIN1", new String(moduleConfig.getUserPIN()));
+ }
+ */
+
+ public void testGetKeyModuleConfigurations() {
+ List keyConfigs = config.getKeyModuleConfigurations();
+ HardwareKeyModuleConfiguration hwKey;
+ SoftwareKeyModuleConfiguration swKey;
+
+ assertEquals(7, keyConfigs.size());
+ hwKey = (HardwareKeyModuleConfiguration) keyConfigs.get(0);
+ assertEquals("cryptoki.dll", hwKey.getModuleName());
+ assertEquals("0", hwKey.getSlotID());
+ assertEquals("0000", new String(hwKey.getUserPIN()));
+ swKey = (SoftwareKeyModuleConfiguration) keyConfigs.get(1);
+ assertEquals(
+ "buergerkarte",
+ new String(swKey.getKeyStoreAuthenticationData()));
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java
new file mode 100644
index 000000000..3b403dc19
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/iaik/config/IaikConfiguratorTest.java
@@ -0,0 +1,36 @@
+package test.at.gv.egovernment.moa.spss.server.iaik.config;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.spss.server.iaik.config.IaikConfigurator;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContext;
+import at.gv.egovernment.moa.spss.server.transaction.TransactionContextManager;
+
+/**
+ * Tests the <code>IaikConfigurator</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class IaikConfiguratorTest extends SPSSTestCase {
+
+ public IaikConfiguratorTest(String name) {
+ super(name);
+ }
+
+ /**
+ * @see TestCase#setUp()
+ */
+ protected void setUp() throws Exception {
+ super.setUpTransactionContext();
+ }
+
+ public void testConfigure() throws Exception {
+ IaikConfigurator configurator = new IaikConfigurator();
+ TransactionContext context =
+ TransactionContextManager.getInstance().getTransactionContext();
+
+ configurator.configure(context.getConfiguration());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java
new file mode 100644
index 000000000..65fa2bf72
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/AllTests.java
@@ -0,0 +1,25 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Runs all tests in this package.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class AllTests {
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ suite.addTestSuite(DataObjectFactoryTest.class);
+ suite.addTestSuite(TransformationFactoryTest.class);
+ suite.addTestSuite(XMLSignatureCreationInvokerTest.class);
+ suite.addTestSuite(CMSSignatureVerificationInvokerTest.class);
+ suite.addTestSuite(XMLSignatureVerificationInvokerTest.class);
+
+ return suite;
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java
new file mode 100644
index 000000000..3024730f4
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/CMSSignatureVerificationInvokerTest.java
@@ -0,0 +1,63 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
+import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureResponse;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyCMSSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the CMSSignatureVerificationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CMSSignatureVerificationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyCMSSignature/";
+
+ /**
+ * Constructor for CMSSignatureVerificationInvokerTest.
+ * @param name
+ */
+ public CMSSignatureVerificationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ }
+
+ public void testVerifyCMSSignature() throws Exception {
+ try {
+ CMSSignatureVerificationInvoker invoker =
+ CMSSignatureVerificationInvoker.getInstance();
+ VerifyCMSSignatureRequestParser requestParser =
+ new VerifyCMSSignatureRequestParser();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorVC0.001.Req.xml");
+ VerifyCMSSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ VerifyCMSSignatureResponse response = invoker.verifyCMSSignature(request);
+ VerifyCMSSignatureResponseBuilder responseBuilder =
+ new VerifyCMSSignatureResponseBuilder();
+ Element result = responseBuilder.build(response).getDocumentElement();
+
+ System.out.println(DOMUtils.serializeNode(result));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java
new file mode 100644
index 000000000..7de2add33
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/DataObjectFactoryTest.java
@@ -0,0 +1,180 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.io.InputStream;
+import java.security.Security;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.server.modules.xml.BinaryDataObject;
+import iaik.server.modules.xml.DataObject;
+import iaik.server.modules.xml.XMLDataObject;
+
+import at.gv.egovernment.moa.util.Base64Utils;
+
+import at.gv.egovernment.moa.spss.MOAException;
+import at.gv.egovernment.moa.spss.api.SPSSFactory;
+import at.gv.egovernment.moa.spss.api.common.Content;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteArrayDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.ByteStreamDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.iaik.xml.XMLNodeListDataObjectImpl;
+import at.gv.egovernment.moa.spss.server.invoke.DataObjectFactory;
+
+/**
+ * Test cases for the <code>DataObjectFactory</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class DataObjectFactoryTest extends SPSSTestCase {
+
+ private static final String HTTP_BINARY_CONTENT_URL = "http://www.google.com";
+ private static final String HTTP_XML_CONTENT_URL =
+ "http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd";
+ private static final String HTTPS_BINARY_CONTENT_URL =
+ "https://businessnet.ba-ca.com";
+ private static final String HTTPS_UNTRUSTED_URL =
+ "https://heribert.anecon.com";
+ private static final String HTTP_UNKNOWN_HOST_URL = "http://uurjmjmruuw.com";
+ private static final String MALFORMED_URL = "//hsld///ddd";
+ private static final String FILE_BINARY_CONTENT_URL = "file:/C:/boot.ini";
+ private static final String XML_CONTENT =
+ "<XMLContent>"
+ + " <User name=\"test1\"/>"
+ + " <USer name=\"test2\"/>"
+ + "</XMLContent>";
+ private static final String BASE64_CONTENT = "U3Zlbg==";
+
+ private SPSSFactory spssFactory = SPSSFactory.getInstance();
+ private DataObjectFactory factory;
+
+ /**
+ * Constructor for DataObjectFactoryTest.
+ * @param name
+ */
+ public DataObjectFactoryTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ factory = DataObjectFactory.getInstance();
+
+ // set up SSL
+ Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ System.setProperty(
+ "java.protocol.handler.pkgs",
+ "com.sun.net.ssl.internal.www.protocol");
+ /*
+ System.setProperty(
+ "javax.net.ssl.keyStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
+ System.setProperty(
+ "javax.net.ssl.trustStore",
+ "data/test/security/client.keystore");
+ System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
+ */
+ }
+
+ public void testCreateFromURIWithBinaryHttp() throws Exception {
+ DataObject dataObject =
+ factory.createFromURI(HTTP_BINARY_CONTENT_URL, false);
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof ByteStreamDataObjectImpl);
+ assertNotNull(((BinaryDataObject) dataObject).getInputStream());
+ }
+
+ public void testCreateFromURIWithXmlHttp() throws Exception {
+ DataObject dataObject = factory.createFromURI(HTTP_XML_CONTENT_URL, false);
+ Element element;
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof XMLDataObjectImpl);
+ element = ((XMLDataObject) dataObject).getElement();
+ assertNotNull(element);
+ assertEquals("schema", element.getTagName());
+ }
+
+ public void testCreateFromURIWithMalformedURI() throws Exception {
+ try {
+ factory.createFromURI(MALFORMED_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromURIWithNonExistingHttpURL() throws Exception {
+ try {
+ factory.createFromURI(HTTP_UNKNOWN_HOST_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromURIWithHttps() throws Exception {
+ DataObject dataObject =
+ factory.createFromURI(HTTPS_BINARY_CONTENT_URL, false);
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof BinaryDataObject);
+ }
+
+ public void testCreateFromURIWithUntrustedHttps() throws Exception {
+ try {
+ factory.createFromURI(HTTPS_UNTRUSTED_URL, false);
+ fail();
+ } catch (MOAException e) {
+
+ }
+ }
+
+ public void testCreateFromURIWithFile() throws Exception {
+ try {
+ factory.createFromURI(FILE_BINARY_CONTENT_URL, false);
+ fail();
+ } catch (MOAException e) {
+ }
+ }
+
+ public void testCreateFromContentOptionalRefTypeWithXmlContent()
+ throws Exception {
+ Document doc = parseXmlString(XML_CONTENT);
+ Content content =
+ spssFactory.createContent(
+ doc.getDocumentElement().getChildNodes(),
+ "http://data");
+ DataObject dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ null,
+ null,
+ true,
+ false,
+ true,
+ false);
+
+ assertTrue(dataObject instanceof XMLNodeListDataObjectImpl);
+ }
+
+ public void testCreateFromContentOptionalRefTypeWithBase64Content()
+ throws Exception {
+ InputStream is = Base64Utils.decodeToStream(BASE64_CONTENT, true);
+ Content content = spssFactory.createContent(is, "http://data");
+ DataObject dataObject =
+ factory.createFromContentOptionalRefType(
+ content,
+ null,
+ null,
+ false,
+ false,
+ true,
+ false);
+
+ assertNotNull(dataObject);
+ assertTrue(dataObject instanceof ByteArrayDataObjectImpl);
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
new file mode 100644
index 000000000..13a80cbf1
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/TransformationFactoryTest.java
@@ -0,0 +1,201 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.List;
+import java.util.Map;
+
+import org.w3c.dom.Document;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import iaik.ixsil.init.IXSILInit;
+import iaik.ixsil.util.URI;
+import iaik.server.modules.xml.Base64Transformation;
+import iaik.server.modules.xml.Canonicalization;
+import iaik.server.modules.xml.EnvelopedSignatureTransformation;
+import iaik.server.modules.xml.Transformation;
+import iaik.server.modules.xml.XPath2Transformation;
+import iaik.server.modules.xml.XPathTransformation;
+import iaik.server.modules.xml.XSLTTransformation;
+
+import at.gv.egovernment.moa.util.Constants;
+
+import at.gv.egovernment.moa.spss.MOAApplicationException;
+import at.gv.egovernment.moa.spss.api.common.Transform;
+import at.gv.egovernment.moa.spss.api.xmlbind.TransformParser;
+import at.gv.egovernment.moa.spss.server.invoke.TransformationFactory;
+
+/**
+ * Test cases for the <code>TransformationFactory</code> class.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class TransformationFactoryTest extends SPSSTestCase {
+
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/dsigTransform/";
+ private TransformationFactory factory = TransformationFactory.getInstance();
+ private TransformParser transformParser = new TransformParser();
+
+ /**
+ * Constructor for TransformationFactoryTest.
+ * @param name
+ */
+ public TransformationFactoryTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ IXSILInit.init(new URI("init/properties/init.properties"));
+ //IXSILInit.init(new URI("file:data/deploy/ixsil/init/properties/init.properties"));
+
+ }
+
+ public void testCreateCanonicalization() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "canonicalization.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+
+ assertTrue(t instanceof Canonicalization);
+ assertEquals(
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315",
+ t.getAlgorithmURI());
+ }
+
+ public void testCreateCanonicalizationWithComments() throws Exception {
+ Document transform =
+ parseXml(TESTDATA_BASE + "canonicalizationWithComments.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+
+ assertTrue(t instanceof Canonicalization);
+ assertEquals(
+ "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments",
+ t.getAlgorithmURI());
+ }
+
+ public void testCreateBase64Decode() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "base64.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof Base64Transformation);
+ }
+
+ public void testCreateEnvelopedSignature() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "enveloped.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof EnvelopedSignatureTransformation);
+ }
+
+ public void testXPathTransformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xpath.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ Map nsDecls;
+
+ assertTrue(t instanceof XPathTransformation);
+ nsDecls = ((XPathTransformation) t).getNamespaceDeclarations();
+ assertEquals(1, nsDecls.size());
+ assertEquals(Constants.DSIG_NS_URI, nsDecls.get("dsig"));
+ }
+
+ public void testCreateXPath2Transformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xpath2.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ Transformation t = factory.createTransformation(tr);
+ assertTrue(t instanceof XPath2Transformation);
+ }
+
+ public void testCreateXSLTTransformation() throws Exception {
+ Document transform = parseXml(TESTDATA_BASE + "xslt.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ XSLTTransformation t =
+ (XSLTTransformation) factory.createTransformation(tr);
+ assertNotNull(t.getStylesheetElement());
+ }
+
+ public void testCreateWithIllegalAlgorithm() throws Exception {
+ try {
+ Document transform = parseXml(TESTDATA_BASE + "illegalAlgorithm.xml");
+ Transform tr =
+ transformParser.parseTransform(transform.getDocumentElement());
+ factory.createTransformation(tr);
+ fail();
+ } catch (MOAApplicationException e) {
+ }
+ }
+
+ public void testEqualsXslt() throws Exception {
+ Document xslt = parseXml(TESTDATA_BASE + "xslt.xml");
+ Transform tr = transformParser.parseTransform(xslt.getDocumentElement());
+ Transformation trXslt = factory.createTransformation(tr);
+
+ Document xsltEqu = parseXml(TESTDATA_BASE + "xsltEqual.xml");
+ tr = transformParser.parseTransform(xsltEqu.getDocumentElement());
+ Transformation trXsltEqu = factory.createTransformation(tr);
+
+ Document xsltDiff = parseXml(TESTDATA_BASE + "xsltDifferent.xml");
+ tr = transformParser.parseTransform(xsltDiff.getDocumentElement());
+ Transformation trXsltDiff = factory.createTransformation(tr);
+
+ Document canonicalization =
+ parseXml(TESTDATA_BASE + "canonicalization.xml");
+
+ assertTrue(trXslt.equals(trXsltEqu));
+ assertFalse(trXslt.equals(trXsltDiff));
+ assertFalse(trXsltEqu.equals(trXsltDiff));
+ assertEquals(trXslt.hashCode(), trXsltEqu.hashCode());
+ assertFalse(trXslt.hashCode() == trXsltDiff.hashCode());
+ assertFalse(trXsltEqu.hashCode() == trXsltDiff.hashCode());
+ assertFalse(trXslt.equals(canonicalization));
+ }
+
+ public void testEqualsXPath() throws Exception {
+ Document xpath = parseXml(TESTDATA_BASE + "xpath.xml");
+ Transform tr = transformParser.parseTransform(xpath.getDocumentElement());
+ Transformation trXpath = factory.createTransformation(tr);
+ Transformation trXpathEqu = factory.createTransformation(tr);
+
+ Document xpathDiff = parseXml(TESTDATA_BASE + "xpathDifferent.xml");
+ tr = transformParser.parseTransform(xpathDiff.getDocumentElement());
+ Transformation trXpathDiff = factory.createTransformation(tr);
+
+ assertTrue(trXpath.equals(trXpathEqu));
+ assertEquals(trXpath.hashCode(), trXpathEqu.hashCode());
+ assertFalse(trXpath.equals(trXpathDiff));
+ assertFalse(trXpath.hashCode() == trXpathDiff.hashCode());
+ }
+
+ public void testEqualsXPath2() throws Exception {
+ Document xpath2 = parseXml(TESTDATA_BASE + "xpath2.xml");
+ Transform tr = transformParser.parseTransform(xpath2.getDocumentElement());
+ Transformation trXpath2 = factory.createTransformation(tr);
+ Transformation trXpath2Equ = factory.createTransformation(tr);
+
+ Document xpath2Diff = parseXml(TESTDATA_BASE + "xpath2Different.xml");
+ tr = transformParser.parseTransform(xpath2Diff.getDocumentElement());
+ Transformation trXpath2Diff = factory.createTransformation(tr);
+
+ assertTrue(trXpath2.equals(trXpath2Equ));
+ assertEquals(trXpath2.hashCode(), trXpath2Equ.hashCode());
+ assertFalse(trXpath2.equals(trXpath2Diff));
+ assertFalse(trXpath2.hashCode() == trXpath2Diff.hashCode());
+ }
+
+ public void testCreateTransformationList() throws Exception {
+ Document transforms = parseXml(TESTDATA_BASE + "transforms.xml");
+ List trs = transformParser.parseTransforms(transforms.getDocumentElement());
+ List transformationList = factory.createTransformationList(trs);
+
+ assertEquals(3, transformationList.size());
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java
new file mode 100644
index 000000000..28cd3805a
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureCreationInvokerTest.java
@@ -0,0 +1,63 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import java.util.Collections;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.CreateXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlsign.CreateXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureCreationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the XMLSignatureCreationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureCreationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/CreateXMLSignature/";
+
+ public XMLSignatureCreationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ setUpSSL();
+ }
+
+ public void testCreateXMLSignature() throws Exception {
+ try {
+ XMLSignatureCreationInvoker invoker =
+ XMLSignatureCreationInvoker.getInstance();
+ CreateXMLSignatureRequestParser requestParser =
+ new CreateXMLSignatureRequestParser();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorCX2.004.Req.xml");
+ CreateXMLSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ CreateXMLSignatureResponse response =
+ invoker.createXMLSignature(request, Collections.EMPTY_SET);
+ CreateXMLSignatureResponseBuilder responseBuilder =
+ new CreateXMLSignatureResponseBuilder();
+ Element result = responseBuilder.build(response).getDocumentElement();
+
+ System.out.println(DOMUtils.serializeNode(result));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java
new file mode 100644
index 000000000..56e3d541b
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/invoke/XMLSignatureVerificationInvokerTest.java
@@ -0,0 +1,61 @@
+package test.at.gv.egovernment.moa.spss.server.invoke;
+
+import org.w3c.dom.Document;
+
+import test.at.gv.egovernment.moa.spss.SPSSTestCase;
+
+import at.gv.egovernment.moa.util.DOMUtils;
+
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
+import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
+import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
+import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
+
+/**
+ * Mainly a smoke test for debugging the XMLSignatureVerificationInvoker.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class XMLSignatureVerificationInvokerTest extends SPSSTestCase {
+ private static final String TESTDATA_BASE =
+ TESTDATA_ROOT + "xml/VerifyXMLSignature/";
+
+ public XMLSignatureVerificationInvokerTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() throws Exception {
+ setUpTransactionContext();
+ setUpLoggingContext();
+ setUpIaikConfiguration();
+ }
+
+ public void testVerifyXMLSignature() throws Exception {
+ try {
+ XMLSignatureVerificationInvoker invoker =
+ XMLSignatureVerificationInvoker.getInstance();
+ VerifyXMLSignatureRequestParser requestParser =
+ new VerifyXMLSignatureRequestParser();
+ VerifyXMLSignatureResponseBuilder responseBuilder =
+ new VerifyXMLSignatureResponseBuilder();
+ Document doc =
+ SPSSTestCase.parseXmlValidating(
+ TESTDATA_BASE + "TestGeneratorVX.201.Req.xml");
+
+ VerifyXMLSignatureRequest request =
+ requestParser.parse(doc.getDocumentElement());
+ VerifyXMLSignatureResponse response;
+
+ response = invoker.verifyXMLSignature(request);
+ System.out.println(
+ DOMUtils.serializeNode(responseBuilder.build(response)));
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail();
+ }
+ }
+
+
+}
diff --git a/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java
new file mode 100644
index 000000000..b46c20086
--- /dev/null
+++ b/spss/server/serverlib/src/test/at/gv/egovernment/moa/spss/server/tools/CertToolTest.java
@@ -0,0 +1,50 @@
+package test.at.gv.egovernment.moa.spss.server.tools;
+
+import java.io.ByteArrayOutputStream;
+import java.io.PrintStream;
+
+import at.gv.egovernment.moa.spss.server.tools.CertTool;
+
+import test.at.gv.egovernment.moa.MOATestCase;
+
+/**
+ * Tests for the <code>CertTool</code>.
+ *
+ * @author Patrick Peck
+ * @version $Id$
+ */
+public class CertToolTest extends MOATestCase {
+
+ private static final String EXPECTED_RESULT =
+ "SubjectDN (RFC2253):"
+ + " CN=Patrick Peck,OU=MOA Team,O=BRZ,L=Vienna,ST=Vienna,C=AT\r\n"
+ + "IssuerDN (RFC2253) :"
+ + " CN=Patrick Peck,OU=MOA Team,O=BRZ,L=Vienna,ST=Vienna,C=AT\r\n"
+ + "Serial Number :"
+ + " 1047548672\r\n";
+ private CertTool certTool;
+
+ /**
+ * Constructor for CertToolTest.
+ * @param name
+ */
+ public CertToolTest(String name) {
+ super(name);
+ }
+
+ protected void setUp() {
+ certTool = new CertTool();
+ }
+
+ public void testPrintCertInfo() {
+ ByteArrayOutputStream bos = new ByteArrayOutputStream();
+ PrintStream ps = new PrintStream(bos);
+ String result;
+
+ certTool.printCertInfo(TESTDATA_ROOT + "security/server.cer", ps);
+ result = new String(bos.toByteArray());
+ System.out.println(result);
+ assertEquals(EXPECTED_RESULT, result);
+ }
+
+}
diff --git a/spss/server/serverws/spec/MOA-SPSS-1.3.doc b/spss/server/serverws/spec/MOA-SPSS-1.3.doc
new file mode 100644
index 000000000..fabc4248e
--- /dev/null
+++ b/spss/server/serverws/spec/MOA-SPSS-1.3.doc
Binary files differ
diff --git a/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd b/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd
new file mode 100644
index 000000000..088fe76fd
--- /dev/null
+++ b/spss/server/serverws/src/main/webapp/WEB-INF/server-config.wsdd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Axis Deployment Descriptor for MOA SP/SS 1.4
+-->
+<deployment name="defaultClientConfig"
+ xmlns="http://xml.apache.org/axis/wsdd/"
+ xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
+ xmlns:handler="http://xml.apache.org/axis/wsdd/providers/handler">
+
+ <handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
+ <handler name="MsgDispatcher" type="java:org.apache.axis.providers.java.MsgProvider"/>
+ <handler name="HTTPAuthHandler" type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
+ <handler name="MOAHandler" type="java:at.gv.egovernment.moa.spss.server.service.AxisHandler"/>
+
+ <service name="SignatureCreation" provider="java:MSG">
+ <namespace>http://reference.e-government.gv.at/namespace/moa/20020822#</namespace>
+ <parameter name="allowedMethods" value="CreateXMLSignatureRequest"/>
+ <parameter name="className" value="at.gv.egovernment.moa.spss.server.service.SignatureCreationService"/>
+ <wsdlFile>/resources/wsdl/MOA-SPSS-1.3.wsdl</wsdlFile>
+ <requestFlow>
+ <handler type="MOAHandler"/>
+ </requestFlow>
+ <responseFlow>
+ <handler type="MOAHandler"/>
+ </responseFlow>
+ </service>
+
+ <service name="SignatureVerification" provider="java:MSG">
+ <namespace>http://reference.e-government.gv.at/namespace/moa/20020822#</namespace>
+ <parameter name="allowedMethods" value="VerifyCMSSignatureRequest VerifyXMLSignatureRequest"/>
+ <parameter name="className" value="at.gv.egovernment.moa.spss.server.service.SignatureVerificationService"/>
+ <wsdlFile>/resources/wsdl/MOA-SPSS-1.3.wsdl</wsdlFile>
+ <requestFlow>
+ <handler type="MOAHandler"/>
+ </requestFlow>
+ <responseFlow>
+ <handler type="MOAHandler"/>
+ </responseFlow>
+ </service>
+
+ <transport name="http">
+ <requestFlow>
+ <handler type="URLMapper"/>
+ <handler type="HTTPAuthHandler"/>
+ </requestFlow>
+ </transport>
+
+</deployment>
diff --git a/spss/server/serverws/src/main/webapp/WEB-INF/web.xml b/spss/server/serverws/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 000000000..b68ee850e
--- /dev/null
+++ b/spss/server/serverws/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE web-app
+ PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd">
+
+<web-app>
+ <display-name>MOA SP-SS</display-name>
+ <description>MOA Signature Creation and Verification Services</description>
+ <servlet>
+ <servlet-name>ConfigurationServlet</servlet-name>
+ <display-name>MOA Configuration Servlet</display-name>
+ <servlet-class>
+ at.gv.egovernment.moa.spss.server.service.ConfigurationServlet
+ </servlet-class>
+ <load-on-startup>0</load-on-startup>
+ </servlet>
+ <servlet>
+ <servlet-name>AxisServlet</servlet-name>
+ <display-name>Apache-Axis Servlet</display-name>
+ <servlet-class>
+ org.apache.axis.transport.http.AxisServlet
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>AxisServlet</servlet-name>
+ <url-pattern>/services/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ConfigurationServlet</servlet-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </servlet-mapping>
+
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>ConfigurationUpdate</web-resource-name>
+ <url-pattern>/ConfigurationUpdate</url-pattern>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>moa-admin</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>UserDatabase</realm-name>
+ </login-config>
+
+ <security-role>
+ <description>
+ The role that is required to log in to the moa Application
+ </description>
+ <role-name>moa-admin</role-name>
+ </security-role>
+</web-app>
diff --git a/spss/server/serverws/tools/ConfigurationMapper.xsl b/spss/server/serverws/tools/ConfigurationMapper.xsl
new file mode 100644
index 000000000..fd47cbf84
--- /dev/null
+++ b/spss/server/serverws/tools/ConfigurationMapper.xsl
@@ -0,0 +1,343 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:dsig="http://www.w3.org/2000/09/xmldsig#" xmlns:cfg="http://reference.e-government.gv.at/namespace/moaconfig/20021122#">
+ <xsl:output encoding="UTF-8" indent="yes" method="xml"/>
+ <xsl:template match="/">
+ <xsl:apply-templates/>
+ </xsl:template>
+ <xsl:template match="cfg:MOAConfiguration">
+ <xsl:comment>MOA SPSS 1.3 Configuration File created by MOA SPSS Configuration Mapper</xsl:comment>
+ <cfg:MOAConfiguration>
+ <xsl:if test="cfg:HardwareCryptoModule">
+ <cfg:Common>
+ <xsl:for-each select="cfg:HardwareCryptoModule">
+ <cfg:HardwareCryptoModule>
+ <cfg:Name>
+ <xsl:value-of select="@name"/>
+ </cfg:Name>
+ <xsl:if test="@slotID">
+ <cfg:SlotId>
+ <xsl:value-of select="@slotID"/>
+ </cfg:SlotId>
+ </xsl:if>
+ <cfg:UserPIN>
+ <xsl:value-of select="@userPIN"/>
+ </cfg:UserPIN>
+ </cfg:HardwareCryptoModule>
+ </xsl:for-each>
+ </cfg:Common>
+ </xsl:if>
+ <xsl:if test="cfg:KeyGroup">
+ <cfg:SignatureCreation>
+ <cfg:KeyModules>
+ <xsl:apply-templates select="cfg:HardwareKeyModule | cfg:SoftwareKeyModule"/>
+ </cfg:KeyModules>
+ <xsl:apply-templates select="cfg:KeyGroup"/>
+ <xsl:apply-templates select="cfg:KeyGroupMapping"/>
+ <cfg:XMLDSig>
+ <cfg:CanonicalizationAlgorithm>
+ <xsl:choose>
+ <xsl:when test="cfg:CanonicalizationAlgorithm">
+ <xsl:value-of select="cfg:CanonicalizationAlgorithm/@name"/>
+ </xsl:when>
+ <xsl:otherwise>http://www.w3.org/TR/2001/REC-xml-c14n-20010315</xsl:otherwise>
+ </xsl:choose>
+ </cfg:CanonicalizationAlgorithm>
+ <cfg:DigestMethodAlgorithm>
+ <xsl:choose>
+ <xsl:when test="cfg:DigestMethodAlgorithm">
+ <xsl:value-of select="cfg:DigestMethodAlgorithm/@name"/>
+ </xsl:when>
+ <xsl:otherwise>http://www.w3.org/2000/09/xmldsig#sha1</xsl:otherwise>
+ </xsl:choose>
+ </cfg:DigestMethodAlgorithm>
+ </cfg:XMLDSig>
+ <xsl:for-each select="cfg:CreateTransformsInfoProfile">
+ <cfg:CreateTransformsInfoProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:CreateTransformsInfoProfile>
+ </xsl:for-each>
+ <xsl:for-each select="cfg:CreateSignatureEnvironmentProfile">
+ <cfg:CreateSignatureEnvironmentProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:CreateSignatureEnvironmentProfile>
+ </xsl:for-each>
+ </cfg:SignatureCreation>
+ </xsl:if>
+ <xsl:if test="cfg:TrustProfile">
+ <cfg:SignatureVerification>
+ <xsl:call-template name="CertificateValidation"/>
+ </cfg:SignatureVerification>
+ </xsl:if>
+ </cfg:MOAConfiguration>
+ </xsl:template>
+ <xsl:template match="cfg:SoftwareKeyModule">
+ <cfg:SoftwareKeyModule>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:FileName>
+ <xsl:value-of select="@filename"/>
+ </cfg:FileName>
+ <xsl:if test="@password">
+ <cfg:Password>
+ <xsl:value-of select="@password"/>
+ </cfg:Password>
+ </xsl:if>
+ </cfg:SoftwareKeyModule>
+ </xsl:template>
+ <xsl:template match="cfg:HardwareKeyModule">
+ <cfg:HardwareKeyModule>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:Name>
+ <xsl:value-of select="@name"/>
+ </cfg:Name>
+ <xsl:if test="@slotID">
+ <cfg:SlotId>
+ <xsl:value-of select="@slotID"/>
+ </cfg:SlotId>
+ </xsl:if>
+ <cfg:UserPIN>
+ <xsl:value-of select="@userPIN"/>
+ </cfg:UserPIN>
+ </cfg:HardwareKeyModule>
+ </xsl:template>
+ <xsl:template match="cfg:KeyGroup">
+ <cfg:KeyGroup>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <xsl:for-each select="cfg:Key">
+ <cfg:Key>
+ <cfg:KeyModuleId>
+ <xsl:value-of select="cfg:KeyModuleID"/>
+ </cfg:KeyModuleId>
+ <cfg:KeyCertIssuerSerial>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="cfg:KeyCertIssuerSerial/dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="cfg:KeyCertIssuerSerial/dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:KeyCertIssuerSerial>
+ </cfg:Key>
+ </xsl:for-each>
+ </cfg:KeyGroup>
+ </xsl:template>
+ <xsl:template match="cfg:KeyGroupMapping">
+ <cfg:KeyGroupMapping>
+ <xsl:if test="cfg:X509IssuerSerial">
+ <cfg:CustomerId>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="cfg:X509IssuerSerial/dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="cfg:X509IssuerSerial/dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:CustomerId>
+ </xsl:if>
+ <xsl:for-each select="cfg:KeyGroup">
+ <cfg:KeyGroupId>
+ <xsl:value-of select="@id"/>
+ </cfg:KeyGroupId>
+ </xsl:for-each>
+ </cfg:KeyGroupMapping>
+ </xsl:template>
+ <xsl:template match="cfg:CreateTransformsInfoProfile | cfg:CreateSignatureEnvironmentProfile | cfg:VerifyTransformsInfoProfile | cfg:SupplementProfile">
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:Location>
+ <xsl:value-of select="@filename"/>
+ </cfg:Location>
+ </xsl:template>
+ <xsl:template name="CertificateValidation">
+ <cfg:CertificateValidation>
+ <cfg:PathConstruction>
+ <cfg:AutoAddCertificates>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'autoAddCertificates'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:AutoAddCertificates>
+ <cfg:UseAuthorityInformationAccess>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'useAuthorityInfoAccess'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:UseAuthorityInformationAccess>
+ <cfg:CertificateStore>
+ <cfg:DirectoryStore>
+ <cfg:Location>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DirectoryCertStoreParameters.RootDir'"/>
+ <xsl:with-param name="DefaultValue" select="'certstore'"/>
+ </xsl:call-template>
+ </cfg:Location>
+ </cfg:DirectoryStore>
+ </cfg:CertificateStore>
+ </cfg:PathConstruction>
+ <cfg:PathValidation>
+ <cfg:ChainingMode>
+ <cfg:DefaultMode>
+ <xsl:choose>
+ <xsl:when test="cfg:ChainingModes/@systemDefaultMode">
+ <xsl:value-of select="cfg:ChainingModes/@systemDefaultMode"/>
+ </xsl:when>
+ <xsl:otherwise>pkix</xsl:otherwise>
+ </xsl:choose>
+ </cfg:DefaultMode>
+ <xsl:for-each select="cfg:ChainingModes/cfg:TrustAnchor">
+ <cfg:TrustAnchor>
+ <cfg:Identification>
+ <dsig:X509IssuerName>
+ <xsl:value-of select="dsig:X509IssuerName"/>
+ </dsig:X509IssuerName>
+ <dsig:X509SerialNumber>
+ <xsl:value-of select="dsig:X509SerialNumber"/>
+ </dsig:X509SerialNumber>
+ </cfg:Identification>
+ <cfg:Mode>
+ <xsl:value-of select="@mode"/>
+ </cfg:Mode>
+ </cfg:TrustAnchor>
+ </xsl:for-each>
+ </cfg:ChainingMode>
+ <xsl:for-each select="cfg:TrustProfile">
+ <cfg:TrustProfile>
+ <cfg:Id>
+ <xsl:value-of select="@id"/>
+ </cfg:Id>
+ <cfg:TrustAnchorsLocation>
+ <xsl:value-of select="@uri"/>
+ </cfg:TrustAnchorsLocation>
+ <xsl:if test="@signerCertsUri">
+ <cfg:SignerCertsLocation>
+ <xsl:value-of select="@signerCertsUri"/>
+ </cfg:SignerCertsLocation>
+ </xsl:if>
+ </cfg:TrustProfile>
+ </xsl:for-each>
+ </cfg:PathValidation>
+ <cfg:RevocationChecking>
+ <cfg:EnableChecking>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'checkRevocation'"/>
+ <xsl:with-param name="DefaultValue" select="'true'"/>
+ </xsl:call-template>
+ </cfg:EnableChecking>
+ <cfg:MaxRevocationAge>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'maxRevocationAge'"/>
+ <xsl:with-param name="DefaultValue" select="'0'"/>
+ </xsl:call-template>
+ </cfg:MaxRevocationAge>
+ <cfg:ServiceOrder>
+ <cfg:Service>CRL</cfg:Service>
+ <cfg:Service>OCSP</cfg:Service>
+ </cfg:ServiceOrder>
+ <cfg:Archiving>
+ <cfg:EnableArchiving>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'archiveRevocationInfo'"/>
+ <xsl:with-param name="DefaultValue" select="'false'"/>
+ </xsl:call-template>
+ </cfg:EnableArchiving>
+ <cfg:ArchiveDuration>
+ <xsl:choose>
+ <xsl:when test="cfg:CRLArchive/@duration">
+ <xsl:value-of select="cfg:CRLArchive/@duration"/>
+ </xsl:when>
+ <xsl:otherwise>365</xsl:otherwise>
+ </xsl:choose>
+ </cfg:ArchiveDuration>
+ <cfg:Archive>
+ <cfg:DatabaseArchive>
+ <cfg:JDBCURL>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DataBaseArchiveParameter.JDBCUrl'"/>
+ <xsl:with-param name="DefaultValue" select="'jdbc:url'"/>
+ </xsl:call-template>
+ </cfg:JDBCURL>
+ <cfg:JDBCDriverClassName>
+ <xsl:call-template name="GetGenericValue">
+ <xsl:with-param name="GenericName" select="'DataBaseArchiveParameter.JDBCDriverClass'"/>
+ <xsl:with-param name="DefaultValue" select="'fully.qualified.classname'"/>
+ </xsl:call-template>
+ </cfg:JDBCDriverClassName>
+ </cfg:DatabaseArchive>
+ </cfg:Archive>
+ </cfg:Archiving>
+ <xsl:for-each select="cfg:CRLDistributionPoint">
+ <cfg:DistributionPoint>
+ <cfg:CAIssuerDN>
+ <xsl:value-of select="cfg:CAIssuerDN"/>
+ </cfg:CAIssuerDN>
+ <xsl:for-each select="cfg:DistributionPoint">
+ <cfg:CRLDP>
+ <cfg:Location>
+ <xsl:value-of select="@uri"/>
+ </cfg:Location>
+ <xsl:if test="contains(@reasonCodes, 'all')">
+ <cfg:ReasonCode>all</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'unused')">
+ <cfg:ReasonCode>unused</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'keyCompromise')">
+ <cfg:ReasonCode>keyCompromise</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'cACompromise')">
+ <cfg:ReasonCode>cACompromise</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'affiliationChanged')">
+ <cfg:ReasonCode>affiliationChanged</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'superseded')">
+ <cfg:ReasonCode>superseded</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'cessationOfOperation')">
+ <cfg:ReasonCode>cessationOfOperation</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'certificateHold')">
+ <cfg:ReasonCode>certificateHold</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'privilegeWithdrawn')">
+ <cfg:ReasonCode>privilegeWithdrawn</cfg:ReasonCode>
+ </xsl:if>
+ <xsl:if test="contains(@reasonCodes, 'aACompromise')">
+ <cfg:ReasonCode>aACompromise</cfg:ReasonCode>
+ </xsl:if>
+ </cfg:CRLDP>
+ </xsl:for-each>
+ </cfg:DistributionPoint>
+ </xsl:for-each>
+ </cfg:RevocationChecking>
+ </cfg:CertificateValidation>
+ <xsl:for-each select="cfg:VerifyTransformsInfoProfile">
+ <cfg:VerifyTransformsInfoProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:VerifyTransformsInfoProfile>
+ </xsl:for-each>
+ <xsl:for-each select="cfg:SupplementProfile">
+ <cfg:SupplementProfile>
+ <xsl:apply-templates select="."/>
+ </cfg:SupplementProfile>
+ </xsl:for-each>
+ </xsl:template>
+ <xsl:template name="GetGenericValue">
+ <xsl:param name="GenericName"/>
+ <xsl:param name="DefaultValue"/>
+ <xsl:choose>
+ <xsl:when test="cfg:GenericConfiguration[@name=$GenericName]">
+ <xsl:value-of select="cfg:GenericConfiguration[@name=$GenericName]/@value"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:if test="$DefaultValue != ''">
+ <xsl:value-of select="$DefaultValue"/>
+ </xsl:if>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+</xsl:stylesheet>