I am trying to make HTTPS Get requests to websites in Ada web server. I can currently do HTTP requests without issues but HTTPS fails - possibly due to SSL Certificates. I only plan on using the client portion of the Ada AWS (Ada Web Server) library.
The errors I get are raised PROGRAM_ERROR : SSL not supported. and below that is raised PROGRAM_ERROR : aws-client.adb:398 finalize/adjust raised exception. This error also happened when I repeated the process on a virtual machine of Ubuntu - I was able to build aws though. My issue with that is explained below.
I am using AWS.Client.Get(url) and am able to get a response when itās HTTP. For HTTPS, it doesnāt work. I canāt find any instructions to set SSL up and how would users in future work with my application without having to download a certificate.
Even though AWS is working, when I do āalr buildā after āalr with awsā - I get the following : creating s-main.tadb
Cannot create embedded resource file
make: *** [Makefile:220: gen-templates] Error 2
ERROR: Command ["make", "all", "ENABLE_SHARED=false"] exited with code 2
People on reddit said SSL should be enabled by default for the AWS crate in Alire. I tried cloning the repository and changing the Makefile config to specify āopensslā anyway but I canāt figure out how to use the āmakeā command in Windows 11. Mingw32-make doesnāt work and even if I did make it - I have no idea how to add this to my Ada project. Iāve never used the make command or done this stuff manually as I come from a Python and Java background.
I use make in Windows a lot. I start with msys2 ( https://www.msys2.org/ ), which is what Alire uses I think. Once that is installed, I run: pacman -S make to install make. and make works good after that (I think I had to restart the shell after installing it).
Thanks for getting back to me. I tried that and was successfully able to install make. Running āalr buildā after doing āalr with awsā in a fresh project still gives me this error though :
Thatās not a Make error in and of itself. it is saying that line 20 of the Makefile is failing I think. So one of the commands is failling (whatever is trying to generate s-main.tadb)
Checked all the subfolders and canāt seem to find it. Is it possible to use a different package manager like gprbuild to do this instead? It might just be some weird alire issue Iām having because even after I deleted the cached version, I still get āCannot create embedded resource fileā and that same āmakeā error.
Did you happen to check: /c/Users/doctor/AppData/Local/alire/cache/builds/aws_24.0.0_2b75fe6d/76ffc400ad3402a54fb70c8123b2c7e3ca05994d4ebde43aa84bc3b5eaa2e888/tools/wsdl2aws-templates or one of its subdirectories? Take a look at the paths mentioned in the Makefile output. They are in AppData, which may not be where you are searching?
I havenāt built AWS myself, so I am not sure if you can do it with just a GPR file or not. My naive assumption is that the Makefile probably calls gprbuild internally, but I donāt know for sure.