Skip to content

Instantly share code, notes, and snippets.

@marchelbling
Created January 22, 2018 17:27
Show Gist options
  • Save marchelbling/9ec7613fa836153e95799441579ac16d to your computer and use it in GitHub Desktop.
Save marchelbling/9ec7613fa836153e95799441579ac16d to your computer and use it in GitHub Desktop.
install delve
#!/bin/bash
echo """[ req ]
default_bits = 2048 # RSA key size
encrypt_key = no # Protect private key
default_md = sha512 # MD to use
prompt = no # Prompt for DN
distinguished_name = codesign_dn # DN template
[ codesign_dn ]
commonName = "dlv-cert"
[ codesign_reqext ]
keyUsage = critical,digitalSignature
extendedKeyUsage = critical,codeSigning
""" > dlv-cert.cfg
openssl req -new -newkey rsa:2048 -x509 -days 3650 -nodes -config dlv-cert.cfg -extensions codesign_reqext -batch -out dlv-cert.cer -keyout dlv-cert.key
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain dlv-cert.cer
sudo security import dlv-cert.key -A -k /Library/Keychains/System.keychain
brew install go-delve/delve/delve
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment