130 Commits
Author SHA1 Message Date
Davide Pesavento 550d8c99ab build: require boost >= 1.71.0
Refs: #5276
Change-Id: I0f179707020fc6e0908af8aeb1d535ca3cd81410
2023-11-05 01:30:01 -04:00
Davide Pesavento 5686c51b87 build: decouple handling of boost libs not needed by libndn-cxx
Refs: #5210
Change-Id: Ia8e3d80dd92b5e8a7bd7d79ea811332220a883ed
2023-09-07 22:08:46 -04:00
Davide Pesavento c996742bad build: use python f-strings
Change-Id: I17695613bb737ac4ba297468c5859ceb18bfdf96
2023-09-07 22:04:34 -04:00
Davide Pesavento 47ce2eed3a Refactor and modernize namespace declarations
* Completely remove inline namespace v2
 * Flatten some unnecessarily deep namespace nesting
 * Move DummyClientFace, Segmenter, SegmentFetcher to namespace ndn
 * Move all unit tests to namespace ndn::tests

Change-Id: I8bcfcf9fd669936a3277d2d5d505f765b4b05742
2023-05-10 02:37:06 -04:00
Davide Pesavento a3651646a9 ndnsec: stop installing deprecated command aliases
Refs: #5163
Change-Id: Ia9f705529061a2ca2cb8bcbd1a9ef1d7a5ffae31
2023-04-10 21:33:54 -04:00
Davide Pesavento 187e9f99b2 Adopt more C++17 features throughout the codebase
Change-Id: I31af421d8a977ba2aae23afcda289ff53230897f
2023-03-23 23:28:27 -04:00
Davide Pesavento 80d671f996 security: dissolve private header security/impl/openssl.hpp
It no longer serves a purpose

Change-Id: Ic145460c139dbda969976644352fed3f44fd32ec
2022-06-13 21:47:23 -04:00
Davide Pesavento 58de07ae20 tools: relax restriction on KeyId component type in ndnsec key-gen
And add a similar check on the IssuerId in cert-gen

Change-Id: I6828287a8c2f97dacba3326f0579afc71d9c69a3
2022-06-13 21:35:22 -04:00
Davide Pesavento 9faf34bdf4 tools: use Unicode characters to draw the tree in ndnsec list
Change-Id: I8d7900f8b04e805504937362a6901234fbb068bd
2022-06-13 18:53:20 -04:00
Junxiao Shi 9ee770bdcd security: introduce KeyChain::makeCertificate
KeyChain::makeCertificate() captures a common routine of creating and
signing a certificate. Having it in the library allows deduplicating
similar code elsewhere.

Also add "find by certificate name" tests for CertificateCache and
TrustAnchorContainer.

refs #5112

Change-Id: I954587e1c03d6b372e3b4f04e702339d1ff1533e
2022-04-25 23:33:33 +00:00
Davide Pesavento 541a822ae6 build: raise minimum build requirements
* Make gcc 7.4 and boost 1.65.1 hard dependencies, both are
   available out-of-the-box on Ubuntu 18.04
 * Require Xcode 10 on macOS but recommend 11.3 or later
 * If using clang on non-Apple platforms, the minimum supported
   version is now 6.0

Change-Id: I79c84a266741c9a66655da4fd467fe0d8218e8f0
2022-03-08 21:09:01 -05:00
Davide Pesavento 258d51a6d8 encoding: make Block convertible to span
Change-Id: Idb501467d1c56b95e7fdb76acda63b919fe98f85
2022-03-08 18:52:34 -05:00
Davide Pesavento a3d809ea54 interest+data: convert to span
Update span-lite to commit 8f7935ff4e502ee023990d356d6578b8293eda74

Change-Id: I511bc3541e8ba683661bc69656e83088dd06e97a
2022-02-08 19:45:36 -05:00
Junxiao Shi 5bd6c643ee tools: remove HTTP download feature in ndnsec cert-install
refs #4506

Change-Id: Ia25547ac056cdcca1f2ca664bdef25a2381d96cd
2022-01-11 10:12:23 -08:00
Davide Pesavento 765abc9087 util: backport C++20 std::span and use it in various APIs
Implementation taken from span-lite by Martin Moene,
commit 337af6e23f6d3264136c16565546244da23159ba

Change-Id: Icfd0ba6841cbf6ef7870c31c881df940da9faf7e
2021-12-31 14:45:03 -05:00
Davide Pesavento 949075ab7b ndnsec: improve error reporting when loading a Certificate or SafeBag fails
Refs: #5164
Change-Id: I6f594a921bb063ad808f311d8ff978bf0f7d528d
2021-10-22 16:23:50 -04:00
Davide Pesavento 97157b4936 tools: deprecate old ndnsec command aliases
These are: ndnsec-certgen, ndnsec-dump-certificate,
ndnsec-install-cert, ndnsec-keygen, ndnsec-ls-identity

Change-Id: I0fbc65d2a08f8e7812fd7e62cf6618ffe62671de
2021-05-27 21:00:43 -04:00
Davide Pesavento f3089c3522 tools: replace most ndnsec shell wrappers with symlinks
Change-Id: I40488dddaaee13ee4391e906646b9f651b26c2de
2021-05-25 21:28:21 -04:00
Davide Pesavento f2cae616fa Drop unnecessary v2 namespace qualifications
Change-Id: I6358bac6860ca8f2e9cdbd00bb2a929e3af5b2da
2021-03-25 02:43:06 -04:00
Davide Pesavento 09904410ca Ensure all include guards start with "NDN_CXX_"
Change-Id: I530e862ef391db8a2f2d3aa6df0fd0e2f64ae5b6
2021-03-24 16:40:53 -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
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
Eric Newberry f165bb4e77 signature-info: add signed Interest elements
refs #4804

Change-Id: Ice910b7740212cf116ddac24e12634877f75c71e
2020-05-29 00:21:48 -07: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
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 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
Davide Pesavento b310efbdaa docs+ndnsec: improve description and parsing of command options, rewrite man pages
Replace custom redmine_issue extension with sphinx.ext.extlinks

Refs: #4907
Change-Id: Ib0cb94156ae4fc80cdcaf4c70d7c8d55c16fcbc3
2019-04-14 16:50:19 -04:00
Davide Pesavento fa995ac3d3 docs+tools: improve ndnsec help, error messages, and manual page
Exit with status code 2 on malformed command line

Refs: #3777
Change-Id: Id682a5d69c15c74cfa1903db38b5389936f5be58
2019-04-09 12:18:58 -04:00
Davide Pesavento 923ba4415f Replace all uses of BOOST_THROW_EXCEPTION with NDN_THROW
Refs: #4834
Change-Id: I1f9a614c83954873888d13c7b2b17a4fbff81058
2019-02-14 13:25:48 -05:00
Junxiao Shi 24c5a00073 impl: rename 'detail' to 'impl'
'impl' directory contains implementation-detail headers that are NOT
installed. 'detail' directory will be used for implementation-detail
headers that ARE installed.

refs #4782

Change-Id: I13428e032c93207753a6b856c693511c4fc3bbb8
2018-12-12 04:47:15 +00:00
Davide Pesavento 7e78064871 Change #include style
Header files are now always included with their path from the
project's root directory rather than the path relative to
the includer.

Change-Id: If39b8510eef8da00baf5fe88337c45dbdf8c766e
Refs: #3084
2018-12-08 16:03:34 -05:00
Davide Pesavento 1944281719 Rename 'src' directory to 'ndn-cxx'
Change-Id: I14394023680901a86977313ca87fb017333614dd
Refs: #3084
2018-11-23 18:27:19 -05:00
Alexander Afanasyev 634a62bb74 tools: Allow specifying passphrase for ndnsec import/export in command line
Change-Id: Ic389249e017df27b0246cdd1fcd3a1431607246b
Refs: #4633
2018-06-15 18:56:47 -04:00
Davide Pesavento 6d43393669 tools: fix compilation with Boost 1.67
Change-Id: I0f4bae23f26eca07044990ce6dd01da750cfb569
Refs: #4584
2018-04-17 21:30:09 -04:00
Alexander Afanasyev 5560fd40ae build: update waf to version 2.0.6
Cleanup in most build scripts

Change-Id: Ib024e95fb6f80e72b0c00e1dc8bb9300d6c5f191
2018-03-08 21:49:25 -05:00
Davide Pesavento 0f8308012b util: add literal operators for duration types
Change-Id: I007fa61c80e535c6e4b12e85a32eeeee62fecc3c
Refs: #4468
2018-01-18 21:23:05 -05:00
Zhiyi Zhang 457f09a1ae tools: Allow 'ndnsec key-gen' to customize KeyId
Change-Id: I9cf8f52ce49088808289fe98760e059cca8ce2ff
refs: #4294
2018-01-09 08:28:52 -08:00
Davide Pesavento 5afbb0b3dd util: switch to boost::asio::basic_waitable_timer
Change-Id: I2724befc86482adf84f59063e65509a116bb1b46
Refs: #4431
2018-01-06 12:21:22 -05:00
Davide Pesavento 5d0b0106df encoding: remove duplicate buf() and get() methods from Buffer class
Change-Id: If885d4199d6c9df9b9b46664c3641c9a14a77eab
2017-10-15 13:39:35 -04:00
Junxiao Shi 5759be36ad security: Identity/Key comparison operators
This commit adds ==, !=, and stream insertion operators to
Identity and Key types, so that `ndnsec list` can display
default identity and key properly.

Also, a missing assignment is added to `ndnsec list` routine.

refs #4085

Change-Id: I025af1d6281acb9e9261461520bbd74af53b811e
2017-10-15 10:38:42 -07:00
Junxiao Shi 478206eea1 tools: print correct certificate in ndnsec cert-dump
refs #4323

Change-Id: I28a044b79a461c58acb5855ac32e1bfb649edd56
2017-10-15 00:22:35 +00:00
Junxiao Shi 476200b785 tools: delete -p in ndnsec-export/import help
ndnsec-export and ndnsec-import man pages are also updated.

refs #4313

Change-Id: I1ba41123c5fb46f2e408da3d55dfe9bef56d5b27
2017-10-05 12:16:27 +00:00
Alexander Afanasyev 22ee089ada tools: Disable unnecessary confirmation during ndnsec-import
Change-Id: I75113483a343bbe06cf0af85a08695b0a9ae9aeb
Refs: #3644
2017-09-03 00:31:33 -04:00
Alexander Afanasyev 464da53017 tools: Fix bugs in cert-gen
Change-Id: I13ed1d71b4970166135e32e2196ac9c67ad60fd3
Refs: #4202
2017-09-02 13:04:11 -04:00
Davide Pesavento cdcde90588 Fix compilation with Boost 1.65.0
Change-Id: I6f56d6bf135d9c862b04cb086340301ee98ef0ed
Refs: #4256
2017-08-23 22:24:40 -04:00
Alexander Afanasyev 35109a19d0 tools: Convert ndnsec to v2::KeyChain
This commit removes the following tools:
- cert-revoke (wasn't working properly before and need a new
  design)
- set-acl (wasn't working before)
- dsk-gen (no longer makes sense with the new certificate naming
  conventions, new tools for creating derivative certificates will
  be created later)

This commit also fixes Bug #3644 causing import command to ask for
unnecessary password confirmation.

ndnsec main now catch all exceptions logs the extended message

Change-Id: Ib50e0994970020bcf0a1840aca6bc3942818094b
Refs: #3098, #3644
2017-06-07 19:14:15 -07:00
Alexander Afanasyev 82c359c10d tools: Refactor ndnsec tools and update code style
This commit also deletes unused (broken) `op-tool`

Change-Id: I6c45c293d9c22198efd9db8144e32097d73738e5
Refs: #3098
2017-05-25 15:13:24 -07:00
Alexander Afanasyev 80782e06cd **breaking change**: Switch Face and related classes to v2::KeyChain
security::v2::KeyChain is now exposed as ndn::KeyChain, which should
ensure that dependent code can be mostly compiled.  However, expect code
that explicitly uses the old KeyChain interface to be broken.

Change-Id: I7330d0250d92f3f0f2570ab6d0214ab3dfdd18cc
Refs: #3098
2017-05-25 15:09:50 -07:00