Use this function to get detailed information about the TLS connection associated with a particular request.
You pass this function the requestId for the request in question, and some optional extra parameters. It returns a Promise which will resolve to a SecurityInfo object.
You can only call this function from inside the webRequest.onHeadersReceived listener. The requestId can be found in the details object which is passed into the listener.
You must also pass the "blocking" option to webRequest.onHeadersReceived.addListener(). So to use this API you must have the "webRequestBlocking" API permission, as well as the normal permissions needed for using webRequest listeners (the "webRequest" permission and the host permission for the host).