File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -57,15 +57,17 @@ struct xcbc_desc_ctx {
5757 u8 ctx [];
5858};
5959
60+ #define XCBC_BLOCKSIZE 16
61+
6062static int crypto_xcbc_digest_setkey (struct crypto_shash * parent ,
6163 const u8 * inkey , unsigned int keylen )
6264{
6365 unsigned long alignmask = crypto_shash_alignmask (parent );
6466 struct xcbc_tfm_ctx * ctx = crypto_shash_ctx (parent );
65- int bs = crypto_shash_blocksize (parent );
6667 u8 * consts = PTR_ALIGN (& ctx -> ctx [0 ], alignmask + 1 );
6768 int err = 0 ;
68- u8 key1 [bs ];
69+ u8 key1 [XCBC_BLOCKSIZE ];
70+ int bs = sizeof (key1 );
6971
7072 if ((err = crypto_cipher_setkey (ctx -> child , inkey , keylen )))
7173 return err ;
@@ -212,7 +214,7 @@ static int xcbc_create(struct crypto_template *tmpl, struct rtattr **tb)
212214 return PTR_ERR (alg );
213215
214216 switch (alg -> cra_blocksize ) {
215- case 16 :
217+ case XCBC_BLOCKSIZE :
216218 break ;
217219 default :
218220 goto out_put_alg ;
You can’t perform that action at this time.
0 commit comments