Hi Patrick,
I finally found the issue. It was to do with the way that I was copy/pasting the Ticket itself out of the SE37 function module into the test program. The full ticket is not displayed in the FM. Surprisingly it did not complain about the ticket validity. I was sure it was valid because if I changed a single character it did complain about the ticket itself rather than the ticket issuer certificate. Thanks again for your help.
Kind regards,
Grant