{"id":6720,"date":"2011-02-21T14:55:06","date_gmt":"2011-02-21T05:55:06","guid":{"rendered":"http:\/\/tec.jpn.ph\/wordpress\/?p=6720"},"modified":"2011-02-22T11:51:36","modified_gmt":"2011-02-22T02:51:36","slug":"libdes-so%e3%81%a8libcrypto-so%e3%82%92%e3%81%8f%e3%81%a3%e3%81%a4%e3%81%91%e3%82%8b","status":"publish","type":"post","link":"http:\/\/tec-jpn.net\/wordpress\/?p=6720","title":{"rendered":"libdes.so\u3068libcrypto.so\u3092\u304f\u3063\u3064\u3051\u308b"},"content":{"rendered":"<p>\u3000openssl\u306e\u30e9\u30a4\u30d6\u30e9\u30ea(libcrypto)\u306b\u306flibdes\u4e92\u63db\u6a5f\u80fd\u304c\u3064\u3044\u3066\u3044\u305f\u304c\u3001openssl-0.9.7\u304b\u3089\u305d\u308c\u304cdes_old.h\u306b\u3088\u308b\u7f6e\u63db\u30de\u30af\u30ed\u306e\u307f\u306e\u5bfe\u5fdc\u3068\u306a\u308a\u3001libdes\u4e92\u63db\u306e\u305f\u3081\u306e\u30b7\u30f3\u30dc\u30eb\u306f\u5b58\u5728\u3057\u306a\u304f\u306a\u3063\u305f\u3002\u3053\u306e\u305f\u3081\u3001libcrypto\u3092\u5171\u6709\u30e9\u30a4\u30d6\u30e9\u30ea(libcrypto.so)\u306e\u5f62\u3067\u52d5\u7684\u30ea\u30f3\u30af\u3057\u3066libdes\u4e92\u63db\u6a5f\u80fd\u3092\u5229\u7528\u3057\u3066\u3044\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5834\u5408\u3001openssl-0.9.6\u304b\u3089openssl-0.9.7\u4ee5\u964d\u306b\u66f4\u65b0\u3059\u308b\u3068\u30d0\u30a4\u30ca\u30ea\u4e92\u63db\u6027\u304c\u5931\u308f\u308c\u3001des_cbc_encrypt\u306a\u3069\u3044\u304f\u3064\u304b\u306e\u30b7\u30f3\u30dc\u30eb\u304c\u898b\u3064\u304b\u3089\u306a\u3044\u3068\u3044\u3046\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3059\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u3002<br \/>\n\u3000\u5f53\u65b9\u306e\u5834\u5408\u3001openssl\u3092\u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\u3057\u305f\u3068\u3053\u308d\u3001OS(\u53e4\u3044RedHat)\u306b\u30d0\u30a4\u30ca\u30ea\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308bcyrus-sasl\u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u5165\u3063\u3066\u3044\u308blibdigestmd5.so\u304c\u53c2\u7167\u3057\u3066\u3044\u308bdes_cbc_encrypt\u306a\u3069\u304cundefined symbol\u3068\u306a\u3063\u3066\u3057\u307e\u3063\u305f\u3002\u3053\u308c\u3092\u4f7f\u3063\u3066\u3044\u308bpostfix\u306esmtpd\u304cdlopen\u3059\u308b\u3068\u304d\u306b\u3001\/var\/log\/messages\u306b\u300cunable to dlopen \/usr\/lib\/sasl2\/libdigestmd5.so.2: libcrypto.so.2: cannot open shared object file: No such file or directory\u300d\u3068\u3044\u3046\u30a8\u30e9\u30fc\u3092\u5410\u304f\u3002<br \/>\n\u3000LD_PRELOAD\u3067\u9003\u3052\u308b\u624b\u3082\u8a66\u3057\u305f\u304cdlopen\u306b\u306f\u52b9\u304b\u306a\u3044\u3088\u3046\u3067\u3042\u3063\u305f\u3002openssl\u306b\u306f\u6df1\u523b\u306a\u8106\u5f31\u6027\u304c\u898b\u3064\u304b\u3063\u3066\u3044\u308b\u306e\u3067\u30010.9.6\u306e\u307e\u307e\u4f7f\u3044\u7d9a\u3051\u308b\u3068\u3044\u3046\u308f\u3051\u306b\u3082\u3044\u304b\u306a\u3044\u3057\u3001\u305d\u3046\u304b\u3068\u3044\u3063\u3066\u3001\u518d\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3088\u3046\u3068\u3059\u308b\u3068\u4f9d\u5b58\u3057\u3066\u3044\u308b\u30d0\u30a4\u30ca\u30ea\u3084\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u828b\u3065\u308b\u5f0f\u306b\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u3044\u304b\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u304f\u306a\u308a\u305d\u3046\u3067\u624b\u304c\u3064\u3051\u3089\u308c\u306a\u3044\u3002<br \/>\n\u3000\u30e1\u30b8\u30e3\u30fc\u30d0\u30fc\u30b8\u30e7\u30f3\u30a2\u30c3\u30d7\u3067\u3082\u306a\u3044\u306e\u306b\u307e\u3063\u305f\u304f\u3068\u3093\u3067\u3082\u306a\u3044\u4ed5\u69d8\u5909\u66f4\u3092\u3057\u3066\u304f\u308c\u305f\u3082\u306e\u3060\u304c\u3001\u5909\u308f\u3063\u3066\u3057\u307e\u3063\u3066\u3044\u308b\u3082\u306e\u306f\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u306a\u3093\u3068\u304b\u5f37\u5f15\u306b\u5bfe\u51e6\u3057\u305f\u3002<\/p>\n<p><a href=\"http:\/\/www.openssl.org\/source\/openssl-0.9.8r.tar.gz\">openssl-0.9.8r<\/a>:<br \/>\n<code>% .\/config shared -DOPENSSL_DES_LIBDES_COMPATIBILITY<br \/>\n% make<br \/>\n% make test<br \/>\n# make install<br \/>\n# cd \/lib<br \/>\n# ln -s \/usr\/local\/ssl\/lib\/libcrypto.so.0.9.8<br \/>\n# ln -s \/usr\/local\/ssl\/lib\/libssl.so.0.9.8<\/code><\/p>\n<p><a href=\"ftp:\/\/ftp.jp.xemacs.org\/pub\/net\/Crypto\/libeay\/libdes-4.04b.tar.gz\">libdes-4.04b<\/a>:<br \/>\n<code>% patch &lt; <a href=\"http:\/\/www.ht.sfc.keio.ac.jp\/~gon\/imap4\/des.Makefile.diff\">des.Makefile.diff<\/a> # libdes.so.3\u3092\u4f5c\u308a\u305f\u3044\u3068\u304d\u306e\u307f\u3002<br \/>\n% make<\/code><\/p>\n<p>\u9069\u5f53\u306a\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067:<br \/>\n<code>% gcc -shared -Wl,-soname,libcrypto.so.2 -o libcrypto.so.2 -Wl,--whole-archive <em>libdes.a\u3078\u306e\u30d1\u30b9<\/em> <em>libcrypto.a\u3078\u306e\u30d1\u30b9<\/em> -Wl,--no-whole-archive -ldl -Wl,-noinhibit-exec<br \/>\n# cp libcrypto.so.2 \/usr\/lib\/sasl2<br \/>\n# cp <a href=\"\/smtpd.libdes\">smtpd.libdes<\/a> \/usr\/libexec\/postfix<br \/>\n# chown root.root \/usr\/libexec\/postfix\/smtpd.libdes<br \/>\n# chmod 755 \/usr\/libexec\/postfix\/smtpd.libdes<br \/>\n# vi \/etc\/postfix\/master.cf<br \/>\n<\/code><br \/>\nsmtp   inet    n       &#8211;       n       &#8211;       &#8211;       smtpd<br \/>\n\u3068\u3042\u308b\u884c(chroot\u306e\u5217\u306f\u6a19\u6e96\u3067\u306fy\u3060\u3051\u3069)\u3092<br \/>\nsmtp   inet    n       &#8211;       n       &#8211;       &#8211;       smtpd.libdes<br \/>\n\u306b\u5909\u66f4\u3002<br \/>\n<code><br \/>\n# \/sbin\/service postfix restart<\/code><\/p>\n<p>\u3000\u82e5\u5e72\u306e\u9593\u9055\u3044\u306f\u3042\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u5927\u4f53\u3053\u3093\u306a\u611f\u3058\u3002<br \/>\n\u3000\u8981\u3059\u308b\u306blibdes.a\u3068libcrypto.a\u3092\u304f\u3063\u3064\u3051\u3066\u4e00\u3064\u306e\u5171\u6709\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f5c\u3063\u3066\u3044\u308b\u306e\u3060\u3051\u3069\u3001\u30b7\u30f3\u30dc\u30eb\u304c\u91cd\u8907\u3057\u3066\u30a8\u30e9\u30fc\u306b\u306a\u308b\u306e\u3092-noinhibit-exec\u3067\u7121\u7406\u3084\u308a\u7121\u8996\u3055\u305b\u305f\u308a\u3057\u3066\u3001\u304b\u306a\u308a\u5f37\u5f15\u3002\u306a\u3093\u3068\u306a\u304f\u52d5\u3044\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u3060\u3051\u3067\u3001\u5b9f\u306f\u4e2d\u306e\u52d5\u4f5c\u306f\u3081\u3061\u3083\u304f\u3061\u3083\u304b\u3082\u3002<br \/>\n\u3000\u3053\u3093\u306a\u602a\u3057\u3044\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u6a19\u6e96\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306e\u30b5\u30fc\u30c1\u30d1\u30b9\u306b\u5165\u308c\u3066\u304a\u304f\u306e\u306f\u5371\u967a\u306a\u306e\u3067\u3001\u4e0a\u8a18\u306e\u901a\u308a\u3001smtpd\u3060\u3051\u306b\u9069\u7528\u3059\u308bsmtpd.libdes\u3068\u3044\u3046\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u305f\u3002<\/p>\n<p>\u6ce8: \u3053\u306e\u8a18\u4e8b\u306f\u500b\u4eba\u7684\u306a\u30e1\u30e2\u3067\u3059\u3002\u771f\u4f3c\u3059\u308b\u306e\u306f\u81ea\u7531\u3067\u3059\u304c\u7121\u4fdd\u8a3c\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000openssl\u306e\u30e9\u30a4\u30d6\u30e9\u30ea(libcrypto)\u306b\u306flibdes\u4e92\u63db\u6a5f\u80fd\u304c\u3064\u3044\u3066\u3044\u305f\u304c\u3001openssl-0.9.7\u304b\u3089\u305d\u308c\u304cdes_old.h\u306b\u3088\u308b\u7f6e\u63db\u30de\u30af\u30ed\u306e\u307f\u306e\u5bfe\u5fdc\u3068\u306a\u308a\u3001libdes\u4e92\u63db\u306e\u305f\u3081\u306e\u30b7\u30f3\u30dc\u30eb\u306f\u5b58\u5728\u3057\u306a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-6720","post","type-post","status-publish","format-standard","hentry","category-6"],"_links":{"self":[{"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6720"}],"version-history":[{"count":0,"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/6720\/revisions"}],"wp:attachment":[{"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6720"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/tec-jpn.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}