Payment Request: Can't figure out how generate a x509 certificate
ticruz38 opened this issue · 2 comments
I just can't find a way to generate such file.
var certificates = new PaymentProtocol().makeX509Certificates();
certificates.set('certificate', [file_with_x509_der_cert]);
Is there any utilities function in the bitcore-payment-protocol API to generate such x509_der_cent file?
I do not have any knowledge in such field, I just assume it has something to deal with HTTPS
This is not something provided by Bitcore. It's a SSL certificate, the same exact thing used by websites to verify identity, and establish an encrypted session. BIP70 uses it to prevent man-in-the-middle attacks, by ensuring that the payment is going to the intended recipient. You can pay companies like GoDaddy for a SSL cert, or there are some free providers. I like the Linux Foundation's LetsEncrypt https://letsencrypt.org/howitworks/
using the letsencerypt tool, it will produce 4 files. privkey.pem
, cert.pem,
chain.pem
, and fullchain.pem
. I belive the x509_der_cert file you are looking for is the cert.pem
. Other SSL providers will give you similar files.
Yes thank you, I'll give it a try! I'll close it since it has nothing to deal with that library.