Home | History | Annotate | Download | only in pkcs7

Lines Matching refs:bio

105 static int PKCS7_bio_add_digest(BIO **pbio, X509_ALGOR *alg)
107 BIO *btmp;
256 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
259 BIO *out=NULL,*btmp=NULL;
370 if (bio == NULL)
373 bio=BIO_new(BIO_s_null());
375 bio = BIO_new_mem_buf(os->data, os->length);
376 if(bio == NULL)
378 bio=BIO_new(BIO_s_mem());
379 if (bio == NULL)
381 BIO_set_mem_eof_return(bio,0);
385 BIO_push(out,bio);
387 out = bio;
388 bio=NULL;
413 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
416 BIO *out=NULL,*btmp=NULL,*etmp=NULL,*bio=NULL;
603 bio=in_bio;
608 bio=BIO_new(BIO_s_mem());
610 * the data, the encrypt BIO, if present, will read
612 BIO_set_mem_eof_return(bio,0);
615 BIO_write(bio,(char *)data_body->data,data_body->length);
618 bio = BIO_new_mem_buf(data_body->data,data_body->length);
620 bio=BIO_new(BIO_s_mem());
621 BIO_set_mem_eof_return(bio,0);
623 if (bio == NULL)
627 BIO_push(out,bio);
628 bio=NULL;
636 if (bio != NULL) BIO_free_all(bio);
642 static BIO *PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
646 bio=BIO_find_type(bio,BIO_TYPE_MD);
647 if (bio == NULL)
652 BIO_get_md_ctx(bio,pmd);
659 return bio;
660 bio=BIO_next(bio);
697 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
701 BIO *btmp;
781 btmp=bio;
825 if (!PKCS7_find_digest(&mdc, bio,
836 btmp=BIO_find_type(bio,BIO_TYPE_MEM);
843 /* Mark the BIO read only then we can use its copy of the data
916 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
965 return PKCS7_signatureVerify(bio, p7, si, x509);
970 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
978 BIO *btmp;
992 btmp=bio;