How to properly generate a .csr file

During my short IT-career, I have dealt with alot people who struggle with generating a .csr file (certificate signing request) on Linux. Windows (especially IIS) have a more clearer approach so that can most of the people figure out by themselves without having to ask to many stupid questions :)

The following example generates a .csr and a .key file for the Company "Company Name", located in some country in the city "City". Just replace the variables to your liking.


DOMAIN=www.example.com
COUNTRY=2 letter country code
ORG="Company Name"
CITY="City"

openssl req -utf8 -nameopt multiline,utf8 -new -newkey rsa:2048 -nodes -sha256 -out $DOMAIN.csr -keyout $DOMAIN.key -subj "/C=${COUNTRY}/ST=${STATE}/L=${CITY}/O=${ORG}/OU=IT/CN=$DOMAIN"
Sometimes, you do want to generare a .csr file that includes two or more domains - a SAN certificate.
Using the same variable as above, we can now add more CN's to the .csr:


openssl req -utf8 -nameopt multiline,utf8 -new -newkey rsa:2048 -nodes -sha256 -out $DOMAIN.csr -keyout $DOMAIN.key -subj "/C=${COUNTRY}/ST=${STATE}/L=${CITY}/O=${ORG}/OU=IT/CN=$DOMAIN" -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 = www.example.se
DNS.2 = example.se
DNS.3 = www.example.it
DNS.3 = example.it
DNS.3 = www.example.fi
DNS.3 = example.fi
DNS.3 = www.example.org
DNS.3 = example.org
EOF
)
I hope that shit can prevent some headache from one or two :)

Kommentarer

  1. The official casino website from the top of the best portals has a convenient and functional user interface and works equally well on various operating systems. You will always find an updated list of new slots games here. In a special section, clearly stated rules must be posted. And before starting to play in an online casino, a gambler is advised to carefully study the conditions of the establishment and confirm this fact during registration.

    SvaraRadera
  2. Borgata Hotel Casino & Spa - MapyRO
    Welcome to MGM Resorts Hotel Casino & 동해 출장샵 Spa, home to the ultimate in 남양주 출장안마 entertainment! Book your 대전광역 출장샵 stay at Borgata 영천 출장마사지 Hotel Casino & 충청남도 출장안마 Spa.

    SvaraRadera
  3. If you use a 코인카지노 bank card to join the location, you are be} eligible for a nine-tier welcome package deal going as much as} $5,000. And then there's the Hot Drop Jackpots part, where have the ability to|you probably can} be part of the hunt on hourly and daily jackpots or take all of it with the Super Jackpots reaching $250,000. You can use all major cryptos like BTC, BCH, ETH, and LTC, but additionally lower-cap coins. Crypto transactions have zero charges connected and require 48 hours for dealing with.

    SvaraRadera
  4. These evaluations contain actual information about on-line on line casino video games and might prevent from scams. If a on line casino is hiding its buyer evaluations, ignore it and go for a different one. Since playing is about spending cash and nobody would 온라인 카지노 wish to lose.

    SvaraRadera

Skicka en kommentar

Populära inlägg i den här bloggen

Deploy OpenDMARC to your postfix server