2013-05-30 100 views

回答

31

通過「-subj」參數傳遞的主題:

openssl req -new -key <private key file> -out <CSR output file> -subj "/C=<Country Name>/ST=<State>/L=<Locality Name>/O=<Organization Name>/CN=<Common Name>" 

請注意,如果你想擁有的OpenSSL打造的主題串,你可以創建CSR像平時那樣,然後執行命令自我簽名。完全格式化的主題行將在頂部回顯(「subject =」):

openssl x509 -req -days 365 -in server.csr -signkey server.pem 

Loading 'screen' into random state - done 
Signature ok 
subject=/C=US/ST=Florida/L=Miami/O=Test Group/CN=testgroup.server5 
Getting Private key 
... 
相關問題