②.配置本地CA证书服务器:
88 countryName = optional
89 stateOrProvinceName = optional
90 organizationName = optional
[root@ftp CA]# echo "01" >serial
[root@ftp CA]# openssl genrsa 1024 > private/cakey.pem
Generating RSA private key, 1024 bit long modulus
e is 65537 (0x10001)
[root@ftp CA]# openssl req -new -x509 -key private/cakey.pem -out cacert.pem -days 3650
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [GB]:cn
State or Province Name (full name) [Berkshire]:henan
Locality Name (eg, city) [Newbury]:zhengzhou
Organization Name (eg, company) [My Company Ltd]:junjie
Organizational Unit Name (eg, section) []:soft
Common Name (eg, your name or your server's hostname) []:ca.junjie.com
③.为ftp服务器创建证书:
Generating RSA private key, 1024 bit long modulus
e is 65537 (0x10001)
[root@ftp certs]# openssl req -new -key vsftpd.key -out vsftpd.csr
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
Country Name (2 letter code) [GB]:cn
State or Province Name (full name) [Berkshire]:henan
Locality Name (eg, city) [Newbury]:zhengzhou
Organization Name (eg, company) [My Company Ltd]:junjie
Organizational Unit Name (eg, section) []:ftp
Common Name (eg, your name or your server's hostname) []:ftp.junjie.com
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
Using configuration from /etc/pki/tls/openssl.cnf
Check that the request matches the signature
Certificate Details:
Not Before: Feb 10 15:48:55 2012 GMT
33:C5:01:33:A5:CF:42:9F:24:A9:0D:E9:41:8E:26:C3:1B:7B:18:11
keyid:50:D1:A8:0A:1F:B7:CD:49:94:69:E3:70:E9:AE:93:73:2C:94:66:AC
Certificate is to be certified until Feb 9 15:48:55 2013 GMT (365 days)
Sign the certificate? [y/n]:y
1 out of 1 certificate requests certified, commit? [y/n]y
Write out database with 1 new entries
④.使ftp服务应用证书:
118 rsa_cert_file=/etc/vsftpd/certs/vsftpd.crt
119 rsa_private_key_file=/etc/vsftpd/certs/vsftpd.key
[root@ftp vsftpd]# service vsftpd restart
