When CryptoCB is used and the key gen operation is not implemented, err is CRYPTOCB_UNAVAILABLE and needs to be reset to 0.