Skip to content

Instantly share code, notes, and snippets.

@daikeren
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save daikeren/9182353 to your computer and use it in GitHub Desktop.

Select an option

Save daikeren/9182353 to your computer and use it in GitHub Desktop.
SSL bug in Apple source code
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, uint8_t *signature, UInt16 signatureLen)
{
OSStatus err;
...
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;
...
fail:
SSLFreeBuffer(&signedHashes);
SSLFreeBuffer(&hashCtx);
return err;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment