25 #ifndef yaSSL_CERT_WRAPPER_HPP
26 #define yaSSL_CERT_WRAPPER_HPP
30 #pragma warning(disable:4786)
34 #include "yassl_types.hpp"
37 #include "openssl/ssl.h"
38 #include STL_LIST_FILE
39 #include STL_ALGORITHM_FILE
42 namespace STL = STL_NAMESPACE;
47 typedef unsigned char opaque;
50 using TaoCrypt::SignerList;
57 explicit x509(uint sz);
60 uint get_length()
const;
61 const opaque* get_buffer()
const;
73 typedef STL::list<x509*> CertList;
83 SignatureAlgorithm keyType_;
84 SignatureAlgorithm peerKeyType_;
92 VerifyCallback verifyCallback_;
97 void AddPeerCert(
x509* x);
98 void CopySelfCert(
const x509* x);
99 int CopyCaCert(
const x509* x);
102 int SetPrivateKey(
const x509&);
104 const x509* get_cert()
const;
105 const opaque* get_peerKey()
const;
106 const opaque* get_privateKey()
const;
107 X509* get_peerX509()
const;
108 X509* get_selfX509()
const;
109 SignatureAlgorithm get_keyType()
const;
110 SignatureAlgorithm get_peerKeyType()
const;
112 uint get_peerKeyLength()
const;
113 uint get_privateKeyLength()
const;
115 bool verifyPeer()
const;
116 bool verifyNone()
const;
117 bool failNoCert()
const;
118 bool sendVerify()
const;
120 void setVerifyPeer();
121 void setVerifyNone();
122 void setFailNoCert();
123 void setSendVerify();
124 void setPeerX509(
X509*);
125 void setVerifyCallback(VerifyCallback);
134 #endif // yaSSL_CERT_WRAPPER_HPP