component/openssl: add openssl stack function and clear unused variate

1. add openssl 'new' and 'free' function
	2. add clear unused variate to void warning to appear when compile
        3. add internal function 'X509_new' to take the place of 'sk_X509_NAME_new_null' function whitch is openssl stack function
This commit is contained in:
dongheng
2016-09-22 14:42:49 +08:00
parent c504fe4856
commit 2cc32db52d
8 changed files with 62 additions and 30 deletions

View File

@@ -16,10 +16,18 @@
#define _SSL_X509_H_
#include "ssl_types.h"
#include "ssl_stack.h"
DEFINE_STACK_OF(X509_NAME)
X509* sk_X509_NAME_new_null(void);
/*
* sk_X509_NAME_new_null - create a X509 certification object
*
* @param none
*
* @return X509 certification object point or NULL if failed
*/
X509* X509_new(void);
X509* d2i_X509(X509 **cert, const unsigned char *buffer, long len);