From: Angus Lee <[EMAIL PROTECTED]>
anguslee> It looks like that the effect of BIO_flush() and BIO_reset()
anguslee> are alike. Indeed is there any differences between them?
Yup. BIO_flush() just flushes the buffers. BIO_reset() goes to the
start of the file. Of course, if "the file" is actually a socket or
something else that's difficult to walk backwards in, the effect won't
really be that much different :-).
anguslee> I want to know also if I can pick up the certificate that
anguslee> belongs to the CA which sign a particular certificate from a
anguslee> stack of certificates? I mean I have a certificate that is
anguslee> signed by, say, CA 1. Now I have a handful of certificates
anguslee> which may belongs to some CA's or persons. Can I find out
anguslee> the certificate of CA 1 from all the certificates in my
anguslee> hand?
If you have your bunch of certs in a STACK_OF(X509), the two functions
X509_find_by_issuer_and_serial() and X509_find_by_subject() are there
to serve you. I would suggest something like this:
X509 *cacert;
X509 *mycert;
STACK_OF(X509) certstore;
cacert = X509_find_by_subject(certstore,X509_get_issuer_name(mycert));
--
Richard Levitte \ Spannvägen 38, II \ [EMAIL PROTECTED]
Chairman@Stacken \ S-168 35 BROMMA \ T: +46-8-26 52 47
Redakteur@Stacken \ SWEDEN \ or +46-709-50 36 10
Procurator Odiosus Ex Infernis -- [EMAIL PROTECTED]
Member of the OpenSSL development team: http://www.openssl.org/
Software Engineer, Celo Communications: http://www.celocom.com/
Unsolicited commercial email is subject to an archival fee of $400.
See <http://www.stacken.kth.se/~levitte/mail/> for more info.
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]