Fix private-key validation.