ios-cert-enrollment 0.0.7 → 0.0.8
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.
@@ -4,7 +4,7 @@ require "uuidtools"
|
|
4
4
|
require "plist"
|
5
5
|
module IOSCertEnrollment
|
6
6
|
class Profile
|
7
|
-
attr_accessor :url, :identifier, :display_name, :description, :icon, :payload, :organization, :expiration
|
7
|
+
attr_accessor :url, :identifier, :display_name, :description, :icon, :payload, :organization, :expiration, :label
|
8
8
|
def initialize(url="")
|
9
9
|
self.url = IOSCertEnrollment.base_url + url
|
10
10
|
self.identifier = IOSCertEnrollment.identifier
|
@@ -12,7 +12,7 @@ module IOSCertEnrollment
|
|
12
12
|
self.organization = IOSCertEnrollment.organization
|
13
13
|
self.description = ""
|
14
14
|
self.expiration = nil
|
15
|
-
|
15
|
+
self.icon = nil
|
16
16
|
end
|
17
17
|
|
18
18
|
def service
|
@@ -58,46 +58,27 @@ module IOSCertEnrollment
|
|
58
58
|
end
|
59
59
|
|
60
60
|
|
61
|
-
def
|
61
|
+
def webclip
|
62
62
|
|
63
63
|
content_payload = general_payload()
|
64
64
|
content_payload['PayloadIdentifier'] = self.identifier+".webclip.intranet"
|
65
65
|
content_payload['PayloadType'] = "com.apple.webClip.managed" # do not modify
|
66
66
|
|
67
67
|
# strings that show up in UI, customisable
|
68
|
-
content_payload['PayloadDisplayName'] = display_name
|
68
|
+
content_payload['PayloadDisplayName'] = self.display_name
|
69
69
|
content_payload['PayloadDescription'] = self.description
|
70
70
|
|
71
71
|
# allow user to remove webclip
|
72
72
|
content_payload['IsRemovable'] = true
|
73
73
|
content_payload['Precomposed'] = true
|
74
74
|
|
75
|
-
content_payload['Icon'] = icon if icon
|
75
|
+
content_payload['Icon'] = self.icon if self.icon
|
76
76
|
# the link
|
77
|
-
content_payload['Label'] =
|
77
|
+
content_payload['Label'] = self.label
|
78
78
|
content_payload['URL'] = self.url
|
79
79
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
encrypted_profile = OpenSSL::PKCS7.encrypt(certificates, plist_content_payload, OpenSSL::Cipher::Cipher::new("des-ede3-cbc"), OpenSSL::PKCS7::BINARY)
|
84
|
-
encrypted_content = encrypted_profile.to_der
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
payload = general_payload()
|
89
|
-
payload['PayloadIdentifier'] = self.identifier+".intranet"
|
90
|
-
payload['PayloadType'] = "Configuration" # do not modify
|
91
|
-
|
92
|
-
# strings that show up in UI, customisable
|
93
|
-
payload['PayloadDisplayName'] = self.display_name
|
94
|
-
payload['PayloadDescription'] = self.description
|
95
|
-
#payload['PayloadExpirationDate'] = self.expiration || Date.today + (360 * 10)
|
96
|
-
|
97
|
-
payload['EncryptedPayloadContent'] = StringIO.new(encrypted_content)
|
98
|
-
self.payload = Plist::Emit.dump(payload)
|
99
|
-
puts self.payload
|
100
|
-
return self.sign
|
80
|
+
self.payload = Plist::Emit.dump([content_payload])
|
81
|
+
return self
|
101
82
|
end
|
102
83
|
|
103
84
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ios-cert-enrollment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -89,7 +89,7 @@ files:
|
|
89
89
|
- lib/ios-cert-enrollment/sign.rb
|
90
90
|
- lib/ios-cert-enrollment/ssl.rb
|
91
91
|
- lib/ios-cert-enrollment/version.rb
|
92
|
-
homepage:
|
92
|
+
homepage: https://github.com/nolanbrown/ios-cert-enrollment
|
93
93
|
licenses: []
|
94
94
|
post_install_message:
|
95
95
|
rdoc_options:
|