From cd363d197ea2eed48c3f87fd3e1ea5883ff46205 Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sat, 8 Dec 2012 23:50:32 +0100 Subject: grumble: allow for other ciphers than OCB2-AES128. --- pkg/cryptstate/cryptstate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg') diff --git a/pkg/cryptstate/cryptstate.go b/pkg/cryptstate/cryptstate.go index 43493bf..2b474cc 100644 --- a/pkg/cryptstate/cryptstate.go +++ b/pkg/cryptstate/cryptstate.go @@ -109,8 +109,8 @@ func (cs *CryptState) Decrypt(dst, src []byte) error { } plain_len := len(src) - cs.Overhead() - if len(dst) != plain_len { - return errors.New("cryptstate: plain_len and src len mismatch") + if len(dst) < plain_len { + return errors.New("cryptstate: not enough space in dst for plain text") } ivbyte := src[0] -- cgit v1.2.3