add gpg public_key ipmort

This commit is contained in:
2025-07-09 08:49:49 +02:00
parent 12904e843c
commit 44e75fa1b0
13 changed files with 1639 additions and 150 deletions

70
gpg_simple_setup.sh Executable file
View File

@ -0,0 +1,70 @@
#!/bin/bash
echo "🔐 Einfaches GPG Setup für lxtools_installer"
echo "==========================================="
# Check if GPG is installed
if ! command -v gpg &> /dev/null; then
echo "❌ GPG ist nicht installiert"
echo "Installation: sudo apt install gnupg"
exit 1
fi
# Check if GPG key exists
if ! gpg --list-secret-keys | grep -q "sec"; then
echo "📋 Erstelle GPG-Schlüssel automatisch..."
echo ""
echo "Verwende diese Einstellungen:"
echo "- Name: Désiré Werner Menrath"
echo "- Email: polunga40@unity-mail.de"
echo "- Typ: RSA 4096"
echo "- Gültigkeitsdauer: 2 Jahre"
echo ""
# Create GPG key non-interactively
cat > /tmp/gpg_batch <<EOF
Key-Type: RSA
Key-Length: 4096
Subkey-Type: RSA
Subkey-Length: 4096
Name-Real: Désiré Werner Menrath
Name-Email: polunga40@unity-mail.de
Expire-Date: 2y
%no-protection
%commit
EOF
echo "🔑 Erstelle Schlüssel..."
gpg --batch --generate-key /tmp/gpg_batch
rm /tmp/gpg_batch
echo "✅ GPG-Schlüssel erstellt!"
else
echo "✅ GPG-Schlüssel bereits vorhanden"
fi
# Get the key ID
KEY_ID=$(gpg --list-secret-keys --keyid-format SHORT | grep "sec" | head -1 | sed 's/.*\///' | cut -d' ' -f1)
echo ""
echo "🔑 Verwende Key-ID: $KEY_ID"
# Export public key
gpg --export --armor "$KEY_ID" > public_key.asc
echo "✅ Öffentlicher Schlüssel exportiert: public_key.asc"
# Test the signing
echo ""
echo "🧪 Teste Signierung..."
echo "test" > /tmp/test.txt
if gpg --armor --detach-sign --yes /tmp/test.txt 2>/dev/null; then
echo "✅ Signierung funktioniert!"
rm /tmp/test.txt /tmp/test.txt.asc
else
echo "❌ Signierung fehlgeschlagen"
fi
echo ""
echo "📋 Setup abgeschlossen!"
echo "Jetzt kannst du ./build_compatible.sh ausführen"