From 43a0a21fb661be6e7943ecbdd7a7c6cee1a17e27 Mon Sep 17 00:00:00 2001 From: toddouska Date: Wed, 5 Sep 2012 08:26:08 -0700 Subject: [PATCH] add GetOjbectSize for CYASSL* --- cyassl/ssl.h | 1 + src/ssl.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/cyassl/ssl.h b/cyassl/ssl.h index b86181380..e58c0c3a4 100644 --- a/cyassl/ssl.h +++ b/cyassl/ssl.h @@ -779,6 +779,7 @@ enum { CYASSL_CHAIN_CA = 2 /* added to cache from trusted chain */ }; +CYASSL_API int CyaSSL_GetObjectSize(void); /* object size based on build */ CYASSL_API int CyaSSL_SetVersion(CYASSL* ssl, int version); CYASSL_API int CyaSSL_KeyPemToDer(const unsigned char*, int sz, unsigned char*, int, const char*); diff --git a/src/ssl.c b/src/ssl.c index 2936e9089..dba84f5f8 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -209,6 +209,13 @@ int CyaSSL_negotiate(CYASSL* ssl) } +/* object size based on build */ +int CyaSSL_GetObjectSize(void) +{ + return sizeof(CYASSL); +} + + /* server Diffie-Hellman parameters */ int CyaSSL_SetTmpDH(CYASSL* ssl, const unsigned char* p, int pSz, const unsigned char* g, int gSz)