Documentation ¶
Index ¶
- func GetPublicKeyFromPrivateKey(privateKey crypto.PrivateKey) (publicKey crypto.PublicKey, err error)
- func IsCertificateMatchingPrivateKey(cert *x509.Certificate, privateKey crypto.PrivateKey) (isMatching bool, err error)
- func IsCertificateRootCa(cert *x509.Certificate) (isRootCa bool, err error)
- func IsCertificateVersion1(cert *x509.Certificate) (isV1 bool, err error)
- func LoadCertificateFromDerBytes(derEncodecCertificate []byte) (cert *x509.Certificate, err error)
- type NativeX509CertificateHandler
- type X509Certificate
- func GetX509CertificateFromFile(certFile files.File) (cert *X509Certificate, err error)
- func GetX509CertificateFromFilePath(certFilePath string) (cert *X509Certificate, err error)
- func MustGetX509CertificateFromFile(certFile files.File) (cert *X509Certificate)
- func MustGetX509CertificateFromFilePath(certFilePath string) (cert *X509Certificate)
- func NewX509Certificate() (cert *X509Certificate)
- func (c *X509Certificate) GetAsPemBytes() (pemBytes []byte, err error)
- func (c *X509Certificate) GetAsPemString() (pemString string, err error)
- func (x *X509Certificate) GetExpiryDate() (expiryDate *time.Time, err error)
- func (c *X509Certificate) GetIssuerString() (issuerString string, err error)
- func (c *X509Certificate) GetNativeCertificate() (nativeCertificate *x509.Certificate, err error)
- func (x *X509Certificate) GetNativeX509Certificate() (nativeX509Certificate *x509.Certificate, err error)
- func (c *X509Certificate) GetSubjectString() (subject string, err error)
- func (c *X509Certificate) GetVersion() (version int, err error)
- func (x *X509Certificate) IsExpired() (isExpired bool, err error)
- func (c *X509Certificate) IsIntermediateCertificate() (isIntermediateCertificate bool, err error)
- func (c *X509Certificate) IsRootCa(verbose bool) (isRootCa bool, err error)
- func (c *X509Certificate) IsSignedByCertificateFile(signingCertificate files.File, verbose bool) (isSignedBy bool, err error)
- func (c *X509Certificate) IsV1() (isV1 bool, err error)
- func (c *X509Certificate) IsV3() (isV3 bool, err error)
- func (c *X509Certificate) LoadFromBytes(certBytes []byte) (err error)
- func (c *X509Certificate) LoadFromFile(loadFile files.File) (err error)
- func (c *X509Certificate) LoadFromFilePath(loadPath string) (err error)
- func (c *X509Certificate) LoadFromString(certString string) (err error)
- func (x *X509Certificate) MustGetAsPemBytes() (pemBytes []byte)
- func (x *X509Certificate) MustGetAsPemString() (pemString string)
- func (x *X509Certificate) MustGetExpiryDate() (expiryDate *time.Time)
- func (x *X509Certificate) MustGetIssuerString() (issuerString string)
- func (x *X509Certificate) MustGetNativeCertificate() (nativeCertificate *x509.Certificate)
- func (x *X509Certificate) MustGetNativeX509Certificate() (nativeX509Certificate *x509.Certificate)
- func (x *X509Certificate) MustGetSubjectString() (subject string)
- func (x *X509Certificate) MustGetVersion() (version int)
- func (x *X509Certificate) MustIsExpired() (isExpired bool)
- func (x *X509Certificate) MustIsIntermediateCertificate() (isIntermediateCertificate bool)
- func (x *X509Certificate) MustIsRootCa(verbose bool) (isRootCa bool)
- func (x *X509Certificate) MustIsSignedByCertificateFile(signingCertificate files.File, verbose bool) (isSignedBy bool)
- func (x *X509Certificate) MustIsV1() (isV1 bool)
- func (x *X509Certificate) MustIsV3() (isV3 bool)
- func (x *X509Certificate) MustLoadFromBytes(certBytes []byte)
- func (x *X509Certificate) MustLoadFromFile(loadFile files.File)
- func (x *X509Certificate) MustLoadFromFilePath(loadPath string)
- func (x *X509Certificate) MustLoadFromString(certString string)
- func (x *X509Certificate) MustSetNativeX509Certificate(nativeX509Certificate *x509.Certificate)
- func (x *X509Certificate) MustWritePemToFile(outputFile files.File, verbose bool)
- func (x *X509Certificate) MustWritePemToFilePath(filePath string, verbose bool)
- func (x *X509Certificate) SetNativeX509Certificate(nativeX509Certificate *x509.Certificate) (err error)
- func (c *X509Certificate) WritePemToFile(outputFile files.File, verbose bool) (err error)
- func (c *X509Certificate) WritePemToFilePath(filePath string, verbose bool) (err error)
- type X509CertificateFile
- func GetX509CertificateFileFromFile(input files.File) (x509CertificateFile *X509CertificateFile, err error)
- func GetX509CertificateFileFromPath(inputPath string) (x509CertificateFile *X509CertificateFile, err error)
- func MustGetX509CertificateFileFromFile(input files.File) (x509CertificateFile *X509CertificateFile)
- func MustGetX509CertificateFileFromPath(inputPath string) (x509CertificateFile *X509CertificateFile)
- func NewX509CertificateFile() (x *X509CertificateFile)
- func (x *X509CertificateFile) GetAsX509Certificate() (cert *X509Certificate, err error)
- func (x *X509CertificateFile) IsX509Certificate(verbose bool) (isX509Certificate bool, err error)
- func (x *X509CertificateFile) IsX509CertificateSignedByCertificateFile(signingCertificateFile files.File, verbose bool) (isSignedBy bool, err error)
- func (x *X509CertificateFile) IsX509IntermediateCertificate() (isIntermediateCertificate bool, err error)
- func (x *X509CertificateFile) IsX509RootCertificate(verbose bool) (isX509Certificate bool, err error)
- func (x *X509CertificateFile) IsX509v3() (isX509v3 bool, err error)
- func (x *X509CertificateFile) MustGetAsX509Certificate() (cert *X509Certificate)
- func (x *X509CertificateFile) MustIsExpired(verbose bool) (isExpired bool, err error)
- func (x *X509CertificateFile) MustIsX509Certificate(verbose bool) (isX509Certificate bool)
- func (x *X509CertificateFile) MustIsX509CertificateSignedByCertificateFile(signingCertificateFile files.File, verbose bool) (isSignedBy bool)
- func (x *X509CertificateFile) MustIsX509IntermediateCertificate() (isIntermediateCertificate bool)
- func (x *X509CertificateFile) MustIsX509RootCertificate(verbose bool) (isX509Certificate bool)
- func (x *X509CertificateFile) MustIsX509v3() (isX509v3 bool)
- type X509CertificateHandler
- type X509CertificatesService
- func (c *X509CertificatesService) CreateIntermediateCertificateIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory, err error)
- func (c *X509CertificatesService) CreateRootCaAndaddToGopass(createOptions *X509CreateCertificateOptions, ...) (err error)
- func (c *X509CertificatesService) CreateRootCaIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory, err error)
- func (c *X509CertificatesService) CreateSignedCertificate(createOptions *X509CreateCertificateOptions) (err error)
- func (c *X509CertificatesService) CreateSignedIntermediateCertificateAndAddToGopass(createOptions *X509CreateCertificateOptions, ...) (err error)
- func (c *X509CertificatesService) CreateSigningRequestFile(signOptions *X509SignCertificateOptions) (err error)
- func (c *X509CertificatesService) GetNextCaSerialNumberAsStringFromGopass(verbose bool) (serial string, err error)
- func (c *X509CertificatesService) IsCertificateFileSignedByCertificateFile(thisCertificateFile *X509CertificateFile, ...) (isSignedBy bool, err error)
- func (c *X509CertificatesService) MustCreateIntermediateCertificateIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory)
- func (c *X509CertificatesService) MustCreateRootCAAndAddToGopass(createOptions *X509CreateCertificateOptions, ...)
- func (x *X509CertificatesService) MustCreateRootCaAndaddToGopass(createOptions *X509CreateCertificateOptions, ...)
- func (c *X509CertificatesService) MustCreateRootCaIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory)
- func (c *X509CertificatesService) MustCreateSignedCertificate(createOptions *X509CreateCertificateOptions)
- func (c *X509CertificatesService) MustCreateSignedIntermediateCertificateAndAddToGopass(createOptions *X509CreateCertificateOptions, ...)
- func (x *X509CertificatesService) MustCreateSigningRequestFile(signOptions *X509SignCertificateOptions)
- func (x *X509CertificatesService) MustGetNextCaSerialNumberAsStringFromGopass(verbose bool) (serial string)
- func (x *X509CertificatesService) MustIsCertificateFileSignedByCertificateFile(thisCertificateFile *X509CertificateFile, ...) (isSignedBy bool)
- func (c *X509CertificatesService) MustSignIntermediateCertificate(signOptions *X509SignCertificateOptions)
- func (c *X509CertificatesService) SignIntermediateCertificate(signOptions *X509SignCertificateOptions) (err error)
- type X509CreateCertificateOptions
- func (x *X509CreateCertificateOptions) GetAdditionalSans() (additionalSans []string, err error)
- func (o *X509CreateCertificateOptions) GetCertificateOutputFilePath() (certOutputPath string, err error)
- func (o *X509CreateCertificateOptions) GetCommonName() (commonName string, err error)
- func (o *X509CreateCertificateOptions) GetCountryName() (countryName string, err error)
- func (o *X509CreateCertificateOptions) GetDeepCopy() (copy *X509CreateCertificateOptions)
- func (o *X509CreateCertificateOptions) GetKeyOutputFilePath() (keyOutputPath string, err error)
- func (x *X509CreateCertificateOptions) GetLocality() (locality string, err error)
- func (o *X509CreateCertificateOptions) GetLocallity() (locality string, err error)
- func (x *X509CreateCertificateOptions) GetOverwriteExistingCertificateInGopass() (overwriteExistingCertificateInGopass bool, err error)
- func (o *X509CreateCertificateOptions) GetSubjectStringForOpenssl() (subjectString string, err error)
- func (o *X509CreateCertificateOptions) GetUseTemporaryDirectory() (UseTemporaryDirectory bool)
- func (x *X509CreateCertificateOptions) GetVerbose() (verbose bool, err error)
- func (o *X509CreateCertificateOptions) IsCertificateOutputFilePathSet() (isSet bool)
- func (x *X509CreateCertificateOptions) MustGetAdditionalSans() (additionalSans []string)
- func (x *X509CreateCertificateOptions) MustGetCertificateOutputFilePath() (certOutputPath string)
- func (x *X509CreateCertificateOptions) MustGetCommonName() (commonName string)
- func (x *X509CreateCertificateOptions) MustGetCountryName() (countryName string)
- func (x *X509CreateCertificateOptions) MustGetKeyOutputFilePath() (keyOutputPath string)
- func (x *X509CreateCertificateOptions) MustGetLocality() (locality string)
- func (x *X509CreateCertificateOptions) MustGetLocallity() (locality string)
- func (x *X509CreateCertificateOptions) MustGetOverwriteExistingCertificateInGopass() (overwriteExistingCertificateInGopass bool)
- func (x *X509CreateCertificateOptions) MustGetSubjectStringForOpenssl() (subjectString string)
- func (x *X509CreateCertificateOptions) MustGetVerbose() (verbose bool)
- func (x *X509CreateCertificateOptions) MustSetAdditionalSans(additionalSans []string)
- func (x *X509CreateCertificateOptions) MustSetCertificateOutputFilePath(certificateOutputFilePath string)
- func (x *X509CreateCertificateOptions) MustSetCommonName(commonName string)
- func (x *X509CreateCertificateOptions) MustSetCountryName(countryName string)
- func (x *X509CreateCertificateOptions) MustSetKeyOutputFilePath(keyOutputFilePath string)
- func (x *X509CreateCertificateOptions) MustSetLocality(locality string)
- func (x *X509CreateCertificateOptions) MustSetOverwriteExistingCertificateInGopass(overwriteExistingCertificateInGopass bool)
- func (x *X509CreateCertificateOptions) MustSetUseTemporaryDirectory(useTemporaryDirectory bool)
- func (x *X509CreateCertificateOptions) MustSetVerbose(verbose bool)
- func (x *X509CreateCertificateOptions) SetAdditionalSans(additionalSans []string) (err error)
- func (x *X509CreateCertificateOptions) SetCertificateOutputFilePath(certificateOutputFilePath string) (err error)
- func (x *X509CreateCertificateOptions) SetCommonName(commonName string) (err error)
- func (x *X509CreateCertificateOptions) SetCountryName(countryName string) (err error)
- func (x *X509CreateCertificateOptions) SetKeyOutputFilePath(keyOutputFilePath string) (err error)
- func (x *X509CreateCertificateOptions) SetLocality(locality string) (err error)
- func (x *X509CreateCertificateOptions) SetOverwriteExistingCertificateInGopass(overwriteExistingCertificateInGopass bool) (err error)
- func (x *X509CreateCertificateOptions) SetUseTemporaryDirectory(useTemporaryDirectory bool) (err error)
- func (x *X509CreateCertificateOptions) SetVerbose(verbose bool) (err error)
- type X509SignCertificateOptions
- func (o *X509SignCertificateOptions) GetCertFileUsedForSigning() (keyFileForSigning files.File, err error)
- func (o *X509SignCertificateOptions) GetCommonName() (commonName string, err error)
- func (o *X509SignCertificateOptions) GetCountryName() (countryName string, err error)
- func (o *X509SignCertificateOptions) GetDeepCopy() (deepCopy *X509SignCertificateOptions)
- func (o *X509SignCertificateOptions) GetKeyFileToSign() (keyFileForSigning files.File, err error)
- func (o *X509SignCertificateOptions) GetKeyFileToSignPath() (keyFileForSigningPath string, err error)
- func (o *X509SignCertificateOptions) GetKeyFileUsedForSigning() (keyFileForSigning files.File, err error)
- func (o *X509SignCertificateOptions) GetLocality() (locality string, err error)
- func (o *X509SignCertificateOptions) GetOutputCertificateFile() (keyFileForSigning files.File, err error)
- func (o *X509SignCertificateOptions) GetSigningRequestFile() (signingRequestFile files.File, err error)
- func (o *X509SignCertificateOptions) GetSigningRequestFilePath() (signingRequestFilePath string, err error)
- func (o *X509SignCertificateOptions) GetSubjectToSign() (subjectToSign string, err error)
- func (x *X509SignCertificateOptions) GetVerbose() (verbose bool, err error)
- func (x *X509SignCertificateOptions) MustGetCertFileUsedForSigning() (keyFileForSigning files.File)
- func (x *X509SignCertificateOptions) MustGetCommonName() (commonName string)
- func (x *X509SignCertificateOptions) MustGetCountryName() (countryName string)
- func (x *X509SignCertificateOptions) MustGetKeyFileToSign() (keyFileForSigning files.File)
- func (x *X509SignCertificateOptions) MustGetKeyFileToSignPath() (keyFileForSigningPath string)
- func (x *X509SignCertificateOptions) MustGetKeyFileUsedForSigning() (keyFileForSigning files.File)
- func (x *X509SignCertificateOptions) MustGetLocality() (locality string)
- func (x *X509SignCertificateOptions) MustGetOutputCertificateFile() (keyFileForSigning files.File)
- func (x *X509SignCertificateOptions) MustGetSigningRequestFile() (signingRequestFile files.File)
- func (x *X509SignCertificateOptions) MustGetSigningRequestFilePath() (signingRequestFilePath string)
- func (x *X509SignCertificateOptions) MustGetSubjectToSign() (subjectToSign string)
- func (x *X509SignCertificateOptions) MustGetVerbose() (verbose bool)
- func (x *X509SignCertificateOptions) MustSetCertFileUsedForSigning(certFileUsedForSigning files.File)
- func (x *X509SignCertificateOptions) MustSetCommonName(commonName string)
- func (x *X509SignCertificateOptions) MustSetCountryName(countryName string)
- func (x *X509SignCertificateOptions) MustSetKeyFileToSign(keyFileToSign files.File)
- func (x *X509SignCertificateOptions) MustSetKeyFileUsedForSigning(keyFileUsedForSigning files.File)
- func (x *X509SignCertificateOptions) MustSetLocality(locality string)
- func (x *X509SignCertificateOptions) MustSetOutputCertificateFile(outputCertificateFile files.File)
- func (x *X509SignCertificateOptions) MustSetSigningRequestFile(signingRequestFile files.File)
- func (x *X509SignCertificateOptions) MustSetVerbose(verbose bool)
- func (x *X509SignCertificateOptions) SetCertFileUsedForSigning(certFileUsedForSigning files.File) (err error)
- func (x *X509SignCertificateOptions) SetCommonName(commonName string) (err error)
- func (x *X509SignCertificateOptions) SetCountryName(countryName string) (err error)
- func (x *X509SignCertificateOptions) SetKeyFileToSign(keyFileToSign files.File) (err error)
- func (x *X509SignCertificateOptions) SetKeyFileUsedForSigning(keyFileUsedForSigning files.File) (err error)
- func (x *X509SignCertificateOptions) SetLocality(locality string) (err error)
- func (x *X509SignCertificateOptions) SetOutputCertificateFile(outputCertificateFile files.File) (err error)
- func (x *X509SignCertificateOptions) SetSigningRequestFile(signingRequestFile files.File) (err error)
- func (x *X509SignCertificateOptions) SetVerbose(verbose bool) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPublicKeyFromPrivateKey ¶ added in v0.229.0
func GetPublicKeyFromPrivateKey(privateKey crypto.PrivateKey) (publicKey crypto.PublicKey, err error)
func IsCertificateMatchingPrivateKey ¶ added in v0.229.0
func IsCertificateMatchingPrivateKey(cert *x509.Certificate, privateKey crypto.PrivateKey) (isMatching bool, err error)
func IsCertificateRootCa ¶ added in v0.228.0
func IsCertificateRootCa(cert *x509.Certificate) (isRootCa bool, err error)
func IsCertificateVersion1 ¶ added in v0.230.0
func IsCertificateVersion1(cert *x509.Certificate) (isV1 bool, err error)
func LoadCertificateFromDerBytes ¶ added in v0.228.0
func LoadCertificateFromDerBytes(derEncodecCertificate []byte) (cert *x509.Certificate, err error)
Types ¶
type NativeX509CertificateHandler ¶ added in v0.228.0
type NativeX509CertificateHandler struct { }
func NewNativeX509CertificateHandler ¶ added in v0.228.0
func NewNativeX509CertificateHandler() (handler *NativeX509CertificateHandler)
func (*NativeX509CertificateHandler) CreateRootCaCertificate ¶ added in v0.229.0
func (n *NativeX509CertificateHandler) CreateRootCaCertificate(options *X509CreateCertificateOptions) (cert *x509.Certificate, privateKey crypto.PrivateKey, err error)
type X509Certificate ¶
type X509Certificate struct {
// contains filtered or unexported fields
}
func GetX509CertificateFromFile ¶
func GetX509CertificateFromFile(certFile files.File) (cert *X509Certificate, err error)
func GetX509CertificateFromFilePath ¶
func GetX509CertificateFromFilePath(certFilePath string) (cert *X509Certificate, err error)
func MustGetX509CertificateFromFile ¶
func MustGetX509CertificateFromFile(certFile files.File) (cert *X509Certificate)
func MustGetX509CertificateFromFilePath ¶
func MustGetX509CertificateFromFilePath(certFilePath string) (cert *X509Certificate)
func NewX509Certificate ¶
func NewX509Certificate() (cert *X509Certificate)
func (*X509Certificate) GetAsPemBytes ¶
func (c *X509Certificate) GetAsPemBytes() (pemBytes []byte, err error)
func (*X509Certificate) GetAsPemString ¶
func (c *X509Certificate) GetAsPemString() (pemString string, err error)
func (*X509Certificate) GetExpiryDate ¶
func (x *X509Certificate) GetExpiryDate() (expiryDate *time.Time, err error)
func (*X509Certificate) GetIssuerString ¶
func (c *X509Certificate) GetIssuerString() (issuerString string, err error)
func (*X509Certificate) GetNativeCertificate ¶
func (c *X509Certificate) GetNativeCertificate() (nativeCertificate *x509.Certificate, err error)
func (*X509Certificate) GetNativeX509Certificate ¶
func (x *X509Certificate) GetNativeX509Certificate() (nativeX509Certificate *x509.Certificate, err error)
func (*X509Certificate) GetSubjectString ¶
func (c *X509Certificate) GetSubjectString() (subject string, err error)
func (*X509Certificate) GetVersion ¶
func (c *X509Certificate) GetVersion() (version int, err error)
func (*X509Certificate) IsExpired ¶
func (x *X509Certificate) IsExpired() (isExpired bool, err error)
func (*X509Certificate) IsIntermediateCertificate ¶
func (c *X509Certificate) IsIntermediateCertificate() (isIntermediateCertificate bool, err error)
func (*X509Certificate) IsRootCa ¶
func (c *X509Certificate) IsRootCa(verbose bool) (isRootCa bool, err error)
func (*X509Certificate) IsSignedByCertificateFile ¶
func (*X509Certificate) IsV1 ¶
func (c *X509Certificate) IsV1() (isV1 bool, err error)
func (*X509Certificate) IsV3 ¶
func (c *X509Certificate) IsV3() (isV3 bool, err error)
func (*X509Certificate) LoadFromBytes ¶
func (c *X509Certificate) LoadFromBytes(certBytes []byte) (err error)
func (*X509Certificate) LoadFromFile ¶
func (c *X509Certificate) LoadFromFile(loadFile files.File) (err error)
func (*X509Certificate) LoadFromFilePath ¶
func (c *X509Certificate) LoadFromFilePath(loadPath string) (err error)
func (*X509Certificate) LoadFromString ¶
func (c *X509Certificate) LoadFromString(certString string) (err error)
func (*X509Certificate) MustGetAsPemBytes ¶
func (x *X509Certificate) MustGetAsPemBytes() (pemBytes []byte)
func (*X509Certificate) MustGetAsPemString ¶
func (x *X509Certificate) MustGetAsPemString() (pemString string)
func (*X509Certificate) MustGetExpiryDate ¶
func (x *X509Certificate) MustGetExpiryDate() (expiryDate *time.Time)
func (*X509Certificate) MustGetIssuerString ¶
func (x *X509Certificate) MustGetIssuerString() (issuerString string)
func (*X509Certificate) MustGetNativeCertificate ¶
func (x *X509Certificate) MustGetNativeCertificate() (nativeCertificate *x509.Certificate)
func (*X509Certificate) MustGetNativeX509Certificate ¶
func (x *X509Certificate) MustGetNativeX509Certificate() (nativeX509Certificate *x509.Certificate)
func (*X509Certificate) MustGetSubjectString ¶
func (x *X509Certificate) MustGetSubjectString() (subject string)
func (*X509Certificate) MustGetVersion ¶
func (x *X509Certificate) MustGetVersion() (version int)
func (*X509Certificate) MustIsExpired ¶
func (x *X509Certificate) MustIsExpired() (isExpired bool)
func (*X509Certificate) MustIsIntermediateCertificate ¶
func (x *X509Certificate) MustIsIntermediateCertificate() (isIntermediateCertificate bool)
func (*X509Certificate) MustIsRootCa ¶
func (x *X509Certificate) MustIsRootCa(verbose bool) (isRootCa bool)
func (*X509Certificate) MustIsSignedByCertificateFile ¶
func (x *X509Certificate) MustIsSignedByCertificateFile(signingCertificate files.File, verbose bool) (isSignedBy bool)
func (*X509Certificate) MustIsV1 ¶
func (x *X509Certificate) MustIsV1() (isV1 bool)
func (*X509Certificate) MustIsV3 ¶
func (x *X509Certificate) MustIsV3() (isV3 bool)
func (*X509Certificate) MustLoadFromBytes ¶
func (x *X509Certificate) MustLoadFromBytes(certBytes []byte)
func (*X509Certificate) MustLoadFromFile ¶
func (x *X509Certificate) MustLoadFromFile(loadFile files.File)
func (*X509Certificate) MustLoadFromFilePath ¶
func (x *X509Certificate) MustLoadFromFilePath(loadPath string)
func (*X509Certificate) MustLoadFromString ¶
func (x *X509Certificate) MustLoadFromString(certString string)
func (*X509Certificate) MustSetNativeX509Certificate ¶
func (x *X509Certificate) MustSetNativeX509Certificate(nativeX509Certificate *x509.Certificate)
func (*X509Certificate) MustWritePemToFile ¶
func (x *X509Certificate) MustWritePemToFile(outputFile files.File, verbose bool)
func (*X509Certificate) MustWritePemToFilePath ¶
func (x *X509Certificate) MustWritePemToFilePath(filePath string, verbose bool)
func (*X509Certificate) SetNativeX509Certificate ¶
func (x *X509Certificate) SetNativeX509Certificate(nativeX509Certificate *x509.Certificate) (err error)
func (*X509Certificate) WritePemToFile ¶
func (c *X509Certificate) WritePemToFile(outputFile files.File, verbose bool) (err error)
func (*X509Certificate) WritePemToFilePath ¶
func (c *X509Certificate) WritePemToFilePath(filePath string, verbose bool) (err error)
type X509CertificateFile ¶
func GetX509CertificateFileFromFile ¶
func GetX509CertificateFileFromFile(input files.File) (x509CertificateFile *X509CertificateFile, err error)
func GetX509CertificateFileFromPath ¶
func GetX509CertificateFileFromPath(inputPath string) (x509CertificateFile *X509CertificateFile, err error)
func MustGetX509CertificateFileFromFile ¶
func MustGetX509CertificateFileFromFile(input files.File) (x509CertificateFile *X509CertificateFile)
func MustGetX509CertificateFileFromPath ¶
func MustGetX509CertificateFileFromPath(inputPath string) (x509CertificateFile *X509CertificateFile)
func NewX509CertificateFile ¶
func NewX509CertificateFile() (x *X509CertificateFile)
func (*X509CertificateFile) GetAsX509Certificate ¶
func (x *X509CertificateFile) GetAsX509Certificate() (cert *X509Certificate, err error)
func (*X509CertificateFile) IsX509Certificate ¶
func (x *X509CertificateFile) IsX509Certificate(verbose bool) (isX509Certificate bool, err error)
func (*X509CertificateFile) IsX509CertificateSignedByCertificateFile ¶
func (*X509CertificateFile) IsX509IntermediateCertificate ¶
func (x *X509CertificateFile) IsX509IntermediateCertificate() (isIntermediateCertificate bool, err error)
func (*X509CertificateFile) IsX509RootCertificate ¶
func (x *X509CertificateFile) IsX509RootCertificate(verbose bool) (isX509Certificate bool, err error)
func (*X509CertificateFile) IsX509v3 ¶
func (x *X509CertificateFile) IsX509v3() (isX509v3 bool, err error)
func (*X509CertificateFile) MustGetAsX509Certificate ¶
func (x *X509CertificateFile) MustGetAsX509Certificate() (cert *X509Certificate)
func (*X509CertificateFile) MustIsExpired ¶
func (x *X509CertificateFile) MustIsExpired(verbose bool) (isExpired bool, err error)
func (*X509CertificateFile) MustIsX509Certificate ¶
func (x *X509CertificateFile) MustIsX509Certificate(verbose bool) (isX509Certificate bool)
func (*X509CertificateFile) MustIsX509CertificateSignedByCertificateFile ¶
func (x *X509CertificateFile) MustIsX509CertificateSignedByCertificateFile(signingCertificateFile files.File, verbose bool) (isSignedBy bool)
func (*X509CertificateFile) MustIsX509IntermediateCertificate ¶
func (x *X509CertificateFile) MustIsX509IntermediateCertificate() (isIntermediateCertificate bool)
func (*X509CertificateFile) MustIsX509RootCertificate ¶
func (x *X509CertificateFile) MustIsX509RootCertificate(verbose bool) (isX509Certificate bool)
func (*X509CertificateFile) MustIsX509v3 ¶
func (x *X509CertificateFile) MustIsX509v3() (isX509v3 bool)
type X509CertificateHandler ¶ added in v0.228.0
type X509CertificateHandler interface {
CreateRootCaCertificate(options *X509CreateCertificateOptions) (caCert *x509.Certificate, caPrivateKey crypto.PrivateKey, err error)
}
func GetNativeX509CertificateHandler ¶ added in v0.228.0
func GetNativeX509CertificateHandler() (Handler X509CertificateHandler)
type X509CertificatesService ¶
type X509CertificatesService struct { }
func NewX509CertificatesService ¶
func NewX509CertificatesService() (x *X509CertificatesService)
func X509Certificates ¶
func X509Certificates() (x509Certificaets *X509CertificatesService)
func (*X509CertificatesService) CreateIntermediateCertificateIntoDirectory ¶
func (c *X509CertificatesService) CreateIntermediateCertificateIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory, err error)
func (*X509CertificatesService) CreateRootCaAndaddToGopass ¶
func (c *X509CertificatesService) CreateRootCaAndaddToGopass(createOptions *X509CreateCertificateOptions, gopassOptions *parameteroptions.GopassSecretOptions) (err error)
func (*X509CertificatesService) CreateRootCaIntoDirectory ¶
func (c *X509CertificatesService) CreateRootCaIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory, err error)
func (*X509CertificatesService) CreateSignedCertificate ¶
func (c *X509CertificatesService) CreateSignedCertificate(createOptions *X509CreateCertificateOptions) (err error)
func (*X509CertificatesService) CreateSignedIntermediateCertificateAndAddToGopass ¶
func (c *X509CertificatesService) CreateSignedIntermediateCertificateAndAddToGopass(createOptions *X509CreateCertificateOptions, rootCaInGopass *parameteroptions.GopassSecretOptions, intermediateGopassOptions *parameteroptions.GopassSecretOptions) (err error)
func (*X509CertificatesService) CreateSigningRequestFile ¶
func (c *X509CertificatesService) CreateSigningRequestFile(signOptions *X509SignCertificateOptions) (err error)
func (*X509CertificatesService) GetNextCaSerialNumberAsStringFromGopass ¶
func (c *X509CertificatesService) GetNextCaSerialNumberAsStringFromGopass(verbose bool) (serial string, err error)
func (*X509CertificatesService) IsCertificateFileSignedByCertificateFile ¶
func (c *X509CertificatesService) IsCertificateFileSignedByCertificateFile(thisCertificateFile *X509CertificateFile, isSignedByThisCertificateFile files.File, verbose bool) (isSignedBy bool, err error)
func (*X509CertificatesService) MustCreateIntermediateCertificateIntoDirectory ¶
func (c *X509CertificatesService) MustCreateIntermediateCertificateIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory)
func (*X509CertificatesService) MustCreateRootCAAndAddToGopass ¶
func (c *X509CertificatesService) MustCreateRootCAAndAddToGopass(createOptions *X509CreateCertificateOptions, gopassOptions *parameteroptions.GopassSecretOptions)
func (*X509CertificatesService) MustCreateRootCaAndaddToGopass ¶
func (x *X509CertificatesService) MustCreateRootCaAndaddToGopass(createOptions *X509CreateCertificateOptions, gopassOptions *parameteroptions.GopassSecretOptions)
func (*X509CertificatesService) MustCreateRootCaIntoDirectory ¶
func (c *X509CertificatesService) MustCreateRootCaIntoDirectory(createOptions *X509CreateCertificateOptions) (directoryContianingCreatedCertAndKey files.Directory)
func (*X509CertificatesService) MustCreateSignedCertificate ¶
func (c *X509CertificatesService) MustCreateSignedCertificate(createOptions *X509CreateCertificateOptions)
func (*X509CertificatesService) MustCreateSignedIntermediateCertificateAndAddToGopass ¶
func (c *X509CertificatesService) MustCreateSignedIntermediateCertificateAndAddToGopass(createOptions *X509CreateCertificateOptions, rootCaInGopass *parameteroptions.GopassSecretOptions, intermediateGopassOptions *parameteroptions.GopassSecretOptions)
func (*X509CertificatesService) MustCreateSigningRequestFile ¶
func (x *X509CertificatesService) MustCreateSigningRequestFile(signOptions *X509SignCertificateOptions)
func (*X509CertificatesService) MustGetNextCaSerialNumberAsStringFromGopass ¶
func (x *X509CertificatesService) MustGetNextCaSerialNumberAsStringFromGopass(verbose bool) (serial string)
func (*X509CertificatesService) MustIsCertificateFileSignedByCertificateFile ¶
func (x *X509CertificatesService) MustIsCertificateFileSignedByCertificateFile(thisCertificateFile *X509CertificateFile, isSignedByThisCertificateFile files.File, verbose bool) (isSignedBy bool)
func (*X509CertificatesService) MustSignIntermediateCertificate ¶
func (c *X509CertificatesService) MustSignIntermediateCertificate(signOptions *X509SignCertificateOptions)
func (*X509CertificatesService) SignIntermediateCertificate ¶
func (c *X509CertificatesService) SignIntermediateCertificate(signOptions *X509SignCertificateOptions) (err error)
type X509CreateCertificateOptions ¶
type X509CreateCertificateOptions struct { UseTemporaryDirectory bool // Certificate Attributes CommonName string // the CN field CountryName string // the C field Locality string // the L field AdditionalSans []string KeyOutputFilePath string CertificateOutputFilePath string IntermediateCertificateInGopass *parameteroptions.GopassSecretOptions // TODO move to Gopass OverwriteExistingCertificateInGopass bool Verbose bool }
func NewX509CreateCertificateOptions ¶
func NewX509CreateCertificateOptions() (x *X509CreateCertificateOptions)
func (*X509CreateCertificateOptions) GetAdditionalSans ¶
func (x *X509CreateCertificateOptions) GetAdditionalSans() (additionalSans []string, err error)
func (*X509CreateCertificateOptions) GetCertificateOutputFilePath ¶
func (o *X509CreateCertificateOptions) GetCertificateOutputFilePath() (certOutputPath string, err error)
func (*X509CreateCertificateOptions) GetCommonName ¶
func (o *X509CreateCertificateOptions) GetCommonName() (commonName string, err error)
func (*X509CreateCertificateOptions) GetCountryName ¶
func (o *X509CreateCertificateOptions) GetCountryName() (countryName string, err error)
func (*X509CreateCertificateOptions) GetDeepCopy ¶
func (o *X509CreateCertificateOptions) GetDeepCopy() (copy *X509CreateCertificateOptions)
func (*X509CreateCertificateOptions) GetKeyOutputFilePath ¶
func (o *X509CreateCertificateOptions) GetKeyOutputFilePath() (keyOutputPath string, err error)
func (*X509CreateCertificateOptions) GetLocality ¶
func (x *X509CreateCertificateOptions) GetLocality() (locality string, err error)
func (*X509CreateCertificateOptions) GetLocallity ¶
func (o *X509CreateCertificateOptions) GetLocallity() (locality string, err error)
func (*X509CreateCertificateOptions) GetOverwriteExistingCertificateInGopass ¶
func (x *X509CreateCertificateOptions) GetOverwriteExistingCertificateInGopass() (overwriteExistingCertificateInGopass bool, err error)
func (*X509CreateCertificateOptions) GetSubjectStringForOpenssl ¶
func (o *X509CreateCertificateOptions) GetSubjectStringForOpenssl() (subjectString string, err error)
func (*X509CreateCertificateOptions) GetUseTemporaryDirectory ¶
func (o *X509CreateCertificateOptions) GetUseTemporaryDirectory() (UseTemporaryDirectory bool)
func (*X509CreateCertificateOptions) GetVerbose ¶
func (x *X509CreateCertificateOptions) GetVerbose() (verbose bool, err error)
func (*X509CreateCertificateOptions) IsCertificateOutputFilePathSet ¶
func (o *X509CreateCertificateOptions) IsCertificateOutputFilePathSet() (isSet bool)
func (*X509CreateCertificateOptions) MustGetAdditionalSans ¶
func (x *X509CreateCertificateOptions) MustGetAdditionalSans() (additionalSans []string)
func (*X509CreateCertificateOptions) MustGetCertificateOutputFilePath ¶
func (x *X509CreateCertificateOptions) MustGetCertificateOutputFilePath() (certOutputPath string)
func (*X509CreateCertificateOptions) MustGetCommonName ¶
func (x *X509CreateCertificateOptions) MustGetCommonName() (commonName string)
func (*X509CreateCertificateOptions) MustGetCountryName ¶
func (x *X509CreateCertificateOptions) MustGetCountryName() (countryName string)
func (*X509CreateCertificateOptions) MustGetKeyOutputFilePath ¶
func (x *X509CreateCertificateOptions) MustGetKeyOutputFilePath() (keyOutputPath string)
func (*X509CreateCertificateOptions) MustGetLocality ¶
func (x *X509CreateCertificateOptions) MustGetLocality() (locality string)
func (*X509CreateCertificateOptions) MustGetLocallity ¶
func (x *X509CreateCertificateOptions) MustGetLocallity() (locality string)
func (*X509CreateCertificateOptions) MustGetOverwriteExistingCertificateInGopass ¶
func (x *X509CreateCertificateOptions) MustGetOverwriteExistingCertificateInGopass() (overwriteExistingCertificateInGopass bool)
func (*X509CreateCertificateOptions) MustGetSubjectStringForOpenssl ¶
func (x *X509CreateCertificateOptions) MustGetSubjectStringForOpenssl() (subjectString string)
func (*X509CreateCertificateOptions) MustGetVerbose ¶
func (x *X509CreateCertificateOptions) MustGetVerbose() (verbose bool)
func (*X509CreateCertificateOptions) MustSetAdditionalSans ¶
func (x *X509CreateCertificateOptions) MustSetAdditionalSans(additionalSans []string)
func (*X509CreateCertificateOptions) MustSetCertificateOutputFilePath ¶
func (x *X509CreateCertificateOptions) MustSetCertificateOutputFilePath(certificateOutputFilePath string)
func (*X509CreateCertificateOptions) MustSetCommonName ¶
func (x *X509CreateCertificateOptions) MustSetCommonName(commonName string)
func (*X509CreateCertificateOptions) MustSetCountryName ¶
func (x *X509CreateCertificateOptions) MustSetCountryName(countryName string)
func (*X509CreateCertificateOptions) MustSetKeyOutputFilePath ¶
func (x *X509CreateCertificateOptions) MustSetKeyOutputFilePath(keyOutputFilePath string)
func (*X509CreateCertificateOptions) MustSetLocality ¶
func (x *X509CreateCertificateOptions) MustSetLocality(locality string)
func (*X509CreateCertificateOptions) MustSetOverwriteExistingCertificateInGopass ¶
func (x *X509CreateCertificateOptions) MustSetOverwriteExistingCertificateInGopass(overwriteExistingCertificateInGopass bool)
func (*X509CreateCertificateOptions) MustSetUseTemporaryDirectory ¶
func (x *X509CreateCertificateOptions) MustSetUseTemporaryDirectory(useTemporaryDirectory bool)
func (*X509CreateCertificateOptions) MustSetVerbose ¶
func (x *X509CreateCertificateOptions) MustSetVerbose(verbose bool)
func (*X509CreateCertificateOptions) SetAdditionalSans ¶
func (x *X509CreateCertificateOptions) SetAdditionalSans(additionalSans []string) (err error)
func (*X509CreateCertificateOptions) SetCertificateOutputFilePath ¶
func (x *X509CreateCertificateOptions) SetCertificateOutputFilePath(certificateOutputFilePath string) (err error)
func (*X509CreateCertificateOptions) SetCommonName ¶
func (x *X509CreateCertificateOptions) SetCommonName(commonName string) (err error)
func (*X509CreateCertificateOptions) SetCountryName ¶
func (x *X509CreateCertificateOptions) SetCountryName(countryName string) (err error)
func (*X509CreateCertificateOptions) SetKeyOutputFilePath ¶
func (x *X509CreateCertificateOptions) SetKeyOutputFilePath(keyOutputFilePath string) (err error)
func (*X509CreateCertificateOptions) SetLocality ¶
func (x *X509CreateCertificateOptions) SetLocality(locality string) (err error)
func (*X509CreateCertificateOptions) SetOverwriteExistingCertificateInGopass ¶
func (x *X509CreateCertificateOptions) SetOverwriteExistingCertificateInGopass(overwriteExistingCertificateInGopass bool) (err error)
func (*X509CreateCertificateOptions) SetUseTemporaryDirectory ¶
func (x *X509CreateCertificateOptions) SetUseTemporaryDirectory(useTemporaryDirectory bool) (err error)
func (*X509CreateCertificateOptions) SetVerbose ¶
func (x *X509CreateCertificateOptions) SetVerbose(verbose bool) (err error)
type X509SignCertificateOptions ¶
type X509SignCertificateOptions struct { CertFileUsedForSigning files.File KeyFileUsedForSigning files.File KeyFileToSign files.File OutputCertificateFile files.File SigningRequestFile files.File CommonName string CountryName string Locality string Verbose bool }
func NewX509SignCertificateOptions ¶
func NewX509SignCertificateOptions() (deepCopy *X509SignCertificateOptions)
func (*X509SignCertificateOptions) GetCertFileUsedForSigning ¶
func (o *X509SignCertificateOptions) GetCertFileUsedForSigning() (keyFileForSigning files.File, err error)
func (*X509SignCertificateOptions) GetCommonName ¶
func (o *X509SignCertificateOptions) GetCommonName() (commonName string, err error)
func (*X509SignCertificateOptions) GetCountryName ¶
func (o *X509SignCertificateOptions) GetCountryName() (countryName string, err error)
func (*X509SignCertificateOptions) GetDeepCopy ¶
func (o *X509SignCertificateOptions) GetDeepCopy() (deepCopy *X509SignCertificateOptions)
func (*X509SignCertificateOptions) GetKeyFileToSign ¶
func (o *X509SignCertificateOptions) GetKeyFileToSign() (keyFileForSigning files.File, err error)
func (*X509SignCertificateOptions) GetKeyFileToSignPath ¶
func (o *X509SignCertificateOptions) GetKeyFileToSignPath() (keyFileForSigningPath string, err error)
func (*X509SignCertificateOptions) GetKeyFileUsedForSigning ¶
func (o *X509SignCertificateOptions) GetKeyFileUsedForSigning() (keyFileForSigning files.File, err error)
func (*X509SignCertificateOptions) GetLocality ¶
func (o *X509SignCertificateOptions) GetLocality() (locality string, err error)
func (*X509SignCertificateOptions) GetOutputCertificateFile ¶
func (o *X509SignCertificateOptions) GetOutputCertificateFile() (keyFileForSigning files.File, err error)
func (*X509SignCertificateOptions) GetSigningRequestFile ¶
func (o *X509SignCertificateOptions) GetSigningRequestFile() (signingRequestFile files.File, err error)
func (*X509SignCertificateOptions) GetSigningRequestFilePath ¶
func (o *X509SignCertificateOptions) GetSigningRequestFilePath() (signingRequestFilePath string, err error)
func (*X509SignCertificateOptions) GetSubjectToSign ¶
func (o *X509SignCertificateOptions) GetSubjectToSign() (subjectToSign string, err error)
func (*X509SignCertificateOptions) GetVerbose ¶
func (x *X509SignCertificateOptions) GetVerbose() (verbose bool, err error)
func (*X509SignCertificateOptions) MustGetCertFileUsedForSigning ¶
func (x *X509SignCertificateOptions) MustGetCertFileUsedForSigning() (keyFileForSigning files.File)
func (*X509SignCertificateOptions) MustGetCommonName ¶
func (x *X509SignCertificateOptions) MustGetCommonName() (commonName string)
func (*X509SignCertificateOptions) MustGetCountryName ¶
func (x *X509SignCertificateOptions) MustGetCountryName() (countryName string)
func (*X509SignCertificateOptions) MustGetKeyFileToSign ¶
func (x *X509SignCertificateOptions) MustGetKeyFileToSign() (keyFileForSigning files.File)
func (*X509SignCertificateOptions) MustGetKeyFileToSignPath ¶
func (x *X509SignCertificateOptions) MustGetKeyFileToSignPath() (keyFileForSigningPath string)
func (*X509SignCertificateOptions) MustGetKeyFileUsedForSigning ¶
func (x *X509SignCertificateOptions) MustGetKeyFileUsedForSigning() (keyFileForSigning files.File)
func (*X509SignCertificateOptions) MustGetLocality ¶
func (x *X509SignCertificateOptions) MustGetLocality() (locality string)
func (*X509SignCertificateOptions) MustGetOutputCertificateFile ¶
func (x *X509SignCertificateOptions) MustGetOutputCertificateFile() (keyFileForSigning files.File)
func (*X509SignCertificateOptions) MustGetSigningRequestFile ¶
func (x *X509SignCertificateOptions) MustGetSigningRequestFile() (signingRequestFile files.File)
func (*X509SignCertificateOptions) MustGetSigningRequestFilePath ¶
func (x *X509SignCertificateOptions) MustGetSigningRequestFilePath() (signingRequestFilePath string)
func (*X509SignCertificateOptions) MustGetSubjectToSign ¶
func (x *X509SignCertificateOptions) MustGetSubjectToSign() (subjectToSign string)
func (*X509SignCertificateOptions) MustGetVerbose ¶
func (x *X509SignCertificateOptions) MustGetVerbose() (verbose bool)
func (*X509SignCertificateOptions) MustSetCertFileUsedForSigning ¶
func (x *X509SignCertificateOptions) MustSetCertFileUsedForSigning(certFileUsedForSigning files.File)
func (*X509SignCertificateOptions) MustSetCommonName ¶
func (x *X509SignCertificateOptions) MustSetCommonName(commonName string)
func (*X509SignCertificateOptions) MustSetCountryName ¶
func (x *X509SignCertificateOptions) MustSetCountryName(countryName string)
func (*X509SignCertificateOptions) MustSetKeyFileToSign ¶
func (x *X509SignCertificateOptions) MustSetKeyFileToSign(keyFileToSign files.File)
func (*X509SignCertificateOptions) MustSetKeyFileUsedForSigning ¶
func (x *X509SignCertificateOptions) MustSetKeyFileUsedForSigning(keyFileUsedForSigning files.File)
func (*X509SignCertificateOptions) MustSetLocality ¶
func (x *X509SignCertificateOptions) MustSetLocality(locality string)
func (*X509SignCertificateOptions) MustSetOutputCertificateFile ¶
func (x *X509SignCertificateOptions) MustSetOutputCertificateFile(outputCertificateFile files.File)
func (*X509SignCertificateOptions) MustSetSigningRequestFile ¶
func (x *X509SignCertificateOptions) MustSetSigningRequestFile(signingRequestFile files.File)
func (*X509SignCertificateOptions) MustSetVerbose ¶
func (x *X509SignCertificateOptions) MustSetVerbose(verbose bool)
func (*X509SignCertificateOptions) SetCertFileUsedForSigning ¶
func (x *X509SignCertificateOptions) SetCertFileUsedForSigning(certFileUsedForSigning files.File) (err error)
func (*X509SignCertificateOptions) SetCommonName ¶
func (x *X509SignCertificateOptions) SetCommonName(commonName string) (err error)
func (*X509SignCertificateOptions) SetCountryName ¶
func (x *X509SignCertificateOptions) SetCountryName(countryName string) (err error)
func (*X509SignCertificateOptions) SetKeyFileToSign ¶
func (x *X509SignCertificateOptions) SetKeyFileToSign(keyFileToSign files.File) (err error)
func (*X509SignCertificateOptions) SetKeyFileUsedForSigning ¶
func (x *X509SignCertificateOptions) SetKeyFileUsedForSigning(keyFileUsedForSigning files.File) (err error)
func (*X509SignCertificateOptions) SetLocality ¶
func (x *X509SignCertificateOptions) SetLocality(locality string) (err error)
func (*X509SignCertificateOptions) SetOutputCertificateFile ¶
func (x *X509SignCertificateOptions) SetOutputCertificateFile(outputCertificateFile files.File) (err error)
func (*X509SignCertificateOptions) SetSigningRequestFile ¶
func (x *X509SignCertificateOptions) SetSigningRequestFile(signingRequestFile files.File) (err error)
func (*X509SignCertificateOptions) SetVerbose ¶
func (x *X509SignCertificateOptions) SetVerbose(verbose bool) (err error)
Click to show internal directories.
Click to hide internal directories.