-
Notifications
You must be signed in to change notification settings - Fork 45
Refactor ec key import #229
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
Changes from 29 commits
f424086
d9ad56a
46b8cf8
9329072
04de02c
e1022e4
dfb363a
d55902c
33df892
cffe68d
0b6a6d3
21deb54
0e9cbd5
0330000
aa69808
04c33c9
398dca0
853480d
d1d2990
622aa13
07cc6a8
b9515f5
c35d64a
7b9a83d
ac70d69
efbb69e
cbd51fb
255dfd7
f05bd77
160e398
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| name: Code coverage check | ||
|
|
||
| on: | ||
| push: | ||
|
|
||
| env: | ||
| BUILDER_VERSION: v0.9.74 | ||
| BUILDER_SOURCE: releases | ||
| BUILDER_HOST: https://d19elf31gohf1l.cloudfront.net | ||
| PACKAGE_NAME: aws-c-cal | ||
| RUN: ${{ github.run_id }}-${{ github.run_number }} | ||
| CRT_CI_ROLE: ${{ secrets.CRT_CI_ROLE_ARN }} | ||
| AWS_DEFAULT_REGION: us-east-1 | ||
|
|
||
| permissions: | ||
| id-token: write # This is required for requesting the JWT | ||
|
|
||
| jobs: | ||
| codecov-linux: | ||
| runs-on: ubuntu-24.04 | ||
| steps: | ||
| - uses: aws-actions/configure-aws-credentials@v4 | ||
| with: | ||
| role-to-assume: ${{ env.CRT_CI_ROLE }} | ||
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
| - name: Checkout Sources | ||
| uses: actions/checkout@v4 | ||
| - name: Build ${{ env.PACKAGE_NAME }} + consumers | ||
| run: | | ||
| python3 -c "from urllib.request import urlretrieve; urlretrieve('${{ env.BUILDER_HOST }}/${{ env.BUILDER_SOURCE }}/${{ env.BUILDER_VERSION }}/builder.pyz?run=${{ env.RUN }}', 'builder')" | ||
| chmod a+x builder | ||
| ./builder build -p ${{ env.PACKAGE_NAME }} --compiler=gcc --cmake-extra=-DASSERT_LOCK_HELD=ON --coverage | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -400,6 +400,15 @@ struct aws_der_decoder *aws_der_decoder_new(struct aws_allocator *allocator, str | |
| return NULL; | ||
| } | ||
|
|
||
| struct aws_der_decoder *aws_der_decoder_nested_tlv_decoder(struct aws_der_decoder *decoder) { | ||
| struct aws_byte_cursor cursor; | ||
| AWS_ZERO_STRUCT(cursor); | ||
| if (aws_der_decoder_tlv_string(decoder, &cursor)) { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not familiar with the der decoder, but looks like this is only used once, and seems like a very specific case the nested der is a string type?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, this is a bit of unusual case. this is a helper to initialize a new decoder from a string at current location. we need it once now. there are more keys in the wild that have similar structure, so it might be helpful in general. |
||
| return NULL; | ||
| } | ||
| return aws_der_decoder_new(decoder->allocator, cursor); | ||
| } | ||
|
|
||
| void aws_der_decoder_destroy(struct aws_der_decoder *decoder) { | ||
| if (!decoder) { | ||
| return; | ||
|
|
@@ -467,6 +476,10 @@ bool aws_der_decoder_next(struct aws_der_decoder *decoder) { | |
| return (++decoder->tlv_idx < (int)decoder->tlvs.length); | ||
| } | ||
|
|
||
| void aws_der_decoder_reset(struct aws_der_decoder *decoder) { | ||
| decoder->tlv_idx = -1; | ||
| } | ||
|
|
||
| static struct der_tlv s_decoder_tlv(struct aws_der_decoder *decoder) { | ||
| AWS_FATAL_ASSERT(decoder->tlv_idx < (int)decoder->tlvs.length); | ||
| struct der_tlv tlv = {0}; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
This actually failed, but I didn't have the non-zero exit code in the builder...
Should be fixed by awslabs/aws-crt-builder#340
Also, I put the token in the secrete manager now, so it should work now.