-
Notifications
You must be signed in to change notification settings - Fork 515
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FABN-1159] Allow PEM paths relative to CCP
Allow a connection profile to specify paths to PEM files (for peer, orderer, and certificate authority TLS CA certs) that are relative to the connection profile file. Currently they must be relative to the current working directory, which is kind of useless if you want to zip up a connection profile and the PEM files and ship them around. Change-Id: Icd23c90553e5e4c81f6fe9245b6740b83749ec3e Signed-off-by: Simon Stone <[email protected]>
- Loading branch information
Simon Stone
committed
Feb 22, 2019
1 parent
3ef429f
commit 2ee102a
Showing
11 changed files
with
628 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "basic-network", | ||
"version": "1.0.0", | ||
"client": { | ||
"organization": "Org1", | ||
"connection": { | ||
"timeout": { | ||
"peer": { | ||
"endorser": "300" | ||
}, | ||
"orderer": "300" | ||
} | ||
} | ||
}, | ||
"organizations": { | ||
"Org1": { | ||
"mspid": "Org1MSP", | ||
"peers": [ | ||
"peer0.org1.example.com" | ||
], | ||
"certificateAuthorities": [ | ||
"ca.example.com" | ||
] | ||
} | ||
}, | ||
"orderers": { | ||
"orderer.example.com": { | ||
"url": "grpcs://localhost:7050", | ||
"tlsCACerts": { | ||
"pem": "-----BEGIN CERTIFICATE-----\nMIICSTCCAe+gAwIBAgIQPHXmPqjzn2bon7JrBRPS2DAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xOTAyMjExNDI4MDBaFw0yOTAyMTgxNDI4\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAELAsSPvzK3EdhGPZAMKYh67s02WqfYUe09xMzy7BzNODUKcbyIW5i7GVQ\n3YurSkR/auRsk6FG45Q1zTZaEvwVH6NfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud\nJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg8HHn3ScArMdH\nlkp+jpcDXtIAzWnVf4F9rBHvUNjcC1owCgYIKoZIzj0EAwIDSAAwRQIhAMi+R+ZI\nXgZV40IztD8aQDr/sntDTu/8Nw7Y0DGEhwaQAiBEnBCdRXaBcENWnAnastAg+RA5\nXALSidlQqZKrK4L3Yg==\n-----END CERTIFICATE-----\n" | ||
} | ||
} | ||
}, | ||
"peers": { | ||
"peer0.org1.example.com": { | ||
"url": "grpcs://localhost:7051", | ||
"tlsCACerts": { | ||
"pem": "-----BEGIN CERTIFICATE-----\nMIICSTCCAe+gAwIBAgIQPHXmPqjzn2bon7JrBRPS2DAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xOTAyMjExNDI4MDBaFw0yOTAyMTgxNDI4\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAELAsSPvzK3EdhGPZAMKYh67s02WqfYUe09xMzy7BzNODUKcbyIW5i7GVQ\n3YurSkR/auRsk6FG45Q1zTZaEvwVH6NfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud\nJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg8HHn3ScArMdH\nlkp+jpcDXtIAzWnVf4F9rBHvUNjcC1owCgYIKoZIzj0EAwIDSAAwRQIhAMi+R+ZI\nXgZV40IztD8aQDr/sntDTu/8Nw7Y0DGEhwaQAiBEnBCdRXaBcENWnAnastAg+RA5\nXALSidlQqZKrK4L3Yg==\n-----END CERTIFICATE-----\n" | ||
} | ||
} | ||
}, | ||
"certificateAuthorities": { | ||
"ca.example.com": { | ||
"url": "https://localhost:7054", | ||
"caName": "ca.example.com", | ||
"tlsCACerts": { | ||
"pem": "-----BEGIN CERTIFICATE-----\nMIICSTCCAe+gAwIBAgIQPHXmPqjzn2bon7JrBRPS2DAKBggqhkjOPQQDAjB2MQsw\nCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy\nYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz\nY2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xOTAyMjExNDI4MDBaFw0yOTAyMTgxNDI4\nMDBaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH\nEw1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD\nVQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D\nAQcDQgAELAsSPvzK3EdhGPZAMKYh67s02WqfYUe09xMzy7BzNODUKcbyIW5i7GVQ\n3YurSkR/auRsk6FG45Q1zTZaEvwVH6NfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud\nJQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQg8HHn3ScArMdH\nlkp+jpcDXtIAzWnVf4F9rBHvUNjcC1owCgYIKoZIzj0EAwIDSAAwRQIhAMi+R+ZI\nXgZV40IztD8aQDr/sntDTu/8Nw7Y0DGEhwaQAiBEnBCdRXaBcENWnAnastAg+RA5\nXALSidlQqZKrK4L3Yg==\n-----END CERTIFICATE-----\n" | ||
} | ||
} | ||
} | ||
} |
51 changes: 51 additions & 0 deletions
51
fabric-client/test/data/ccp/connection-missing-relative-ccp-pems.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
{ | ||
"name": "basic-network", | ||
"version": "1.0.0", | ||
"client": { | ||
"organization": "Org1", | ||
"connection": { | ||
"timeout": { | ||
"peer": { | ||
"endorser": "300" | ||
}, | ||
"orderer": "300" | ||
} | ||
} | ||
}, | ||
"organizations": { | ||
"Org1": { | ||
"mspid": "Org1MSP", | ||
"peers": [ | ||
"peer0.org1.example.com" | ||
], | ||
"certificateAuthorities": [ | ||
"ca.example.com" | ||
] | ||
} | ||
}, | ||
"orderers": { | ||
"orderer.example.com": { | ||
"url": "grpcs://localhost:7050", | ||
"tlsCACerts": { | ||
"path": "pems/notherelulz.pem" | ||
} | ||
} | ||
}, | ||
"peers": { | ||
"peer0.org1.example.com": { | ||
"url": "grpcs://localhost:7051", | ||
"tlsCACerts": { | ||
"path": "pems/notherelulz.pem" | ||
} | ||
} | ||
}, | ||
"certificateAuthorities": { | ||
"ca.example.com": { | ||
"url": "https://localhost:7054", | ||
"caName": "ca.example.com", | ||
"tlsCACerts": { | ||
"path": "pems/notherelulz.pem" | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.