mbedtls/tests
Jethro Beekman d2df936e67 Fix parsing of PKCS#8 encoded Elliptic Curve keys.
The relevant ASN.1 definitions for a PKCS#8 encoded Elliptic Curve key are:

PrivateKeyInfo ::= SEQUENCE {
  version                   Version,
  privateKeyAlgorithm       PrivateKeyAlgorithmIdentifier,
  privateKey                PrivateKey,
  attributes           [0]  IMPLICIT Attributes OPTIONAL
}

AlgorithmIdentifier  ::=  SEQUENCE  {
  algorithm   OBJECT IDENTIFIER,
  parameters  ANY DEFINED BY algorithm OPTIONAL
}

ECParameters ::= CHOICE {
  namedCurve         OBJECT IDENTIFIER
  -- implicitCurve   NULL
  -- specifiedCurve  SpecifiedECDomain
}

ECPrivateKey ::= SEQUENCE {
  version        INTEGER { ecPrivkeyVer1(1) } (ecPrivkeyVer1),
  privateKey     OCTET STRING,
  parameters [0] ECParameters {{ NamedCurve }} OPTIONAL,
  publicKey  [1] BIT STRING OPTIONAL
}

Because of the two optional fields, there are 4 possible variants that need to
be parsed: no optional fields, only parameters, only public key, and both
optional fields. Previously mbedTLS was unable to parse keys with "only
parameters". Also, only "only public key" was tested. There was a test for "no
optional fields", but it was labelled incorrectly as SEC.1 and not run because
of a great renaming mixup.
2018-03-22 18:01:18 -07:00
..
data_files Fix parsing of PKCS#8 encoded Elliptic Curve keys. 2018-03-22 18:01:18 -07:00
git-scripts Move the git scripts to correct path 2017-07-27 21:44:34 +01:00
scripts Merge remote-tracking branch 'upstream-restricted/pr/351' into development-restricted-proposed 2018-03-13 17:15:34 +01:00
suites Fix parsing of PKCS#8 encoded Elliptic Curve keys. 2018-03-22 18:01:18 -07:00
.gitignore Move some ignore patterns to subdirectories 2015-01-28 15:33:23 +00:00
CMakeLists.txt Support verbose output of the test suites 2017-06-25 11:24:18 +03:00
compat.sh wait_server_start: warn if lsof is not available 2018-01-22 10:29:24 +01:00
Descriptions.txt Add selftest program to the list of tests 2014-04-04 16:33:01 +02:00
Makefile Clean up of formatting, and potential integer overflow fix 2016-10-13 13:51:13 +01:00
ssl-opt.sh Merge branch 'prr_424' into development-proposed 2018-02-22 16:15:01 +01:00