RESOLVED FIXED 173541
RTCPeerConnection.generateCertificate is not a function
https://bugs.webkit.org/show_bug.cgi?id=173541
Summary RTCPeerConnection.generateCertificate is not a function
Tim Panton
Reported 2017-06-19 01:17:08 PDT
Current webRTC spec https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-generatecertificate has a function for generating certificates that can be re-used on subsequent webRTC calls to the same site. This provides some additional identity and security management options which we leverage. This function is missing in Safari technology preview 33. You can verify this bug by browsing to https://pi.pe/iot/fclaim.html and seeing that the javascript console contains the following error: TypeError: RTCPeerConnection.generateCertificate is not a function. (In 'RTCPeerConnection.generateCertificate(certParams)', 'RTCPeerConnection.generateCertificate' is undefined)
Attachments
Patch (49.33 KB, patch)
2018-10-11 10:01 PDT, youenn fablet
no flags
Patch (52.64 KB, patch)
2018-10-11 11:13 PDT, youenn fablet
no flags
Patch (52.99 KB, patch)
2018-10-11 15:25 PDT, youenn fablet
no flags
Archive of layout-test-results from ews107 for mac-sierra-wk2 (2.90 MB, application/zip)
2018-10-11 17:23 PDT, EWS Watchlist
no flags
Archive of layout-test-results from ews121 for ios-simulator-wk2 (2.30 MB, application/zip)
2018-10-11 18:50 PDT, EWS Watchlist
no flags
Patch for landing (53.88 KB, patch)
2018-10-11 20:44 PDT, youenn fablet
no flags
Rebasing (54.23 KB, patch)
2018-10-14 22:03 PDT, youenn fablet
no flags
Rebasing (51.27 KB, patch)
2018-10-15 09:52 PDT, youenn fablet
no flags
Rebasing (52.40 KB, patch)
2018-10-15 11:33 PDT, youenn fablet
no flags
Rebasing (52.57 KB, patch)
2018-10-15 12:27 PDT, youenn fablet
no flags
youenn fablet
Comment 1 2018-04-23 09:23:33 PDT
youenn fablet
Comment 2 2018-04-23 09:24:12 PDT
Note that generateCertificate should be complemented with persistent storage of certificates through IDB.
youenn fablet
Comment 3 2018-10-11 10:01:43 PDT
EWS Watchlist
Comment 4 2018-10-11 10:04:19 PDT
Attachment 352053 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:88: An else statement can be removed when the prior "if" concludes with a return, break, continue or goto statement. [readability/control_flow] [4] Total errors found: 4 in 28 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 5 2018-10-11 11:13:45 PDT
EWS Watchlist
Comment 6 2018-10-11 11:15:24 PDT
Attachment 352058 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 7 2018-10-11 15:25:22 PDT
EWS Watchlist
Comment 8 2018-10-11 15:28:16 PDT
Attachment 352093 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
EWS Watchlist
Comment 9 2018-10-11 17:23:21 PDT
Comment on attachment 352093 [details] Patch Attachment 352093 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/9543364 New failing tests: http/wpt/webrtc/generateCertificate.html
EWS Watchlist
Comment 10 2018-10-11 17:23:23 PDT
Created attachment 352110 [details] Archive of layout-test-results from ews107 for mac-sierra-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-sierra-wk2 Platform: Mac OS X 10.12.6
EWS Watchlist
Comment 11 2018-10-11 18:50:09 PDT
Comment on attachment 352093 [details] Patch Attachment 352093 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: https://webkit-queues.webkit.org/results/9544056 New failing tests: http/wpt/webrtc/generateCertificate.html
EWS Watchlist
Comment 12 2018-10-11 18:50:11 PDT
Created attachment 352120 [details] Archive of layout-test-results from ews121 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews121 Port: ios-simulator-wk2 Platform: Mac OS X 10.13.6
youenn fablet
Comment 13 2018-10-11 20:44:21 PDT
Created attachment 352133 [details] Patch for landing
EWS Watchlist
Comment 14 2018-10-11 20:47:16 PDT
Attachment 352133 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp:71: Omit int when using unsigned [runtime/unsigned] [1] Total errors found: 4 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 15 2018-10-14 22:03:59 PDT
Created attachment 352299 [details] Rebasing
EWS Watchlist
Comment 16 2018-10-14 22:05:43 PDT
Attachment 352299 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 17 2018-10-15 07:57:26 PDT
Comment on attachment 352299 [details] Rebasing Rejecting attachment 352299 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 352299, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Logging in as commit-queue@webkit.org... Fetching: https://bugs.webkit.org/attachment.cgi?id=352299&action=edit Fetching: https://bugs.webkit.org/show_bug.cgi?id=173541&ctype=xml&excludefield=attachmentdata Processing 1 patch from 1 bug. Processing patch 352299 from bug 173541. Fetching: https://bugs.webkit.org/attachment.cgi?id=352299 Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Parsed 29 diffs from patch file(s). patching file Source/ThirdParty/libwebrtc/ChangeLog patching file Source/WebCore/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOS.exp patching file Source/ThirdParty/libwebrtc/Configurations/libwebrtc.iOSsim.exp patching file Source/ThirdParty/libwebrtc/Configurations/libwebrtc.mac.exp patching file Source/WebCore/CMakeLists.txt Hunk #2 succeeded at 308 (offset 1 line). patching file Source/WebCore/DerivedSources.make Hunk #1 succeeded at 231 (offset 1 line). patching file Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp patching file Source/WebCore/Modules/mediastream/PeerConnectionBackend.h patching file Source/WebCore/Modules/mediastream/RTCCertificate.cpp patching file Source/WebCore/Modules/mediastream/RTCCertificate.h patching file Source/WebCore/Modules/mediastream/RTCCertificate.idl patching file Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp patching file Source/WebCore/Modules/mediastream/RTCPeerConnection.h patching file Source/WebCore/Modules/mediastream/RTCPeerConnection.idl patching file Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.cpp patching file Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCCertificateGenerator.h patching file Source/WebCore/Sources.txt Hunk #1 succeeded at 167 (offset 1 line). Hunk #2 succeeded at 184 (offset 1 line). Hunk #3 succeeded at 2882 (offset 2 lines). patching file Source/WebCore/WebCore.xcodeproj/project.pbxproj Hunk #1 succeeded at 7231 (offset 1 line). Hunk #2 succeeded at 15310 (offset 4 lines). Hunk #3 succeeded at 17107 (offset 4 lines). Hunk #4 FAILED at 27597. Hunk #5 FAILED at 27689. Hunk #6 FAILED at 27780. Hunk #7 FAILED at 28332. Hunk #8 FAILED at 30144. Hunk #9 FAILED at 31025. 6 out of 9 hunks FAILED -- saving rejects to file Source/WebCore/WebCore.xcodeproj/project.pbxproj.rej patching file Source/WebCore/bindings/js/WebCoreBuiltinNames.h Hunk #1 succeeded at 125 (offset 1 line). patching file Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.cpp patching file Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCProvider.h Hunk #1 succeeded at 47 (offset -1 lines). Hunk #2 succeeded at 112 (offset -1 lines). patching file LayoutTests/imported/w3c/ChangeLog Hunk #1 succeeded at 1 with fuzz 3. patching file LayoutTests/http/wpt/webrtc/generateCertificate-expected.txt patching file LayoutTests/http/wpt/webrtc/generateCertificate.html patching file LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCCertificate-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-generateCertificate-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/webrtc/interfaces.https-expected.txt patching file LayoutTests/imported/w3c/web-platform-tests/webrtc/rtcpeerconnection/rtcpeerconnection-constructor-expected.txt Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: https://webkit-queues.webkit.org/results/9582287
youenn fablet
Comment 18 2018-10-15 09:52:57 PDT
Created attachment 352332 [details] Rebasing
EWS Watchlist
Comment 19 2018-10-15 09:54:38 PDT
Attachment 352332 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 29 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 20 2018-10-15 10:24:41 PDT
Comment on attachment 352332 [details] Rebasing Rejecting attachment 352332 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.webkit.org', '--bot-id=webkit-cq-03', 'build', '--no-clean', '--no-update', '--build-style=release', '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 5000 characters of output: LL -DENABLE_VIDEO -DENABLE_VIDEO_PRESENTATION_MODE -DENABLE_VIDEO_TRACK -DENABLE_VIDEO_USES_ELEMENT_FULLSCREEN -DENABLE_WEB_AUDIO -DENABLE_WEB_AUTHN -DENABLE_WEB_RTC -DENABLE_WEBGL -DENABLE_WEBGL2 -DENABLE_WEBMETAL -DENABLE_WIRELESS_PLAYBACK_TARGET -DENABLE_XSLT -DBUILDING_WEBKIT -DU_DISABLE_RENAMING=1 -DU_SHOW_CPLUSPLUS_API=0 -DGL_SILENCE_DEPRECATION=1 -DGLES_SILENCE_DEPRECATION=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -fasm-blocks -fstrict-aliasing -Wdeprecated-declarations -Winvalid-offsetof -mmacosx-version-min=10.12 -g -fvisibility=hidden -fvisibility-inlines-hidden -fno-threadsafe-statics -Wno-sign-conversion -Winfinite-recursion -Wmove -iquote /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-generated-files.hmap -I/Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-own-target-headers.hmap -I/Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-all-target-headers.hmap -iquote /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/WebCore-project-headers.hmap -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/include -IPAL -IForwardingHeaders -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxslt -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/libxml2 -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/usr/local/include -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/usr/local/include/WebKitAdditions -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/local/include/WebKitAdditions -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/usr/local/include/webrtc -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/local/include/webrtc -I/Volumes/Data/EWS/WebKit/WebKitBuild/Release/usr/local/include/webrtc/sdk/objc/Framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/local/include/webrtc/sdk/objc/Framework/Headers -I/Volumes/Data/EWS/WebKit/Source/WebCore -I/Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/DerivedSources/x86_64 -I/Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/DerivedSources -Wall -Wextra -Wcast-qual -Wchar-subscripts -Wextra-tokens -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wpointer-arith -Wredundant-decls -Wundef -Wwrite-strings -Wexit-time-destructors -Wglobal-constructors -Wtautological-compare -Wimplicit-fallthrough -Wno-unknown-warning-option -F/Volumes/Data/EWS/WebKit/WebKitBuild/Release -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/PrivateFrameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks -isystem /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/System.framework/PrivateHeaders -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Carbon.framework/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks -iframework /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/Quartz.framework/Frameworks -include /Volumes/Data/EWS/WebKit/WebKitBuild/PrecompiledHeaders/WebCorePrefix-bttamgihfexolwdlczgjcnwpqezf/WebCorePrefix.h -MMD -MT dependencies -MF /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource135.d --serialize-diagnostics /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource135.dia -c /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource135.cpp -o /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource135.o ** BUILD FAILED ** The following build commands failed: CompileC /Volumes/Data/EWS/WebKit/WebKitBuild/WebCore.build/Release/WebCore.build/Objects-normal/x86_64/UnifiedSource132.o /Volumes/Data/EWS/WebKit/WebKitBuild/Release/DerivedSources/WebCore/unified-sources/UnifiedSource132.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler (1 failure) Full output: https://webkit-queues.webkit.org/results/9587173
youenn fablet
Comment 21 2018-10-15 11:33:43 PDT
Created attachment 352348 [details] Rebasing
EWS Watchlist
Comment 22 2018-10-15 11:36:46 PDT
Attachment 352348 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
youenn fablet
Comment 23 2018-10-15 12:27:23 PDT
Created attachment 352358 [details] Rebasing
EWS Watchlist
Comment 24 2018-10-15 12:29:58 PDT
Attachment 352358 [details] did not pass style-queue: ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:139: enum members should use InterCaps with an initial capital letter or initial 'k' for C-style enums. [readability/enum_casing] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:145: RSASSA_PKCS1_v1_5 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] ERROR: Source/WebCore/Modules/mediastream/PeerConnectionBackend.h:150: ECDSA_P256 is incorrectly named. Don't use underscores in your identifier names. [readability/naming/underscores] [4] Total errors found: 3 in 31 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Commit Bot
Comment 25 2018-10-15 13:52:21 PDT
Comment on attachment 352358 [details] Rebasing Clearing flags on attachment: 352358 Committed r237140: <https://trac.webkit.org/changeset/237140>
WebKit Commit Bot
Comment 26 2018-10-15 13:52:23 PDT
All reviewed patches have been landed. Closing bug.
Tim Panton
Comment 27 2018-10-26 03:18:43 PDT
The returned RTCCertificate isn't cloneable - which causes the following error when it is stored in indexedDb "Failed to store record in an IDBObjectStore: An object could not be cloned." Example/test page here https://pi.pe/p/genCertTest.html Tested in Release 68 (Safari 12.1, WebKit 14607.1.11) Tech preview
youenn fablet
Comment 28 2018-10-26 04:17:40 PDT
Tim, I am working on IDB support. In WebKit, we do that as a separate bug. Please file it if you can, otherwise I’ll do it. Thanks for the test page link! I’ll close this bug for now
Note You need to log in before you can comment on or make changes to this bug.