Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4852574
PassphraseSSHPrivateKeyCredentialType.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
590 B
Referenced Files
None
Subscribers
None
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
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, Jun 9, 06:41 (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1768477
Default Alt Text
PassphraseSSHPrivateKeyCredentialType.php (590 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment