Lines Matching defs:ec
16 #include <openssl/ec.h>
73 #define EVP_PKEY_get0_EC_KEY(x) x->pkey.ec
158 unsigned long ec = ERR_get_error();
159 *error_r = t_strdup_printf("%s", ERR_error_string(ec, NULL));
322 int ec;
331 ec = EVP_CipherInit_ex(ctx->ctx, ctx->cipher, NULL, ctx->key, ctx->iv, ctx->mode);
332 if (ec != 1) return dcrypt_openssl_error(error_r);
335 if (ctx->aad != NULL) ec = EVP_CipherUpdate(ctx->ctx, NULL, &len, ctx->aad, ctx->aad_len);
336 if (ec != 1) return dcrypt_openssl_error(error_r);
377 int ec;
397 ec = EVP_CIPHER_CTX_ctrl(ctx->ctx, EVP_CTRL_GCM_SET_TAG, ctx->tag_len, ctx->tag);
398 } else ec = 1;
400 if (ec == 1)
401 ec = EVP_CipherFinal_ex(ctx->ctx, buf, &outl);
403 if (ec == 1) {
411 ec = EVP_CIPHER_CTX_ctrl(ctx->ctx, EVP_CTRL_GCM_GET_TAG, EVP_GCM_TLS_TAG_LEN, ctx->tag);
416 if (ec == 0 && error_r != NULL)
418 else if (ec < 0) dcrypt_openssl_error(error_r);
423 return ec == 1;
488 int ec;
494 ec = HMAC_Init_ex(ctx->ctx, ctx->key, ctx->klen, ctx->md, NULL);
495 if (ec != 1) return dcrypt_openssl_error(error_r);
501 int ec;
502 ec = HMAC_Update(ctx->ctx, data, data_len);
503 if (ec != 1) return dcrypt_openssl_error(error_r);
509 int ec;
512 ec = HMAC_Final(ctx->ctx, buf, &outl);
514 if (ec == 1) {
564 int ec = 0;
573 ec = -1;
577 return ec == 0;
600 int ec = 0;
604 ec = -1;
611 if (ec == -1 || EC_KEY_check_key(ec_key) != 1) {
867 int nid, ec, enctype;
937 ec = EC_POINT_mul(EC_KEY_get0_group(eckey), pub, point, NULL, NULL, bnctx);
944 if (ec == 1 && EC_KEY_check_key(eckey) == 1) {
1176 int ec;
1200 ec = -1;
1203 ec = EC_POINT_mul(EC_KEY_get0_group(eckey), pub, point, NULL, NULL, bnctx);
1211 if (ec == 1 && key != NULL && EC_KEY_check_key(eckey) == 1) {
1654 if (key == NULL) { /* ec keys are bother */
1701 int ec;
1723 ec = PEM_write_bio_PrivateKey(key_out, pkey, algo, NULL, 0, NULL, (void*)password);
1726 ec = -1;
1728 if (ec != 1) {
1745 int ec;
1759 ec = PEM_write_bio_PUBKEY(key_out, pkey);
1761 ec = -1;
1765 ec = i2d_EC_PUBKEY_bio(b64, EVP_PKEY_get0_EC_KEY(pkey));
1767 ec = -1;
1771 ec = -1;
1774 if (ec != 1) {
1993 int ec;
2004 ec = -1;
2007 ec = 0;
2012 return ec == 0;
2017 int ec;
2028 ec = -1;
2031 ec = 0;
2036 return ec == 0;