Davide Pesavento
49e1e87b24
Replace Boost.MPL with Mp11
...
Change-Id: I9e0f3cd0169a733f602ff5fc1457f63d6499387d
2023-11-11 00:45:23 -05:00
Davide Pesavento
2f46d6543e
Avoid deprecated Boost.Asio interfaces
...
Change-Id: I00d285893ff61619f49dff8a8a55d0d0e2c309a7
2023-11-10 17:40:43 -05:00
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
fffdd62715
Use Boost.Operators in more places
...
Change-Id: I7024c3e7d4c30c99ec7a895d484f227cb60fb356
2023-08-28 22:50:43 -04:00
Junxiao Shi
ce442c4c95
meta-info: prevent FreshnessPeriod overflow
...
refs #4997
Change-Id: I22ae27257fd79b539a8ac137f8b1871e1b988cf8
2023-08-19 23:56:54 +00:00
Davide Pesavento
9404892918
interest: improve code readability
...
And add more tests for decoding of malformed ForwardingHint
Change-Id: Ie7b043911769a0952300aa412fe7dbb893a464aa
2023-08-11 22:10:08 -04:00
Junxiao Shi
382de67df8
net: make FaceUri usable as container key
...
refs #4227
Change-Id: I4389fe6691ab2499c73e6ed83d4090b77fdbafca
2023-08-11 18:17:10 +00:00
Alexander Afanasyev
0af48fb516
interest: Match data to Interest regardless of FreshnessPeriod/MustBeFresh
...
When Data is received from the wire it should match Interest with
MustBeFresh even if the Data packet doesn't specify FreshnessPeriod.
Refs: #5270
Change-Id: I2ce4d23062f6346ebcd54e2e3e6e5de5a927e516
2023-08-09 12:26:59 -04:00
Junxiao Shi
502c4c3bd6
security: avoid ValidityPeriod under/overflow
...
refs #5176
Change-Id: I15f2225ea727b205798db29d14ef49a7565eb82e
2023-07-24 11:09:27 +00:00
Varun Patil
f81de71486
security: make HMAC compatible with OpenSSL 3
...
This is a temporary workaround until the internals
can be restructured to use EVP_MAC
Refs: #5251
Change-Id: I28854177a066a753a5cbacad591ee55f5c137622
2023-07-23 14:25:03 -07:00
Davide Pesavento
67bc114aa8
util: generalize and simplify time::{to,from}UnixTimestamp()
...
Change-Id: I1dc94365944b8efc03f32919d32d5df0a652b672
2023-05-15 21:48:43 -04:00
Davide Pesavento
296c3a185d
interest+data: add string_view overloads for convenience
...
Also, explicitly declare the nullptr_t overloads as deleted, so that
users get a clear compilation error instead of a potentially confusing
"ambiguous overload" if they try to pass nullptr to these functions.
Change-Id: I399efcbd698a0d3f7e29219d21eb1a53a1d71070
2023-05-10 22:56:48 -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
21b7f1b379
encoding+lp+net: simplify with if constexpr
...
Change-Id: Ie2b45a502c59e5cb7181628e691f7aaaf7509d84
2023-04-28 23:21:02 -04:00
Davide Pesavento
152ef44da9
Move BOOST_CONCEPT_ASSERT to unit tests where possible
...
Change-Id: I0c6ae494eb7be4ab2ff422ba6d866ead9e75f4eb
2023-04-22 02:02:29 -04:00
Davide Pesavento
3fdb02f62e
Use std::string_view in several APIs
...
Change-Id: I2c13b229162b247738cbf46d6bf71fc69d45816f
2023-04-14 04:05:08 -04:00
Davide Pesavento
0910343957
mgmt: simplify StatusDataset implementation
...
Change-Id: Icf21cfd8bc47333461dadd06c347b723e77f5784
2023-03-27 19:41:15 -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
eb87c28200
detail: stop importing std::function into ndn namespace
...
Change-Id: I536774e974627abbf4e8b868ebb948b90ea5d4a6
2023-03-15 21:07:02 -04:00
Davide Pesavento
05ec0be21b
Use inline on all namespace-scope constants defined in headers
...
Change-Id: Ia6e68d3fe572f6c15978c77a646ac599fa47e575
2023-03-14 21:36:01 -04:00
Davide Pesavento
f6b458930f
util: remove ndn::optional, use std::optional directly
...
Change-Id: I503e8f250e80e0ff7708070effc2e84e3b38b3b7
2023-03-13 15:12:06 -04:00
Davide Pesavento
fcd3e44028
build: switch to C++17
...
Change-Id: I92039300ce845de0312dceccb94c128229ed60c4
2023-03-10 18:44:11 -05:00
Davide Pesavento
d09d52bdfa
tests: fix dangling-reference warning with gcc 13
...
Change-Id: I73531e291d9b3146f3778c21a262d328d98eb26b
2023-02-15 14:15:06 -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
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
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
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
87208f964a
security: cleanup validation error reporting
...
Change-Id: I313bedb336ecfb4180ba0f31ad77666544ba1c10
2022-08-31 16:05:03 -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
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
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
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