> here the compile error:
> g++ -g -O2 -DNDEBUG -I/usr/include/cryptopp cryptopp-authenc.cpp -o test 
> -lcryptopp -lpthread
> In file included from cryptopp-authenc.cpp:20:0:
> /usr/include/cryptopp/secblock.h: In instantiation of 
> ‘CryptoPP::SecBlock<T, A> CryptoPP::SecBlock<T, A>::operator+(const 
> CryptoPP::SecBlock<T, A>&) [with T = unsigned char; A = 
> CryptoPP::AllocatorWithCleanup<unsigned char>]’:
> cryptopp-authenc.cpp:156:114:   required from here
> /usr/include/cryptopp/secblock.h:593:6: error: cannot convert 
> ‘CryptoPP::SecBlock<T, A>::size<unsigned char, 
> CryptoPP::AllocatorWithCleanup<unsigned char> >’ from type 
> ‘CryptoPP::SecBlock<unsigned char>::size_type (CryptoPP::SecBlock<unsigned 
> char>::)() const {aka long unsigned int (CryptoPP::SecBlock<unsigned 
> char>::)() const}’ to type ‘bool’
>    if(!t.size) return SecBlock(*this);
>       ^
> /usr/include/cryptopp/secblock.h:593:6: error: in argument to unary !
>

Yeah, that's a typo we discovered after releasing 5.6.3. We missed it at 
the time because we did not have a test case for it.

You can change it to the following (from 
https://github.com/weidai11/cryptopp/blob/master/secblock.h#L598):

    assert((!m_ptr && !m_size) || (m_ptr && m_size));
    assert((!t.m_ptr && !t.m_size) || (t.m_ptr && t.m_size));
    if(!t.m_size) return SecBlock(*this);

We are getting ready for a 5.6.4 release to pick-up straggler bugs like 
this (there's been a handful of them), and to clear a potential CVE 
(https://github.com/weidai11/cryptopp/issues/146). I'm waiting to hear back 
if it should be submitted for a CVE assignment.

You can also work from Master by using Wei Dai's github. Master is stable, 
and not experimental:

    git clone https://github.com/weidai11/cryptopp.git
    cd cryptopp
    make static dynamic test
    sudo make install

Then, use the Crypto++ library at /usr/local instead of /usr.

Jeff

-- 
-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
--- 
You received this message because you are subscribed to the Google Groups 
"Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to