[138936] branches/gsoc15-pallet
ksammons at macports.org
ksammons at macports.org
Thu Jul 23 14:12:16 PDT 2015
Revision: 138936
https://trac.macports.org/changeset/138936
Author: ksammons at macports.org
Date: 2015-07-23 14:12:16 -0700 (Thu, 23 Jul 2015)
Log Message:
-----------
Pallet branch: FINALLY got the selfsigned certification generation script finished.
Modified Paths:
--------------
branches/gsoc15-pallet/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.pbxproj
branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
branches/gsoc15-pallet/gen_cert.sh
Modified: branches/gsoc15-pallet/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc15-pallet/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2015-07-23 20:49:56 UTC (rev 138935)
+++ branches/gsoc15-pallet/MacPorts_Framework/MacPorts.Framework.xcodeproj/project.pbxproj 2015-07-23 21:12:16 UTC (rev 138936)
@@ -959,7 +959,7 @@
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -997,7 +997,7 @@
1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1.2;
@@ -1031,7 +1031,7 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
DEBUG_INFORMATION_FORMAT = stabs;
GCC_ENABLE_OBJC_GC = unsupported;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1047,7 +1047,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
GCC_ENABLE_OBJC_GC = unsupported;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
@@ -1060,7 +1060,7 @@
216010B01094C7FC00EE9CD0 /* Release-Tiger */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
GCC_ENABLE_OBJC_GC = unsupported;
GCC_VERSION = 4.0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
@@ -1117,7 +1117,7 @@
216010B31094C7FC00EE9CD0 /* Release-Tiger */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1.2;
@@ -1189,7 +1189,7 @@
216010B51094C7FC00EE9CD0 /* Release-Tiger */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -1205,7 +1205,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -1265,7 +1265,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
COPY_PHASE_STRIP = NO;
@@ -1305,7 +1305,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1341,7 +1341,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
CONFIGURATION_BUILD_DIR = "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
DYLIB_COMPATIBILITY_VERSION = 1;
@@ -1594,7 +1594,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
@@ -1625,7 +1625,7 @@
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "ppc i386 ppc64 x86_64";
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
@@ -1654,7 +1654,7 @@
DFE353660CFB8F0C003BACFC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_GC = unsupported;
@@ -1666,7 +1666,7 @@
DFE353670CFB8F0C003BACFC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
GCC_ENABLE_FIX_AND_CONTINUE = NO;
Modified: branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.pbxproj 2015-07-23 20:49:56 UTC (rev 138935)
+++ branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.pbxproj 2015-07-23 21:12:16 UTC (rev 138936)
@@ -807,7 +807,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../MacPorts_Framework/build\"";
@@ -830,7 +830,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../MacPorts_Framework/build\"";
@@ -853,7 +853,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = Pallet;
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "\"$(SRCROOT)/../MacPorts_Framework/build\"";
@@ -872,7 +872,7 @@
21FC211D0FE84F7F00B1E835 /* Debug-InstallMacPorts */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_OBJC_GC = required;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -888,7 +888,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -933,7 +933,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -982,7 +982,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
@@ -1031,7 +1031,7 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@@ -1064,7 +1064,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
@@ -1094,7 +1094,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
COMBINE_HIDPI_IMAGES = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
@@ -1128,7 +1128,7 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_ENABLE_OBJC_GC = required;
GCC_OPTIMIZATION_LEVEL = 0;
@@ -1143,7 +1143,7 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
- CODE_SIGN_IDENTITY = "Self-signed Applications";
+ CODE_SIGN_IDENTITY = "Pallet-Certificate";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
Modified: branches/gsoc15-pallet/Pallet/Pallet.xcodeproj/project.xcworkspace/xcuserdata/mrappleseed.xcuserdatad/UserInterfaceState.xcuserstate
===================================================================
(Binary files differ)
Modified: branches/gsoc15-pallet/gen_cert.sh
===================================================================
--- branches/gsoc15-pallet/gen_cert.sh 2015-07-23 20:49:56 UTC (rev 138935)
+++ branches/gsoc15-pallet/gen_cert.sh 2015-07-23 21:12:16 UTC (rev 138936)
@@ -1,32 +1,75 @@
#!/bin/bash
-read -s -p "Enter root password: " password
+# Create the cert directory (where all cert information will be stored)
-# Generate a new CRT certificate, and a new private key, privateKey
-openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privateKey.key -out certificate.crt
+security find-certificate -c Pallet-Certificate &>/dev/null
+retval=$?
-# Convert the new CRT cert to a PEM cert
-openssl x509 -in certificate.crt -out certificate.pem -outform PEM -extensions codesign
+if [ $retval -eq 0 ]; then
+ echo "Certificate already exists."
+ exit 1
+else
+ echo "Certificate doesn't exist. Beginning generation."
+ if [ ! -d ./certs/ ]; then
-# Convert the PEM certificate to a new P12 certificate, to import it using security
-openssl pkcs12 -export -out certificate.p12 -inkey privateKey.key -in certificate.crt -certfile certificate.pem
+ echo "Directory, \"./certs/\" does not exist. Creating."
+ mkdir certs
+ else
+ echo "Directory, \"./certs/\" already exists. Skipping creation."
+ fi
-# Unlock the default keychain
-security unlock-keychain -p $password login.keychain
+ # Generate the magical configuration file.
+ if [ ! -f ./certs/apple.conf ]; then
+
+ echo "Configuration file, \"./certs/apple.conf\" does not exist. Creating."
-# Import the generated certificate to the default keychain
-security import ./certificate.p12 -k login.keychain -P test
+ # THE FOLLOWING CONFIG INFORMATION IS MAGIC THAT WAS FOUND AFTER 14 HOURS ON GOOGLE. DO. NOT. TOUCH.
+ touch ./certs/apple.conf
+ echo "[ req ]
+ distinguished_name = req_name
+ prompt = no
+ [ req_name ]
+ CN = Pallet-Certificate
+ [ extensions ]
+ basicConstraints=critical,CA:false
+ keyUsage=critical,digitalSignature
+ extendedKeyUsage=codeSigning" >> ./certs/apple.conf
+ else
+ echo "Configuration file, \"./certs/apple.conf\" already exists. Skipping creation."
+ fi
-# Make it a trusted cert
-security add-trusted-cert -d -r trustRoot -p codeSign -k login.keychain ./certificate.crt
+ # Generate a new private key
+ if [ ! -f ./certs/apple.key ]; then
-# Lock the default keychain
-security lock-keychain login.keychain
+ echo "Private key, \"./certs/apple.key\" does not exist. Creating."
+ openssl genrsa -out ./certs/apple.key 2048
+ else
+ echo "Private key, \"./certs/apple.key\" already exists. Skipping creation."
+ fi
-# Remove the certs in the local directory
-rm certificate.*
+ # Generate a new cert (packed with information from apple.conf)
+ if [ ! -f ./certs/apple.crt ]; then
-# Remove the private key
-rm privateKey.key
+ echo "Certificate, \"./certs/apple.crt\" does not exist. Creating."
+ openssl req -x509 -new -config ./certs/apple.conf -nodes -key ./certs/apple.key -extensions extensions -sha256 -out ./certs/apple.crt
+ else
+ echo "Certificate, \"./certs/apple.crt\" already exists. Skipping creation."
+ fi
+ # Generate a new convert that cert to a P12 for importing
+ if [ ! -f ./certs/apple.p12 ]; then
+
+ echo "Certificate, \"./certs/apple.p12\" does not exist. Creating."
+ openssl pkcs12 -export -inkey ./certs/apple.key -in ./certs/apple.crt -out ./certs/apple.p12
+ else
+ echo "Certificate, \"./certs/apple.p12\" already exists. Skipping creation."
+ fi
+
+ # Import the the newly created P12 certificate into the login (default) keychain.
+ echo "Importing the certificate into the keychain."
+ read -s -p "Enter your root password: " password
+ security unlock-keychain -p $password login.keychain
+ security import ./certs/apple.p12 -k login.keychain -P test
+ security lock-keychain login.keychain
+fi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150723/90f2bfbd/attachment.html>
More information about the macports-changes
mailing list