Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"en-US,en;q\u003d0.5", "gen_ut":1600811632, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ { "schema":"libjg2-1", "oid":{ "oid": "9bff4d84eddb7f793c04947c259a948523641920", "alias": [ "refs/heads/master"]},"tree": [ { "name": "CMakeLists.txt","mode": "33188", "size":622}, { "name": "README.md","mode": "33188", "size":2176}, { "name": "main.c","mode": "33188", "size":3935}],"s":{"c":1600811632,"u": 230}} ,{"schema":"libjg2-1", "cid":"3cc266b16af427e7d899ad358da84745", "oid":{ "oid": "9bff4d84eddb7f793c04947c259a948523641920", "alias": [ "refs/heads/master"]},"blobname": "minimal-examples/crypto/minimal-crypto-jwk/README.md", "blob": "# lws minimal example for JWK\n\nDemonstrates how to generate and format any kind of supported new random JWK keys.\n\nThe full private key is output to stdout, a version of the key with the private\npart removed and some metadata adapted can be saved to a file at the same time\nusing `--public \u003cfile\u003e`. In the public form, `key_ops` and `use` elements are\nadjusted to remove activities that require a private key.\n\nKey elements are output in strict RFC7638 lexicographic order as required by\nsome applications.\n\nKeys produced with openssl and mbedtls backends are completely interchangeable.\n\n## build\n\n```\n $ cmake . \u0026\u0026 make\n```\n\n## usage\n\nCommandline option|Meaning\n---|---\n-d \u003cloglevel\u003e|Debug verbosity in decimal, eg, -d15\n-t \u003ctype\u003e|RSA, OCT or EC\n-b \u003cbits\u003e|For RSA and OCT, key size in bits\n-v \u003ccurve\u003e|For EC keys, the curve, eg, \u0022P-384\u0022... this implies the key bits\n--kid \u0022ID string\u0022|Key identity string\n--use \u0022use[ use]\u0022|Key use restriction (mutually exclusive with --key-ops): sig, enc\n--alg \u003calg\u003e|Specify the algorithm the key is designed for, eg \u0022RSA1_5\u0022\n--key-ops \u0022op[ op]\u0022|Key valid operations (mutually exclusive with --use): sign, verify, encrypt, decrypt, wrapKey, unwrapKey, deriveKey, deriveBits\n-c|Format the jwk as a linebroken C string\n--public \u003cfilepath\u003e|Only output the full, private key, not the public version first\n\nFor legibility the example uses -c, however this\n\n```\n $ ./lws-crypto-jwk -t EC -v P-256 --key-ops \u0022sign verify\u0022 --public mykey.pub\n[2018/12/18 20:19:29:6972] USER: LWS JWK example\n[2018/12/18 20:19:29:7200] NOTICE: Creating Vhost 'default' (serving disabled), 1 protocols, IPv6 off\n[2018/12/18 20:19:29:7251] NOTICE: lws_jwk_generate: generating ECDSA key on curve P-256\n{\u0022crv\u0022:\u0022P-256\u0022,\u0022d\u0022:\u0022eMKM_S4BTL2aiebZLqvxglufV2YX4b3_32DesgEUOaM\u0022,\u0022key_ops\u0022:[\u0022sign\u0022,\u0022verify\u0022],\u0022kty\u0022:\u0022EC\u0022,\u0022x\u0022:\u0022OWauiGGtJ60ZegtqlwETQlmO1exTZdWbT2VbUs4a1hg\u0022,\u0022y\u0022:\u0022g_eNOlqPecbguVQArL6Fd4T5xZthBgipNCBypXubPos\u0022}\n```\n\nThe output in `mykey.pub` is:\n\n```\n{\u0022crv\u0022:\u0022P-256\u0022,\u0022key_ops\u0022:[\u0022verify\u0022],\u0022kty\u0022:\u0022EC\u0022,\u0022x\u0022:\u0022OWauiGGtJ60ZegtqlwETQlmO1exTZdWbT2VbUs4a1hg\u0022,\u0022y\u0022:\u0022g_eNOlqPecbguVQArL6Fd4T5xZthBgipNCBypXubPos\u0022}\n```\n\nNotice the logging goes out on stderr, the key data goes on stdout.\n","s":{"c":1600811632,"u": 173}} ],"g": 1749,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 1, "si": 0, "db":0, "di":1, "sat":0, "lfc": "0000"}