func Ek() error {
	var pubEk []byte
	pubEk, err := TPMInterface.ReadPubEK(*ekCommandPassword)
	if err != nil {
		return err
	}
	if *ekCommandOutfile != "" {
		if err := ioutil.WriteFile(*ekCommandOutfile, pubEk, 660); err != nil {
			return err
		}
	}
	fingerprint := sha256.Sum256(pubEk)
	fmt.Printf("EK Pubkey fingerprint: 0x%x\n", fingerprint)
	return nil
}
Ek dumps the Endorsement Key
package main
import (
	"crypto/rand"
	"crypto/sha256"
	"errors"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"syscall"
	"time"
	"github.com/9elements/tpmtool/pkg/tpm"
	"github.com/9elements/tpmtool/pkg/tpmtool"
	"github.com/u-root/u-root/pkg/storage"
)
const (
	MaxPlatformConfigurationRegister = 24
	DefaultFilePermissions = 660
	LinuxEFIFirmwareDir = "/sys/firmware/efi"
	Delay = 900
)
func Status() error {
	summary := TPMInterface.Summary()
	fmt.Print(summary)
	if TPMInterface.Info().TemporarilyDeactivated {
		fmt.Println("\nError: Check your BIOS! TPM is temporary deactivated.")
	}
	if (!TPMInterface.Info().Active || !TPMInterface.Info().Enabled) && !TPMInterface.Info().TemporarilyDeactivated {
		fmt.Println("\nError: TPM is inactive or disabled! Check your BIOS physical presence settings.")
	}
	if !TPMInterface.Info().Owned {
		fmt.Println("\nError: TPM is not owned! Please take ownership of the TPM.")
	}
	return nil
}