Recent

Author Topic: (Solved) Synapse for oAuth1 with win11  (Read 399 times)

arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
(Solved) Synapse for oAuth1 with win11
« on: March 29, 2023, 08:44:05 pm »
I'v an application with oAuth1 verification.
This has been working well with win10 (and older), but win11 seems to cause a problem.
I have moved all .pas files form win10 to a win11 computer and done recompile Lazarus 2.2.6, so far all ok.

With Win10 the server respond correct "200".
With Win11 the server respond "0 0".
Some special written programs are involved,  (execpt my own):
unit oauth1;  written by Reinier Olislagers  2012
unit oauth1synapse; written by Reinier Olislagers  2012
unit ssl_openssl;  by Lukas Gebauer 2012-13
unit ssl_openssl_lib; by Lukas Gebauer 2012-13
sswin32.inc; by Lukas Gebauer 2012-13

Some Synapse adapter are included:
synachar.pas
synacode.pas
synafpc.pas
synaicnv.pas
synaip.pas
synautil.pas
synsock.pas

From this article https://learn.microsoft.com/en-us/mem/configmgr/core/plan-design/security/enable-tls-1-2-client
it seems this may have something to do with TLS.
Any ideas?

Source:
« Last Edit: March 29, 2023, 11:15:40 pm by arneolav »
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

rvk

  • Hero Member
  • *****
  • Posts: 5192
Re: Synapse for oAuth1 with win11
« Reply #1 on: March 29, 2023, 08:50:41 pm »
And does it still work on win10 at this moment?


arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
Re: Synapse for oAuth1 with win11
« Reply #2 on: March 29, 2023, 08:55:33 pm »
Yes, and has been used every day some years.
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

rvk

  • Hero Member
  • *****
  • Posts: 5192
Re: Synapse for oAuth1 with win11
« Reply #3 on: March 29, 2023, 09:01:06 pm »
Is the new lazarus 2.2.6 64 bit or 32 bit?

Was your old compile 32 bit or 64 bit?

What openssl version did you copy to the exe directory (32 bit ir 64 bit).

If you lazarus bitness doesn't match the openssl bitness it will fail silently.

arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
Re: Synapse for oAuth1 with win11
« Reply #4 on: March 29, 2023, 09:19:07 pm »
Both are 64bit, I5 11400.
Both Lazarus is 64.
I see now the win11 is still on Lazarus 2.2.4, may be something there?
No other synapse programs than those in .zip -file. No other openssl.
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

dseligo

  • Hero Member
  • *****
  • Posts: 984
Re: Synapse for oAuth1 with win11
« Reply #5 on: March 29, 2023, 09:26:02 pm »
If I understood you:
1. Application compiled in W10 works in W10.
2. Application compiled in W11 doesn't work in W11.

Did you try to copy working application from W10 to W11 and test it?
Did you try to copy non-working application from W11 to W10 and test it?

Maybe the environment is the problem and not compiling.

arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
Re: Synapse for oAuth1 with win11
« Reply #6 on: March 29, 2023, 09:37:14 pm »

1. Application compiled in W10 works in W10...........YES
2. Application compiled in W11 doesn't work in W11. ... Does not work.

Did you try to copy working application from W10 to W11 and test it? ... YES, does not work.
Did you try to copy non-working application from W11 to W10 and test it  ...Yes, work perfect.

I'm installing Lazarus 2.2.6 on win11 so have to try when ready.
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

rvk

  • Hero Member
  • *****
  • Posts: 5192
Re: Synapse for oAuth1 with win11
« Reply #7 on: March 29, 2023, 09:39:21 pm »
No other synapse programs than those in .zip -file. No other openssl.
Wait... you don't copy the openssl library files into the .exe directory?

In that case the default openssl from the installation is taken.
It could be that those are present on the win10 machine but not (or wrong ones) on the win11.

So try to copy the correct openssl files into the .exe directory and try again.

dseligo

  • Hero Member
  • *****
  • Posts: 984
Re: Synapse for oAuth1 with win11
« Reply #8 on: March 29, 2023, 09:42:57 pm »
Did you try to copy working application from W10 to W11 and test it? ... YES, does not work.
Did you try to copy non-working application from W11 to W10 and test it  ...Yes, work perfect.

So that tells that problem is not in compiling but in environment. Check if you have correct OpenSSL libraries installed in Windows 11.

rvk

  • Hero Member
  • *****
  • Posts: 5192
Re: Synapse for oAuth1 with win11
« Reply #9 on: March 29, 2023, 09:45:34 pm »
So that tells that problem is not in compiling but in environment. Check if you have correct OpenSSL libraries installed in Windows 11.
That's why I don't rely on the default installed version (if there is any).
You never know what is really installed  ;)

arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
Re: Synapse for oAuth1 with win11
« Reply #10 on: March 29, 2023, 09:46:08 pm »
All source are in the .exe library.

Inclusive these 2:
unit ssl_openssl;  by Lukas Gebauer 2012-13
unit ssl_openssl_lib; by Lukas Gebauer 2012-13

No other openssl is defined in the source files.
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

rvk

  • Hero Member
  • *****
  • Posts: 5192
Re: Synapse for oAuth1 with win11
« Reply #11 on: March 29, 2023, 09:47:41 pm »
All source are in the .exe library.

Inclusive these 2:
unit ssl_openssl;  by Lukas Gebauer 2012-13
unit ssl_openssl_lib; by Lukas Gebauer 2012-13

No other openssl is defined in the source files.
No, I mean you need to put the correct (bitness) libeay32.dll and ssleay32.dll into the .exe directory.
That's the only way to be sure the correct openssl dll's are used.

At the moment your win10 version takes some version from c:\windows\system32.
And you don't have these on your win11.

arneolav

  • Full Member
  • ***
  • Posts: 172
    • ElTranslador
Re: Synapse for oAuth1 with win11
« Reply #12 on: March 29, 2023, 10:23:04 pm »
That did the trick!
Got response 200, ok.
As an devloper of enduser stuff I don't have much knowledge or experience with these details. 

Thanks a lot!
Win XP, Win7, Win 10, Win 11, win64 , Lazarus 2.2.6
Delphi/DevExpress

 

TinyPortal © 2005-2018