/src/tpm2/ECC_Parameters.c
Line | Count | Source |
1 | | // This file was extracted from the TCG Published |
2 | | // Trusted Platform Module Library |
3 | | // Part 3: Commands |
4 | | // Family "2.0" |
5 | | // Level 00 Revision 01.16 |
6 | | // October 30, 2014 |
7 | | |
8 | | #include "InternalRoutines.h" |
9 | | #include "ECC_Parameters_fp.h" |
10 | | #ifdef TPM_ALG_ECC |
11 | | // |
12 | | // |
13 | | // Error Returns Meaning |
14 | | // |
15 | | // TPM_RC_VALUE Unsupported ECC curve ID |
16 | | // |
17 | | TPM_RC |
18 | | TPM2_ECC_Parameters( |
19 | | ECC_Parameters_In *in, // IN: input parameter list |
20 | | ECC_Parameters_Out *out // OUT: output parameter list |
21 | | ) |
22 | 0 | { |
23 | | // Command Output |
24 | | |
25 | | // Get ECC curve parameters |
26 | 0 | if(CryptEccGetParameters(in->curveID, &out->parameters)) |
27 | 0 | return TPM_RC_SUCCESS; |
28 | 0 | else |
29 | 0 | return TPM_RC_VALUE + RC_ECC_Parameters_curveID; |
30 | 0 | } |
31 | | #endif |