Skip to content
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

[wolfssl] Add feature flags dtls and secret-callback #33295

Merged
merged 13 commits into from
Nov 9, 2023

Conversation

laugengebaeck
Copy link
Contributor

This adds feature flags that enable DTLS and HAVE_SECRET_CALLBACK (to provide TLS keys for debugging) to the wolfssl port.

(Context: In eulynx-live/librasta, we use these two features of WolfSSL. We recently started migrating our dependency management to vcpkg and adding these features to the port would help us make the migration succeed).

  • Changes comply with the maintainer guide
  • SHA512s are updated for each updated download
  • The "supports" clause reflects platforms that may be fixed by this new version
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

@laugengebaeck
Copy link
Contributor Author

@microsoft-github-policy-service agree company="Systems Lab 21"

@laugengebaeck laugengebaeck marked this pull request as ready for review August 21, 2023 12:20
@jimwang118 jimwang118 added the category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist label Aug 22, 2023
@jimwang118
Copy link
Contributor

The following error occurred in the local test.

LINK Pass 1: command "C:\PROGRA~1\MICROS~4\2022\ENTERP~1\VC\Tools\MSVC\1436~1.325\bin\Hostx64\x64\link.exe CMakeFiles\wolfssl.dir\wolfcrypt\src\hmac.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\hash.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\cpuid.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\kdf.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\random.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\sha256.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\rsa.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\sp_int.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\aes.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\des3.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\sha.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\sha512.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\sha3.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\logging.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\wc_port.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\error.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\wc_encrypt.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\signature.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\wolfmath.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\memory.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\dh.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\asn.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\coding.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\poly1305.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\md5.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\pwdbased.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\pkcs12.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\chacha.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\chacha20_poly1305.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\integer.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\ecc.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\pkcs7.c.obj CMakeFiles\wolfssl.dir\src\internal.c.obj CMakeFiles\wolfssl.dir\src\wolfio.c.obj CMakeFiles\wolfssl.dir\src\keys.c.obj CMakeFiles\wolfssl.dir\src\ssl.c.obj CMakeFiles\wolfssl.dir\src\ocsp.c.obj CMakeFiles\wolfssl.dir\src\tls.c.obj CMakeFiles\wolfssl.dir\src\tls13.c.obj CMakeFiles\wolfssl.dir\src\crl.c.obj CMakeFiles\wolfssl.dir\wolfcrypt\src\cryptocb.c.obj /out:wolfssl.dll /implib:wolfssl.lib /pdb:wolfssl.pdb /dll /version:35.5 /machine:x64 /nologo /debug /INCREMENTAL ws2_32.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\wolfssl.dir/intermediate.manifest CMakeFiles\wolfssl.dir/manifest.res" failed (exit code 1120) with the following output:
   Creating library wolfssl.lib and object wolfssl.exp
internal.c.obj : error LNK2019: unresolved external symbol DoClientHelloStateless referenced in function DoClientHello
internal.c.obj : error LNK2019: unresolved external symbol DtlsResetState referenced in function DoClientHello
internal.c.obj : error LNK2019: unresolved external symbol DtlsIgnoreError referenced in function DoClientHello

internal.c.obj : error LNK2019: unresolved external symbol DtlsSetSeqNumForReply referenced in function DoClientHello

wolfssl.dll : fatal error LNK1120: 4 unresolved externals

ninja: build stopped: subcommand failed.

@laugengebaeck
Copy link
Contributor Author

@jimwang118 How can I reproduce this? For me, the build process seems to work fine.

@jimwang118
Copy link
Contributor

@jimwang118 How can I reproduce this? For me, the build process seems to work fine.

I use the command: .\vcpkg.exe install wolfssl[*]:x64-windows to install.

@laugengebaeck laugengebaeck marked this pull request as draft August 24, 2023 04:25
@laugengebaeck laugengebaeck marked this pull request as ready for review September 13, 2023 14:44
@laugengebaeck
Copy link
Contributor Author

@jimwang118 Thanks! I now identified and fixed the issue, so that Wolfssl should compile successfully on Windows. Could you review again, please?

@jimwang118
Copy link
Contributor

@jimwang118 Thanks! I now identified and fixed the issue, so that Wolfssl should compile successfully on Windows. Could you review again, please?

OK, please resolve the existing code conflicts and I will review the code as soon as possible.

@laugengebaeck
Copy link
Contributor Author

@jimwang118 Thanks! I now identified and fixed the issue, so that Wolfssl should compile successfully on Windows. Could you review again, please?

OK, please resolve the existing code conflicts and I will review the code as soon as possible.

Conflicts are now resolved.

@jimwang118
Copy link
Contributor

All features passed with following triplets:

x86-windows
x64-windows
x64-windows-static

Usage test pass with following triplets:

x86-windows
x64-windows
x64-windows-static

@jimwang118 jimwang118 added the info:reviewed Pull Request changes follow basic guidelines label Sep 15, 2023
ports/wolfssl/portfile.cmake Outdated Show resolved Hide resolved
@vicroms vicroms removed the info:reviewed Pull Request changes follow basic guidelines label Sep 18, 2023
@vicroms vicroms marked this pull request as draft September 18, 2023 17:20
@laugengebaeck laugengebaeck marked this pull request as ready for review October 19, 2023 09:11
@jimwang118
Copy link
Contributor

@laugengebaeck Please resolve code conflicts.

@laugengebaeck
Copy link
Contributor Author

@jimwang118 Conflicts are resolved now, please review.

@jimwang118 jimwang118 added the info:reviewed Pull Request changes follow basic guidelines label Nov 9, 2023
@JavierMatosD JavierMatosD merged commit 7c5a86f into microsoft:master Nov 9, 2023
15 checks passed
@laugengebaeck laugengebaeck deleted the wolfssl-feature-flags branch November 9, 2023 20:40
autoantwort pushed a commit to autoantwort/vcpkg that referenced this pull request Nov 10, 2023
…3295)

* wolfssl: add features `dtls` and `secret-callback`

* bump port version

* add missing cmake options for wolfssl

* update version database

* increment port version to resolve conflicts

* update version database

* fix newline

* update version database again

* set CMAKE_C_FLAGS using detected configuration

* update version database

* update version database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-feature The issue is with a library, which is requesting new capabilities that didn’t exist info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants