mirror of https://github.com/MISP/MISP
Use setupHttpSocket for fetchPGPKey
parent
3f74ed0b39
commit
4b5bc3736a
|
@ -526,8 +526,9 @@ class User extends AppModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchPGPKey($email) {
|
public function fetchPGPKey($email) {
|
||||||
App::uses('HttpSocket', 'Network/Http');
|
App::uses('SyncTool', 'Tools');
|
||||||
$HttpSocket = new HttpSocket();
|
$syncTool = new SyncTool();
|
||||||
|
$HttpSocket = $syncTool->setupHttpSocket();
|
||||||
$response = $HttpSocket->get('https://pgp.mit.edu/pks/lookup?search=' . $email . '&op=index&fingerprint=on');
|
$response = $HttpSocket->get('https://pgp.mit.edu/pks/lookup?search=' . $email . '&op=index&fingerprint=on');
|
||||||
if ($response->code != 200) return $response->code;
|
if ($response->code != 200) return $response->code;
|
||||||
$string = str_replace(array("\r", "\n"), "", $response->body);
|
$string = str_replace(array("\r", "\n"), "", $response->body);
|
||||||
|
|
Loading…
Reference in New Issue