Skip to content

Commit

Permalink
fix admin certs for local fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
dshuffma-ibm committed Aug 18, 2017
1 parent ab3992d commit 574600b
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 10 deletions.
14 changes: 7 additions & 7 deletions config/blockchain_creds_local.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
],
"certificateAuthorities": [
"fabric-ca"
]
},
"adminPrivateKey": {
"path": "./crypto/privateKey.pem"
},
"signedCert": {
"path": "./crypto/signedCert.pem"
],
"adminPrivateKey": {
"path": "./crypto/prebaked/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8-priv"
},
"signedCert": {
"path": "./crypto/prebaked/PeerAdminCert.pem"
}
}
},
"orderers": {
Expand Down
14 changes: 14 additions & 0 deletions config/crypto/prebaked/PeerAdminCert.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-----BEGIN CERTIFICATE-----
MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw
CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy
YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu
b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla
MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T
YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw
EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT
8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD
VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE
yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/
yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy
CKqf8052NVUs2CvPzA==
-----END CERTIFICATE-----
3 changes: 2 additions & 1 deletion dictionary_blockchain.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,5 @@ decodeb64
cc's
keepalive
lscc
rwset
rwset
priv
4 changes: 2 additions & 2 deletions utils/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ module.exports = function (config_filename, logger) {
helper.getAdminPrivateKeyPEM = function (orgName) {
if (orgName && helper.creds.organizations && helper.creds.organizations[orgName]) {
if (!helper.creds.organizations[orgName].adminPrivateKey) {
throw new Error('Admin private key is not found in the creds json file');
throw new Error('Admin private key is not found in the creds json file: ' + orgName);
} else {
return loadPem(helper.creds.organizations[orgName].adminPrivateKey);
}
Expand All @@ -299,7 +299,7 @@ module.exports = function (config_filename, logger) {
helper.getAdminSignedCertPEM = function (orgName) {
if (orgName && helper.creds.organizations && helper.creds.organizations[orgName]) {
if (!helper.creds.organizations[orgName].signedCert) {
throw new Error('Admin certificate is not found in the creds json file');
throw new Error('Admin certificate is not found in the creds json file: ' + orgName);
} else {
return loadPem(helper.creds.organizations[orgName].signedCert);
}
Expand Down

0 comments on commit 574600b

Please sign in to comment.