AW: Cleaning up include file inconsistencies

Dr. Matthias St. Pierre Matthias.St.Pierre at ncp-e.com
Sat Jul 6 09:50:48 UTC 2019


There are more oddities in the organization of the internal header files.

1) It appears to me that there are three different levels of internal header files

 - headers in `include/internal`
 - headers in `crypto/include/internal`
 - headers in `crypto/<package>` along with the source files

Having such a finegrained distinction is not the problem, but (at least to me)
it is not entirely clear which include file goes into which directory.

2) Some of the header files carry an `_int.h` suffix while others not,
for seemingly no particular reason.

	~/src/openssl$ find -name '*_int.h'
	./crypto/crmf/crmf_int.h
	./crypto/include/internal/err_int.h
	./crypto/include/internal/ess_int.h
	./crypto/include/internal/ec_int.h
	./crypto/include/internal/rand_int.h
	./crypto/include/internal/store_int.h
	./crypto/include/internal/asn1_int.h
	./crypto/include/internal/modes_int.h
	./crypto/include/internal/cryptlib_int.h
	./crypto/include/internal/bn_int.h
	./crypto/include/internal/evp_int.h
	./crypto/include/internal/x509_int.h
	./crypto/cmp/cmp_int.h
	./crypto/x509/pcy_int.h

In particular for the headers the `include/internal` folder this suffix
is superfluous, because these files are (or should be) included via
relative paths. So instead of

	#include <openssl/evp.h>
	#include "internal/evp_int.h"

It could just be

	#include <openssl/evp.h>
	#include "internal/evp.h"

Matthias
	


More information about the openssl-project mailing list