Skip to content

Commit

Permalink
man: port createprimary to markdown
Browse files Browse the repository at this point in the history
Signed-off-by: William Roberts <william.c.roberts@intel.com>
  • Loading branch information
William Roberts committed Sep 13, 2017
1 parent 5d78dd7 commit e983b21
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 85 deletions.
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ endif
EXTRA_DIST = $(top_srcdir)/man

man8_MANS = \
man/man8/tpm2_createprimary.8 \
man/man8/tpm2_dump_capability.8 \
man/man8/tpm2_send_command.8 \
man/man8/tpm2_startup.8 \
Expand Down Expand Up @@ -275,6 +274,7 @@ if HAVE_MD2MAN_ROFF
man/man8/tpm2_certify.8 \
man/man8/tpm2_create.8 \
man/man8/tpm2_createpolicy.8 \
man/man8/tpm2_createprimary.8 \
man/man8/tpm2_pcrevent.8
endif

Expand Down Expand Up @@ -332,6 +332,8 @@ man/man8/%.8 : man/%.8.md $(MARKDOWN_COMMON_DEPS)
-e '/\[supported hash algorithms\]/d' \
-e '/\[algorithm specifiers\]/r man/common/alg.md' \
-e '/\[algorithm specifiers\]/d' \
-e '/\[supported public object algorithms\]/r man/common/object-alg.md' \
-e '/\[supported public object algorithms\]/d' \
< $< | md2man-roff > $@

CLEANFILES = $(man8_MANS)
11 changes: 11 additions & 0 deletions man/common/object-alg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Supported Public Object Algorithms
----------------------------------

Supported public object algorithms are:

* `0x1` or `rsa` for `TPM_ALG_RSA` (**default**).
* `0x8` or `keyedhash` for `TPM_ALG_KEYEDHASH`.
* `0x23` or `ecc` for `TPM_ALG_ECC`.
* `0x25` or `symcipher` for `TPM_ALG_SYMCIPHER`.

**NOTE**: Your TPM may not support all algorithms.
84 changes: 0 additions & 84 deletions man/tpm2_createprimary.8.in

This file was deleted.

98 changes: 98 additions & 0 deletions man/tpm2_createprimary.8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
tpm2_createprimary 8 "SEPTEMBER 2017" Linux "User Manuals"
==================================================

NAME
----

tpm2_createprimary(8) - Create a primary key under a primary seed or a temporary
primary key under the `TPM_RH_NULL` hierarchy.

SYNOPSIS
--------

`tpm2_createprimary` [OPTIONS]

DESCRIPTION
-----------

tpm2_createprimary(8) - This command is used to create a Primary Object under
one of the Primary Seeds or a Temporary Object under `TPM_RH_NULL`. The command
uses a `TPM2B_PUBLIC` as a template for the object to be created. The command
will create and load a Primary Object. The sensitive area is not returned.

OPTIONS
-------

* `-A`, `--auth`=_HIERARCHY_:
File to save the policy digest.
Specify the hierarchy under which the object is created. This will also dictate which authorization secret (if any) must be supplied.
Supported options are:
* `o` for `TPM_RH_OWNER`
* `p` for `TPM_RH_PLATFORM`
* `e` for `TPM_RH_ENDORSEMENT`
* `n` for `TPM_RH_NULL`

* `-P`, `--pwdp`=_PARENT\_KEY\_PASSWORD_:
Optional authorization string if authorization is required to create object under the specified hierarchy.
Passwords should follow the "password formatting standards, see section "Password Formatting".

* `-K`, `--pwdk`=_KEY\_PASSWORD_:
Optional authorization string for the newly created object. Follows the same password formating guidelines
as the parent authorization string under the -P option.

* `-g`, `--halg`=_ALGORITHM_:
The hash algorithm to use. Algorithms should follow the
" formatting standards, see section "Algorithm Specifiers".
Also, see section "Supported Hash Algorithms" for a list of supported
hash algorithms.

* `-G`, `--kalg`=_KEY\_ALGORITHM_:
Algorithm type for generated key. It supports friendly names like the -g option.
See section "Supported Public Object Algorithms" for a list of supported
object algorithms.

* `-C`, `--context`=_CONTEXT\_FILE_:
An optional file used to store the object context returned.

* `-L`, `--policy-file`=_POLICY\_FILE_:
An optional file input that contains the policy digest for policy based authorization of the object.

* `-E`, `--enforce-policy`:
Option to enforce policy based authorization on the created primary object.

* `-S`, `--input-session-handle`=_SESSION\_HANDLE_:
Optional Input session handle from a policy session for authorization.

[common options](common/options.md)

[common tcti options](common/tcti.md)

[password formatting](common/password.md)

[supported hash algorithms](common/hash.md)

[supported public object algorithms](common/object-alg.md)

[algorithm specifiers](common/alg.md)

EXAMPLES
--------
```
tpm2_createprimary -A o -g sha256 -G ecc -C context.out
```

RETURNS
-------
0 on success or 1 on failure.

BUGS
----
[Github Issues](https://github.com/01org/tpm2-tools/issues)

HELP
----
See the [Mailing List](https://lists.01.org/mailman/listinfo/tpm2)

AUTHOR
------
William Roberts <william.c.roberts@intel.com>

0 comments on commit e983b21

Please sign in to comment.