More resilience in the signing

Initialize the `nkey` to `NULL`, set it to `1`, and handle
`GPGME_ERR_NO_ERROR`.