Archived Forum Post

Index of archived forum posts

Question:

How to generate a Certificate Signing Request (CSR)?

Dec 01 '16 at 20:57

How can I generate a Certificate Signing Request (CSR) file using the Chilkat components?

The CSR is a base64 encoded file that contains the following lines:

-----BEGIN NEW CERTIFICATE REQUEST----- ... ... -----END NEW CERTIFICATE REQUEST-----

The openssl equivalent command is:

openssl req -newkey rsa:2048 -nodes -keyout newPrivateKey.pem -out myRequest.csr

Thank you!


Answer

This is not a feature within Chilkat at the time of this post. It is a on Chilkat's list, as well as an ASN.1 API. Don't hold your breath though..


Answer

Is this feature available now please?


Answer

Hi, i have two ideas to stick with: 1. Generate CSR online: Generate RSA keypair with CkoRSA then convert to PEM format. Submit it to your private and secure server which capable of running "openssl req -new -key <yourkey.pem> -out <your_csr>.csr" and download the CSR. Pros: it simple, openssl command line is easies way to go Cons: This approach share your private on the line, so pay attention on data encryption before sharing.

2.Generate CSR locally on iOSApp #1. Generate RSA keypair, #2.Convert it to P12 format, #3. then try https://github.com/ateska/ios-csr to generate CSR My problem is at #2, the following code is still not success CkoPem pem = [[CkoPem alloc] init]; [pem AddPrivateKey: privKey]; [pem AddPublicKey: publicKey]; CkoPfx pfx = [pem ToPfx]; //nil, LastErrorText: Failed to find/build certificate chain for a private key.

I believe if we could fix #2, then we have a work around for this issue.

Thanks, Hung,