Sign new certificates in Rails application

前提是你 提交于 2019-12-04 19:23:09

You might want to take a look at how we’ve done something similar in the past with a tool we call ‘Certificate Depot’.

You can generate keypair using openssl gem or sshkey.

Pass out the cert as a text file or plain text

I have this working now. The OpenSSL lib in Ruby has all the methods you need for CA work, documented here with clear examples: http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL.html

I didn't need to set up an OpenSSL CA on the server (as linked in the question above) -- that is for using command line openssl as a CA. Using it from Ruby, you need to manage your own CA cert storage, unique serial numbers etc.

If you want the client certs to be downloadable directly to a browser, offer PCKS12 bundles with a ".p12" file extension. See http://www.ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/PKCS12.html Use a friendly name for the "name" param -- this doesn't affect the DN of your certificate, but it makes it easy to find in the browser's choose key dialog. Don't include your CA cert in the PKCS12 bundle, Windows will ask the users to install your CA as a fully trusted root CA.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!