Explorar o código

totemcrypto: fix hmac key initialization

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Fabio M. Di Nitto %!s(int64=13) %!d(string=hai) anos
pai
achega
b3f456a8ce
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      exec/totemcrypto.c

+ 2 - 2
exec/totemcrypto.c

@@ -478,8 +478,8 @@ static int init_nss_hash(struct crypto_instance *instance)
 	}
 
 	hash_param.type = siBuffer;
-	hash_param.data = 0;
-	hash_param.len = 0;
+	hash_param.data = instance->private_key;
+	hash_param.len = instance->private_key_len;
 
 	hash_slot = PK11_GetBestSlot(hash_to_nss[instance->crypto_hash_type], NULL);
 	if (hash_slot == NULL) {