WebRTC客户端在opensslidentity上失败为webrtc制作证书

时间:2016-02-10 15:44:19

标签: android openssl webrtc


我正在使用WebRTC演示应用程序开发用于Android的webrtc客户端 虽然我使用org.webrtc库来开发客户端,但在运行自己的客户端时遇到了问题。

当我运行我的客户端时,下面是我得到的logcat(完整logcat的一部分)

2-10 18:32:49.260 7669-9530/org.appspot.apprtc I/libjingle: (opensslidentity.cc:47): Making key pair
02-10 18:32:49.261 7669-9531/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1127): Signaling thread JavaCallback
02-10 18:32:49.261 7669-9531/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
02-10 18:32:49.261 7669-9527/org.appspot.apprtc D/PCRTCClient: Peer connection factory created.
02-10 18:32:49.263 7669-9527/org.appspot.apprtc D/PCRTCClient: Create peer connection.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: PCConstraints: mandatory: [], optional: [DtlsSrtpKeyAgreement: true]
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: VideoConstraints: mandatory: [minWidth: 1280, maxWidth: 1280, minHeight: 720, maxHeight: 720, minFrameRate: 30, maxFrameRate: 30], optional: []
02-10 18:32:49.264 7669-9527/org.appspot.apprtc D/PCRTCClient: EGLContext: org.webrtc.EglBase14$Context@35e6316b
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1382): Set EGL context for HW encoding.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoEncoderFactory::SetEGLContext
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1391): Set EGL context for HW decoding.
02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext
02-10 18:32:49.265 7669-9527/org.appspot.apprtc A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9527 (Thread-13274)




当我运行WebRTC演示应用程序时,我得到以下logcat:

02-10 18:34:44.849 9621-10486/org.appspot.apprtc D/de.tavendo.autobahn.WebSocketConnection: WebSocket connection created.
02-10 18:34:44.850 9621-9621/org.appspot.apprtc D/CallRTCClient: Creating peer connection, delay=754ms
02-10 18:34:44.858 9621-9621/org.appspot.apprtc D/CallRTCClient: Creating OFFER...
02-10 18:34:45.031 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:88): Returning key pair
02-10 18:34:45.031 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:95): Making certificate for WebRTC
02-10 18:34:45.034 9621-10500/org.appspot.apprtc I/libjingle: (opensslidentity.cc:143): Returning certificate
02-10 18:34:45.035 9621-10500/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1123): Worker thread JavaCallback
02-10 18:34:45.035 9621-10500/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onWorkerThreadReady
02-10 18:34:45.037 9621-10501/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1127): Signaling thread JavaCallback
02-10 18:34:45.037 9621-10501/org.appspot.apprtc I/org.webrtc.Logging: PeerConnectionFactory: onSignalingThreadReady
02-10 18:34:45.037 9621-10498/org.appspot.apprtc D/PCRTCClient: Peer connection factory created.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/org.webrtc.Logging: MediaCodecVideoEncoder: Found target encoder for mime video/x-vnd.on2.vp8 : OMX.qcom.video.encoder.vp8. Color: 0x15
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: Create peer connection.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: PCConstraints: mandatory: [], optional: [DtlsSrtpKeyAgreement: true]
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: VideoConstraints: mandatory: [minWidth: 1280, maxWidth: 1280, minHeight: 720, maxHeight: 720], optional: []
02-10 18:34:45.040 9621-10498/org.appspot.apprtc D/PCRTCClient: EGLContext: org.webrtc.EglBase14$Context@322112a
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1382): Set EGL context for HW encoding.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoEncoderFactory::SetEGLContext
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/libjingle: (peerconnection_jni.cc:1391): Set EGL context for HW decoding.
02-10 18:34:45.040 9621-10498/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext




我的客户正在崩溃点

02-10 18:32:49.264 7669-9527/org.appspot.apprtc I/MediaCodecVideo: MediaCodecVideo: MediaCodecVideoDecoderFactory::SetEGLContext
02-10 18:32:49.265 7669-9527/org.appspot.apprtc A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 9527 (Thread-13274)

但WebRTC演示运行正常 我观察到的差异如下:
我的客户无法从logcat中看到opensslidentity certificate for WebRTC
我的客户被困在

2-10 18:32:49.260 7669-9530/org.appspot.apprtc I/libjingle: (opensslidentity.cc:47): Making key pair


但是,演示应用程序能够做到这一点。


我想知道为什么我的客户无法出示证书?

1 个答案:

答案 0 :(得分:0)

当我不使用Ice Server时,发生了这个问题。将Ice Server传递给PeerConnection后,该应用程序正常运行