POPFile 1.1.3 for Mac OS X 10.11 (El Capitan)
追è¨
POPFile ã®ãµã¼ãã復æ§ãã¾ããã®ã§ããã¦ã³ãã¼ããã¼ã¸ããå ¥æããé¡ããã¾ãã
ãã¨ã®æ¸ããã¿
ã¨ããããä½æããã®ã§ãªã³ã¯(POPFile ã®ãµã¼ãã復æ§ãã¦ã¾ãã®ã§ãã¡ãã«ããã¾ãã)ãã¦ããã¾ãããããã°ãã POPFile ã®ãµã¼ã (getpopfile.org) ããã¦ã³ãã¦ããã®ã§ãã¨ãããã Dropbox ã«ã¦å
±æã
å
容㯠Yosemite çã¨å¤ããããã¤ã³ã¹ãã¼ã«æã®ãã¼ã¸ã§ã³ãã§ãã¯ãå¤æ´ã㦠El Capitan ã§ãã¤ã³ã¹ãã¼ã«ã§ããããã«ããã ããYosemite ããã®ã¢ããã°ã¬ã¼ãã®å ´åã¯ç¹ã«ãªã«ãããªãã¦ããã®ã¾ã¾åãã¾ãã
è¿½è¨ 4
NSS ããã¸ã§ã¯ãã®ãã¼ã¸ ããå¤æ´ããã©ãã¨ã
https://hg.mozilla.org/projects/nss/rev/d936c1e1c51e
ã§å¤æ´ããã¦ããããã®å¤æ´ã¯ NSS_3_16_3_PLUS_BRANCH ã®ãã©ã³ãã«ããããã®ããã®å¤æ´ã mozilla-release ã«ãåæ ããã¦ããããã ã
å¤æ´å
容ã®è©³ç´°ã¯ NSIS 3.16.3 ã®ãªãªã¼ã¹ãã¼ã ã詳ããã1024 ãããã®ã«ã¼ã証ææ¸ã«ã¤ãã¦ãWeb ãµã¤ãã®èªè¨¼ç®çããå¤ããã¨ãããã¨ã®ããã ã
ãnssããæå®ããã¨ãã«ãã¦ã³ãã¼ãããããã®ã¯ã
https://hg.mozilla.org/projects/nss/file/a163e09dc4d5/lib/ckfw/builtins/certdata.txt
ã®ãã¡ã¤ã«ã§ããã¡ã㯠NSS_3_16_2_BRANCH ã®ãã®ãæçµã®ã³ããããæ¯è¼ããã¨ãNSS_3_16_2_BRANCH ã® certdata.txt 㯠2014-04-01 14:07 +0200ãmozilla-release ã®ãã®ã¯ 2014-08-06 20:22 +0200 ãªã®ã§ãrelease ã®æ¹ãæ°ããã
æ°ãããã®ãæ¡ç¨ããã¨ããèãæ¹ã«ç«ã¦ã°ããã¯ã release ã使ãã¹ãã¨ãããã¨ã«ãªãã®ããããããä¸è¨ã® NSS ããã¸ã§ã¯ãã®ãã¼ã¸ãè¦ãã¨ã3.16.2 ã®ãã©ã³ããæ´æ°ããããã¡ã³ããã³ã¹ããã¦ãããããªã®ã§ã¨ããããã¯ããã§ããããããªã
ãtipãã£ã¦ä½ãªã®ãæ°ã«ãªã£ã¦èª¿ã¹ã¦ã¿ãããMercurial ã® FAQ ã«ããããã£ããæå¾ã«æ´æ°ããã changeset ãæãã£ã¦ãã¨ããç¾å¨ã¯ã3.16.2 ã®ãã©ã³ãã®æ¹ãæå¾ã«æ´æ°ããã¦ããã®ã§ãã£ã¡ãè¦ã¦ãã£ã¦ãã¨ããããããã¨ã3.16.3 ã®ãã©ã³ãã®æ¹ã«æ´æ°ãå
¥ãã¨åãåé¡ãèµ·ããã£ã¦ãã¨ãããã¼ããã¯ãä¸æçãªå¯¾å¿ã«ãããªããªãã...ã
è¿½è¨ 2
ãµã¨ãmk-ca-bundle.pl ããã¦ã³ãã¼ããã¦ãã certdata.txt ã«ã¯ããã¤ã種é¡ããã£ããªã¨æãã ãã-d nss ãæå®ããéã«åç
§ããããã¡ã¤ã« ãè¦ã¦ã¿ãã¨ãããä¸è¨ã®ç¡å°ã®ããSERVER_AUTH TRASTED_DELEGATOR ã«ãªã£ã¦ããã¨ãçºè¦ã
nss 㨠release ã®éããããããªãããæ¯è¼ããã¨åæ°ç®æéãããã£ããnss 㨠release ã®ã©ã¡ãã使ãã¹ããªã®ãä¸æã ããã¨ãããã nss ã®æ¹ã使ãã°ã¨ã©ã¼ã¯åé¿ã§ããã
ãã£ããã¯ããããã
追è¨
OpenSSL ã§ã試ããã
$ openssl s_client -CAfile ca-bundle.crt -connect imap.mail.me.com:993 -showcerts CONNECTED(00000003) depth=2 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 verify error:num=20:unable to get local issuer certificate verify return:0
$ openssl s_client -CAfile email.crt -connect imap.mail.me.com:993 -showcerts CONNECTED(00000003) depth=3 /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority verify return:1 depth=2 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5 verify return:1 depth=1 /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3 verify return:1 depth=0 /C=US/ST=California/L=Cupertino/O=Apple Inc./CN=*.mail.me.com verify return:1
ã¨ãªããOpenSSL ã§ãåãç¶æ
ãªã®ãããã£ããããã§è¡¨ç¤ºããã¦ãã G5 ã¯ãG5(-2021) ã®ã»ãã¿ãããca-bundle.crt ã«ã¯ G3ãG5(2036) ããå
¥ã£ã¦ãªãã®ã§æ¤è¨¼ãã§ãããemail.crt ã«ã¯ G3ãG5(2036)ãç¡å°ãå
¥ã£ã¦ãããG5(2021) ã¯ãªãããç¡å°ã®ãããã®ã§æ¤è¨¼ã§ããã£ããã¨ãªã®ããªã
ããããã¨ãOpenSSL èªä½ã®åé¡ã£ã¦ãã¨? ãããã¯ãµã¼ãå´ã®åé¡?
ç¶ IO::Socket::SSL ã§è¨¼ææ¸ã®æ¤è¨¼ããã
ãã®éã®æ¥è¨ã®ç¶ãã
ã³ã¡ã³ãã«è²´éãªæ
å ±ãããã ããã®ã§ãå°ã調ã¹ã¦ã¿ããã¾ã ãã¾ããã£ã¦ããªãã®ã§çµéå ±åã¨ãã£ãã¨ããã ããã²ã¨ã¤å¤ãªãã¨ã«æ°ãã¤ããã®ã§ãè¨ãã¦ããã
æ¤è¨¼ã®ããã«æ¸ããã³ã¼ã㯠Gist ã«ç½®ãããã¾ããimap.mail.me.com ã®è¨¼ææ¸ãæ¤è¨¼ããããã«å¿
è¦ãªããVerisign Class 3 Public Primary Certification Authority - G3ãã¨ãVeriSign Class 3 Public Primary Certification Authority - G5ãã®è¨¼ææ¸ã ããå
¥ãããã¡ã¤ã«ã使ããæ¤è¨¼ãããã¦ã¿ãã$Net::SSLeay::trace = 3 ã«ãã¦ããæ¤è¨¼éç¨ãèªã¿ã¨ããªãã£ãã®ã§ãã³ã¼ã«ããã¯ã使ã£ã¦çµéã確èªãã¦ã¿ãã
ããã¨ãæåã«å¼ã°ããéã® Issuer (æ£ç¢ºã«ã¯ Issuer 㨠Subject ãã¤ãªãã ãã®ã®ããã§ãäºã¤ãã®ã/C=USã以é㯠Subject ã¨æããã)ã
/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority/C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=(c) 2006 VeriSign, Inc. - For authorized use only/CN=VeriSign Class 3 Public Primary Certification Authority - G5
ã¨ãªã£ã¦ãããIssuer ã® OU ã¯ããVeriSign Class 3 Public Primary Certification Authority - G5ãã«ãªãã¹ãã¨ããã§ã¯ãªãã®ãããªãããClass 3 Public Primary Certification Authorityãã«ãªã£ã¦ãããããã¯ãããã(ãã¶ã)ã
ã¨ã©ã¼çªå·ã®ã20ãã¯ãopenssl/x509_vfy.h ãè¦ãã¨ããX509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLYãã®ãã¨ããããIssuer ã®è¨¼ææ¸ãè¦ã¤ãããªãã£ããã£ã¦ãã¨ããªã
ã§ã¯ãca-bundle_tiny.crt ã«å
¥ã£ã¦ãã証ææ¸ãããããã®ãã¨æããG5 ã®é¨åã ããæãã ãããã¡ã¤ã«ãä½æãã
openssl x509 -in 05_verisign_class3_g5.crt -text
ã§å 容ã表示ããã¦ã¿ãã¨ã
Issuer: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5
Subject: C=US, O=VeriSign, Inc., OU=VeriSign Trust Network, OU=(c) 2006 VeriSign, Inc. - For authorized use only, CN=VeriSign Class 3 Public Primary Certification Authority - G5
ã¨ããã¡ãã¯æ£å¸¸ã£ã½ã? å ã«ãªã£ã certdata.txt ã§ãåããªã®ã§ããã¶ãããã¯åé¡ãªããã?
ã¨ãããã¨ã§ããªãã ã Net::SSLeay (ãããã¯ãªã³ã¯ããã¦ã OpenSSL) ã®ãã°ã£ã½ãæããããã®ã ãã©ããããããClass 3 Public Primary Certification Authorityããã©ããããããã®? ã£ã¦ã®ãè¬ãimap.gmail.com ã§ã¯ããGoogle Internet Authority G2ãâãGeoTrust Global CAãâãEquifax Secure Certificate Authorityãã®é ã§ãããã«ã¤ãªãã£ã¦ãæããªã®ã«ã
Mac OS X ã ãã®åé¡ãã¨æã£ã¦ Windows ä¸ã® ActivePerl ã§è©¦ãã¦ã¿ãããåãçç¶ã ã£ããIO::Socket::SSL ã使ãããNet::SSLeay ã ãã§æ¤è¨¼ããã¦ã¿ã¦ãåãçµæãä½è¨ã«ããããªããªã£ã¦ãã¾ã£ã...ã
IO::Socket::SSL ã§è¨¼ææ¸ã®æ¤è¨¼ããã
ä¹
ã
ã«æ´æ°ã
Twitter ã§ã¼ã¡ã¼ã¡æ¸ãã¦ããã©ãã¾ã¨ãã¦ãããããªã¨ã
IO::Socket::SSL ã«ã¯ãæ¥ç¶å
ã®è¨¼ææ¸ãæ¤è¨¼ããæ©è½ãããããæ¤ç´¢ãã¦ããã¾ããã®ä½¿ãæ¹ãåºã¦ããªãããã¤ãã®ãã¼ã¸ã§ã³ã§ããSSL_verify_modeããè¨å®ããã«ä½¿ããã¨ããã¨è¦åãåºãããã«ãªã£ãããããã¨ãããã SSL_VERIFY_NONE ã«è¨å®ãããåãããã£ã¦ããæ
å ±ããã¡ãã¡è¦ã¤ããã®ã ãããSSL_VERIFY_PEERãã使ãã®ãæ¨å¥¨ããã¦ããã«ãããããããããããå ´åã«è¨¼ææ¸ãã©ããã£ã¦æ¤è¨¼ãããã£ã¦ããæ
å ±ããªãããã¾ãåºã¦ããªãã
証ææ¸ã®æ¤è¨¼ãããããã«ã¯ãSSL_ca_file ããã㯠SSL_ca_path 㧠CA ã®è¨¼ææ¸ã®ãã¡ã¤ã«ãå
¥ã£ã¦ããå ´æãæå®ããã°ãã(ããã¥ã¡ã³ã)ã¨ãããã¨ãªã®ã ããã©ãã«ã©ãããå½¢å¼ã§ä¿åããã¦ããã㯠OS ã«ãã£ã¦ç°ãªããã¾ããWeb ãã©ã¦ã¶ã¨ããããããæã£ã¦ããããããPerl ã§ä½¿ãã®ã ãããOS ã«ããéããæ°ã«ããªãã¦ãããããªæ¹æ³ãæ¡ãããã¨ããã
æ¢ãã¦ã¿ãã¨ãMozilla::CA ã¨ããã¢ã¸ã¥ã¼ã«ãè¦ã¤ãããã¢ã¸ã¥ã¼ã«ã«ã¯ Mozilla ã使ç¨ãã¦ãã CA ã®è¨¼ææ¸ã®ãã¡ã¤ã«ãå¤æãããã®ãå«ã¾ãã¦ããããããIO::Socket::SSL ã® SSL_ca_file ã«æå®ã§ãã(Mozilla::CA::SSL_ca_file() ã§)ããã«ãªã£ã¦ããããããªãã° OS éã®éããæ°ã«ãããã¨ãªãåãã§ã¯ãªããããã°ããããã¢ã¸ã¥ã¼ã«èªä½ã®ãã¼ã¸ã§ã³ã¯ã¡ãã£ã¨å¤ããã証ææ¸ã®ãã¡ã¤ã«ãæ´æ°ããããã®ã¹ã¯ãªãããå«ã¾ãã¦ãããã¢ã¸ã¥ã¼ã«ã®ãã¼ã¸ã§ã³ã¢ãããæ¢ã¾ã£ã¦ãæ´æ°ãã¦ãããã¨ãã§ãããã ã
ã¨ãä¸æ¦ã¯ãã¾ãæ¹æ³ãè¦ã¤ããã¨æã£ãã®ã ããMozilla::CA ã®ãã°æ
å ±ã«æ°ã«ãªãæ
å ±ãçºè¦ãMozilla::CA ã«å«ã¾ãã¦ããæ´æ°ç¨ã®ã¹ã¯ãªãããå¤ããåç
§ãã¦ãããã¡ã¤ã«ããã£ã¨æ´æ°ããã¦ããªãã¨ããã§ã¯ãªããã
ã©ããããã®æ´æ°ç¨ã¹ã¯ãªãã㯠curl ã«å«ã¾ãã¦ãããã®ã®ããã§ãcurl ã®ææ°ãã¼ã¸ã§ã³ããæã£ã¦ãããã®ã使ãã°æ°ãããã¡ã¤ã«ãå
¥æãããã¨ãã§ããããããã¨ãããã¨ã§è©¦ãã¦ã¿ãã¨ãã¡ããã¨æ´æ°ããããã¾ããã£ãããã«è¦ãããã¨ããããæåã«è©¦ãã imap.gmail.com ã«å¯¾ãã¦ã¯åé¡ãªãåããã
ããã§ä¸å®å¿ãã¨æã£ãããimap.mail.me.com ã§è©¦ãã¨ãã¨ã©ã¼ãåå ã¯ããããªãã£ãããIO::Socket::SSL ã®ãã¼ã¸ã§ã³ãè½ã¨ãã¨ã¨ã©ã¼ãèµ·ããªããªã£ãããã¢ã¸ã¥ã¼ã«ãæªãã®ãã¨èãããããã¤ãã®ãã¼ã¸ã§ã³ã試ãã¦ããã¨ã1.974 ã¾ã§ã¯å¤§ä¸å¤«ã§ã 1.975 ããã¨ã©ã¼ãèµ·ãããã¨ãããã£ãã
1.974 㨠1.975 ã®éããè¦ãã¨ãMac OS X ã ãã®ããã«ä¿®æ£ãããé¨åãè¦ã¤ãããããã«ç¤ºããããªã³ã¯ã辿ãã¨ãApple ã OpenSSL ã«ç¬èªã®ãããããã¦ã¦ãããæå®ããã証ææ¸ãã¡ã¤ã«ã§æ¤è¨¼ãã§ããªãã°ããã«ãOS ãæã£ã¦ãããã®ã使ã£ã¦æ¤è¨¼ããããã«ãªã£ã¦ãããã¨ãããã¨ããã(ãã¶ã)ãã§ã1.974 ã¾ã§ã¯ãã®æ©è½ãæå¹ã«ãªã£ã¦ãããã1.975 ã§ã¯ãããåããªãããã«ãªã£ããã¨ãããã¨ã®ããã ãè¦ã¯ããã¼ã¸ã§ã³ãå¤ãã£ããã¨ãåå ã§ã¯ãªããæ°ãããã¼ã¸ã§ã³ã® mk-ca-bundle.pl ã§ä½æãããã¡ã¤ã«ã§ã¯ã証ææ¸ã®æ¤è¨¼ãã§ãã¦ããªãã£ãã®ã ã
ãã®å¾ãOpenSSL ã¨ã¨ãã«ã¤ã³ã¹ãã¼ã«ãããã¨æãããã/usr/local/etc/openssl/cert.pemããæå®ããå ´åã«ã¯åé¡ãªããã¨ãããããããã«ãMozilla::CA ã«æåããå
¥ã£ã¦ãããã®ã§ãåé¡ãªããã¨ãããã£ããããããå
ããªããªãããããªãã£ãã®ã ããæ¬æ¥ãmk-ca-bundle.pl ãèªãã§ããã¨ãããã-pããªãã·ã§ã³ã§è¨¼ææ¸ã®å©ç¨ç®çã¨ã¬ãã«ã®æå®ãã§ãããã¨ãããã£ãã試ãã«ããã¹ã¦ãå«ã¾ãããã-p ALL:ALLããæå®ããã¨ãåé¡ãªãåãããããããã¨ãªãã·ã§ã³ã試ãã¦ããã¨ãã-p EMAIL_PROTECTION:TRUSTED_DELEGATORãã®æå®ã§ã¨ã©ã¼ãªãæ¤è¨¼ã§ãããã¨ãçºè¦ãããã©ã«ãã®ãSERVER_AUTH:TRUSTED_DELEGATORãã§ã¯ã ããªã®ãç´å¾ãããªãããã¾ããã¨ããããã
ã§ã¯ãã©ã®é¨åãåå ã ã£ãã®ãããopenssl s_client -showcerts -connect imap.mail.me.com:993ããå®è¡ãã¦ã¿ãã¨ãã*.mail.me.comãã® issuer ã¯ãVeriSign Class 3 Secure Server CA - G3ãã¨ãªã£ã¦ãããããããããVeriSign Class 3 Public Primary Certification Authority - G5ãããClass 3 Public Primary Certification Authorityãã¨ããé ã§æ¤è¨¼ããã¦ããããããããã§ãmk-ca-bundle.pl ã®ããã©ã«ãã§ä½ã£ããã¡ã¤ã«ãè¦ãã¨ããG3ãã¨ãG5ãã¯ããããç´ ã®ãã®ã¯ãªãããã®å
ã«ãªã£ã¦ãããcertdata.txtããè¦ãã¨ã
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST
ã¨ãªã£ã¦ãããEMAIL_PROTECTION ã«ã¤ãã¦ã¯ TRUSTED_DELEGATOR ã ããSERVER_AUTH ã§ã¯ MUST_VERIFY_TRUST ã ããã ããã§ãMUST_VERIFY_TRUST ã£ã¦ã®ã¯ã©ãããæå³ããã¨æ¤ç´¢ãã¦ã¿ãã®ã ããçµå±ããããããªãã£ããä¿¡é ¼ãã¦ããããã©ããæ¤è¨¼ãããã£ã¦ãã¨ãªã®ããã?
ãªãã ãéç¶ã¨ããªãããç¾ç¶ã§ã¯ä¸ã«æ¸ããããã« EMAIL_PROTECTION ã®æ¹ã使ãã°ãã¾ãããã®ã§ä»ã®æ¹æ³ãè¦ã¤ããã¾ã§ã¯ããã§ãããããªãã®ããªãã¨ããããPerl ã§æ¸ããã¦ãã¦ãã«ããã©ãããã©ã¼ã ã§åããã®ãªãã¿ããªåãæ¡ä»¶ã®ã¯ãã ãã©ãå
¨ç¶æ
å ±ãè¦ã¤ãããªãã®ã¯ãªããªãã ããã証ææ¸ã®æ¤è¨¼ãªãã¦å¥ã«ãããã£ã¦ãã¨ãªã®? ãIO::Socket::SSL VERIFY_PEERãã§ãããã¨ãããã㯠CPAN ã® IO::Socket::SSL ã®ãã¼ã¸ã§ã次ãç§ã POPFile ã®ãã©ã¼ã©ã ã«æ¸ããæ¸ãè¾¼ã¿ãªãã ããããã
ä»ã®ã¢ã¸ã¥ã¼ã«ã§ã¯ã©ããã¦ãããã ããã¨ãLWP ãè¦ã¦ã¿ãããLWP::Protocol::https ã«ãã®å¦çãå
¥ã£ã¦ããããããå
容ã¯ã¨ããã¨ãSSL_ca_file ã¾ã㯠SSL_ca_path ãªãã·ã§ã³ãæå®ãããå ´åã¯ããããæå®ããªãã°ãã㯠Mozilla::CA ã使ãã¨ãããã®ãMozilla::CA ã«å«ã¾ãã¦ãããã¡ã¤ã«ãå¤ãã ãªãã¦ãã¨ã¯ã¾ã£ããæ°ã«ããã¦ããªãããããã¼ãããã§ããã®ã?? ã¾ããããããããªäººã¯ SSL_ca_file ã¨ãã®ãªãã·ã§ã³ã使ãã°ã£ã¦ãã¨ãªã®ããã
ã¨ãããã¨ã§ãPerl 㧠IO::Socket::SSL ã使ã£ã¦ãã¦ããã«ããã©ãããã©ã¼ã ã§åã証ææ¸ã®æ¤è¨¼æ¹æ³ã®ãã¹ããã©ã¯ãã£ã¹ã誰ãæãã¦ãã ããããã