トップ «前の日記(2018-08-19) 最新 次の日記(2018-08-21)» 編集

ヨタの日々

2001|08|09|10|11|12|
2002|01|02|03|04|05|06|07|08|09|10|11|12|
2003|01|02|03|04|05|06|07|08|09|10|11|12|
2004|01|02|03|04|05|06|07|08|09|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|06|07|08|09|10|11|12|
2009|01|02|03|04|05|06|07|08|09|10|11|12|
2010|01|02|03|04|05|06|07|08|09|10|11|12|
2011|01|02|03|04|05|06|07|08|09|10|11|12|
2012|01|02|03|04|05|06|07|08|09|10|11|12|
2013|01|02|03|04|05|06|07|08|09|10|11|12|
2014|01|02|03|04|05|06|07|08|09|10|11|12|
2015|01|02|03|04|05|06|07|08|09|10|11|12|
2016|01|02|03|04|05|06|07|08|09|10|11|12|
2017|01|02|03|04|05|06|07|08|09|10|11|12|
2018|01|02|03|04|05|06|07|08|09|10|11|12|
2019|01|02|03|04|05|06|07|08|09|10|11|12|
2020|01|02|03|04|05|06|07|08|09|10|11|12|
2021|01|02|03|04|05|06|07|08|09|10|11|12|
2022|01|02|03|04|05|06|07|08|09|10|11|12|
2023|01|02|03|04|05|06|07|08|12|
2024|01|02|03|04|

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 で現在進行系とのこと。