Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Check for EAP credentials issue
Forum Updated to NodeBB v4.3 + New Features

Check for EAP credentials issue

Scheduled Pinned Locked Moved Solved General and Desktop
18 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Cobra91151C Offline
    Cobra91151C Offline
    Cobra91151
    wrote on last edited by Cobra91151
    #1

    Hello!

    I want to check if EAP credentials are present (stored in the registry or not) when connecting to the Enterprise wireless network from the imported profile using my program. I use this method: WlanSetProfileEapXmlUserData for storing the user credentials. The imported profile only stores the wireless network xml data and not the username and password. So, what method from Wlan API or Qt API should I use to verify that the user credentials are present for the specific wireless profile? I only need information. Thanks.

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Cobra91151 said in Decode GUID issue:

      How to convert it to get the QString?

      What's wrong with QUuid::toByteArray() ?

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      Cobra91151C 1 Reply Last reply
      1
      • Christian EhrlicherC Christian Ehrlicher

        @Cobra91151 said in Decode GUID issue:

        How to convert it to get the QString?

        What's wrong with QUuid::toByteArray() ?

        Cobra91151C Offline
        Cobra91151C Offline
        Cobra91151
        wrote on last edited by
        #3

        @Christian-Ehrlicher

        Because I need to decode this data to make a comparison with some string data. Thanks.

        Christian EhrlicherC 1 Reply Last reply
        0
        • Cobra91151C Cobra91151

          @Christian-Ehrlicher

          Because I need to decode this data to make a comparison with some string data. Thanks.

          Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Cobra91151 You're aware that a QByteArray can be converted to a QString?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          Cobra91151C 2 Replies Last reply
          3
          • Christian EhrlicherC Christian Ehrlicher

            @Cobra91151 You're aware that a QByteArray can be converted to a QString?

            Cobra91151C Offline
            Cobra91151C Offline
            Cobra91151
            wrote on last edited by Cobra91151
            #5

            @Christian-Ehrlicher

            Yes, I know. The problem here is with the last parameter and comparison. I will fix it and reply. Thanks.

            1 Reply Last reply
            0
            • Christian EhrlicherC Christian Ehrlicher

              @Cobra91151 You're aware that a QByteArray can be converted to a QString?

              Cobra91151C Offline
              Cobra91151C Offline
              Cobra91151
              wrote on last edited by Cobra91151
              #6

              @Christian-Ehrlicher

              Ok. I updated my code. It only returns the QString representation of the GUID not the the actual data from which it was created? Thanks.

              1 Reply Last reply
              0
              • Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                Since the uuid is properly defined I don't see why you can't remove '{' and '}'

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                Cobra91151C 1 Reply Last reply
                1
                • Christian EhrlicherC Christian Ehrlicher

                  Since the uuid is properly defined I don't see why you can't remove '{' and '}'

                  Cobra91151C Offline
                  Cobra91151C Offline
                  Cobra91151
                  wrote on last edited by
                  #8

                  @Christian-Ehrlicher

                  I have changed it to: QUuid testUuid("B8F9593C-8BB3-4F25-AB6B-FDFE299CEBAD"); but it still only returns the QString representation of the GUID.

                  1 Reply Last reply
                  0
                  • Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Cobra91151 said in Decode GUID issue:

                    but it still only returns the QString representation of the GUID.

                    What representation do you expect/want? Please clarify your problem so that we can understand what your real problem is.

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    Cobra91151C 1 Reply Last reply
                    0
                    • Christian EhrlicherC Christian Ehrlicher

                      @Cobra91151 said in Decode GUID issue:

                      but it still only returns the QString representation of the GUID.

                      What representation do you expect/want? Please clarify your problem so that we can understand what your real problem is.

                      Cobra91151C Offline
                      Cobra91151C Offline
                      Cobra91151
                      wrote on last edited by
                      #10

                      @Christian-Ehrlicher

                      Ok. I will clarify it. I got this GUID from the registry path: Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WlanSvc\Profiles\{B8F9593C-8BB3-4F25-AB6B-FDFE299CEBAD}

                      It is created when connecting to the Enterprise wireless network. The reason to decode it: when I export the wlan profile, delete it and import it to the program, then it fails to connect using the imported profile because the user credentials are missing. So, I want to add checks for this issue and for example to display the dialog to enter the user credentials in such case. Thanks.

                      1 Reply Last reply
                      0
                      • Christian EhrlicherC Offline
                        Christian EhrlicherC Offline
                        Christian Ehrlicher
                        Lifetime Qt Champion
                        wrote on last edited by
                        #11

                        It looks like you don't understand what a UUID is. It's more or less a random number - there is nothing to decode in any way.

                        Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                        Visit the Qt Academy at https://academy.qt.io/catalog

                        Cobra91151C 1 Reply Last reply
                        2
                        • Christian EhrlicherC Christian Ehrlicher

                          It looks like you don't understand what a UUID is. It's more or less a random number - there is nothing to decode in any way.

                          Cobra91151C Offline
                          Cobra91151C Offline
                          Cobra91151
                          wrote on last edited by Cobra91151
                          #12

                          @Christian-Ehrlicher

                          So, there is not way to decode the GUID? It is created from the profile name + something else by Microsoft. So, it does contain some information. The reason I know that because when removing this GUID and connect to the same wireless network on the same interface, then it creates the same GUID. Thanks.

                          1 Reply Last reply
                          0
                          • Christian EhrlicherC Offline
                            Christian EhrlicherC Offline
                            Christian Ehrlicher
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @Cobra91151 said in Decode GUID issue:

                            So, it does contain some information.

                            No. See https://en.wikipedia.org/wiki/Universally_unique_identifier

                            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                            Visit the Qt Academy at https://academy.qt.io/catalog

                            Cobra91151C 2 Replies Last reply
                            3
                            • Christian EhrlicherC Christian Ehrlicher

                              @Cobra91151 said in Decode GUID issue:

                              So, it does contain some information.

                              No. See https://en.wikipedia.org/wiki/Universally_unique_identifier

                              Cobra91151C Offline
                              Cobra91151C Offline
                              Cobra91151
                              wrote on last edited by Cobra91151
                              #14

                              @Christian-Ehrlicher

                              Ok. So how they generate the same GUID for the wireless profile on the same interface (wlan card) twice? If it is unique random numbers, then it should be different each time. What is the pattern for this GUID: {B8F9593C-8BB3-4F25-AB6B-FDFE299CEBAD}? Thanks.

                              1 Reply Last reply
                              0
                              • Christian EhrlicherC Offline
                                Christian EhrlicherC Offline
                                Christian Ehrlicher
                                Lifetime Qt Champion
                                wrote on last edited by
                                #15

                                @Cobra91151 said in Decode GUID issue:

                                So how they generate the same GUID for the wireless profile on the same interface (wlan card) twice?

                                If this is really the case then you have to ask the vendor.

                                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                                Visit the Qt Academy at https://academy.qt.io/catalog

                                1 Reply Last reply
                                1
                                • Christian EhrlicherC Christian Ehrlicher

                                  @Cobra91151 said in Decode GUID issue:

                                  So, it does contain some information.

                                  No. See https://en.wikipedia.org/wiki/Universally_unique_identifier

                                  Cobra91151C Offline
                                  Cobra91151C Offline
                                  Cobra91151
                                  wrote on last edited by
                                  #16

                                  @Christian-Ehrlicher

                                  Is there any Qt API to check for the user enterprise credentials are present or not in the system for the stored wireless profile? Thanks.

                                  1 Reply Last reply
                                  0
                                  • Cobra91151C Offline
                                    Cobra91151C Offline
                                    Cobra91151
                                    wrote on last edited by
                                    #17

                                    I have updated my question, so it will contain the proper information regarding this issue.

                                    1 Reply Last reply
                                    0
                                    • Cobra91151C Offline
                                      Cobra91151C Offline
                                      Cobra91151
                                      wrote on last edited by
                                      #18

                                      Hello!

                                      I have fixed the issue by checking for wlan_notification_acm_network_available code, from the MS docs (https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/ms706902(v=vs.85)):

                                      The wlan_notification_acm_network_available notification is sent when all of the following conditions occur:
                                      The wireless service finds connectable networks after a scan
                                      The interface is in the disconnected state;
                                      There is no compatible auto-connect profile that the wireless service can use to connect.

                                      After a while when connecting to EAP profile without the user credentials it gets wlan_notification_acm_network_available code. Now the application intercepts it and send a notification to enter the user credentials. The issue is resolved.

                                      1 Reply Last reply
                                      1

                                      • Login

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • Users
                                      • Groups
                                      • Search
                                      • Get Qt Extensions
                                      • Unsolved