Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit 582c2fc

Browse files
committed
[FAB-9325] make CA matcher section consistent
Change-Id: I44c3518421a5cc4e400c3d6df4f6b7b441b9863f Signed-off-by: Troy Ronda <troy@troyronda.com>
1 parent 449a24d commit 582c2fc

File tree

9 files changed

+10
-10
lines changed

9 files changed

+10
-10
lines changed

pkg/core/config/testdata/config_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ entityMatchers:
423423
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
424424
mappedHost: local.orderer.example.com
425425

426-
certificateAuthorities:
426+
certificateAuthority:
427427
- pattern: (\w+).org1.example.(\w+)
428428
urlSubstitutionExp:
429429
mappedHost: local.ca.org1.example.com

pkg/core/config/testdata/config_test_embedded_pems.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ entityMatchers:
644644
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
645645
mappedHost: local.orderer.example.com
646646

647-
certificateAuthorities:
647+
certificateAuthority:
648648
- pattern: (\w+)-org1
649649
urlSubstitutionExp:
650650
mappedHost: local.ca-org1

pkg/core/config/testdata/config_test_template.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ entityMatchers:
458458
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
459459
mappedHost: local.orderer.example.com
460460

461-
certificateAuthorities:
461+
certificateAuthority:
462462
- pattern: (\w+).org1.example.(\w+)
463463
urlSubstitutionExp:
464464
mappedHost: local.ca.org1.example.com

pkg/core/config/testdata/template/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ entityMatchers:
314314
#sslTargetOverrideUrlSubstitutionExp: $1.org1.example.$2
315315
#mappedHost: orderer.example.com
316316

317-
#certificateAuthorities:
317+
#certificateAuthority:
318318
#- pattern: (\w+).org1.example.(\w+)
319319
#urlSubstitutionExp:
320320
#mappedHost: ca.org1.example.com

pkg/fab/endpointconfig.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -887,8 +887,8 @@ func (c *EndpointConfig) compileMatchers() error {
887887
}
888888
}
889889
}
890-
if networkConfig.EntityMatchers["certificateauthorities"] != nil {
891-
certMatchersConfig := networkConfig.EntityMatchers["certificateauthorities"]
890+
if networkConfig.EntityMatchers["certificateauthority"] != nil {
891+
certMatchersConfig := networkConfig.EntityMatchers["certificateauthority"]
892892
for i := 0; i < len(certMatchersConfig); i++ {
893893
if certMatchersConfig[i].Pattern != "" {
894894
c.caMatchers[i], err = regexp.Compile(certMatchersConfig[i].Pattern)

pkg/msp/identityconfig.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func (c *IdentityConfig) tryMatchingCAConfig(caName string) (*msp.CAConfig, stri
273273
v := caMatchers[k]
274274
if v.MatchString(caName) {
275275
// get the matching Config from the index number
276-
certAuthorityMatchConfig := networkConfig.EntityMatchers["certificateauthorities"][k]
276+
certAuthorityMatchConfig := networkConfig.EntityMatchers["certificateauthority"][k]
277277
//Get the certAuthorityMatchConfig from mapped host
278278
caConfig, ok := networkConfig.CertificateAuthorities[strings.ToLower(certAuthorityMatchConfig.MappedHost)]
279279
if !ok {

test/fixtures/config/config_revoke_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ entityMatchers:
437437
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
438438
mappedHost: local.orderer.example.com
439439

440-
certificateAuthorities:
440+
certificateAuthority:
441441
- pattern: (\w+).org1.example.(\w+)
442442
urlSubstitutionExp:
443443
mappedHost: local.ca.org1.example.com

test/fixtures/config/config_test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ entityMatchers:
440440
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
441441
mappedHost: local.orderer.example.com
442442

443-
certificateAuthorities:
443+
certificateAuthority:
444444
- pattern: (\w+).org1.example.(\w+)
445445
urlSubstitutionExp:
446446
mappedHost: local.ca.org1.example.com

test/fixtures/config/config_test_local.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ entityMatchers:
443443
sslTargetOverrideUrlSubstitutionExp: $1.example.$2
444444
mappedHost: local.orderer.example.com
445445

446-
certificateAuthorities:
446+
certificateAuthority:
447447
- pattern: (\w+).org1.example.(\w+)
448448
urlSubstitutionExp: https://localhost:7054
449449
mappedHost: local.ca.org1.example.com

0 commit comments

Comments
 (0)