Generating JSON for /add-chain request

135 views
Skip to first unread message

Meadow bladerunner

unread,
May 8, 2023, 5:02:15 AM5/8/23
to crt.sh
Hi there!

I'm experimenting with adding certificates to logs manually and I've found the gen-add-chain tool very helpful for that.

Since I would like to automate the JSON generation process, is there an API where I can send the .pem certificate and it will return a JSON?

Buschart, Rufus

unread,
May 8, 2023, 6:35:35 AM5/8/23
to Meadow bladerunner, crt.sh

Hi Jurcak!

 

If you are on a .net-enabled platform have a look at my GIST: Uploads a single certificate from the Windows certificate store to a certificate transparency (ct) log (github.com)

 

/Rufus

 

With best regards,
Rufus Buschart

IT IPS SIP
Freyeslebenstr. 1
91058 Erlangen, Germany
Mobile: +49 (1522) 2894134
mailto:rufus.b...@siemens.com

Important notice: This e-mail and any attachment thereof contain corporate proprietary information. If you have received it by mistake, please notify us immediately by reply e-mail and delete this e-mail and its attachments from your system. Thank you.
Siemens Corporation: Chairman of the Supervisory Board: Jim Hagemann Snabe; Managing Board: Roland Busch, Chairman, President and Chief Executive Officer; Klaus Helmrich, Cedrik Neike, Matthias Rebellius, Ralf P. Thomas, Judith Wiese;
Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin-Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322

 

 

--
You received this message because you are subscribed to the Google Groups "crt.sh" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crtsh+un...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/crtsh/2ad9e952-a0fa-4d4d-9fb8-efe4c40424fcn%40googlegroups.com.

r...@sectigo.com

unread,
May 16, 2023, 6:45:40 AM5/16/23
to crt.sh
> is there an API where I can send the .pem certificate and it will return a JSON?

You can send a POST request to https://crt.sh/gen-add-chain with a parameter named "b64cert" that contains the PEM certificate.

Alternatively, you can connect to crt.sh:5432 and call the backend function on the database:
e.g., select generate_add_chain_body(certificate, true) from certificate where id=3;

Meadow bladerunner

unread,
May 17, 2023, 3:22:48 AM5/17/23
to crt.sh
Thank for the answers! The Rob's one is just what I was looking for.
Reply all
Reply to author
Forward
0 new messages