saltedge / sca-authenticator-ios

Salt Edge Authenticator - application that meets Strong Customer Authentication requirements (PSD2)
GNU General Public License v3.0
7 stars 6 forks source link

The certificate for this server is invalid #68

Closed deamul1sk closed 4 years ago

deamul1sk commented 4 years ago

Summary:
I'm having a certificate related error.

Steps to reproduce:

  1. Run SCA Identity Service with SSL config
  2. Run Authenticator App
  3. Connect Provider image
  4. I have a certificate error in Authenticator image image

Actual behavior:
`I know my certificate is not trusted. So do you have a solution temporarily disable certificate authentication to go? And can you show me the code to process the certificate check in the Authenticator project source. I really want to know'

Looking forward to your early reply. Thanks, Deam

baller784 commented 4 years ago

@deamul1sk

Try this: https://cocoacasts.com/how-to-add-app-transport-security-exception-domains

deamul1sk commented 4 years ago

@deamul1sk

Try this: https://cocoacasts.com/how-to-add-app-transport-security-exception-domains

@baller784

What do i do with this, please, I'm not a Swift programmer

deamul1sk commented 4 years ago

@baller784

I don't know if i got it right. I have followed the instructions that you have shown. I have configured this code to info.plist file (/Example/Authenticator/Supporting Files/info.plist): image

And the result is still the same

baller784 commented 4 years ago

@deamul1sk

If I understood it right, you created a new info.plist. If so, that's not right. There is an Info.plist already. Here it is:

https://github.com/saltedge/sca-authenticator-ios/blob/master/Example/Authenticator/Supporting%20Files/Info.plist

In Xcode, just right click on the Info.plist -> Open As -> Source Code. Find the line with NSAppTransportSecurity key (Line 36). Try to add there:

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
    <key>NSExceptionDomains</key>
    <dict>
        <key>192.168.11.196</key>
        <dict>
            <key>NSExceptionAllowsInsecureHTTPLoads</key>
            <true/>
            <key>NSIncludesSubdomains</key>
            <true/>
        </dict>
    </dict>
</dict>
deamul1sk commented 4 years ago

@baller784

I got this error when i named Info.plist:

Screen Shot 2020-01-16 at 10 18 02

so, i changed it to info.plist. I wonder if i did it right?

If i'm right, i have configured according to your lines .... And the result is still the same

Thanks for your enthusiasm, I don't know how to do it anymore

baller784 commented 4 years ago

@deamul1sk

Try to remove reference to info.plist from Xcode and add it again to the project.

1. Screen Shot 2020-01-16 at 11 46 37

2. Screen Shot 2020-01-16 at 11 47 02

3. Screen Shot 2020-01-16 at 11 48 23

4. Screen Shot 2020-01-16 at 11 48 42

deamul1sk commented 4 years ago

@baller784

I tried downloading the new source code on git and rebuild.

Steps to reproduce:

  1. cd sca-authenticator-ios/Example
  2. bundle install
  3. pod install
  4. Create application.plist configuration file using application.example.plist (on /Supporting Files)
  5. Open project's workspace file in Xcode (Example/Authenticator.xcworkspace)
  6. Build Then, I got this error "error: could not read data from '/SCA_IDENTITY_SERVICE/sca-authenticator-ios-master 3/Example/Authenticator/Supporting Files/info.plist': The file “info.plist” couldn’t be opened because there is no such file"

I'm sorry but can you help me rebuild on your computer?

baller784 commented 4 years ago

@deamul1sk

There is no problem with the source code or the project configuration. The problem is, that you somehow missed the Info.plist file. Please tap on the Supporting Files and open it in Finder.

You should see it both in the Xcode and inside the root of the project.

Screen Shot 2020-01-17 at 13 41 23

Screen Shot 2020-01-17 at 13 39 02

Then, only when you have it both in the project and in the root, try next:

Screen Shot 2020-01-17 at 13 59 15
  1. Navigate to the project (select it in the Project navigator)
  2. Select the application target in the list of targets
  3. Click the Build Settings tab.
  4. Type info.plist inside the search bar
  5. Under the Packaging section, make sure the Info.plist is properly set to the location/file name. It should be exactly the same as on the screenshot.

Authenticator/Supporting Files/info.plist

deamul1sk commented 4 years ago

@baller784

really thank you when i got to Info.plist but the result is still error.

Screen Shot 2020-01-18 at 14 41 43 Screen Shot 2020-01-18 at 14 48 02

I know you tried a lot already but what shout i do next :((

deamul1sk commented 4 years ago

@baller784

Thank you very much, I'm fixing this issue through a trusted cert.

Screen Shot 2020-01-20 at 16 37 02