二 实现POP3进行加密
1.我们把POP3的证书存放在/etc/dovecot/certs下
首先建立这个目录
[root@localhost CA]# mkdir -pv /etc/dovecot/certs
mkdir: 已创建目录 “/etc/dovecot”
mkdir: 已创建目录 “/etc/dovecot/certs”
2.创建私钥
[root@localhost CA]# cd /etc/dovecot/certs/
[root@localhost certs]# openssl genrsa 1024 > dovecot.key
Generating RSA private key, 1024 bit long modulus
.................................++++++
...++++++
e is 65537 (0x10001)
3.生成此POP3服务器的请求证书
[root@localhost certs]# openssl req -new -key dovecot.key -out dovecot.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]:sina
Organizational Unit Name (eg, section) []:pop3
Common Name (eg, your name or your server's hostname) []:pop3.sina.com
Email Address []:
Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:
An optional company name []:
[root@localhost certs]#
4.请求CA服务器颁发证书
[root@localhost certs]# openssl ca -in dovecot.csr -out dovecot.cert
Using configuration from /etc/pki/tls/openssl.cnf
Check that the request matches the signature
Signature ok
Certificate Details:
Serial Number: 1 (0x1)
Validity
Not Before: Nov 15 10:11:00 2012 GMT
Not After : Nov 15 10:11:00 2013 GMT
Subject:
countryName = CN
stateOrProvinceName = HENAN
organizationName = sina
organizationalUnitName = pop3
commonName = pop3.sina.com
