The test program below shows an I/O error for Pike 8.1, and it shows Result "{\n" " "error": "invalid_grant",\n" " "error_description": "Invalid JWT: Token must be a short-lived token (60 minutes) and in a reasonable timeframe. Check your iat and exp values and use a clock with skew to account for clock differences between systems."\n" "}" (which is correct) for Pike 8.0.
int main(int argc, array(string) argv) { Protocols.HTTP.Query q; q = Protocols.HTTP.do_method("POST", "https://www.googleapis.com/oauth2/v4/token", 0, ([ "user-agent":"Mozilla 4.0 (Pike OAuth2 Client 1.0)", "content-type":"application/x-www-form-urlencoded", ]), 0, "grant_type=urn%3Aietf%3Aparams%3Aoauth%3Agrant-type%3Ajwt-bearer&" "assertion=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NTgyMT" "A3ODIsInNjb3BlIjoiaHR0cHM6Ly93d3cuZ29vZ2xlYXBpcy5jb20vYXV0aC9jb21" "wdXRlLnJlYWRvbmx5IiwianRpIjoiYzA3YjM5MDUtNjQ4MC00YjI0LTgyYWMtNzJi" "M2U5MzE3NDE4IiwiaWF0IjoxNTU4MjA3MTgyLCJhdWQiOiJodHRwczovL3d3dy5nb" "29nbGVhcGlzLmNvbS9vYXV0aDIvdjQvdG9rZW4iLCJpc3MiOiJjdWNpYm90QGFuZ2" "VsaWMtaG93bC0yMzYxMjMuaWFtLmdzZXJ2aWNlYWNjb3VudC5jb20ifQ.HgT4S-sa" "Cz4hh-7mDdU8LnTLvs1wGCrCzydBiwC7XTFL2EtTsAg0U2HFXr_5kztVhqp6yvAW5" "4xQw5gGSsetSszmdpHEFDwmVmIHfUlvpXeXCLoOx3_Bgphuj4pqigg0Czg2suyl3X" "lpjSNtWC_spJHBtARk8zqXhpx1vnFNU-q1NAMvNRYzXI-aE1od8sOsbxPCFoHDKn-" "pBKs7nNTnNV24BQcYfOCq6Mxiy-ZgYkDZxmM6YbtGastSwcJlGvQt5M9x4BveX-i4" "AqBAMCxZ-d5P_Lc3PqZxSuTVCoxpRGzDGsC6oINEe5tnD08zVFQ1moi-F6aTkaV2W" "m7uODhDmw" ); werror("Result %O\n", q->data()); return 0; }
Stephen R. van den Berg wrote:
The test program below shows an I/O error for Pike 8.1, and it shows
My new Google API code seems to be ready for production. However, I switched back to Pike 8.0 to develop it, due to the broken SSL implementation of Pike 8.1
Unfortunately I used the promise interface to the database, which is not in Pike 8.0. Anyone know a quick fix for the broken SSL in 8.1? If not, it looks like I'd have to rewrite the promise db calls to use callbacks instead.
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote:
The test program below shows an I/O error for Pike 8.1, and it shows
[...]
Seems to be due to an incompatibility in the implementation of Curve25519.
Try disabling Curve25519 for now (by eg disable it in the mapping ECC_CURVES in SSL.pmod/Constants.pmod).
After your most recent patch, I get this:
Unsupported curve: GROUP_ecdh_x25519. /usr/local/pike/8.1.13/lib/modules/SSL.pmod/Cipher.pmod:1278: SSL.Cipher.KeyExchangeECDHE()->parse_server_key_exchange(SSL.Buffer(109 byte s, read=[..2] data=[3..111] free=[112..212] allocated)) /usr/local/pike/8.1.13/lib/modules/SSL.pmod/Cipher.pmod:457: SSL.Cipher.KeyExchangeECDHE()->got_server_key_exchange(@0=SSL.Buffer(109 byt es, read=[..2] data=[3..111] free=[112..212] allocated),"BÃÛ\206>\202Ýë\177| q¤ekÿ\205ZÌ^x\200ÞW+²{±æ`Ý/~","\è\r\230 vDsAÅ\206ÝÛÕ\230\e©ÔM%\t*î\vDOWNGRD \1")
Stephen R. van den Berg wrote:
Henrik Grubbstr?m (Lysator) @ Pike (-) developers forum wrote:
Seems to be due to an incompatibility in the implementation of Curve25519.
Try disabling Curve25519 for now (by eg disable it in the mapping ECC_CURVES in SSL.pmod/Constants.pmod).
After your most recent patch, I get this:
Unsupported curve: GROUP_ecdh_x25519.
It seems like this was due to "make install" not removing the old *.o files. After removing everything and reinstalling, it seems to work. Apologies for the noise.
pike-devel@lists.lysator.liu.se