func sign(claims reportClaims, meta map[string]string, privateKey *rsa.PrivateKey) (string, error) {
	t := jwt.NewWithClaims(jwt.SigningMethodPS256, claims)

	for k, v := range meta {
		t.Header[k] = v
	}

	signed, err := t.SignedString(privateKey)
	if err != nil {
		return "", errors.Wrap(err, "t.signedString()")
	}

	return signed, nil
}
// required standardClaims fields:
// - Issuer
// - Subject
// - Id
// - NotBefore
// - ExpiresAt
// - ReportDigest
// - DiscoveryDigest
// - ManifestDigest
required standardClaims fields:
- Issuer
- Subject
- Id
- NotBefore
- ExpiresAt
- ReportDigest
- DiscoveryDigest
- ManifestDigest
// required standardClaims fields : // - Issuer // - Subject // - Id // - NotBefore // - ExpiresAt // - ReportDigest // - DiscoveryDigest // - ManifestDigest
func sign(claims reportClaims, meta map[string]string, privateKey *rsa.PrivateKey) (string, error) {
	t := jwt.NewWithClaims(jwt.SigningMethodPS256, claims)
	for k, v := range meta {
		t.Header[k] = v
	}
	signed, err := t.SignedString(privateKey)
	if err != nil {
		return "", errors.Wrap(err, "t.signedString()")
	}
	return signed, nil
}
func sign ( claims reportClaims , meta map [ string ] string , privateKey * rsa . PrivateKey ) ( string , error ) { t := jwt . NewWithClaims ( jwt . SigningMethodPS256 , claims ) for k , v := range meta { t . Header [ k ] = v } signed , err := t . SignedString ( privateKey ) if err != nil { return " " , errors . Wrap ( err , " " ) } return signed , nil }
required standardClaims fields:
 Issuer
 Subject
 Id
 NotBefore
 ExpiresAt
 ReportDigest
 DiscoveryDigest
 ManifestDigest
required standardClaims fields : Issuer Subject Id NotBefore ExpiresAt ReportDigest DiscoveryDigest ManifestDigest