-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: ber to der convertor #176
Conversation
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
==========================================
+ Coverage 89.32% 90.17% +0.84%
==========================================
Files 21 25 +4
Lines 1724 1934 +210
==========================================
+ Hits 1540 1744 +204
- Misses 149 153 +4
- Partials 35 37 +2 ☔ View full report in Codecov by Sentry. |
Is there any existing reliable timestamping (RFC 3161) library that we can use instead of creating and maintaining new one? |
Unfortunately, no for golang. |
@priteshbandi You may take a look at and assess digitorus/timestamp, which is based on digitorus/pkcs7. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finished 1st round of review: BER decoding
mainly, refactored a bit of the DFS logic to improve readability.
e3faa49
to
245358a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My 2nd round of review, the overall logic looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please separate package cms
to a new PR which depends on this PR. @JeyJeyGao
01f1b71
to
4a5ab40
Compare
created #181 for cms |
commit 9240650 Merge: 0c1ec3b 4198690 Author: Junjie Gao <[email protected]> Date: Wed Aug 9 17:07:34 2023 +0800 Merge pull request #1 from JeyJeyGao/feat/ans1 feat: convert BER to DER commit 4198690 Author: Junjie Gao <[email protected]> Date: Wed Aug 9 09:14:29 2023 +0800 fix: simplify code Signed-off-by: Junjie Gao <[email protected]> commit 75ce02d Author: Junjie Gao <[email protected]> Date: Mon Aug 7 20:33:08 2023 +0800 fix: added Conetent method for value interface Signed-off-by: Junjie Gao <[email protected]> commit 7b823a9 Author: Junjie Gao <[email protected]> Date: Mon Aug 7 08:54:37 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit 41ecec6 Author: Junjie Gao <[email protected]> Date: Sun Aug 6 17:33:19 2023 +0800 fix: remove recusive call for encode() Signed-off-by: Junjie Gao <[email protected]> commit 8f1a2af Author: Junjie Gao <[email protected]> Date: Fri Aug 4 13:40:09 2023 +0800 fix: remove unused value Signed-off-by: Junjie Gao <[email protected]> commit 9b6a0c5 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 20:25:22 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit 91a3691 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 20:11:28 2023 +0800 fix: create pointer instead of value to improve performance Signed-off-by: Junjie Gao <[email protected]> commit 1465e3e Author: Junjie Gao <[email protected]> Date: Thu Aug 3 20:04:44 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit 6524a9c Author: Junjie Gao <[email protected]> Date: Thu Aug 3 19:53:27 2023 +0800 fix: update variable naming Signed-off-by: Junjie Gao <[email protected]> commit 6cfbd9c Author: Junjie Gao <[email protected]> Date: Thu Aug 3 19:47:39 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit b9c73bd Author: Junjie Gao <[email protected]> Date: Thu Aug 3 17:56:52 2023 +0800 fix: update to use rawContent instead of expectedLen Signed-off-by: Junjie Gao <[email protected]> commit 3c99402 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:45:09 2023 +0800 fix: update comment Signed-off-by: Junjie Gao <[email protected]> commit f4dc95f Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:41:57 2023 +0800 fix: resolve comment Signed-off-by: Junjie Gao <[email protected]> commit f916316 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:40:37 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit 22afdf8 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:34:34 2023 +0800 fix: resolve comment Signed-off-by: Junjie Gao <[email protected]> commit edb729c Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:32:47 2023 +0800 fix: resolve comment Signed-off-by: Junjie Gao <[email protected]> commit a8ba0ff Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:26:29 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit bc18cae Author: Junjie Gao <[email protected]> Date: Thu Aug 3 16:14:57 2023 +0800 fix: resolve comments Signed-off-by: Junjie Gao <[email protected]> commit 643f388 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 09:17:39 2023 +0800 fix: update comment Signed-off-by: Junjie Gao <[email protected]> commit b5d5131 Author: Junjie Gao <[email protected]> Date: Thu Aug 3 09:15:23 2023 +0800 fix: expectedLen == 0 should continue Signed-off-by: Junjie Gao <[email protected]> commit 2345740 Author: Junjie Gao <[email protected]> Date: Wed Aug 2 13:01:38 2023 +0800 fix: added copyright Signed-off-by: Junjie Gao <[email protected]> commit 936ba2b Author: Junjie Gao <[email protected]> Date: Wed Aug 2 11:36:02 2023 +0800 fix: remove recusive decoding Signed-off-by: Junjie Gao <[email protected]> commit 4fd944a Author: Junjie Gao <[email protected]> Date: Tue Aug 1 21:50:10 2023 +0800 fix: remove readOnlySlice Signed-off-by: Junjie Gao <[email protected]> commit efa7575 Author: Junjie Gao <[email protected]> Date: Tue Aug 1 09:38:57 2023 +0800 fix: update decodeIdentifier function name Signed-off-by: Junjie Gao <[email protected]> commit cbce4c1 Author: Junjie Gao <[email protected]> Date: Tue Aug 1 09:25:34 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit 45480e5 Author: Junjie Gao <[email protected]> Date: Mon Jul 31 21:22:20 2023 +0800 fix: update code Signed-off-by: Junjie Gao <[email protected]> commit b3de155 Author: Junjie Gao <[email protected]> Date: Mon Jul 31 20:51:48 2023 +0800 fix: set non-exportable type Signed-off-by: Junjie Gao <[email protected]> commit 5dea9e5 Author: Junjie Gao <[email protected]> Date: Mon Jul 31 20:44:50 2023 +0800 feat: asn.1 first version Signed-off-by: Junjie Gao <[email protected]> Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
4a5ab40
to
5854500
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is the last round of my review. Overall LGTM.
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please create an issue to track adding unit tests
to the new lib (for example, primitive.go and constructed.go).
Signed-off-by: Junjie Gao <[email protected]>
Signed-off-by: Junjie Gao <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Migrated the PR to tspclient-go repo: notaryproject/tspclient-go#11
Feat:
Test:
Signed-off-by: Junjie Gao [email protected]