mirror of
https://github.com/hanzoai/ca.git
synced 2026-11-03 18:08:27 +00:00
1020 lines
40 KiB
Go
1020 lines
40 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.6.2
|
|
// - protoc v7.36.2
|
|
// source: ca.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
context "context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.64.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion9
|
|
|
|
const (
|
|
CA_RegisterIssuer_FullMethodName = "/pb.CA/RegisterIssuer"
|
|
CA_UpdateIssuer_FullMethodName = "/pb.CA/UpdateIssuer"
|
|
CA_ImportIssuer_FullMethodName = "/pb.CA/ImportIssuer"
|
|
CA_ActivateIssuer_FullMethodName = "/pb.CA/ActivateIssuer"
|
|
CA_GetIssuer_FullMethodName = "/pb.CA/GetIssuer"
|
|
CA_ListIssuers_FullMethodName = "/pb.CA/ListIssuers"
|
|
CA_RegisterRoot_FullMethodName = "/pb.CA/RegisterRoot"
|
|
CA_ListRoots_FullMethodName = "/pb.CA/ListRoots"
|
|
CA_RegisterProfile_FullMethodName = "/pb.CA/RegisterProfile"
|
|
CA_GetProfile_FullMethodName = "/pb.CA/GetProfile"
|
|
CA_ListProfiles_FullMethodName = "/pb.CA/ListProfiles"
|
|
CA_DeleteProfile_FullMethodName = "/pb.CA/DeleteProfile"
|
|
CA_SignCertificate_FullMethodName = "/pb.CA/SignCertificate"
|
|
CA_GetCertificate_FullMethodName = "/pb.CA/GetCertificate"
|
|
CA_ListCertificates_FullMethodName = "/pb.CA/ListCertificates"
|
|
CA_UpdateCertificateLabel_FullMethodName = "/pb.CA/UpdateCertificateLabel"
|
|
CA_RevokeCertificate_FullMethodName = "/pb.CA/RevokeCertificate"
|
|
CA_ListRevokedCertificates_FullMethodName = "/pb.CA/ListRevokedCertificates"
|
|
CA_GetCRL_FullMethodName = "/pb.CA/GetCRL"
|
|
CA_PublishCrls_FullMethodName = "/pb.CA/PublishCrls"
|
|
CA_SignOCSP_FullMethodName = "/pb.CA/SignOCSP"
|
|
CA_GetSummary_FullMethodName = "/pb.CA/GetSummary"
|
|
)
|
|
|
|
// CAClient is the client API for CA service.
|
|
//
|
|
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
|
//
|
|
// CA is the Certification Authority service of the tenants: the users and
|
|
// the API keys of an org, on the wfe listener. Every request is scoped by
|
|
// the org of the caller's token and an optional ProjectID; the requests
|
|
// carry no OrgID. The service holds no issuer key: it forwards every call
|
|
// to privpb.Backend with the org of the token (DESIGN.md section 2.1),
|
|
// which is also the API of the service identities (the RA, the operator).
|
|
// Methods declare the roles and the API key scopes they require.
|
|
type CAClient interface {
|
|
// RegisterIssuer creates a new issuing authority for the tenant.
|
|
// The private key is generated in the configured crypto provider and
|
|
// never leaves it. The certificate is signed by the parent issuer,
|
|
// self-signed for Root type, or, when no parent is available, the issuer
|
|
// is created in Pending status with a CSR to be signed externally.
|
|
RegisterIssuer(ctx context.Context, in *RegisterIssuerRequest, opts ...grpc.CallOption) (*Issuer, error)
|
|
// UpdateIssuer updates the runtime configuration or status of an issuer.
|
|
// Status transitions: Active -> Archived -> Destroyed.
|
|
UpdateIssuer(ctx context.Context, in *UpdateIssuerRequest, opts ...grpc.CallOption) (*Issuer, error)
|
|
// ImportIssuer registers an issuer from an existing certificate and key.
|
|
// The key is either referenced by a crypto provider URI or provided as
|
|
// PEM and stored protected. Used for bring-your-own-CA.
|
|
ImportIssuer(ctx context.Context, in *ImportIssuerRequest, opts ...grpc.CallOption) (*Issuer, error)
|
|
// ActivateIssuer sets the externally signed certificate for a Pending
|
|
// issuer and activates it.
|
|
ActivateIssuer(ctx context.Context, in *ActivateIssuerRequest, opts ...grpc.CallOption) (*Issuer, error)
|
|
// GetIssuer returns the issuer by ID, label or IKID
|
|
GetIssuer(ctx context.Context, in *GetIssuerRequest, opts ...grpc.CallOption) (*Issuer, error)
|
|
// ListIssuers returns the tenant's issuers
|
|
ListIssuers(ctx context.Context, in *ListIssuersRequest, opts ...grpc.CallOption) (*IssuersResponse, error)
|
|
// RegisterRoot registers an external trust anchor for the tenant.
|
|
// Roots created via RegisterIssuer are registered automatically.
|
|
RegisterRoot(ctx context.Context, in *RegisterRootRequest, opts ...grpc.CallOption) (*RootCertificate, error)
|
|
// ListRoots returns the tenant's trust anchors
|
|
ListRoots(ctx context.Context, in *ListRootsRequest, opts ...grpc.CallOption) (*RootsResponse, error)
|
|
// RegisterProfile creates or replaces a certificate profile, keyed by
|
|
// (org, ProjectID, Label)
|
|
RegisterProfile(ctx context.Context, in *RegisterProfileRequest, opts ...grpc.CallOption) (*CertProfile, error)
|
|
// GetProfile returns the profile by ID or label
|
|
GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*CertProfile, error)
|
|
// ListProfiles returns the tenant's profiles
|
|
ListProfiles(ctx context.Context, in *ListProfilesRequest, opts ...grpc.CallOption) (*ProfilesResponse, error)
|
|
// DeleteProfile deletes a profile
|
|
DeleteProfile(ctx context.Context, in *DeleteProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
// SignCertificate signs a certificate request with the profile's issuer
|
|
SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
|
// GetCertificate returns the certificate by ID, SKID, Sha256 or
|
|
// issuer and serial number
|
|
GetCertificate(ctx context.Context, in *GetCertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
|
// ListCertificates returns the tenant's certificates, newest first
|
|
ListCertificates(ctx context.Context, in *ListCertificatesRequest, opts ...grpc.CallOption) (*CertificatesResponse, error)
|
|
// UpdateCertificateLabel updates the client-provided label and metadata
|
|
UpdateCertificateLabel(ctx context.Context, in *UpdateCertificateLabelRequest, opts ...grpc.CallOption) (*CertificateResponse, error)
|
|
// RevokeCertificate revokes the certificate
|
|
RevokeCertificate(ctx context.Context, in *RevokeCertificateRequest, opts ...grpc.CallOption) (*RevokedCertificateResponse, error)
|
|
// ListRevokedCertificates returns the tenant's revoked certificates
|
|
ListRevokedCertificates(ctx context.Context, in *ListRevokedCertificatesRequest, opts ...grpc.CallOption) (*RevokedCertificatesResponse, error)
|
|
// GetCRL returns the current CRL of the issuer
|
|
GetCRL(ctx context.Context, in *GetCrlRequest, opts ...grpc.CallOption) (*CrlResponse, error)
|
|
// PublishCrls generates and publishes CRLs on demand: the CRL of the
|
|
// issuer of the IKID, or the due CRLs of the issuers in scope. A project
|
|
// Admin and an API key restricted to a project publish for their project.
|
|
// The scheduled CRL renewal task publishes the due CRLs of every org
|
|
// in-process.
|
|
PublishCrls(ctx context.Context, in *PublishCrlsRequest, opts ...grpc.CallOption) (*CrlsResponse, error)
|
|
// SignOCSP signs an OCSP response; the AIA OCSP responder calls
|
|
// Backend.SignOCSP.
|
|
SignOCSP(ctx context.Context, in *OCSPRequest, opts ...grpc.CallOption) (*OCSPResponse, error)
|
|
// GetSummary returns the counts of the tenant's dashboard: the issuers
|
|
// by status, the certificates by status and by expiry, and the issuers
|
|
// that publish CRLs by the state of their CRL, for the org or for one
|
|
// project. Without a project, a member with project grants only gets
|
|
// the org-wide rows and those of its projects, as the lists do.
|
|
GetSummary(ctx context.Context, in *GetSummaryRequest, opts ...grpc.CallOption) (*SummaryResponse, error)
|
|
}
|
|
|
|
type cAClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCAClient(cc grpc.ClientConnInterface) CAClient {
|
|
return &cAClient{cc}
|
|
}
|
|
|
|
func (c *cAClient) RegisterIssuer(ctx context.Context, in *RegisterIssuerRequest, opts ...grpc.CallOption) (*Issuer, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Issuer)
|
|
err := c.cc.Invoke(ctx, CA_RegisterIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) UpdateIssuer(ctx context.Context, in *UpdateIssuerRequest, opts ...grpc.CallOption) (*Issuer, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Issuer)
|
|
err := c.cc.Invoke(ctx, CA_UpdateIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ImportIssuer(ctx context.Context, in *ImportIssuerRequest, opts ...grpc.CallOption) (*Issuer, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Issuer)
|
|
err := c.cc.Invoke(ctx, CA_ImportIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ActivateIssuer(ctx context.Context, in *ActivateIssuerRequest, opts ...grpc.CallOption) (*Issuer, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Issuer)
|
|
err := c.cc.Invoke(ctx, CA_ActivateIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) GetIssuer(ctx context.Context, in *GetIssuerRequest, opts ...grpc.CallOption) (*Issuer, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(Issuer)
|
|
err := c.cc.Invoke(ctx, CA_GetIssuer_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ListIssuers(ctx context.Context, in *ListIssuersRequest, opts ...grpc.CallOption) (*IssuersResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(IssuersResponse)
|
|
err := c.cc.Invoke(ctx, CA_ListIssuers_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) RegisterRoot(ctx context.Context, in *RegisterRootRequest, opts ...grpc.CallOption) (*RootCertificate, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RootCertificate)
|
|
err := c.cc.Invoke(ctx, CA_RegisterRoot_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ListRoots(ctx context.Context, in *ListRootsRequest, opts ...grpc.CallOption) (*RootsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RootsResponse)
|
|
err := c.cc.Invoke(ctx, CA_ListRoots_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) RegisterProfile(ctx context.Context, in *RegisterProfileRequest, opts ...grpc.CallOption) (*CertProfile, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertProfile)
|
|
err := c.cc.Invoke(ctx, CA_RegisterProfile_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) GetProfile(ctx context.Context, in *GetProfileRequest, opts ...grpc.CallOption) (*CertProfile, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertProfile)
|
|
err := c.cc.Invoke(ctx, CA_GetProfile_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ListProfiles(ctx context.Context, in *ListProfilesRequest, opts ...grpc.CallOption) (*ProfilesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(ProfilesResponse)
|
|
err := c.cc.Invoke(ctx, CA_ListProfiles_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) DeleteProfile(ctx context.Context, in *DeleteProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(emptypb.Empty)
|
|
err := c.cc.Invoke(ctx, CA_DeleteProfile_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) SignCertificate(ctx context.Context, in *SignCertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertificateResponse)
|
|
err := c.cc.Invoke(ctx, CA_SignCertificate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) GetCertificate(ctx context.Context, in *GetCertificateRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertificateResponse)
|
|
err := c.cc.Invoke(ctx, CA_GetCertificate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ListCertificates(ctx context.Context, in *ListCertificatesRequest, opts ...grpc.CallOption) (*CertificatesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertificatesResponse)
|
|
err := c.cc.Invoke(ctx, CA_ListCertificates_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) UpdateCertificateLabel(ctx context.Context, in *UpdateCertificateLabelRequest, opts ...grpc.CallOption) (*CertificateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CertificateResponse)
|
|
err := c.cc.Invoke(ctx, CA_UpdateCertificateLabel_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) RevokeCertificate(ctx context.Context, in *RevokeCertificateRequest, opts ...grpc.CallOption) (*RevokedCertificateResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RevokedCertificateResponse)
|
|
err := c.cc.Invoke(ctx, CA_RevokeCertificate_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) ListRevokedCertificates(ctx context.Context, in *ListRevokedCertificatesRequest, opts ...grpc.CallOption) (*RevokedCertificatesResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(RevokedCertificatesResponse)
|
|
err := c.cc.Invoke(ctx, CA_ListRevokedCertificates_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) GetCRL(ctx context.Context, in *GetCrlRequest, opts ...grpc.CallOption) (*CrlResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CrlResponse)
|
|
err := c.cc.Invoke(ctx, CA_GetCRL_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) PublishCrls(ctx context.Context, in *PublishCrlsRequest, opts ...grpc.CallOption) (*CrlsResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(CrlsResponse)
|
|
err := c.cc.Invoke(ctx, CA_PublishCrls_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) SignOCSP(ctx context.Context, in *OCSPRequest, opts ...grpc.CallOption) (*OCSPResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(OCSPResponse)
|
|
err := c.cc.Invoke(ctx, CA_SignOCSP_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
func (c *cAClient) GetSummary(ctx context.Context, in *GetSummaryRequest, opts ...grpc.CallOption) (*SummaryResponse, error) {
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
|
out := new(SummaryResponse)
|
|
err := c.cc.Invoke(ctx, CA_GetSummary_FullMethodName, in, out, cOpts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
return out, nil
|
|
}
|
|
|
|
// CAServer is the server API for CA service.
|
|
// All implementations should embed UnimplementedCAServer
|
|
// for forward compatibility.
|
|
//
|
|
// CA is the Certification Authority service of the tenants: the users and
|
|
// the API keys of an org, on the wfe listener. Every request is scoped by
|
|
// the org of the caller's token and an optional ProjectID; the requests
|
|
// carry no OrgID. The service holds no issuer key: it forwards every call
|
|
// to privpb.Backend with the org of the token (DESIGN.md section 2.1),
|
|
// which is also the API of the service identities (the RA, the operator).
|
|
// Methods declare the roles and the API key scopes they require.
|
|
type CAServer interface {
|
|
// RegisterIssuer creates a new issuing authority for the tenant.
|
|
// The private key is generated in the configured crypto provider and
|
|
// never leaves it. The certificate is signed by the parent issuer,
|
|
// self-signed for Root type, or, when no parent is available, the issuer
|
|
// is created in Pending status with a CSR to be signed externally.
|
|
RegisterIssuer(context.Context, *RegisterIssuerRequest) (*Issuer, error)
|
|
// UpdateIssuer updates the runtime configuration or status of an issuer.
|
|
// Status transitions: Active -> Archived -> Destroyed.
|
|
UpdateIssuer(context.Context, *UpdateIssuerRequest) (*Issuer, error)
|
|
// ImportIssuer registers an issuer from an existing certificate and key.
|
|
// The key is either referenced by a crypto provider URI or provided as
|
|
// PEM and stored protected. Used for bring-your-own-CA.
|
|
ImportIssuer(context.Context, *ImportIssuerRequest) (*Issuer, error)
|
|
// ActivateIssuer sets the externally signed certificate for a Pending
|
|
// issuer and activates it.
|
|
ActivateIssuer(context.Context, *ActivateIssuerRequest) (*Issuer, error)
|
|
// GetIssuer returns the issuer by ID, label or IKID
|
|
GetIssuer(context.Context, *GetIssuerRequest) (*Issuer, error)
|
|
// ListIssuers returns the tenant's issuers
|
|
ListIssuers(context.Context, *ListIssuersRequest) (*IssuersResponse, error)
|
|
// RegisterRoot registers an external trust anchor for the tenant.
|
|
// Roots created via RegisterIssuer are registered automatically.
|
|
RegisterRoot(context.Context, *RegisterRootRequest) (*RootCertificate, error)
|
|
// ListRoots returns the tenant's trust anchors
|
|
ListRoots(context.Context, *ListRootsRequest) (*RootsResponse, error)
|
|
// RegisterProfile creates or replaces a certificate profile, keyed by
|
|
// (org, ProjectID, Label)
|
|
RegisterProfile(context.Context, *RegisterProfileRequest) (*CertProfile, error)
|
|
// GetProfile returns the profile by ID or label
|
|
GetProfile(context.Context, *GetProfileRequest) (*CertProfile, error)
|
|
// ListProfiles returns the tenant's profiles
|
|
ListProfiles(context.Context, *ListProfilesRequest) (*ProfilesResponse, error)
|
|
// DeleteProfile deletes a profile
|
|
DeleteProfile(context.Context, *DeleteProfileRequest) (*emptypb.Empty, error)
|
|
// SignCertificate signs a certificate request with the profile's issuer
|
|
SignCertificate(context.Context, *SignCertificateRequest) (*CertificateResponse, error)
|
|
// GetCertificate returns the certificate by ID, SKID, Sha256 or
|
|
// issuer and serial number
|
|
GetCertificate(context.Context, *GetCertificateRequest) (*CertificateResponse, error)
|
|
// ListCertificates returns the tenant's certificates, newest first
|
|
ListCertificates(context.Context, *ListCertificatesRequest) (*CertificatesResponse, error)
|
|
// UpdateCertificateLabel updates the client-provided label and metadata
|
|
UpdateCertificateLabel(context.Context, *UpdateCertificateLabelRequest) (*CertificateResponse, error)
|
|
// RevokeCertificate revokes the certificate
|
|
RevokeCertificate(context.Context, *RevokeCertificateRequest) (*RevokedCertificateResponse, error)
|
|
// ListRevokedCertificates returns the tenant's revoked certificates
|
|
ListRevokedCertificates(context.Context, *ListRevokedCertificatesRequest) (*RevokedCertificatesResponse, error)
|
|
// GetCRL returns the current CRL of the issuer
|
|
GetCRL(context.Context, *GetCrlRequest) (*CrlResponse, error)
|
|
// PublishCrls generates and publishes CRLs on demand: the CRL of the
|
|
// issuer of the IKID, or the due CRLs of the issuers in scope. A project
|
|
// Admin and an API key restricted to a project publish for their project.
|
|
// The scheduled CRL renewal task publishes the due CRLs of every org
|
|
// in-process.
|
|
PublishCrls(context.Context, *PublishCrlsRequest) (*CrlsResponse, error)
|
|
// SignOCSP signs an OCSP response; the AIA OCSP responder calls
|
|
// Backend.SignOCSP.
|
|
SignOCSP(context.Context, *OCSPRequest) (*OCSPResponse, error)
|
|
// GetSummary returns the counts of the tenant's dashboard: the issuers
|
|
// by status, the certificates by status and by expiry, and the issuers
|
|
// that publish CRLs by the state of their CRL, for the org or for one
|
|
// project. Without a project, a member with project grants only gets
|
|
// the org-wide rows and those of its projects, as the lists do.
|
|
GetSummary(context.Context, *GetSummaryRequest) (*SummaryResponse, error)
|
|
}
|
|
|
|
// UnimplementedCAServer should be embedded to have
|
|
// forward compatible implementations.
|
|
//
|
|
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
|
// pointer dereference when methods are called.
|
|
type UnimplementedCAServer struct{}
|
|
|
|
func (UnimplementedCAServer) RegisterIssuer(context.Context, *RegisterIssuerRequest) (*Issuer, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RegisterIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServer) UpdateIssuer(context.Context, *UpdateIssuerRequest) (*Issuer, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ImportIssuer(context.Context, *ImportIssuerRequest) (*Issuer, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ImportIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ActivateIssuer(context.Context, *ActivateIssuerRequest) (*Issuer, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ActivateIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServer) GetIssuer(context.Context, *GetIssuerRequest) (*Issuer, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetIssuer not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ListIssuers(context.Context, *ListIssuersRequest) (*IssuersResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListIssuers not implemented")
|
|
}
|
|
func (UnimplementedCAServer) RegisterRoot(context.Context, *RegisterRootRequest) (*RootCertificate, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RegisterRoot not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ListRoots(context.Context, *ListRootsRequest) (*RootsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListRoots not implemented")
|
|
}
|
|
func (UnimplementedCAServer) RegisterProfile(context.Context, *RegisterProfileRequest) (*CertProfile, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RegisterProfile not implemented")
|
|
}
|
|
func (UnimplementedCAServer) GetProfile(context.Context, *GetProfileRequest) (*CertProfile, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetProfile not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ListProfiles(context.Context, *ListProfilesRequest) (*ProfilesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListProfiles not implemented")
|
|
}
|
|
func (UnimplementedCAServer) DeleteProfile(context.Context, *DeleteProfileRequest) (*emptypb.Empty, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method DeleteProfile not implemented")
|
|
}
|
|
func (UnimplementedCAServer) SignCertificate(context.Context, *SignCertificateRequest) (*CertificateResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SignCertificate not implemented")
|
|
}
|
|
func (UnimplementedCAServer) GetCertificate(context.Context, *GetCertificateRequest) (*CertificateResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCertificate not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ListCertificates(context.Context, *ListCertificatesRequest) (*CertificatesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListCertificates not implemented")
|
|
}
|
|
func (UnimplementedCAServer) UpdateCertificateLabel(context.Context, *UpdateCertificateLabelRequest) (*CertificateResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method UpdateCertificateLabel not implemented")
|
|
}
|
|
func (UnimplementedCAServer) RevokeCertificate(context.Context, *RevokeCertificateRequest) (*RevokedCertificateResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method RevokeCertificate not implemented")
|
|
}
|
|
func (UnimplementedCAServer) ListRevokedCertificates(context.Context, *ListRevokedCertificatesRequest) (*RevokedCertificatesResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method ListRevokedCertificates not implemented")
|
|
}
|
|
func (UnimplementedCAServer) GetCRL(context.Context, *GetCrlRequest) (*CrlResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetCRL not implemented")
|
|
}
|
|
func (UnimplementedCAServer) PublishCrls(context.Context, *PublishCrlsRequest) (*CrlsResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method PublishCrls not implemented")
|
|
}
|
|
func (UnimplementedCAServer) SignOCSP(context.Context, *OCSPRequest) (*OCSPResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method SignOCSP not implemented")
|
|
}
|
|
func (UnimplementedCAServer) GetSummary(context.Context, *GetSummaryRequest) (*SummaryResponse, error) {
|
|
return nil, status.Error(codes.Unimplemented, "method GetSummary not implemented")
|
|
}
|
|
func (UnimplementedCAServer) testEmbeddedByValue() {}
|
|
|
|
// UnsafeCAServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CAServer will
|
|
// result in compilation errors.
|
|
type UnsafeCAServer interface {
|
|
mustEmbedUnimplementedCAServer()
|
|
}
|
|
|
|
func RegisterCAServer(s grpc.ServiceRegistrar, srv CAServer) {
|
|
// If the following call panics, it indicates UnimplementedCAServer was
|
|
// embedded by pointer and is nil. This will cause panics if an
|
|
// unimplemented method is ever invoked, so we test this at initialization
|
|
// time to prevent it from happening at runtime later due to I/O.
|
|
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
|
t.testEmbeddedByValue()
|
|
}
|
|
s.RegisterService(&CA_ServiceDesc, srv)
|
|
}
|
|
|
|
func _CA_RegisterIssuer_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(RegisterIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).RegisterIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_RegisterIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).RegisterIssuer(ctx, req.(*RegisterIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_UpdateIssuer_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(UpdateIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).UpdateIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_UpdateIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).UpdateIssuer(ctx, req.(*UpdateIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ImportIssuer_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ImportIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ImportIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ImportIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ImportIssuer(ctx, req.(*ImportIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ActivateIssuer_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ActivateIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ActivateIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ActivateIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ActivateIssuer(ctx, req.(*ActivateIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_GetIssuer_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(GetIssuerRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).GetIssuer(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_GetIssuer_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).GetIssuer(ctx, req.(*GetIssuerRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ListIssuers_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ListIssuersRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ListIssuers(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ListIssuers_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ListIssuers(ctx, req.(*ListIssuersRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_RegisterRoot_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(RegisterRootRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).RegisterRoot(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_RegisterRoot_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).RegisterRoot(ctx, req.(*RegisterRootRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ListRoots_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ListRootsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ListRoots(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ListRoots_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ListRoots(ctx, req.(*ListRootsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_RegisterProfile_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(RegisterProfileRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).RegisterProfile(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_RegisterProfile_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).RegisterProfile(ctx, req.(*RegisterProfileRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_GetProfile_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(GetProfileRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).GetProfile(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_GetProfile_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).GetProfile(ctx, req.(*GetProfileRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ListProfiles_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ListProfilesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ListProfiles(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ListProfiles_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ListProfiles(ctx, req.(*ListProfilesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_DeleteProfile_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(DeleteProfileRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).DeleteProfile(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_DeleteProfile_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).DeleteProfile(ctx, req.(*DeleteProfileRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_SignCertificate_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(SignCertificateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).SignCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_SignCertificate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).SignCertificate(ctx, req.(*SignCertificateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_GetCertificate_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(GetCertificateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).GetCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_GetCertificate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).GetCertificate(ctx, req.(*GetCertificateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ListCertificates_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ListCertificatesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ListCertificates(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ListCertificates_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ListCertificates(ctx, req.(*ListCertificatesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_UpdateCertificateLabel_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(UpdateCertificateLabelRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).UpdateCertificateLabel(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_UpdateCertificateLabel_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).UpdateCertificateLabel(ctx, req.(*UpdateCertificateLabelRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_RevokeCertificate_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(RevokeCertificateRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).RevokeCertificate(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_RevokeCertificate_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).RevokeCertificate(ctx, req.(*RevokeCertificateRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_ListRevokedCertificates_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(ListRevokedCertificatesRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).ListRevokedCertificates(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_ListRevokedCertificates_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).ListRevokedCertificates(ctx, req.(*ListRevokedCertificatesRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_GetCRL_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(GetCrlRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).GetCRL(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_GetCRL_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).GetCRL(ctx, req.(*GetCrlRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_PublishCrls_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(PublishCrlsRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).PublishCrls(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_PublishCrls_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).PublishCrls(ctx, req.(*PublishCrlsRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_SignOCSP_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(OCSPRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).SignOCSP(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_SignOCSP_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).SignOCSP(ctx, req.(*OCSPRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
func _CA_GetSummary_Handler(srv any, ctx context.Context, dec func(any) error, interceptor grpc.UnaryServerInterceptor) (any, error) {
|
|
in := new(GetSummaryRequest)
|
|
if err := dec(in); err != nil {
|
|
return nil, err
|
|
}
|
|
if interceptor == nil {
|
|
return srv.(CAServer).GetSummary(ctx, in)
|
|
}
|
|
info := &grpc.UnaryServerInfo{
|
|
Server: srv,
|
|
FullMethod: CA_GetSummary_FullMethodName,
|
|
}
|
|
handler := func(ctx context.Context, req any) (any, error) {
|
|
return srv.(CAServer).GetSummary(ctx, req.(*GetSummaryRequest))
|
|
}
|
|
return interceptor(ctx, in, info, handler)
|
|
}
|
|
|
|
// CA_ServiceDesc is the grpc.ServiceDesc for CA service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var CA_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "pb.CA",
|
|
HandlerType: (*CAServer)(nil),
|
|
Methods: []grpc.MethodDesc{
|
|
{
|
|
MethodName: "RegisterIssuer",
|
|
Handler: _CA_RegisterIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateIssuer",
|
|
Handler: _CA_UpdateIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "ImportIssuer",
|
|
Handler: _CA_ImportIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "ActivateIssuer",
|
|
Handler: _CA_ActivateIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetIssuer",
|
|
Handler: _CA_GetIssuer_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListIssuers",
|
|
Handler: _CA_ListIssuers_Handler,
|
|
},
|
|
{
|
|
MethodName: "RegisterRoot",
|
|
Handler: _CA_RegisterRoot_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListRoots",
|
|
Handler: _CA_ListRoots_Handler,
|
|
},
|
|
{
|
|
MethodName: "RegisterProfile",
|
|
Handler: _CA_RegisterProfile_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetProfile",
|
|
Handler: _CA_GetProfile_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListProfiles",
|
|
Handler: _CA_ListProfiles_Handler,
|
|
},
|
|
{
|
|
MethodName: "DeleteProfile",
|
|
Handler: _CA_DeleteProfile_Handler,
|
|
},
|
|
{
|
|
MethodName: "SignCertificate",
|
|
Handler: _CA_SignCertificate_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCertificate",
|
|
Handler: _CA_GetCertificate_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListCertificates",
|
|
Handler: _CA_ListCertificates_Handler,
|
|
},
|
|
{
|
|
MethodName: "UpdateCertificateLabel",
|
|
Handler: _CA_UpdateCertificateLabel_Handler,
|
|
},
|
|
{
|
|
MethodName: "RevokeCertificate",
|
|
Handler: _CA_RevokeCertificate_Handler,
|
|
},
|
|
{
|
|
MethodName: "ListRevokedCertificates",
|
|
Handler: _CA_ListRevokedCertificates_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetCRL",
|
|
Handler: _CA_GetCRL_Handler,
|
|
},
|
|
{
|
|
MethodName: "PublishCrls",
|
|
Handler: _CA_PublishCrls_Handler,
|
|
},
|
|
{
|
|
MethodName: "SignOCSP",
|
|
Handler: _CA_SignOCSP_Handler,
|
|
},
|
|
{
|
|
MethodName: "GetSummary",
|
|
Handler: _CA_GetSummary_Handler,
|
|
},
|
|
},
|
|
Streams: []grpc.StreamDesc{},
|
|
Metadata: "ca.proto",
|
|
}
|