瀏覽模式: 普通 | 列表

Postfix + TLS

編譯

   make tidy

   make makefiles CCARGS="-DUSE_TLS -I//usr/include/openssl/" AUXLIBS="-L/usr/lib -lssl -lcrypto"

 

已有 postfix的話只作更新即可

   make upgrade

 

find /usr/ -name ssl.*

/usr/include/openssl/ssl.h

[閱讀全文]

標籤: postfix tls ssl

把 ssh public key 遠端利用 cat 複製過去

cat /root/.ssh/id_rsa.pub | ssh 192.168.1.1 "cat >> /root/.ssh/authorized_keys"

public key 作法 ref: http://ssorc.tw/rewrite.php/read-260.html
標籤: ssl ssh

openssl 指令

產生 private key 私密金鑰 及 憑證 cert (365 天, 1024 bits)

openssl req -new -x509 -keyout server.key -out server.crt -days 3650 -newkey rsa:1024

   -nodes : 可以不加密碼

   -subj '/C=TW/ST=Taiwan/L=Taipei/CN=ssorc.tw/emailAddress=cross@ssorc.tw' : 個人資訊,加的話不會出用提示的方式


產生私密金鑰(private key) & 憑證要求(certificate signing request = csr)

   openssl req -new -keyout server.key -out server.csr -days 365 -newkey rsa:1024

   如果要引用已有 private key 了來產生憑證要求

openssl req -new -key server.key -out server.csr

簽署 csr 產生 crt

[閱讀全文]

標籤: ssl openssl

Apache 模組 mod_ssl -- 讓網站的連線過程加密

CentOS4.4 Final

安裝 httpd 與 mod_ssl 套件

設定 SSL 的地方
   /etc/httpd/conf.d/ssl.conf

放 key 的地方,套件就已附 key 了
   /etc/httpd/conf/ssl.*           

非 SSL
   echo "no SSL" > /var/www/html/index.html
   vi /etc/httpd/conf/httpd.conf
<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName nossl.ssorc.tw
    ErrorLog logs/nossl.ssorc.tw-error_log
    CustomLog logs/nossl.ssorc.tw-access_log common
</VirtualHost>

建立要作 SSL 的目錄
   mkdir /var/www/html/ssl
   echo "SSL" > /var/www/html/ssl/index.html

[閱讀全文]

標籤: apache ssl 加密