Skip to content

Commit

Permalink
Merge pull request #12 from Pranjali-2501/main
Browse files Browse the repository at this point in the history
added readme for attest CLI
  • Loading branch information
Pranjali-2501 authored Jul 12, 2023
2 parents c35a69e + b82cbcc commit 435455f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ This type contains five fields:
(map[string][]string, []byte, error)` that should return the headers and body
of the HTTPS response.
* `Now time.Time`: if `nil`, uses `time.Now()`. It is the time at which to verify
the validity of certificates and collaterals
the validity of certificates and collaterals.
* `TrustedRoots *x509.CertPool`: if `nil`, uses the library's embedded
certificate.
Certificate chain verification is performed using trusted roots.
Expand Down
48 changes: 48 additions & 0 deletions tools/attest/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# `attest` CLI tool

This binary is a thin wrapper around the `client` library to gather attestation
reports in either binary or textproto formats.

The tool's input is the intended `REPORT_DATA` contents, which is 64 bytes of
user-provided data to include in the attestation report. This is typically a
nonce.

The tool's output is the report in any specified format to either standard out
or directly to a file.


## Usage

```
./attest [options...]
```

### `-in`

This flag provides a string of 64 bytes `REPORT_DATA` content directly on the command line to include in the output attestation report.
REPORT_DATA can be either in base64 or hex format. If -inform=auto, first check with base64, hex and last with auto.

### `-inform`

The format that input takes. One of

* `base64`: for a byte string in base64 encoding. Fewer bytes than expected
will be zero-filled.
* `hex`: for a byte string encoded as a hexadecimal string. Fewer bytes than
expected will be zero-filled.
* `auto`: first check with base64 and last with hex

Default value is `auto`.

### `-outform`

The format that output takes. This can be `bin` for Intel's specified structures
in binary or `textproto` for this module's protobuf message types in human readable text format.

Default value is `bin`.

### `-out`

Path to output file to write attestation report to.

Default is empty, interpreted as stdout.

0 comments on commit 435455f

Please sign in to comment.