Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,31 @@ while {1} {
}
timeout {
puts stderr "Not asked for a password when creating new identity!"
exit 1
exit 2
}
}
}

# use 'bash -c' to use output redirection
spawn bash -c "dfx identity export alice > export.pem"
expect {
"Please enter a passphrase for your identity: " {
send -- "testpassword\r"
}
timeout {
puts stderr "Not asked for a password when exporting encrypted identity!"
exit 1
while {1} {
# use 'bash -c' to use output redirection
spawn bash -c "dfx identity export alice > export.pem"
expect {
"Please enter a passphrase for your identity: " {
send -- "testpassword\r"
}
timeout {
puts stderr "Not asked for a password when exporting encrypted identity!"
exit 3
}
}
}
expect eof
expect {
"Failed during decryption." {
expect eof
}
"Decryption complete." {
expect eof {
break
}
}
}
}