Hi Hans, this is a really minor comment:
+struct cryptcat +{ + DWORD magic; + HANDLE msg;
msg's type should be HCRYPTMSG instead.
+ for (i = 0; i < cc->attr_count; i++) + { + if (!CryptMsgGetParam(hmsg, CMSG_ATTR_CERT_PARAM, i, NULL, &size))
Out of curiosity, how did you test this? --Juan