OLD | NEW |
1 #!/bin/bash -p | 1 #!/bin/bash -p |
2 | 2 |
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 # Using codesign, sign the contents of the versioned directory. Namely, this | 7 # Using codesign, sign the contents of the versioned directory. Namely, this |
8 # includes the framework and helper app. After signing, the signatures are | 8 # includes the framework and helper app. After signing, the signatures are |
9 # verified. | 9 # verified. |
10 | 10 |
(...skipping 25 matching lines...) Expand all Loading... |
36 | 36 |
37 # An .app bundle to be signed can be signed directly. Normally, signing a | 37 # An .app bundle to be signed can be signed directly. Normally, signing a |
38 # framework bundle requires that each version within be signed individually. | 38 # framework bundle requires that each version within be signed individually. |
39 # http://developer.apple.com/mac/library/technotes/tn2007/tn2206.html#TNTAG13 | 39 # http://developer.apple.com/mac/library/technotes/tn2007/tn2206.html#TNTAG13 |
40 # In Chrome's case, the framework bundle is unversioned, so it too can be | 40 # In Chrome's case, the framework bundle is unversioned, so it too can be |
41 # signed directly. See copy_framework_unversioned.sh. | 41 # signed directly. See copy_framework_unversioned.sh. |
42 | 42 |
43 framework="${versioned_dir}/@MAC_PRODUCT_NAME@ Framework.framework" | 43 framework="${versioned_dir}/@MAC_PRODUCT_NAME@ Framework.framework" |
44 crashpad_handler="${framework}/Helpers/crashpad_handler" | 44 crashpad_handler="${framework}/Helpers/crashpad_handler" |
45 helper_app="${versioned_dir}/@MAC_PRODUCT_NAME@ Helper.app" | 45 helper_app="${versioned_dir}/@MAC_PRODUCT_NAME@ Helper.app" |
46 helper_eh_app="${versioned_dir}/@MAC_PRODUCT_NAME@ Helper EH.app" | |
47 helper_np_app="${versioned_dir}/@MAC_PRODUCT_NAME@ Helper NP.app" | |
48 | 46 |
49 requirement_suffix="\ | 47 requirement_suffix="\ |
50 and certificate leaf = H\"85cee8254216185620ddc8851c7a9fc4dfe120ef\"\ | 48 and certificate leaf = H\"85cee8254216185620ddc8851c7a9fc4dfe120ef\"\ |
51 " | 49 " |
52 | 50 |
53 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ | 51 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ |
54 "${crashpad_handler}" \ | 52 "${crashpad_handler}" \ |
55 -r="designated => identifier \"crashpad_handler\" \ | 53 -r="designated => identifier \"crashpad_handler\" \ |
56 ${requirement_suffix}" | 54 ${requirement_suffix}" |
57 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ | 55 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ |
58 "${framework}" \ | 56 "${framework}" \ |
59 -r="designated => identifier \"com.google.Chrome.framework\" \ | 57 -r="designated => identifier \"com.google.Chrome.framework\" \ |
60 ${requirement_suffix}" | 58 ${requirement_suffix}" |
61 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ | 59 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ |
62 "${helper_app}" \ | 60 "${helper_app}" \ |
63 -r="designated => identifier \"com.google.Chrome.helper\" \ | 61 -r="designated => identifier \"com.google.Chrome.helper\" \ |
64 ${requirement_suffix}" | 62 ${requirement_suffix}" |
65 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ | |
66 "${helper_eh_app}" \ | |
67 -r="designated => identifier \"com.google.Chrome.helper.EH\" \ | |
68 ${requirement_suffix}" | |
69 codesign --sign "${codesign_id}" --keychain "${codesign_keychain}" \ | |
70 "${helper_np_app}" \ | |
71 -r="designated => identifier \"com.google.Chrome.helper.NP\" \ | |
72 ${requirement_suffix}" | |
73 | 63 |
74 # Verify everything. Don't use --deep on the framework because Keystone's | 64 # Verify everything. Don't use --deep on the framework because Keystone's |
75 # signature is in a transitional state (radar 18474911). | 65 # signature is in a transitional state (radar 18474911). |
76 codesign --verify --deep "${crashpad_handler}" | 66 codesign --verify --deep "${crashpad_handler}" |
77 codesign --verify "${framework}" | 67 codesign --verify "${framework}" |
78 codesign --verify --deep "${helper_app}" | 68 codesign --verify --deep "${helper_app}" |
79 codesign --verify --deep "${helper_eh_app}" | |
80 codesign --verify --deep "${helper_np_app}" | |
OLD | NEW |