mc2-project / federated-xgboost

Federated gradient boosted decision tree learning
68 stars 20 forks source link

Trouble with certificate signing for multiple clients #17

Closed grasses closed 3 years ago

grasses commented 3 years ago

I got into trouble with certificate signing for multiple clients. I solved this problem and write this issue to help others.

Error info:

failed in ReconnectLink [14:18:55] /home/xxx/federated-xgboost/rabit/include/rabit/internal/ssl_socket.h:26: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed
Stack trace:
...

First, generate a root certificate:

cd demo/basic/cert
bash gen-signer.sh
cp signer.crt root_cert.crt  # rename root_cert.crt

Second, issue a certificate to clients:

bash gen-client.sh client1
mv -f client1.crt cert_chain.crt         # rename crt
mv -f client1.pem private_key.pem  # rename pem

Since rabit set .crt and .pem file in c (federated-xgboost/rabit/src/allreduce_base.cc), we should rename crt and pem for client.

abdullahyousafzai commented 3 years ago

@grasses thank you