aboutsummaryrefslogtreecommitdiffstats
path: root/tests/tpm2dtests/ecc.scm
blob: 8b28cad234dc74fc58808c7ba38a9617cbf37eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env gpgscm

;; Copyright (C) 2021 [email protected]
;;
;; SPDX-License-Identifier: GPL-3.0-or-later
;;
(load (in-srcdir "tests" "tpm2dtests" "defs.scm"))

(setup-environment)
(setenv "PINENTRY_USER_DATA" "ecckey" #t)

;;
;; try checking signature and encryption on supported elliptic
;; curve keys.  Note this list must be allowable by the swtpm
;; used for the test, which is why it's so small
;;
(define key-list '("nistp256" "nistp384"))

(for-each
 (lambda (algo)
   (define name algo "<" algo "@example.com>")
   (test-tpm name algo))
 key-list)