diff options
author | Erwin Nindl <nine@wirdorange.org> | 2007-12-27 11:57:12 +0000 |
---|---|---|
committer | Erwin Nindl <nine@wirdorange.org> | 2007-12-27 11:57:12 +0000 |
commit | a3e710fbd44ca8a0f4840b4e3366c6fc946ecfc5 (patch) | |
tree | b5b189fa102e382da25b8c7385e628ed3889b335 /encryptedPacket.cpp | |
parent | added anytun to isakmpd (diff) |
* cypher and auth-algo selectable via commandline
* libgcrypt uses secure memory now
* a few bugfixes
Diffstat (limited to 'encryptedPacket.cpp')
-rw-r--r-- | encryptedPacket.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/encryptedPacket.cpp b/encryptedPacket.cpp index 0ac0ca9..35ccda0 100644 --- a/encryptedPacket.cpp +++ b/encryptedPacket.cpp @@ -50,6 +50,15 @@ EncryptedPacket::EncryptedPacket(u_int32_t max_payload_length) } +EncryptedPacket::~EncryptedPacket() +{ + buf_ = reinterpret_cast<u_int8_t*>(header_); + if( auth_tag_ == NULL ) + length_ = size_ + sizeof(struct HeaderStruct) + AUTHTAG_SIZE; + else + length_ = size_ + sizeof(struct HeaderStruct); +} + seq_nr_t EncryptedPacket::getSeqNr() const { return SEQ_NR_T_NTOH(header_->seq_nr); |