Commit Graph
2203 Commits
Author SHA1 Message Date
Jeremy Clark 670a52f2a3 security: add certificate bundle decoder
Refs: #5004
Change-Id: I0f035caf8f6975ba2322a7f6629312d3dcab910d
2020-08-29 21:48:55 -04:00
Davide Pesavento 97ee811129 util: backport scope_exit & co. from the Library Fundamentals TS v3
Implementation taken from scope-lite by Martin Moene,
commit 197cd4240069b2b8c393ad0d9eabdee601b606b4

Change-Id: I872b6821504b3270ebdc4c48b7255731fb2efc57
2020-08-27 16:20:07 -04:00
Davide Pesavento 599623c303 ci: disable frames in lcov HTML coverage report
Change-Id: I0c24a412ca33be034fb27b7055a868112bede462
2020-08-07 21:00:45 -04:00
Davide Pesavento 483087f56d util: fix time::toIsoString with Boost 1.73.0
Change-Id: Id8d65db9020c3efefab0453c83e39e5e2771ce3a
2020-08-04 22:38:05 -04:00
Davide Pesavento 81bd696ed9 data: do not encode a Content element if not set
Add Data::hasContent() and Data::unsetContent().
Change the behavior of Interest::setApplicationParameters(Block{}) for
consistency with the corresponding getter and with Data::setContent().

Change-Id: I4cc9058912510db0dfe3da614adee727db149415
2020-07-27 10:50:54 -07:00
Eric Newberry 17d7c47ca9 security: support new signed Interest format in Validator
refs #4804

Change-Id: I0391709dc1486c8156c03cf8e9d94e6cfbe30303
2020-07-22 20:56:05 -07:00
Davide Pesavento 933a567c8a docs: fix syntax highlighting of code blocks
And various other cleanups

Change-Id: If945f5407036e73db980cafd2185359a488a0ff1
2020-07-10 17:54:12 -04:00
Davide Pesavento f2c4c53208 ci: add Xcode 11.6 and 12 to Travis CI build matrix
Change-Id: Ied88268107c94523ea651fae101274083d12f8fd
2020-07-01 14:44:53 -04:00
Eric Newberry 6b2cb79748 docs: deprecate signed Interest v0.2 specification
refs #4804

Change-Id: Ie7258b1ecce8ab88e6f902f268554a4be4f7bdd2
2020-06-30 23:15:46 -07:00
Eric Newberry b74bbdab84 security: sign and verify new signed Interest format
refs #4804

Change-Id: Ib819edb977fa06c670b04185a0d730203c7d7fdb
2020-06-22 17:22:27 -07:00
Eric Newberry 6d024bad65 security: add vectored API for verify and sign
Add vectored input for BufferSource transform

refs #4804

Change-Id: I4949afe5ddb5a49ce6a956da6bc7931cf3719021
2020-06-17 21:04:37 -07:00
Alexander Afanasyev 8afba42296 security: Support name options in the KeyLocator when using ValidationPolicySimpleHierarchy
Change-Id: I828e65a964d4d410e314f7bfc024ee749ac9757b
Refs: #5115
2020-06-17 10:36:48 -07:00
Davide Pesavento 2ca5e79633 security: fix inverted logic in CertificateBundleFetcher
Fixes regression introduced in ebfe4a207f

Change-Id: I9187a4f033be2705d5ad17c4dc221eaa28855192
2020-06-16 22:52:23 -04:00
Davide Pesavento 905d40fad9 data: avoid unnecessarily invalidating cached wire encoding
Also, improve unit testing of Interest and Data classes and
cleanup some doxygen comments.

Change-Id: Ia7ef0af88fc84976ae72f9b99a281300717ced3e
2020-06-13 00:00:33 -04:00
Alexander Afanasyev 355fd789c8 security: Correct behavior of PibImpl::setDefaultIdentity
The high level logic of Pib class ensures that an identity exists (i.e.,
creates when missing).  With this correction, specific realizations
of the low-level logic (PibSqlite and PibMemory) simply throw an error
if the caller attempts to set a non-existing identity as default.

Change-Id: I9d07ca8db4817b7938c04b05341444f1150948f8
Refs: #4136
2020-06-11 12:54:14 -04:00
Alexander Afanasyev 75c3af824a util: Introduce NDN_LOG_NOFLUSH env variable to disable auto-flushing logs
Change-Id: Id1699d044e318aac315a545e913d0fc80306939b
Refs: #3668
2020-06-10 17:05:43 -04:00
Davide Pesavento 46cdf909a5 Remove some long-deprecated functions and enums
Change-Id: Iae88534ce7d58a35217dfdb7d97b011b7905be19
2020-06-09 01:17:33 -04:00
Davide Pesavento 9d1089aa29 util: update bundled copies of {any,optional,variant}-lite
any-lite commit 56cdca9c94af84c6e643a05c9105cb1dc38c5d8c
optional-lite commit 5e8a82ac029aebfd2f5708f183a00eda2be132cc
variant-lite commit 1f79b88132687b0ab1efdcf6e4120724e813602b

Change-Id: I7149abedade21f91e673770169ab7cd6062f02c7
2020-06-09 01:16:58 -04:00
Eric Newberry 6e262f0f1e interest: add signature fields
refs #4804

Change-Id: I4c8ecf65a3616833020d8edf8ba3d0c2d8427e87
2020-06-08 18:28:13 -07:00
Alexander Afanasyev 09236c2b8d security: Rename security/v2/* to security/*
Security v1-v2 transition has been completed for a while and path
separation is no longer needed. However, this commit preserves
`ndn::security::v2` namespace, but makes it inline.

Some commonly used v2 headers are preserved, but are deprecated and
should be avoided in the dependent software.

Change-Id: I26056cb3d34bcdc0a16e06dea8c1a78c03da2d40
2020-06-06 16:15:38 -04:00
Alexander Afanasyev f601e1988b security: Add check for success of TPM signing
Change-Id: I5c0fc958f4d359354391a30c62791e877052b97e
Refs: #4585, #5086
2020-06-03 12:47:36 -04:00
Alexander Afanasyev ab9d7ed25a security: Create PIB implementation as shared_ptr
While existing code is valid, it caused strange crashes on Android/ARM
platform.

Change-Id: I29c4879c65b3c844abb2d75f267c44a0b959a6f7
2020-05-30 18:34:19 -04:00
Alexander Afanasyev 3de8aac22d Rename VERSION to VERSION.info to avoid conflicts with modern STL
On case-insensitive file systems (e.g., macOS), inclusion of the new
standard <version> header resulted in unexpected inclusion of VERSION
file.

Change-Id: Ie858b8966496d23f38f722d8115be988e6b4d048
2020-05-30 18:14:45 -04:00
Eric Newberry f165bb4e77 signature-info: add signed Interest elements
refs #4804

Change-Id: Ice910b7740212cf116ddac24e12634877f75c71e
2020-05-29 00:21:48 -07:00
Eric Newberry 78ffc635cc security: clean up KeyChain and SigningInfo APIs
refs #4804

Change-Id: I55ad2b61f05aec8c75d5f6bafc4eea8e1e1100e9
2020-05-24 15:06:12 -07:00
Davide Pesavento 14c56cd8bd data: add shortcuts to access SignatureType and KeyLocator
Also, modernize the API of SignatureInfo and deprecate
unsetKeyLocator() and unsetValidityPeriod()

Change-Id: I8b775a4deb185784a3dcc8bd96c8f5f0c2915854
2020-05-24 13:16:25 -04:00
Junxiao Shi bc2e78e074 tools: export non-default key/cert in ndnsec export
refs #5043

Change-Id: Ida6e3c041b850a132160660a58d1f219defedf22
2020-05-20 15:01:08 -06:00
Eric Newberry a3c8bd1772 signature: deprecate Signature in favor of SignatureInfo
The Signature in Data packets and Certificates
has been deprecated in favor of separate objects
representing the Signature info and value.

Also deprecate type-specific Signature helpers.

refs #4804

Change-Id: Iab5b5c618e75cc11d31801d86a89a550a6add7a0
2020-05-17 17:30:40 -07:00
jrclark2 40ebaad603 util: add "in order" mode to SegmentFetcher
This commit adds an option for the fetcher to emit a signal when a segment
has arrived in order. Out-of-order segments are maintained internally by
the fetcher and are deleted when the signal is emitted.

Change-Id: I84aec680774af3e3c07bb07c881eab8908b5c9c2
2020-05-09 23:30:32 -04:00
Eric Newberry 3ad8923060 docs: remove invalid option from ndnsec-cert-gen example
Change-Id: I2d51474c8293fd45e1998a4ea39d9ba7de7964cb
2020-05-01 12:16:14 -04:00
Davide Pesavento 25d4f1c95e build: add PCHs for ndnsec and unit tests, fine-tune the existing ones
A full debug+tests build now takes 10% less time with gcc-9 and 21% less
with clang-10. Release builds (without tests) are only marginally faster
with gcc and 7% faster with clang.

Change-Id: I494778fe44cecc6209819a49f48a03f4d16c36af
2020-04-29 23:31:04 -04:00
Davide Pesavento 71c622bb68 build: require clang >= 4.0, Xcode >= 9.0
Also, recommend using gcc 7.4.0 or later, and silence
an ABI-related diagnostic message from gcc on armv7

Refs: #5087, #5106
Change-Id: I4d9841bea9df19cbb9ba3b0865949b1d66e6ec3e
2020-04-27 20:02:56 -04:00
Davide Pesavento 394977c2f2 tests: rename integrated -> integration
And move benchmarks to their own subdir

Change-Id: I23460e1135b47d505eacf0571ced1cbf810b7680
2020-04-26 00:29:04 -04:00
Junxiao Shi fbb6990abc security: encode EC public key with named curve
refs #5037

Change-Id: I5d77782e347579fe6dffb188a92178f592bcd492
2020-04-24 08:39:18 +00:00
Davide Pesavento 702467b816 tools: in ndnsec-key-gen, change default key type to ECDSA
Change-Id: Ib80da42d2969bb6288ee7949e6588c260476ef39
2020-04-22 21:41:23 -04:00
Zhiyi Zhang 4c68b6e62c tools: fix a bug in ndnsec-key-gen when --keyid is specified
Refs: #5057
Change-Id: Iaa29b7670d9cb85373d87cae0f0be377e7e65a1d
2020-04-22 21:40:03 -04:00
Davide Pesavento 78338c5ee8 build: recommend boost >= 1.65.1
With this commit, Ubuntu 16.04 is no longer officially supported
and may require manual installation of a newer version of Boost.

Refs: #5087
Change-Id: I17197f72ee8f7cd4d0954658fe57c324076f1311
2020-04-22 17:09:24 -04:00
Eric Newberry 9603325ba6 build: link against libatomic if necessary
refs #5100

Change-Id: Ida51c0830d3f0ce5ea949745b879a65b3e446111
2020-04-10 15:37:55 -07:00
Davide Pesavento ab7300b747 ci+docs: minor cleanups
Change-Id: I280fd84d89061e34ad4e2aaa00ce63ad21b03565
2020-04-09 21:48:06 -04:00
Eric Newberry 52a803cb9d transport: use /run/nfd.sock on Linux
refs #5039

Change-Id: Ia81115676427db1ebdf4d72d9aadf2e34e2f0ae6
2020-04-07 18:10:04 -07:00
Davide Pesavento 2349e28c6d build: add CentOS 8 support; drop CentOS 7
Refs: #5040, #5087
Change-Id: I6dcc5e9ee6b4839a6b3f15f1ad6dabf140301ae4
2020-03-26 17:56:05 -04:00
Davide Pesavento d776a93c9c build: switch to python3
Refs: #5095
Change-Id: Iedc107d41d4832682071986678b015980354786d
2020-03-23 22:55:23 -04:00
Eric Newberry ce9c1952ff mgmt: add MTU to FaceUpdateCommand
refs #5056

Change-Id: I53d64c869b45d3d582eefd50b8161d90aaf90705
2020-03-12 13:47:33 -07:00
Davide Pesavento 53533947d1 interest: refactor nonce handling
Nonce is a sequence of 4 bytes, not a 32-bit unsigned integer.
This also fixes various endianness bugs in unit tests.

Refs: #3294
Change-Id: I057b7b771fecb0bc997b0b11a03e6660c9b7a826
2020-03-09 01:50:37 -04:00
Davide Pesavento 97242f78e9 ci: update Travis configuration
* Add testing on arm64, ppc64le, and s390x with select compiler versions
 * Allow disabling the headers check by setting DISABLE_HEADERS_CHECK
 * Drop all versions of gcc < 7 and clang < 5
 * Add clang 11 (development branch)
 * Reenable ASan on Linux with gcc 9 and clang 7, the upstream
   bugs have been fixed; ASan on clang 8 remains disabled
 * Drop Xcode 9.2 (macOS 10.12 is no longer supported)
 * Upgrade Xcode 11 to 11.3
 * Remove USE_OPENSSL_1_1 and always build with openssl 1.1.1,
   since that's the only version available on Homebrew now
 * Workaround issue with missing /usr/local/opt/openssl on macOS
 * Various cleanups

Change-Id: I90e7d61d176b60c1e6b90d2374a7a51dd1deabb3
2020-02-29 20:56:32 -05:00
Davide Pesavento bc17d950e0 name: provide more fine-grained choices for UriFormat
Refs: #4777
Change-Id: I967a3b522cbe0719dfc95123bb75517518c74c72
2020-02-15 20:10:52 -05:00
Davide Pesavento d247d49469 face: remove deprecated PendingInterestId, InterestFilterId, RegisteredPrefixId
Plus some refactoring in Face::Impl

Refs: #4885
Change-Id: I5c46aaef35eb618d6f4934d4629c473c7fdde456
2020-02-13 11:55:13 -05:00
Eric Newberry 8d6d10ae53 docs: restructure and update AUTHORS.md
refs #5078

Change-Id: Iac341c29560b183066f7d1892359d262787655bd
2020-02-05 15:35:53 -08:00
Davide Pesavento 9c8f00e3fb util: delete unused field in SegmentFetcher
Change-Id: I341278fdb620dd531980050eb03b372f4dbd0147
2020-01-20 20:04:29 -05:00
Davide Pesavento 3b9a2c8b74 build: upgrade waf to version 2.0.19
Change-Id: Ifd57ed4e4a3039906a36f3a14f6e71e45167e44e
2020-01-13 19:25:26 -05:00