sm: Handle gcry_pk_encrypt return value.