http://appllio.com/20140223-4899-apple-ios-bug-ssl-goto-fail

>  if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
>    goto fail;
>  if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
>    goto fail;
>    goto fail;
>  if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
>    goto fail;

馬鹿いわく、gotoなんか使うな!

↓ 本当かね? じゃあ例外に置き換えてみよう。

 if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
   throw new Exception();
   throw new Exception();

ありゃりゃ、例外使っても同じことでした。

正しくは、「一行であっても { } で括ること」いうコーディング規約は正しいということ。

 if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) {
    goto fail;
 }
    goto fail;

ほら、間違いにすぐ気づく