Add Flatpak packaging for iDRAC6 console
- Manifest, desktop entry, metainfo, icon - Direct Java launch (no javaws/IcedTea-Web) - Bundles avctKVM.jar and native .so libs - Parses JNLP for connection parameters - sign-idrac.sh helper script
This commit is contained in:
47
sign-idrac.sh
Normal file
47
sign-idrac.sh
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
# Signe les JARs iDRAC avec un certificat auto-signe
|
||||
# et patch le JNLP pour utiliser les JARs locaux signes
|
||||
|
||||
JNLP_FILE="$1"
|
||||
|
||||
if [ -z "$JNLP_FILE" ]; then
|
||||
echo "Usage: sign-idrac.sh <fichier.jnlp>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
CODEBASE=$(grep -oP 'codebase="[^"]*"' "$JNLP_FILE" | head -1 | sed 's/codebase="//;s/"//')
|
||||
KEYSTORE="/tmp/idrac-keystore"
|
||||
LIBS_DIR="/tmp/idrac-libs"
|
||||
SIGNED_DIR="/tmp/idrac-signed"
|
||||
STOREPASS="idrac123"
|
||||
|
||||
# Generer un certificat auto-signe
|
||||
keytool -genkeypair -alias idrac -keystore "$KEYSTORE" -storepass "$STOREPASS" \
|
||||
-keypass "$STOREPASS" -keyalg RSA -keysize 2048 \
|
||||
-dname "CN=iDRAC6, OU=Dell, O=Dell, L=Austin, ST=TX, C=US" 2>/dev/null
|
||||
|
||||
mkdir -p "$LIBS_DIR" "$SIGNED_DIR"
|
||||
|
||||
export OPENSSL_CONF=/opt/idrac/openssl_legacy.cnf
|
||||
|
||||
# Telecharger les JARs si pas deja presents
|
||||
for JAR in avctKVM.jar avctKVMIOLinux64.jar avctVMLinux64.jar; do
|
||||
if [ ! -f "$LIBS_DIR/$JAR" ]; then
|
||||
curl -k --ciphers 'DEFAULT:@SECLEVEL=0' -o "$LIBS_DIR/$JAR" "${CODEBASE}/software/${JAR}" --connect-timeout 10 --max-time 60 2>/dev/null
|
||||
fi
|
||||
# Signer le JAR
|
||||
jarsigner -keystore "$KEYSTORE" -storepass "$STOREPASS" -keypass "$STOREPASS" \
|
||||
"$LIBS_DIR/$JAR" idrac 2>/dev/null
|
||||
cp "$LIBS_DIR/$JAR" "$SIGNED_DIR/"
|
||||
done
|
||||
|
||||
# Creer le JNLP patche avec les JARs locaux signes
|
||||
PATCHED="/tmp/viewer-signed.jnlp"
|
||||
sed '/<security>/,/<\/security>/d' "$JNLP_FILE" > "$PATCHED"
|
||||
|
||||
echo ""
|
||||
echo "JARs signes dans $SIGNED_DIR/"
|
||||
echo "JNLP patche dans $PATCHED"
|
||||
echo ""
|
||||
echo "Lancez avec :"
|
||||
echo " javaws -nosecurity $PATCHED"
|
||||
Reference in New Issue
Block a user