Граф коммитов

17 Коммитов

Автор SHA1 Сообщение Дата
Jan Beich 19faab7083 Keep using old CK_GCM_PARAMS on NSS >= 3.52
Based on https://hg.mozilla.org/mozilla-central/rev/463069687b3d
2020-05-21 13:34:51 +02:00
Jan Beich 72f26f7c89 Add build flags for BSDs
In file included from build/pclient/main.c:9:
include/mprio.h:16:10: fatal error: 'blapit.h' file not found
 #include <blapit.h>
          ^~~~~~~~~~
In file included from build/pclient/main.c:9:
include/mprio.h:17:10: fatal error: 'msgpack.h' file not found
 #include <msgpack.h>
          ^~~~~~~~~~~
ld: error: unable to find library -lnss3
ld: error: unable to find library -lnspr4
ld: error: unable to find library -lmsgpackc
2020-05-20 16:03:11 +02:00
Anthony Miyaguchi 854d87d8a1 Update SConstruct to modify include path based on sys.platform (#74)
* Format SConstruct with black

* Update SConstruct to modify include path based on OS

* Remove unneeded exports
2019-04-30 14:44:59 -07:00
Henry Corrigan-Gibbs 2bfea2aaee Functions for import/export of private keys (#51)
* Allow DEBUG mode without sanitizers

Valgrind is incompatible with AddressSanitizer, so it is nice to turn
on DEBUG mode without the sanitizers.

* PrivateKey import/export functions

* Define PT_CHECK*() macros for better test output

When using P_CHECKC(), you get no information about where
or why the test failed. These macros also call `mu_check()`
so that you can more easily figure out what went wrong.

* Fix clang-format issues

* Configure travis to use NSS 3.39

* Update README with new version dependencies.

* Fixes per rhelmer's review

* Fix typos.
* Use (pointer,length)-style arguments for import and export functions.
2018-10-02 12:13:39 -07:00
Henry Corrigan-Gibbs 02a81fb652 Remove all variable-length arrays on the stack (#45)
* Remove all variable-length arrays

* Fix indenting
2018-09-24 09:34:53 -07:00
Henry Corrigan-Gibbs 919088a37a Use AddressSanitizer and UBSanitizer in ptest (#46) 2018-09-24 00:49:59 -07:00
Robert Helmer 488da2d729
Linux distros expect NSS headers to not have nss/ prefix on include, … (#40)
* Linux distros expect NSS headers to not have nss/ prefix on include, see https://bugzilla.mozilla.org/show_bug.cgi?id=1491289

* put /usr/include/nss on default path

* make clang-format happy
2018-09-17 14:54:15 -07:00
Robert Helmer 52a3348ea1
This Firefox-specific browser test was moved to a unit test in https://bugzilla.mozilla.org/show_bug.cgi?id=1485620 so we can remove it now (#39) 2018-09-17 11:38:49 -07:00
Robert Helmer 9df5cd22ae change readme to specify linkflags not ldflags
PR #34 changes the way compiler flags are read from the environment, and
SCons seems to want "LINKFLAGS" set in the enviroment instead of
"LDFLAGS" - this was being mapped before.

It's probably not worth re-mapping this, just changing it so what is
specified in the README still works for platforms that need to install
NSS in a weird place (like macOS and Windows) :)
2018-09-11 22:35:21 -07:00
Anthony Miyaguchi 113b69c58d Add CCFLAGS for compiler options 2018-09-10 17:00:02 -07:00
Henry Corrigan-Gibbs fb03f0f588
Merge pull request #27 from rhelmer/use-clang-compiler
issue #25 - use clang as the compiler
2018-08-30 11:39:07 -07:00
Robert Helmer 5b9b9fb182 scons currently always does a debug build, fix the default and also the example in the README 2018-08-29 21:51:44 -07:00
Robert Helmer 768dfb9551 issue #25 - use clang as the compiler 2018-08-29 21:21:31 -07:00
Robert Helmer 1f22a2e887 look for mpi header in system path instead of file path 2018-08-10 21:47:38 -07:00
Henry Corrigan-Gibbs e9920b2bd2 Pick up LDFLAGS and CPPFLAGS from environment (#10) 2018-08-10 19:58:12 -07:00
Henry Corrigan-Gibbs ab526aa1d5 Use NSS_InitContext instead of NSS_Init (#2) 2018-08-05 19:11:47 -07:00
Henry Corrigan-Gibbs 5779b9cde2 Code for libprio pilot (#1)
* The core libprio code for Prio client and server.

These files contain the core cryptographic routines needed
to implement the Prio client and Prio server.

* Tests and example code for libprio.

* A copy of NSS's MPI library.

Since NSS does not export the MPI bignum library, we ship a copy
with the standalone version of libprio.

* Build file and README for libprio.

* Edits per code review by franziskuskiefer

* More edits per code review by franziskuskiefer

* Fix memory bugs found by clang-analyzer

* Remove ugly hack from PublicKey_import method

Now we can import a 32-byte curve25519 public key into NSS without
having to generate a new keypair from scratch.

* Replace SConstruct file with simpler one

* Update README to incorporate code review edits

* Allow importing and exporting public keys in hex

- Public functions PublicKey_import_hex and PublicKey_export_hex
- Tests for these functions

* Add end-to-end test program for PrioEncoder.

Add browser-test utility that
1) generates new server keypairs,
2) uses xpcshell to call the PrioEncoder DOM routines,
3) parses the output of PrioEncoder,
4) validates the encoded packet, and
5) checks that the submitted data is what we expected.

* Fixes to make browser-test compile on Linux
2018-07-17 11:26:39 -07:00