Create an X.509 certificate progamatically

Hi,


Is it possible to create an X.509 certificate using only the system security frameworks? Basically I would like to implement a CA locally.


The docs say it's "possible to create X.509 certificates", quote:


Certificate, Key, and Trust Services

Certificate, Key, and Trust Services is a C API for managing certificates, public and private keys, symmetric keys, and trust policies in iOS and OS X. You can use these services in your app to:

Create certificates and asymmetric keys


But in the reference docs all I can find is reading existing certificates from DER/PEM/PKCS#12 sources. I would like to avoid using OpenSSL to do this.


Kind Regards,

Alex

Replies

Is it possible to create an X.509 certificate using only the system security frameworks?

What platform are you working on? The OS X Security framework provides a lot more infrastructure than the iOS one.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Even though this entry is quite old. I am wondering if you could provide a solution for creating a x 509 certificate, because currently i am facing the exact same problem and i struggle to find a solution. The platform i am working on is OS X.


Best regards

There are two new open source Swift packages: swift-certificates and swift-asn1. Together, these libraries provide developers a faster and safer implementation of X.509 certificates, a critical technology that powers the security of TLS.

Swift Certificates has been released at an early stage.

https://www.swift.org/blog/swift-certificates-and-asn1/

There are two new open source Swift packages: Swift Certificates and Swift ASN.1

Yes. I was very happy to see that announcement.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"