Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the definition of LTC_WIN32_BCRYPT private #660

Merged
merged 1 commit into from
Aug 26, 2024

Conversation

levitte
Copy link
Collaborator

@levitte levitte commented Aug 20, 2024

  1. It's internal anyway, so doesn't quite need to be reflected in a
    public header file.
  2. This makes it easy for someone build this library to choose not
    to use BCryptGenRandom() by simply definining LTC_NO_WIN32_BCRYPT,
    which was hard to reflect in an unmodified public header file.

Alternative to #653

Copy link
Member

@sjaeckel sjaeckel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! That looks a lot better IMO.

After having a quick glance at tomcrypt_cfg.h there's most likely a few other things that could be made private. ... and maybe also a discussion to open, whether it'd make sense to split this then up in two different private headers, one for headers and one for cfg ... or whether cfg should be private in the first place!? ... but let's merge this first to unblock @karel-m

src/headers/tomcrypt_private.h Outdated Show resolved Hide resolved
@levitte
Copy link
Collaborator Author

levitte commented Aug 21, 2024

I don't see anything wrong with tomcrypt_cfg.h being public.

However, tomcrypt_custom.h could be a candidate to be made private, but I'm unsure, 'cause if a choice made there affects other public headers (such as what the applications get to see), then it isn't a candidate.

Copy link
Member

@sjaeckel sjaeckel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash & force-push, no need for that silly co-authored tag ;)

Btw. you're free to push feature branches directly to this repo, no need for your fork!

@levitte
Copy link
Collaborator Author

levitte commented Aug 22, 2024

Btw. you're free to push feature branches directly to this repo, no need for your fork!

Oh! Yeah, that might be practical. Thank you.

1. It's internal anyway, so doesn't quite need to be reflected in a
   public header file.
2. This makes it easy for someone build this library to choose not
   to use BCryptGenRandom() by simply definining LTC_NO_WIN32_BCRYPT,
   which was hard to reflect in an unmodified public header file.

Alternative to libtom#653
@levitte
Copy link
Collaborator Author

levitte commented Aug 22, 2024

Squashed and ready to be merged :-)

@sjaeckel sjaeckel merged commit c4b423f into libtom:develop Aug 26, 2024
75 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants