Skip to content
This repository has been archived by the owner on Jan 23, 2024. It is now read-only.

Error: x509: certificate signed by unknown authority #122

Open
joesoh opened this issue Dec 12, 2020 · 2 comments
Open

Error: x509: certificate signed by unknown authority #122

joesoh opened this issue Dec 12, 2020 · 2 comments

Comments

@joesoh
Copy link

joesoh commented Dec 12, 2020

When running, enroll command
fabric-ca-client enroll -u https://$ADMINUSER:$ADMINPWD@$CASERVICEENDPOINT --tls.certfiles /home/ec2-user/managedblockchain-tls-chain.pem -M /home/ec2-user/admin-msp

I got this certificate signed by an unknown authority. Does anyone encounter this before?
Error: POST failure of request: POST https://ca.m-mncy4qiyg5hdrfqo4bccrbqjeu.n-xa5l3pcnu5c6hmnk6e24dzoijq.managedblockchain.ap-southeast-1.amazonaws.com:30002/enroll {​​​​"hosts":["ip-10-0-40-173"],"certificate_request":"-----BEGIN CERTIFICATE REQUEST-----\nMIIBRDCB6wIBADBdMQswCQYDVQQGEwJVUzEXMBUGA1UECBMOTm9ydGggQ2Fyb2xp\nbmExFDASBgNVBAoTC0h5cGVybGVkZ2VyMQ8wDQYDVQQLEwZGYWJyaWMxDjAMBgNV\nBAMTBWFkbWluMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE4S1gl2Yy1JNPhb5K\n40l76l7oL/yp009IVrVg7C6d1udQNBDdhrxFBQp6Hddp2buLIbltbHH7q9PWZRvr\n5Ij20aAsMCoGCSqGSIb3DQEJDjEdMBswGQYDVR0RBBIwEIIOaXAtMTAtMC00MC0x\nNzMwCgYIKoZIzj0EAwIDSAAwRQIhAOR2fAYtMyHO4AopxOTpXYT1EN2K5mRqOYgl\nyoxXERFMAiA4guhgHfz4NdntNrlje24LMrCaYH5u8E2uI3Vc/yXjWQ==\n-----END CERTIFICATE REQUEST-----\n","profile":"","crl_override":"","label":"","NotBefore":"0001-01-01T00:00:00Z","NotAfter":"0001-01-01T00:00:00Z","CAName":""}​​​​: Post https://ca.m-mncy4qiyg5hdrfqo4bccrbqjeu.n-xa5l3pcnu5c6hmnk6e24dzoijq.managedblockchain.ap-southeast-1.amazonaws.com:30002/enroll: x509: certificate signed by unknown authority

@awattez
Copy link

awattez commented Jul 25, 2021

same here

@awattez
Copy link

awattez commented Jul 25, 2021

I found the solution, the x509: certificate signed by unknown authority is indeed an error related to the TLS certificate.

When I look at your call URL to the CA https: //ca.m-mncy4qiyg5hdrfqo4bccrbqjeu.n-xa5l3pcnu5c6hmnk6e24dzoijq.managedblockchain.ap-southeast-1.amazonaws.com: 30002, we see that your managed blockchain is in the managed blockchain region ap-southeast-1 or each region has its own TLS certificate.

it is therefore necessary not to recover the last pem file from us-east-1 but from ap-southeast-1.
In the part https://github.com/aws-samples/non-profit-blockchain/tree/master/ngo-fabric#part1-build-a-hyperledger-fabric-blockchain-network-using-amazon-managed-blockchain it is necessary to replace the command:

aws s3 cp s3: //us-east-1.managedblockchain/etc/managedblockchain-tls-chain.pem /home/ec2-user/managedblockchain-tls-chain.pem

by

aws s3 cp s3: //ap-southeast-1.managedblockchain/etc/managedblockchain-tls-chain.pem /home/ec2-user/managedblockchain-tls-chain.pem

Ditto for other regions where we can deploy AWS Managed Blockchain Hyperledger

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants