Skip to content

Commit

Permalink
[FAB-7498] Rename fixtures ca to be part of example.com
Browse files Browse the repository at this point in the history
Change-Id: I4497dc65660d0b791e30f7ee0923f2b7cf17a0f8
Signed-off-by: Troy Ronda <troy@troyronda.com>
  • Loading branch information
troyronda committed Dec 18, 2017
1 parent 9a9856d commit 78503fe
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 42 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -118,7 +118,7 @@ You need:
#### Enable local hostnames

You will need to set the following hosts to 127.0.0.1 (typically in /etc/hosts):
ca_peerOrg1 ca_peerOrg2 peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com orderer.example.com
ca.org1.example.com ca.org2.example.com peer0.org1.example.com peer1.org1.example.com peer0.org2.example.com peer1.org2.example.com orderer.example.com

#### Testing with Fabric Images at Docker Hub

Expand Down
8 changes: 4 additions & 4 deletions def/fabapi/testdata/test.yaml
Expand Up @@ -80,7 +80,7 @@ organizations:
- peer0.org2.example.com

certificateAuthorities:
- ca-org2
- ca.org2.example.com

ordererorg:
mspID: "OrdererOrg"
Expand Down Expand Up @@ -110,8 +110,8 @@ peers:
path: ${GOPATH}/src/github.com/hyperledger/fabric-sdk-go/${CRYPTOCONFIG_FIXTURES_PATH}/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem

certificateAuthorities:
ca-org2:
url: https://ca_peerOrg2:7054
ca.org2.example.com:
url: https://ca.org2.example.com:7054

httpOptions:
verify: true
Expand All @@ -126,4 +126,4 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw

caName: ca-org2
caName: ca.org2.example.com
8 changes: 4 additions & 4 deletions pkg/config/config.yaml
Expand Up @@ -162,7 +162,7 @@ organizations:
# dynamic certificate management (enroll, revoke, re-enroll). The following section is only for
# Fabric-CA servers.
# certificateAuthorities:
# - ca-org1
# - ca.org1.example.com

# [Optional]. If the application is going to make requests that are reserved to organization
# administrators, including creating/updating channels, installing/instantiating chaincodes, it
Expand Down Expand Up @@ -222,8 +222,8 @@ peers:
# Certificate Authority instead of Fabric-CA, in which case this section would not be specified.
#
certificateAuthorities:
# ca-org1:
# url: https://ca_peerOrg1:7054
# ca.org1.example.com:
# url: https://ca.org1.example.com:7054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
# httpOptions:
Expand All @@ -242,4 +242,4 @@ certificateAuthorities:
# enrollId: usually-it-is_admin
# enrollSecret: adminpasswd
# [Optional] The optional name of the CA.
# caName: ca-org1
# caName: ca.org1.example.com
12 changes: 6 additions & 6 deletions pkg/config/testdata/config_test_pem.yaml
Expand Up @@ -183,7 +183,7 @@ organizations:
# dynamic certificate management (enroll, revoke, re-enroll). The following section is only for
# Fabric-CA servers.
certificateAuthorities:
- ca-org1
- ca.org1.example.com

# [Optional]. If the application is going to make requests that are reserved to organization
# administrators, including creating/updating channels, installing/instantiating chaincodes, it
Expand Down Expand Up @@ -212,7 +212,7 @@ organizations:
- peer0.org2.example.com

certificateAuthorities:
- ca-org2
- ca.org2.example.com

# Orderer Org name
ordererorg:
Expand Down Expand Up @@ -312,7 +312,7 @@ peers:
# Certificate Authority instead of Fabric-CA, in which case this section would not be specified.
#
certificateAuthorities:
ca-org1:
ca.org1.example.com:
url: https://ca_peerOrg1:7054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
Expand Down Expand Up @@ -381,8 +381,8 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org1
ca-org2:
caName: ca.org1.example.com
ca.org2.example.com:
url: https://ca_peerOrg2:7054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
Expand All @@ -402,4 +402,4 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org2
caName: ca.org2.example.com
2 changes: 1 addition & 1 deletion pkg/fabric-client/events/eventmocks.go
Expand Up @@ -215,7 +215,7 @@ func (b *MockCCBlockEventBuilder) Build() *pb.Event_Block {
return b.BuildWithTxValidationFlag(true)
}

// Build builds a mock chaincode event block with valid/invalid TxValidation Flag (set in the argument)
// BuildWithTxValidationFlag builds a mock chaincode event block with valid/invalid TxValidation Flag (set in the argument)
func (b *MockCCBlockEventBuilder) BuildWithTxValidationFlag(isValid bool) *pb.Event_Block {
return &pb.Event_Block{
Block: &common.Block{
Expand Down
2 changes: 1 addition & 1 deletion pkg/fabric-txn/resmgmtclient/testdata/ccproposal_test.yaml
Expand Up @@ -83,7 +83,7 @@ organizations:
- peer0.org1.example.com
- peer1.org1.example.com
certificateAuthorities:
- ca-org1
- ca.org1.example.com

# Orderer Org name
ordererorg:
Expand Down
Expand Up @@ -76,7 +76,7 @@ organizations:
peers:
- peer0.org1.example.com
certificateAuthorities:
- ca-org1
- ca.org1.example.com

# Orderer Org name
ordererorg:
Expand Down
Expand Up @@ -54,7 +54,7 @@ organizations:
- peer0.org1.example.com

certificateAuthorities:
- ca-org1
- ca.org1.example.com

orderers:
orderer.example.com:
Expand Down
Expand Up @@ -53,7 +53,7 @@ organizations:
- peer0.org1.example.com

certificateAuthorities:
- ca-org1
- ca.org1.example.com

orderers:
orderer.example.com:
Expand Down
2 changes: 1 addition & 1 deletion pkg/fabric-txn/resmgmtclient/testdata/noorderer_test.yaml
Expand Up @@ -48,7 +48,7 @@ organizations:
- peer0.org1.example.com

certificateAuthorities:
- ca-org1
- ca.org1.example.com

#
# Empty orderer list (for testing purposes)
Expand Down
16 changes: 8 additions & 8 deletions test/fixtures/config/config_pkcs11_test.yaml
Expand Up @@ -178,7 +178,7 @@ organizations:
# dynamic certificate management (enroll, revoke, re-enroll). The following section is only for
# Fabric-CA servers.
certificateAuthorities:
- ca-org1
- ca.org1.example.com

# [Optional]. If the application is going to make requests that are reserved to organization
# administrators, including creating/updating channels, installing/instantiating chaincodes, it
Expand Down Expand Up @@ -207,7 +207,7 @@ organizations:
- peer0.org2.example.com

certificateAuthorities:
- ca-org2
- ca.org1.example.com

# Orderer Org name
ordererorg:
Expand Down Expand Up @@ -270,8 +270,8 @@ peers:
# Certificate Authority instead of Fabric-CA, in which case this section would not be specified.
#
certificateAuthorities:
ca-org1:
url: https://ca_peerOrg1:7054
ca.org1.example.com:
url: https://ca.org1.example.com:7054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
httpOptions:
Expand All @@ -290,9 +290,9 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org1
ca-org2:
url: https://ca_peerOrg2:8054
caName: ca.org1.example.com
ca.org2.example.com:
url: https://ca.org2.example.com:8054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
httpOptions:
Expand All @@ -311,4 +311,4 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org2
caName: ca.org2.example.com
16 changes: 8 additions & 8 deletions test/fixtures/config/config_test.yaml
Expand Up @@ -182,7 +182,7 @@ organizations:
# dynamic certificate management (enroll, revoke, re-enroll). The following section is only for
# Fabric-CA servers.
certificateAuthorities:
- ca-org1
- ca.org1.example.com

# [Optional]. If the application is going to make requests that are reserved to organization
# administrators, including creating/updating channels, installing/instantiating chaincodes, it
Expand Down Expand Up @@ -211,7 +211,7 @@ organizations:
- peer0.org2.example.com

certificateAuthorities:
- ca-org2
- ca.org2.example.com

# Orderer Org name
ordererorg:
Expand Down Expand Up @@ -275,8 +275,8 @@ peers:
# Certificate Authority instead of Fabric-CA, in which case this section would not be specified.
#
certificateAuthorities:
ca-org1:
url: https://ca_peerOrg1:7054
ca.org1.example.com:
url: https://ca.org1.example.com:7054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
httpOptions:
Expand All @@ -295,9 +295,9 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org1
ca-org2:
url: https://ca_peerOrg2:8054
caName: ca.org1.example.com
ca.org2.example.com:
url: https://ca.org2.example.com:8054
# the properties specified under this object are passed to the 'http' client verbatim when
# making the request to the Fabric-CA server
httpOptions:
Expand All @@ -316,4 +316,4 @@ certificateAuthorities:
enrollId: admin
enrollSecret: adminpw
# [Optional] The optional name of the CA.
caName: ca-org2
caName: ca.org2.example.com
8 changes: 4 additions & 4 deletions test/fixtures/dockerenv/docker-compose.yaml
Expand Up @@ -10,7 +10,7 @@ services:
image: ${FABRIC_DOCKER_REGISTRY}${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}${ARCH_SEP}${FABRIC_CA_FIXTURE_TAG}
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org1
- FABRIC_CA_SERVER_CA_NAME=ca.org1.example.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/8791d1363e89515f9afa042b0693a2c704bb8dd95d28f97d3549a2b9e3c4352d_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
Expand All @@ -28,13 +28,13 @@ services:
networks:
default:
aliases:
- ca_peerOrg1
- ca.org1.example.com

org2ca1:
image: ${FABRIC_DOCKER_REGISTRY}${FABRIC_CA_FIXTURE_IMAGE}:${ARCH}${ARCH_SEP}${FABRIC_CA_FIXTURE_TAG}
environment:
- FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server
- FABRIC_CA_SERVER_CA_NAME=ca-org2
- FABRIC_CA_SERVER_CA_NAME=ca.org2.example.com
- FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem
- FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a259204dbd6adb14c05a6e02de94567b2a9f7dbe9e6a063ba767d42bf0b544c1_sk
- FABRIC_CA_SERVER_TLS_ENABLED=true
Expand All @@ -52,7 +52,7 @@ services:
networks:
default:
aliases:
- ca_peerOrg2
- ca.org2.example.com

orderer1:
image: ${FABRIC_DOCKER_REGISTRY}${FABRIC_ORDERER_FIXTURE_IMAGE}:${ARCH}${ARCH_SEP}${FABRIC_ORDERER_FIXTURE_TAG}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/fabric_ca_test.go
Expand Up @@ -143,7 +143,7 @@ func TestRegisterEnrollRevoke(t *testing.T) {
t.Fatalf("Error Reenroling user. Enrollmet and Reenrollment certificates are the same.")
}

revokeRequest := ca.RevocationRequest{Name: userName, CAName: "ca-org1"}
revokeRequest := ca.RevocationRequest{Name: userName, CAName: "ca.org1.example.com"}
err = caClient.Revoke(adminUser, &revokeRequest)
if err != nil {
t.Fatalf("Error from Revoke: %s", err)
Expand Down

0 comments on commit 78503fe

Please sign in to comment.