1

(1 replies, posted in wolfSSL)

Both  OCSP_REQUEST & OCSP_RESPONSE are defined in WinCrypt.h

They are also defined in cyassl-1.9.0/include/openssl/ssl.h

An existing comment in this file indicates that there have been previous
conflicts with wincrypt.h
cf https://github.com/cyassl/cyassl/blob/m … /ssl.h#L44

A basic fix is to add undefs for the above 2 defines. [only on Win32 platform]
#undef OCSP_REQUEST
#undef OCSP_RESPONSE
but I'm not sure that this is the most elegant fix.

This was the change made in openssl
http://cvs.openssl.org/filediff?f=opens … v2=1.9.2.4

I've added some functionality to wolfSSL that allows the developer
to hook in their own memory management code at runtime.

By default the behavior will remain as before, however if custom
functions are registered with wolfSSL embedded ssl library,
allocations will be routed through them.

I altered the code in types.h slightly so that the new memory
functions are used.

I also added 2 new files memory.h & memory.c
I'm not sure if these are the preferred file names ?

Eoin ó Fearghail, Agora Games.

3

(1 replies, posted in wolfSSL)

I've added some functionality to wolfSSL that allows the developer
to hook in their own log interceptor function.

To facilitate this I moved some code from cyassl_int.h & cyassl_int.c
into the new files logging.h & logging.c
I'm not sure whether these are the most suitable names for the new files ?

By default the behaviour will remain as before, however if an interceptor
is registered, log messages will  instead be routed there.

The other change was the addition of an enum[CYA_Log_Levels]
to map log levels. This is useful for filtering out uninteresting messages;
the case where a developer only cares about errors for example.

Eoin ó Fearghail, Agora Games.

4

(2 replies, posted in wolfSSL)

A unified diff of the patch I applied.

/cyassl-1.9.0/ctaocrypt/src/asn.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/cyassl-1.9.0/ctaocrypt/src/asn.c b/cyassl-1.9.0/ctaocrypt/src/asn.c
index 844ab71..2ec8eec 100644
--- a/cyassl-1.9.0/ctaocrypt/src/asn.c
+++ b/cyassl-1.9.0/ctaocrypt/src/asn.c
@@ -716,7 +716,7 @@ static int GetCertHeader(DecodedCert* cert, word32 inSz)
         return ASN_PARSE_E;

     if (GetInt(&mpi, cert->source, &cert->srcIdx) < 0)
-        ret = ASN_PARSE_E;
+        return ASN_PARSE_E;

     mp_clear(&mpi);
     return ret;

5

(2 replies, posted in wolfSSL)

In GetCertHeader(..) this variable is declared:

mp_int mpi;

and then hopefully initialized later on in GetInt(...)

however if GetInt fails then, instead of returning
ret is set to ASN_PARSE_E

it looks like this ret value is then ignored later on
so I assume the intention was to write

return ASN_PARSE_E;
instead of
ret = ASN_PARSE_E;

Since mp_int is not nulled or anything, attempting
to free it in mp_init will causes a crash.

Eoin.