summaryrefslogtreecommitdiffstats
path: root/meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch')
-rw-r--r--meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch24
1 files changed, 12 insertions, 12 deletions
diff --git a/meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch b/meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch
index 67071b6..bed8b92 100644
--- a/meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch
+++ b/meta-tpm/recipes-tpm/openssl-tpm-engine/files/0001-create-tpm-key-support-well-known-key-option.patch
@@ -8,20 +8,20 @@ Add "-z" option to select well known password in create_tpm_key tool.
8 8
9Signed-off-by: Junxian.Xiao <Junxian.Xiao@windriver.com> 9Signed-off-by: Junxian.Xiao <Junxian.Xiao@windriver.com>
10 10
11diff --git a/create_tpm_key.c b/create_tpm_key.c 11Index: git/src/create_tpm_key.c
12index fee917f..7b94d62 100644 12===================================================================
13--- a/create_tpm_key.c 13--- git.orig/src/create_tpm_key.c
14+++ b/create_tpm_key.c 14+++ git/src/create_tpm_key.c
15@@ -46,6 +46,8 @@ 15@@ -48,6 +48,8 @@
16 #include <trousers/tss.h> 16
17 #include <trousers/trousers.h> 17 #include "ssl_compat.h"
18 18
19+#define TPM_WELL_KNOWN_KEY_LEN 20 /*well know key length is 20 bytes zero*/ 19+#define TPM_WELL_KNOWN_KEY_LEN 20 /*well know key length is 20 bytes zero*/
20+ 20+
21 #define print_error(a,b) \ 21 #define print_error(a,b) \
22 fprintf(stderr, "%s:%d %s result: 0x%x (%s)\n", __FILE__, __LINE__, \ 22 fprintf(stderr, "%s:%d %s result: 0x%x (%s)\n", __FILE__, __LINE__, \
23 a, b, Trspi_Error_String(b)) 23 a, b, Trspi_Error_String(b))
24@@ -70,6 +72,7 @@ usage(char *argv0) 24@@ -72,6 +74,7 @@ usage(char *argv0)
25 "\t\t-e|--enc-scheme encryption scheme to use [PKCSV15] or OAEP\n" 25 "\t\t-e|--enc-scheme encryption scheme to use [PKCSV15] or OAEP\n"
26 "\t\t-q|--sig-scheme signature scheme to use [DER] or SHA1\n" 26 "\t\t-q|--sig-scheme signature scheme to use [DER] or SHA1\n"
27 "\t\t-s|--key-size key size in bits [2048]\n" 27 "\t\t-s|--key-size key size in bits [2048]\n"
@@ -29,7 +29,7 @@ index fee917f..7b94d62 100644
29 "\t\t-a|--auth require a password for the key [NO]\n" 29 "\t\t-a|--auth require a password for the key [NO]\n"
30 "\t\t-p|--popup use TSS GUI popup dialogs to get the password " 30 "\t\t-p|--popup use TSS GUI popup dialogs to get the password "
31 "for the\n\t\t\t\t key [NO] (implies --auth)\n" 31 "for the\n\t\t\t\t key [NO] (implies --auth)\n"
32@@ -147,6 +150,7 @@ int main(int argc, char **argv) 32@@ -154,6 +157,7 @@ int main(int argc, char **argv)
33 int asn1_len; 33 int asn1_len;
34 char *filename, c, *openssl_key = NULL; 34 char *filename, c, *openssl_key = NULL;
35 int option_index, auth = 0, popup = 0, wrap = 0; 35 int option_index, auth = 0, popup = 0, wrap = 0;
@@ -37,7 +37,7 @@ index fee917f..7b94d62 100644
37 UINT32 enc_scheme = TSS_ES_RSAESPKCSV15; 37 UINT32 enc_scheme = TSS_ES_RSAESPKCSV15;
38 UINT32 sig_scheme = TSS_SS_RSASSAPKCS1V15_DER; 38 UINT32 sig_scheme = TSS_SS_RSASSAPKCS1V15_DER;
39 UINT32 key_size = 2048; 39 UINT32 key_size = 2048;
40@@ -154,12 +158,15 @@ int main(int argc, char **argv) 40@@ -161,12 +165,15 @@ int main(int argc, char **argv)
41 41
42 while (1) { 42 while (1) {
43 option_index = 0; 43 option_index = 0;
@@ -54,7 +54,7 @@ index fee917f..7b94d62 100644
54 case 'a': 54 case 'a':
55 initFlags |= TSS_KEY_AUTHORIZATION; 55 initFlags |= TSS_KEY_AUTHORIZATION;
56 auth = 1; 56 auth = 1;
57@@ -293,6 +300,8 @@ int main(int argc, char **argv) 57@@ -300,6 +307,8 @@ int main(int argc, char **argv)
58 58
59 if (srk_authusage) { 59 if (srk_authusage) {
60 char *authdata = calloc(1, 128); 60 char *authdata = calloc(1, 128);
@@ -63,7 +63,7 @@ index fee917f..7b94d62 100644
63 63
64 if (!authdata) { 64 if (!authdata) {
65 fprintf(stderr, "malloc failed.\n"); 65 fprintf(stderr, "malloc failed.\n");
66@@ -309,17 +318,26 @@ int main(int argc, char **argv) 66@@ -316,17 +325,26 @@ int main(int argc, char **argv)
67 exit(result); 67 exit(result);
68 } 68 }
69 69