-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setting SqueakSSL string property ‘CERTNAME’ has no effect on macOS #680
Comments
I opened a pull request for this in the Pharo VM repository. Porting the changes to the OpenSmalltalk VM would largely just seem to need to take the difference between the use of ‘logStatus’ and ‘logprintf_status’ in ‘sqSetupSSL’ into account. |
HI @Rinzwind, These are interesting changes. Other than that, the changes over ther introducing the certpass would at least require updating the |
I gave that a try: commit bf1931e7083c5e8d. It might make more sense given that ‘SecPKCS12Import’ also adds the items to the default keychain anyway (contrary to what its documentation implies in saying “you can use the SecPKCS12Import function to obtain SecIdentityRef objects […] you can then use the Keychain Services API […] to put the identities and associated certificates in the keychain”, see the thread regarding “SecIdentityRef without importing (SecPKCS12Import) into the keychain” on the Apple Developer Forums). A concern could however be that there can be multiple certificates for the same subject. The ‘friendly name’ used in the Windows implementation is, as far as I understand from some of Microsoft’s documentation on ‘Certificates’, a name that can be freely associated with a certificate. I don’t think there’s an equivalent in Keychain Access, it allows entering a name for a private key but not for a certificate as far as I can tell. The use of ‘kSecMatchValidOnDate’ in the query passed to ‘SecItemCopyMatching’ does at least avoid using a certificate that’s expired. |
Look ok for now. sorry, I dont have too much time atm |
As far as I understand, in the SqueakSSL plugin, setting the string property identified by
SQSSL_PROP_CERTNAME
has no effect on macOS.In
sqUnixOpenSSL.inc
, setting the property sets the ‘certName’ field of the ‘ssl’ structure:opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc
Lines 708 to 710 in 8e9abfb
The field is used in
sqSetupSSL
to load the certificate and private key:opensmalltalk-vm/platforms/unix/plugins/SqueakSSL/sqUnixOpenSSL.inc
Lines 280 to 291 in 8e9abfb
In
sqMacSSL.c
, setting the property similarly sets the ‘certName’ field of the ‘ssl’ structure:opensmalltalk-vm/platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c
Lines 607 to 611 in 8e9abfb
But in
sqSetupSSL
, the field does not seem to be used:opensmalltalk-vm/platforms/Mac OS/plugins/SqueakSSL/sqMacSSL.c
Lines 108 to 176 in 8e9abfb
The text was updated successfully, but these errors were encountered: