Open yacosdad opened 4 years ago
@yacosdad Thanks for spotting and fixing this
@yacosdad Thanks for spotting and fixing this
@ckrey Em...but why the CI executed failed?Does this PR will be merged as soon as possible?
Don't worry about CI - that is just flakiness.
But should we return only cert
instead of identityRef
?
Don't worry about CI - that is just flakiness. But should we return only
cert
instead ofidentityRef
?
@jcavar No,we can not. The kCFStreamSSLCertificates Discussion shows that the SecIdentityRef must be first item in the array.
Hmm, I am still not sure I understand. Could you please share how you use certificates returned by this method? Where do you set them?
Hmm, I am still not sure I understand. Could you please share how you use certificates returned by this method? Where do you set them?
Finally, the certificates was used in "open" method of MQTTSSLSecurityPolicyTransport class. That was set into the key kCFStreamSSLCertificates of ssloptions to set kCFStreamPropertySSLSettings property of CFReadStreamRef/CFWriteStreamRef.
This is the demo:
Ok, I see. But the docs state that it should be an array of SecCertificateRefs
except first SecIdentityRef
. With this change, we only leave SecIdentityRef
?
Also, implementation of this other library does the same thing as we are doing now: https://github.com/daltoniam/Starscream/blob/master/Sources/Starscream/SSLClientCertificate.swift
Ok, I see. But the docs state that it should be an array of
SecCertificateRefs
except firstSecIdentityRef
. With this change, we only leaveSecIdentityRef
?Also, implementation of this other library does the same thing as we are doing now: https://github.com/daltoniam/Starscream/blob/master/Sources/Starscream/SSLClientCertificate.swift
YES, my code works fine and the package screenshot in the issue topic shows that the communication process is right. You can grab the network package and take a test.
I understand what you are saying, but I don't understand why that is the case. Documentation confirms what our current code is doing. (and other library is doing the same thing).
Maybe there is an issue somewhere else?
Before deleting the 'cert' code, the package info of client for exchange had two certificates which were same with each other. The screenshot is below:
After deleting that, everything was OK!
![after-2](https://user-images.githubusercontent.com/3340420/68521608-b2dbd200-02dd-11ea-9bef-2df0c4e4f04b.png)
The SecIdentityRef contains a SecCertificateRef, so we do not add another SecCertificateRef again!
Please fix it and release a new pod version, thanks!