I have a project that uses OpenSSLMBS.SignData from a PEM File created with OpenSSL that works brilliantly. Now I need to port that project to iOS & so I’ll need to use the Xojo.Crypto module. Before I even get to the iOS stuff I want to replace Christian’s excellent plugin & prove that it works.
So I read my pem file into a text variable & strip the begin & end lines, decode the base64 remainder, use BerDecodeprivatekey to get something valid for the crypto module. And the signature is totally different from the correct MBS signature. Just in case of error I also created a DER file from OpenSSL & wrote a Xojo app to convert the DER file into a PEM file which MBS uses happily to sign the data correctly. Using that DER file with crypto still signs the data incorrectly.
What am I doing wrong? Any help will be greatly appreciated.