]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
GNUTLS_TPMKEY_FMT_PEM renamed to GNUTLS_TPMKEY_FMT_CTK_PEM
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 Jul 2012 07:56:04 +0000 (09:56 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 22 Jul 2012 07:56:04 +0000 (09:56 +0200)
doc/invoke-tpmtool.texi
doc/manpages/tpmtool.1
lib/includes/gnutls/tpm.h
lib/tpm.c
src/tpmtool.c

index 9b1041b4c5a593cc41371bf3d736b2f5142fd761..3a30e4bd09e510f570fdee0134f5a8c4e0a8f10b 100644 (file)
@@ -7,7 +7,7 @@
 # 
 # DO NOT EDIT THIS FILE   (invoke-tpmtool.texi)
 # 
-# It has been AutoGen-ed  July 21, 2012 at 02:02:18 PM by AutoGen 5.16
+# It has been AutoGen-ed  July 21, 2012 at 10:14:33 PM by AutoGen 5.16
 # From the definitions    ../src/tpmtool-args.def
 # and the template file   agtexi-cmd.tpl
 @end ignore
@@ -72,6 +72,10 @@ USAGE:  tpmtool [ -<flag> [<val>] | --<name>[@{=| @}<val>] ]...
        --delete=str           Delete the key identified by the given URL (UUID).
        --sec-param=str        Specify the security level [low, legacy, normal, high, ultra].
        --bits=num             Specify the number of bits for key generate
+       --inder                Use the DER format for keys.
+                                - disabled as --no-inder
+       --outder               Use DER format for output keys
+                                - disabled as --no-outder
    -v, --version[=arg]        Output version information and exit
    -h, --help                 Display extended usage information and exit
    -!, --more-help            Extended usage information passed thru pager
@@ -146,6 +150,20 @@ This is the ``specify the security level [low, legacy, normal, high, ultra].'' o
 This option takes an argument string @file{Security parameter}.
 This is alternative to the bits option. Note however that the
 values allowed by the TPM chip are quantized and given values may be rounded up.
+@anchor{tpmtool inder}
+@subsubheading inder option
+@cindex tpmtool-inder
+
+This is the ``use the der format for keys.'' option.
+The input files will be assumed to be in the portable
+DER format of TPM. The default format is a custom format used by various
+TPM tools
+@anchor{tpmtool outder}
+@subsubheading outder option
+@cindex tpmtool-outder
+
+This is the ``use der format for output keys'' option.
+The output will be in the TPM portable DER format.
 @anchor{tpmtool exit status}
 @subsubheading tpmtool exit status
 
index 4d20fea49f7c88d7bf26a1bddfb1500910b01198..ba613e15897bf39eb51c1628ed60b324d2682c97 100644 (file)
@@ -2,7 +2,7 @@
 .\"
 .\"  DO NOT EDIT THIS FILE   (tpmtool-args.man)
 .\"  
-.\"  It has been AutoGen-ed  July 21, 2012 at 02:01:40 PM by AutoGen 5.16
+.\"  It has been AutoGen-ed  July 21, 2012 at 10:13:55 PM by AutoGen 5.16
 .\"  From the definitions    ../../src/tpmtool-args.def.tmp
 .\"  and the template file   agman-cmd.tpl
 .\"
@@ -110,6 +110,20 @@ Specify the number of bits for key generate.
 This option takes an integer number as its argument.
 .sp
 .TP
+.BR \-\-inder, " \fB\-\-no\-inder\fP"
+Use the DER format for keys..
+The \fIno\-inder\fP form will disable the option.
+.sp
+The input files will be assumed to be in the portable
+DER format of TPM. The default format is a custom format used by various
+TPM tools
+.TP
+.BR \-\-outder, " \fB\-\-no\-outder\fP"
+Use DER format for output keys.
+The \fIno\-outder\fP form will disable the option.
+.sp
+The output will be in the TPM portable DER format.
+.TP
 .BR \-h , " \-\-help"
 Display usage information and exit.
 .TP
index 386689b5df9d9f7c177aa01d1e2797f670f6358d..cea1c75bf148a45595d9c3f13dc81d3d478a5269 100644 (file)
@@ -41,14 +41,14 @@ typedef struct tpm_key_list_st *gnutls_tpm_key_list_t;
 /**
  * gnutls_tpmkey_fmt_t:
  * @GNUTLS_TPM_FMT_DER: The portable data format.
- * @GNUTLS_TPM_FMT_PEM: A custom data format used by some openssl tools.
+ * @GNUTLS_TPM_FMT_CTK_PEM: A custom data format used by some TPM tools.
  *
  * Enumeration of different certificate encoding formats.
  */
   typedef enum
   {
     GNUTLS_TPMKEY_FMT_DER = 0,
-    GNUTLS_TPMKEY_FMT_PEM = 1
+    GNUTLS_TPMKEY_FMT_CTK_PEM = 1
   } gnutls_tpmkey_fmt_t;
 
 int
index cc861ee92314e5e3f8d9880990df9b2f062a5afe..f0203b40e4491b72572dcab9aaed95a5fbc87964 100644 (file)
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -368,7 +368,7 @@ int ret, err;
 gnutls_datum_t asn1 = { NULL, 0 };
 size_t slen;
 
-  if (format == GNUTLS_TPMKEY_FMT_PEM)
+  if (format == GNUTLS_TPMKEY_FMT_CTK_PEM)
     {
       ret = gnutls_pem_base64_decode_alloc ("TSS KEY BLOB", fdata, &asn1);
       if (ret)
@@ -865,7 +865,7 @@ int ret;
           goto cleanup;
         }
 
-      ret = gnutls_privkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_PEM,
+      ret = gnutls_privkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_CTK_PEM,
                                                   srk_password, key_password, flags);
       if (ret == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
         ret = gnutls_privkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_DER,
@@ -1123,7 +1123,7 @@ int ret;
           goto cleanup;
         }
 
-      ret = gnutls_pubkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_PEM,
+      ret = gnutls_pubkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_CTK_PEM,
                                                        srk_password, flags);
       if (ret == GNUTLS_E_BASE64_UNEXPECTED_HEADER_ERROR)
         ret = gnutls_pubkey_import_tpm_raw (pkey, &fdata, GNUTLS_TPMKEY_FMT_DER,
@@ -1356,7 +1356,7 @@ uint8_t buf[32];
         }
 
       
-      if (format == GNUTLS_TPMKEY_FMT_PEM)
+      if (format == GNUTLS_TPMKEY_FMT_CTK_PEM)
         {
           ret = _gnutls_x509_encode_octet_string(tdata, tint, &tmpkey);
           if (ret < 0)
index 25cee8e4c5f2a7dbe6ac9eb4e92d6205db80e560..b363e17b29d99faaa55192b9d4b0b4bc060ad05b 100644 (file)
@@ -106,7 +106,7 @@ cmd_parser (int argc, char **argv)
   else
     {
       incert_format = GNUTLS_X509_FMT_PEM;
-      inkey_format = GNUTLS_TPMKEY_FMT_PEM;
+      inkey_format = GNUTLS_TPMKEY_FMT_CTK_PEM;
     }
 
   if (HAVE_OPT(OUTDER))
@@ -117,7 +117,7 @@ cmd_parser (int argc, char **argv)
   else
     {
       outcert_format = GNUTLS_X509_FMT_PEM;
-      outkey_format = GNUTLS_TPMKEY_FMT_PEM;
+      outkey_format = GNUTLS_TPMKEY_FMT_CTK_PEM;
     }
 
   if (HAVE_OPT(REGISTER))