mbedtls/tests
Gilles Peskine e783d34543 Private EC key format: change test data to raw private keys
In preparation for the import/export format change for private
elliptic curve keys from RFC 5915 to the raw secret value, transform the
test data to the new format.

Tests will not pass until the implementation has been changed to the
new format and some test cases and test functions have been adjusted.

I used the script below to look for lines containing a
PSA_KEY_TYPE_ECC_KEYPAIR and change the first hex string in the
line with an ASN.1 header that looks like the beginning of an RFC 5915
ECPrivateKey. This always happens to be a private key input.

perl -a -F: -i -pe 'sub pad { local ($_) = @_; s/^00// if length == $digits + 2; die if length > $digits; sprintf("\"%0${digits}s\"", $_) } if ($F[0] !~ /\W/ && /:PSA_KEY_TYPE_ECC_KEYPAIR\( *PSA_ECC_CURVE_[A-Z_]+([0-9]+)/) {$digits = int(($1+7)/8)*2; s/"30(?:[0-7].|81..|82....)02010104(..)([0-9a-f]+)"/pad(substr($2, 0, hex($1)*2))/ie}' tests/suites/test_suite_psa_crypto.data
2018-10-29 19:16:53 +01:00
..
.jenkins Add a Jenkinsfile for PR job testing 2018-10-19 16:41:54 +01:00
data_files Merge remote-tracking branch 'upstream-public/pr/1379' into development-proposed 2018-03-29 10:57:57 +01:00
git-scripts Add check-files.py to pre-push.sh 2018-05-21 11:41:18 +01:00
scripts check-files: exclude .git and third-party files 2018-10-02 19:01:16 +02:00
suites Private EC key format: change test data to raw private keys 2018-10-29 19:16:53 +01:00
.gitignore
CMakeLists.txt add psa_crypto to test suites 2018-09-05 12:41:49 +03:00
compat.sh Add ChachaPoly ciphersuites to compat.sh 2018-06-19 13:16:30 +02:00
Descriptions.txt
Makefile Add better handling when deleting files on Windows 2018-10-23 12:03:31 +01:00
ssl-opt.sh Merge remote-tracking branch 'public/pr/1988' into development 2018-08-30 00:57:28 +01:00