100 Commits
Author SHA1 Message Date
Junxiao Shi 995c411ae4 Add initial Dockerfile
Change-Id: I8d9c5a0169a9550686179a5a6c6bfb3a79f54e36
2023-11-18 16:02:05 -05:00
Junxiao Shi ce442c4c95 meta-info: prevent FreshnessPeriod overflow
refs #4997

Change-Id: I22ae27257fd79b539a8ac137f8b1871e1b988cf8
2023-08-19 23:56:54 +00:00
Junxiao Shi 382de67df8 net: make FaceUri usable as container key
refs #4227

Change-Id: I4389fe6691ab2499c73e6ed83d4090b77fdbafca
2023-08-11 18:17:10 +00:00
Junxiao Shi 502c4c3bd6 security: avoid ValidityPeriod under/overflow
refs #5176

Change-Id: I15f2225ea727b205798db29d14ef49a7565eb82e
2023-07-24 11:09:27 +00: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
Junxiao Shi 7d72868a2e security: include certificate name in KeyLocator
refs #5112

Change-Id: I0066b30ea48d8a51c66630aa186a372280eecd7f
2022-04-16 13:44:06 -07:00
Junxiao Shi 0838f3dacc util: allow customizing FaceId in DummyClientFace
refs #5011

Change-Id: I0551ec55816f11bf3c05972c9a8bd6a3c4133310
2022-03-01 01:55:05 +00: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
Junxiao Shi e4603e1028 interest: update ForwardingHint format
Recognize and encode ForwardingHint as a sequence of Names.
The previous format with Delegations is still accepted for decoding, but
Preference field is ignored and no sorting is performed.

Delegation and DelegationList classes have been deleted.

refs #5187

Change-Id: I6f6f94020657b65c3fccb501694416dda24b894b
2022-01-10 18:35:31 -08:00
Junxiao Shi 58b9e0fdc9 security: ValidatorConfig rule should pass with at least one checker
refs #5145

Change-Id: Id4c70806f2da24453bb7ec50e88475bd742541d6
2021-03-18 15:54:07 -06:00
Junxiao Shi 5dc7560d5d security: accommodate certificate name in ValidatorConfig
refs #5142

Change-Id: Id282b05da8fdbf57c216f6282a5d6ecd24d867fe
2021-02-19 11:33:00 -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
Junxiao Shi fbb6990abc security: encode EC public key with named curve
refs #5037

Change-Id: I5d77782e347579fe6dffb188a92178f592bcd492
2020-04-24 08:39:18 +00:00
Junxiao Shi a39c0b5c48 name: select canonical vs alternate URI representation
refs #4777

Change-Id: Ic644593228bd155de9dcd7005e1b9dc5303a6e66
2019-12-31 15:13:15 -07:00
Junxiao Shi 43eac58ed6 lp: introduce PIT token
PIT token is a hop-by-hop header field that identifies an
Interest-Data exchange. The downstream node can assign an
opaque token to an outgoing Interest, and the upstream node
is expected to return the same token on the Data or Nack in
reply to that Interest. This would allow the downstream node
to accelerate its processing, especially in PIT lookup.

This commit adds basic encoding and decoding support for
PIT token, as an NDNLPv2 header field as well as a Tag.

refs #4532

Change-Id: I633fc451393746ebe199f41e44e245361b058d5e
2019-08-01 12:14:46 -06:00
Junxiao Shi 9a04ddacb9 docs: write CertificateV2 and SafeBag syntax in ABNF
refs #4928

Change-Id: I80d8a37f609bfbccb5f73f7e1f442c1b35061123
2019-07-04 12:53:54 -07:00
Junxiao Shi 2ad2fbeb20 interest: drop Selectors from matching functions
matchesData and matchesInterest only consider Name, CanBePrefix,
and MustBeFresh. matchesName is deprecated.

refs #4913

Change-Id: I6f29a98f09f1b6f97e379f4c7d74d9b18da75d0e
2019-05-24 03:11:06 +00:00
Junxiao Shi e7b90e5575 face: rework list structures
refs #3919

Change-Id: Ib734923ef5f701d733d5b0f915183f10434ce30b
2019-03-27 13:29:33 -06:00
Junxiao Shi a5f233e103 util: rename Scheduler::scheduleEvent to schedule
Deprecate Scheduler::scheduleEvent and Scheduler::cancelEvent

refs #4883

Change-Id: I2bb16922aff04300d92dfd276dd436958a96929a
2019-03-18 09:39:22 -06:00
Junxiao Shi e209961817 name-component: encode/decode Convention rev2
Naming Conventions rev2 encode sequence numbers, version
numbers, segment numbers, byte offsets, and timestamps as
typed name components.
Markers as defined in Naming Conventions rev1 are still
supported.

The library by default recognizes both styles, and encodes as
markers. These defaults can be changed via
ndn::name::setConventionDecoding and
ndn::name::setConventionEncoding functions.

"segment offset" is renamed to "byte offset". Functions bearing
"SegmentOffset" in the name are deprecated in favor of their
"ByteOffset" counterparts.

refs #4777

Change-Id: I265d69af474ab27d274ee49619f5cae5fb2c429d
2019-02-15 14:46:27 +00:00
Junxiao Shi 4fdcb274a3 face: deprecate Id types in favor of Handles
This includes:
PendingInterestId => PendingInterestHandle
RegisteredPrefixId => RegisteredPrefixHandle
InterestFilterId => InterestFilterHandle

refs #4316, #3919

Change-Id: I3a2d2f813d36a2d6edbb8c460aaa6e2e380f41e3
2019-02-11 15:05:46 -07:00
Junxiao Shi da9761f8e6 face: don't use memory address as PendingInterestId
Using memory address as PendingInterestId may cause false
removal of PendingInterest record if the memory allocator places
a different Interest at the same position in the heap.

refs #2865

Change-Id: Icf4d11509ad5c2acd56f180a333a68aa96f31768
2019-02-11 15:05:33 -07:00
Junxiao Shi 80609d44c3 face: scoped pending Interest
refs #4316

Change-Id: I79f832ce599f09a4d5bbf8cd8c4656d677dd164c
2019-01-29 18:15:22 +00:00
Junxiao Shi 07115cc106 util: reimplement scheduler::EventId with CancelHandle
<ndn-cxx/util/scheduler-scoped-event-id.hpp> header is deprecated.
It has been combined into <ndn-cxx/util/scheduler.hpp>.

Implicit conversion from nullptr to EventId is also deprecated.

refs #4698

Change-Id: I0310d41ac9638cb5be02ae61b887538f562541b2
2019-01-23 19:00:59 +00:00
Junxiao Shi c53df03ff3 lp: stop accepting NonNegativeInteger as sequence number
This commit also improves Lp/TestPacket/FieldAccess test case.

refs #4598

Change-Id: Iab480226da619a69bb5959c935c63f92d3bb3234
2019-01-14 23:33:25 +00:00
Junxiao Shi 60aaef0622 face: scoped Interest filter
refs #3919

Change-Id: I4e1aed63b2fabe463e9572b99bb3d97b278cabd6
2019-01-14 07:32:31 -08:00
Junxiao Shi ec475a7da5 face: scoped prefix registration
refs #3919

Change-Id: I858bf38000014a295cf853635b9c2a4275267d32
2019-01-13 21:53:55 +00:00
Junxiao Shi 19b87de693 detail: move cf-*-osx.hpp to 'detail'
refs #4782

Change-Id: Ie00846ea0afad65ff0e10fb615163318832f127e
2018-12-18 13:24:36 -07:00
Junxiao Shi 70d76eb4da transport: move Impl templates into 'detail'
refs #4782

Change-Id: I011ed5b75430d4235eccdbd5e1b9270ed413cc31
2018-12-18 13:15:43 -07:00
Junxiao Shi 1d23ff9277 detail: move asio-fwd to 'detail'
refs #4782

Change-Id: I9e39e3776669a2b3f69d7a964c0caf6333d1d79c
2018-12-17 13:21:08 -07:00
Junxiao Shi 1e36ceb0ff detail: move packet-base|tag-host.hpp to 'detail'
refs #4782

Change-Id: I3e2e95a1286703bd1fea9c1a7abee9684b2fbd08
2018-12-17 13:20:26 -07:00
Junxiao Shi d1fc9a7104 detail: move common.hpp to 'detail'
common.hpp and config.hpp are implementation details that should be
installed to target system.

common-pch.hpp is moved to 'impl'.

This commit also adds README.md to 'detail' and 'impl'
directories to explain their semantics.

refs #4782

Change-Id: I4f3e607338b3bdccbaddaed735f6326adcc2fda0
2018-12-12 16:35:34 +00: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
Junxiao Shi 946a51cc0e util: stop using ChildSelector in NotificationSubscriber
refs #4664

Change-Id: I9e6c39d49949f0b097c220eafbe4ce990549b54d
2018-11-24 00:25:57 +00:00
Junxiao Shi 8b753a2e54 interest+data: forbid unrecognized TLV before Name
Change-Id: Id052b02be0aa3e36064c40872cee37f9c8dd3a78
2018-10-24 01:51:40 +00:00
Junxiao Shi 1748b1e817 prefix-ann: provide ==, !=, << operators
Also, ensure toData() adds correct ContentType.

refs #4650

Change-Id: I60956948766190cd713b58c85ba30b3701180b25
2018-09-06 04:13:42 +00:00
Junxiao Shi 8127d1ab65 mgmt: encode and decode prefix announcement object
refs #4650

Change-Id: Ie8de492aac1ea9fd51ddc6b50f239913989abe72
2018-08-24 15:29:21 -06:00
Junxiao Shi 2b322eb8c6 encoding: provide _block literal operator
_block literal operator is moved from tests and becomes public API.

refs #4722

Change-Id: I07cc040af3c4288104b66f11d91830dc9f28835a
2018-08-24 10:43:27 -06:00
Junxiao Shi 426d500681 encoding: update number assignments
This commit declares:

* TLV-TYPEs for typed name components in NDN naming conventions
* SignatureType number for HMAC
* ContentType numbers for Prefix Announcement and FLIC

This commit also:

* Improves stream insertion operator for SignatureTypeValue
* Adds stream insertion operator for ContentTypeValue
* Corrects several references to certificate format spec

refs #4577, #4649

Change-Id: Ibfd5cc1408cf892e38a2be93bf17e76f628f255d
2018-08-23 10:52:29 +00:00
Junxiao Shi 4053bd525f name: recognize ParametersSha256DigestComponent
refs #4658, #4570

Change-Id: I8001f6aa7a406e9e8eb10fc365bd84bc711cda07
2018-08-16 13:39:25 -06:00
Junxiao Shi d2e6063788 name-component: recognize plain URI syntax
refs #4690

Change-Id: I6e88d88cc62a025edc30b545f1044a225c20213f
2018-08-10 10:48:44 -06:00
Junxiao Shi 68b5385cb0 docs: update code-style rule 2.24
This commit also updates existing code to use the new format.

refs #4681

Change-Id: I88e62a34fc55a69cd01d74e80a7000c6cf4d7c2d
2018-07-25 13:56:38 -06:00
Junxiao Shi cf0aff8a03 name: accommodate typed components in getSuccessor
refs #4570

Change-Id: I8dae1c983663f1d04fbb2e2b82d9fe1e9b4aabda
2018-07-23 06:42:13 -06:00
Junxiao Shi b55e5d39e2 interest: declare default CanBePrefix setting
refs #4581

Change-Id: I82de3b13c3010242fa7999a2564d4a5442dfd14b
2018-07-18 13:32:00 -06:00
Junxiao Shi 54d74c25a0 security: correct ValidationPolicy docs
refs #4390

Change-Id: I416f8773c9d52e0e7f61edb30d0476f9542fbf2b
2018-07-18 13:30:08 -06:00
Junxiao Shi 643b7f5ddf mgmt: use platform-independent counter type
refs #4229

Change-Id: I147205cceeb84dc7c36be9614f15a9e9a1c880f9
2018-07-18 13:29:42 -06:00
Junxiao Shi 5c1c444c6c security: Improve reliability of TPM BackEnd RandomKeyId test case
refs #4092

Change-Id: I58c6f3efbbbf31a826a7c41ede2494f0fbe313f1
2018-07-18 12:29:06 -07:00
Junxiao Shi 4c45fd8906 ims: correct inaccurate comment
refs #4657

Change-Id: I73cf070ac97be4b2beec094b2a8f8a05894c408b
2018-07-13 13:53:24 -04:00
Junxiao Shi 974b81aeed lp: encode sequence number as fixed-width integer
refs #4403

Change-Id: I37daeaf3d60dbaf81a8f38ec5deb72eea6dd89c2
2018-04-21 01:37:03 +00:00
Junxiao Shi 72c0c64751 encoding: provide FormattedOutputFunction for Block
refs #2225

Change-Id: Ie38539ff93293b3919789043b01e09b573fb619a
2018-04-20 15:41:09 +00:00
Junxiao Shi 9c9672e230 name: don't strip whitespace when parsing URI
refs #4560

Change-Id: I88d2ba28623b051929a50043c0a46e6a4c6ac7fb
2018-04-18 12:55:08 +00:00
Junxiao Shi 7d9039bef9 data: recognize Data in Packet Format v0.3
Data::wireDecode accepts both v0.2 and v0.3 formats,
but Data::wireEncode only encodes into v0.2 format.

refs #4568

Change-Id: I287d12c599f44d802a2a2cd2f13132c9f98a842a
2018-04-14 15:56:28 +00:00
Junxiao Shi 6efa3b7124 interest: recognize Interest in Packet Format v0.3
Interest::wireDecode accepts both v0.2 and v0.3 formats,
but Interest::wireEncode only encodes into v0.2 format.

refs #4527

Change-Id: I784b6f1d5c0d93db33155efddc0180359d8cab74
2018-04-14 15:54:08 +00:00
Junxiao Shi a2550a9d41 encoding: declare TLV-TYPE constants for Packet Format v0.3
refs #4527

Change-Id: I54a260971c6f3b82df53f5c387b132737f567a34
2018-04-10 05:07:48 +00:00
Junxiao Shi 3688d72de5 util: backport optional::reset
refs #3753

Change-Id: I17e77d7b7e3c450fc86aec06f5c2d3ecfcc1444a
2018-04-10 05:04:45 +00:00
Junxiao Shi 8d3f834c6c interest: deprecate selectors
NDN Packet Format v0.3 replaces Selectors with CanBePrefix
and MustBeFresh elements.
This commit deprecates getter/setter for Selectors in Interest
class. Getter/setter for CanBePrefix and MustBeFresh are mapped
to the closest v0.2 semantics and encoded as selectors.

refs #4527

Change-Id: Ie3d58d3d73f3bf1d8db3327943e6850a867465b0
2018-04-04 12:46:37 +00:00
Junxiao Shi a36f15d667 name: allow appending typed name components
This commit also adds test coverage for Name::isPrefixOf and
Name comparison operators.

refs #4526

Change-Id: I93996adb97408cbeec0a8b0fd06c3a12cbf5a78f
2018-04-04 02:22:12 +00:00
Junxiao Shi ebfe4a207f meta-info: allow typed name component in FinalBlockId
refs #4526

Change-Id: I3b6667928fa47c631e45ff5f0ca2c5030c5cc2ad
2018-04-01 23:53:40 +00:00
Junxiao Shi b849f61b6b util: give examples for NDN_CXX_DEPRECATED
refs #4566

Change-Id: Iaaebf31d52b9000d0e2ed279b4b8c9a69d0c399b
2018-04-01 23:52:54 +00:00
Junxiao Shi 4ffbb9d937 interest+exclude: rename NameComponent to GenericNameComponent
refs #4526

Change-Id: I8300f68b504ec959ca482759eaa4f7cbf566d729
2018-03-31 17:16:35 +00:00
Junxiao Shi cf4ac5b0c7 name-component: recognize typed name components
refs #4526

Change-Id: I9d32a5dc216c6b0921d181573a4e043fccc2814e
2018-03-28 22:46:06 +00:00
Junxiao Shi df5053824f mgmt: declare cs/erase command
refs #4318

Change-Id: If34ba8d55a4d46d53f552f4edd748623d4c0e55e
2018-03-04 13:40:49 +00:00
Junxiao Shi be86d989cd mgmt: fix CsInfo.Capacity decoding
refs #4050

Change-Id: Icc6d3cc45f1c7ea042b6c0a8c03d70e89852fcee
2018-02-07 14:20:29 +00:00
Junxiao Shi a7ab06d616 mgmt: add capacity and enablement flags to CsInfo
refs #4050

Change-Id: I9363f6735c6917591e0907b3d94f36d7263d10e7
2018-01-29 22:28:47 +00:00
Junxiao Shi 22f856821a mgmt: declare cs/config command
refs #4050

Change-Id: I779d425d0ca89750cf923c84009c19b37eecc9cf
2018-01-22 19:23:22 +00:00
Junxiao Shi 1534b3dab6 encoding: delete obsolete TLV-TYPE constants
This includes:

* SelectedDelegation
* security v1 KeyBag
* LocalControlFeature

refs #4055, #3098, #3755

Change-Id: I63e5ff423baccf698ec53838d41a0626d61bdf3b
2018-01-22 08:47:03 +00:00
Junxiao Shi 7f01247b5b mgmt: encode/decode CS Information Dataset
refs #4219

Change-Id: Ia51b455fc9b16f8f3c468de2847ced6d73a87bdc
2017-12-07 20:40:47 +00:00
Junxiao Shi b6828918cd face: Interest loopback
refs #3979

Change-Id: I6f65b30451939397975a7af40c59002e330afc25
2017-11-20 14:06:32 +00: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
Junxiao Shi b3d0a8ef7f util: add missing assignment in Regex test case
refs #4241

Change-Id: I1398f82851227e2793ac87fba1d6625c05023a3a
2017-10-01 12:43:01 -04:00
Junxiao Shi 859888f53e face: retain PendingInterest during Interest processing
When an incoming Interest matches multiple InterestFilters,
if one of them replies immediately, the PendingInterest
instance could be prematurely destructed and cause memory
access errors. This commit retains the PendingInterest with
a shared_ptr to avoid this bug.

refs #4228

Change-Id: I4767f294711edda3b75f8dfcac085ede88f3cdef
2017-09-12 14:29:16 +00:00
Junxiao Shi 79a7a16304 face: send Nack after every InterestCallback has responded
refs #4228

Change-Id: I3b1ef58c70d34c2099249216a3600efe01b79f71
2017-09-09 08:33:57 +00:00
Junxiao Shi f9b880ba42 transport: add logging to TcpTransport
refs #3563

Change-Id: I510ae330b0baa46c4101b26f0f8087b7424376a4
2017-09-08 13:05:06 +00:00
Junxiao Shi 605671de01 signature: disallow encoding invalid SignatureInfo
Also, check integer range when decoding SignatureInfo.

refs #3200

Change-Id: I1af4833211c9468ac7ecab48f7d0e88e9423b378
2017-08-26 13:41:06 +00:00
Junxiao Shi 1ad0b4bad3 face: insert pending Interest records for Interests from forwarder
refs #4228

Change-Id: Id039f62496c6289aec8a36964b25c1f25c52eda8
2017-08-25 14:01:22 -07:00
Junxiao Shi b38e6d49c0 util: ignore NextHopFaceId on Nack in DummyClientFace
refs #4224

Change-Id: Ic2e78eabc83fbeeea8283412c44b10a04c3acd86
2017-08-16 16:15:28 +00:00
Junxiao Shi 2bea5c4fe0 tests: revamp Face integrated tests
* Categorize tests into consumer, producer, IO routines.
* Split expressInterest tests.
* Add route toward null face when Interest timeout is expected.
* Merge similar setInterestFilter tests.
* Add test for oversized Data.
* Move InterestFilter-convert-to-Name test into unit tests.

refs #4031

Change-Id: I3356ae7fc9eec942ec7f2fb8b2277fa039464750
2017-08-14 20:10:32 +00:00
Junxiao Shi b6e276f277 face: move packet encoding to Impl class
Practical limit of packet size is now enforced on encoded
NDNLPv2 packets instead of network-layer packets.

If a packet exceeds size limit, the face throws a
Face::OversizedPacketError exception. Since packet encoding may
be asynchronous, this exception could be thrown by
Face::processEvents instead of Face::expressInterest and
Face::put.

refs #4228

Change-Id: Ib68cf80b3b8967fdd0ba040bd8ee595a0eff740e
2017-08-14 20:10:04 +00:00
Junxiao Shi 2ed9e07e2a face: pass processEvents duration by value
refs #3284

Change-Id: I146417f49c73fe93c6b38bb0dcd1b45bb949511f
2017-08-13 19:05:49 -04:00
Junxiao Shi 5c9ee28a15 encoding: disallow bool in Encoder::prependRange etc
bool type is no longer allowed in Encoder::prependRange,
Encoder::appendRange, and encoding::makeBinaryBlock.

refs #4225

Change-Id: I1b3b7d171e8c2baa04dc4ef4617de80e6220e586
2017-08-13 17:06:09 +00:00
Junxiao Shi 5174232342 Check integer range during decoding
This commit also moves ControlResponse test suite to the correct
place under mgmt/ instead of mgmt/nfd/.

refs #3200

Change-Id: I1a0578b3e68b8c36c84a6af03d0c47bebe598fe1
2017-08-13 17:04:52 +00:00
Junxiao Shi a9181d7bc8 signature: reorganize code
In SignatureInfo, Signature, and its subclasses:

* Improve Doxygen.
* Improve error messages.
* Make comparison operators non-member functions.

refs #4171

Change-Id: I9395a72594702255b41e3700ee145f35fc1a41f2
2017-08-13 16:47:45 +00:00
Junxiao Shi 5d75fd9473 mgmt: check enum range during decoding
This commit also makes use of prependStringBlock and readString
functions in encode/decode routines.

refs #3974

Change-Id: I86a4f16ea6f50fffeff72c8b416878740e65ef2a
2017-08-08 17:16:19 -04:00
Junxiao Shi d9153ce792 link: delete deprecated functions
refs #4055

Change-Id: I322debdbf55263d0de3208d8fa9eea2164737e86
2017-08-08 17:16:09 -04:00
Junxiao Shi 020123afed transport: add logging statements in UnixTransport
refs #3563

Change-Id: Id8fee87530fd8dded2b7d7471bea47b42915aeb1
2017-08-08 14:33:48 +00:00
Junxiao Shi 4460e82998 face: add logging statements in Face
refs #3563

Change-Id: Idd59a87badb1f05003f8a53802e13cec8d02b1ec
2017-08-07 22:02:45 +00:00
Junxiao Shi 9da07c5e01 encoding: reorganize block-helpers code
* Improve Doxygen.
* Declare 'extern template' where necessary.
* Simplify prependStringBlock and makeStringBlock.
* Move helpers of makeBinaryBlock into detail namespace.

refs #4171

Change-Id: Ib3f81a20297973115a2b6c53b1894233d6f98a9c
2017-08-06 16:59:31 +00:00
Junxiao Shi 7d3c14b3ae Refer to TLV-TYPE as "number" instead of "code"
refs #2880

Change-Id: Ie3bd9dc4cb5ca4c3f7aafeed37266adba88b82fb
2017-08-05 16:34:39 +00:00
Junxiao Shi d2777fa4ed encoding: optimize Block::encode
refs #4159

Change-Id: I1436e8211262d19195ac630b4c37c5d5c20b41ff
2017-07-27 18:35:34 +00:00
Junxiao Shi baab7325e2 tests: avoid misaligned memory access in InMemoryStorage test
refs #4191

Change-Id: I2b5255c70e07a36fdd6601f24e4468e3d8c00346
2017-07-27 10:30:10 -07:00
Junxiao Shi d701e5bebc interest: delete Link and SelectedDelegation fields
They have been replaced by ForwardingHint.

refs #4055

Change-Id: I1d5b5c0f4530af3d8ba2d9a624bb62cf341ccf39
2017-07-26 01:30:41 +00:00
Junxiao Shi 4f92d873c0 docs: amend code-style rule 3.4
refs #4203

Change-Id: Ic86e2326738723adf4b4132a535c4c747f3a3e74
2017-07-25 22:04:48 +00:00
Junxiao Shi 6938e3461b util: rename digest.hpp to sha256.hpp
The new file name matches the Sha256 class included within.

This commit also deletes deprecated crypto.hpp.

refs #3940

Change-Id: Ib9bbcd0ba087b812bb0886ceaea116689d4633f5
2017-07-25 21:56:58 +00:00
Junxiao Shi 9b845359f9 data: mark constructor explicit
refs #4164

Change-Id: I4c723606643d88abe48ea540a554b9ef36a59808
2017-07-24 05:04:56 +00:00
Junxiao Shi 81206d580d data: reorganize code and test cases
* Categorize class methods.
* Make comparison operators non-member functions.
* Improve Doxygen.
* Reorder test cases.
* Add test coverage for default constructor.
* Move Signature equality tests to TestSignature test suite.

refs #4171

Change-Id: Ib4f27fc8a9b56ce604363460279cfbaa4e1095f5
2017-07-23 12:43:22 +00:00
Junxiao Shi 760cc7b45f encoding: Block::fromStream properly handles TLV-LENGTH=0
Block::fromStream implementation is also optimized to reduce
memory copying.

refs #4180

Change-Id: I7cc073330b9ec4a9af4863db62e6c108d220066b
2017-07-22 19:17:49 +00:00
Junxiao Shi 2dd711d0a3 interest: setNonce resets wire buffer
Prior to this commit, Interest::setNonce overwrote part of the wire
buffer, which could lead to unexpected behavior: when two Interest
instances are sharing the same wire buffer, setting the Nonce on one
instance affects the other instance.

refs #4168

Change-Id: Ia90ed54d91845575504ca53071ea356e3854eba5
2017-07-21 13:40:52 +00:00
Junxiao Shi c542f63d03 ims: move InMemoryStorage from util/
refs #3940

Change-Id: I4468fe9b65ef6263a62800701eb6b03df28fa274
2017-07-18 14:20:32 +00:00