if (cdat->aad[i] == NULL)
return parse_bin(value, &cdat->aad[i], &cdat->aad_len[i]);
}
- return 0;
+ return -1;
}
if (strcmp(keyword, "Tag") == 0)
return parse_bin(value, &cdat->tag, &cdat->tag_len);
else if (strcmp(value, "FALSE") == 0)
cdat->tag_late = 0;
else
- return 0;
+ return -1;
return 1;
}
}
else if (strcmp(value, "DECRYPT") == 0)
cdat->enc = 0;
else
- return 0;
+ return -1;
return 1;
}
return 0;
if (strcmp(keyword, "Algorithm") == 0) {
mdata->alg = OPENSSL_strdup(value);
if (!mdata->alg)
- return 0;
+ return -1;
return 1;
}
if (strcmp(keyword, "Input") == 0)
if (strcmp(keyword, "PeerKey") == 0) {
EVP_PKEY *peer;
if (find_key(&peer, value, public_keys) == 0)
- return 0;
+ return -1;
if (EVP_PKEY_derive_set_peer(kdata->ctx, peer) <= 0)
- return 0;
+ return -1;
return 1;
}
if (strcmp(keyword, "SharedSecret") == 0)
}
if (strcmp(keyword, "Ctrl") == 0) {
if (mdata->pctx == NULL)
- return 0;
+ return -1;
return pkey_test_ctrl(t, mdata->pctx, value);
}
return 0;