Skip to content

Commit

Permalink
Merge pull request #31 from agoravoting/next
Browse files Browse the repository at this point in the history
Next into master
  • Loading branch information
edulix authored Feb 27, 2020
2 parents 2def680 + 1f1a91f commit b56551a
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 73 deletions.
138 changes: 69 additions & 69 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
// This file is part of agora-verifier.
// Copyright (C) 2015-2016 Agora Voting SL <[email protected]>

// agora-verifier is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License.

// agora-verifier is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public License
// along with agora-verifier. If not, see <http://www.gnu.org/licenses/>.

name := "agora-verifier"

version := "17.04"

scalaVersion := "2.10.3"

mainClass := Some("org.agoravoting.agora.Verifier")

javaOptions in run += "-Djava.security.egd=file:/dev/./urandom"

fork in run := true

// libraryDependencies += "com.typesafe.play" %% "play-json" % "2.2.1"

// resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

proguardSettings

// https://github.com/sbt/sbt-proguard/issues/5

// ProguardKeys.proguardVersion in Proguard := "5.0"

ProguardKeys.options in Proguard ++= Seq("-dontnote", "-dontwarn", "-ignorewarnings", "-dontobfuscate")

// ProguardKeys.options in Proguard ++= Seq("-dontnote", "-dontwarn", "-ignorewarnings", "-dontobfuscate", "-dontoptimize")

ProguardKeys.options in Proguard += ProguardOptions.keepMain("org.agoravoting.agora.Verifier")

ProguardKeys.options in Proguard += ProguardOptions.keepMain("org.agoravoting.agora.Vmnc")

ProguardKeys.options in Proguard += "-keep class vfork.crypto.RandomDevice { *; }"

ProguardKeys.options in Proguard += "-keep class vfork.arithm.ModPGroup { *; }"

ProguardKeys.options in Proguard += "-keep class vfork.crypto.RandomDeviceGen { *; }"

ProguardKeys.options in Proguard += "-keep class * implements com.fasterxml.jackson.databind.cfg.ConfigFeature {*;}"

ProguardKeys.options in Proguard += "-keep class * implements com.fasterxml.jackson.databind.jsontype.TypeIdResolver {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinPool {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinWorkerThread {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinTask {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.LinkedTransferQueue {*;}"

ProguardKeys.inputFilter in Proguard := { file =>
file.name match {
case "vfork.jar" => Some("!**/safe_prime_table.txt")
case _ => Some("!META-INF/**")
}
}
// This file is part of agora-verifier.
// Copyright (C) 2015-2016 Agora Voting SL <[email protected]>

// agora-verifier is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License.

// agora-verifier is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.

// You should have received a copy of the GNU Lesser General Public License
// along with agora-verifier. If not, see <http://www.gnu.org/licenses/>.

name := "agora-verifier"

version := "20.2.0"

scalaVersion := "2.10.3"

mainClass := Some("org.agoravoting.agora.Verifier")

javaOptions in run += "-Djava.security.egd=file:/dev/./urandom"

fork in run := true

// libraryDependencies += "com.typesafe.play" %% "play-json" % "2.2.1"

// resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

proguardSettings

// https://github.com/sbt/sbt-proguard/issues/5

ProguardKeys.proguardVersion in Proguard := "5.0"

ProguardKeys.options in Proguard ++= Seq("-dontnote", "-dontwarn", "-ignorewarnings", "-dontobfuscate")

// ProguardKeys.options in Proguard ++= Seq("-dontnote", "-dontwarn", "-ignorewarnings", "-dontobfuscate", "-dontoptimize")

ProguardKeys.options in Proguard += ProguardOptions.keepMain("org.agoravoting.agora.Verifier")

ProguardKeys.options in Proguard += ProguardOptions.keepMain("org.agoravoting.agora.Vmnc")

ProguardKeys.options in Proguard += "-keep class vfork.crypto.RandomDevice { *; }"

ProguardKeys.options in Proguard += "-keep class vfork.arithm.ModPGroup { *; }"

ProguardKeys.options in Proguard += "-keep class vfork.crypto.RandomDeviceGen { *; }"

ProguardKeys.options in Proguard += "-keep class * implements com.fasterxml.jackson.databind.cfg.ConfigFeature {*;}"

ProguardKeys.options in Proguard += "-keep class * implements com.fasterxml.jackson.databind.jsontype.TypeIdResolver {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinPool {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinWorkerThread {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.ForkJoinTask {*;}"

ProguardKeys.options in Proguard += "-keep class scala.concurrent.forkjoin.LinkedTransferQueue {*;}"

ProguardKeys.inputFilter in Proguard := { file =>
file.name match {
case "vfork.jar" => Some("!**/safe_prime_table.txt")
case _ => Some("!META-INF/**")
}
}
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ rm -r -f dist
mkdir dist
cp -r agora_tally dist
cp -r agora_results dist
cp target/scala-2.10/proguard/agora-verifier_2.10-17.04.jar dist
cp target/scala-2.10/proguard/agora-verifier_2.10-20.2.0.jar dist
cp pverify.sh dist
cp vmnc.sh dist
cp verify.py dist
Expand Down
4 changes: 2 additions & 2 deletions pverify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ fi

command -v java >/dev/null 2>&1 || { echo >&2 "* I require java but it's not installed. Aborting."; exit 1; }

java -Djava.security.egd=file:/dev/./urandom -classpath agora-verifier_2.10-17.04.jar org.agoravoting.agora.Verifier $1 $2
exit $?
java -Djava.security.egd=file:/dev/./urandom -classpath agora-verifier_2.10-20.2.0.jar org.agoravoting.agora.Verifier $1 $2
exit $?
2 changes: 2 additions & 0 deletions verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ def sig_handler(signum, frame):
filter_names=["plurality-at-large",
"borda-nauru",
"desborda",
"desborda2",
"desborda3",
"borda",
"pairwise-beta"])

Expand Down
2 changes: 1 addition & 1 deletion vmnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ command -v java >/dev/null 2>&1 || { echo >&2 "* I require java but it's not ins

DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

java -Djava.security.egd=file:/dev/./urandom -classpath $DIR/agora-verifier_2.10-17.04.jar org.agoravoting.agora.Vmnc "$@"
java -Djava.security.egd=file:/dev/./urandom -classpath $DIR/agora-verifier_2.10-20.2.0.jar org.agoravoting.agora.Vmnc "$@"

0 comments on commit b56551a

Please sign in to comment.