ssllibrary.h
来自「Qtopia下的邮件处理程序」· C头文件 代码 · 共 90 行
H
90 行
/******************************************************************************** Copyright (C) 2000-2006 TROLLTECH ASA. All rights reserved.**** This file is part of the Phone Edition of the Qtopia Toolkit.**** Licensees holding a valid license agreement from Trolltech or any of its** authorized distributors may use this file in accordance with** the License Agreement provided with the Licensed Software.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for** information about Trolltech's Commercial License Agreements.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.********** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.******************************************************************************/#ifndef __SSLLIBRARY_H#define __SSLLIBRARY_H#include <QLibrary>#include <openssl/ssl.h>#include <openssl/err.h>#include <openssl/rand.h>#include <openssl/x509.h>class SSLLibrary{ public: SSLLibrary(const QString& pathToLib); ~SSLLibrary(); bool isLoaded(); int SSL_library_init(); void SSL_load_error_strings(); int RAND_status(); void RAND_seed(const void *buf,int num); X509 *SSL_get_certificate(const SSL *ssl); char * X509_NAME_oneline(X509_NAME *a,char *buf,int size); X509_NAME * X509_get_issuer_name(X509 *a); X509_NAME * X509_get_subject_name(X509 *a); void CRYPTO_free(void *a); void X509_free(X509* a); long ASN1_INTEGER_get(ASN1_INTEGER *a); X509* SSL_get_peer_certificate(const SSL *s); ASN1_INTEGER * X509_get_serialNumber(X509 *x); SSL_CTX *SSL_CTX_new(SSL_METHOD *meth); SSL_METHOD *SSLv23_server_method(); SSL_METHOD *SSLv23_client_method(); long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg); int SSL_CTX_set_cipher_list(SSL_CTX* ctx,const char *str); int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx); int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type); int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type); int SSL_CTX_check_private_key(const SSL_CTX *ctx); int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,const char *CApath); void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth); void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio); void SSL_set_accept_state(SSL *s); void SSL_set_connect_state(SSL *s); int BIO_write(BIO *b, const void *data, int len); int SSL_read(SSL *ssl,void *buf,int num); int SSL_get_error(const SSL *s,int ret_code); int SSL_write(SSL *ssl,const void *buf,int num); long BIO_ctrl(BIO *bp,int cmd,long larg,void *parg); int BIO_read(BIO *b, void *data, int len); int SSL_accept(SSL *ssl); int SSL_connect(SSL *ssl); long SSL_get_verify_result(const SSL *ssl); unsigned long ERR_get_error(); char *ERR_error_string(unsigned long e,char *buf); SSL * SSL_new(SSL_CTX *ctx); int SSL_clear(SSL *s); BIO_METHOD *BIO_s_mem(void); BIO * BIO_new(BIO_METHOD *type);#ifndef SINGLE_EXEC private: QLibrary _lib;#endif};#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?