feat(libwebrtc): implement the rtc::KeyParams constructor for ECDSA keys #15197
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15197"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-11-02T20:26:22Z.
What
Implements
rtc::KeyParams::KeyParams(KeyType)in libwebrtc forKT_ECDSA, the default key type. It threw and was declared without parameters.The module's WebRTC revision lies between M127 and M134, as recorded in the debt file. The constructor in
ssl_identity.cc(M127, M134) is the same at both, but thekRsaDefaultModSizeit stores forKT_RSAis 1024 at M127 and 2048 at M134.src/KeyParams.cppstarts with that file's WebRTC notice and the BSD licence.WebRtcKeyParamsis the 12-byte layout ofssl_identity.h: theKeyTypeand a union ofRSAParams(modulus size, public exponent) or theECCurve.KT_ECDSAstores type 1 andEC_NIST_P256(0).KT_RSAthrows throughNotImplemented_nid_no_patchuntil the revision is known.RTC_DCHECK_NOTREACHEDs and leaves the object unset.A null object throws. All three gaps are recorded as debt. It removes 1 export from the inventory.
Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.guest_webrtc_key_paramstest:KT_ECDSAwrites type 1 and curve 0 and leaves the rest of the union;KT_RSAthrowsstd::runtime_errorand types 2, 3, -1 andINT_MAXthrowstd::invalid_argument, all without touching the object; a null object throws.ctest -j16on head eef2dc5f99: 3596/3596 pass.check_conventions.py --base upstream/mainpasses.pr_overlap.py: no open pull request implements these functions. The shared lines are the pending-export count indocs/dev/debt/libwebrtc.mdand the source, test and declaration lists inCMakeLists.txtandApi.hpp.main4f41f4c375, head 67e08adb22, to resolve the conflicts on the sharedCMakeLists.txt,Export.cppand debt-file lines; both sides are kept and the debt count is recomputed fromExport.cpp. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfailed under that load, pass when run alone, andmain4f41f4c375passes all 3799 with-j16on the same machine.check_conventions.py --base upstream/mainpasses.TestRsaIsNotImplemented. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfail only when the suite runs as a background job here, and pass when run in the foreground on this head and onmain.check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)