Lines Matching defs:bio
105 static int PKCS7_bio_add_digest(BIO **pbio, X509_ALGOR *alg)
107 BIO *btmp;
263 BIO *PKCS7_dataInit(PKCS7 *p7, BIO *bio)
266 BIO *out=NULL,*btmp=NULL;
377 if (bio == NULL)
380 bio=BIO_new(BIO_s_null());
382 bio = BIO_new_mem_buf(os->data, os->length);
383 if(bio == NULL)
385 bio=BIO_new(BIO_s_mem());
386 if (bio == NULL)
388 BIO_set_mem_eof_return(bio,0);
392 BIO_push(out,bio);
394 out = bio;
395 bio=NULL;
420 BIO *PKCS7_dataDecode(PKCS7 *p7, EVP_PKEY *pkey, BIO *in_bio, X509 *pcert)
423 BIO *out=NULL,*btmp=NULL,*etmp=NULL,*bio=NULL;
631 bio=in_bio;
636 bio=BIO_new(BIO_s_mem());
638 * the data, the encrypt BIO, if present, will read
640 BIO_set_mem_eof_return(bio,0);
643 BIO_write(bio,(char *)data_body->data,data_body->length);
646 bio = BIO_new_mem_buf(data_body->data,data_body->length);
648 bio=BIO_new(BIO_s_mem());
649 BIO_set_mem_eof_return(bio,0);
651 if (bio == NULL)
655 BIO_push(out,bio);
656 bio=NULL;
674 if (bio != NULL) BIO_free_all(bio);
680 static BIO *PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
684 bio=BIO_find_type(bio,BIO_TYPE_MD);
685 if (bio == NULL)
690 BIO_get_md_ctx(bio,pmd);
697 return bio;
698 bio=BIO_next(bio);
739 int PKCS7_dataFinal(PKCS7 *p7, BIO *bio)
743 BIO *btmp;
823 btmp=bio;
868 if (!PKCS7_find_digest(&mdc, bio,
880 btmp=BIO_find_type(bio,BIO_TYPE_MEM);
887 /* Mark the BIO read only then we can use its copy of the data
961 int PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
1010 return PKCS7_signatureVerify(bio, p7, si, x509);
1015 int PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si,
1023 BIO *btmp;
1037 btmp=bio;