uapi: allow unsetting device private key with /dev/null
This commit is contained in:
parent
05b03c6750
commit
cb4bb63030
2 changed files with 10 additions and 1 deletions
|
|
@ -138,7 +138,7 @@ func (device *Device) IpcSetOperation(socket *bufio.Reader) *IPCError {
|
|||
switch key {
|
||||
case "private_key":
|
||||
var sk NoisePrivateKey
|
||||
err := sk.FromHex(value)
|
||||
err := sk.FromMaybeZeroHex(value)
|
||||
if err != nil {
|
||||
logError.Println("Failed to set private_key:", err)
|
||||
return &IPCError{ipc.IpcErrorInvalid}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue