Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sensitive to Scala implementation artefacts #48

Open
dwijnand opened this issue May 20, 2019 · 0 comments
Open

Sensitive to Scala implementation artefacts #48

dwijnand opened this issue May 20, 2019 · 0 comments
Labels

Comments

@dwijnand
Copy link
Contributor

With

object AlgorithmCheckerProps extends Scalaprops {

  private val mkLogger = NoopLogger.factory()

  private def checker(sigs: Seq[String], keys: Seq[String]) = {
    new AlgorithmChecker(mkLogger, sigs.map(s => parseAll(expression, s).get).toSet,
      keys.map(s => parseAll(expression, s).get).toSet)
  }

  val `pass a good key algorithm (RSA > 1024)` = Property.exception {
    Property.prop {
      val certificate: Certificate = CertificateGenerator.generateRSAWithSHA256(2048)
      checker(Nil, Seq("RSA keySize < 1024")).check(certificate, emptySet())
      true
    }
  }

}

Running scalapropsOnly com.typesafe.sslconfig.ssl.AlgorithmCheckerProps runs two properties instead of one:

com.typesafe.sslconfig.ssl.AlgorithmCheckerProps$
+- $anonfun$pass a good key algorithm (RSA > 1024)$1  Proven(1,0,LongSeed(1601297310331947)) 3ms
`- pass a good key algorithm (RSA > 1024)  Proven(1,0,LongSeed(1601297342674608)) 0ms
@xuwei-k xuwei-k transferred this issue from scalaprops/sbt-scalaprops Aug 16, 2019
@xuwei-k xuwei-k added the bug label Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants