Skip to content

Commit

Permalink
OSX App entitlements (open-eid#58)
Browse files Browse the repository at this point in the history
Signed-off-by: Toomas Uudisaru <toomas.uudisaru@aktors.ee>
  • Loading branch information
uudisaru authored Nov 8, 2017
1 parent d0f5652 commit 0d6c96a
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 3 deletions.
7 changes: 5 additions & 2 deletions client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,11 @@ if( APPLE )
$<TARGET_FILE_DIR:${PROGNAME}>/../Frameworks/*.framework
$<TARGET_FILE_DIR:${PROGNAME}>/../Frameworks/libopensc.5.dylib
$<TARGET_FILE_DIR:${PROGNAME}>/../PlugIns/*/*
COMMAND codesign -f -s \"$$SIGNCERT\" $<TARGET_FILE_DIR:${PROGNAME}>/../..
--entitlements ${CMAKE_SOURCE_DIR}/${PROGNAME}.entitlements
COMMAND if echo \"$$SIGNCERT\" | grep -q "Developer ID"\; then
codesign -f -s \"$$SIGNCERT\" $<TARGET_FILE_DIR:${PROGNAME}>/../.. --entitlements ${CMAKE_SOURCE_DIR}/${PROGNAME}.eToken.entitlements\;
else
codesign -f -s \"$$SIGNCERT\" $<TARGET_FILE_DIR:${PROGNAME}>/../.. --entitlements ${CMAKE_SOURCE_DIR}/${PROGNAME}.entitlements\;
fi
)
add_custom_target( zip DEPENDS ${PROGNAME}
COMMAND zip --symlinks -r -D ${CMAKE_BINARY_DIR}/qdigidoc4_${VERSION}$ENV{VER_SUFFIX}.zip ${PROGNAME}.app
Expand Down
6 changes: 5 additions & 1 deletion client/translations/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
<source>TSL signing certs</source>
<translation>TSL signing certs</translation>
</message>
<message>
<source>Create %1</source>
<translation>Create %1</translation>
</message>
</context>
<context>
<name>CheckConnection</name>
Expand Down Expand Up @@ -781,9 +785,9 @@ Learn more info here:</translation>
<source>%1 in reader</source>
<translation>%1 in reader</translation>
</message>

</context>


<context>
<name>FirstRun</name>
<message>
Expand Down
4 changes: 4 additions & 0 deletions client/translations/et.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
<source>TSL signing certs</source>
<translation>TSL signeerimise sertifikaadid</translation>
</message>
<message>
<source>Create %1</source>
<translation>Loo %1</translation>
</message>
</context>
<context>
<name>CheckConnection</name>
Expand Down
4 changes: 4 additions & 0 deletions client/translations/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@
<source>TSL signing certs</source>
<translation>Сертификаты подписывания TSL</translation>
</message>
<message>
<source>Create %1</source>
<translation>Создайте %1</translation>
</message>
</context>
<context>
<name>CheckConnection</name>
Expand Down
37 changes: 37 additions & 0 deletions qdigidoc4.eToken.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.print</key>
<true/>
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.mail</key>
<array>
<string>com.apple.mail.compose</string>
</array>
</dict>
<key>com.apple.security.smartcard</key>
<true/>
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.microsoft.outlook</string>
</array>
<key>com.apple.security.temporary-exception.files.absolute-path.read-only</key>
<array>
<string>/private/etc/eToken.conf</string>
<string>/private/etc/eToken.common.conf</string>
</array>
<key>com.apple.security.temporary-exception.files.absolute-path.read-write</key>
<array>
<string>/private/tmp/eToken.lock/</string>
<string>/private/var/tmp/eToken.cache/</string>
</array>
</dict>
</plist>
27 changes: 27 additions & 0 deletions qdigidoc4.entitlements
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.print</key>
<true/>
<key>com.apple.security.scripting-targets</key>
<dict>
<key>com.apple.mail</key>
<array>
<string>com.apple.mail.compose</string>
</array>
</dict>
<key>com.apple.security.smartcard</key>
<true/>
<key>com.apple.security.temporary-exception.apple-events</key>
<array>
<string>com.microsoft.outlook</string>
</array>
</dict>
</plist>

0 comments on commit 0d6c96a

Please sign in to comment.