How to generate proof of ownership for X509 certificate using OpenSSL?


Dalton Sezan

I need to generate proof of ownership and sign the captcha with my private key.

I didn't find a question related to this in stack overflow, nor did I find any reference on the Internet. I am following this tutorial , but I want to use OpenSSL.

My captcha is related to the X509 certificate and looks like this:

7A69A4702DA903A41C3A5BC5575A8E3F49BEC5E5BA2D4CE1
Dalton Sezan

I got an answer from the Azure support team.

I already have the root key and X509 certificate generated with:

openssl req -x509 -newkey rsa:2048 -keyout root_private.pem -nodes -out root_cert.pem

Then, I need to generate a verification certificate...

  • Create a verification code:

    openssl genrsa -out verification.key 2048
    
  • Create an authentication certificate:

    openssl req -new -key verification.key -out verification.csr
    

When creating a verification certificate, I need to specify the obtained verification code ( ) 7A69A4702DA903A41C3A5BC5575A8E3F49BEC5E5BA2D4CE1as the " Common Name " certificate field.

Now just create a proof of ownership certificate with the following command:

openssl x509 -req -in verification.csr -CA root_cert.pem -CAkey root_private.pem -CAcreateserial -out verificationCert.pem -days 1024 -sha256

If I remember correctly, the last command uses the root private key to sign verification.csrthe captcha as the common name . Finally, can be used as proof of ownership .verificationCert.pem

Related


Get X509 certificate hash using OpenSSL library

Sn0wfreeze I'm currently developing an application that uses the openssl library (libcrypto) to generate certificates. Now, I have to get the hash of an already existing certificate. When I use the terminal, I can generate the hash by using openssl x509 -hash

Get X509 certificate hash using OpenSSL library

Sn0wfreeze I'm currently developing an application that uses the openssl library (libcrypto) to generate certificates. Now, I have to get the hash of an already existing certificate. When I use the terminal, I can generate the hash by using openssl x509 -hash

Modify extension list in X509 certificate using OpenSSL in C

Phoenix Blue I'm trying to insert a signed sct into a pre-certificate with a poison extension. So I first removed the poison extension and then added the SCT. This is what I did: int main(int argc, char **argv) { size_t lenCert = 0, lenCert2 = 0; char

Generate X509 certificate using Bouncy Castle Java

Reddy: I am looking for an example or tutorial for generating X509 certificates using BC in Java. Many examples have/use deprecated APIs. I looked at BC but it doesn't show which class is doing what or doesn't have proper documentation/examples. If you have an

Generate X509 certificate using Bouncy Castle Java

Reddy: I am looking for an example or tutorial for generating X509 certificates using BC in Java. Many examples have/use deprecated APIs. I looked at BC but it doesn't show which class is doing what or doesn't have proper documentation/examples. If you have an

Generate X509 certificate with BouncyCastle using Java

Suresh Atta This is my ability to generate digital certificates now. Now I can generate a digital certificate whose password is protected by the private key. public static void main(String[] args) throws Exception { Security.addProvider(new BouncyCastlePro

Generate X509 certificate with BouncyCastle using Java

Suresh Atta This is my ability to generate digital certificates now. Now I can generate a digital certificate whose password is protected by the private key. public static void main(String[] args) throws Exception { Security.addProvider(new BouncyCastlePro

Generate X509 certificate using Bouncy Castle Java

Reddy: I am looking for an example or tutorial for generating X509 certificates using BC in Java. Many examples have/use deprecated APIs. I looked at BC but it doesn't show which class is doing what or doesn't have proper documentation/examples. If you have an

Generate X509 certificate with BouncyCastle using Java

Suresh Atta This is my ability to generate digital certificates now. Now I can generate a digital certificate whose password is protected by the private key. public static void main(String[] args) throws Exception { Security.addProvider(new BouncyCastlePro

How to generate EC X509 certificate on unix?

PhD I need to generate X509 certificate using EC. What commands do I need to execute in order to get the file for PEMthis certificate ? Stephen Feister First, you need to create a private key using the elliptic curve of your choice: openssl ecparam -name <curv

Convert OpenSSL X509 certificate to string

Martin I am using the following code (simplified a bit) to get the certificate string from the X509 structure. Basically the PEM_write_bio_X509 function. X509 *certificate... .... BIO *bio = BIO_new(BIO_s_mem()), BIO_vfree); if (!bio || !PEM_write_bio_X509(bio

Convert OpenSSL X509 certificate to string

Martin I am using the following code (simplified a bit) to get the certificate string from the X509 structure. Basically the PEM_write_bio_X509 function. X509 *certificate... .... BIO *bio = BIO_new(BIO_s_mem()), BIO_vfree); if (!bio || !PEM_write_bio_X509(bio

How to download x509 certificate using python

username I need to download server certificate as DER file. I am using python. I can connect to the server using this script, but I need to download the certificate locally to my hard drive to parse it in the next step. import socket, ssl import OpenSSL hostn

Get chain or CA issuer from x509 certificate using OpenSSL CLI

n3mo I'm trying to build a certificate chain from a certificate (or just get a certificate from somewhere) using OpenSSL (preferably using the command line interface). I found some examples on the internet, but I have a problem: "Where can I get the CA issuer

Get chain or CA issuer from x509 certificate using OpenSSL CLI

n3mo I'm trying to build a certificate chain from a certificate (or just get a certificate from somewhere) using OpenSSL (preferably using the command line interface). I found some examples on the internet, but I have a problem: "Where can I get the CA issuer

Get chain or CA issuer from x509 certificate using OpenSSL CLI

n3mo I'm trying to build a certificate chain from a certificate (or just get a certificate from somewhere) using OpenSSL (preferably using the command line interface). I found some examples on the internet, but I have a problem: "Where can I get the CA issuer

Get chain or CA issuer from x509 certificate using OpenSSL CLI

n3mo I'm trying to build a certificate chain from a certificate (or just get a certificate from somewhere) using OpenSSL (preferably using the command line interface). I found some examples on the internet, but I have a problem: "Where can I get the CA issuer

Get chain or CA issuer from x509 certificate using OpenSSL CLI

n3mo I'm trying to build a certificate chain from a certificate (or just get a certificate from somewhere) using OpenSSL (preferably using the command line interface). I found some examples on the internet, but I have a problem: "Where can I get the CA issuer

OpenSSL x509 certificate: add extension using X509_add1_ext_i2d()

Brian Context: I am using the API in OpenSSL to generate x509 certificates. I first create the X509 structure like this: X509 *x509 = X509_new(); // Assume no errors What I am trying to do is: Now I want to add an extension to this certificate. Specifically

OpenSSL x509 certificate: add extension using X509_add1_ext_i2d()

Brian Context: I am using the API in OpenSSL to generate x509 certificates. I first create the X509 structure like this: X509 *x509 = X509_new(); // Assume no errors What I am trying to do is: Now I want to add an extension to this certificate. Specifically

OpenSSL x509 certificate: add extension using X509_add1_ext_i2d()

Brian Context: I am using the API in OpenSSL to generate x509 certificates. I first create the X509 structure like this: X509 *x509 = X509_new(); // Assume no errors What I am trying to do is: Now I want to add an extension to this certificate. Specifically

Swift - Certificate Request with Proof of Ownership

click I have constructed a PKCS#10 certificate request with a Proof of Ownership element that will be sent via ACS to the certificate authority to obtain the user certificate. In an Android app, it uses the SpongyCastle package ( SpongyCastle ) Does anyone kno