LibreSSL
#1
LibreSSL
There was a venture by the gentleman Armanox on Nekochan to get LibreSSL working. 

I have gotten it to compile, but the library is horribly broken. I am opening this thread to document my patch, which Full disclosure is not a very good way to go about this

Summary of changes:

1. Changed all %zu to %u printf statements. 
2. Removed __attribute__ from the code. Most of them were format, deprecated, unused and noreturn types. I did not replace any with pragmas. Some msvc definitions were removed proactively. 
3. arc4random.h inside the application required some hammering. I first copied the solaris version of the header for compatibility. The next thing was to temporarily define MAP_ANON to MAP_SGI_ANYADDR. This is not the proper way to do this, and doesn't result in an anonymous mapping. It probably also "breaks" the associated functions, it was mostly done as a bypass to allow compilation. 

What would need to be done to finish: 

You need to get a set of the getentropy functions. I'd normally suggest grabbing it from the openbsd-compat part of OpenSSH or something. 

Replace my not-proper-way of doing a mapping with the fd to /dev/zero trick. The reason I didn't do this is simply because I'm not qualified to do it correctly, nor am I asking someone here to do it for me.

Patch: http://irix.cc/raion/patches/libressl-in...hack.patch

Before some retard comes in here and claims I "bungled" it like they claimed with sudo (which was more of a guy targeting a rookie mistake I made and trying to taunt me), this is more of a proof-of-concept than anything else, and something to keep me sharp.

This is kind of a "documentation" post like my tmux one, which I'm gonna return to sooner or later since libxg is now incorporating many of the things tmux would need for IRIX. I think it'll be easier long term with issues I'm finding in OpenSSL. I'm still working on massaging that, but it'll take me some time to wrap my head around it.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,239
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
06-18-2020, 02:09 AM
#2
RE: LibreSSL
I think I fixed MAP_ANON, I've been practicing. There still is a need for getentropy.c and I'm not ready to come up with that yet.

I'm the system admin of this site. Private security technician, licensed locksmith, hack of a c developer and vintage computer enthusiast. 

https://contrib.irixnet.org/raion/ -- contributions and pieces that I'm working on currently. 

https://codeberg.org/SolusRaion -- Code repos I control

Technical problems should be sent my way.
Raion
Chief IRIX Officer

Trade Count: (9)
Posts: 4,239
Threads: 533
Joined: Nov 2017
Location: Eastern Virginia
Website Find Reply
10-05-2020, 08:49 PM


Forum Jump:


Users browsing this thread: 1 Guest(s)