Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var PublicKeyAlgorithmStrings = map[string]PublicKeyAlgorithm{ RSA.String(): { Algorithm: x509.RSA, KeySize: map[int]interface{}{ 2048: true, 4096: true, }, Signature: map[string]bool{ "SHA256WITHRSA": true, "SHA384WITHRSA": true, "SHA512WITHRSA": true, "SHA256WITHRSAPSS": true, "SHA384WITHRSAPSS": true, "SHA512WithRSAPSS": true, }, SigningAlgorithm: map[x509.SignatureAlgorithm]bool{ x509.SHA256WithRSA: true, x509.SHA384WithRSA: true, x509.SHA512WithRSA: true, x509.SHA256WithRSAPSS: true, x509.SHA384WithRSAPSS: true, x509.SHA512WithRSAPSS: true, }, }, ECDSA.String(): { Algorithm: x509.ECDSA, KeySize: map[int]interface{}{ 256: elliptic.P256(), 384: elliptic.P384(), 521: elliptic.P521(), }, Signature: map[string]bool{ "SHA256WITHECDSA": true, "SHA384WITHECDSA": true, "SHA512WITHECDSA": true, }, SigningAlgorithm: map[x509.SignatureAlgorithm]bool{ x509.ECDSAWithSHA256: true, x509.ECDSAWithSHA384: true, x509.ECDSAWithSHA512: true, }, }, Ed25519.String(): { Algorithm: x509.Ed25519, KeySize: map[int]interface{}{ 256: true, }, }, }
View Source
var PublicKeyAlgorithms = map[KeyType]PublicKeyAlgorithm{ RSA: { Algorithm: x509.RSA, KeySize: map[int]interface{}{ 2048: true, 4096: true, }, Signature: map[string]bool{ "SHA256WITHRSA": true, "SHA384WITHRSA": true, "SHA512WITHRSA": true, "SHA256WITHRSAPSS": true, "SHA384WITHRSAPSS": true, "SHA512WithRSAPSS": true, }, SigningAlgorithm: map[x509.SignatureAlgorithm]bool{ x509.SHA256WithRSA: true, x509.SHA384WithRSA: true, x509.SHA512WithRSA: true, x509.SHA256WithRSAPSS: true, x509.SHA384WithRSAPSS: true, x509.SHA512WithRSAPSS: true, }, }, ECDSA: { Algorithm: x509.ECDSA, KeySize: map[int]interface{}{ 256: elliptic.P256(), 384: elliptic.P384(), 521: elliptic.P521(), }, Signature: map[string]bool{ "SHA256WITHECDSA": true, "SHA384WITHECDSA": true, "SHA512WITHECDSA": true, }, SigningAlgorithm: map[x509.SignatureAlgorithm]bool{ x509.ECDSAWithSHA256: true, x509.ECDSAWithSHA384: true, x509.ECDSAWithSHA512: true, }, }, Ed25519: { Algorithm: x509.Ed25519, KeySize: map[int]interface{}{ 256: true, }, }, }
View Source
var SignatureAlgorithm = map[x509.SignatureAlgorithm]func() (hash.Hash, crypto.Hash){ x509.ECDSAWithSHA256: func() (hash.Hash, crypto.Hash) { return sha256.New(), crypto.SHA256 }, x509.ECDSAWithSHA384: func() (hash.Hash, crypto.Hash) { return sha512.New384(), crypto.SHA384 }, x509.ECDSAWithSHA512: func() (hash.Hash, crypto.Hash) { return sha512.New(), crypto.SHA512 }, x509.SHA256WithRSA: func() (hash.Hash, crypto.Hash) { return sha256.New(), crypto.SHA256 }, x509.SHA384WithRSA: func() (hash.Hash, crypto.Hash) { return sha512.New384(), crypto.SHA384 }, x509.SHA512WithRSA: func() (hash.Hash, crypto.Hash) { return sha512.New(), crypto.SHA512 }, x509.SHA256WithRSAPSS: func() (hash.Hash, crypto.Hash) { return sha256.New(), crypto.SHA256 }, x509.SHA384WithRSAPSS: func() (hash.Hash, crypto.Hash) { return sha512.New384(), crypto.SHA384 }, x509.SHA512WithRSAPSS: func() (hash.Hash, crypto.Hash) { return sha512.New(), crypto.SHA512 }, }
View Source
var ValidSignatures = map[string]SigningAlgorithm{ "SHA256WITHECDSA": { Common: x509.ECDSAWithSHA256, PCA: types.SigningAlgorithmSha256withecdsa, }, "SHA384WITHECDSA": { Common: x509.ECDSAWithSHA384, PCA: types.SigningAlgorithmSha384withecdsa, }, "SHA512WITHECDSA": { Common: x509.ECDSAWithSHA512, PCA: types.SigningAlgorithmSha512withecdsa, }, "SHA256WITHRSA": { Common: x509.SHA256WithRSA, PCA: types.SigningAlgorithmSha256withrsa, }, "SHA384WITHRSA": { Common: x509.SHA384WithRSA, PCA: types.SigningAlgorithmSha384withrsa, }, "SHA512WITHRSA": { Common: x509.SHA512WithRSA, PCA: types.SigningAlgorithmSha512withrsa, }, }
Functions ¶
This section is empty.
Types ¶
type CertificateRequest ¶
type CertificateRequest struct { CommonName string SubjectAlternateNames []string DistinguishedName DistinguishedName SigningAlgorithm x509.SignatureAlgorithm PublicKeyAlgorithm x509.PublicKeyAlgorithm KeySize int Output Output }
type DistinguishedName ¶
type Manifest ¶
type Manifest struct { CertificateChain []*x509.Certificate SigningAlgorithm x509.SignatureAlgorithm Signature *[]byte Hash *[]byte Data Data }
type PublicKeyAlgorithm ¶
type PublicKeyAlgorithm struct { Algorithm x509.PublicKeyAlgorithm KeySize map[int]interface{} Signature map[string]bool SigningAlgorithm map[x509.SignatureAlgorithm]bool }
type Signature ¶
type Signature struct { CertificateRequest CertificateRequest SigningAlgorithm x509.SignatureAlgorithm Data }
type SignedCertificate ¶
type SigningAlgorithm ¶
type SigningAlgorithm struct { Common x509.SignatureAlgorithm PCA types.SigningAlgorithm }
type SigningRequest ¶
type TrustChain ¶
Click to show internal directories.
Click to hide internal directories.