Update upstream source from tag 'upstream/3.1.49+dfsg'
Update to upstream version '3.1.49+dfsg'
with Debian dir 5f0f93bb5565636768f3b4a616db77ccf7df1789
Jochen Sprickerhof
3 years ago
2 | 2 | <modelVersion>4.0.0</modelVersion> |
3 | 3 | <groupId>com.github.hbci4j</groupId> |
4 | 4 | <artifactId>hbci4j-core</artifactId> |
5 | <version>3.1.42</version> | |
5 | <version>3.1.49</version> | |
6 | 6 | <packaging>jar</packaging> |
7 | 7 | <name>${project.artifactId}</name> |
8 | 8 | <description>HBCI4j - Home Banking Computer Interface for Java</description> |
30 | 30 | <url>scm:git:git@github.com:hbci4j/hbci4java.git</url> |
31 | 31 | <connection>scm:git:git@github.com:hbci4j/hbci4java.git</connection> |
32 | 32 | <developerConnection>scm:git:git@github.com:hbci4j/hbci4java.git</developerConnection> |
33 | <tag>hbci4j-core-3.1.42</tag> | |
33 | <tag>hbci4j-core-3.1.49</tag> | |
34 | 34 | </scm> |
35 | 35 | <properties> |
36 | 36 | <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
49 | 49 | { |
50 | 50 | this(handler,getLowlevelName()); |
51 | 51 | |
52 | addConstraint("my.country","KTV.KIK.country","DE", LogFilter.FILTER_NONE); | |
53 | addConstraint("my.blz","KTV.KIK.blz",null, LogFilter.FILTER_MOST); | |
54 | addConstraint("my.number","KTV.number",null, LogFilter.FILTER_IDS); | |
55 | addConstraint("my.subnumber","KTV.subnumber","", LogFilter.FILTER_MOST); | |
56 | ||
57 | int version = 1; | |
52 | ||
53 | boolean sepa = false; | |
58 | 54 | try |
59 | 55 | { |
60 | version = Integer.parseInt(this.getSegVersion()); | |
56 | sepa = Integer.parseInt(this.getSegVersion()) >= 7; | |
61 | 57 | } |
62 | 58 | catch (Exception e) |
63 | 59 | { |
64 | 60 | HBCIUtils.log(e); |
65 | 61 | } |
62 | ||
63 | boolean nat = this.canNationalAcc(handler); | |
66 | 64 | |
67 | if (version >= 7) // SEPA | |
65 | if (sepa) | |
68 | 66 | { |
69 | addConstraint("my.bic","KTV.bic", null, LogFilter.FILTER_MOST); | |
70 | addConstraint("my.iban","KTV.iban",null, LogFilter.FILTER_IDS); | |
67 | addConstraint("my.bic","KTV.bic", null, LogFilter.FILTER_MOST); | |
68 | addConstraint("my.iban","KTV.iban",null, LogFilter.FILTER_IDS); | |
71 | 69 | } |
72 | else | |
70 | ||
71 | if (nat || !sepa) | |
73 | 72 | { |
74 | addConstraint("my.curr","curr","EUR", LogFilter.FILTER_NONE); | |
73 | addConstraint("my.curr","curr","EUR", LogFilter.FILTER_NONE); | |
74 | addConstraint("my.country","KTV.KIK.country","DE", LogFilter.FILTER_NONE); | |
75 | addConstraint("my.blz","KTV.KIK.blz",null, LogFilter.FILTER_MOST); | |
76 | addConstraint("my.number","KTV.number",null, LogFilter.FILTER_IDS); | |
77 | addConstraint("my.subnumber","KTV.subnumber","", LogFilter.FILTER_MOST); | |
75 | 78 | } |
76 | 79 | |
77 | 80 | addConstraint("dummyall","allaccounts", "N", LogFilter.FILTER_NONE); |
21 | 21 | package org.kapott.hbci.GV; |
22 | 22 | |
23 | 23 | import org.kapott.hbci.manager.HBCIHandler; |
24 | import org.kapott.hbci.manager.HBCIUtils; | |
24 | 25 | import org.kapott.hbci.manager.LogFilter; |
25 | 26 | |
26 | 27 | public final class GVSaldoReqAll |
36 | 37 | super(handler,getLowlevelName()); |
37 | 38 | |
38 | 39 | addConstraint("maxentries","maxentries","", LogFilter.FILTER_NONE); |
39 | addConstraint("my.country","KTV.KIK.country","DE", LogFilter.FILTER_NONE); | |
40 | addConstraint("my.blz","KTV.KIK.blz",null, LogFilter.FILTER_MOST); | |
41 | addConstraint("my.number","KTV.number",null, LogFilter.FILTER_IDS); | |
42 | addConstraint("my.subnumber","KTV.subnumber","", LogFilter.FILTER_MOST); | |
43 | addConstraint("my.curr","curr","EUR", LogFilter.FILTER_NONE); | |
44 | 40 | addConstraint("dummyall","allaccounts", "J", LogFilter.FILTER_NONE); |
41 | ||
42 | boolean sepa = false; | |
43 | try | |
44 | { | |
45 | sepa = Integer.parseInt(this.getSegVersion()) >= 7; | |
46 | } | |
47 | catch (Exception e) | |
48 | { | |
49 | HBCIUtils.log(e); | |
50 | } | |
51 | ||
52 | boolean nat = this.canNationalAcc(handler); | |
53 | ||
54 | if (sepa) | |
55 | { | |
56 | addConstraint("my.bic","KTV.bic", null, LogFilter.FILTER_MOST); | |
57 | addConstraint("my.iban","KTV.iban",null, LogFilter.FILTER_IDS); | |
58 | } | |
59 | ||
60 | if (nat || !sepa) | |
61 | { | |
62 | addConstraint("my.country","KTV.KIK.country","DE", LogFilter.FILTER_NONE); | |
63 | addConstraint("my.blz","KTV.KIK.blz",null, LogFilter.FILTER_MOST); | |
64 | addConstraint("my.number","KTV.number",null, LogFilter.FILTER_IDS); | |
65 | addConstraint("my.subnumber","KTV.subnumber","", LogFilter.FILTER_MOST); | |
66 | addConstraint("my.curr","curr","EUR", LogFilter.FILTER_NONE); | |
67 | } | |
68 | ||
45 | 69 | } |
46 | 70 | |
47 | 71 | public void verifyConstraints() |
0 | /********************************************************************** | |
1 | * | |
2 | * This file is part of HBCI4Java. | |
3 | * Copyright (c) 2001-2008 Stefan Palme | |
4 | * | |
5 | * This library is free software; you can redistribute it and/or | |
6 | * modify it under the terms of the GNU Lesser General Public | |
7 | * License as published by the Free Software Foundation; either | |
8 | * version 2.1 of the License, or (at your option) any later version. | |
9 | * | |
10 | * This library is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | * Lesser General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU Lesser General Public | |
16 | * License along with this library; if not, write to the Free Software | |
17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
18 | * | |
19 | **********************************************************************/ | |
20 | ||
21 | package org.kapott.hbci.GV; | |
22 | ||
23 | import org.kapott.hbci.manager.HBCIHandler; | |
24 | import org.kapott.hbci.manager.LogFilter; | |
25 | ||
26 | public class GVSaldoReqSEPA | |
27 | extends GVSaldoReq | |
28 | { | |
29 | public static String getLowlevelName() | |
30 | { | |
31 | return "SaldoSEPA"; | |
32 | } | |
33 | ||
34 | public GVSaldoReqSEPA(HBCIHandler handler,String name) | |
35 | { | |
36 | super(handler,name); | |
37 | } | |
38 | ||
39 | public GVSaldoReqSEPA(HBCIHandler handler) | |
40 | { | |
41 | this(handler,getLowlevelName()); | |
42 | ||
43 | /* | |
44 | addConstraint("my.country","KTV.KIK.country","", LogFilter.FILTER_NONE); | |
45 | addConstraint("my.blz","KTV.KIK.blz","", LogFilter.FILTER_MOST); | |
46 | addConstraint("my.number","KTV.number","", LogFilter.FILTER_IDS); | |
47 | addConstraint("my.subnumber","KTV.subnumber","", LogFilter.FILTER_MOST); | |
48 | */ | |
49 | addConstraint("my.bic","KTV.bic", null, LogFilter.FILTER_MOST); | |
50 | addConstraint("my.iban","KTV.iban",null, LogFilter.FILTER_IDS); | |
51 | addConstraint("dummyall","allaccounts", "N", LogFilter.FILTER_NONE); | |
52 | addConstraint("maxentries","maxentries","", LogFilter.FILTER_NONE); | |
53 | } | |
54 | } |
96 | 96 | if (version < 6) |
97 | 97 | addConstraint("listidx","listidx","", LogFilter.FILTER_NONE); |
98 | 98 | |
99 | addConstraint("notlasttan","notlasttan","N", LogFilter.FILTER_NONE); | |
99 | addConstraint("notlasttan","notlasttan","", LogFilter.FILTER_NONE); | |
100 | 100 | |
101 | 101 | if (version <= 1) // Gabs nur in HKTAN 1 |
102 | 102 | addConstraint("info","info","", LogFilter.FILTER_NONE); |
35 | 35 | * Leider geht das bei einigen Banken (wie Deutsche Bank) nicht, da die keine personalisierte Dialog-Initialisierung mit TAN-Verfahren 999 erlauben. |
36 | 36 | */ |
37 | 37 | PINTAN_INIT_AUTOMETHOD(true), |
38 | ||
39 | /** | |
40 | * Feature, ob der Segment-Code nur bei TAN-Prozess 1 und 4 mitgesendet wird. In den anderen Faellen ist es teilweise optional. | |
41 | * Der FinTS-Server der Baader Bank prueft das aber ziemlich streng. Und damit wir uns nicht die Kompatibilitaet mit anderen Banken | |
42 | * kaputt machen, habe ich es als optionales Feature umgesetzt - denn alle anderen Banken tolerieren das bisherige Verhalten. | |
43 | * Siehe https://homebanking-hilfe.de/forum/topic.php?p=157481#real157481 | |
44 | */ | |
45 | PINTAN_SEGCODE_STRICT(false), | |
38 | 46 | |
39 | 47 | /** |
40 | 48 | * Feature, mit dem festgelegt werden kann, ob HBCI4Java bei der Synchronisierung das HKSPA ausfuehren soll, um die SEPA-Informationen der Konten abzurufen. |
453 | 453 | final String prefix = "TAN2Step" + version; |
454 | 454 | k.rawSet(prefix,"requested"); // forcieren, dass das Segment mit gesendet wird - auch wenn es eigentlich optional ist |
455 | 455 | k.rawSet(prefix + ".process",tp.getCode()); |
456 | ||
457 | final String segcode = sca.getTanReference(); | |
458 | HBCIUtils.log("creating HKTAN for SCA [process : " + tp + "], order code: " + segcode + "]",HBCIUtils.LOG_DEBUG); | |
456 | ||
457 | ||
458 | String segcode = sca.getTanReference(); | |
459 | if (Feature.PINTAN_SEGCODE_STRICT.isEnabled()) | |
460 | { | |
461 | if (tp == KnownTANProcess.PROCESS2_STEP2) | |
462 | segcode = ""; | |
463 | } | |
464 | HBCIUtils.log("creating HKTAN for SCA [process : " + tp + ", order code: " + segcode + "]",HBCIUtils.LOG_DEBUG); | |
459 | 465 | |
460 | 466 | k.rawSet(prefix + ".ordersegcode",segcode); |
461 | 467 | k.rawSet(prefix + ".OrderAccount.bic",""); |
466 | 472 | k.rawSet(prefix + ".OrderAccount.KIK.country",""); |
467 | 473 | k.rawSet(prefix + ".orderhash",(variant == Variant.V2) ? "" : ("B00000000")); |
468 | 474 | k.rawSet(prefix + ".orderref",(step == 2) ? (String) this.getPersistentData(KEY_PD_ORDERREF) : ""); |
469 | k.rawSet(prefix + ".notlasttan","N"); | |
475 | k.rawSet(prefix + ".notlasttan",(tp == KnownTANProcess.PROCESS1 || tp == KnownTANProcess.PROCESS2_STEP2) ? "N" : ""); // Darf nur bei TAN-Prozess 1 und 2 belegt sein | |
470 | 476 | k.rawSet(prefix + ".challengeklass",(variant == Variant.V2) ? "" : "99"); |
471 | 477 | k.rawSet(prefix + ".tanmedia",sca.getTanMedia()); |
472 | 478 | } |
514 | 514 | // Einmal-Schluessel fuer die Nachricht erzeugen |
515 | 515 | final String provider = CryptUtils.getSecurityProvider(); |
516 | 516 | KeyGenerator keygen = provider != null ? KeyGenerator.getInstance(CryptUtils.CRYPT_ALG_AES,provider) : KeyGenerator.getInstance(CryptUtils.CRYPT_ALG_AES); |
517 | keygen.init(32); | |
517 | keygen.init(256); | |
518 | 518 | final SecretKey msgKey = keygen.generateKey(); |
519 | 519 | |
520 | 520 | final byte[][] ret = new byte[2][]; |
79 | 79 | } |
80 | 80 | catch (Exception e) |
81 | 81 | { |
82 | HBCIUtils.log("unable to apply rewriter " + this.getClass().getSimpleName() + " - leaving messag unchanged: " + e.getMessage(), HBCIUtils.LOG_INFO); | |
82 | HBCIUtils.log("unable to apply rewriter " + this.getClass().getSimpleName() + " - leaving message unchanged: " + e.getMessage(), HBCIUtils.LOG_INFO); | |
83 | 83 | HBCIUtils.log(e,HBCIUtils.LOG_DEBUG); |
84 | 84 | } |
85 | 85 | finally |
121 | 121 | } |
122 | 122 | catch (Exception e) |
123 | 123 | { |
124 | HBCIUtils.log("unable to apply rewriter " + this.getClass().getSimpleName() + " - leaving messag unchanged: " + e.getMessage(), HBCIUtils.LOG_INFO); | |
124 | HBCIUtils.log("unable to apply rewriter " + this.getClass().getSimpleName() + " - leaving message unchanged: " + e.getMessage(), HBCIUtils.LOG_INFO); | |
125 | 125 | HBCIUtils.log(e,HBCIUtils.LOG_DEBUG); |
126 | 126 | } |
127 | 127 | finally |
58 | 58 | byte[] rawData=readRecordBySFI(0x00, 0); |
59 | 59 | ret[0]=new DDVKeyData(); |
60 | 60 | ret[0].num=rawData[0]; |
61 | ret[0].version=rawData[4]; | |
61 | ret[0].version=(rawData[4] & 0xFF); | |
62 | 62 | ret[0].len=rawData[1]; |
63 | 63 | ret[0].alg=rawData[2]; |
64 | 64 | |
66 | 66 | rawData=readRecordBySFI(0x00, 0); |
67 | 67 | ret[1]=new DDVKeyData(); |
68 | 68 | ret[1].num=rawData[0]; |
69 | ret[1].version=rawData[3]; | |
69 | ret[1].version=(rawData[3] & 0xFF); | |
70 | 70 | ret[1].len=rawData[1]; |
71 | 71 | ret[1].alg=rawData[2]; |
72 | 72 |
56 | 56 | byte[] rawData=getKeyInfo(1); |
57 | 57 | ret[0]=new DDVKeyData(); |
58 | 58 | ret[0].num=2; |
59 | ret[0].version=rawData[rawData.length-1]; | |
59 | ret[0].version=(rawData[rawData.length-1] & 0xFF); | |
60 | 60 | ret[0].len=0; |
61 | 61 | ret[0].alg=0; |
62 | 62 | |
63 | 63 | rawData=getKeyInfo(2); |
64 | 64 | ret[1]=new DDVKeyData(); |
65 | 65 | ret[1].num=3; |
66 | ret[1].version=rawData[rawData.length-1]; | |
66 | ret[1].version=(rawData[rawData.length-1] & 0xFF); | |
67 | 67 | ret[1].len=0; |
68 | 68 | ret[1].alg=0; |
69 | 69 |
2533 | 2533 | 60069842=Darmsheimer Bank|Sindelfingen|GENODES1DHB|10|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300| |
2534 | 2534 | 66080052=Commerzbank vormals Dresdner Bank|Karlsruhe, Baden|DRESDEFF660|76|hbci.dresdner-bank.de|https://hbci.dresdner-bank.de|300|300| |
2535 | 2535 | 37040044=Commerzbank|Köln|COBADEFF370|13|hbci.commerzbank.de||300|| |
2536 | 30010444=IKB Privatkunden - IKB Deutsche Industriebank|Düsseldorf|IKBDDEDDDIR|09||||| | |
2536 | 30010444=IKB Privatkunden - IKB Deutsche Industriebank|Düsseldorf|IKBDDEDDDIR|09||https:// banking.ikb.de/eBankingFinTS/||300| | |
2537 | 2537 | 20010020=Postbank (Giro)|Hamburg|PBNKDEFF200|24||https://hbci.postbank.de/banking/hbci.do|220|300| |
2538 | 2538 | 49461323=Volksbank Enger-Spenge -alt-|Enger, Westf|GENODEM1ESP|34|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300| |
2539 | 2539 | 83064568=Geraer Bank|Gera|GENODEF1GEV|32|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300| |