title: Created a certificate using SecCertificateCreateWithData on iOS
body: <p>I want to create a certificate programmatically within an iOS app. The closest API I could find is <a href="https://developer.apple.com/library/ios/#documentation/Security/Reference/certifkeytrustservices/Reference/reference.html#//apple_ref/doc/uid/TP30000157" rel="nofollow">SecCertificateCreateWithData</a> which requires a DER encoded binary input.</p>
  
  <p>Given that I have all the data needed available as runtime objects, How can I construct the DER encoded binary data input ?</p>