components/openssl: add some function description

pull/42/merge
Dong Heng 2016-09-27 18:50:57 +08:00
rodzic 652ddae44f
commit 877adaab7a
3 zmienionych plików z 50 dodań i 0 usunięć

Wyświetl plik

@ -64,6 +64,21 @@ EVP_PKEY* d2i_PrivateKey(int type,
*/
void EVP_PKEY_free(EVP_PKEY *x);
/**
* @brief load private key into the SSL
*
* @param type - private key type
* @param ssl - SSL point
* @param len - data bytes
* @param d - data point
*
* @return result
* 0 : failed
* 1 : OK
*/
int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, const unsigned char *d, long len);
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -87,6 +87,20 @@ int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);
*/
int SSL_add_client_CA(SSL *ssl, X509 *x);
/**
* @brief load certification into the SSL
*
* @param ssl - SSL point
* @param len - data bytes
* @param d - data point
*
* @return result
* 0 : failed
* 1 : OK
*
*/
int SSL_use_certificate_ASN1(SSL *ssl, int len, const unsigned char *d);
#ifdef __cplusplus
}
#endif

Wyświetl plik

@ -21,6 +21,7 @@
#include "platform/ssl_port.h"
#include "internal/ssl_x509.h"
#include "internal/ssl_pkey.h"
/*
{
@ -426,6 +427,26 @@ const char *SSL_get_version(const SSL *ssl);
*/
int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);
/**
* @brief get the bytes numbers which are to be read
*
* @param ssl - SSL point
*
* @return bytes number
*/
int SSL_pending(const SSL *ssl);
/**
* @brief check if SSL want nothing
*
* @param ssl - SSL point
*
* @return result
* 0 : false
* 1 : true
*/
int SSL_want_nothing(const SSL *ssl);
/**
* @brief get the SSL context current method
*