[PD1] Certs done

This commit is contained in:
Afonso Franco 2024-04-18 13:06:16 +01:00
parent 23584e2901
commit 2c4f1fd2fc
Signed by: afonso
SSH key fingerprint: SHA256:aiLbdlPwXKJS5wMnghdtod0SPy8imZjlVvCyUX9DJNk
6 changed files with 104 additions and 29 deletions

View file

@ -14,6 +14,9 @@ func readMessageContent() string {
return scanner.Text()
}
//FIX: Why is this function in the client if it's called by crypto?
// It should be called by the client and the result
// should then be passed into the crypto library
func AskUserPassword() string {
fmt.Println("Enter message content (limited to 1000 bytes):")
scanner := bufio.NewScanner(os.Stdin)
@ -22,6 +25,12 @@ func AskUserPassword() string {
return scanner.Text()
}
func commandError() {
fmt.Println("MSG SERVICE: command error!")
showHelp()
}
func showHelp() {
fmt.Println("Comandos da aplicação cliente:")
fmt.Println("-user <FNAME>: Especifica o ficheiro com dados do utilizador. Por omissão, será assumido que esse ficheiro é userdata.p12.")