// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// 	protoc-gen-go v1.36.12
// 	protoc        (unknown)
// source: signer/signer.proto

package signer

import (
	reflect "reflect"
	sync "sync"
	unsafe "unsafe"

	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
	emptypb "google.golang.org/protobuf/types/known/emptypb"
)

const (
	// Verify that this generated code is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
	// Verify that runtime/protoimpl is sufficiently up-to-date.
	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)

// Hash identifies the digest algorithm used to produce SignRequest.digest.
type Hash int32

const (
	Hash_HASH_UNSPECIFIED Hash = 0
	Hash_HASH_SHA256      Hash = 1
	Hash_HASH_SHA384      Hash = 2
	Hash_HASH_SHA512      Hash = 3
)

// Enum value maps for Hash.
var (
	Hash_name = map[int32]string{
		0: "HASH_UNSPECIFIED",
		1: "HASH_SHA256",
		2: "HASH_SHA384",
		3: "HASH_SHA512",
	}
	Hash_value = map[string]int32{
		"HASH_UNSPECIFIED": 0,
		"HASH_SHA256":      1,
		"HASH_SHA384":      2,
		"HASH_SHA512":      3,
	}
)

func (x Hash) Enum() *Hash {
	p := new(Hash)
	*p = x
	return p
}

func (x Hash) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Hash) Descriptor() protoreflect.EnumDescriptor {
	return file_signer_signer_proto_enumTypes[0].Descriptor()
}

func (Hash) Type() protoreflect.EnumType {
	return &file_signer_signer_proto_enumTypes[0]
}

func (x Hash) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Hash.Descriptor instead.
func (Hash) EnumDescriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{0}
}

// Scheme identifies the signature algorithm the signer should produce.
type Scheme int32

const (
	Scheme_SCHEME_UNSPECIFIED  Scheme = 0
	Scheme_SCHEME_RSA_PKCS1V15 Scheme = 1
	Scheme_SCHEME_RSA_PSS      Scheme = 2
)

// Enum value maps for Scheme.
var (
	Scheme_name = map[int32]string{
		0: "SCHEME_UNSPECIFIED",
		1: "SCHEME_RSA_PKCS1V15",
		2: "SCHEME_RSA_PSS",
	}
	Scheme_value = map[string]int32{
		"SCHEME_UNSPECIFIED":  0,
		"SCHEME_RSA_PKCS1V15": 1,
		"SCHEME_RSA_PSS":      2,
	}
)

func (x Scheme) Enum() *Scheme {
	p := new(Scheme)
	*p = x
	return p
}

func (x Scheme) String() string {
	return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}

func (Scheme) Descriptor() protoreflect.EnumDescriptor {
	return file_signer_signer_proto_enumTypes[1].Descriptor()
}

func (Scheme) Type() protoreflect.EnumType {
	return &file_signer_signer_proto_enumTypes[1]
}

func (x Scheme) Number() protoreflect.EnumNumber {
	return protoreflect.EnumNumber(x)
}

// Deprecated: Use Scheme.Descriptor instead.
func (Scheme) EnumDescriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{1}
}

// CertificateResponse is returned by GetCertificate.
type CertificateResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// PEM-encoded X.509 certificate.
	CertPem       []byte `protobuf:"bytes,1,opt,name=cert_pem,json=certPem,proto3" json:"cert_pem,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *CertificateResponse) Reset() {
	*x = CertificateResponse{}
	mi := &file_signer_signer_proto_msgTypes[0]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *CertificateResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*CertificateResponse) ProtoMessage() {}

func (x *CertificateResponse) ProtoReflect() protoreflect.Message {
	mi := &file_signer_signer_proto_msgTypes[0]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use CertificateResponse.ProtoReflect.Descriptor instead.
func (*CertificateResponse) Descriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{0}
}

func (x *CertificateResponse) GetCertPem() []byte {
	if x != nil {
		return x.CertPem
	}
	return nil
}

// PublicKeyResponse is returned by GetPublicKey.
type PublicKeyResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// PEM-encoded SubjectPublicKeyInfo (PKIX).
	PubKeyPem     []byte `protobuf:"bytes,1,opt,name=pub_key_pem,json=pubKeyPem,proto3" json:"pub_key_pem,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *PublicKeyResponse) Reset() {
	*x = PublicKeyResponse{}
	mi := &file_signer_signer_proto_msgTypes[1]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *PublicKeyResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*PublicKeyResponse) ProtoMessage() {}

func (x *PublicKeyResponse) ProtoReflect() protoreflect.Message {
	mi := &file_signer_signer_proto_msgTypes[1]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use PublicKeyResponse.ProtoReflect.Descriptor instead.
func (*PublicKeyResponse) Descriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{1}
}

func (x *PublicKeyResponse) GetPubKeyPem() []byte {
	if x != nil {
		return x.PubKeyPem
	}
	return nil
}

// SignRequest is sent for the Sign RPC.
type SignRequest struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Precomputed digest of the data to sign. Length must match `hash`.
	Digest []byte `protobuf:"bytes,1,opt,name=digest,proto3" json:"digest,omitempty"`
	// Hash algorithm used to produce `digest`.
	Hash Hash `protobuf:"varint,2,opt,name=hash,proto3,enum=signerapi.Hash" json:"hash,omitempty"`
	// Signature scheme the signer should produce.
	Scheme        Scheme `protobuf:"varint,3,opt,name=scheme,proto3,enum=signerapi.Scheme" json:"scheme,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SignRequest) Reset() {
	*x = SignRequest{}
	mi := &file_signer_signer_proto_msgTypes[2]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SignRequest) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SignRequest) ProtoMessage() {}

func (x *SignRequest) ProtoReflect() protoreflect.Message {
	mi := &file_signer_signer_proto_msgTypes[2]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SignRequest.ProtoReflect.Descriptor instead.
func (*SignRequest) Descriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{2}
}

func (x *SignRequest) GetDigest() []byte {
	if x != nil {
		return x.Digest
	}
	return nil
}

func (x *SignRequest) GetHash() Hash {
	if x != nil {
		return x.Hash
	}
	return Hash_HASH_UNSPECIFIED
}

func (x *SignRequest) GetScheme() Scheme {
	if x != nil {
		return x.Scheme
	}
	return Scheme_SCHEME_UNSPECIFIED
}

// SignResponse is returned by the Sign RPC.
type SignResponse struct {
	state protoimpl.MessageState `protogen:"open.v1"`
	// Raw signature bytes, modulus-sized.
	Signature     []byte `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	unknownFields protoimpl.UnknownFields
	sizeCache     protoimpl.SizeCache
}

func (x *SignResponse) Reset() {
	*x = SignResponse{}
	mi := &file_signer_signer_proto_msgTypes[3]
	ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
	ms.StoreMessageInfo(mi)
}

func (x *SignResponse) String() string {
	return protoimpl.X.MessageStringOf(x)
}

func (*SignResponse) ProtoMessage() {}

func (x *SignResponse) ProtoReflect() protoreflect.Message {
	mi := &file_signer_signer_proto_msgTypes[3]
	if x != nil {
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
		if ms.LoadMessageInfo() == nil {
			ms.StoreMessageInfo(mi)
		}
		return ms
	}
	return mi.MessageOf(x)
}

// Deprecated: Use SignResponse.ProtoReflect.Descriptor instead.
func (*SignResponse) Descriptor() ([]byte, []int) {
	return file_signer_signer_proto_rawDescGZIP(), []int{3}
}

func (x *SignResponse) GetSignature() []byte {
	if x != nil {
		return x.Signature
	}
	return nil
}

var File_signer_signer_proto protoreflect.FileDescriptor

const file_signer_signer_proto_rawDesc = "" +
	"\n" +
	"\x13signer/signer.proto\x12\tsignerapi\x1a\x1bgoogle/protobuf/empty.proto\"0\n" +
	"\x13CertificateResponse\x12\x19\n" +
	"\bcert_pem\x18\x01 \x01(\fR\acertPem\"3\n" +
	"\x11PublicKeyResponse\x12\x1e\n" +
	"\vpub_key_pem\x18\x01 \x01(\fR\tpubKeyPem\"u\n" +
	"\vSignRequest\x12\x16\n" +
	"\x06digest\x18\x01 \x01(\fR\x06digest\x12#\n" +
	"\x04hash\x18\x02 \x01(\x0e2\x0f.signerapi.HashR\x04hash\x12)\n" +
	"\x06scheme\x18\x03 \x01(\x0e2\x11.signerapi.SchemeR\x06scheme\",\n" +
	"\fSignResponse\x12\x1c\n" +
	"\tsignature\x18\x01 \x01(\fR\tsignature*O\n" +
	"\x04Hash\x12\x14\n" +
	"\x10HASH_UNSPECIFIED\x10\x00\x12\x0f\n" +
	"\vHASH_SHA256\x10\x01\x12\x0f\n" +
	"\vHASH_SHA384\x10\x02\x12\x0f\n" +
	"\vHASH_SHA512\x10\x03*M\n" +
	"\x06Scheme\x12\x16\n" +
	"\x12SCHEME_UNSPECIFIED\x10\x00\x12\x17\n" +
	"\x13SCHEME_RSA_PKCS1V15\x10\x01\x12\x12\n" +
	"\x0eSCHEME_RSA_PSS\x10\x022\xd8\x01\n" +
	"\rSignerService\x12H\n" +
	"\x0eGetCertificate\x12\x16.google.protobuf.Empty\x1a\x1e.signerapi.CertificateResponse\x12D\n" +
	"\fGetPublicKey\x12\x16.google.protobuf.Empty\x1a\x1c.signerapi.PublicKeyResponse\x127\n" +
	"\x04Sign\x12\x16.signerapi.SignRequest\x1a\x17.signerapi.SignResponseBL\n" +
	"\x14dev.talos.api.signerZ4github.com/siderolabs/talos/pkg/machinery/api/signerb\x06proto3"

var (
	file_signer_signer_proto_rawDescOnce sync.Once
	file_signer_signer_proto_rawDescData []byte
)

func file_signer_signer_proto_rawDescGZIP() []byte {
	file_signer_signer_proto_rawDescOnce.Do(func() {
		file_signer_signer_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_signer_signer_proto_rawDesc), len(file_signer_signer_proto_rawDesc)))
	})
	return file_signer_signer_proto_rawDescData
}

var file_signer_signer_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
var file_signer_signer_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
var file_signer_signer_proto_goTypes = []any{
	(Hash)(0),                   // 0: signerapi.Hash
	(Scheme)(0),                 // 1: signerapi.Scheme
	(*CertificateResponse)(nil), // 2: signerapi.CertificateResponse
	(*PublicKeyResponse)(nil),   // 3: signerapi.PublicKeyResponse
	(*SignRequest)(nil),         // 4: signerapi.SignRequest
	(*SignResponse)(nil),        // 5: signerapi.SignResponse
	(*emptypb.Empty)(nil),       // 6: google.protobuf.Empty
}
var file_signer_signer_proto_depIdxs = []int32{
	0, // 0: signerapi.SignRequest.hash:type_name -> signerapi.Hash
	1, // 1: signerapi.SignRequest.scheme:type_name -> signerapi.Scheme
	6, // 2: signerapi.SignerService.GetCertificate:input_type -> google.protobuf.Empty
	6, // 3: signerapi.SignerService.GetPublicKey:input_type -> google.protobuf.Empty
	4, // 4: signerapi.SignerService.Sign:input_type -> signerapi.SignRequest
	2, // 5: signerapi.SignerService.GetCertificate:output_type -> signerapi.CertificateResponse
	3, // 6: signerapi.SignerService.GetPublicKey:output_type -> signerapi.PublicKeyResponse
	5, // 7: signerapi.SignerService.Sign:output_type -> signerapi.SignResponse
	5, // [5:8] is the sub-list for method output_type
	2, // [2:5] is the sub-list for method input_type
	2, // [2:2] is the sub-list for extension type_name
	2, // [2:2] is the sub-list for extension extendee
	0, // [0:2] is the sub-list for field type_name
}

func init() { file_signer_signer_proto_init() }
func file_signer_signer_proto_init() {
	if File_signer_signer_proto != nil {
		return
	}
	type x struct{}
	out := protoimpl.TypeBuilder{
		File: protoimpl.DescBuilder{
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
			RawDescriptor: unsafe.Slice(unsafe.StringData(file_signer_signer_proto_rawDesc), len(file_signer_signer_proto_rawDesc)),
			NumEnums:      2,
			NumMessages:   4,
			NumExtensions: 0,
			NumServices:   1,
		},
		GoTypes:           file_signer_signer_proto_goTypes,
		DependencyIndexes: file_signer_signer_proto_depIdxs,
		EnumInfos:         file_signer_signer_proto_enumTypes,
		MessageInfos:      file_signer_signer_proto_msgTypes,
	}.Build()
	File_signer_signer_proto = out.File
	file_signer_signer_proto_goTypes = nil
	file_signer_signer_proto_depIdxs = nil
}
