Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
1eb38abd
Unverified
Commit
1eb38abd
authored
Sep 27, 2018
by
xster
Committed by
GitHub
Sep 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove code signing special casing for Googlers (#22287)
parent
f6c154c3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
72 deletions
+1
-72
code_signing.dart
packages/flutter_tools/lib/src/ios/code_signing.dart
+1
-9
code_signing_test.dart
packages/flutter_tools/test/ios/code_signing_test.dart
+0
-63
No files found.
packages/flutter_tools/lib/src/ios/code_signing.dart
View file @
1eb38abd
...
...
@@ -163,19 +163,11 @@ Future<Map<String, String>> getCodeSigningIdentityDevelopmentTeam({
if
(
await
opensslProcess
.
exitCode
!=
0
)
return
null
;
final
Map
<
String
,
String
>
signingConfigs
=
<
String
,
String
>
{
return
<
String
,
String
>
{
'DEVELOPMENT_TEAM'
:
_certificateOrganizationalUnitExtractionPattern
.
firstMatch
(
opensslOutput
)
?.
group
(
1
),
};
if
(
opensslOutput
.
contains
(
'iPhone Developer: Google Development'
))
{
signingConfigs
[
'PROVISIONING_PROFILE_SPECIFIER'
]
=
'Google Development'
;
signingConfigs
[
'CODE_SIGN_STYLE'
]
=
'Manual'
;
printStatus
(
"Manually selecting Google's mobile provisioning profile (see go/google-flutter-signing)."
);
}
return
signingConfigs
;
}
Future
<
String
>
_chooseSigningIdentity
(
List
<
String
>
validCodeSigningIdentities
,
bool
usesTerminalUi
)
async
{
...
...
packages/flutter_tools/test/ios/code_signing_test.dart
View file @
1eb38abd
...
...
@@ -149,69 +149,6 @@ void main() {
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'Test Google cert also manually selects a provisioning profile'
,
()
async
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'which'
,
'security'
]))
.
thenReturn
(
exitsHappy
);
when
(
mockProcessManager
.
runSync
(<
String
>[
'which'
,
'openssl'
]))
.
thenReturn
(
exitsHappy
);
when
(
mockProcessManager
.
runSync
(
argThat
(
contains
(
'find-identity'
)),
environment:
anyNamed
(
'environment'
),
workingDirectory:
anyNamed
(
'workingDirectory'
),
)).
thenReturn
(
ProcessResult
(
1
,
// pid
0
,
// exitCode
'''
1) 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 "iPhone Developer: Google Development (1111AAAA11)"
1 valid identities found'''
,
''
));
when
(
mockProcessManager
.
runSync
(
<
String
>[
'security'
,
'find-certificate'
,
'-c'
,
'1111AAAA11'
,
'-p'
],
environment:
anyNamed
(
'environment'
),
workingDirectory:
anyNamed
(
'workingDirectory'
),
)).
thenReturn
(
ProcessResult
(
1
,
// pid
0
,
// exitCode
'This is a mock certificate'
,
''
,
));
final
MockProcess
mockProcess
=
MockProcess
();
final
MockStdIn
mockStdIn
=
MockStdIn
();
final
MockStream
mockStdErr
=
MockStream
();
when
(
mockProcessManager
.
start
(
argThat
(
contains
(
'openssl'
)),
environment:
anyNamed
(
'environment'
),
workingDirectory:
anyNamed
(
'workingDirectory'
),
)).
thenAnswer
((
Invocation
invocation
)
=>
Future
<
Process
>.
value
(
mockProcess
));
when
(
mockProcess
.
stdin
).
thenReturn
(
mockStdIn
);
when
(
mockProcess
.
stdout
)
.
thenAnswer
((
Invocation
invocation
)
=>
Stream
<
List
<
int
>>.
fromFuture
(
Future
<
List
<
int
>>.
value
(
utf8
.
encode
(
'subject= /CN=iPhone Developer: Google Development (1111AAAA11)/OU=3333CCCC33/O=My Team/C=US'
))
));
when
(
mockProcess
.
stderr
).
thenAnswer
((
Invocation
invocation
)
=>
mockStdErr
);
when
(
mockProcess
.
exitCode
).
thenAnswer
((
_
)
async
=>
0
);
final
Map
<
String
,
String
>
signingConfigs
=
await
getCodeSigningIdentityDevelopmentTeam
(
iosApp:
app
);
expect
(
testLogger
.
statusText
,
contains
(
'iPhone Developer: Google Development (1111AAAA11)'
));
expect
(
testLogger
.
errorText
,
isEmpty
);
verify
(
mockStdIn
.
write
(
'This is a mock certificate'
));
expect
(
signingConfigs
,
<
String
,
String
>
{
'DEVELOPMENT_TEAM'
:
'3333CCCC33'
,
'PROVISIONING_PROFILE_SPECIFIER'
:
'Google Development'
,
'CODE_SIGN_STYLE'
:
'Manual'
,
});
},
overrides:
<
Type
,
Generator
>{
ProcessManager:
()
=>
mockProcessManager
,
});
testUsingContext
(
'Test multiple identity and certificate organization works'
,
()
async
{
when
(
mockProcessManager
.
runSync
(<
String
>[
'which'
,
'security'
]))
.
thenReturn
(
exitsHappy
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment