Commit 07187493 authored by Alberto Bertogli's avatar Alberto Bertogli

Update auto-generated code

This patch updates the auto-generated code to match the latest tooling
versions.

In particular, the protobufs are regenerated, and the new version no
longer supports unkeyed literals, so some minor changes are needed.

Other than that, the cipher list is extended with the latest ciphers.
parent f399fe3e
This diff is collapsed.
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: domaininfo.proto
// DO NOT EDIT!
/*
Package domaininfo is a generated protocol buffer package.
It is generated from these files:
domaininfo.proto
It has these top-level messages:
Domain
*/
package domaininfo
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
......@@ -26,7 +18,7 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type SecLevel int32
......@@ -47,6 +39,7 @@ var SecLevel_name = map[int32]string{
2: "TLS_INSECURE",
3: "TLS_SECURE",
}
var SecLevel_value = map[string]int32{
"PLAIN": 0,
"TLS_CLIENT": 1,
......@@ -57,40 +50,87 @@ var SecLevel_value = map[string]int32{
func (x SecLevel) String() string {
return proto.EnumName(SecLevel_name, int32(x))
}
func (SecLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (SecLevel) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_622326b6f7a15daa, []int{0}
}
type Domain struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
// Security level for mail coming from this domain (they send to us).
IncomingSecLevel SecLevel `protobuf:"varint,2,opt,name=incoming_sec_level,json=incomingSecLevel,enum=domaininfo.SecLevel" json:"incoming_sec_level,omitempty"`
IncomingSecLevel SecLevel `protobuf:"varint,2,opt,name=incoming_sec_level,json=incomingSecLevel,proto3,enum=domaininfo.SecLevel" json:"incoming_sec_level,omitempty"`
// Security level for mail going to this domain (we send to them).
OutgoingSecLevel SecLevel `protobuf:"varint,3,opt,name=outgoing_sec_level,json=outgoingSecLevel,enum=domaininfo.SecLevel" json:"outgoing_sec_level,omitempty"`
OutgoingSecLevel SecLevel `protobuf:"varint,3,opt,name=outgoing_sec_level,json=outgoingSecLevel,proto3,enum=domaininfo.SecLevel" json:"outgoing_sec_level,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Domain) Reset() { *m = Domain{} }
func (m *Domain) String() string { return proto.CompactTextString(m) }
func (*Domain) ProtoMessage() {}
func (*Domain) Descriptor() ([]byte, []int) {
return fileDescriptor_622326b6f7a15daa, []int{0}
}
func (m *Domain) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Domain.Unmarshal(m, b)
}
func (m *Domain) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Domain.Marshal(b, m, deterministic)
}
func (m *Domain) XXX_Merge(src proto.Message) {
xxx_messageInfo_Domain.Merge(m, src)
}
func (m *Domain) XXX_Size() int {
return xxx_messageInfo_Domain.Size(m)
}
func (m *Domain) XXX_DiscardUnknown() {
xxx_messageInfo_Domain.DiscardUnknown(m)
}
func (m *Domain) Reset() { *m = Domain{} }
func (m *Domain) String() string { return proto.CompactTextString(m) }
func (*Domain) ProtoMessage() {}
func (*Domain) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
var xxx_messageInfo_Domain proto.InternalMessageInfo
func (m *Domain) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Domain) GetIncomingSecLevel() SecLevel {
if m != nil {
return m.IncomingSecLevel
}
return SecLevel_PLAIN
}
func (m *Domain) GetOutgoingSecLevel() SecLevel {
if m != nil {
return m.OutgoingSecLevel
}
return SecLevel_PLAIN
}
func init() {
proto.RegisterType((*Domain)(nil), "domaininfo.Domain")
proto.RegisterEnum("domaininfo.SecLevel", SecLevel_name, SecLevel_value)
proto.RegisterType((*Domain)(nil), "domaininfo.Domain")
}
func init() { proto.RegisterFile("domaininfo.proto", fileDescriptor0) }
func init() { proto.RegisterFile("domaininfo.proto", fileDescriptor_622326b6f7a15daa) }
var fileDescriptor0 = []byte{
// 189 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xc9, 0xcf, 0x4d,
var fileDescriptor_622326b6f7a15daa = []byte{
// 190 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x48, 0xc9, 0xcf, 0x4d,
0xcc, 0xcc, 0xcb, 0xcc, 0x4b, 0xcb, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x42, 0x88,
0x28, 0x2d, 0x61, 0xe4, 0x62, 0x73, 0x01, 0x73, 0x85, 0x84, 0xb8, 0x58, 0xf2, 0x12, 0x73, 0x53,
0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0xc0, 0x6c, 0x21, 0x27, 0x2e, 0xa1, 0xcc, 0xbc, 0xe4,
0xfc, 0xdc, 0xcc, 0xbc, 0xf4, 0xf8, 0xe2, 0xd4, 0xe4, 0xf8, 0x9c, 0xd4, 0xb2, 0xd4, 0x1c, 0x09,
0x26, 0xa0, 0x0a, 0x3e, 0x23, 0x11, 0x3d, 0x24, 0x93, 0x83, 0x53, 0x93, 0x7d, 0x40, 0x72, 0x41,
0x02, 0x30, 0xf5, 0x30, 0x11, 0x90, 0x19, 0xf9, 0xa5, 0x25, 0xe9, 0xf9, 0xa8, 0x66, 0x30, 0xe3,
0x33, 0x03, 0xa6, 0x1e, 0x26, 0xa2, 0xe5, 0xce, 0xc5, 0x01, 0x37, 0x8f, 0x93, 0x8b, 0x35, 0xc0,
0xc7, 0xd1, 0xd3, 0x4f, 0x80, 0x41, 0x88, 0x8f, 0x8b, 0x2b, 0xc4, 0x27, 0x38, 0xde, 0xd9, 0xc7,
0xd3, 0xd5, 0x2f, 0x44, 0x80, 0x51, 0x48, 0x80, 0x8b, 0x07, 0xc4, 0xf7, 0xf4, 0x0b, 0x76, 0x75,
0x0e, 0x0d, 0x72, 0x15, 0x60, 0x82, 0xa9, 0x80, 0xf2, 0x99, 0x93, 0xd8, 0xc0, 0x41, 0x60, 0x0c,
0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x78, 0x65, 0x5b, 0x16, 0x01, 0x00, 0x00,
0x26, 0x05, 0x46, 0x0d, 0x3e, 0x23, 0x11, 0x3d, 0x24, 0x93, 0x83, 0x53, 0x93, 0x7d, 0x40, 0x72,
0x41, 0x02, 0x30, 0xf5, 0x30, 0x11, 0x90, 0x19, 0xf9, 0xa5, 0x25, 0xe9, 0xf9, 0xa8, 0x66, 0x30,
0xe3, 0x33, 0x03, 0xa6, 0x1e, 0x26, 0xa2, 0xe5, 0xce, 0xc5, 0x01, 0x37, 0x8f, 0x93, 0x8b, 0x35,
0xc0, 0xc7, 0xd1, 0xd3, 0x4f, 0x80, 0x41, 0x88, 0x8f, 0x8b, 0x2b, 0xc4, 0x27, 0x38, 0xde, 0xd9,
0xc7, 0xd3, 0xd5, 0x2f, 0x44, 0x80, 0x51, 0x48, 0x80, 0x8b, 0x07, 0xc4, 0xf7, 0xf4, 0x0b, 0x76,
0x75, 0x0e, 0x0d, 0x72, 0x15, 0x60, 0x82, 0xa9, 0x80, 0xf2, 0x99, 0x93, 0xd8, 0xc0, 0x41, 0x60,
0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x2c, 0x78, 0x65, 0x5b, 0x16, 0x01, 0x00, 0x00,
}
// Code generated by protoc-gen-go.
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: testpb.proto
// DO NOT EDIT!
/*
Package testpb is a generated protocol buffer package.
It is generated from these files:
testpb.proto
It has these top-level messages:
M
*/
package testpb
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
......@@ -26,26 +18,56 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type M struct {
Content string `protobuf:"bytes,1,opt,name=content" json:"content,omitempty"`
Content string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *M) Reset() { *m = M{} }
func (m *M) String() string { return proto.CompactTextString(m) }
func (*M) ProtoMessage() {}
func (*M) Descriptor() ([]byte, []int) {
return fileDescriptor_1b98c0ed33edeb52, []int{0}
}
func (m *M) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_M.Unmarshal(m, b)
}
func (m *M) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_M.Marshal(b, m, deterministic)
}
func (m *M) XXX_Merge(src proto.Message) {
xxx_messageInfo_M.Merge(m, src)
}
func (m *M) XXX_Size() int {
return xxx_messageInfo_M.Size(m)
}
func (m *M) XXX_DiscardUnknown() {
xxx_messageInfo_M.DiscardUnknown(m)
}
var xxx_messageInfo_M proto.InternalMessageInfo
func (m *M) Reset() { *m = M{} }
func (m *M) String() string { return proto.CompactTextString(m) }
func (*M) ProtoMessage() {}
func (*M) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *M) GetContent() string {
if m != nil {
return m.Content
}
return ""
}
func init() {
proto.RegisterType((*M)(nil), "testpb.M")
}
func init() { proto.RegisterFile("testpb.proto", fileDescriptor0) }
func init() { proto.RegisterFile("testpb.proto", fileDescriptor_1b98c0ed33edeb52) }
var fileDescriptor0 = []byte{
var fileDescriptor_1b98c0ed33edeb52 = []byte{
// 72 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2d, 0x2e,
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x49, 0x2d, 0x2e,
0x29, 0x48, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x83, 0xf0, 0x94, 0x64, 0xb9, 0x18,
0x7d, 0x85, 0x24, 0xb8, 0xd8, 0x93, 0xf3, 0xf3, 0x4a, 0x52, 0xf3, 0x4a, 0x24, 0x18, 0x15, 0x18,
0x35, 0x38, 0x83, 0x60, 0xdc, 0x24, 0x36, 0xb0, 0x6a, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff,
......
......@@ -25,14 +25,14 @@ func TestDSN(t *testing.T) {
From: "[email protected]",
To: []string{[email protected]", "[email protected]"},
Rcpt: []*Recipient{
{"[email protected]", Recipient_EMAIL, Recipient_FAILED,
"oh! horror!", [email protected]"},
{"[email protected]", Recipient_EMAIL, Recipient_FAILED,
multilineErr, "[email protected]"},
{"[email protected]", Recipient_EMAIL, Recipient_PENDING,
"oh! the humanity!", [email protected]"},
{"[email protected]", Recipient_EMAIL, Recipient_SENT,
"", "[email protected]"},
mkR("[email protected]", Recipient_EMAIL, Recipient_FAILED,
"oh! horror!", [email protected]"),
mkR("[email protected]", Recipient_EMAIL, Recipient_FAILED,
multilineErr, "[email protected]"),
mkR("[email protected]", Recipient_EMAIL, Recipient_PENDING,
"oh! the humanity!", [email protected]"),
mkR("[email protected]", Recipient_EMAIL, Recipient_SENT,
"", "[email protected]"),
},
Data: []byte(data),
},
......
This diff is collapsed.
......@@ -112,7 +112,7 @@ func TestDSNOnTimeout(t *testing.T) {
ID: <-newID,
From: fmt.Sprintf("[email protected]"),
Rcpt: []*Recipient{
{"[email protected]", Recipient_EMAIL, Recipient_PENDING, "err", "[email protected]"}},
mkR("[email protected]", Recipient_EMAIL, Recipient_PENDING, "err", "[email protected]")},
Data: []byte("data"),
},
CreatedAt: time.Now().Add(-24 * time.Hour),
......@@ -211,7 +211,7 @@ func TestFullQueue(t *testing.T) {
ID: <-newID,
From: fmt.Sprintf("from-%d", i),
Rcpt: []*Recipient{
{"to", Recipient_EMAIL, Recipient_PENDING, "", ""}},
mkR("to", Recipient_EMAIL, Recipient_PENDING, "", "")},
Data: []byte("data"),
},
CreatedAt: time.Now(),
......@@ -249,7 +249,7 @@ func TestPipes(t *testing.T) {
ID: <-newID,
From: "from",
Rcpt: []*Recipient{
{"true", Recipient_PIPE, Recipient_PENDING, "", ""}},
mkR("true", Recipient_PIPE, Recipient_PENDING, "", "")},
Data: []byte("data"),
},
CreatedAt: time.Now(),
......@@ -292,7 +292,7 @@ func TestSerialization(t *testing.T) {
ID: <-newID,
From: fmt.Sprintf("[email protected]"),
Rcpt: []*Recipient{
{"[email protected]", Recipient_EMAIL, Recipient_PENDING, "err", "[email protected]"}},
mkR("[email protected]", Recipient_EMAIL, Recipient_PENDING, "err", "[email protected]")},
Data: []byte("data"),
},
CreatedAt: time.Now().Add(-1 * time.Hour),
......@@ -321,3 +321,13 @@ func TestSerialization(t *testing.T) {
t.Errorf("wrong email: %v", req)
}
}
func mkR(a string, t Recipient_Type, s Recipient_Status, m, o string) *Recipient {
return &Recipient{
Address: a,
Type: t,
Status: s,
LastFailureMessage: m,
OriginalAddress: o,
}
}
......@@ -147,6 +147,8 @@ var cipherSuiteName = map[uint16]string{
0x00c3: "TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256",
0x00c4: "TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256",
0x00c5: "TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256",
0x00c6: "TLS_SM4_GCM_SM3",
0x00c7: "TLS_SM4_CCM_SM3",
0x00ff: "TLS_EMPTY_RENEGOTIATION_INFO_SCSV",
0x1301: "TLS_AES_128_GCM_SHA256",
0x1302: "TLS_AES_256_GCM_SHA384",
......@@ -333,6 +335,11 @@ var cipherSuiteName = map[uint16]string{
0xc0b1: "TLS_ECCPWD_WITH_AES_256_GCM_SHA384",
0xc0b2: "TLS_ECCPWD_WITH_AES_128_CCM_SHA256",
0xc0b3: "TLS_ECCPWD_WITH_AES_256_CCM_SHA384",
0xc0b4: "TLS_SHA256_SHA256",
0xc0b5: "TLS_SHA384_SHA384",
0xc100: "TLS_GOSTR341112_256_WITH_KUZNYECHIK_CTR_OMAC",
0xc101: "TLS_GOSTR341112_256_WITH_MAGMA_CTR_OMAC",
0xc102: "TLS_GOSTR341112_256_WITH_28147_CNT_IMIT",
0xcca8: "TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
0xcca9: "TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256",
0xccaa: "TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",
......
This diff is collapsed.
......@@ -208,7 +208,9 @@ func TestInvalidUsername(t *testing.T) {
func plainPassword(p string) *Password {
return &Password{
Scheme: &Password_Plain{&Plain{[]byte(p)}},
Scheme: &Password_Plain{
Plain: &Plain{Password: []byte(p)},
},
}
}
......
......@@ -40,7 +40,11 @@ func main() {
From: *from,
To: []string{*rcpt},
Rcpt: []*queue.Recipient{
{*rcpt, queue.Recipient_EMAIL, queue.Recipient_PENDING, "", ""},
{
Address: *rcpt,
Type: queue.Recipient_EMAIL,
Status: queue.Recipient_PENDING,
},
},
Data: data,
},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment