Skip to content

Commit

Permalink
add non-localhost binding for Mac
Browse files Browse the repository at this point in the history
This commit never made its way from 1.9 to this tray repo
  • Loading branch information
klabarge committed Apr 22, 2016
1 parent a77a351 commit 9fd3b31
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions ant/apple/apple-keygen.sh.in
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
#!/bin/bash
###############################################################################
# ${project.name} Apple OS X KeyGen Utility #
###############################################################################
# Description: #
# 1. Creates a self-signed Java Keystore for jetty wss://localhost #
# 2. Exports public certificate from Java Keystore #
# 3. Imports into Apple OS X Trusted Root Certs #
# #
# Depends: #
# java #
# #
# Usage: #
# $ ./${apple.keygen.name} "install" #
# $ ./${apple.keygen.name} "uninstall" #
# #
###############################################################################
##########################################################################################
# ${socket.name} Apple OS X KeyGen Utility #
##########################################################################################
# Description: #
# 1. Creates a self-signed Java Keystore for jetty wss://localhost or [hostname] #
# 2. Exports public certificate from Java Keystore #
# 3. Imports into Apple OS X Trusted Root Certs #
# #
# Depends: #
# java #
# #
# Usage: #
# $ ./${apple.keygen.name} "install" [hostname] #
# $ ./${apple.keygen.name} "uninstall" #
# #
##########################################################################################

# Random password hash
password=$(cat /dev/urandom | env LC_CTYPE=C tr -dc 'a-z0-9' | fold -w ${jks.passlength} | head -n 1)
Expand Down Expand Up @@ -93,6 +93,12 @@ function remove_certs {
return 1
}

# Handle CN=${jks.cn} override
if [ -n "$2" ]; then
cname="${jks.cn}"
makekeystore=$(echo "$makekeystore" | sed -e "s|$cname|$2|g")
fi

#
# Uninstall mode
#
Expand Down

0 comments on commit 9fd3b31

Please sign in to comment.