The normal PEM_read, etc., functions
stop when they find the first object of the right type. If you want to
read in a multiple certs from a single file, you probably want to use a
data format such as PKCS7 or PKCS12 that supports it natively.
Actually you can use PEM_X509_INFO_read_bio() to read in a chain of PEM encoded certs. Each element of the stack that is returned is an X509_INFO. This is sort of a 'wrapper' that contains a pointer to the actual X509 cert.
-Frank