howsigned 0.0.4 → 0.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39da123c01e7a3a8e46966e6b8b503d72491178e
4
- data.tar.gz: e804e937c4be505827b3b105a3ffa22d35d4fea2
3
+ metadata.gz: cf4dd4a0deaac92e79d35420262f1a0dfa1d773d
4
+ data.tar.gz: baa4a3d7c1983d2b2b6de872372b0163db049984
5
5
  SHA512:
6
- metadata.gz: 6027d20b39f6940b005b23ff8db9a29a48f505bbdb2e88bbd59451a4d04d430f612e267b54212d39933bb9865987aaa83eddb13ecd5ac327496fe969dd166aca
7
- data.tar.gz: e88ac8a53c40c1c00c8b689c8119377e80b08c70eeadf023cfbfc536aff4246d02a46fa16992fdcebf0ad97eca5cd925403b0fea0f9ecc642c5c3134ee47f353
6
+ metadata.gz: 6aa842ee204e2e15164f1f2b522d9a914a3d75bb031a13f7d56096065c0721ba0aec917c29eb6dec1d3b725e74c29046d5439b88142679bfeb2fcc11aa7d2eb8
7
+ data.tar.gz: beccc641dd70075e5e1f0710992d40f2c744868f2c7feb600cb8e21ed493c982fdf09e84e998c951c274d4d8951695039aafb9b62fa7569ce48f40df330bb234
data/bin/howsigned CHANGED
@@ -7,6 +7,6 @@ require 'entitlements'
7
7
  require 'profiles'
8
8
  require 'verify'
9
9
 
10
- program :version, '0.0.4'
10
+ program :version, '0.0.5'
11
11
  program :description, 'Utility to determine codesigning on contained binaries in an .ipa'
12
12
 
@@ -0,0 +1,4 @@
1
+ def contained_binary_extensions
2
+ return ["appex",
3
+ "app"]
4
+ end
data/lib/entitlements.rb CHANGED
@@ -6,6 +6,7 @@ require 'zip'
6
6
  require 'zip/filesystem'
7
7
  require 'validate_ipa'
8
8
  require 'extract_zip'
9
+ require 'contained_binaries_definition'
9
10
 
10
11
  def append_entitlements(path, entitlements_hash)
11
12
  Dir.glob(path) do |file|
@@ -28,8 +29,13 @@ command :entitlements do |c|
28
29
 
29
30
  entitlements_hash = Hash.new
30
31
 
31
- append_entitlements("#{tempdir.path}/**/*.app", entitlements_hash)
32
- append_entitlements("#{tempdir.path}/**/*.appex", entitlements_hash)
32
+ contained_binary_extensions().each { |extension|
33
+ append_entitlements("#{tempdir.path}/**/*.#{extension}", entitlements_hash)
34
+ }
35
+
36
+ if (entitlements_hash.length == 0)
37
+ abort "No entitlements found on contained binaries"
38
+ end
33
39
 
34
40
  puts entitlements_hash.to_plist
35
41
  end
data/lib/profiles.rb CHANGED
@@ -13,6 +13,9 @@ def get_profiles(path)
13
13
  profiles[app_id] = plist_profile
14
14
  end
15
15
 
16
+ if (profiles.length == 0)
17
+ abort "No embedded provisioning profiles found"
18
+ end
16
19
  return profiles.to_plist
17
20
  end
18
21
 
data/lib/verify.rb CHANGED
@@ -3,11 +3,12 @@ require 'zip'
3
3
  require 'zip/filesystem'
4
4
  require 'validate_ipa'
5
5
  require 'extract_zip'
6
+ require 'contained_binaries_definition'
6
7
 
7
8
  def verify_binaries(path)
8
9
  Dir.glob(path) do |file|
9
10
  codesign = `codesign --verify "#{file}" 2>&1`
10
- if(!codesign.to_s.empty?)
11
+ if (!codesign.to_s.empty?)
11
12
  puts codesign
12
13
  end
13
14
  end
@@ -25,15 +26,9 @@ command :verify do |c|
25
26
 
26
27
  entitlements_hash = Hash.new
27
28
 
28
- app_codesign = verify_binaries("#{tempdir.path}/**/*.app")
29
- if(!app_codesign.to_s.empty?)
30
- puts app_codesign
31
- end
32
-
33
- appex_codesign = verify_binaries("#{tempdir.path}/**/*.appex")
34
- if(!appex_codesign.to_s.empty?)
35
- puts appex_codesign
36
- end
29
+ contained_binary_extensions().each { |extension|
30
+ verify_binaries("#{tempdir.path}/**/*.#{extension}")
31
+ }
37
32
  end
38
33
  end
39
34
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: howsigned
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael MacDougall
@@ -60,6 +60,7 @@ extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
62
  - bin/howsigned
63
+ - lib/contained_binaries_definition.rb
63
64
  - lib/entitlements.rb
64
65
  - lib/extract_zip.rb
65
66
  - lib/profiles.rb