Codebase list libcryptx-perl / d2ac7a4
ocb3 fix Karel Miko 6 years ago
1 changed file(s) with 8 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
113113 return CRYPT_INVALID_ARG;
114114 }
115115
116 /* Make sure taglen isn't too long */
117 if (taglen > (unsigned long)cipher_descriptor[cipher].block_length) {
118 taglen = cipher_descriptor[cipher].block_length;
116 /* The blockcipher must have a 128-bit blocksize */
117 if (cipher_descriptor[cipher].block_length != 16) {
118 return CRYPT_INVALID_ARG;
119 }
120
121 /* The TAGLEN may be any value up to 128 (bits) */
122 if (taglen > 16) {
123 return CRYPT_INVALID_ARG;
119124 }
120125 ocb->tag_len = taglen;
121126