Skip to content

Instantly share code, notes, and snippets.

@Fastidious
Created November 3, 2018 01:14
Show Gist options
  • Save Fastidious/840947bf9d6217bb54667bbccb0a7055 to your computer and use it in GitHub Desktop.
Save Fastidious/840947bf9d6217bb54667bbccb0a7055 to your computer and use it in GitHub Desktop.
Sign mobileconfig files with Letsencrypt
#!/bin/bash

certs="/etc/letsencrypt/live/myersnet.net"

openssl smime \
    -sign \
    -signer ${certs}/cert.pem \
    -inkey ${certs}/privkey.pem \
    -certfile ${certs}/chain.pem \
    -nodetach \
    -outform der \
    -in user.mobileconfig \
    -out user-signed.mobileconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment