novastone-media / MQTT-Client-Framework

iOS, macOS, tvOS native ObjectiveC MQTT Client Framework
Other
1.84k stars 463 forks source link

SecPKCS12Import automatically add SecIdentities to the Keychain #566

Closed VeinGuo closed 4 years ago

VeinGuo commented 4 years ago

Short description

SecPKCS12Import automatically add SecIdentities to the Keychain

Environment

Steps to reproduce

  1. +[MQTTCFSocketTransport clientCertsFromP12:passphrase:] SecPKCS12Import will generate a certificate every time it is called, so if clientCertsFromP12 is used for each connection, more and more certificates will be generated

Is there any solution? Now my keychain has many certificates generated.How can I delete them?

VeinGuo commented 4 years ago

I cache the SecCertificateRef and use the old SecCertificateRef to find and delete it in the keychain the next time connect.