From a1912606fa5a259a4e4a1a82a934913683edc3ec Mon Sep 17 00:00:00 2001 From: Ch1ffr3punk Date: Thu, 12 Mar 2026 10:02:46 +0100 Subject: Add files via upload --- yubicrypt.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/yubicrypt.go b/yubicrypt.go index 9ee12a0..0f4a6fc 100644 --- a/yubicrypt.go +++ b/yubicrypt.go @@ -245,7 +245,7 @@ func (g *GUI) showInfoPopup() { okButton.Importance = widget.HighImportance content := container.NewVBox( - widget.NewLabelWithStyle("yubicrypt v0.1.8", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}), + widget.NewLabelWithStyle("yubicrypt v0.1.9", fyne.TextAlignCenter, fyne.TextStyle{Bold: true}), widget.NewSeparator(), container.NewHBox( layout.NewSpacer(), @@ -359,8 +359,8 @@ func (g *GUI) choosePublicKey() { defer reader.Close() path := reader.URI().Path() - if filepath.Ext(path) != ".pem" { - g.statusLabel.SetText("Error: Please select a .pem file") + if filepath.Ext(path) != ".crt" { + g.statusLabel.SetText("Error: Please select a .crt file") return } @@ -1145,7 +1145,7 @@ func loadRSAPublicKey(filename string) (*rsa.PublicKey, error) { block, _ := pem.Decode(data) if block == nil { - return nil, fmt.Errorf("no PEM data found in file") + return nil, fmt.Errorf("no data found in file") } switch block.Type { @@ -1188,7 +1188,7 @@ func loadRSAPublicKey(filename string) (*rsa.PublicKey, error) { return pubKey, nil default: - return nil, fmt.Errorf("unsupported PEM type: %s, expected CERTIFICATE, PUBLIC KEY or RSA PUBLIC KEY", block.Type) + return nil, fmt.Errorf("unsupported type: %s, expected CERTIFICATE, PUBLIC KEY or RSA PUBLIC KEY", block.Type) } } -- cgit v1.2.3