File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -4652,12 +4652,16 @@ static int spu_register_ahash(struct iproc_alg_s *driver_alg)
4652
4652
hash -> halg .statesize = sizeof (struct spu_hash_export_s );
4653
4653
4654
4654
if (driver_alg -> auth_info .mode != HASH_MODE_HMAC ) {
4655
- hash -> setkey = ahash_setkey ;
4656
4655
hash -> init = ahash_init ;
4657
4656
hash -> update = ahash_update ;
4658
4657
hash -> final = ahash_final ;
4659
4658
hash -> finup = ahash_finup ;
4660
4659
hash -> digest = ahash_digest ;
4660
+ if ((driver_alg -> auth_info .alg == HASH_ALG_AES ) &&
4661
+ ((driver_alg -> auth_info .mode == HASH_MODE_XCBC ) ||
4662
+ (driver_alg -> auth_info .mode == HASH_MODE_CMAC ))) {
4663
+ hash -> setkey = ahash_setkey ;
4664
+ }
4661
4665
} else {
4662
4666
hash -> setkey = ahash_hmac_setkey ;
4663
4667
hash -> init = ahash_hmac_init ;
You can’t perform that action at this time.
0 commit comments