Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
944 views
in Technique[技术] by (71.8m points)

openssl - How to configure a self signed certificate in wso2 Identity server which iOS application can accept

I have an iOS application which has OAuth2 enabled login. The mobile app tried to get a oauth2 token from WSO2 Identity Server. When the app tries to communicate WSO2 Oauth Authentication end point, it fails to trust the wso2 identity server certificate and app closes by design.

I tried changing the Identity Server certificate by generating a new self signed certificate using IOS. But the problem still persists. BTW in the self signed certificate, I am having my IP address as the CN name.

question from:https://stackoverflow.com/questions/65840210/how-to-configure-a-self-signed-certificate-in-wso2-identity-server-which-ios-app

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To allow the application to connect to sources with untrusted certificates you have to add the following to the Info.plist.

<key>NSAppTransportSecurity</key> 
 <dict>
     <key>NSAllowsArbitraryLoads</key>
     <true/>
 </dict>

FYI, WSO2 IS has an IOS sample application to check SSO https://is.docs.wso2.com/en/latest/learn/single-sign-on-for-native-ios-applications-with-wso2-identity-server/#single-sign-on-for-native-ios-applications-with-wso2-identity-server


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...