Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Properly hash pointers for hash tables where appropriate | Tobias Brunner | 2014-03-31 | 1 | -17/+2 | |
| | | | | | Simply using the pointer is not optimal for our hash table implementation, which simply masks the key to determine the bucket. | |||||
* | x509: CERT_DECODE actually requires KEY_ANY | Tobias Brunner | 2014-03-31 | 1 | -3/+1 | |
| | | | | | More specific decoders might still be needed, but the x509 plugin should not care which ones. | |||||
* | pkcs1: KEY_ANY public key decoder soft depends on specific decoders | Tobias Brunner | 2014-03-31 | 1 | -0/+3 | |
| | ||||||
* | auth-cfg: Declare an attribute certificate helper type to exchange acerts | Martin Willi | 2014-03-31 | 3 | -2/+15 | |
| | ||||||
* | acert: Implement a plugin finding, validating and evaluating attribute certs | Martin Willi | 2014-03-31 | 6 | -0/+363 | |
| | | | | | | This validator checks for any attribute certificate it can find for validated end entity certificates and tries to extract group membership information used for connection authorization rules. | |||||
* | x509: Match acert has_subject() against entityName or holder serial | Martin Willi | 2014-03-31 | 1 | -5/+25 | |
| | | | | | This allows us to find attribute certificates for a subject certificate in credential sets. | |||||
* | pem: Support encoding of attribute certificates | Martin Willi | 2014-03-31 | 1 | -1/+6 | |
| | | | | | | | While there is no widely used PEM header for attribute certificates, at least IAIK-JCE uses BEGIN ATTRIBUTE CERTIFICATE: http://javadoc.iaik.tugraz.at/iaik_jce/current/iaik/utils/Util.html#toPemString(iaik.x509.attr.AttributeCertificate) | |||||
* | x509: Replace the comma separated string AC group builder with a list based one | Martin Willi | 2014-03-31 | 3 | -9/+8 | |
| | ||||||
* | x509: Integrate IETF attribute handling, and obsolete ietf_attributes_t | Martin Willi | 2014-03-31 | 6 | -639/+186 | |
| | | | | | The ietf_attributes_t class is used for attribute certificates only these days, and integrating them to x509_ac_t simplifies things significantly. | |||||
* | x509: Replace fixed acert group string getter by a more dynamic group enumerator | Martin Willi | 2014-03-31 | 4 | -53/+63 | |
| | ||||||
* | x509: Skip parsing of acert chargingIdentity, as we don't use it anyway | Martin Willi | 2014-03-31 | 1 | -9/+1 | |
| | ||||||
* | x509: Fix some whitespaces and do some minor style cleanups in acert | Martin Willi | 2014-03-31 | 1 | -72/+76 | |
| | ||||||
* | ac: Remove unimplemented equals_holder() method from ac_t | Martin Willi | 2014-03-31 | 1 | -8/+0 | |
| | ||||||
* | unit-tests: Fix filtered enumerator tests on 64-bit big-endian platforms | Tobias Brunner | 2014-03-27 | 1 | -12/+12 | |
| | | | | | In case of sizeof(void*) == 8 and sizeof(int) == 4 on big-endian hosts the tests failed as the actual integer value got cut off. | |||||
* | unit-tests: Fix memory leak in ntru tests | Tobias Brunner | 2014-03-27 | 1 | -3/+5 | |
| | ||||||
* | unit-test: added missing TEST_FUNCTION macros | Andreas Steffen | 2014-03-22 | 1 | -8/+16 | |
| | ||||||
* | openssl: Add default fallback when calculating fingerprints of RSA keys | Tobias Brunner | 2014-03-22 | 1 | -1/+15 | |
| | | | | | | We still try to calculate these directly as it can avoid a dependency on the pkcs1 or other plugins. But for e.g. PGPv3 keys we need to delegate the actual fingerprint calculation to the pgp plugin. | |||||
* | Completed integration of ntru_crypto library into ntru plugin | Andreas Steffen | 2014-03-22 | 21 | -1711/+1227 | |
| | ||||||
* | crypto-tester: Don't fail if key size is not supported | Tobias Brunner | 2014-03-20 | 1 | -6/+3 | |
| | | | | | | | | The Blowfish and Twofish implementations provided by the gcrypt plugin only support specific key lengths, which we don't know when testing against vectors (either during unit tests or during algorithm registration). The on_create test with a specific key length will be skipped anyway, so there is no point in treating this failure differently. | |||||
* | unit-tests: Add an option to increase the verbosity when running tests | Tobias Brunner | 2014-03-20 | 1 | -1/+9 | |
| | | | | | The TESTS_VERBOSITY option takes an integer from -1 to 4 that sets the default debug level. | |||||
* | unit-tests: Add an option to run only a subset of all test suites | Tobias Brunner | 2014-03-20 | 1 | -8/+54 | |
| | | | | | The TESTS_SUITES environment variable can contain a comma separated list of names of test suites to run. | |||||
* | unit-tests: Actually verify registered algorithms against test vectors | Tobias Brunner | 2014-03-20 | 2 | -5/+47 | |
| | | | | | | | | Previously, the {ns}.crypto_test.on_add option had to be enabled to actually test the algorithms, which we can't enforce for the tests in the test_runner as the option is already read when the crypto factory is initialized. Even so, we wouldn't want to do this for every unit test, which would be the result of enabling that option. | |||||
* | unit-tests: Use TEST_FUNCTION macro in ntru tests | Tobias Brunner | 2014-03-20 | 1 | -34/+44 | |
| | ||||||
* | unit-tests: Implement registered functions without __builtin_apply() | Tobias Brunner | 2014-03-20 | 1 | -17/+17 | |
| | | | | | This makes the tests work with clang, which does not implement said builtin. | |||||
* | unit-tests: Call functions with TEST_ prefix in ntru test | Tobias Brunner | 2014-03-20 | 1 | -36/+38 | |
| | ||||||
* | unit-tests: Prefix imported testable functions with TEST_ | Tobias Brunner | 2014-03-20 | 1 | -3/+3 | |
| | | | | This avoids any clashes with existing functions in the monolithic build. | |||||
* | unit-tests: Change how hashtable for testable functions is created | Tobias Brunner | 2014-03-20 | 3 | -28/+49 | |
| | | | | | | | | Because GCC does not adhere to the priorities defined for constructors when building with --enable-monolithic (not sure if it was just luck that it worked in non-monolithic mode - anyway, it's not very portable) function registration would fail because the hashtable would not be created yet. | |||||
* | unit-tests: Generate weak keys with gcrypt plugin (but quickly) | Tobias Brunner | 2014-03-20 | 1 | -0/+3 | |
| | ||||||
* | plugin-feature: Hash only the actually used feature argument | Tobias Brunner | 2014-03-20 | 1 | -1/+31 | |
| | | | | | | | | Clang does not initialize padding in union members so hashing the complete "arg" union could lead to different hashes if the hashed plugin_feature_t does not have static storage duration. Fixes #549. | |||||
* | array: Fix removal of elements in the second half of an array | Tobias Brunner | 2014-03-18 | 1 | -1/+1 | |
| | | | | | | | Memory beyond the end of the array was moved when array elements in the second half of an array were removed. Fixes #548. | |||||
* | plugin-loader: Properly initialize modular plugin list if no plugins are enabled | Tobias Brunner | 2014-03-18 | 1 | -0/+1 | |
| | ||||||
* | Implemented ntru_private_key class | Andreas Steffen | 2014-03-18 | 15 | -1381/+1429 | |
| | ||||||
* | 11 bits are needed to encode a maximum index of 1086 | Andreas Steffen | 2014-03-15 | 1 | -1/+1 | |
| | ||||||
* | Refactored NTRU parameter set selection | Andreas Steffen | 2014-03-07 | 3 | -40/+47 | |
| | ||||||
* | Refactored ntru_param_sets | Andreas Steffen | 2014-03-07 | 9 | -246/+175 | |
| | ||||||
* | thread: Properly clean up meta data of main thread | Tobias Brunner | 2014-03-07 | 1 | -0/+2 | |
| | ||||||
* | settings: Log all errors on level 1 | Tobias Brunner | 2014-03-04 | 1 | -4/+3 | |
| | | | | Closes #539. | |||||
* | settings: Avoid conf file parsing beyond allocated buffer | Thomas Egerer | 2014-03-03 | 1 | -2/+2 | |
| | | | | | | | | | | | | | | | A valgrind analysis of libstrongswan revealed an invalid read of 1 in the function starts_with(). A more thorough analysis proved this to be true and showed that with a specially crafted config file (e.g. a single '#'-character not followed by a newline), the parser might even interpret the random memory contents following the allocated buffer as part of the configuration file. The way the parser is designed, it must be able to skip an inserted '\0' and continue parsing. Since it is not able to skip two '\0' characters, the 'fix' of allocating two more bytes than the size of the parsed file and setting them to '\0' seems to be a safe bet. Signed-off-by: Thomas Egerer <thomas.egerer@secunet.com> | |||||
* | Optimize ntru_poly constructors some more5.1.2 | Andreas Steffen | 2014-02-27 | 1 | -26/+24 | |
| | ||||||
* | Optimized initialisation of indices | Andreas Steffen | 2014-02-27 | 1 | -50/+39 | |
| | ||||||
* | Added get_array() method to ntru_poly_t class | Andreas Steffen | 2014-02-27 | 6 | -157/+90 | |
| | ||||||
* | Defined ntru_poly_create_from_seed() and ntru_poly_create_from_data() ↵ | Andreas Steffen | 2014-02-27 | 6 | -138/+220 | |
| | | | | constructors and built some unit tests for the latter) | |||||
* | Optimized use of temporary arrays in polynomial multiplication | Andreas Steffen | 2014-02-27 | 2 | -24/+24 | |
| | ||||||
* | Implement ring multiplication method | Andreas Steffen | 2014-02-27 | 4 | -113/+245 | |
| | ||||||
* | utils: Add memrchr(3) replacement for platforms that don't support it | Tobias Brunner | 2014-02-26 | 3 | -1/+81 | |
| | | | | For instance, on Mac OS X memrchr(3) is not provided by the C library. | |||||
* | settings: Use thread-safe dirname(3) | Tobias Brunner | 2014-02-24 | 1 | -5/+3 | |
| | ||||||
* | utils: Add thread-safe variants of dirname(3) and basename(3) | Tobias Brunner | 2014-02-24 | 3 | -4/+144 | |
| | ||||||
* | utils: Move thread-safe strerror replacement to a separate file | Tobias Brunner | 2014-02-24 | 7 | -99/+145 | |
| | | | | | For some utils _GNU_SOURCE might be needed but that conflicts with the signature of strerror_r(3). | |||||
* | settings: Use dirname(3) correctly | Tobias Brunner | 2014-02-24 | 1 | -4/+4 | |
| | | | | | | | | dirname(3) may return a pointer to a statically allocated buffer. So freeing the returned value can result to undefined behavior. This was noticed on FreeBSD where it caused very strange crashes. It is also not thread-safe, which will be addressed later. | |||||
* | index limit can be easily computed | Andreas Steffen | 2014-02-19 | 6 | -54/+28 | |
| |