From c90be520fed7284d16f2f94157c5c8ccfb5625e1 Mon Sep 17 00:00:00 2001 From: Vladimir ELazar Tokarev Date: Sat, 18 Jun 2016 15:13:04 +0300 Subject: [PATCH] connected the logic of add new voter to the DSP --- .../production/meerkat-common/logback.groovy | 46 +++++++++++++ .../test/meerkat-common/certs/.gitattributes | 1 + classes/test/meerkat-common/certs/README.md | 6 ++ .../user1-key-with-password-secret.p12 | Bin 0 -> 1301 bytes .../user1-key-with-password-secret.pem | 8 +++ .../certs/enduser-certs/user1-key.der | Bin 0 -> 118 bytes .../certs/enduser-certs/user1-key.pem | 5 ++ .../certs/enduser-certs/user1-pubkey.pem | 4 ++ .../certs/enduser-certs/user1.crt | 19 ++++++ .../certs/enduser-certs/user1.csr | 9 +++ .../certs/enduser-certs/user2-key.pem | 5 ++ .../certs/enduser-certs/user2-pubkey.pem | 4 ++ .../certs/enduser-certs/user2.crt | 19 ++++++ .../certs/enduser-certs/user2.csr | 9 +++ .../certs/enduser-certs/user2.der | Bin 0 -> 794 bytes .../user3-key-with-password-shh.p12 | Bin 0 -> 857 bytes .../certs/enduser-certs/user3.crt | 8 +++ .../certs/intermediate-ca-1/1000.pem | 19 ++++++ .../certs/intermediate-ca-1/1001.pem | 19 ++++++ .../certs/intermediate-ca-1/certindex | 2 + .../certs/intermediate-ca-1/certindex.attr | 1 + .../intermediate-ca-1/certindex.attr.old | 1 + .../certs/intermediate-ca-1/certindex.old | 1 + .../certs/intermediate-ca-1/certserial | 1 + .../certs/intermediate-ca-1/certserial.old | 1 + .../certs/intermediate-ca-1/crlnumber | 1 + .../intermediate-ca-1-private-key.pem | 5 ++ .../intermediate-ca-1/intermediate-ca-1.crt | 21 ++++++ .../intermediate-ca-1/intermediate-ca-1.csr | 10 +++ .../openssl-intermediate-ca.conf | 46 +++++++++++++ .../meerkat-common/certs/root-ca/1000.pem | 21 ++++++ .../meerkat-common/certs/root-ca/certindex | 1 + .../certs/root-ca/certindex.attr | 1 + .../certs/root-ca/certindex.old | 0 .../meerkat-common/certs/root-ca/certserial | 1 + .../certs/root-ca/certserial.old | 1 + .../meerkat-common/certs/root-ca/crlnumber | 1 + .../certs/root-ca/openssl-ca.conf | 61 +++++++++++++++++ ...ot-ca-private-key-with-password-secret.pem | 8 +++ .../certs/root-ca/root-ca-private-key.der | Bin 0 -> 118 bytes .../certs/root-ca/root-ca-private-key.pem | 5 ++ .../meerkat-common/certs/root-ca/root-ca.crt | 17 +++++ .../test/meerkat-common/certs/secp256k1.pem | 3 + .../certs/signed-messages/helloworld.txt | 1 + .../signed-messages/helloworld.txt.sha256sig | Bin 0 -> 72 bytes .../certs/signed-messages/random1.bin | Bin 0 -> 3801 bytes .../random1.bin.user1.sha256sig | Bin 0 -> 70 bytes .../random1.bin.user2.sha256sig | Bin 0 -> 71 bytes .../certs/signed-messages/random2.bin | Bin 0 -> 2931 bytes .../random2.bin.user1.sha256sig | Bin 0 -> 71 bytes .../random2.bin.user2.sha256sig | Bin 0 -> 71 bytes .../certs/signed-messages/random3.bin | Bin 0 -> 2384 bytes .../random3.bin.user1.sha256sig | Bin 0 -> 72 bytes .../random3.bin.user2.sha256sig | 1 + .../java/EventHandlerMapper.java | 5 +- .../search/SearchHandler.java | 62 +++++++++++++++--- .../VotersFetcher/DummyVotersFetcher.java | 16 +++++ .../search/VotersFetcher/VotersFetcher.java | 2 +- .../search/addVoter/fxml/add_voter.fxml | 6 +- .../addVoter/java/AddVoterController.java | 20 ++++++ .../search/addVoter/java/AddVoterLoader.java | 1 + .../java/StatusLogVisualUpdater.java | 6 +- 62 files changed, 493 insertions(+), 18 deletions(-) create mode 100644 classes/production/meerkat-common/logback.groovy create mode 100644 classes/test/meerkat-common/certs/.gitattributes create mode 100644 classes/test/meerkat-common/certs/README.md create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.p12 create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.pem create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1-key.der create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1-key.pem create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1-pubkey.pem create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1.crt create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user1.csr create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user2-key.pem create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user2-pubkey.pem create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user2.crt create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user2.csr create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user2.der create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user3-key-with-password-shh.p12 create mode 100644 classes/test/meerkat-common/certs/enduser-certs/user3.crt create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/1000.pem create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/1001.pem create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certindex create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr.old create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certindex.old create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certserial create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/certserial.old create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/crlnumber create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1-private-key.pem create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.crt create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.csr create mode 100644 classes/test/meerkat-common/certs/intermediate-ca-1/openssl-intermediate-ca.conf create mode 100644 classes/test/meerkat-common/certs/root-ca/1000.pem create mode 100644 classes/test/meerkat-common/certs/root-ca/certindex create mode 100644 classes/test/meerkat-common/certs/root-ca/certindex.attr create mode 100644 classes/test/meerkat-common/certs/root-ca/certindex.old create mode 100644 classes/test/meerkat-common/certs/root-ca/certserial create mode 100644 classes/test/meerkat-common/certs/root-ca/certserial.old create mode 100644 classes/test/meerkat-common/certs/root-ca/crlnumber create mode 100644 classes/test/meerkat-common/certs/root-ca/openssl-ca.conf create mode 100644 classes/test/meerkat-common/certs/root-ca/root-ca-private-key-with-password-secret.pem create mode 100644 classes/test/meerkat-common/certs/root-ca/root-ca-private-key.der create mode 100644 classes/test/meerkat-common/certs/root-ca/root-ca-private-key.pem create mode 100644 classes/test/meerkat-common/certs/root-ca/root-ca.crt create mode 100644 classes/test/meerkat-common/certs/secp256k1.pem create mode 100644 classes/test/meerkat-common/certs/signed-messages/helloworld.txt create mode 100644 classes/test/meerkat-common/certs/signed-messages/helloworld.txt.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random1.bin create mode 100644 classes/test/meerkat-common/certs/signed-messages/random1.bin.user1.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random1.bin.user2.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random2.bin create mode 100644 classes/test/meerkat-common/certs/signed-messages/random2.bin.user1.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random2.bin.user2.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random3.bin create mode 100644 classes/test/meerkat-common/certs/signed-messages/random3.bin.user1.sha256sig create mode 100644 classes/test/meerkat-common/certs/signed-messages/random3.bin.user2.sha256sig create mode 100644 voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java diff --git a/classes/production/meerkat-common/logback.groovy b/classes/production/meerkat-common/logback.groovy new file mode 100644 index 0000000..076b6c4 --- /dev/null +++ b/classes/production/meerkat-common/logback.groovy @@ -0,0 +1,46 @@ + + +import ch.qos.logback.classic.encoder.PatternLayoutEncoder +import ch.qos.logback.classic.filter.ThresholdFilter +import ch.qos.logback.core.ConsoleAppender +import ch.qos.logback.core.util.Duration +import static ch.qos.logback.classic.Level.* + +if (System.getProperty("log.debug") != null) { + println "Logback configuration debugging enabled" + + statusListener(OnConsoleStatusListener) +} + +def LOG_LEVEL = toLevel(System.getProperty("log.level"), INFO) + +def haveBeagle = System.getProperty("log.beagle") != null +def logOps = System.getProperty("log.ops") != null + +appender("CONSOLE", ConsoleAppender) { + + filter(ThresholdFilter) { + level = toLevel(System.getProperty("log.level"), TRACE) + } + + encoder(PatternLayoutEncoder) { + pattern = "%d{HH:mm:ss.SSS} [%thread %file:%line] %-5level %logger{0} - %msg%n" + } +} + +def appenders = [ "CONSOLE" ] + +if (haveBeagle) { + appender("SOCKET", SocketAppender) { + includeCallerData = true + remoteHost = "localhost" + port = 4321 + reconnectionDelay = new Duration(10000) + } + + appenders += ["SOCKET"] +} + +root(LOG_LEVEL, appenders) + + diff --git a/classes/test/meerkat-common/certs/.gitattributes b/classes/test/meerkat-common/certs/.gitattributes new file mode 100644 index 0000000..f8fcd2f --- /dev/null +++ b/classes/test/meerkat-common/certs/.gitattributes @@ -0,0 +1 @@ +signed-messages/* -text \ No newline at end of file diff --git a/classes/test/meerkat-common/certs/README.md b/classes/test/meerkat-common/certs/README.md new file mode 100644 index 0000000..f7283d9 --- /dev/null +++ b/classes/test/meerkat-common/certs/README.md @@ -0,0 +1,6 @@ +Certs and private keys for testing generated using OpenSSL + +.crt and .pem files are in PEM format +.der files are in binary DER format + +files that have a name of the form *-with-password-xxxx.pem are encrypted with the password xxxx diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.p12 b/classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.p12 new file mode 100644 index 0000000000000000000000000000000000000000..6281f9d5ae0e130fe5b1456eb0b5fe67d6a732df GIT binary patch literal 1301 zcmV+w1?u`Rf&~!*0Ru3C1lI-$Duzgg_YDCD0ic2e$OM7}#4v&cz%YUXzXk~^hDe6@ z4FLxRpn?OiFoFZD0s#Opf&--n2`Yw2hW8Bt2LUh~1_~;MNQUw(I~ zGNqQ80s;sCfPw>fJ8IJVIDMrkZhe|Dcn7wOpkFb&nQsnx({lQXdj=~1Z>P^E;doZ* zv^|Qre2mu}l0c6v|0~oKWBBOK8*=5Jild)#4v?aDwN``n6B$6xSk~u}+?&ax zlwts59AB{8;;#rbw487L(9Wre6xF`a^s8CwqgKVx4bAb}SMgr>!U?K}$rk<@6GHm3(d8`H%~l$ z;1RZ*6$nseSyB}}%ph@;F$_sgCf8fDieC2G`|s5F2G?|d&4xE%m|a`pQ1eb`ayqRy0+=Wu1s{Kz0UmC2>y=-5@#qQvR? z(DSz1619xxwYC;D$XyQ(2az?1>+T$V3lv9XV{qPjAoNzOJ#10@BF>&F8Mqtt& zJ5kY<;o$BdlPt^E7W0y({xi_nZ}P26iD8ZdeK`Pdk$CRy^IFHM|aG($JymNP+!NI=l^e^0imC%Fk-6@5uo-5Ty45{-izn znL6c#0n@os>1$X{dzRObEl0XzGK$R?^layAJO>?w!dYaa&&WU)q^_8+BEFpEelROk zHUG42!V-YfsNn)1;{V~Xh<}UvTzVJ-3O8k@nt-0FS{57m(HKpFZ`vOV?zwBtG0;!@7FoEVUf#U`XDuzgg_YDCI z3IPJ3fvhlrsW2P{3Mz(3hW8Bt3;_c$4g?6=j(pEfEK9Hg0tf&Efr!OXhx8-^4UkvZ zzzvrEI@yGPc4F;YV)mgGv-X0(P!`(!;HNE!VkNP_mMQw!%>b-Yt3-nZdiJg}rx-#E zgR@?`g_C^>a)-q5J~_h* zDyXPua$eO}E_qsiM^K1^TJ<2yqhB#4Fe3&DDuzgg_YDCF6)_eB6y$?U5+Bl2@(8Je zOt_{aDZ-v4r7$rtAutIB1uG5%0vZJX1QbJiOe+w{yU;)Per>RxI@lTl5>5mNlvBCc LE?!A(0s;sCJrq%4 literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.pem b/classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.pem new file mode 100644 index 0000000..e859995 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user1-key-with-password-secret.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,243D718A0D80C59590E582A26E87A49C + +RG6ITUTIdbJdWYX57oMn3tTCzHJSTjXAIZLjoVxy/v4UFYjluaFhGonIlbH1q2pP +ueu29Q3eT6144ypB8ARUJ1x0kRX1OL9zNHgdF9ulrCf9/nhGyC2nL+tHZ0YPbxoQ ++6yCQcRWvjUXLVzPEUnwMuHXJDpaXES8X0R4CISQKIA= +-----END EC PRIVATE KEY----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1-key.der b/classes/test/meerkat-common/certs/enduser-certs/user1-key.der new file mode 100644 index 0000000000000000000000000000000000000000..6f174060b7c8dce9c94288ad1ddd589e1860dfcd GIT binary patch literal 118 zcmV-+0Ez!FbOHeZ1R#6DY6^ynp_;nYq$G=#<{Fw@d;lbbaK<$ZKft;loJ`zLTr9Gq8k*iHs1RRG0UI+MH Yjhqd;0XqY=z{0-099f}V7;H05IqJ77b^rhX literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1-key.pem b/classes/test/meerkat-common/certs/enduser-certs/user1-key.pem new file mode 100644 index 0000000..6619e37 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user1-key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQge8JqCoaLoZq61aQki5Xm +GppcfAAkhHDGNQw/wLof5LmhRANCAAQJD1kW6BsNkRY9tslaugpOJOaoKX4uBz4S +Q96lPaPWkatNVgQchwNeB/hdjZwNuwE7A7XAwr69HFmhXRhsM005 +-----END PRIVATE KEY----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1-pubkey.pem b/classes/test/meerkat-common/certs/enduser-certs/user1-pubkey.pem new file mode 100644 index 0000000..1c0a0c1 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user1-pubkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugbDZEWPbbJWroKTiTmqCl+Lgc+ +EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+vRxZoV0YbDNNOQ== +-----END PUBLIC KEY----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1.crt b/classes/test/meerkat-common/certs/enduser-certs/user1.crt new file mode 100644 index 0000000..d80093f --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user1.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygAwIBAgICEAAwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr +YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl +MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN +ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MTM1NFoXDTI1MTEwODE2MTM1 +NFowbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDExEzARBgNVBAgMClNvbWUt +U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAECQ9ZFugb +DZEWPbbJWroKTiTmqCl+Lgc+EkPepT2j1pGrTVYEHIcDXgf4XY2cDbsBOwO1wMK+ +vRxZoV0YbDNNOaOCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFLamS8o2 +hFNd0vWy/irEBNWVNwFXMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp +MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg +N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp +YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp +LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr +BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC +A0gAMEUCIQD6QbhNNmB3AVVqhmXuiLA7WF6raShw6n0g/VloVGQebQIgEvxYclpO +MMynt5wH6X65rtn4Q1EGaDMvNbFweCDsldk= +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user1.csr b/classes/test/meerkat-common/certs/enduser-certs/user1.csr new file mode 100644 index 0000000..20e1efc --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user1.csr @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBOjCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx +ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMTBW +MBAGByqGSM49AgEGBSuBBAAKA0IABAkPWRboGw2RFj22yVq6Ck4k5qgpfi4HPhJD +3qU9o9aRq01WBByHA14H+F2NnA27ATsDtcDCvr0cWaFdGGwzTTmgADAKBggqhkjO +PQQDAgNIADBFAiEA8gmIhALr7O5M1QLReGH3jheildTIr1mDWl14WyMf9U4CIF23 +mInyo4VqNHLzxMLg5Cn3Oddokng3OXa63y4nTfv+ +-----END CERTIFICATE REQUEST----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user2-key.pem b/classes/test/meerkat-common/certs/enduser-certs/user2-key.pem new file mode 100644 index 0000000..2d31bb8 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user2-key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgYpBEO+XWm/n6VPeMVK76 +mrZkDTpiwLsDykG7M4fU5RKhRANCAAR71/kVGyA3hdxcLBBT3NPQF6R3LholmLRN +qhnvHqzJWuy7ev+Xbuxtt9AN0ajyeFDy8Oe1bUSidnLyQi+nXC0f +-----END PRIVATE KEY----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user2-pubkey.pem b/classes/test/meerkat-common/certs/enduser-certs/user2-pubkey.pem new file mode 100644 index 0000000..5d86d4c --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user2-pubkey.pem @@ -0,0 +1,4 @@ +-----BEGIN PUBLIC KEY----- +MFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsgN4XcXCwQU9zT0Bekdy4aJZi0 +TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1EonZy8kIvp1wtHw== +-----END PUBLIC KEY----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user2.crt b/classes/test/meerkat-common/certs/enduser-certs/user2.crt new file mode 100644 index 0000000..a211365 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user2.crt @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr +YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl +MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN +ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz +M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt +U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg +N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E +onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj +DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp +MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg +N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp +YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp +LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr +BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC +A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e +n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y= +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user2.csr b/classes/test/meerkat-common/certs/enduser-certs/user2.csr new file mode 100644 index 0000000..bb3c2d0 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user2.csr @@ -0,0 +1,9 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBOzCB4QIBADCBgTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx +ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMRowGAYDVQQDDBFQb2xsaW5nIFN0YXRpb24gMjBW +MBAGByqGSM49AgEGBSuBBAAKA0IABHvX+RUbIDeF3FwsEFPc09AXpHcuGiWYtE2q +Ge8erMla7Lt6/5du7G230A3RqPJ4UPLw57VtRKJ2cvJCL6dcLR+gADAKBggqhkjO +PQQDAgNJADBGAiEA6Ls/ojRaZT+u4YeOBYcPbRcJE3jSTe1Sm/lR7fDyEhMCIQCk +UOca+e2b8+CqM3CURBv6TqUMmZ3HeMRvEAxFPqOWSw== +-----END CERTIFICATE REQUEST----- diff --git a/classes/test/meerkat-common/certs/enduser-certs/user2.der b/classes/test/meerkat-common/certs/enduser-certs/user2.der new file mode 100644 index 0000000000000000000000000000000000000000..8e784093b249900ab82c852d5257c6e338711969 GIT binary patch literal 794 zcmXqLViq%KV%oESnTe5!iAjLbfQyYotIgw_EekV~L1UAlrhz&eb0`ZlkAiP%YEgD# zi9%R@NoHQUf@fYyYEf=#N@ik7s)Dnlf}x?XfgngJ2MWL72`${0w2gt>Wy(d-CGP0Tfr6X!KFH3R`OBLidO zC~;mRAlJYG$~DL{lroS2>1XB<49L&P0XYt2cV>Q`f)V+S5;qWqIEoL|Q3hcK0&MKy zAYx)(1!MycOjE+F?oy!-*mz3*Csm|EqyGruC+?tb7Z+2Jx zpPu(7cl!n2iz_}=1bq7Nd~2@DqOzh-PWsDZbmbQ}F`5}PF&Y{00Iii3W@P-&!eqc; zAPeI0v52vVESS6MnKDn}D~9U22cMXy^D5r-erF&Ll2&GsFc51H5#O}m-TLX1UpBXw z$@K@PC)Dn{u4%vxQozpwj7`=B;Lw*zzcxT{8MUmOPuMen0D;vJlra1G)LKtt)5WO?YOfTtCh5Qo_eN z7f%21Wo_Fu-WYSg`?pbUnR!jghRE*Bn`HbpF7CZ0i<0)FNrkHu>suu6XS0}sJu5WtIU3&GL*Kfrqj~+EHKAAtMTgmqFU!6>s zZsyx8&ODJTS`Iu2ln;Bi;)8af#_Z(Qy;J9$yL)ufwbe@|&AcznyGv=gyx)=M9!__h zx1_5bF8X_2xZRgG=9%u1G^cF`WaH)^QcS z%9iPAP-ourGtUiP{lB92+<_&6*W=Xl#GaH@UClG@uYGkc-C*BD_n#&*DJumY89Eq9 z!oA2TV#p)M#gNR9%232m!eD5ijF1vF6k`#&`R>#2rEbxE-Hr=n)&E6!l=%tmGSD?p xG~i@o)#hVnl450G5wUR6{-*U}YFqOeLl(cwPh$CYANt6`u|?0t*kS67=>Xf8Y@GlA literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/enduser-certs/user3.crt b/classes/test/meerkat-common/certs/enduser-certs/user3.crt new file mode 100644 index 0000000..23ee857 --- /dev/null +++ b/classes/test/meerkat-common/certs/enduser-certs/user3.crt @@ -0,0 +1,8 @@ +-----BEGIN CERTIFICATE----- +MIIBGjCBw6ADAgECAgEBMAkGByqGSM49BAEwEDEOMAwGA1UEAxMFY2VydDEwHhcN +MTUxMTI4MTEwNDAwWhcNMTYxMTI4MTEwNDAwWjAQMQ4wDAYDVQQDEwVjZXJ0MTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABLiyFMVWQtFi4fCjOGLDwQcdjyr48Y8j +P+eLEIGMYKKv8bqL3Vchs0iOPoyGH6jxYj2/ShnLSIEuIMPfVgV9kxSjDzANMAsG +A1UdDwQEAwIHgDAJBgcqhkjOPQQBA0cAMEQCIH7R0AWO0AYiHOs+QsHEpWiebFc1 +cyxCKJGkf8KA1KJrAiArCia7PWl0KzaqA0RQC4J0BKp4rZo1PCqKI8DirKQf/Q== +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/1000.pem b/classes/test/meerkat-common/certs/intermediate-ca-1/1000.pem new file mode 100644 index 0000000..d80093f --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/1000.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygA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E----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/1001.pem b/classes/test/meerkat-common/certs/intermediate-ca-1/1001.pem new file mode 100644 index 0000000..a211365 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/1001.pem @@ -0,0 +1,19 @@ +-----BEGIN CERTIFICATE----- +MIIDFjCCArygAwIBAgICEAEwCgYIKoZIzj0EAwIwgYIxKTAnBgNVBAMMIE1lZXJr +YXQgVm90aW5nIEludGVybWVkaWF0ZSBDQSAxMRMwEQYDVQQIDApTb21lLVN0YXRl +MQswCQYDVQQGEwJJTDEVMBMGA1UECgwMSURDIEhlcnpsaXlhMRwwGgYDVQQLDBNN +ZWVya2F0IFZvdGluZyBUZWFtMB4XDTE1MTExMTE2MjAzM1oXDTI1MTEwODE2MjAz +M1owbjEaMBgGA1UEAwwRUG9sbGluZyBTdGF0aW9uIDIxEzARBgNVBAgMClNvbWUt +U3RhdGUxCzAJBgNVBAYTAklMMRUwEwYDVQQKDAxJREMgSGVyemxpeWExFzAVBgNV +BAsMDk1lZXJrYXQgVm90aW5nMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEe9f5FRsg +N4XcXCwQU9zT0Bekdy4aJZi0TaoZ7x6syVrsu3r/l27sbbfQDdGo8nhQ8vDntW1E +onZy8kIvp1wtH6OCATYwggEyMAwGA1UdEwEB/wQCMAAwHQYDVR0OBBYEFKCdquYj +DGHqAHt+4PIDlw0h2UvuMB8GA1UdIwQYMBaAFBeyv0c75eT6PNumHo9TZ2B9vtcp +MAsGA1UdDwQEAwIFoDATBgNVHSUEDDAKBggrBgEFBQcDATBEBgNVHR8EPTA7MDmg +N6A1hjNodHRwOi8vY3JsLmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRp +YXRlMS5jcmwwegYIKwYBBQUHAQEEbjBsMEEGCCsGAQUFBzAChjVodHRwOi8vcGtp +LmZhY3RjZW50ZXIub3JnL21lZXJrYXQtaW50ZXJtZWRpYXRlLWNhLmNydDAnBggr +BgEFBQcwAYYbaHR0cDovL29jc3AuZmFjdGNlbnRlci5vcmcvMAoGCCqGSM49BAMC +A0gAMEUCIQDpo5B0vvEJSax3YzOMfE8l0pfDUIKLdBWJVGeq0VLtIgIgVr0+4/0e +n+R+l1OVOLh2GirloOgbv5Ch5BQ2pQNAG2Y= +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certindex b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex new file mode 100644 index 0000000..1cd80cf --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex @@ -0,0 +1,2 @@ +V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting +V 251108162033Z 1001 unknown /CN=Polling Station 2/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr new file mode 100644 index 0000000..3a7e39e --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr @@ -0,0 +1 @@ +unique_subject = no diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr.old b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr.old new file mode 100644 index 0000000..3a7e39e --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.attr.old @@ -0,0 +1 @@ +unique_subject = no diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.old b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.old new file mode 100644 index 0000000..7dcd55e --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certindex.old @@ -0,0 +1 @@ +V 251108161354Z 1000 unknown /CN=Polling Station 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certserial b/classes/test/meerkat-common/certs/intermediate-ca-1/certserial new file mode 100644 index 0000000..7d802a3 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certserial @@ -0,0 +1 @@ +1002 diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/certserial.old b/classes/test/meerkat-common/certs/intermediate-ca-1/certserial.old new file mode 100644 index 0000000..dd11724 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/certserial.old @@ -0,0 +1 @@ +1001 diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/crlnumber b/classes/test/meerkat-common/certs/intermediate-ca-1/crlnumber new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/crlnumber @@ -0,0 +1 @@ +1000 diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1-private-key.pem b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1-private-key.pem new file mode 100644 index 0000000..cf0a641 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1-private-key.pem @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGEAgEAMBAGByqGSM49AgEGBSuBBAAKBG0wawIBAQQgJvMhOfcQfdK/42QlBbri +IYXLM/gVHq/yppOykDqB3s6hRANCAAQoShAtCGW5c9pk/4/sKN1qjCgDKngqJpba +kku6cIDqXDr+aHsl+/KdSHd46OI3fEynl+/Pc85wRsaY6Z7b1PdS +-----END PRIVATE KEY----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.crt b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.crt new file mode 100644 index 0000000..751d8e7 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.crt @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw +EQYD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G8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA +skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8= +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.csr b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.csr new file mode 100644 index 0000000..fce3021 --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/intermediate-ca-1.csr @@ -0,0 +1,10 @@ +-----BEGIN CERTIFICATE REQUEST----- +MIIBTTCB9QIBADCBlTELMAkGA1UEBhMCSUwxEzARBgNVBAgMClNvbWUtU3RhdGUx +ETAPBgNVBAcMCEhlcnpsaXlhMRUwEwYDVQQKDAxJREMgSGVyemxpeWExHDAaBgNV +BAsME01lZXJrYXQgVm90aW5nIFRlYW0xKTAnBgNVBAMMIE1lZXJrYXQgVm90aW5n +IEludGVybWVkaWF0ZSBDQSAxMFYwEAYHKoZIzj0CAQYFK4EEAAoDQgAEKEoQLQhl +uXPaZP+P7CjdaowoAyp4KiaW2pJLunCA6lw6/mh7JfvynUh3eOjiN3xMp5fvz3PO +cEbGmOme29T3UqAAMAoGCCqGSM49BAMCA0cAMEQCIFlyJO5NFqnMUu5hOlQa872E +yy0V3zkqeN6Aly+LtEQqAiAfHwbi1lkJOZT2tOX8gfJzcac2jKmbgIhmITNq7uma +Wg== +-----END CERTIFICATE REQUEST----- diff --git a/classes/test/meerkat-common/certs/intermediate-ca-1/openssl-intermediate-ca.conf b/classes/test/meerkat-common/certs/intermediate-ca-1/openssl-intermediate-ca.conf new file mode 100644 index 0000000..090ca1a --- /dev/null +++ b/classes/test/meerkat-common/certs/intermediate-ca-1/openssl-intermediate-ca.conf @@ -0,0 +1,46 @@ +[ ca ] +default_ca = myca + +[ crl_ext ] +issuerAltName=issuer:copy +authorityKeyIdentifier=keyid:always + + [ myca ] + dir = ./ + new_certs_dir = $dir + unique_subject = no + certificate = $dir/intermediate-ca-1.crt + database = $dir/certindex + private_key = $dir/intermediate-ca-1-private-key.pem + serial = $dir/certserial + default_days = 3650 + default_md = sha256 + policy = myca_policy + x509_extensions = myca_extensions + crlnumber = $dir/crlnumber + default_crl_days = 3650 + + [ myca_policy ] + commonName = supplied + stateOrProvinceName = optional + countryName = optional + emailAddress = optional + organizationName = supplied + organizationalUnitName = optional + + [ myca_extensions ] + basicConstraints = critical,CA:FALSE + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + authorityInfoAccess = @ocsp_section + + [crl_section] + URI.0 = http://crl.factcenter.org/meerkat-intermediate1.crl + + [ocsp_section] + caIssuers;URI.0 = http://pki.factcenter.org/meerkat-intermediate-ca.crt + OCSP;URI.0 = http://ocsp.factcenter.org/ diff --git a/classes/test/meerkat-common/certs/root-ca/1000.pem b/classes/test/meerkat-common/certs/root-ca/1000.pem new file mode 100644 index 0000000..751d8e7 --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/1000.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDfDCCAyGgAwIBAgICEAAwCgYIKoZIzj0EAwIwgbAxCzAJBgNVBAYTAklMMRMw +EQYDVQQIDApTb21lLVN0YXRlMREwDwYDVQQHDAhIZXJ6bGl5YTEUMBIGA1UECgwL +SURDIEhlcmxpeWExHzAdBgNVBAsMFk1lZXJrYXQgVm90aW5nIFByb2plY3QxGDAW +BgNVBAMMD1Rlc3RpbmcgUm9vdCBDQTEoMCYGCSqGSIb3DQEJARYZdGVzdGluZy1j +YUBmYWN0Y2VudGVyLm9yZzAeFw0xNTExMTExNjA4MDJaFw0yNTExMDgxNjA4MDJa +MIGCMSkwJwYDVQQDDCBNZWVya2F0IFZvdGluZyBJbnRlcm1lZGlhdGUgQ0EgMTET +MBEGA1UECAwKU29tZS1TdGF0ZTELMAkGA1UEBhMCSUwxFTATBgNVBAoMDElEQyBI +ZXJ6bGl5YTEcMBoGA1UECwwTTWVlcmthdCBWb3RpbmcgVGVhbTBWMBAGByqGSM49 +AgEGBSuBBAAKA0IABChKEC0IZblz2mT/j+wo3WqMKAMqeComltqSS7pwgOpcOv5o +eyX78p1Id3jo4jd8TKeX789zznBGxpjpntvU91KjggFYMIIBVDAPBgNVHRMBAf8E +BTADAQH/MB0GA1UdDgQWBBQXsr9HO+Xk+jzbph6PU2dgfb7XKTAfBgNVHSMEGDAW +gBSJD9L1fLmX4A9CBoLsYXn3OPy1ojALBgNVHQ8EBAMCAaYwEwYDVR0lBAwwCgYI +KwYBBQUHAwEwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL2NybC5mYWN0Y2VudGVy +Lm9yZy9tZWVya2F0LXJvb3QtY2EuY3JsMCsGA1UdEQQkMCKCIE1lZXJrYXQgVm90 +aW5nIEludGVybWVkaWF0ZSBDQSAxMHIGCCsGAQUFBwEBBGYwZDA5BggrBgEFBQcw +AoYtaHR0cDovL3BraS5mYWN0Y2VudGVyLm9yZy9tZWVya2F0LXJvb3QtY2EuY3J0 +MCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5mYWN0Y2VudGVyLm9yZy8wCgYIKoZI +zj0EAwIDSQAwRgIhALEMHq2ssC9rLXiG8v6NcZetwwxdu3B3LW9s0KeGoNIEAiEA +skA56tMnhiZe38msyanRyRrAHyBI2fGs6GP3UBrg2P8= +-----END CERTIFICATE----- diff --git a/classes/test/meerkat-common/certs/root-ca/certindex b/classes/test/meerkat-common/certs/root-ca/certindex new file mode 100644 index 0000000..e4550ca --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/certindex @@ -0,0 +1 @@ +V 251108160802Z 1000 unknown /CN=Meerkat Voting Intermediate CA 1/ST=Some-State/C=IL/O=IDC Herzliya/OU=Meerkat Voting Team diff --git a/classes/test/meerkat-common/certs/root-ca/certindex.attr b/classes/test/meerkat-common/certs/root-ca/certindex.attr new file mode 100644 index 0000000..3a7e39e --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/certindex.attr @@ -0,0 +1 @@ +unique_subject = no diff --git a/classes/test/meerkat-common/certs/root-ca/certindex.old b/classes/test/meerkat-common/certs/root-ca/certindex.old new file mode 100644 index 0000000..e69de29 diff --git a/classes/test/meerkat-common/certs/root-ca/certserial b/classes/test/meerkat-common/certs/root-ca/certserial new file mode 100644 index 0000000..dd11724 --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/certserial @@ -0,0 +1 @@ +1001 diff --git a/classes/test/meerkat-common/certs/root-ca/certserial.old b/classes/test/meerkat-common/certs/root-ca/certserial.old new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/certserial.old @@ -0,0 +1 @@ +1000 diff --git a/classes/test/meerkat-common/certs/root-ca/crlnumber b/classes/test/meerkat-common/certs/root-ca/crlnumber new file mode 100644 index 0000000..83b33d2 --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/crlnumber @@ -0,0 +1 @@ +1000 diff --git a/classes/test/meerkat-common/certs/root-ca/openssl-ca.conf b/classes/test/meerkat-common/certs/root-ca/openssl-ca.conf new file mode 100644 index 0000000..39e8b00 --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/openssl-ca.conf @@ -0,0 +1,61 @@ +[ ca ] +default_ca = myca + +[ crl_ext ] +issuerAltName=issuer:copy +authorityKeyIdentifier=keyid:always + + [ myca ] + dir = ./ + new_certs_dir = $dir + unique_subject = no + certificate = $dir/root-ca.crt + database = $dir/certindex + private_key = $dir/root-ca-private-key.pem + serial = $dir/certserial + default_days = 3650 + default_md = sha256 + policy = myca_policy + x509_extensions = myca_extensions + crlnumber = $dir/crlnumber + default_crl_days = 3650 + + [ myca_policy ] + commonName = supplied + stateOrProvinceName = optional + countryName = optional + emailAddress = optional + organizationName = supplied + organizationalUnitName = optional + + [ myca_extensions ] + basicConstraints = critical,CA:TRUE + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + subjectAltName = @alt_names + authorityInfoAccess = @ocsp_section + + [ v3_ca ] + basicConstraints = critical,CA:TRUE,pathlen:0 + keyUsage = critical,any + subjectKeyIdentifier = hash + authorityKeyIdentifier = keyid:always,issuer + keyUsage = digitalSignature,keyEncipherment,cRLSign,keyCertSign + extendedKeyUsage = serverAuth + crlDistributionPoints = @crl_section + subjectAltName = @alt_names + authorityInfoAccess = @ocsp_section + + [alt_names] + DNS.0 = Meerkat Voting Intermediate CA 1 + + [crl_section] + URI.0 = http://crl.factcenter.org/meerkat-root-ca.crl + + [ocsp_section] + caIssuers;URI.0 = http://pki.factcenter.org/meerkat-root-ca.crt + OCSP;URI.0 = http://ocsp.factcenter.org/ diff --git a/classes/test/meerkat-common/certs/root-ca/root-ca-private-key-with-password-secret.pem b/classes/test/meerkat-common/certs/root-ca/root-ca-private-key-with-password-secret.pem new file mode 100644 index 0000000..a0c442d --- /dev/null +++ b/classes/test/meerkat-common/certs/root-ca/root-ca-private-key-with-password-secret.pem @@ -0,0 +1,8 @@ +-----BEGIN EC PRIVATE KEY----- +Proc-Type: 4,ENCRYPTED +DEK-Info: AES-256-CBC,B8CA131346FD6C9568A6C80935F2AF14 + +8q1seEln39/tQTo5KqN+qNRhd0fQ0oC71dYpfTHsP0NlNmjMtwKo2niFwzjxnSyP +vpJjGzUlnq30ucbeJA7CDm/1cmYAU5gGQ7gldgpi2TQVS+EBjqi/Y5P9AlrgLv6K +tKe4AvkqQcpi4ZvlUL9xmNaM9jEH4syopR9YClEMfa8= +-----END EC PRIVATE KEY----- diff --git a/classes/test/meerkat-common/certs/root-ca/root-ca-private-key.der b/classes/test/meerkat-common/certs/root-ca/root-ca-private-key.der new file mode 100644 index 0000000000000000000000000000000000000000..008e65b145cc90082a867adb12730229bdd2d1ea GIT binary patch literal 118 zcmV-+0Ez!FbOHeZ1Rz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UoIWZE^drsanj9N~*jd!z^jQCC#C zXg;**0<#`EpRYwc0~e<1Z3Ol=I9f^mVddX|)rjPs!{$_Yq6ZjLb)#=$a;%$O3rSW` zv%_!{C(DG)dgZH?+wtwDPV~#o@s;8ED|+kBAC{bd9b+BqiS!mQpPEM?$Vb*~v9dSS zy55WT*o~8e>@`@ap)Hsph0;f<4hsU$TOZG9WcCV3nAe-A8d3`$R>P(tXVidpuCVFa zz%d*Z?DEB$LL#m`bL>qkh94h632=4#Kfk8@d7SfXWW(4pHgB<+;^&;6Tvvj>^YW&s Pbs+3{=I)8{V+)iDYpsr< literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random1.bin.user1.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random1.bin.user1.sha256sig new file mode 100644 index 0000000000000000000000000000000000000000..33ba6a8b86c6b51f4f8fdd55796af1c7e5c1804d GIT binary patch literal 70 zcmV-M0J;A#L;@fO7Ji3rZdY!81*$gi)C04pBZsV{y4Aazd;+Db*` cY57ZH-t7%%&HM1b5P+gRq|KIpbh<+)_$IL+-~a#s literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random1.bin.user2.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random1.bin.user2.sha256sig new file mode 100644 index 0000000000000000000000000000000000000000..ca8ebf7f86a79d6dd16828dd9b8523b54eb908eb GIT binary patch literal 71 zcmV-N0J#4!MFJoL=9I+%f73F9FG=;$LP@&-sZDOKX7otwQCpYm_Jw5vApn+m@CWiM dy~{5ovdvDh*7WHR@x0Lt_k~krss{$PALW@~BB1~P literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random2.bin b/classes/test/meerkat-common/certs/signed-messages/random2.bin new file mode 100644 index 0000000000000000000000000000000000000000..91aae8210b47a2b4518cd86ba0ec8609a199ede0 GIT binary patch literal 2931 zcmV-(3ykzD6AbmqcMY+5^`lW=1TC)FT#r1UEjY8#&8*Y-omi$2U$AH+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#|vXO=RzYyeh8msyLC--U`BWQ5hVi6S76aSMBI}cDH^=13o>!8+VBTgi!wL(= zn{l8U)H>Wqt^-G5YoKq&$K(wgA8&q-5rmfbwse=3g&kZhxdRCgomY0b`$l+dZOP9? z{Lk3#yu*ZqOYyJ73Vm=mj8mgy^)~u5(5TyNKXCeO)MLvR39FgByj!$7%cKR4Q2$`{ z8gg*Y%oUF$9qJb6n>;SHPC80-&UJgA0hon{BmYN??^=yFEnx42d2824<8G4R80+I z2Oe_%P%t1b%vxhbGlbf;(@%lT3Ik+Rt|&{L6%r!gY$wXcwdITCIYW z;X1k$wdA$n@)>=GUafkZ5*rChd7`a*O%a62Ng#k5+GqX8O_~oD@>J^^Vlp$%;rlf# zW*!5wSbF|nA$$U_3UK*zKh9FQZcSZDKg5DbVzmE?9>^NRI8OegP+cM|bOmM@K?izn zq&(-oECuLu{SLnvg6?C|2&W9l$NmIGDf z*sSbIkEH9oTInbZ&7T>98MUF^z|v_v91qL@9USIuX>$whk@p2fysCRm`jKjWZ>Jus z1>oG$?L4F%ZaZ=Zk%HVeemBf>h$o;(G5;AEulu%u)w7B!pJEjDtr*CbX;~6Jw*~5{ z3j-~gyKN+ix^Lp7?{iqSf)dAD+XZ58H-WdK+heG#p5_F`IjlKpYh*H1c5ikjCS$@R3IB+56-t=V!` zO*x=cIvyK8->oEfj182ES+QylG{rknv08|WoajW*LaDqrXi<#thZF~mKdEvh)m=-I zI1U8QADC^2feirI3;<+J5QxXlY6%NPhCafqS`t{B_uhak=-q)iA*G%NO&~w>}h%rv3Vg}1Cs@Y&GJ@8f>&)+Ph2%kkPX)HJN7 z_`+K0NGaJSh|Ro3S!lu~tcD}znVwboSp<_RbG?Vx%3I6z_n#5&MrWN;DIWeLm{uPN(uj!y-BkqX)Imks~` literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random2.bin.user1.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random2.bin.user1.sha256sig new file mode 100644 index 0000000000000000000000000000000000000000..e1eac6e23685e6f4428160631c42f21f75f01cf4 GIT binary patch literal 71 zcmV-N0J#4!MFJpHRoWlM(iMmb{^5v%jm@+^Oaarz?sZ3>*iTQB7*<` literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random2.bin.user2.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random2.bin.user2.sha256sig new file mode 100644 index 0000000000000000000000000000000000000000..973b3b02ef08b4d5149f07e43962df4a258963a3 GIT binary patch literal 71 zcmV-N0J#4!MFJrJg50Ze+S6h#9E`W9bSF5LaVB>1mflxg;>a}@LiHbt0w6dMZ???4 d2IBTk+Kr%Liti|0N0jq~ksMy!X{U+a5PE!#A)x>O literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random3.bin b/classes/test/meerkat-common/certs/signed-messages/random3.bin new file mode 100644 index 0000000000000000000000000000000000000000..a0afb9522bb18522818c8189ee58c4e2ff4b4036 GIT binary patch literal 2384 zcmV-W39t5E>z)d_ONDld+n!{^mLZ+JpAx3XBB#eH;j1g??F)V7R`6%7h<4Md1P|=D zs%Hq}kk)KT?)6@};aJl3L8Z{m8EgOd3MfvM29`LN8R`*ftD9tt*WD3!K<_sN{?kHN zv8_#G!*f|KUw7;k-m!j4<#bFWu~zMU?yFw(humMoa#<01z>P+Fg>BoE)iCGfimnt* z`YW`(JJUR~)-Oj7(y4zp59TC@U+8%V(2V|6Svh>g5aQS;KLT|{!)XP=#sMo{U0E1z zm^*IQOMn*T_17dSGq}@7aL!I=|5p9vhzZv@d97+5{`qK%2jOu2=Z$C^bIQB5L=ab5 zto)ybf|xpDGSQGRb%h|Ha9PDW-~5YjU^I*I-^lND0FW08N@E)8!3bq@nb)Zx|IuDv zl~RNhJLiu%AOs{becbQTexRpo#)%F`{!krKByJfzi2GG25V}>L>xDtDuo3xScPlo$ zM~_VT4Ke8c=f#KCaW7`j?rB)U!Slju55eAw3yGdPxVE2tdFSr-?*&q$m&>j67&b}b z1zq`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zUq*@(5xNiO2?TOAZmy0i@^6kwyiKMoVnaAP+ta7ZBgC) zHYIWU*Yk|<1eLhHI8Np*)YiGGv%H z7NQiL!FVsqrws~jz>-$0YVprV>Mxg%0Tw>O>ANjqzHbwjqqc4h7uBAOcbuqZ6T*Sp z$VXqfV5~_XuE|`bzZ#(%4t{iTzlzHxnSw20NqZ>kG$x?RN3Kp@V5>YiTu25%?lNx* zK5o+?oR$>PN@NLi{cpvecxF1sUB0^ED_DQ>O0chmFx3k`jPdeWqbG7iUzMzAhB8vt z$}6|O3Y=@Avqz(SaM(h0Kv zll~VLK29l1HBVAefe5PzW2mi&WHI0;-*z!mq2d8&gm_Lyn&{3k8_Rpt8YugpLDL#E zW^vzx+PTABRS?7=uZp$1olxq+~34v6~B*7A{<0)>AhkF%_6y1nL4y^qO^7m(ahfRK@O3|YXWe-{4eKi z*t?zT6#z$*nVW;glT=ZIaIN05oPRKS{nJ73Rm!*nak3V+^_j%>UCF$|;b-fftt9G=%PN92l*U#$^`bME*Jud>#cF&VoC}6^gZWhU8yA&boCgmQb^zKh zYbI&UD3ffZ)#LwzfK06yqfhXKlFaifWv%Oo5iwNxoSq&$UWi~WH8DG z1!smABuRSZrAnXPKDM$Q;V^(IFliv3%g?@oy}uwUH2bNbJ*=0zSV|2K){;NdRY zDAo4>qQxYUq_MMN+vfQj^w27aQ8`8lz&xv==_J)Vriu|Nkf{3eH(fvHWga+$nIJL? z)0ny?p=k5;eeYN^mO1k9>CAs+uvx=u4)y&jG;Ki~`dn%^GTf4k!J7zjLA%iy{ox8g CxxRn^ literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random3.bin.user1.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random3.bin.user1.sha256sig new file mode 100644 index 0000000000000000000000000000000000000000..7c87d33e14f7ffc19866934f2bb3401792f8ab1e GIT binary patch literal 72 zcmXqTV^U=3J=bNu*>GaTzdI%|^4l~*HZND5WG~^};&^gr=7Ov%Uw}#uDkWJs>Q*l; c@BFedorU{j_aO!MdAd#EoRvO`f+nk?06$3`SpWb4 literal 0 HcmV?d00001 diff --git a/classes/test/meerkat-common/certs/signed-messages/random3.bin.user2.sha256sig b/classes/test/meerkat-common/certs/signed-messages/random3.bin.user2.sha256sig new file mode 100644 index 0000000..d6d3656 --- /dev/null +++ b/classes/test/meerkat-common/certs/signed-messages/random3.bin.user2.sha256sig @@ -0,0 +1 @@ +0D r=¥|n“Ò2ɪ‰!S»®[gCŸ$ä°Ž/ Ê”(Âò½ ^esüHLŸ½o,oV®”§ce²p0(èXÆ]&@ \ No newline at end of file diff --git a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java b/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java index dc0ea24..bd2022c 100644 --- a/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java +++ b/voting-station-gui/src/polling_station_dashboard/java/EventHandlerMapper.java @@ -2,6 +2,7 @@ package polling_station_dashboard.java; import javafx.stage.Stage; import polling_station_dashboard.search.SearchHandler; +import polling_station_dashboard.search.VotersFetcher.DummyVotersFetcher; import polling_station_dashboard.search.addVoter.java.AddVoterLoader; import polling_station_dashboard.settings.java.SettingsVisualUpdater; import polling_station_dashboard.settings.java.settingsLoader; @@ -35,10 +36,10 @@ public class EventHandlerMapper { StatusLogVisualUpdater statusLogVisualUpdater = new StatusLogVisualUpdater(statusLogLoader.GetStatusLogInstance(), primaryStage); map.Add("StatusLogButton", statusLogVisualUpdater); - map.Add("StatusLog", statusLogVisualUpdater); + map.Add("statusLog", statusLogVisualUpdater); // map add voter to search button triggered - SearchHandler searchHandler = new SearchHandler(primaryStage); + SearchHandler searchHandler = new SearchHandler(primaryStage, new DummyVotersFetcher()); map.Add("SearchButton", searchHandler); return map; } diff --git a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java index 68e847d..ed9f4da 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java +++ b/voting-station-gui/src/polling_station_dashboard/search/SearchHandler.java @@ -2,11 +2,15 @@ package polling_station_dashboard.search; import javafx.event.Event; import javafx.event.EventHandler; +import javafx.scene.layout.GridPane; +import javafx.scene.layout.Pane; import javafx.stage.Stage; import polling_station_dashboard.search.VotersFetcher.VotersFetcher; import polling_station_dashboard.search.addVoter.java.AddVoterLoader; +import javafx.scene.control.Button; import java.io.IOException; +import java.util.ArrayList; import java.util.List; /** @@ -14,25 +18,65 @@ import java.util.List; * SearchHandler trying to fetch wanted users by given strings (VotersFetcher) and then * Starts the eddit/add panel based on what the VotersFetcher Have fetched. */ -public class SearchHandler implements EventHandler, VotersFetcher { +public class SearchHandler implements EventHandler { private Stage currentStage; - - public SearchHandler(Stage primaryStage){ + private VotersFetcher votersFetcher; + private Button AddVoterButton; + public SearchHandler(Stage primaryStage, VotersFetcher votersFetcher) + { this.currentStage = primaryStage; + this.votersFetcher = votersFetcher; + } + + private List GetFilters() + { + return new ArrayList<>(); + } + + private void AddVoterPanel() throws IOException + { + ((Pane)currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(this.AddVoterButton); + new AddVoterLoader(currentStage); + } + + private void AddVoterAddButton() throws IOException { + this.AddVoterButton = new Button("Add New Voter"); + this.AddVoterButton.setOnAction(e -> { + try { + AddVoterPanel(); + } catch (IOException e1) { + e1.printStackTrace(); + } + }); + ((Pane)currentStage.getScene().lookup("#AddEditPane")).getChildren().add(AddVoterButton); + } + + private void VotersCheck() throws IOException { + List filters = GetFilters(); + + List voters = votersFetcher.FetchVoters(filters); + + if (voters.isEmpty()) + { + AddVoterAddButton(); + } + else if(1==1) + { + // founded the voter but he cant vote + } + else + { + // founded the voter and he can vote + } } @Override public void handle(Event event) { try { - AddVoterLoader addVoterLoader = new AddVoterLoader(currentStage); + VotersCheck(); } catch (IOException e) { e.printStackTrace(); } } - - @Override - public Object FetchVoters(List filters) { - return null; - } } diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java new file mode 100644 index 0000000..a699401 --- /dev/null +++ b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/DummyVotersFetcher.java @@ -0,0 +1,16 @@ +package polling_station_dashboard.search.VotersFetcher; + +import java.util.ArrayList; +import java.util.List; + +/** + * Created by Vladimir Eliezer Tokarev on 18/06/2016. + * This object used for receiving empty list of object for the logic of add voter could be tested + */ +public class DummyVotersFetcher implements VotersFetcher { + + @Override + public List FetchVoters(List filters) { + return new ArrayList<>(); + } +} diff --git a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java index 94723ae..9dd609d 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java +++ b/voting-station-gui/src/polling_station_dashboard/search/VotersFetcher/VotersFetcher.java @@ -8,5 +8,5 @@ import java.util.List; */ public interface VotersFetcher { - Object FetchVoters(List filters); + List FetchVoters(List filters); } diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml b/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml index 504918c..5f5b9da 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml +++ b/voting-station-gui/src/polling_station_dashboard/search/addVoter/fxml/add_voter.fxml @@ -7,8 +7,8 @@ - - + + @@ -152,7 +152,7 @@
-
diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java index b7e16cd..cdefa88 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java +++ b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterController.java @@ -1,7 +1,27 @@ package polling_station_dashboard.search.addVoter.java; +import javafx.fxml.FXML; +import javafx.scene.layout.Pane; +import javafx.stage.Stage; + /** * Created by Vladimir Eliezer Tokarev on 11/06/2016. + * This object controls the add voter panel behavior */ public class AddVoterController { + + private Stage currentStage; + + public void SetStage(Stage primaryStage) + { + this.currentStage = primaryStage; + } + + @FXML + private void RemoveAddVoterPanel() + { + // when this button pressed (the cancel button) only the add voter panel is in list of children of AddEditPane + // this why removing the element at index 0 will remove this panel + ((Pane)this.currentStage.getScene().lookup("#AddEditPane")).getChildren().remove(0); + } } diff --git a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java index 170ef66..73e106e 100644 --- a/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java +++ b/voting-station-gui/src/polling_station_dashboard/search/addVoter/java/AddVoterLoader.java @@ -26,5 +26,6 @@ public class AddVoterLoader { Pane addEditPane = (Pane)currentStage.getScene().lookup("#AddEditPane"); addEditPane.getChildren().add(root); + controller.SetStage(primaryStage); } } diff --git a/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java b/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java index 60f3321..41a9e6c 100644 --- a/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java +++ b/voting-station-gui/src/polling_station_dashboard/statusLog/java/StatusLogVisualUpdater.java @@ -45,18 +45,18 @@ public class StatusLogVisualUpdater implements EventHandler { } private void addStatusLog() { - Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog"); + Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog"); statusLog.getChildren().add(this.statusLog); } private void removeStatusLog(){ - Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog"); + Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog"); statusLog.getChildren().remove(this.statusLog); } private void SetStatusLogSize(int expansionWidth) { currentStage.setWidth(currentStage.getWidth() + expansionWidth); - Pane statusLog = (Pane) currentStage.getScene().lookup("#StatusLog"); + Pane statusLog = (Pane) currentStage.getScene().lookup("#statusLog"); statusLog.setPrefWidth(expansionWidth); }