- ccgcm_set_iv(gcm, ctx, len, in_iv);
- return aes_good;
+ rc = ccgcm_reset(gcm, ctx);
+ rc |= ccgcm_set_iv(gcm, ctx, len, in_iv);
+ return rc;
+}
+
+aes_rval aes_decrypt_reset_gcm(ccgcm_ctx *ctx)
+{
+ const struct ccmode_gcm *gcm = g_crypto_funcs->ccaes_gcm_decrypt;
+ if (!gcm) {
+ return aes_error;
+ }
+
+ return ccgcm_reset(gcm, ctx);
+}
+
+aes_rval aes_decrypt_inc_iv_gcm(unsigned char *out_iv, ccgcm_ctx *ctx)
+{
+ const struct ccmode_gcm *gcm = g_crypto_funcs->ccaes_gcm_decrypt;
+ if (!gcm) {
+ return aes_error;
+ }
+
+ return g_crypto_funcs->ccgcm_inc_iv_fn(gcm, ctx, out_iv);