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

lime_settings: add missing cstdint include #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Xiretza
Copy link

@Xiretza Xiretza commented May 6, 2023

Without this, the build fails:

In file included from /build/lime/src/lime-5.2.32/src/lime_double_ratchet.hpp:28,
                 from /build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp:21:
/build/lime/src/lime-5.2.32/src/lime_settings.hpp:49:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   49 |         constexpr std::uint16_t maxMessageSkip=1024;
      |                        ^~~~~~~~
      |                        wint_t
/build/lime/src/lime-5.2.32/src/lime_settings.hpp:54:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   54 |         constexpr std::uint16_t maxMessagesReceivedAfterSkip = 128;
      |                        ^~~~~~~~
      |                        wint_t
/build/lime/src/lime-5.2.32/src/lime_settings.hpp:62:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
   62 |         constexpr std::uint16_t maxSendingChain=1000;
      |                        ^~~~~~~~
      |                        wint_t
/build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp: In member function ‘void lime::DR<Curve>::ratchetEncrypt(const inputContainer&, std::vector<unsigned char>&&, std::vector<unsigned char>&, bool)’:
/build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp:345:45: error: ‘maxSendingChain’ is not a member of ‘lime::settings’
  345 |                 if (m_Ns >= lime::settings::maxSendingChain) { // if we reached maximum encryption wuthout DH ratchet step, session becomes inactive
      |                                             ^~~~~~~~~~~~~~~
/build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp: In member function ‘bool lime::DR<Curve>::ratchetDecrypt(const std::vector<unsigned char>&, const std::vector<unsigned char>&, outputContainer&, bool)’:
/build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp:389:60: error: ‘maxMessageSkip’ is not a member of ‘lime::settings’
  389 |                 int maxAllowedDerivation = lime::settings::maxMessageSkip;
      |                                                            ^~~~~~~~~~~~~~
/build/lime/src/lime-5.2.32/src/lime_double_ratchet.cpp:413:78: error: ‘maxMessageSkip’ is not a member of ‘lime::settings’
  413 |                                 skipMessageKeys(header.PN(), lime::settings::maxMessageSkip-header.Ns()); // we must keep header.Ns derivations available for the next chain
      |                                                                              ^~~~~~~~~~~~~~

@jeannotlapin
Copy link
Member

Hi @Xiretza,
thanks for your help.

Yes, gcc13 seems more sensitive than previous versions. The github repository is not our main one but just a mirror from our gitlab (https://gitlab.linphone.org/BC/public/lime). A fix for this error is on its way, I'll close the PR when it will be merged in master(and release/5.2) branch and mirrored on this repository.

thanks.

@jeannotlapin
Copy link
Member

Hi @Xiretza,
sorry for the late answer, the fix is now in master.
Thanks again.

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