Currently, there is no way to create an instance of Certificate from Security.SecCertificate and vice versa (GitHub Issue #168).
Modifications:
Added an initializer to Certificate which constructs an instance from Security.SecCertificate.
Added a static function createWithCertificate(_ certificate: Certificate) in an extension to Security.SecCertificate which returns a SecCertificate instance.
Various errors when trying to add an initializer in an extension of Security.SecCertificate -- this is presumably because SecCertificate is defined in C.
Result:
Users can create an instance of Certificate from Security.SecCertificate and vice versa.
Motivation:
Currently, there is no way to create an instance of
Certificate
fromSecurity.SecCertificate
and vice versa (GitHub Issue #168).Modifications:
Certificate
which constructs an instance fromSecurity.SecCertificate
.createWithCertificate(_ certificate: Certificate)
in an extension toSecurity.SecCertificate
which returns aSecCertificate
instance.Security.SecCertificate
-- this is presumably becauseSecCertificate
is defined in C.Result:
Users can create an instance of
Certificate
fromSecurity.SecCertificate
and vice versa.