https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232017-01-11T16:54:03ZNDN project issue tracking systemndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=180772017-01-11T16:54:03ZAlex Afanasyev
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Code review</i></li><li><strong>Assignee</strong> set to <i>Alex Afanasyev</i></li><li><strong>Start date</strong> set to <i>01/11/2017</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>50</i></li></ul><p>I plan to fix only issue in v2::KeyChain, keeping this issue as a reminder of the problem. We probably should fix implementation of <code>toIsoString</code> by avoiding conversion to <code>posix_time</code>, but it is not critical.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=180792017-01-12T07:51:34ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>New</i></li><li><strong>Assignee</strong> deleted (<del><i>Alex Afanasyev</i></del>)</li></ul><p><a href="https://gerrit.named-data.net/3570">https://gerrit.named-data.net/3570</a> is merely a workaround in <code>v2::KeyChain</code>, not a solution of this bug. Thus returning to New state.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=188242017-04-04T04:07:20ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Code review</i></li><li><strong>Assignee</strong> set to <i>Junxiao Shi</i></li></ul><p>The overflow occurs when <code>boost::posix_time::from_time_t</code> <a href="https://github.com/boostorg/date_time/blob/818dea52f3f0c8b4f5172df13c5fa4f57340625f/include/boost/date_time/posix_time/conversion.hpp#L29" class="external">constructs <code>seconds</code></a>.<br>
<a href="https://gerrit.named-data.net/3820">https://gerrit.named-data.net/3820</a> emulates <code>boost::posix_time::from_time_t</code> but constructs <code>boost::posix_time::time_duration</code> with separate hour and microsecond/nanosecond arguments, and neither would overflow in 489967 years.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=188392017-04-04T23:14:52ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=189122017-04-19T10:45:55ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>In Progress</i></li></ul><p>The change breaks ndns <code>ManagementTool/ListZone</code> test case.<br>
<a href="https://github.com/named-data/ndns/blob/9d110cefc228a5b32c39766ca72226124b527eea/tests/unit/mgmt/management-tool.cpp#L833" class="external">Expected</a>: <code>NotAfter: 20380119T031408</code>.<br>
<a href="https://travis-ci.org/yoursunny/ndn-cxx-breaks/jobs/223649300#L1876" class="external">Actual</a>: <code>NotAfter: 19011213T204552</code>.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=189242017-04-19T17:44:23ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Feedback</i></li></ul><p>The ndns test failure is actually a ndn-cxx problem. <code>ndnsec cert-dump -p</code> is showing the same, and <code>cert.getNotAfter()</code> returns <code>-2147483648000000000 nanoseconds since Jan 1, 1970</code>.</p>
<pre><code>vagrant@m0212:~/ndns$ HOME=tests/unit/mgmt ndnsec cert-dump -p /ndns-test/KEY/dsk-1416974006659/ID-CERT/%FD%00%00%01I%EA%3Bz%0E
Certificate name:
/ndns-test/KEY/dsk-1416974006659/ID-CERT/%FD%00%00%01I%EA%3Bz%0E
Validity:
NotBefore: 19700101T000000
NotAfter: 19011213T204552
Subject Description:
2.5.4.41: /ndns-test
Public key bits: (RSA)
MIIBIDANBgkqhkiG9w0BAQEFAAOCAQ0AMIIBCAKCAQEAyBVC+xc/JpscSE/JdxbV
pvgrh/fokNFI/2t9D5inuIFr7cc4W+LyJ4GG1xr9olMx7MHamJU1Xg3VunjhSjL8
mOaeXlbS6gxWexBCtNK6U4euPB4wks/gMIKdp24mAAFb4T+mBfjcRgR+NdrjyO5C
2OqM8qbDZmD/iuEmE6GPXnuMS0o6s13yzMj9YfDh3Df2jZnHESZcmG5Qpgg22T58
7t7bRx8Ha2EC3hb29AeYKwgEKDx8JH8ZBJ80AQP321HbyjXWshJLomzy5SJZo9nA
bZOYlZPCQkomz92Zc9+kpLNQwDvtRLwkZ46B+b2JpKTFARbnvugONCEBuG6zNgoi
EQIB
Signature Information:
Signature Type: SignatureSha256WithRsa
Key Locator: (Name) /ndns-test/KEY/ksk-1416974006577/ID-CERT
</code></pre>
<p>Regenerating <code>tests/unit/mgmt/.ndn</code> does not help.<br>
Given this problem is within <code>ndn::security::v1::IdentityCertificate</code> which is deprecated, I won't further investigate.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=204812017-09-06T23:59:01ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>50</i> to <i>100</i></li></ul><p><code>ndn::security::v1::IdentityCertificate</code> is gone.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=204922017-09-07T08:12:35ZAlex Afanasyev
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Feedback</i></li></ul><p>Even though v1 security is gone, the same issue applies to v2 as well. We use exactly the same mechanism in ValidityPeriod.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=206892017-09-30T05:39:30ZJunxiao Shi
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-2 priority-default closed" href="/issues/4315">Bug #4315</a>: ndnsec cert-gen: not-before cannot be later than not-after</i> added</li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=206902017-09-30T05:40:45ZJunxiao Shi
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Closed</i></li></ul><p>Problem with <code>ValidityPeriod</code> is split to <a class="issue tracker-1 status-5 priority-2 priority-default closed" title="Bug: ndnsec cert-gen: not-before cannot be later than not-after (Closed)" href="https://redmine.named-data.net/issues/4315">#4315</a>. It is not caused by <code>time::toIsoString</code> that is already covered by test cases, so this issue is closed.</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220332018-01-25T15:07:31ZAlex Afanasyev
<ul><li><strong>Status</strong> changed from <i>Closed</i> to <i>Feedback</i></li><li><strong>Target version</strong> changed from <i>v0.6</i> to <i>v0.7</i></li></ul><p>Older version of boost still have this issue (at least combination of boost 1.58/Ubuntu 16.04).</p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220342018-01-25T15:29:47ZAlex Afanasyev
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-2 priority-default closed" href="/issues/4478">Bug #4478</a>: time::fromIsoString doesn't decode large dates</i> added</li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220582018-01-26T15:30:58ZDavide Pesavento
<ul><li><strong>Category</strong> changed from <i>Base</i> to <i>Utils</i></li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220642018-01-27T21:39:24ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>Feedback</i> to <i>Code review</i></li></ul><p><code>time::toString()</code> has the same problem. Fixed in <a href="https://gerrit.named-data.net/4482">https://gerrit.named-data.net/4482</a></p>
ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220652018-01-27T21:40:41ZDavide Pesavento
<ul><li><strong>Subject</strong> changed from <i>Unexpected result of time::toIsoString for large dates</i> to <i>time::toIsoString and time::toString overflow with large dates</i></li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=220732018-01-28T17:47:18ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul> ndn-cxx - Bug #3915: time::toIsoString and time::toString overflow with large dateshttps://redmine.named-data.net/issues/3915?journal_id=276052022-04-19T08:11:35ZJunxiao Shi
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-2 priority-default closed" href="/issues/5176">Bug #5176</a>: ValidityPeriod.NotAfter=99991231T235959 misinterpreted</i> added</li></ul>