English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 06 January 2023, 04:39   #1
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
AmiSSL and AmigaOS v3.2 - Need Help to Get It Working

Hi there!

I'm trying to build my own simple HTTPS client, based on the examples provided in the Examples folder. I noticed that on my vanilla AmigaOS v3.2 installation on WinUAE, the example httpget works (with both HTTP and HTTPS) but https either invites a Guru 8000 0004 or crashes WinUAE, depending on whether I enable the FPU or not. Either way, the problem seems to come from the call to SSL_connect().

(https works well on my real Amiga with OS v3.1 running on a 68060 with MMU and FPU.)

Could it really be a problem in https?
How could I go about debugging and fixing this problem?
(I looked for other examples but couldn't find many...)
(I also posted this question on GitHub )

Thanks in advance!
tygre is offline  
Old 06 January 2023, 09:22   #2
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
tygre, I don't think that with OS 3.2 the problem is AmiSSL, I say this because:

- On OS 3.2 if you Disable AmiSSL from system, WinUAE crashes the same when with "AmiMoradio AmiSSL" you choose "a different site" from Aminet

- On OS 3.2 and Disable AmiSSL from system, WinUAE crashes the same when with "AmiMoradio Standard" choose "a different site" from Aminet

With OS 3.9 no problem, so the conflict is between AmiModRadio and OS 3.2

I should add that on OS 3.2 iBrowser + AmiSSL works fine and you don't get any Guru if you visit HTTPS sites
AMIGASYSTEM is offline  
Old 06 January 2023, 11:39   #3
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 924
Basic question: have you given it more stack than the standard 4kB?

When adding support for https and gemini in UHC Tools’ aget download tool, I had to increase its stack to minimum 8192, else using the AmiSSL libraries would make it crash randomly.

It is not obvious that this is needed though.

Last edited by patrik; 06 January 2023 at 11:45.
patrik is offline  
Old 06 January 2023, 11:52   #4
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
AmiModRadio already has a high Stack, also tried higher values but nothing changes ! poicome said on OS 3.9 no problem, see my video!

https://eab.abime.net/zone/AmiModRadio-AmiSSL.zip

Last edited by AMIGASYSTEM; 06 January 2023 at 12:18.
AMIGASYSTEM is offline  
Old 06 January 2023, 12:09   #5
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 924
@Tygre: you can have a look at the AmiSSLTest sourcecode for an example that works on 3.2.1 here:
https://github.com/jens-maus/amissl/issues/67
-> https://github.com/jens-maus/amissl/...t_20221019.zip

Also AmiGemini includes source code.
patrik is offline  
Old 06 January 2023, 12:17   #6
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
Tried using StackAttack and it seems that OS 3.2 no longer crashes with AmiModRadio + AmiSSL

Last edited by AMIGASYSTEM; 18 April 2023 at 22:20.
AMIGASYSTEM is offline  
Old 06 January 2023, 12:37   #7
patrik
Registered User
 
patrik's Avatar
 
Join Date: Jan 2005
Location: Umeå
Age: 43
Posts: 924
Quote:
Originally Posted by AMIGASYSTEM View Post
Tried using StackAttack and it seems that OS 3.2 no longer crashes with AmiModRadio + AmiSSL
As StackAttack makes a difference: Is the network code calling AmiSSL perhaps run in a subprocess, unaffected by the stack setting of the main program?
patrik is offline  
Old 06 January 2023, 12:50   #8
AMIGASYSTEM
Registered User
 
AMIGASYSTEM's Avatar
 
Join Date: Aug 2014
Location: Brindisi (Italy)
Age: 70
Posts: 8,252
In fact that is why I wanted to try StackAttack (present on all my 3.9 systems), I had suspected that the Stack was precisely for a second process started by AmiModRadio.

I am not a developer, maybe you could add the Stack in the code that starts AmiModradio and AmiSSL

I would love for someone to compile the source of StackAttack for AROS x86, a big thanks for those who will!
AMIGASYSTEM is offline  
Old 06 January 2023, 17:23   #9
tygre
Returning fan!
 
tygre's Avatar
 
Join Date: Jan 2011
Location: Montréal, QC, Canada
Posts: 1,434
Hi AmigaSystem and Patrick!

I can't thank you enough!

You got it right: the problem was indeed the stack size! Following your advice, I increased the stack of the Shell from which I tried the example https and it finally worked! Then, I installed StackAttack, ran it as StackAttack AUTO, and even AmiModRadio worked too!

The problem indeed could be that AmiModRadio starts two processes, one of which is actually the process doing the download... The stack of this process could just be too small although I thought that the new processes would "inherit" the stack size of the main process: "The NP_StackSize tag may be used to specify how much stack a new process will require. If unspecified, the parent's stack size will be inherited."

Still, I'm going to try to set a stack size at the creation of the new processes...

Cheers!

Last edited by tygre; 06 January 2023 at 17:24. Reason: More details
tygre is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cursors keys not working except under AmigaOS 4.1 kamelito support.WinUAE 2 22 January 2022 09:29
AmiSSL 4.9 Now Available Futaura News 4 06 April 2021 19:44
Looking for working audio mixer in AmigaOS 3.1.4 + Mediator spudje support.Apps 8 02 February 2020 12:53
AmigaOS 3.9 workbench screendrag not working elowan support.Other 4 16 August 2016 10:24
new AmiSSL hal9000 support.Apps 1 14 August 2016 18:23

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:28.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.08262 seconds with 13 queries