Score:0

How to set length of certificate serial number explicitly?

ro flag

I am newbie to openssl and I am trying to create a end-device certificate (from command-line options). I want to set the length of the serial number (16 bytes) of the certificate. I read that -set_serial option can only be used for self-signed certificates. In my openssl.cnf file I have set serial = $dir/serial and also created a serial file. For now I have specified 16 bytes (random number,hexadecimal) in this file and certificate created uses this. But, I wanted to know whether it is possible to use command-line parameter for the same? Are there any cli option like set_serial? Also, how will the serial number set for new certificates next time? Should I replace the hexadecimal in serial file?

Thanks in advance.

P.S: Please let me know if any info is missing or not clear

Maarten Bodewes avatar
in flag
Direct tool usage is not on topic here; do you mind if I migrate to [su]? I assume you've already looked at [su]?
Preeti  avatar
ro flag
Yes, I think it's fine. Thanks for the info
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.