@@ -697,7 +697,7 @@ func (config *Configuration) CheckIfBatcherNodeExistsInSharedConfig(localSignCer
697697 return fmt .Errorf ("batcher in shard%d does not exist for party%d in the shared config" , localShardID , localPartyID )
698698 }
699699
700- if ! bytes . Equal (localTLSCert , sharedBatcherConfig .TlsCert ) {
700+ if ! utils . AreCertificatesEqual (localTLSCert , sharedBatcherConfig .TlsCert ) {
701701 localTLSCertString , err := utils .CertificateBytesToString (localTLSCert )
702702 if err != nil {
703703 return err
@@ -709,7 +709,8 @@ func (config *Configuration) CheckIfBatcherNodeExistsInSharedConfig(localSignCer
709709 return fmt .Errorf ("certificate mismatch: the batcher of party %d shard %d is attempting to load with TLS certificate: %v that differs from the shared configuration TLS certificate: %v" , localPartyID , localShardID , localTLSCertString , sharedTLSCertString )
710710 }
711711
712- if ! bytes .Equal (localSignCert , sharedBatcherConfig .SignCert ) {
712+ // if !bytes.Equal(localSignCert, sharedBatcherConfig.SignCert) {
713+ if ! utils .AreCertificatesEqual (localSignCert , sharedBatcherConfig .SignCert ) {
713714 localSignCertString , err := utils .CertificateBytesToString (localSignCert )
714715 if err != nil {
715716 return err
@@ -737,7 +738,7 @@ func (config *Configuration) CheckIfConsenterNodeExistsInSharedConfig(localSignC
737738 return fmt .Errorf ("consenter configuration of partyID %d is missing from the shared configuration: %+v" , localPartyID , sharedPartyConfig )
738739 }
739740
740- if ! bytes . Equal (localSignCert , sharedPartyConfig .ConsenterConfig .SignCert ) {
741+ if ! utils . AreCertificatesEqual (localSignCert , sharedPartyConfig .ConsenterConfig .SignCert ) {
741742 localSignCertString , err := utils .CertificateBytesToString (localSignCert )
742743 if err != nil {
743744 return err
@@ -749,7 +750,7 @@ func (config *Configuration) CheckIfConsenterNodeExistsInSharedConfig(localSignC
749750 return fmt .Errorf ("sign certificate mismatch: Consenter%d is attempting to load with sign certificate: %v that differs from the shared configuration sign certificate: %v" , localPartyID , localSignCertString , sharedSignCertString )
750751 }
751752
752- if ! bytes . Equal (localTLSCert , sharedPartyConfig .ConsenterConfig .TlsCert ) {
753+ if ! utils . AreCertificatesEqual (localTLSCert , sharedPartyConfig .ConsenterConfig .TlsCert ) {
753754 localTLSCertString , err := utils .CertificateBytesToString (localTLSCert )
754755 if err != nil {
755756 return err
@@ -775,7 +776,7 @@ func (config *Configuration) CheckIfAssemblerNodeExistsInSharedConfig() error {
775776 if sharedPartyConfig .AssemblerConfig == nil {
776777 return fmt .Errorf ("assembler configuration of partyID %d is missing from the shared configuration: %+v" , localPartyID , sharedPartyConfig )
777778 }
778- if ! bytes . Equal (localTLSCert , sharedPartyConfig .AssemblerConfig .TlsCert ) {
779+ if ! utils . AreCertificatesEqual (localTLSCert , sharedPartyConfig .AssemblerConfig .TlsCert ) {
779780 localTLSCertString , err := utils .CertificateBytesToString (localTLSCert )
780781 if err != nil {
781782 return err
0 commit comments