2021-02-12 11:03:08 +00:00
|
|
|
package scep
|
|
|
|
|
|
|
|
import (
|
2021-02-26 13:00:47 +00:00
|
|
|
"context"
|
2023-05-26 21:52:24 +00:00
|
|
|
"crypto"
|
|
|
|
"crypto/x509"
|
2021-02-12 16:02:39 +00:00
|
|
|
"time"
|
|
|
|
|
|
|
|
"github.com/smallstep/certificates/authority/provisioner"
|
2021-02-12 11:03:08 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
// Provisioner is an interface that implements a subset of the provisioner.Interface --
|
|
|
|
// only those methods required by the SCEP api/authority.
|
|
|
|
type Provisioner interface {
|
2021-02-26 13:00:47 +00:00
|
|
|
AuthorizeSign(ctx context.Context, token string) ([]provisioner.SignOption, error)
|
2021-02-12 16:02:39 +00:00
|
|
|
GetName() string
|
|
|
|
DefaultTLSCertDuration() time.Duration
|
|
|
|
GetOptions() *provisioner.Options
|
2021-03-06 23:50:00 +00:00
|
|
|
GetCapabilities() []string
|
2022-01-19 10:31:33 +00:00
|
|
|
ShouldIncludeRootInChain() bool
|
2023-05-26 21:52:24 +00:00
|
|
|
GetDecrypter() (*x509.Certificate, crypto.Decrypter)
|
2022-01-14 09:48:23 +00:00
|
|
|
GetContentEncryptionAlgorithm() int
|
2023-05-01 20:09:42 +00:00
|
|
|
ValidateChallenge(ctx context.Context, challenge, transactionID string) error
|
2021-02-12 11:03:08 +00:00
|
|
|
}
|