Kaiduan,
Unless I am missing something here, I really don't think just setting build_ssl=0 and use_openssl=1 is enough to actually properly compile with OpenSSL.
For one, use_openssl is already set to 1 by default and is really a misnomer since it really means use_boringssl (as opposed to NSS).
The problem here is subtle. BoringSSL seems to be "code-compatible" with OpenSSL but not ABI compatible. After investigation, it turns out that OpenSSL relies heavily on MACRO functions in its header files whereas BoringSSL actually defines proper functions.
What happens is that one cannot compile using the BorringSSL headers and then try to link with the "-lssl -lcrypto" OpenSSL libs without seeing a lot of unresolved symbols.
From my experience, the only way to compile webrtc with the OpenSSL headers is to set ssl_root to point to the OpenSSL includes directory.
That actually works great, but the WebRTC build sadly stops there and does not allow you to specify to use the external OpenSSL libs instead of the BoringSSL.
Because of this, I can build all the WebRTC libs, but I have to disable all the executables (unittests and examples) ans they still try to link with boringssl at the end of the day.
Even with build_ssl=0 it still seem to build it because of the transitive dependency via usrsctp (still depending on boringssl and not subject to the build_ssl=0).
It really would not be too hard for them to tweak the build a bit to allow for that. I'll see if I can submit a patch or something.
Hope this helps. Cheers. G.