English Amiga Board


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

 
 
Thread Tools
Old 12 February 2021, 09:58   #1
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 287
AmiSSL and SAC/C 6.58

Hello,
I'm tring to compile something with the includes of amissl 4.7
and the compiler hangs on the openssl/safestack.h at line 216, in a big macro definition.

I've set a #define OPENSSL_SYS_AMIGA to effectivelty get around this definition, but no

What can I do to fix that ?

Last edited by Gilloo; 12 February 2021 at 09:59. Reason: fix title.
Gilloo is offline  
Old 12 February 2021, 17:30   #2
Futaura
Registered User
 
Futaura's Avatar
 
Join Date: Aug 2018
Location: United Kingdom
Posts: 198
Does it give an error? I may well have encountered the same with IBrowse, but have forgotten by now.

Try adding "MemorySize=h" to your sc command line, or failing that "IdentifierLength=80".

Be aware that you need to perform some tricks to call OPENSSL_init_ssl() in SAS/C, as the first argument is 64-bit unfortunately (all the older SSL init calls lead to this via macros). I use this instead:

Code:
#define OPENSSL_init_ssl_32(opts, settings) (putreg(REG_D1,opts), OPENSSL_init_ssl(0, settings))
which is safe as I only use the flags in the lower 32 bits.
Futaura is offline  
Old 13 February 2021, 19:29   #3
Futaura
Registered User
 
Futaura's Avatar
 
Join Date: Aug 2018
Location: United Kingdom
Posts: 198
Ok, so you actually need both those compiler options in SAS/C. I've updated the readme to reflect this.

I've also tweaked the includes to include the missing integer types that SAS/C doesn't have. All you really need to download and update are the following two files:

https://raw.githubusercontent.com/je...penssl/e_os2.h
https://raw.githubusercontent.com/je...missl/amissl.h
https://raw.githubusercontent.com/je...amissl/types.h
Futaura is offline  
Old 14 February 2021, 21:08   #4
Gilloo
Registered User
 
Join Date: Nov 2010
Location: Grenoble, Isère, Rhône-Alpes, France, Europe, Earth
Posts: 287
Many thanks @Futaura
As the https freeze on Winuae, AmigaOS314.1
I use the following makefile to rebuild the https example...

target: https

obj/https.o: https.c
sc INCLUDEDIR=AMISSLINCLUDE: \
INCLUDEDIR=NETINCLUDE: \
MEMORYSIZE=h \
IDENTIFIERLENGTH=80 \
CODE=FAR \
DATA=FAR \
OPTIMIZE \
STACKEXTEND \
OBJNAME obj/https.o https.c

https: obj/https.o
slink LIB:c.o, obj/https.o LIB LIB:sc.lib,LIB:amiga.lib TO https

it's size is 8972 bytes, instead of 32744 bytes

https www.google.com 443 works as expected

Last edited by Gilloo; 14 February 2021 at 21:24.
Gilloo 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
New AmiSSL v4.6 stevelord News 1 09 June 2020 13:42
AmiSSL 4 Robbie support.Apps 62 17 February 2020 19:54
AmiSSL 4.0 Sir_Lucas News 6 09 February 2017 12:45
new AmiSSL hal9000 support.Apps 1 14 August 2016 18:23
Zozoom, Cul-De-Sac, Cat & Mouse hipoonios request.Old Rare Games 12 18 July 2016 22:27

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 14:54.

Top

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