2382 Commits
Author SHA1 Message Date
Davide Pesavento 90795be569 encoding: remove obsolete TLV-TYPE definitions
Also, consolidate all types in a single enum

Change-Id: I55c9d10de21183e17590bd2f73b51ae8b7c84304
2022-11-30 16:26:52 -05:00
Davide Pesavento 576c21ba33 docs: delete certificate spec
Moved to the NDN-packet-spec repo
https://github.com/named-data/NDN-packet-spec/commit/3a74e134979606af9a2b90b12f141f8794ad96d7

Change-Id: I57aec08aeb553d5eb6c5a7c368ba03b904b1e4ed
2022-11-29 20:00:22 -05:00
Davide Pesavento ffddbbf745 encoding: recognize Ed25519 signature type
Refs: #5209
Change-Id: I96bcc7ac194ed6034a66580b0cdb7e95b3dd0c31
2022-11-21 16:33:47 -05:00
Davide Pesavento 09c064f1c5 Remove a few deprecated functions
Change-Id: I8f48aa0d084ffd1349750dfe04357ce900ab8dd6
2022-11-21 15:00:44 -05:00
Davide Pesavento b5e95f9106 ci: skip headers check in code-coverage jobs
Change-Id: I73f5cc04cc4b8bf69db66e690d9d4117239a0961
2022-11-20 20:16:06 -05:00
Davide Pesavento 83faec7308 ci: add Xcode 14.1
Change-Id: I5e809720778b9386f3bd37f74e3a270be340ea15
2022-11-14 19:44:41 -05:00
Davide Pesavento 017a9c066f util: add Segmenter utility class to segment an object
Refs: #5247
Change-Id: Ib0ebb0b24366b2d3c209e2ebe28ea2c62b42bff1
2022-11-05 00:22:25 -04:00
Davide Pesavento 5c4f376e05 Add more noexcept
Change-Id: Ifcb411b9c7cd562276df615db86c9dac3ede9afb
2022-10-31 14:25:25 -04:00
Davide Pesavento 8fbffe4577 mgmt: use new signed Interest format in nfd::Controller
Refs: #4804
Change-Id: I26640f0a0c5f2bceac431f9c7c3698f3d31d31e3
2022-10-13 18:44:08 -04:00
Davide Pesavento 637ea3b2a9 security: rename NO_SIGNATURE error code to MALFORMED_SIGNATURE
And move the documentation for all validation error codes to doxygen

Change-Id: Ibf4b507e3a544f2978192fbfad20cd7dc486818f
2022-10-05 23:33:35 -04:00
Davide Pesavento 2acce25696 security: various enhancements to Interest and Data validation
* Avoid decoding SignatureInfo multiple times while validating an Interest
 * Fix handling of signed Interests with malformed InterestSignatureInfo
 * Report a NO_SIGNATURE error when SignatureInfo is missing or malformed
 * Fail with POLICY_ERROR in ValidationPolicySimpleHierarchy when the
   signing identity violates the policy
 * Reduce code duplication
 * Expand unit test coverage

Change-Id: I1c9d532b2307d5df8f4bd75152af57a4e10835aa
2022-10-05 21:18:07 -04:00
Davide Pesavento ea5ce49651 build: link with lld if available
Change-Id: Iaf1e7110e629fa1fa16bbd8b8cc1418fafd2408b
2022-10-05 01:46:24 -04:00
Davide Pesavento e16ac8693f encoding: don't call flush() in OBufferStream if already closed
Refs: #5240
Change-Id: I48e2694657971960079c5b07b35102d32c316bc1
2022-10-05 01:44:11 -04:00
Davide Pesavento c860bd1ccb docs: fix capitalization in doxygen comments
Change-Id: Ie61b20a3dbfc847bc14523e507102fe6fe416908
2022-10-05 01:05:26 -04:00
Davide Pesavento 0f56226142 detail: update bundled copies of {optional,scope,span}-lite
optional-lite commit 5e4b7760aac85ea73a5b9b91c726fc36cbd4149b
scope-lite commit 8987f3f94121ce15e19a9b65e0078dc3cd6272d6
span-lite commit 0248244006ad3cf31b2430b6c93bd87277e46c03

Change-Id: Ib7b2570201d56847d92db178071431323bbac467
2022-10-02 16:07:46 -04:00
Davide Pesavento 05b56a8250 docs: restore exception handling in conf.py
Change-Id: Idee4dd5d60c07bdedb9aa262b58ec7424e5dbe60
2022-09-24 21:38:04 -04:00
Davide Pesavento 02bbfa7b0f docs: simplify conf.py and fix compatibility with upcoming Sphinx 6.0
Change-Id: I52415e37bcf237599aa5c4fa66605c34bc015626
2022-09-21 20:53:03 -04:00
Davide Pesavento 87208f964a security: cleanup validation error reporting
Change-Id: I313bedb336ecfb4180ba0f31ad77666544ba1c10
2022-08-31 16:05:03 -04:00
Davide Pesavento a821f59741 ci: refresh GitHub Actions matrix
* Add ubuntu-22.04, remove 18.04
 * Add macos-12, remove 10.15

Change-Id: Iffdf6b6ff25da8f62ca2bede821dcc9969475c7b
2022-08-11 00:21:43 -04:00
Davide Pesavento 73e946e2c8 ci: auto-detect the OS instead of relying on NODE_LABELS
And remove WAF_JOBS: waf already defaults to the number of available
CPUs, which is appropriate in most cases, and we can always use the
built-in JOBS variable to override it where necessary.

Change-Id: Ic5bfc2133b39407db3a075bb406eb288f01e0f2d
2022-08-10 22:45:04 -04:00
Davide Pesavento f662500858 build+ci: support macOS on arm64
Refs: #5135
Change-Id: Ifac57bf18dea805dc9eab06039806858bb3b6f20
2022-08-10 20:40:52 -04:00
Davide Pesavento dc3575fd92 Fix handling of --without-osx-keychain
Refs: #3338
Change-Id: Ib9f7ff94d7436d618c5e9055f59b71f1e41893d5
2022-07-30 21:10:34 -04:00
Davide Pesavento 134ed4832b util: remove unused ndn::any
Change-Id: I2fbd2f8c3f9277405d6cda170af2e739cfd10fa4
2022-07-21 23:16:23 -04:00
Davide Pesavento 2d7c585965 tests: run FaceUri canonization tests sequentially
Many of these tests issue DNS queries and it seems that Boost.Asio
performs only one resolution at a time (on a single io_service).
Therefore, parallelization is pointless and can in fact cause later
queries to spuriously timeout if those scheduled earlier take a long
time to finish.

Change-Id: I07e3dba5662626fd988ff0c7363f043319ee737d
2022-07-19 00:10:02 -04:00
Davide Pesavento fbca611095 ci+docs: support CentOS Stream 9, drop CentOS 8
Refs: #5181
Change-Id: I1d1a0ed02736ef5ec0c28d51f1c4f56f6e00d129
2022-07-04 15:47:32 -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
Davide Pesavento bbe7942288 security: refuse to create RSA keys longer than 16384 bits
RSA keys of this size are too slow to be usable in practice,
and OpenSSL rejects them.

Change-Id: Ia121d7cd0b0cbf4185bd1a317d69644ea1baba69
2022-06-07 18:41:44 -04:00
Davide Pesavento e30389c32a security: various simplifications in KeyChain
* Remove/consolidate redundant sanity checks
 * Use verifySignature() in importSafeBag()
 * Declare a few functions static
 * Expand unit test coverage

Change-Id: Ia676653b660a6e4093b9a60b32d7b7d756c5dd2b
2022-06-07 18:18:05 -04:00
Davide Pesavento 0e768ef03a security: avoid parsing PIB and TPM locators multiple times
Change-Id: I2a8831e03d05b499f1f8939e03ea88cb82005743
2022-05-19 21:03:38 -04:00
Davide Pesavento 8e2a61d357 security: return a span from Certificate::getPublicKey()
Also, tighten the FreshnessPeriod check in the constructor
and expand test coverage of various functions

Change-Id: I70837e20bbea8f1174baf2b252f39894e5346c34
2022-05-19 20:56:07 -04:00
Davide Pesavento 07db0733d9 security: tolerate invalid or unsupported public keys in PIB
Change-Id: I3c1dd9d3fe81d0895e2d1706f0b29a8e61940beb
2022-05-09 19:25:22 -04:00
Davide Pesavento 8618c1e026 security: consolidate creation of identities/keys in the respective containers
Change-Id: I754e5711fd95b97834dd2e9c0ab1830eaff4be35
2022-05-05 20:20:24 -04:00
Davide Pesavento 487e3d3c63 interest+data: add setSignatureValue() overload that takes a span
Change-Id: Ic6a55bf91e0d62760fb75a643cd7dbc1e92c31f2
2022-05-05 19:46:04 -04:00
Davide Pesavento 78ca8aeca0 security: modernize Key and KeyContainer; add logging
Change-Id: Ibbe6a4ea54e2a1cc7ad7a7e00ea88a29ab1f6c3d
2022-05-05 14:55:43 -04:00
Davide Pesavento b99c711a9f security: modernize CertificateContainer; add logging
Change-Id: I127a7eefb794c83787748999f10ffaeb6614f8b7
2022-05-05 14:53:07 -04:00
Davide Pesavento 56cc0d7c06 security: modernize Identity and IdentityContainer; add logging
Change-Id: I1c8645082456de4cc8012ac97a1b95ab1ddbf835
2022-05-05 14:51:48 -04:00
Davide Pesavento 1c62884f6b security: modernize Pib class and PIB backends
Change-Id: I02361ac4f628e2ca8b6f83fd0dfad4cb460cf028
2022-05-05 14:50:02 -04:00
Davide Pesavento 4999b2eddd security: reimplement RSA and EC key generation for OpenSSL 3.0
Also suppress deprecation warnings related to the RAND_METHOD API.

Refs: #5154
Change-Id: I977b902465f4e4cae663c21fbeda5ab808a6e66c
2022-04-28 14:53:28 -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 dd0724bd70 security: improve pretty-printing of certificates
Change-Id: Ib81a39bab35f3537df086d47d185907daaa1f426
2022-04-19 16:43:06 -04:00
Davide Pesavento 5b4b27f3b7 ci: require gcovr 5.1 for code coverage reports
Stop passing `-j`, it wasn't very useful and it's broken in gcovr 5.1

Change-Id: Ia3fbdbc98e345ed2b1aadbb1c826e4633d6aea6a
2022-04-19 16:31:03 -04:00
Davide Pesavento 85bd6998be interest: fix initialization of m_interestLifetime
Reported-by: Tyler Liu <tylerliu@g.ucla.edu>
Change-Id: I4d09dc2e64ee7b4d7274069340d26c188a76d7e7
2022-04-16 18:07:22 -04:00
Junxiao Shi 7d72868a2e security: include certificate name in KeyLocator
refs #5112

Change-Id: I0066b30ea48d8a51c66630aa186a372280eecd7f
2022-04-16 13:44:06 -07:00
Davide Pesavento 2f92b6ea7c name: add append() overload that takes a span
Refs: #5186
Change-Id: I5fa8ac6c5da82424ac0566d0a21f72b75082af2f
2022-04-11 00:45:08 -04:00
Davide Pesavento e727229400 name: make Component(const Block&) constructor explicit
Refs: #5186
Change-Id: I181c6a94f56ccedf2fa74027d9715187642f1f71
2022-04-10 23:09:05 -04:00
Davide Pesavento d6bcdbf67e name: remove deprecated append() overload
Refs: #5186
Change-Id: Id22935ef5aa8e766f0eadf1736ca460fc753c12f
2022-04-09 18:22:04 -04:00
Davide Pesavento 85be940ae9 encoding+security: remove deprecated functions
Replaced by span-based equivalents

Change-Id: Ie723aa8a84b5cd3cd7c58693a684547779560066
2022-04-09 15:35:06 -04:00
Alexander Afanasyev 5b06597e84 example: Squish one deprecation warning
Change-Id: I7aa36ae7b344fb6865c4b111ae69eab4aac4e0ca
2022-03-25 10:12:57 -07:00