In Swift, I need to create a CMS to input a web service.
In Android we used 'spongycastle' https://www.bouncycastle.org/docs/pkixdocs1.4/org/bouncycastle/cms/CMSSignedData.html But I did not find a sample or solution for Swift or objective C.
I also read Apple related documents https://developer.apple.com/documentation/security/cryptographic_message_syntax_services#1677736 , but still nothing special.
Does anyone have experience working with a specific solution for Swift or objective C code to do this?
thank you.
iOS-based platform (iPhone)
OK.
That means that you won’t be able to use the CMSEncoder
API because it’s not available on iOS. Indeed, the iOS SDK has no CMS support )-: You’ll have to write, or acquire, your own library for this.
With regards available open source CMS libraries, I’ve not used any of them and thus don’t have a specific recommendation.
Oh, there is one easier option: If you have any control over the web service you’re using, you could change it to not require CMS.
Regardless of what you choose to do here, I’d appreciate you filing an enhancement request for a well-supported CMS API. CMS is a fundamental crypto format and it’s sad that we don’t support it.
Please post your bug number, just for the record.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"