Skip to content

Commit

Permalink
fix: request to https if the tls is enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Sanket <[email protected]>

added the snapshots
  • Loading branch information
Sanket-0510 committed Apr 9, 2024
1 parent 3aa4587 commit ec534ed
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 31 deletions.
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

0 comments on commit ec534ed

Please sign in to comment.