2018-08-20 :-|
_ 労
設計労をしました。
_ [SMTP][SMPTS][STARTTLS][OpenSSL]OpenSSL s_client での STARTTLS
openssl s_client -starttls smtp ほげほげ
と実行したときに通るコード。
マニュアル s_client
実装 openssl-1.0.2h/apps/s_client.c
/* This is an ugly hack that does a lot of assumptions */ /* * We do have to handle multi-line responses which may come in a single * packet or not. We therefore have to use BIO_gets() which does need a * buffering BIO. So during the initial chitchat we do push a buffering * BIO into the chain that is removed again later on to not disturb the * rest of the s_client operation. */ if (starttls_proto == PROTO_SMTP) { int foundit = 0; 略 /* wait for multi-line response to end EHLO SMTP response */ do { mbuf_len = BIO_gets(fbio, mbuf, BUFSIZZ); if (strstr(mbuf, "STARTTLS")) foundit = 1; } while (mbuf_len > 3 && mbuf[3] == '-');
コメントに「ダーティなハックだぜ」と書いてあるようにサーバーからのレスポンスとして「複数行の 250」だけを想定しています。たとえばこう( SMTP Service Extension for Secure SMTP over Transport Layer Security )
S: 250-mail.imc.org offers a warm hug of welcome S: 250-8BITMIME S: 250-STARTTLS S: 250 DSN
しかし以下のように 1 行だけ返ってきたときは無限ループになります。
250 STARTTLS
_ [NetBSD]週刊? teck-kern 2018-08-13
GSoC 18: Kernel Address Sanitizer, Final Report
カーネルアドレスサニタイザー完了報告。詳細は NetBSD blog 参照 GSoC 2018 Reports: Kernel Address Sanitizer, Part 3
Linux を参考にしたんでしょうか。kernel 弄るひとが数年前にパッチを読んでました Linux:面白そうなpatch(Address sanitizer for kernel)を見てみる - φ(・・*)ゞ ウーン カーネルとか弄ったりのメモ
Zombie kernel thread
Xen の NetBSD 8.0 がハングしたんだけど、そのときカーネルスレッドがゾンビになってた。こういうことあるの?またはオレが何か見間違えてる?という話題です。いまのところまだ反応はないです。
All processes go tstile
dump してたら全プロセスが tstile になった(tstileって?ハングアップしたということでしょうか)。I/O フラッシュ待ちになってるのでディスク周りが何かおかしいでしょうか。という話題です。
Too many PMC implementations
パフォーマンスモニター多すぎ問題。
DTrace が現実的かと。他には honggfuzz が GSoC で現在進行系とのこと。
[ツッコミを入れる]