From c6e584c20129f8745e6fc9170a220eb58e13e172 Mon Sep 17 00:00:00 2001 From: "dilmah@chromium.org" Date: Wed, 18 May 2011 11:58:44 +0000 Subject: Private API for extensions like ssh-client that need access to websocket-to-tcp proxy. Access to TCP is obtained in following way: (1) extension requests authentication token via call to private API like: chrome.webSocketProxyPrivate.getPassportForTCP('netbsd.org', 25, callback); if API validates this request then extension obtains some string token (in callback). (2) open websocket connection to local websocket-to-tcp proxy ws://127.0.0.1:10101/tcpproxy (3) pass header containing hostname, port and token obtained at step (1) (4) communicate (in base64 encoding at this moment). Proxy (running in chrome process) verifies those tokens by calls to InternalAuthVerification::VerifyPassport Passports are one-time; no passport can be reused. Passports expire in short period of time (20 seconds). BUG=chromium-os:9667 TEST=unit_test,apitest Review URL: http://codereview.chromium.org/6683060 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85757 0039d316-1c4b-4281-b951-d872f2087c98 --- crypto/hmac_nss.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crypto/hmac_nss.cc') diff --git a/crypto/hmac_nss.cc b/crypto/hmac_nss.cc index 957f9db..722fcf1 100644 --- a/crypto/hmac_nss.cc +++ b/crypto/hmac_nss.cc @@ -75,7 +75,7 @@ bool HMAC::Init(const unsigned char *key, int key_length) { bool HMAC::Sign(const std::string& data, unsigned char* digest, - int digest_length) { + int digest_length) const { if (!plat_->sym_key_.get()) { // Init has not been called before Sign. NOTREACHED(); -- cgit v1.1