I presume that you are not using gpgme_set_armor (c, 1):
It is not possible to export more than one certificate in DER encoded format
because there is no standard for doing so.
I agree that gpgsm should return a awarning in this case.
Either export each certificate into its own file or use armor to crerate a PEM
format - gpgsm and IIRC openSSL are able to read this. |