Swift isnt so wide spread now and here, so you better to Objective-C. My tip would be interesting approch to
wrap OpenSSL into Xcode.
The professional software from Chilkat has also
Swift Example.
Lastly I found that
ASN1C on Github.
I really would like to hear from you how you solve it. Maybe you can write an article.