247
248
249
250
251
252
253
254
255
256
257
258
259
260
| puts ""
flush stdout
return $password
}
proc _getPassword {name} {
foreach slotInfoDict [_listCertificates] {
unset -nocomplain slotInfo
array set slotInfo $slotInfoDict
set pubkey $slotInfo(pubkey)
set prompt $slotInfo(prompt)
|
>
>
>
>
>
| 247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
| puts ""
flush stdout
return $password
}
proc _getPassword {name} {
set exists [db eval {SELECT 1 FROM passwords WHERE name = $name LIMIT 1;}]
if {$exists != "1"} {
return -code error "Password \"$name\" does not exists."
}
foreach slotInfoDict [_listCertificates] {
unset -nocomplain slotInfo
array set slotInfo $slotInfoDict
set pubkey $slotInfo(pubkey)
set prompt $slotInfo(prompt)
|
280
281
282
283
284
285
286
287
288
289
290
291
292
293
| }
}
return -code error "No valid keys"
}
proc _modifyPublicKeys {passwordName userNames sql} {
set publicKeys [list]
db eval {SELECT publicKey FROM passwords WHERE name = $passwordName;} row {
lappend publicKeys $row(publicKey)
}
set changeRequired 0
|
>
>
>
>
>
| 285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
| }
}
return -code error "No valid keys"
}
proc _modifyPublicKeys {passwordName userNames sql} {
set exists [db eval {SELECT 1 FROM passwords WHERE name = $passwordName LIMIT 1;}]
if {$exists != "1"} {
return -code error "Password \"$passwordName\" does not exists."
}
set publicKeys [list]
db eval {SELECT publicKey FROM passwords WHERE name = $passwordName;} row {
lappend publicKeys $row(publicKey)
}
set changeRequired 0
|