0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[CSR] CSR生成方法と例

Posted at

CSR設定項目

項目 内容 利用可能な文字/文字数制限 入力例
コモンネーム(CN) 実際に接続する URL の FQDN 半角英数字文字 半角のハイフン「 -」が使用できます。 最大64文字まで ※ワイルドカード証明書の場合、コモンネームの先頭に必ず「*.」を付けてください。 www.japan.ad.jp *.japan.ad.jp
組織単位名(OU) 部署名 半角英数字 半角記号8種『-/.,( )_+』半角スペースが 使用できます。 最大64文字まで Technical Division
組織名(O) 申請組織の名称(英名) 半角英数字 半角記号8種『-/.,( )_+』半角スペースが 使用できます。 最大64文字まで Japan Internet Inc.
市町村名(L) 申請組織の事業所住所の 「市町村名」(英名) ※東京は 23 区 半角英数字 半角記号8種『-/.,( )_+』半角スペースが 使用できます。 最大128文字まで Shibuya—ku
都道府県名(S/ST) 申請組織の事業所住所の 「都道府県名」(英名) 半角英字 半角記号7種『-/.,( )+』半角スペースが 使用できます。 最大64文字まで Tokyo
国名(C) 申請組織の国名 半角英字(大文字)が使用できます。 最大2文字まで ※通常はJPで入力ください。 JP

CSR生成例

# 秘密鍵を生成
openssl genrsa -des3 -out XXXXXX.key.pem 2048
ex) openssl genrsa -des3 -out site.key.pem 2048
	パスワード:*******
	
# 秘密鍵(パスフレーズを削除)を生成
openssl rsa -in XXXXXX.key.pem -out XXXXXX.key_np.pem
ex) openssl rsa -in site.key.pem -out site.key_np.pem

# CSRを生成
openssl req -new -key XXXXXX.key_np.pem -out XXXXXX.csr.pem
ex) openssl req -new -key site.key_np.pem -out site.csr.pem

# CSRを設定
Country Name (2 letter code) []:JP
State or Province Name (full name) []:Tokyo
Locality Name (eg, city) []:Shibuya—ku
Organization Name (eg, company) []:Japan Internet Inc.
Organizational Unit Name (eg, section) []:Technical Division
Common Name (eg, fully qualified host name) []:www.japan.ad.jp *.japan.ad.jp
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?