forked from YahooArchive/coname
/
keyserverconfig.pb.go
3463 lines (3381 loc) · 94.6 KB
/
keyserverconfig.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by protoc-gen-gogo.
// source: keyserverconfig.proto
// DO NOT EDIT!
package proto
import proto1 "github.com/andres-erbsen/protobuf/proto"
import fmt "fmt"
import math "math"
// discarding unused import gogoproto "gogoproto"
import bytes "bytes"
import strings "strings"
import github_com_andres_erbsen_protobuf_proto "github.com/andres-erbsen/protobuf/proto"
import sort "sort"
import strconv "strconv"
import reflect "reflect"
import io "io"
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto1.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// ReplicaConfig contains the local configuration of a single replica of a
// keyserver. It is valid to have just one replica, but a larger odd number is
// desirable for availability.
type ReplicaConfig struct {
KeyserverConfig `protobuf:"bytes,1,opt,name=keyserver_config,embedded=keyserver_config" json:"keyserver_config"`
// ReplicaID is a globally unique identifier. See Replica.ID.
ReplicaID uint64 `protobuf:"varint,2,opt,name=replica_id,proto3" json:"replica_id,omitempty"`
// SigningKeyID specifies the signing key by reference. The mechanism of
// loading keys depends on the deployment scenario; by default, the key
// identifier is a path to a file containing the key.
SigningKeyID string `protobuf:"bytes,3,opt,name=signing_key_id,proto3" json:"signing_key_id,omitempty"`
PublicAddr string `protobuf:"bytes,4,opt,name=public_addr,proto3" json:"public_addr,omitempty"`
PublicTLS TLSConfig `protobuf:"bytes,5,opt,name=public_tls" json:"public_tls"`
VerifierAddr string `protobuf:"bytes,6,opt,name=verifier_addr,proto3" json:"verifier_addr,omitempty"`
VerifierTLS TLSConfig `protobuf:"bytes,7,opt,name=verifier_tls" json:"verifier_tls"`
HKPAddr string `protobuf:"bytes,8,opt,name=hkp_addr,proto3" json:"hkp_addr,omitempty"`
HKPTLS TLSConfig `protobuf:"bytes,9,opt,name=hkp_tls" json:"hkp_tls"`
RaftAddr string `protobuf:"bytes,10,opt,name=raft_addr,proto3" json:"raft_addr,omitempty"`
RaftTLS TLSConfig `protobuf:"bytes,11,opt,name=raft_tls" json:"raft_tls"`
// LevelDBPath specifies the directory in which the databse is stored.
// Nothing else should use this directory.
LevelDBPath string `protobuf:"bytes,14,opt,name=leveldb_path,proto3" json:"leveldb_path,omitempty"`
// RaftHeartbeat specifies the interval between successive heartbeat
// messages sent by the replicated state machine controller. Lowering the
// heartbeat interval generates more network traffic; increasing the
// interval increases the time it takes to detect a failed replica and
// perform an automated failover.
RaftHeartbeat Duration `protobuf:"bytes,15,opt,name=raft_heartbeat" json:"raft_heartbeat"`
// LaggingVerifierScan specifies the maximum number of epochs by which a
// verifier can be lagging us for us to still serve its signature to
// clients. Finding the verifier signatures is currently implemented using a
// linear scan backwards from the current epoch, so setting a very high
// value can open up cause significant amounts of database reads on the
// server. A fancy index-based scan would be possible, but there is no
// clear need for it -- the epochs far in the past will probably have
// expired anyway. The zero value means no limit, but it should be used for
// testing only. The recommended value is 1000.
LaggingVerifierScan uint64 `protobuf:"varint,16,opt,name=lagging_verifier_scan,proto3" json:"lagging_verifier_scan,omitempty"`
// ClientTimeout specifies the maximum amount of time the server is willing
// to allow from the start of a client request to until it is handled. The
// zero value means no limit.
ClientTimeout Duration `protobuf:"bytes,17,opt,name=client_timeout" json:"client_timeout"`
}
func (m *ReplicaConfig) Reset() { *m = ReplicaConfig{} }
func (*ReplicaConfig) ProtoMessage() {}
func (m *ReplicaConfig) GetPublicTLS() TLSConfig {
if m != nil {
return m.PublicTLS
}
return TLSConfig{}
}
func (m *ReplicaConfig) GetVerifierTLS() TLSConfig {
if m != nil {
return m.VerifierTLS
}
return TLSConfig{}
}
func (m *ReplicaConfig) GetHKPTLS() TLSConfig {
if m != nil {
return m.HKPTLS
}
return TLSConfig{}
}
func (m *ReplicaConfig) GetRaftTLS() TLSConfig {
if m != nil {
return m.RaftTLS
}
return TLSConfig{}
}
func (m *ReplicaConfig) GetRaftHeartbeat() Duration {
if m != nil {
return m.RaftHeartbeat
}
return Duration{}
}
func (m *ReplicaConfig) GetClientTimeout() Duration {
if m != nil {
return m.ClientTimeout
}
return Duration{}
}
// KeyserverConfig describes the keyserver-wide configuration. All replicas
// MUST use the same KeyserverConfig.
type KeyserverConfig struct {
// ServerID is deprecated and should not be used. TODO: remove. Signatures
// should be tagged with ReplicaIDs, and the realm can be used to refer to
// the keyserver as a whole.
ServerID uint64 `protobuf:"varint,1,opt,name=server_id,proto3" json:"server_id,omitempty"`
// Realm specifies the general set of users whose keys this keyserver
// manages. If the user identifiers are email addresses, the realm should
// match the domain name in the email address.
Realm string `protobuf:"bytes,2,opt,name=realm,proto3" json:"realm,omitempty"`
// SigningKeyID specifies the key for the verifiable random function by
// reference. The mechanism of loading keys depends on the deployment
// scenario; by default, the key identifier is a path to a file containing
// the key.
VRFKeyID string `protobuf:"bytes,3,opt,name=vrf_key_id,proto3" json:"vrf_key_id,omitempty"`
// MinEpochInterval specifies the time for which the keyserver stops
// proposing new epochs once an epoch has been committed. The zero value
// means no delay. After MinEpochInterval since the last epoch, the
// keyserver will propose a new epoch as soon as an update has been
// committed.
MinEpochInterval Duration `protobuf:"bytes,4,opt,name=min_epoch_interval" json:"min_epoch_interval"`
// MaxEpochInterval specifies the time after which the keyserver will
// propose a new epoch even if there have been no updates since the last
// epoch. Vouching for the lack of updates is important to ensure the users
// that none of the served keys have been revoked. This value is a trigger,
// NOT a deadline; there is no guarantee that consecutive epochs will be at
// most MaxEpochInterval apart. The actual time between by epochs is
// MaxEpochInterval plus however long it takes to commit and sign a new
// epoch.
MaxEpochInterval Duration `protobuf:"bytes,5,opt,name=max_epoch_interval" json:"max_epoch_interval"`
// ProposalRetryInterval specifies the time after an unsuccessful proposal
// after which the proposal will be retried. A lower value will generate
// more redundant network traffic while a higher value will improve
// responsiveness in presence of network or node failures (bounded below by
// the raft failover time).
ProposalRetryInterval Duration `protobuf:"bytes,6,opt,name=proposal_retry_interval" json:"proposal_retry_interval"`
// InitialReplicas contains the cluster configuration at the beginning of
// time. It MUST NOT be modified ever after, and it MUST be the same for
// all replicas. Use AddReplica and RemoveReplica to change the current
// cluster configuration.
InitialReplicas []*Replica `protobuf:"bytes,7,rep,name=initial_replicas" json:"initial_replicas,omitempty"`
// EmailProofToAddr (DEPRECATED) specifies the additional allowed to
// address in email proofs. By default, only proofs sent to the user being
// registered all accepted. This option can be used to allow proofs emailed
// directly to the keyserver to be accepted (but the keyserver does NOT
// implement a SMTP interface right now).
EmailProofToAddr string `protobuf:"bytes,8,opt,name=email_proof_to_addr,proto3" json:"email_proof_to_addr,omitempty"`
// EmailProofSubjectPrefix (DEPRECATED) is used for DKIM-based email
// address registration. The proof challenge is sent in the subject line,
// with an optional string preceding it. For example, if
// EmailProofSubjectPrefix = "account verification: ", then the proof email
// needs to have a subject line "account verification: abcd" for verify
// challenge abcd.
EmailProofSubjectPrefix string `protobuf:"bytes,9,opt,name=email_proof_subject_prefix,proto3" json:"email_proof_subject_prefix,omitempty"`
// EmailProofAllowedDomains (DEPRECATED) specifies the domains for which
// this keyserver accepts email address registrations.
EmailProofAllowedDomains []string `protobuf:"bytes,10,rep,name=email_proof_allowed_domains" json:"email_proof_allowed_domains,omitempty"`
// Types that are valid to be assigned to RegistrationPolicy:
// *KeyserverConfig_InsecureSkipEmailProof
// *KeyserverConfig_EmailProofByDkim
// *KeyserverConfig_EmailProofByClientCert
RegistrationPolicy isKeyserverConfig_RegistrationPolicy `protobuf_oneof:"registration_policy"`
}
func (m *KeyserverConfig) Reset() { *m = KeyserverConfig{} }
func (*KeyserverConfig) ProtoMessage() {}
type isKeyserverConfig_RegistrationPolicy interface {
isKeyserverConfig_RegistrationPolicy()
Equal(interface{}) bool
VerboseEqual(interface{}) error
MarshalTo([]byte) (int, error)
Size() int
}
type KeyserverConfig_InsecureSkipEmailProof struct {
InsecureSkipEmailProof bool `protobuf:"varint,11,opt,name=insecure_skip_email_proof,proto3,oneof"`
}
type KeyserverConfig_EmailProofByDkim struct {
EmailProofByDkim *EmailProofByDKIM `protobuf:"bytes,12,opt,name=email_proof_by_dkim,oneof"`
}
type KeyserverConfig_EmailProofByClientCert struct {
EmailProofByClientCert *EmailProofByClientCert `protobuf:"bytes,13,opt,name=email_proof_by_client_cert,oneof"`
}
func (*KeyserverConfig_InsecureSkipEmailProof) isKeyserverConfig_RegistrationPolicy() {}
func (*KeyserverConfig_EmailProofByDkim) isKeyserverConfig_RegistrationPolicy() {}
func (*KeyserverConfig_EmailProofByClientCert) isKeyserverConfig_RegistrationPolicy() {}
func (m *KeyserverConfig) GetRegistrationPolicy() isKeyserverConfig_RegistrationPolicy {
if m != nil {
return m.RegistrationPolicy
}
return nil
}
func (m *KeyserverConfig) GetMinEpochInterval() Duration {
if m != nil {
return m.MinEpochInterval
}
return Duration{}
}
func (m *KeyserverConfig) GetMaxEpochInterval() Duration {
if m != nil {
return m.MaxEpochInterval
}
return Duration{}
}
func (m *KeyserverConfig) GetProposalRetryInterval() Duration {
if m != nil {
return m.ProposalRetryInterval
}
return Duration{}
}
func (m *KeyserverConfig) GetInitialReplicas() []*Replica {
if m != nil {
return m.InitialReplicas
}
return nil
}
func (m *KeyserverConfig) GetInsecureSkipEmailProof() bool {
if x, ok := m.GetRegistrationPolicy().(*KeyserverConfig_InsecureSkipEmailProof); ok {
return x.InsecureSkipEmailProof
}
return false
}
func (m *KeyserverConfig) GetEmailProofByDkim() *EmailProofByDKIM {
if x, ok := m.GetRegistrationPolicy().(*KeyserverConfig_EmailProofByDkim); ok {
return x.EmailProofByDkim
}
return nil
}
func (m *KeyserverConfig) GetEmailProofByClientCert() *EmailProofByClientCert {
if x, ok := m.GetRegistrationPolicy().(*KeyserverConfig_EmailProofByClientCert); ok {
return x.EmailProofByClientCert
}
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*KeyserverConfig) XXX_OneofFuncs() (func(msg proto1.Message, b *proto1.Buffer) error, func(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error), []interface{}) {
return _KeyserverConfig_OneofMarshaler, _KeyserverConfig_OneofUnmarshaler, []interface{}{
(*KeyserverConfig_InsecureSkipEmailProof)(nil),
(*KeyserverConfig_EmailProofByDkim)(nil),
(*KeyserverConfig_EmailProofByClientCert)(nil),
}
}
func _KeyserverConfig_OneofMarshaler(msg proto1.Message, b *proto1.Buffer) error {
m := msg.(*KeyserverConfig)
// registration_policy
switch x := m.RegistrationPolicy.(type) {
case *KeyserverConfig_InsecureSkipEmailProof:
t := uint64(0)
if x.InsecureSkipEmailProof {
t = 1
}
_ = b.EncodeVarint(11<<3 | proto1.WireVarint)
_ = b.EncodeVarint(t)
case *KeyserverConfig_EmailProofByDkim:
_ = b.EncodeVarint(12<<3 | proto1.WireBytes)
if err := b.EncodeMessage(x.EmailProofByDkim); err != nil {
return err
}
case *KeyserverConfig_EmailProofByClientCert:
_ = b.EncodeVarint(13<<3 | proto1.WireBytes)
if err := b.EncodeMessage(x.EmailProofByClientCert); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("KeyserverConfig.RegistrationPolicy has unexpected type %T", x)
}
return nil
}
func _KeyserverConfig_OneofUnmarshaler(msg proto1.Message, tag, wire int, b *proto1.Buffer) (bool, error) {
m := msg.(*KeyserverConfig)
switch tag {
case 11: // registration_policy.insecure_skip_email_proof
if wire != proto1.WireVarint {
return true, proto1.ErrInternalBadWireType
}
x, err := b.DecodeVarint()
m.RegistrationPolicy = &KeyserverConfig_InsecureSkipEmailProof{x != 0}
return true, err
case 12: // registration_policy.email_proof_by_dkim
if wire != proto1.WireBytes {
return true, proto1.ErrInternalBadWireType
}
msg := new(EmailProofByDKIM)
err := b.DecodeMessage(msg)
m.RegistrationPolicy = &KeyserverConfig_EmailProofByDkim{msg}
return true, err
case 13: // registration_policy.email_proof_by_client_cert
if wire != proto1.WireBytes {
return true, proto1.ErrInternalBadWireType
}
msg := new(EmailProofByClientCert)
err := b.DecodeMessage(msg)
m.RegistrationPolicy = &KeyserverConfig_EmailProofByClientCert{msg}
return true, err
default:
return false, nil
}
}
type EmailProofByDKIM struct {
// AllowedDomains specifies the domains for which this keyserver accepts
// email address registrations.
AllowedDomains []string `protobuf:"bytes,1,rep,name=allowed_domains" json:"allowed_domains,omitempty"`
// ToAddr specifies the additional allowed to address in email proofs. By
// default, only proofs sent to the user being registered all accepted.
// This option can be used to allow proofs emailed directly to the
// keyserver to be accepted (but the keyserver does NOT implement a SMTP
// interface right now).
ToAddr string `protobuf:"bytes,2,opt,name=to_addr,proto3" json:"to_addr,omitempty"`
// SubjectPrefix is used for DKIM-based email address registration. The
// proof challenge is sent in the subject line, with an optional string
// preceding it. For example, if EmailProofSubjectPrefix = "account
// verification: ", then the proof email needs to have a subject line
// "account verification: abcd" for verify challenge abcd.
SubjectPrefix string `protobuf:"bytes,3,opt,name=subject_prefix,proto3" json:"subject_prefix,omitempty"`
}
func (m *EmailProofByDKIM) Reset() { *m = EmailProofByDKIM{} }
func (*EmailProofByDKIM) ProtoMessage() {}
// EmailProofByClientCert accepts a certificate signed by an authority trusted
// with handling registration as sufficient confirmation of ownership of an
// email address. The emailAddress value in the certificate's DistinguishedName
// field is allowed to be regeistered by the holder of the key specified in the
// certificate.
type EmailProofByClientCert struct {
// AllowedDomains specifies the domains for which this keyserver accepts
// email address registrations.
AllowedDomains []string `protobuf:"bytes,1,rep,name=allowed_domains" json:"allowed_domains,omitempty"`
// CaCert contains the trusted certificate authority certificate in DER format.
CaCert []byte `protobuf:"bytes,2,opt,name=ca_cert,proto3" json:"ca_cert,omitempty"`
}
func (m *EmailProofByClientCert) Reset() { *m = EmailProofByClientCert{} }
func (*EmailProofByClientCert) ProtoMessage() {}
type Replica struct {
// Id is used to distinguish between nodes during consistent replication.
// All node ID-s MUST be unique, MUST NOT be reused (e.g., using IP-s or
// hostnames is probably a bad idea) and SHOULD be set to the ID of the
// first public key by convention.
ID uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
// PublicKeys lists the public keys of a node, to be joined using a
// 1-out-of-n policy. The order of this list is NOT preserved.
PublicKeys []*PublicKey `protobuf:"bytes,2,rep,name=public_keys" json:"public_keys,omitempty"`
// RaftAddr is the Raft network address of the node, such that
// net.Dial("tcp", Addr) reaches the node. Supported formats include
// host.domain:port and ip:port.
RaftAddr string `protobuf:"bytes,3,opt,name=raft_addr,proto3" json:"raft_addr,omitempty"`
}
func (m *Replica) Reset() { *m = Replica{} }
func (*Replica) ProtoMessage() {}
func (m *Replica) GetPublicKeys() []*PublicKey {
if m != nil {
return m.PublicKeys
}
return nil
}
func (this *ReplicaConfig) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*ReplicaConfig)
if !ok {
return fmt.Errorf("that is not of type *ReplicaConfig")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *ReplicaConfig but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *ReplicaConfigbut is not nil && this == nil")
}
if !this.KeyserverConfig.Equal(&that1.KeyserverConfig) {
return fmt.Errorf("KeyserverConfig this(%v) Not Equal that(%v)", this.KeyserverConfig, that1.KeyserverConfig)
}
if this.ReplicaID != that1.ReplicaID {
return fmt.Errorf("ReplicaID this(%v) Not Equal that(%v)", this.ReplicaID, that1.ReplicaID)
}
if this.SigningKeyID != that1.SigningKeyID {
return fmt.Errorf("SigningKeyID this(%v) Not Equal that(%v)", this.SigningKeyID, that1.SigningKeyID)
}
if this.PublicAddr != that1.PublicAddr {
return fmt.Errorf("PublicAddr this(%v) Not Equal that(%v)", this.PublicAddr, that1.PublicAddr)
}
if !this.PublicTLS.Equal(&that1.PublicTLS) {
return fmt.Errorf("PublicTLS this(%v) Not Equal that(%v)", this.PublicTLS, that1.PublicTLS)
}
if this.VerifierAddr != that1.VerifierAddr {
return fmt.Errorf("VerifierAddr this(%v) Not Equal that(%v)", this.VerifierAddr, that1.VerifierAddr)
}
if !this.VerifierTLS.Equal(&that1.VerifierTLS) {
return fmt.Errorf("VerifierTLS this(%v) Not Equal that(%v)", this.VerifierTLS, that1.VerifierTLS)
}
if this.HKPAddr != that1.HKPAddr {
return fmt.Errorf("HKPAddr this(%v) Not Equal that(%v)", this.HKPAddr, that1.HKPAddr)
}
if !this.HKPTLS.Equal(&that1.HKPTLS) {
return fmt.Errorf("HKPTLS this(%v) Not Equal that(%v)", this.HKPTLS, that1.HKPTLS)
}
if this.RaftAddr != that1.RaftAddr {
return fmt.Errorf("RaftAddr this(%v) Not Equal that(%v)", this.RaftAddr, that1.RaftAddr)
}
if !this.RaftTLS.Equal(&that1.RaftTLS) {
return fmt.Errorf("RaftTLS this(%v) Not Equal that(%v)", this.RaftTLS, that1.RaftTLS)
}
if this.LevelDBPath != that1.LevelDBPath {
return fmt.Errorf("LevelDBPath this(%v) Not Equal that(%v)", this.LevelDBPath, that1.LevelDBPath)
}
if !this.RaftHeartbeat.Equal(&that1.RaftHeartbeat) {
return fmt.Errorf("RaftHeartbeat this(%v) Not Equal that(%v)", this.RaftHeartbeat, that1.RaftHeartbeat)
}
if this.LaggingVerifierScan != that1.LaggingVerifierScan {
return fmt.Errorf("LaggingVerifierScan this(%v) Not Equal that(%v)", this.LaggingVerifierScan, that1.LaggingVerifierScan)
}
if !this.ClientTimeout.Equal(&that1.ClientTimeout) {
return fmt.Errorf("ClientTimeout this(%v) Not Equal that(%v)", this.ClientTimeout, that1.ClientTimeout)
}
return nil
}
func (this *ReplicaConfig) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*ReplicaConfig)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.KeyserverConfig.Equal(&that1.KeyserverConfig) {
return false
}
if this.ReplicaID != that1.ReplicaID {
return false
}
if this.SigningKeyID != that1.SigningKeyID {
return false
}
if this.PublicAddr != that1.PublicAddr {
return false
}
if !this.PublicTLS.Equal(&that1.PublicTLS) {
return false
}
if this.VerifierAddr != that1.VerifierAddr {
return false
}
if !this.VerifierTLS.Equal(&that1.VerifierTLS) {
return false
}
if this.HKPAddr != that1.HKPAddr {
return false
}
if !this.HKPTLS.Equal(&that1.HKPTLS) {
return false
}
if this.RaftAddr != that1.RaftAddr {
return false
}
if !this.RaftTLS.Equal(&that1.RaftTLS) {
return false
}
if this.LevelDBPath != that1.LevelDBPath {
return false
}
if !this.RaftHeartbeat.Equal(&that1.RaftHeartbeat) {
return false
}
if this.LaggingVerifierScan != that1.LaggingVerifierScan {
return false
}
if !this.ClientTimeout.Equal(&that1.ClientTimeout) {
return false
}
return true
}
func (this *KeyserverConfig) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*KeyserverConfig)
if !ok {
return fmt.Errorf("that is not of type *KeyserverConfig")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *KeyserverConfig but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *KeyserverConfigbut is not nil && this == nil")
}
if this.ServerID != that1.ServerID {
return fmt.Errorf("ServerID this(%v) Not Equal that(%v)", this.ServerID, that1.ServerID)
}
if this.Realm != that1.Realm {
return fmt.Errorf("Realm this(%v) Not Equal that(%v)", this.Realm, that1.Realm)
}
if this.VRFKeyID != that1.VRFKeyID {
return fmt.Errorf("VRFKeyID this(%v) Not Equal that(%v)", this.VRFKeyID, that1.VRFKeyID)
}
if !this.MinEpochInterval.Equal(&that1.MinEpochInterval) {
return fmt.Errorf("MinEpochInterval this(%v) Not Equal that(%v)", this.MinEpochInterval, that1.MinEpochInterval)
}
if !this.MaxEpochInterval.Equal(&that1.MaxEpochInterval) {
return fmt.Errorf("MaxEpochInterval this(%v) Not Equal that(%v)", this.MaxEpochInterval, that1.MaxEpochInterval)
}
if !this.ProposalRetryInterval.Equal(&that1.ProposalRetryInterval) {
return fmt.Errorf("ProposalRetryInterval this(%v) Not Equal that(%v)", this.ProposalRetryInterval, that1.ProposalRetryInterval)
}
if len(this.InitialReplicas) != len(that1.InitialReplicas) {
return fmt.Errorf("InitialReplicas this(%v) Not Equal that(%v)", len(this.InitialReplicas), len(that1.InitialReplicas))
}
for i := range this.InitialReplicas {
if !this.InitialReplicas[i].Equal(that1.InitialReplicas[i]) {
return fmt.Errorf("InitialReplicas this[%v](%v) Not Equal that[%v](%v)", i, this.InitialReplicas[i], i, that1.InitialReplicas[i])
}
}
if this.EmailProofToAddr != that1.EmailProofToAddr {
return fmt.Errorf("EmailProofToAddr this(%v) Not Equal that(%v)", this.EmailProofToAddr, that1.EmailProofToAddr)
}
if this.EmailProofSubjectPrefix != that1.EmailProofSubjectPrefix {
return fmt.Errorf("EmailProofSubjectPrefix this(%v) Not Equal that(%v)", this.EmailProofSubjectPrefix, that1.EmailProofSubjectPrefix)
}
if len(this.EmailProofAllowedDomains) != len(that1.EmailProofAllowedDomains) {
return fmt.Errorf("EmailProofAllowedDomains this(%v) Not Equal that(%v)", len(this.EmailProofAllowedDomains), len(that1.EmailProofAllowedDomains))
}
for i := range this.EmailProofAllowedDomains {
if this.EmailProofAllowedDomains[i] != that1.EmailProofAllowedDomains[i] {
return fmt.Errorf("EmailProofAllowedDomains this[%v](%v) Not Equal that[%v](%v)", i, this.EmailProofAllowedDomains[i], i, that1.EmailProofAllowedDomains[i])
}
}
if that1.RegistrationPolicy == nil {
if this.RegistrationPolicy != nil {
return fmt.Errorf("this.RegistrationPolicy != nil && that1.RegistrationPolicy == nil")
}
} else if this.RegistrationPolicy == nil {
return fmt.Errorf("this.RegistrationPolicy == nil && that1.RegistrationPolicy != nil")
} else if err := this.RegistrationPolicy.VerboseEqual(that1.RegistrationPolicy); err != nil {
return err
}
return nil
}
func (this *KeyserverConfig_InsecureSkipEmailProof) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*KeyserverConfig_InsecureSkipEmailProof)
if !ok {
return fmt.Errorf("that is not of type *KeyserverConfig_InsecureSkipEmailProof")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *KeyserverConfig_InsecureSkipEmailProof but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *KeyserverConfig_InsecureSkipEmailProofbut is not nil && this == nil")
}
if this.InsecureSkipEmailProof != that1.InsecureSkipEmailProof {
return fmt.Errorf("InsecureSkipEmailProof this(%v) Not Equal that(%v)", this.InsecureSkipEmailProof, that1.InsecureSkipEmailProof)
}
return nil
}
func (this *KeyserverConfig_EmailProofByDkim) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*KeyserverConfig_EmailProofByDkim)
if !ok {
return fmt.Errorf("that is not of type *KeyserverConfig_EmailProofByDkim")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *KeyserverConfig_EmailProofByDkim but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *KeyserverConfig_EmailProofByDkimbut is not nil && this == nil")
}
if !this.EmailProofByDkim.Equal(that1.EmailProofByDkim) {
return fmt.Errorf("EmailProofByDkim this(%v) Not Equal that(%v)", this.EmailProofByDkim, that1.EmailProofByDkim)
}
return nil
}
func (this *KeyserverConfig_EmailProofByClientCert) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*KeyserverConfig_EmailProofByClientCert)
if !ok {
return fmt.Errorf("that is not of type *KeyserverConfig_EmailProofByClientCert")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *KeyserverConfig_EmailProofByClientCert but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *KeyserverConfig_EmailProofByClientCertbut is not nil && this == nil")
}
if !this.EmailProofByClientCert.Equal(that1.EmailProofByClientCert) {
return fmt.Errorf("EmailProofByClientCert this(%v) Not Equal that(%v)", this.EmailProofByClientCert, that1.EmailProofByClientCert)
}
return nil
}
func (this *KeyserverConfig) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*KeyserverConfig)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.ServerID != that1.ServerID {
return false
}
if this.Realm != that1.Realm {
return false
}
if this.VRFKeyID != that1.VRFKeyID {
return false
}
if !this.MinEpochInterval.Equal(&that1.MinEpochInterval) {
return false
}
if !this.MaxEpochInterval.Equal(&that1.MaxEpochInterval) {
return false
}
if !this.ProposalRetryInterval.Equal(&that1.ProposalRetryInterval) {
return false
}
if len(this.InitialReplicas) != len(that1.InitialReplicas) {
return false
}
for i := range this.InitialReplicas {
if !this.InitialReplicas[i].Equal(that1.InitialReplicas[i]) {
return false
}
}
if this.EmailProofToAddr != that1.EmailProofToAddr {
return false
}
if this.EmailProofSubjectPrefix != that1.EmailProofSubjectPrefix {
return false
}
if len(this.EmailProofAllowedDomains) != len(that1.EmailProofAllowedDomains) {
return false
}
for i := range this.EmailProofAllowedDomains {
if this.EmailProofAllowedDomains[i] != that1.EmailProofAllowedDomains[i] {
return false
}
}
if that1.RegistrationPolicy == nil {
if this.RegistrationPolicy != nil {
return false
}
} else if this.RegistrationPolicy == nil {
return false
} else if !this.RegistrationPolicy.Equal(that1.RegistrationPolicy) {
return false
}
return true
}
func (this *KeyserverConfig_InsecureSkipEmailProof) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*KeyserverConfig_InsecureSkipEmailProof)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if this.InsecureSkipEmailProof != that1.InsecureSkipEmailProof {
return false
}
return true
}
func (this *KeyserverConfig_EmailProofByDkim) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*KeyserverConfig_EmailProofByDkim)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.EmailProofByDkim.Equal(that1.EmailProofByDkim) {
return false
}
return true
}
func (this *KeyserverConfig_EmailProofByClientCert) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*KeyserverConfig_EmailProofByClientCert)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if !this.EmailProofByClientCert.Equal(that1.EmailProofByClientCert) {
return false
}
return true
}
func (this *EmailProofByDKIM) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*EmailProofByDKIM)
if !ok {
return fmt.Errorf("that is not of type *EmailProofByDKIM")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *EmailProofByDKIM but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *EmailProofByDKIMbut is not nil && this == nil")
}
if len(this.AllowedDomains) != len(that1.AllowedDomains) {
return fmt.Errorf("AllowedDomains this(%v) Not Equal that(%v)", len(this.AllowedDomains), len(that1.AllowedDomains))
}
for i := range this.AllowedDomains {
if this.AllowedDomains[i] != that1.AllowedDomains[i] {
return fmt.Errorf("AllowedDomains this[%v](%v) Not Equal that[%v](%v)", i, this.AllowedDomains[i], i, that1.AllowedDomains[i])
}
}
if this.ToAddr != that1.ToAddr {
return fmt.Errorf("ToAddr this(%v) Not Equal that(%v)", this.ToAddr, that1.ToAddr)
}
if this.SubjectPrefix != that1.SubjectPrefix {
return fmt.Errorf("SubjectPrefix this(%v) Not Equal that(%v)", this.SubjectPrefix, that1.SubjectPrefix)
}
return nil
}
func (this *EmailProofByDKIM) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*EmailProofByDKIM)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.AllowedDomains) != len(that1.AllowedDomains) {
return false
}
for i := range this.AllowedDomains {
if this.AllowedDomains[i] != that1.AllowedDomains[i] {
return false
}
}
if this.ToAddr != that1.ToAddr {
return false
}
if this.SubjectPrefix != that1.SubjectPrefix {
return false
}
return true
}
func (this *EmailProofByClientCert) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*EmailProofByClientCert)
if !ok {
return fmt.Errorf("that is not of type *EmailProofByClientCert")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *EmailProofByClientCert but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *EmailProofByClientCertbut is not nil && this == nil")
}
if len(this.AllowedDomains) != len(that1.AllowedDomains) {
return fmt.Errorf("AllowedDomains this(%v) Not Equal that(%v)", len(this.AllowedDomains), len(that1.AllowedDomains))
}
for i := range this.AllowedDomains {
if this.AllowedDomains[i] != that1.AllowedDomains[i] {
return fmt.Errorf("AllowedDomains this[%v](%v) Not Equal that[%v](%v)", i, this.AllowedDomains[i], i, that1.AllowedDomains[i])
}
}
if !bytes.Equal(this.CaCert, that1.CaCert) {
return fmt.Errorf("CaCert this(%v) Not Equal that(%v)", this.CaCert, that1.CaCert)
}
return nil
}
func (this *EmailProofByClientCert) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}
that1, ok := that.(*EmailProofByClientCert)
if !ok {
return false
}
if that1 == nil {
if this == nil {
return true
}
return false
} else if this == nil {
return false
}
if len(this.AllowedDomains) != len(that1.AllowedDomains) {
return false
}
for i := range this.AllowedDomains {
if this.AllowedDomains[i] != that1.AllowedDomains[i] {
return false
}
}
if !bytes.Equal(this.CaCert, that1.CaCert) {
return false
}
return true
}
func (this *Replica) VerboseEqual(that interface{}) error {
if that == nil {
if this == nil {
return nil
}
return fmt.Errorf("that == nil && this != nil")
}
that1, ok := that.(*Replica)
if !ok {
return fmt.Errorf("that is not of type *Replica")
}
if that1 == nil {
if this == nil {
return nil
}
return fmt.Errorf("that is type *Replica but is nil && this != nil")
} else if this == nil {
return fmt.Errorf("that is type *Replicabut is not nil && this == nil")
}
if this.ID != that1.ID {
return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID)
}
if len(this.PublicKeys) != len(that1.PublicKeys) {
return fmt.Errorf("PublicKeys this(%v) Not Equal that(%v)", len(this.PublicKeys), len(that1.PublicKeys))
}
for i := range this.PublicKeys {
if !this.PublicKeys[i].Equal(that1.PublicKeys[i]) {
return fmt.Errorf("PublicKeys this[%v](%v) Not Equal that[%v](%v)", i, this.PublicKeys[i], i, that1.PublicKeys[i])
}
}
if this.RaftAddr != that1.RaftAddr {
return fmt.Errorf("RaftAddr this(%v) Not Equal that(%v)", this.RaftAddr, that1.RaftAddr)
}
return nil
}
func (this *Replica) Equal(that interface{}) bool {
if that == nil {
if this == nil {
return true
}
return false
}