Our server team has provided a PEM string which we consume from API response in our code.
we cant have a physical copy of .pem file in our code repository
and i cant pass any client-key also ( In production we cant pass any client-keys )
I need to pass that PEM string , so that my request will be acknowledged by the server.
could you please give me the sample piece of code how to achieve that in swift with this package.
Thanks for your response.
We are trying to connect our company message broker via (MQTT over websockets) our url will be - wss://msgvip.s05587.us.pkij.com:56789/mqtt
Question 1: will your package appends mqtt at the end or i can use the below code to connect it
Question 2:
Our server team has provided a PEM string which we consume from API response in our code. we cant have a physical copy of .pem file in our code repository and i cant pass any client-key also ( In production we cant pass any client-keys )
I need to pass that PEM string , so that my request will be acknowledged by the server.
could you please give me the sample piece of code how to achieve that in swift with this package.
Our earlier Objective-c code - which decodes the PEM string , converts it into array . It uses below package and pins the certificate. https://github.com/novastone-media/MQTT-Client-Framework
MQTTSSLSecurityPolicy securityPolicy = [MQTTSSLSecurityPolicy policyWithPinningMode:MQTTSSLPinningModeCertificate]; NSString pem = [self.options valueForKey:@"sslCert"];