Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 2f74e0c
  • /
  • apps
  • /
  • tkca
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:bdaf21606afe5d5e5ee4f0b82c4db0e42bf00591
directory badge Iframe embedding
swh:1:dir:ca12a21d5d1ff0861649897f6831f69fa16157ff
tkca
#!/usr/local/bin/perl5
#
# This is only something I'm playing with, it does not work :-)
#

use Tk;

my $main=MainWindow->new();
my $f=$main->Frame(-relief => "ridge", -borderwidth => 2);
$f->pack(-fill => 'x');

my $ff=$f->Frame;
$ff->pack(-fill => 'x');
my $l=$ff->Label(-text => "TkCA - SSLeay",
	-relief => "ridge", -borderwidth => 2);
$l->pack(-fill => 'x', -ipady => 5);

my $l=$ff->Button(-text => "Certify");
$l->pack(-fill => 'x', -ipady => 5);

my $l=$ff->Button(-text => "Review");
$l->pack(-fill => 'x', -ipady => 5);

my $l=$ff->Button(-text => "Revoke");
$l->pack(-fill => 'x', -ipady => 5);

my $l=$ff->Button(-text => "Generate CRL");
$l->pack(-fill => 'x', -ipady => 5);

my($db)=&load_db("demoCA/index.txt");

MainLoop;

sub load_db
	{
	my(%ret);
	my($file)=@_;
	my(*IN);
	my(%db_serial,%db_name,@f,@db_s);

	$ret{'serial'}=\%db_serial;
	$ret{'name'}=\%db_name;

	open(IN,"<$file") || die "unable to open $file:$!\n";
	while (<IN>)
		{
		chop;
		s/([^\\])\t/\1\t\t/g;
		my(@f)=split(/\t\t/);
		die "wrong number of fields in $file, line $.\n"
			if ($#f != 5);

		my(%f);
		$f{'type'}=$f[0];
		$f{'exp'}=$f[1];
		$f{'rev'}=$f[2];
		$f{'serial'}=$f[3];
		$f{'file'}=$f[4];
		$f{'name'}=$f[5];
		die "serial number $f{'serial'} appears twice (line $.)\n"
			if (defined($db{$f{'serial'}}))
		$db_serial{$f{'serial'}}=\%f;
		$db_name{$f{'name'}}.=$f{'serial'}." ";
		}
	return \%ret;
	}

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top