Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83477773
PassphraseSSHPrivateKeyCredentialType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 08:52
Size
590 B
Mime Type
text/x-php
Expires
Thu, Sep 19, 08:52 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
20845052
Attached To
rPH Phabricator
PassphraseSSHPrivateKeyCredentialType.php
View Options
<?php
abstract
class
PassphraseSSHPrivateKeyCredentialType
extends
PassphraseCredentialType
{
const
PROVIDES_TYPE
=
'provides/ssh-key-file'
;
final
public
function
getProvidesType
()
{
return
self
::
PROVIDES_TYPE
;
}
public
function
hasPublicKey
()
{
return
true
;
}
public
function
getPublicKey
(
PhabricatorUser
$viewer
,
PassphraseCredential
$credential
)
{
$key
=
PassphraseSSHKey
::
loadFromPHID
(
$credential
->
getPHID
(),
$viewer
);
$file
=
$key
->
getKeyfileEnvelope
();
list
(
$stdout
)
=
execx
(
'ssh-keygen -y -f %P'
,
$file
);
return
$stdout
;
}
}
Event Timeline
Log In to Comment