Closed HolgiHo closed 11 months ago
Moving comments to new PR.
I think a better function name would be workbook_add_signed_vba_project_signature(lxw_workbook self, const char vba_project, const char *signature).
Do you mean workbook_add_signed_vba_project (without "signature)?
Yes. workbook_add_signed_vba_project(lxw_workbook *self, const char *vba_project, const char *signature)
Hi, what about the falling jobs? Is there a misconfiguration of the container used for the workflows?
Thanks. The latest changes look good.
Let's deal with the PRs one at a time so that there isn't overlapping emails:
const *char
issuesctest
/unit test issuesFor this PR could you do the following:
dev/code_signing
directory. We can add it to the Python library instead.Note, the Valgrind CI test is failing but I think that is due to some changes in the GitHub Actions backend. I'll look into that separately.
Note, there is some trailing whitespace in places not covered by the indent
check. Could you remove those from the commit.
Hi, what about the falling jobs? Is there a misconfiguration of the container used for the workflows?
Don't worry about it. It is just something that has changed in the CI container. It was working last week and nothing in your PR would affect it. It happens periodically. I'll look into it separately.
Note, there is some trailing whitespace in places not covered by the
indent
check. Could you remove those from the commit.
Could you provide a hint where you found them? Also including the locations in the indent check would be a good idea ;-)
Could you provide a hint where you found them?
I just did a git show
on the commit. I have the color.ui=auto
option turned on so it shows trailing whitespace with a bright red square.
Also including the locations in the indent check would be a good idea ;-)
The trailing whitespaces are in the dox files and in the examples (which aren't checked/formatted by default to allow for some additional non-automatic formatting for instruction purposes).
I normally configure my editor(s) to remove trailing whitespace on save.
Believe it or not, VS has no option to delete trailing spaces :-( There is a plugin, but it isn't compatible with VS 2022.
I know how to squash multiple commits into one in a git repo, but what I don't know is: Do I need a new PR for this? I think I even need to create a new branch on the remote (or delete and re-create it), right?
Btw. if (!workbook->vba_project)
isn't even necessary anymore in packager.c
.
workbook_add_signed_vba_project
will never set workbook->vba_project_signature
when workbook->vba_project
is not set, so the test is redundant.
Merged. Thanks.
PR for issue #411, 2nd try.
Library changes:
workbook
: new API functionworkbook_add_vba_project_signature
packager
: copyvbaProjectSignature.bin
, createvbaProject.bin.rels
Tests:
test_macro_signed
Examples:
examples/macro_signed.c
examples/vbaProject.bin
: Was corrupted; now the button press works again; VBA project is signed by "VBA Code Signing"examples/vbaProjectSignature.bin
: The digitial signature, based on "VBA Code Signing" certificateUtilities for testing the VBA project is signed correctly:
dev/vba_code_signing
containing:certificate.pfx
that was used to sign the VBA project file. This certificate is self-signed and only for testing purposes. The password for the private key is "xlsxwriter". In reality, you would obtain a code signing certificate from an offical Certificate Authority. This process is usually quite complex and expensive.import_certificate.ps1
to installcertificate.pfx
on your computer to test the example VBA project is actually signed in Excel.