[PATCH RESEND#2 5.10.y] KEYS: asymmetric: properly validate hash_algo and encoding