45
Linux
7y

So many developer that does not know how to generate a simple .csr file. Here you go:

$DOMAIN=www.yourdomain.com
$STATE=State
$CITY=The city
$COMPANY=Company Name Gmbh
openssl req -utf8 -nameopt multiline,utf8 -new -newkey rsa:2048 -nodes -sha256 -out $DOMAIN.csr -keyout $DOMAIN.key -subj "/C=Your CountryCode/ST=$STATE/L=$CITY/O=${ORG:-$COMPANY}/OU=${ORG:-IT}/CN=$DOMAIN"

Comments
  • 3
  • 15
    @dfox

    We really node a <code> tag so we can format it nicely
  • 3
    Multidomain .csr:

    openssl req -new -newkey rsa:2048 -nodes -sha256 -subj "/C=TwoLetterCountryCode/ST=State Name/L=City Name/O=Company Name Gmbh/OU=IT/CN=www.yourdomain.com" -config <(

    cat <<-EOF

    [req]

    default_bits = 2048

    default_md = sha256

    req_extensions = req_ext

    distinguished_name = dn

    [ dn ]

    [ req_ext ]

    subjectAltName = @alt_names

    [alt_names]

    DNS.1 = 123.yourdomain.com

    DNS.2 = haha.yourdomain.com

    DNS.3 = www.someothercrappydomain.com

    EOF

    )
  • 4
    @Linux @dfox Maybe just monospaced, without any syntax highlighting?
  • 5
    @systemctl @Linux @dfox seriously need this. This is devRant after all not unformattedTextRant :P
  • 4
    Add code formatting and devrant will fill with kids asking for help on their homework 😒
    dfox did a smart thing.
  • 7
    @nbamaral
    Or useful tips from sysadmins to clueless devs.
  • 4
    @nbamaral nah if they wanna ask they ask because a lot of them don't even know how to ask
  • 0
    @inaba because they dont even know what they dont know
  • 2
    @andros705
    How the fuck should we rant about code when we not can write it down readable?
  • 0
    @dfox has a reason not to implement this: They don't want to be a goto-place to ask questions about your code, they want to be the place to get some relief from your frustration and tell stories.

    "Share and bond over successes and frustrations with code, tech and life as a programmer"

    Yeah, I'd love code formatting too, but it was rejected earlier, so we will probably not see it very soon.
Add Comment