Skip to content

Commit

Permalink
[FABN-1169] Backport certifcate fix from master
Browse files Browse the repository at this point in the history
- Backport fix from master
- Enable mutual TLS (client authetication)

Change-Id: Id2fab00875f643e7734458158f3a5dddcf6f5360
Signed-off-by: nkl199@yahoo.co.uk <nkl199@yahoo.co.uk>
  • Loading branch information
nklincoln committed Mar 5, 2019
1 parent 3bc8b6c commit adbe75a
Show file tree
Hide file tree
Showing 314 changed files with 2,387 additions and 3,426 deletions.
10 changes: 4 additions & 6 deletions build/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const shell = require('gulp-shell');
const testConstants = require('../../test/unit/constants.js');

// Debug level of Docker containers used in scenario tests
process.env.DOCKER_DEBUG = 'INFO';
process.env.DOCKER_DEBUG = 'debug';

// by default for running the tests print debug to a file
const debugPath = path.join(testConstants.tempdir, 'test-log', 'debug.log');
Expand Down Expand Up @@ -98,18 +98,16 @@ gulp.task('docker-clean', shell.task([
'docker rmi $(docker images | grep "^dev-" | awk \'{print $3}\')',

// clean up all the containers created by docker-compose
// -tape
'docker-compose -f test/fixtures/docker-compose.yaml down',
// -cucumber
'docker-compose -f test/scenario/docker-compose/docker-compose-tls.yaml down'
'docker-compose -f test/fixtures/docker-compose/docker-compose-tls-level-db.yaml -p node down',
'docker-compose -f test/fixtures/docker-compose/docker-compose-tls.yaml -p node down'
], {
verbose: true, // so we can see the docker command output
ignoreErrors: true // kill and rm may fail because the containers may have been cleaned up
}));

gulp.task('docker-ready', ['docker-clean'], shell.task([
// make sure that necessary containers are up by docker-compose
'docker-compose -f test/fixtures/docker-compose.yaml up -d'
'docker-compose -f test/fixtures/docker-compose/docker-compose-tls-level-db.yaml -p node up -d'
]));

gulp.task('lint', ['eslint', 'tslint']);
Expand Down
2 changes: 1 addition & 1 deletion fabric-client/test/BlockDecoder.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('BlockDecoder', () => {
let FakeLogger;

before(() => {
data = fs.readFileSync(path.join(__dirname, '../../test/fixtures/channel/twoorgs.genesis.block'));
data = fs.readFileSync(path.join(__dirname, '../../test/fixtures/crypto-material/config-base/twoorgs.genesis.block'));
});

beforeEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions scripts/check_license.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ function filterExcludedFiles {
| grep -v "^LICENSE$" \
| grep -v "\.png$" \
| grep -v "\.rst$" \
| grep -v "\.pem$" \
| grep -v "\.block$" \
| grep -v "\.tx$" \
| grep -v "\.txt$" \
| grep -v "_sk$" \
| grep -v "\.pem$" \
| grep -v ".crt$" \
| grep -v "\.key$" \
| grep -v "\.gen\.go$" \
| grep -v "^Gopkg\.lock$" \
Expand Down
10 changes: 5 additions & 5 deletions test/fixtures/caimport.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"ca-import" : {
"orgs": {
"orgs": {
"org1": {
"username": "admin",
"name": "peerOrg1",
"mspid": "Org1MSP",
"storePath": "/tmp/hfc-test-kvs_org1",
"cryptoContent": {
"privateKey": "../fixtures/msp/local/keystore/admin.pem",
"signedCert": "../fixtures/msp/local/signcerts/admin.pem"
"privateKey": "../fixtures/crypto-material/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/key.pem",
"signedCert": "../fixtures/crypto-material/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem"
}
},
"org2": {
Expand All @@ -17,8 +17,8 @@
"mspid": "Org2MSP",
"storePath": "/tmp/hfc-test-kvs_org2",
"cryptoContent": {
"privateKeyPEM": "-----BEGIN PRIVATE KEY-----MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg2HxfPVxvwHYM5X8o/tEoDZ54Rl9uW13U6RElpnFOCruhRANCAATx8pv9DCChfwHoa7IRUf2z7GTmC3k2Tl8e7DWA9fZ4cpL9vdk0ZMgQZKo8Gm61NSTuHMZ8zp3uZn7QOcCmwuDg-----END PRIVATE KEY-----",
"signedCertPEM": "-----BEGIN CERTIFICATE-----MIIB8TCCAZegAwIBAgIUasxwoRvBrGrdyg9+HtdJ3brpcuMwCgYIKoZIzj0EAwIwfzELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lzY28xHzAdBgNVBAoTFkludGVybmV0IFdpZGdldHMsIEluYy4xDDAKBgNVBAsTA1dXVzEUMBIGA1UEAxMLZXhhbXBsZS5jb20wHhcNMTcwMTE5MTk1NjAwWhcNMTcxMjE5MDM1NjAwWjAQMQ4wDAYDVQQDEwVhZG1pbjBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABPHym/0MIKF/AehrshFR/bPsZOYLeTZOXx7sNYD19nhykv292TRkyBBkqjwabrU1JO4cxnzOne5mftA5wKbC4OCjYDBeMA4GA1UdDwEB/wQEAwICBDAMBgNVHRMBAf8EAjAAMB0GA1UdDgQWBBQtEfVCvKOzNSiTgpaWzaYVm6eaBzAfBgNVHSMEGDAWgBQXZ0I9qp6CP8TFHZ9bw5nRtZxIEDAKBggqhkjOPQQDAgNIADBFAiEAvGd5YDIBeQZWpP9wEHFmezvSCjrzy8VcvH/7Yuv3vcoCICy5ssNrEHEyWXqBqeKfU/zrPhHsWJFIaJEDQLRQE05l-----END CERTIFICATE-----"
"privateKeyPEM": "../fixtures/crypto-material/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/key.pem",
"signedCertPEM": "../fixtures/crypto-material/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem"
}
}
}
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit adbe75a

Please sign in to comment.