letsencrypt::Client method parseAccountKey (protected)
<instance of letsencrypt::Client> parseAccountKey
Defined in /usr/local/ns/tcl/letsencrypt/letsencrypt-procs.tcl
- Testcases:
- No testcase defined.
Source code: :log "parseAccountKey ${:accoutKeyFile}<br>" # # Get :modulus and :exponent from the PEM file of the account # set keyInfo [exec openssl rsa -in ${:accoutKeyFile} -noout -text] regexp {\nmodulus:\n([\sa-f0-9:]+)\npublicExponent:\s(\d+)\s} $keyInfo . pub_hex exp regsub -all {[\s:]} $pub_hex "" mod regsub {^00} $mod "" mod #:log "<pre>pub_hex: ${pub_hex}</pre>" #:log "modulus: ${mod}<br>" # # Put key info into JSON Web Key (:jwk) # set :modulus [ns_base64urlencode -binary [binary decode hex $mod]] set :exponent [ns_base64urlencode -binary [:decnum_to_bytes $exp]] set :jwk [subst {{"e":"${:exponent}","kty":"RSA","n":"${:modulus}"}}] # # Generate thumbprint from the JSON Web Key (:jwk) # set :thumbprint64 [ns_md string -digest sha256 -encoding base64url ${:jwk}] :log "<br><pre>jwk: ${:jwk}\n" "thumbprint64: ${:thumbprint64}\n" #:log "<pre>jwk ${:jwk}\nthumbprint64: ${:thumbprint64}</pre>"XQL Not present: Generic, PostgreSQL, Oracle