|
|
@ -189,7 +189,6 @@ type mockAuthority struct {
|
|
|
|
authorizeRenewToken func(ctx context.Context, ott string) (*x509.Certificate, error)
|
|
|
|
authorizeRenewToken func(ctx context.Context, ott string) (*x509.Certificate, error)
|
|
|
|
getTLSOptions func() *authority.TLSOptions
|
|
|
|
getTLSOptions func() *authority.TLSOptions
|
|
|
|
root func(shasum string) (*x509.Certificate, error)
|
|
|
|
root func(shasum string) (*x509.Certificate, error)
|
|
|
|
sign func(cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error)
|
|
|
|
|
|
|
|
signWithContext func(ctx context.Context, cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error)
|
|
|
|
signWithContext func(ctx context.Context, cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error)
|
|
|
|
renew func(cert *x509.Certificate) ([]*x509.Certificate, error)
|
|
|
|
renew func(cert *x509.Certificate) ([]*x509.Certificate, error)
|
|
|
|
rekey func(oldCert *x509.Certificate, pk crypto.PublicKey) ([]*x509.Certificate, error)
|
|
|
|
rekey func(oldCert *x509.Certificate, pk crypto.PublicKey) ([]*x509.Certificate, error)
|
|
|
@ -252,13 +251,6 @@ func (m *mockAuthority) Root(shasum string) (*x509.Certificate, error) {
|
|
|
|
return m.ret1.(*x509.Certificate), m.err
|
|
|
|
return m.ret1.(*x509.Certificate), m.err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (m *mockAuthority) Sign(cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error) {
|
|
|
|
|
|
|
|
if m.sign != nil {
|
|
|
|
|
|
|
|
return m.sign(cr, opts, signOpts...)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return []*x509.Certificate{m.ret1.(*x509.Certificate), m.ret2.(*x509.Certificate)}, m.err
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func (m *mockAuthority) SignWithContext(ctx context.Context, cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error) {
|
|
|
|
func (m *mockAuthority) SignWithContext(ctx context.Context, cr *x509.CertificateRequest, opts provisioner.SignOptions, signOpts ...provisioner.SignOption) ([]*x509.Certificate, error) {
|
|
|
|
if m.signWithContext != nil {
|
|
|
|
if m.signWithContext != nil {
|
|
|
|
return m.signWithContext(ctx, cr, opts, signOpts...)
|
|
|
|
return m.signWithContext(ctx, cr, opts, signOpts...)
|
|
|
|