#172 Bundled b64_ntop.c in nc
Closed: Invalid None Opened 11 years ago by tibbs.

The Fedora nc package includes a source file (not in the tarball, but a file added to the package as a patch would be) called b64_ntop.c which contains a base64 encoder. I still have the open merge review in my ticket list which is how I noticed this.

It's not immediately clear where this file comes from. Searching for the name turns up hits in ldns and opendnssec. I'm kind of surprised there's no small library around with a base64 encoder in it but I guess there isn't.

I think this is one of those oft-bundled things like the various md5 implementations that really should be in some default library but isn't. Seems pretty clear that this needs an exception, though the maintainer appears to disagree.


This is also interesting reading: http://www.lemoda.net/unix/base64/index.html

I checked and those instructions also work with glibc. In fact, with glibc, you can #include<resolv.h> without errors. You also have to link to libresolv explicitly on Fedora

Whether it's worse to use an undocumented (but not, apparently, private... they are present in the header file /usr/include/resolv.h) function and link to libresolv (which doesn't drag in any new packages, however. It's part of glibc) than to bundle a file from it I'm not sure.

test program to show using b64_ntop from glibc
b64.c

Please update this ticket regarding its continued relevance, providing any information requested. If this is not done within the next two weeks, this ticket may be closed due to inactivity. Thank you!

This ticket is being closed due to inactivity. If the issue referenced has
not been resolved, please reopen the ticket and provide the information
requested. Thank you!

Login to comment on this ticket.

Metadata