Home | History | Annotate | Download | only in pem

Lines Matching refs:ctx

70 int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, EVP_MD *md_type,
96 EVP_EncodeInit(&ctx->encode);
98 EVP_MD_CTX_init(&ctx->md);
99 if (!EVP_SignInit(&ctx->md,md_type))
102 EVP_CIPHER_CTX_init(&ctx->cipher);
103 ret=EVP_SealInit(&ctx->cipher,type,ek,ekl,iv,pubk,npubk);
122 void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl,
129 EVP_SignUpdate(&ctx->md,in,inl);
137 EVP_EncryptUpdate(&ctx->cipher,buffer,&j,in,i);
138 EVP_EncodeUpdate(&ctx->encode,out,&j,buffer,j);
146 int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig, int *sigl,
167 if (!EVP_EncryptFinal_ex(&ctx->cipher,s,(int *)&i))
169 EVP_EncodeUpdate(&ctx->encode,out,&j,s,i);
172 EVP_EncodeFinal(&ctx->encode,out,&j);
175 if (!EVP_SignFinal(&ctx->md,s,&i,priv)) goto err;
180 EVP_MD_CTX_cleanup(&ctx->md);
181 EVP_CIPHER_CTX_cleanup(&ctx->cipher);