Skip to content

Latest commit

 

History

History
55 lines (41 loc) · 1.64 KB

README.md

File metadata and controls

55 lines (41 loc) · 1.64 KB

Nitrite

Go Report Card Go Reference

A library for verifying AWS Nitro Enclave attestations for Go.

Usage

It's fairly simple to use it, so here's an example:

import (
	"bytes"
	"github.com/hf/nitrite"
	"time"
)

func verifyAttestation(attestation []byte) error {
	res, err := nitrite.Verify(
		bytes.NewReader(attestation),
		nitrite.VerifyOptions{
			CurrentTime: time.Now(),
		})

	if nil != err {
		return err
	}

	return nil
}

This package includes the Nitro Enclave Root CA certificates.

It's recommended you explicitly calculate the SHA256 sum of the DefaultRootCA string and match it according to the AWS documentation at the start of your application. Alternatively, you can supply your own copy of the root CA.

License

Copyright © 2021 Stojan Dimitrovski. Licensed under the MIT License. See LICENSE for more information.