Check-in [b63163f527]
Overview
Comment:Fixed padding conditions
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | trunk
Files: files | file ages | folders
SHA1:b63163f5275aa02463a818e853252be9d32a6f0a
User & Date: rkeene on 2019-08-09 01:34:11
Other Links: manifest | tags
Context
2019-08-09
01:34
Fixed padding conditions Leaf check-in: b63163f527 user: rkeene tags: trunk
2019-08-08
16:52
Added softokn3 wrapper module check-in: 3eb54f93b1 user: rkeene tags: trunk
Changes

Modified build/tcl/ssh-agent.tcl from [3e65cda43f] to [183583332c].

    50     50   			set cert [::pki::x509::parse_cert $cert]
    51     51   		}]} {
    52     52   			return ""
    53     53   		}
    54     54   
    55     55   		set e [format %llx [dict get $cert e]]
    56     56   		set n [format %llx [dict get $cert n]]
           57  +
           58  +		# Pad to even size for hex width
    57     59   		if {[string length $e] % 2 != 0} {
    58     60   			set e "0$e"
    59     61   		}
    60     62   		if {[string length $n] % 2 != 0} {
    61     63   			set n "0$n"
    62     64   		}
    63         -		if {[string length $n] % 4 == 0} {
           65  +
           66  +		# Add a leading zero if the value is high enough
           67  +		if {"0x[string range $n 0 1]" > 0x7f} {
    64     68   			set n "00$n"
    65     69   		}
    66     70   
    67     71   		set retval "\{
    68     72   			\"publicKey\": \{
    69     73   				\"type\":\"[string toupper [dict get $cert type]]\",
    70     74   				\"e\":\"$e\",