74 changes: 19 additions & 55 deletions Makefile.am
Expand Up @@ -232,25 +232,8 @@ endif

EXTRA_DIST = $(top_srcdir)/man

man1_MANS = \
man/man1/tpm2_send_command.1 \
man/man1/tpm2_startup.1 \
man/man1/tpm2_pcrlist.1 \
man/man1/tpm2_quote.1 \
man/man1/tpm2_takeownership.1 \
man/man1/tpm2_nvwrite.1 \
man/man1/tpm2_nvrelease.1 \
man/man1/tpm2_readpublic.1 \
man/man1/tpm2_rsadecrypt.1 \
man/man1/tpm2_rsaencrypt.1 \
man/man1/tpm2_sign.1 \
man/man1/tpm2_unseal.1 \
man/man1/tpm2_verifysignature.1 \
man/man1/tpm2_rc_decode.1 \
man/man1/tpm2_pcrextend.1

if HAVE_MD2MAN_ROFF
man1_MANS += \
man1_MANS := \
man/man1/tpm2_activatecredential.1 \
man/man1/tpm2_akparse.1 \
man/man1/tpm2_certify.1 \
Expand All @@ -275,44 +258,23 @@ if HAVE_MD2MAN_ROFF
man/man1/tpm2_nvlist.1 \
man/man1/tpm2_nvread.1 \
man/man1/tpm2_nvreadlock.1 \
man/man1/tpm2_pcrevent.1
endif

MAN_DEPS := man/common-options.troff man/tcti-options.troff \
man/tcti-environment.troff man/alg-common.troff \
man/hash-alg-common.troff man/object-alg-common.troff \
man/sign-alg-common.troff man/password-fmt-common.troff \
man/alg-notes-common.troff

# DEPRECATED - No more raw troff files for manpages, use markdown (below).
man/man1/%.1 : man/%.1.in $(MAN_DEPS)
rm -f $@
mkdir -p man/man1
if HAVE_TCTI_DEV
echo ".nr HAVE_TCTI_DEV 1" >> $@
endif
if HAVE_TCTI_SOCK
echo ".nr HAVE_TCTI_SOCK 1" >> $@
man/man1/tpm2_nvrelease.1 \
man/man1/tpm2_nvwrite.1 \
man/man1/tpm2_pcrevent.1 \
man/man1/tpm2_pcrextend.1 \
man/man1/tpm2_pcrlist.1 \
man/man1/tpm2_quote.1 \
man/man1/tpm2_rc_decode.1 \
man/man1/tpm2_readpublic.1 \
man/man1/tpm2_rsadecrypt.1 \
man/man1/tpm2_rsaencrypt.1 \
man/man1/tpm2_send_command.1 \
man/man1/tpm2_sign.1 \
man/man1/tpm2_startup.1 \
man/man1/tpm2_takeownership.1 \
man/man1/tpm2_unseal.1 \
man/man1/tpm2_verifysignature.1
endif
sed -e '/@COMMON_OPTIONS_INCLUDE@/r man/common-options.troff' \
-e '/@COMMON_OPTIONS_INCLUDE@/d' \
-e '/@TCTI_OPTIONS_INCLUDE@/r man/tcti-options.troff' \
-e '/@TCTI_OPTIONS_INCLUDE@/d' \
-e '/@TCTI_ENVIRONMENT_INCLUDE@/r man/tcti-environment.troff' \
-e '/@TCTI_ENVIRONMENT_INCLUDE@/d' \
-e '/@ALG_COMMON_INCLUDE@/r man/alg-common.troff' \
-e '/@ALG_COMMON_INCLUDE@/d' \
-e '/@HASH_ALG_COMMON_INCLUDE@/r man/hash-alg-common.troff' \
-e '/@HASH_ALG_COMMON_INCLUDE@/d' \
-e '/@OBJECT_ALG_COMMON_INCLUDE@/r man/object-alg-common.troff' \
-e '/@OBJECT_ALG_COMMON_INCLUDE@/d' \
-e '/@SIGN_ALG_COMMON_INCLUDE@/r man/sign-alg-common.troff' \
-e '/@SIGN_ALG_COMMON_INCLUDE@/d' \
-e '/@PASSWORD_FORMAT_COMMON_INCLUDE@/r man/password-fmt-common.troff' \
-e '/@PASSWORD_FORMAT_COMMON_INCLUDE@/d' \
-e '/@ALG_NOTES_COMMON_INCLUDE@/r man/alg-notes-common.troff' \
-e '/@ALG_NOTES_COMMON_INCLUDE@/d' \
< $< >> $@

MARKDOWN_COMMON_DEPS = \
man/common/alg.md \
Expand Down Expand Up @@ -342,6 +304,8 @@ man/man1/%.1 : man/%.1.md $(MARKDOWN_COMMON_DEPS)
-e '/\[supported signing algorithms\]/d' \
-e '/\[nv attributes\]/r man/common/nv-attrs.md' \
-e '/\[nv attributes\]/d' \
-e '/\[pcr bank specifiers\]/r man/common/pcr.md' \
-e '/\[pcr bank specifiers\]/d' \
< $< | md2man-roff > $@

CLEANFILES = $(man1_MANS)
2 changes: 1 addition & 1 deletion configure.ac
Expand Up @@ -10,7 +10,7 @@ AC_CHECK_PROG([MD2MAN_ROFF],[md2man-roff],[yes])
AS_IF(
[test "x${MD2MAN_ROFF}" == x"yes"],
[],
[AC_MSG_WARN([Required executable md2man-roff not found, some man pages will not be build])])
[AC_MSG_WARN([Required executable md2man-roff not found, man pages will not be built])])
AM_CONDITIONAL([HAVE_MD2MAN_ROFF],[test "x${MD2MAN_ROFF}" = "xyes"])
PKG_CHECK_MODULES([SAPI],[sapi])
# disable libtcti-device selectively (enabled by default)
Expand Down
10 changes: 0 additions & 10 deletions man/alg-common.troff

This file was deleted.

9 changes: 0 additions & 9 deletions man/alg-notes-common.troff

This file was deleted.

19 changes: 0 additions & 19 deletions man/common-options.troff

This file was deleted.

18 changes: 18 additions & 0 deletions man/common/pcr.md
@@ -0,0 +1,18 @@
PCR Bank Specfiers
-------------------

PCR Bank Selection lists follow the below specification:

```
<BANK>:<PCR>[,<PCR>]
```

multiple banks may be separated by '+'.

For example:

```
sha:3,4+sha256:5,6
```
will select PCRs 3 and 4 from the SHA bank and PCRs 5 and 6
from the SHA256 bank.
9 changes: 0 additions & 9 deletions man/hash-alg-common.troff

This file was deleted.

8 changes: 0 additions & 8 deletions man/object-alg-common.troff

This file was deleted.

11 changes: 0 additions & 11 deletions man/password-fmt-common.troff

This file was deleted.

10 changes: 0 additions & 10 deletions man/sign-alg-common.troff

This file was deleted.

26 changes: 0 additions & 26 deletions man/tcti-environment.troff

This file was deleted.

27 changes: 0 additions & 27 deletions man/tcti-options.troff

This file was deleted.

64 changes: 0 additions & 64 deletions man/tpm2_nvrelease.1.in

This file was deleted.

64 changes: 64 additions & 0 deletions man/tpm2_nvrelease.1.md
@@ -0,0 +1,64 @@
tpm2_nvrelease 1 "SEPTEMBER 2017" tpm2-tools
==================================================

NAME
----

tpm2_nvrelease(1) - Release a Non-Volatile (NV) index.

SYNOPSIS
--------

`tpm2_nvrelease` [OPTIONS]

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

tpm2_nvrelease(1) - Release a Non-Volatile (NV) index that was previously
defined with tpm2_nvdefine(1).

OPTIONS
-------

* `-x`, `--index`=_NV\_INDEX_:
Specifies the index to release.

* `-a`, `--authHandle`=_SECRET\_DATA\_FILE_:
specifies the handle used to authorize:
* `0x40000001` for `TPM_RH_OWNER`
* `0x4000000C` for `TPM_RH_PLATFORM`

* `-s`, `--size`=_SIZE_:
specifies the size of data area in bytes.

* `-P`, `--handlePasswd`=_HANDLE\_PASSWORD_:
specifies the password of authHandle. Passwords should follow the
"password formatting standards, see section "Password Formatting".

* `-S`, `--input-session-handle`=_SIZE_:
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)

EXAMPLES
--------

```
tpm2_nvrelease -x 0x1500016 -a 0x40000001 -P passwd
```

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)