Giter VIP home page Giter VIP logo

Comments (4)

KaneCheshire avatar KaneCheshire commented on May 28, 2024 2

Oh nice, I'll try and find some time to revisit this! Sounds very promising.

from peasy.

KaneCheshire avatar KaneCheshire commented on May 28, 2024

So this is more of a challenge than I anticipated because it's difficult to get the CA cert into the simulator.

from peasy.

Ashraf-Ali-aa avatar Ashraf-Ali-aa commented on May 28, 2024

@KaneCheshire this is the bash script Charles proxy uses

#/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"

from peasy.

ChaosCoder avatar ChaosCoder commented on May 28, 2024

Xcode 11.4 now supports adding certificates, so this could be a solution, right?

simctl supports a keychain subcommand. This command can add certificates to the trusted root store or the keychain. It can also reset the keychain, deleting all saved items. For example, to install β€œmy-selfsigned.cer” to the trusted root store:
xcrun simctl keychain <device> add-root-cert my-selfsigned.cer
Adding a certificate to the trusted root store causes TLS/SSL connections to trust the certificate. (56213319)

Xcode 11.4 Release Notes

from peasy.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.