#include <yassl_imp.hpp>
Inheritance diagram for yaSSL::Certificate:


Public Member Functions | |
| Certificate () | |
| Certificate (const x509 *cert) | |
| const opaque * | get_buffer () const |
| input_buffer & | set (input_buffer &in) |
| output_buffer & | get (output_buffer &out) const |
| HandShakeType | get_type () const |
| void | Process (input_buffer &, SSL &) |
Private Member Functions | |
| Certificate (const Certificate &) | |
| Certificate & | operator= (const Certificate &) |
Private Attributes | |
| const x509 * | cert_ |
Friends | |
| output_buffer & | operator<< (output_buffer &, const Certificate &) |
Definition at line 276 of file yassl_imp.hpp.
| yaSSL::Certificate::Certificate | ( | ) |
| yaSSL::Certificate::Certificate | ( | const x509 * | cert | ) | [explicit] |
Definition at line 996 of file yassl_imp.cpp.
References cert_, yaSSL::CERT_HEADER, yaSSL::x509::get_length(), and yaSSL::HandShakeBase::set_length().
00996 : cert_(cert) 00997 { 00998 set_length(cert_->get_length() + 2 * CERT_HEADER); // list and cert size 00999 }
Here is the call graph for this function:

| yaSSL::Certificate::Certificate | ( | const Certificate & | ) | [private] |
| output_buffer & yaSSL::Certificate::get | ( | output_buffer & | out | ) | const [virtual] |
| const opaque * yaSSL::Certificate::get_buffer | ( | ) | const |
Definition at line 1002 of file yassl_imp.cpp.
References cert_, and yaSSL::x509::get_buffer().
01003 { 01004 return cert_->get_buffer(); 01005 }
Here is the call graph for this function:

| HandShakeType yaSSL::Certificate::get_type | ( | ) | const [virtual] |
Implements yaSSL::HandShakeBase.
Definition at line 1075 of file yassl_imp.cpp.
References yaSSL::certificate.
01076 { 01077 return certificate; 01078 }
| Certificate& yaSSL::Certificate::operator= | ( | const Certificate & | ) | [private] |
| void yaSSL::Certificate::Process | ( | input_buffer & | , | |
| SSL & | ||||
| ) | [virtual] |
Implements yaSSL::HandShakeBase.
Definition at line 1025 of file yassl_imp.cpp.
References yaSSL::CertManager::AddPeerCert(), yaSSL::AUTO, yaSSL::c24to32(), yaSSL::CERT_HEADER, yaSSL::client_end, yaSSL::Parameters::entity_, err, yaSSL::x509::get_length(), yaSSL::Security::get_parms(), yaSSL::SSL::getSecurity(), NEW_YS, yaSSL::input_buffer::read(), yaSSL::serverCertComplete, yaSSL::SSL::SetError(), yaSSL::x509::use_buffer(), yaSSL::Crypto::use_certManager(), yaSSL::States::useClient(), yaSSL::SSL::useCrypto(), yaSSL::SSL::useStates(), and yaSSL::CertManager::Validate().
01026 { 01027 CertManager& cm = ssl.useCrypto().use_certManager(); 01028 01029 uint32 list_sz; 01030 byte tmp[3]; 01031 01032 tmp[0] = input[AUTO]; 01033 tmp[1] = input[AUTO]; 01034 tmp[2] = input[AUTO]; 01035 c24to32(tmp, list_sz); 01036 01037 while (list_sz) { 01038 // cert size 01039 uint32 cert_sz; 01040 tmp[0] = input[AUTO]; 01041 tmp[1] = input[AUTO]; 01042 tmp[2] = input[AUTO]; 01043 c24to32(tmp, cert_sz); 01044 01045 x509* myCert; 01046 cm.AddPeerCert(myCert = NEW_YS x509(cert_sz)); 01047 input.read(myCert->use_buffer(), myCert->get_length()); 01048 01049 list_sz -= cert_sz + CERT_HEADER; 01050 } 01051 if (int err = cm.Validate()) 01052 ssl.SetError(YasslError(err)); 01053 else if (ssl.getSecurity().get_parms().entity_ == client_end) 01054 ssl.useStates().useClient() = serverCertComplete; 01055 }
Here is the call graph for this function:

| input_buffer & yaSSL::Certificate::set | ( | input_buffer & | in | ) | [virtual] |
| output_buffer& operator<< | ( | output_buffer & | output, | |
| const Certificate & | cert | |||
| ) | [friend] |
Definition at line 1009 of file yassl_imp.cpp.
01010 { 01011 uint sz = cert.get_length() - 2 * CERT_HEADER; 01012 opaque tmp[CERT_HEADER]; 01013 01014 c32to24(sz + CERT_HEADER, tmp); 01015 output.write(tmp, CERT_HEADER); 01016 c32to24(sz, tmp); 01017 output.write(tmp, CERT_HEADER); 01018 output.write(cert.get_buffer(), sz); 01019 01020 return output; 01021 }
const x509* yaSSL::Certificate::cert_ [private] |
1.4.7

