📄 sslbuild
字号:
SSL BUILD AND INSTALLATION NOTES FOR UNIX Last Updated: 16 October 2000PREREQUISITES BEFORE STARTING: 1) Make sure that you understand how to do a non-SSL build of the IMAP toolkit. If necessary, review the information in imap-2000/docs/BUILD. 2) Obtain a copy of OpenSSL. OpenSSL is available from third parties. We do not provide OpenSSL. 3) Make sure that you know how to build OpenSSL properly on the standard /usr/local/ssl directory. In particular, /usr/local/ssl/include (and /usr/local/ssl/include/openssl) and /usr/local/ssl/lib must be set up from the OpenSSL build. If you have a non-standard installation, then you must modify the imap-2000/src/osdep/unixMakefile.ssl file to point to the appropriate locations. 4) Make sure that you know how to obtain appropriate certificates on your system.NOTE: We can NOT provide you with support in building/installing OpenSSL, orin obtaining certificates. If you need help in doing this, try the contactsmentioned in the OpenSSL README.SSL BUILD: To build with SSL, add "SPECIALAUTHENTICATORS=ssl" to the make commandline. For example, on Red Hat Linux, the appropriate command would be: make lnp SPECIALAUTHENTICATORS=ssl There are other make options, described in imap-2000/src/osdep/unix/Makefile.ssl.The most important of these are SSLCRYPTO and SSLRSA. SSLCRYPTO gives a fixed patch to libcrypto instead of using -lcrypto toavoid a library name conflict with some versions of MIT Kerberos. If you havea newer version of Kerberos or don't use Kerberos, you may want to change itto -lcrypto, especially if you use shared libraries. SSLRSA specifies the RSAREF libraries, which you must use with OpenSSL touse RSA algorithms with OpenSSL legally if you are in the USA, due to patentissues. If you are outside of the USA, and have built OpenSSL without RSAREF,you should set this to be empty.SSL INSTALLATION: Binaries from the build are: imap-2000/mtest/mtest c-client testbed program imap-2000/ipopd/ipop2d POP2 daemon imap-2000/ipopd/ipop3d POP3 daemon imap-2000/imapd/imapd IMAP4rev1 daemon mtest is normally not used except by c-client developers.STEP 1: inetd setup The ipop2d, ipop3d, and imapd daemons should be installed in a systemdaemon directory (in the following examples, /usr/local/etc is used), andinvoked by your /etc/inetd.conf file with lines such as:pop stream tcp nowait root /usr/local/etc/ipop2d ipop2dpop3 stream tcp nowait root /usr/local/etc/ipop3d ipop3dimap stream tcp nowait root /usr/local/etc/imapd imapdpop3s stream tcp nowait root /usr/local/etc/ipop3d ipop3dimaps stream tcp nowait root /usr/local/etc/imapd imapd Please refer to imap-2000/docs/BUILD for an important note about inetd'slimit on the number of new connections. If that note applies to you, and youcan configure the number of connection in /etc/inetd.conf as described inimap-2000/docs/build, here is the sample /etc/inetd.conf entry with SSL:pop3 stream tcp nowait.100 root /usr/local/etc/ipop3d ipop3dpop3s stream tcp nowait.100 root /usr/local/etc/ipop3d ipop3dimap stream tcp nowait.100 root /usr/local/etc/imapd imapdimaps stream tcp nowait.100 root /usr/local/etc/imapd imapd (or, if you use TCP wrappers)pop3 stream tcp nowait.100 root /usr/local/etc/tcpd ipop3dimap stream tcp nowait.100 root /usr/local/etc/tcpd imapdpop3s stream tcp nowait.100 root /usr/local/etc/ipop3d ipop3dimaps stream tcp nowait.100 root /usr/local/etc/imapd imapdNOTE: do *NOT* use TCP wrappers (tcpd) for the imaps and pop3s services! Idon't know why, but it doesn't work with TCP wrappers.STEP 2: services setup You may also have to edit your /etc/services (or Yellow Pages,NetInfo, etc. equivalent) to register these services, such as:pop 109/tcppop3 110/tcpimap 143/tcpimaps 993/tcppop3s 995/tcpNOTE: The SSL IMAP service *MUST* be called "imaps", and the SSL POP3 service*MUST* be called "pop3s".STEP 3: certificates setupNOTE: We can NOT provide you with support in obtaining certificates. If youneed help in doing this, try the contacts mentioned in the OpenSSL README. You must set up certificates on /usr/local/ssl/certs. You should installboth the certificate authority certificates from the SSL sources, plus yourown certificates. These should have been purchased from a certificateauthority, although self-signed certificates are permissible. A samplecertificate file is at the end of this document. Install the IMAP certificate on /usr/local/ssl/certs/imapd.pem and thePOP3 certificate on /usr/local/ssl/certs/ipop3d.pem. These files should beprotected against random people accessing them. It is permissible forimapd.pem and ipop3d.pem to be links to the same file. If you have a multihomed system with multiple domain names (and henceseparate certifications for each domain name), you can append the IP addressto the service name. For example, the IMAP certificate for [12.34.56.78]would be /usr/local/ssl/certs/imapd-12.34.56.78.pem and so on. You only needto use this feature if you need to use multiple certificates.SAMPLE CERTIFICATE FILE Here is a sample certificate file. Do *NOT* use this on your ownmachine; it is simply an example of what one would look like.-----BEGIN RSA PRIVATE KEY-----MIICXQIBAAKBgQDHkqs4YDbakYxRkYXIpY7xLXDQwULR5LW7xWVzuWmmZJOtzwlP7mN87g+aaiQzwXUVndaCw3Zm6cOG4mytf20jPZq0tvWnjEB3763sorpfpOe/4VsnVBFjyQY6YdqYXNmjmzff5gTAecEXOcJ8CrPsaK+nkhw7bHUHX2X+97oMNQIDAQABAoGBAMd3YkZAc9LUsig8iDhYsJuAzUb4Qi7Cppj73EBjyqKR18BaM3Z+T1VoIpQ1DeXkr39heCrN7aNCdTh1SiXGPG6+fkGj9HVw7LmjwXclp4UZwWp3fVbSAWfe3VReLM/6p65qogEYuBRMhbSmsn9rBgz3tYVU0lDMZvWxQmUWWg7BAkEA6EbMJeCVdAYunQsjwf4vhsHJTChKv/He6kT93Yr/rvq5ihIAPQK/hwcmWf05P9F6bdrA6JTOm3xuTvJsT/rIvQJBANv0yczI5pUQszw4s+LTzH+kZSb6asWp316BAMDedX+7ID4HaeKke4JnBK//xHKVP7xmHuioKYtRlsnuHpWVtNkCQQDPru2+OE6pTRXEqT8xp3sLPJ4mECi18yfjxAhRXIU9CUV4ZJv98UUbEJOEBtx3aW/UZbHyw4rwj5N511xtLsjpAkA9p1XRYxbO/clfvf0ePYP621fHHzZChaUo1jwh07lXvloBSQ6zCqvcF4hG1Qh5ncApzO4pBMnwVURRAb/s6fOxAkADv2Tilu1asafmqVzpnRsdfBZx2Xt4oPtquR9IN0Q1ewRxOC13KZwoAWtkS7l0mY19WD27onF6iAaF7beuK/Va-----END RSA PRIVATE KEY----------BEGIN CERTIFICATE-----MIIECTCCA3KgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBujELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0b24xEDAOBgNVBAcTB1NlYXR0bGUxHzAdBgN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cNAQEEBQADgYEAwEEkJXpVXVaFTuG2VJGIzPOxQ+X3V1Cl86y4gM1bDbqlilOUdByUEG4YfSb8ILIn+eXkWzMAw63Ww5t0/jkO5JRs6i1SUt0Oy80DryNRJYLBVBi499WEduro8GCVD8HuSkDCyL1Rdq8qlNhWPsggcbhuhvpbEz4pAfzPkrWMBn4=-----END CERTIFICATE-----
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -