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
SSL/TLS connection #396
Comments
I have below working for asynchronous connect ...
|
I converted the format of the certificate,and MQTT still can't connect,Are you using 'Two-way certification'? Do not need a client key(client.key)? |
ca1 and ca2 conversion before what format? p12? |
Can you just please use code formatting, it makes it a lot easier to read comments. |
No I do not use a client key, the format of the certificates is openssl der format. Have you checked a valid path is returned. You can also try "securityPolicy.validatesDomainName = NO;" Additionally you check the MQTT side of things by using openssl to connect to the MQTT broker |
Ok to use a client certificate you need to do few more things
attach the client certificate (P12) to the security policy
Do not forget to add the certificates to your bundle ..... |
You really helped me a great favor!This method is useful!Thanks! NSString* ca = [[NSBundle bundleForClass:[MQTTSession class]] pathForResource:@"ca" ofType:@"der"]; MQTTSSLSecurityPolicyTransport *transport = [[MQTTSSLSecurityPolicyTransport alloc]init]; MQTTSSLSecurityPolicy *securityPolicy = [MQTTSSLSecurityPolicy policyWithPinningMode:MQTTSSLPinningModeCertificate]; |
你好,请教下: |
你好,请教下: Hello, ask:
I'm using self signed certificates ... |
我也是使用的是自签证书 后台搞定的 |
It seems like issue here is resolved but feel free to reopen if not. |
Excuse me, what's going on? Error Domain=NSOSStatusErrorDomain Code=-9807 "(null)" UserInfo={_kCFStreamErrorCodeKey=-9807, _kCFStreamErrorDomainKey=3} |
The framework crashed when connecting to broker with client certificate. My code is
It crashed here in the framework Some debug information around the crash breakpoint The version of framework (from Podfile.lock)
Did I miss something or do something wrong? Asking for help. Any advice would be highly appreciated. |
Same thing for me. Did you manage to fix it? @kuangzq |
|
It has been quite a long time and couldn’t remember the details. But I
think I must have tried pathForResource first, and found it didn’t work,
then I tried something else.
On Thu, Feb 27, 2020 at 03:46 Damo ***@***.***> wrote:
我也是使用的是自签证书 后台搞定的
您好,请问为什么您最后用的[NSBundle bundleForClass:[MQTTSession class]] 方法,而不是[NSBundle
mainBundle] pathForResource: 方法呢?
您是改了证书的名字嘛?您用的两个证书对应的是ca.crt,client.cer,client.key中的哪两个呢?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#396?email_source=notifications&email_token=ADSBFQSUBSFRWRCB4FVBBJLRE6DZBA5CNFSM4EDZ7QAKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOENDVS2I#issuecomment-591878505>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADSBFQWT7POTU5RNP56IXVDRE6DZBANCNFSM4EDZ7QAA>
.
--
Zhengqian (John) Kuang
|
|
[MQTTCFSocketTransport] Error while importing pkcs12 为什么会报错啊 ? 我使用的方式有问题吗 ? |
I have ca.crt, client.crt, client.key
how can I connect mqtt?
right?
The text was updated successfully, but these errors were encountered: