【p2】PHPでつくった2ch viewer【part9】

このエントリーをはてなブックマークに追加
79名無しさん@お腹いっぱい。
うちは自宅 Linux 鯖に p2 おいてるんだが、 >>74 とかと同じ症状だった。
ためしに、shell で

 curl -H "X-2ch-UA: p2/1.0.2" -A DOLIB/1.00 -d ID=foo -d PW=bar -o ~/tmp/tmp.out https://2chv.tora3.net/futen.cgi

ってやったら

curl: (60) SSL certificate problem, verify that the CA cert is OK

More details here: http://curl.haxx.se/docs/sslcerts.html

curl performs SSL certificate verification by default, using a "bundle"
of Certificate Authority (CA) public keys (CA certs). The default
bundle is named curl-ca-bundle.crt; you can specify an alternate file
using the --cacert option.
If this HTTPS server uses a certificate signed by a CA represented in
the bundle, the certificate verification probably failed due to a
problem with the certificate (it might be expired, or the name might
not match the domain name in the URL).
If you'd like to turn off curl's verification of the certificate, use
the -k (or --insecure) option.

とかでたんだな。んで、-k オプションつけて、また curl 走らせたらうまくいった。
どうやらこのへんがおかしいらしい、、ということで、login2ch.inc のなかで、
php の curl を使わせないで、コマンドラインの curl を使わせるようにして、
$curlcmd に -k もくっつけてやったらログインできた。
80:04/05/29 07:11 ID:Fl6sz94r
もしかして前の不具合で,
http://akid.s17.xrea.com:8080/p2puki/pukiwiki.php?%CE%D7%BB%FE%A1%FC%A5%ED%A5%B0%A5%A4%A5%F3%C2%D0%B1%FE
の対策してた人だけ出来てたってこと?