Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: request to https if the tls is enabled #438

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro
},
\\"certificateAuthorities\\": {
\\"ca.orderer.example.com\\": {
\\"url\\": \\"http://localhost:7020\\",
\\"url\\": \\"https://localhost:7020\\",
\\"caName\\": \\"ca.orderer.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\"
Expand Down Expand Up @@ -280,7 +280,7 @@ peers:
ssl-target-name-override: peer1.org1.example.com
certificateAuthorities:
ca.orderer.example.com:
url: http://localhost:7020
url: https://localhost:7020
caName: ca.orderer.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -332,7 +332,7 @@ exports[`samples/fablo-config-hlf1.4-1org-1chaincode-raft.json should create pro
},
\\"certificateAuthorities\\": {
\\"ca.org1.example.com\\": {
\\"url\\": \\"http://localhost:7040\\",
\\"url\\": \\"https://localhost:7040\\",
\\"caName\\": \\"ca.org1.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\"
Expand Down Expand Up @@ -377,7 +377,7 @@ peers:
ssl-target-name-override: peer1.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://localhost:7040
url: https://localhost:7040
caName: ca.org1.example.com
tlsCACerts:
path: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p
},
\\"certificateAuthorities\\": {
\\"ca.orderer.example.com\\": {
\\"url\\": \\"http://localhost:7020\\",
\\"url\\": \\"https://localhost:7020\\",
\\"caName\\": \\"ca.orderer.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\"
Expand Down Expand Up @@ -378,7 +378,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.orderer.example.com:
url: http://localhost:7020
url: https://localhost:7020
caName: ca.orderer.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -450,7 +450,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p
},
\\"certificateAuthorities\\": {
\\"ca.org1.example.com\\": {
\\"url\\": \\"http://localhost:7040\\",
\\"url\\": \\"https://localhost:7040\\",
\\"caName\\": \\"ca.org1.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\"
Expand Down Expand Up @@ -511,7 +511,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://localhost:7040
url: https://localhost:7040
caName: ca.org1.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -583,7 +583,7 @@ exports[`samples/fablo-config-hlf1.4-2orgs-2chaincodes-raft.json should create p
},
\\"certificateAuthorities\\": {
\\"ca.org2.example.com\\": {
\\"url\\": \\"http://localhost:7060\\",
\\"url\\": \\"https://localhost:7060\\",
\\"caName\\": \\"ca.org2.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\"
Expand Down Expand Up @@ -644,7 +644,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.org2.example.com:
url: http://localhost:7060
url: https://localhost:7060
caName: ca.org2.example.com
tlsCACerts:
path: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre
},
\\"certificateAuthorities\\": {
\\"ca.orderer.example.com\\": {
\\"url\\": \\"http://localhost:7020\\",
\\"url\\": \\"https://localhost:7020\\",
\\"caName\\": \\"ca.orderer.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\"
Expand Down Expand Up @@ -259,7 +259,7 @@ peers:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.orderer.example.com:
url: http://localhost:7020
url: https://localhost:7020
caName: ca.orderer.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -301,7 +301,7 @@ exports[`samples/fablo-config-hlf2-1org-1chaincode-raft-explorer.json should cre
},
\\"certificateAuthorities\\": {
\\"ca.org1.example.com\\": {
\\"url\\": \\"http://localhost:7040\\",
\\"url\\": \\"https://localhost:7040\\",
\\"caName\\": \\"ca.org1.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\"
Expand Down Expand Up @@ -338,7 +338,7 @@ peers:
ssl-target-name-override: peer0.org1.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://localhost:7040
url: https://localhost:7040
caName: ca.org1.example.com
tlsCACerts:
path: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro
},
\\"certificateAuthorities\\": {
\\"ca.orderer1.com\\": {
\\"url\\": \\"http://localhost:7020\\",
\\"url\\": \\"https://localhost:7020\\",
\\"caName\\": \\"ca.orderer1.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer1.com/ca/ca.orderer1.com-cert.pem\\"
Expand Down Expand Up @@ -469,7 +469,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.orderer1.com:
url: http://localhost:7020
url: https://localhost:7020
caName: ca.orderer1.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -541,7 +541,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro
},
\\"certificateAuthorities\\": {
\\"ca.orderer2.com\\": {
\\"url\\": \\"http://localhost:7040\\",
\\"url\\": \\"https://localhost:7040\\",
\\"caName\\": \\"ca.orderer2.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer2.com/ca/ca.orderer2.com-cert.pem\\"
Expand Down Expand Up @@ -602,7 +602,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.orderer2.com:
url: http://localhost:7040
url: https://localhost:7040
caName: ca.orderer2.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -674,7 +674,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro
},
\\"certificateAuthorities\\": {
\\"ca.org1.example.com\\": {
\\"url\\": \\"http://localhost:7060\\",
\\"url\\": \\"https://localhost:7060\\",
\\"caName\\": \\"ca.org1.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\"
Expand Down Expand Up @@ -735,7 +735,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://localhost:7060
url: https://localhost:7060
caName: ca.org1.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -807,7 +807,7 @@ exports[`samples/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml should create pro
},
\\"certificateAuthorities\\": {
\\"ca.org2.example.com\\": {
\\"url\\": \\"http://localhost:7080\\",
\\"url\\": \\"https://localhost:7080\\",
\\"caName\\": \\"ca.org2.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\"
Expand Down Expand Up @@ -868,7 +868,7 @@ peers:
ssl-target-name-override: peer1.org2.example.com
certificateAuthorities:
ca.org2.example.com:
url: http://localhost:7080
url: https://localhost:7080
caName: ca.org2.example.com
tlsCACerts:
path: >-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr
},
\\"certificateAuthorities\\": {
\\"ca.orderer.example.com\\": {
\\"url\\": \\"http://localhost:7020\\",
\\"url\\": \\"https://localhost:7020\\",
\\"caName\\": \\"ca.orderer.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/orderer.example.com/ca/ca.orderer.example.com-cert.pem\\"
Expand Down Expand Up @@ -500,7 +500,7 @@ peers:
ssl-target-name-override: peer1.org3.example.com
certificateAuthorities:
ca.orderer.example.com:
url: http://localhost:7020
url: https://localhost:7020
caName: ca.orderer.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -592,7 +592,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr
},
\\"certificateAuthorities\\": {
\\"ca.org1.example.com\\": {
\\"url\\": \\"http://localhost:7040\\",
\\"url\\": \\"https://localhost:7040\\",
\\"caName\\": \\"ca.org1.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem\\"
Expand Down Expand Up @@ -669,7 +669,7 @@ peers:
ssl-target-name-override: peer1.org3.example.com
certificateAuthorities:
ca.org1.example.com:
url: http://localhost:7040
url: https://localhost:7040
caName: ca.org1.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -761,7 +761,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr
},
\\"certificateAuthorities\\": {
\\"ca.org2.example.com\\": {
\\"url\\": \\"http://localhost:7060\\",
\\"url\\": \\"https://localhost:7060\\",
\\"caName\\": \\"ca.org2.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem\\"
Expand Down Expand Up @@ -838,7 +838,7 @@ peers:
ssl-target-name-override: peer1.org3.example.com
certificateAuthorities:
ca.org2.example.com:
url: http://localhost:7060
url: https://localhost:7060
caName: ca.org2.example.com
tlsCACerts:
path: >-
Expand Down Expand Up @@ -930,7 +930,7 @@ exports[`samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json should cr
},
\\"certificateAuthorities\\": {
\\"ca.org3.example.com\\": {
\\"url\\": \\"http://localhost:7080\\",
\\"url\\": \\"https://localhost:7080\\",
\\"caName\\": \\"ca.org3.example.com\\",
\\"tlsCACerts\\": {
\\"path\\": \\"<absolute path>/samples/fablo-target/fabric-config/crypto-config/peerOrganizations/org3.example.com/ca/ca.org3.example.com-cert.pem\\"
Expand Down Expand Up @@ -1007,7 +1007,7 @@ peers:
ssl-target-name-override: peer1.org3.example.com
certificateAuthorities:
ca.org3.example.com:
url: http://localhost:7080
url: https://localhost:7080
caName: ca.org3.example.com
tlsCACerts:
path: >-
Expand Down
2 changes: 1 addition & 1 deletion src/types/ConnectionProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function certificateAuthorities(
if (isTls) {
return {
[org.ca.address]: {
url: `http://localhost:${org.ca.exposePort}`,
url: `https://localhost:${org.ca.exposePort}`,
caName: org.ca.address,
tlsCACerts: {
path: `${rootPath}/peerOrganizations/${org.domain}/ca/${org.ca.address}-cert.pem`,
Expand Down
Loading