Open concertman opened 8 years ago
Could you show me how it works?
@arnau this is the bash script Charles proxy uses, it would nice if mastermind also supported it.
#/bin/bash
#
# Installs the Charles Root certificate into the iOS Simulators for the current user.
SHA1=$1
SUBJ=$2
TSET=$3
DATA=$4
install() {
if [ -f "$SQLITEDBPATH" ]; then
cp -n "$SQLITEDBPATH" "$SQLITEDBPATH.charlesbackup"
sqlite3 "$SQLITEDBPATH" <<EOF
INSERT INTO "tsettings" VALUES(X'$SHA1',X'$SUBJ',X'$TSET',X'$DATA');
EOF
fi
}
for SQLITEDBPATH in ~/Library/Application\ Support/iPhone\ Simulator/3.*/Library/Keychains/TrustStore.sqlite3
do install
done
for SQLITEDBPATH in ~/Library/Application\ Support/iPhone\ Simulator/4.*/Library/Keychains/TrustStore.sqlite3
do install
done
for SQLITEDBPATH in ~/Library/Developer/CoreSimulator/Devices/*/data/Library/Keychains/TrustStore.sqlite3
do install
done
SQLITEDBPATH=~/Library/Application\ Support/iPhone\ Simulator/User/Library/Keychains/TrustStore.sqlite3
install
echo "The Charles Root Certificate has been installed for the iPhone Simulator"
@Ashraf-Ali-aa Awesome! Thanks for sharing this!
@Ashraf-Ali-aa I'll plan it for the next release, thanks for sharing!
I think the next question for this would be the interface. What would be command used to install. I'm guessing a subcommand of mastermind might make since. sudo mastermind install-certs-ios-sim
though that seems a bit wordy.
well yes, something like that. Given it is a one-time command it shouldn't be an issue that involves a bit of typing. Maybe something like:
mastermind install-certs --ios
How about:
mastermind install-certs --ios-sim
because you don't want to imply you're installing on the device.
Ah, sure
@arnau Any updates on this feature?
@pr4bh4sh hi, sadly no. I can't work on this project right now.
Charles proxy has an automated way of doing this that works pretty well. I'm not sure how they do it but it would be nice to have for mastermind.