Re: BIO_flush() vs BIO_reset()

2000-08-17 Thread Richard Levitte - VMS Whacker

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  for more info.
__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]



BIO_flush() vs BIO_reset()

2000-08-17 Thread Angus Lee

Hi,

It looks like that the effect of BIO_flush() and BIO_reset() are alike. Indeed 
is there any differences between them?

I want to know also if I can pick up the certificate that belongs to the CA 
which sign a particular certificate from a stack of certificates? I mean I 
have a certificate that is signed by, say, CA 1. Now I have a handful of 
certificates which may belongs to some CA's or persons. Can I find out the 
certificate of CA 1 from all the certificates in my hand?

Thank you.

Angus Lee

---
Get Your Free Email at http://www.hknetmail.com

__
OpenSSL Project http://www.openssl.org
User Support Mailing List[EMAIL PROTECTED]
Automated List Manager   [EMAIL PROTECTED]