#include <buffer.hpp>
Inheritance diagram for yaSSL::input_buffer:


Public Member Functions | |
| input_buffer () | |
| input_buffer (uint s) | |
| input_buffer (uint s, const byte *t, uint len) | |
| ~input_buffer () | |
| void | allocate (uint s) |
| byte * | get_buffer () const |
| void | add_size (uint i) |
| uint | get_capacity () const |
| uint | get_current () const |
| uint | get_size () const |
| uint | get_remaining () const |
| void | set_current (uint i) |
| const byte & | operator[] (uint i) |
| bool | eof () |
| byte | peek () const |
| void | assign (const byte *t, uint s) |
| void | read (byte *dst, uint length) |
Private Member Functions | |
| input_buffer (const input_buffer &) | |
| input_buffer & | operator= (const input_buffer &) |
Private Attributes | |
| uint | size_ |
| uint | current_ |
| byte * | buffer_ |
| byte * | end_ |
Definition at line 73 of file buffer.hpp.
| yaSSL::input_buffer::input_buffer | ( | ) |
| yaSSL::input_buffer::input_buffer | ( | uint | s | ) | [explicit] |
| yaSSL::input_buffer::~input_buffer | ( | ) |
Definition at line 83 of file buffer.cpp.
References buffer_, and yaSSL::ysArrayDelete().
00084 { 00085 ysArrayDelete(buffer_); 00086 }
Here is the call graph for this function:

| yaSSL::input_buffer::input_buffer | ( | const input_buffer & | ) | [private] |
| void yaSSL::input_buffer::add_size | ( | uint | i | ) |
Definition at line 107 of file buffer.cpp.
References yaSSL::Check::check(), get_capacity(), and size_.
Referenced by assign().
00108 { 00109 check(size_ + i-1, get_capacity()); 00110 size_ += i; 00111 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void yaSSL::input_buffer::allocate | ( | uint | s | ) |
Definition at line 90 of file buffer.cpp.
References assert, buffer_, end_, and NEW_YS.
Referenced by yaSSL::CertManager::SetPrivateKey(), and yaSSL::CertManager::Validate().
00091 { 00092 assert(!buffer_); // find realloc error 00093 buffer_ = NEW_YS byte[s]; 00094 end_ = buffer_ + s; 00095 }
Here is the caller graph for this function:

Definition at line 171 of file buffer.cpp.
References add_size(), buffer_, yaSSL::Check::check(), current_, get_capacity(), and memcpy.
Referenced by input_buffer(), yaSSL::CertManager::SetPrivateKey(), and yaSSL::CertManager::Validate().
00172 { 00173 check(current_, get_capacity()); 00174 add_size(s); 00175 memcpy(&buffer_[current_], t, s); 00176 }
Here is the call graph for this function:

Here is the caller graph for this function:

| bool yaSSL::input_buffer::eof | ( | ) |
| byte * yaSSL::input_buffer::get_buffer | ( | ) | const |
Definition at line 99 of file buffer.cpp.
References buffer_.
Referenced by yaSSL::decrypt_message(), yaSSL::SSL::deriveKeys(), yaSSL::SSL::deriveTLSKeys(), yaSSL::CertManager::get_peerKey(), yaSSL::CertManager::get_privateKey(), yaSSL::hashHandShake(), yaSSL::PemToDer(), yaSSL::Finished::Process(), yaSSL::Data::Process(), yaSSL::Alert::Process(), and yaSSL::ProcessOldClientHello().
00100 { 00101 return buffer_; 00102 }
Here is the caller graph for this function:

| uint yaSSL::input_buffer::get_capacity | ( | ) | const |
Definition at line 114 of file buffer.cpp.
Referenced by add_size(), and assign().
Here is the caller graph for this function:

| uint yaSSL::input_buffer::get_current | ( | ) | const |
Definition at line 120 of file buffer.cpp.
References current_.
Referenced by yaSSL::decrypt_message(), yaSSL::hashHandShake(), yaSSL::Finished::Process(), yaSSL::Data::Process(), yaSSL::Alert::Process(), yaSSL::ProcessOldClientHello(), and yaSSL::DH_Server::read().
00121 { 00122 return current_; 00123 }
Here is the caller graph for this function:

| uint yaSSL::input_buffer::get_remaining | ( | ) | const |
Definition at line 132 of file buffer.cpp.
References current_, and size_.
Referenced by yaSSL::ProcessOldClientHello().
Here is the caller graph for this function:

| uint yaSSL::input_buffer::get_size | ( | ) | const |
Definition at line 126 of file buffer.cpp.
References size_.
Referenced by yaSSL::CertManager::get_peerKeyLength(), and yaSSL::CertManager::get_privateKeyLength().
00127 { 00128 return size_; 00129 }
Here is the caller graph for this function:

| input_buffer& yaSSL::input_buffer::operator= | ( | const input_buffer & | ) | [private] |
Definition at line 148 of file buffer.cpp.
References assert, yaSSL::AUTO, buffer_, yaSSL::Check::check(), current_, and size_.
00149 { 00150 assert (i == AUTO); 00151 check(current_, size_); 00152 return buffer_[current_++]; 00153 }
Here is the call graph for this function:

| byte yaSSL::input_buffer::peek | ( | ) | const |
Definition at line 180 of file buffer.cpp.
References buffer_, yaSSL::Check::check(), current_, memcpy, and size_.
Referenced by yaSSL::operator>>(), yaSSL::Finished::Process(), yaSSL::Certificate::Process(), yaSSL::Data::Process(), yaSSL::Alert::Process(), yaSSL::ProcessOldClientHello(), yaSSL::DH_Server::read(), yaSSL::ClientDiffieHellmanPublic::read(), and yaSSL::EncryptedPreMasterSecret::read().
00181 { 00182 check(current_ + length - 1, size_); 00183 memcpy(dst, &buffer_[current_], length); 00184 current_ += length; 00185 }
Here is the call graph for this function:

Here is the caller graph for this function:

| void yaSSL::input_buffer::set_current | ( | uint | i | ) |
Definition at line 138 of file buffer.cpp.
References yaSSL::Check::check(), current_, and size_.
Referenced by yaSSL::DH_Server::read().
Here is the call graph for this function:

Here is the caller graph for this function:

byte* yaSSL::input_buffer::buffer_ [private] |
Definition at line 76 of file buffer.hpp.
Referenced by allocate(), assign(), get_buffer(), get_capacity(), operator[](), peek(), read(), and ~input_buffer().
uint yaSSL::input_buffer::current_ [private] |
Definition at line 75 of file buffer.hpp.
Referenced by assign(), eof(), get_current(), get_remaining(), operator[](), peek(), read(), and set_current().
byte* yaSSL::input_buffer::end_ [private] |
uint yaSSL::input_buffer::size_ [private] |
Definition at line 74 of file buffer.hpp.
Referenced by add_size(), eof(), get_remaining(), get_size(), operator[](), read(), and set_current().
1.4.7

