Closed wellbranding closed 2 years ago
I'm using this library and I'm need this certificate too. I create a bash script to help me undestand what I need to make the .p12 certificate. This helps me and can help someone too, then I will put it here. This was my solution. Take and modify what you want.
# References:
# https://stackoverflow.com/questions/21141215/creating-a-p12-file
# https://www.digicert.com/kb/ssl-support/openssl-quick-reference-guide.htm#:~:text=The%20CSR%20is%20created%20using,you%20(or%20your%20company).
PASSWORD="XXXXX"
SLEEP_TIME=4
echo ""
echo "Generate 2048-bit RSA private key:"
echo ""
openssl genrsa -out private-key.pem 2048
sleep $SLEEP_TIME
echo ""
echo "Generate a Certificate Signing Request:"
echo ""
openssl req -new -sha256 -key private-key.pem -out certificate.csr
sleep $SLEEP_TIME
echo ""
echo "Generate a self-signed x509 certificate suitable for use on web servers:"
echo ""
openssl req -x509 -sha256 \
-days 365 \
-key private-key.pem \
-in certificate.csr \
-out certificate.pem
sleep $SLEEP_TIME
echo ""
echo "Create SSL identity file in PKCS12:"
echo ""
openssl pkcs12 -export \
-out client-identity.p12 \
-inkey private-key.pem \
-in certificate.pem \
-passout "pass:$PASSWORD"
sleep $SLEEP_TIME
echo ""
echo "Complete"
echo ""
This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.
Hello, I am unsure how should I move to production (I am creating my own e-signing SAAS, which uses this code to create digital signatures). Specifically, I am not sure, about certificates using in this library. Should I somehow create my own certificate and bind it to public authority? Or how does that work? I suppose I can't use the following certificate /../resources/certificate.p12` to sign documents? Or can I?