Skip to content
Snippets Groups Projects
Commit 674a2d07 authored by Henrik (Grubba) Grubbström's avatar Henrik (Grubba) Grubbström
Browse files

Now the "optimization" might actually work.

Rev: lib/modules/Tools.pmod/X509.pmod:1.38
parent 809a03f6
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,7 @@
//#pragma strict_types
/*
* $Id: X509.pmod,v 1.37 2004/09/06 02:46:37 nilsson Exp $
* $Id: X509.pmod,v 1.38 2004/09/06 18:05:07 grubba Exp $
*
* Some random functions for creating RFC-2459 style X.509 certificates.
*
......@@ -47,7 +47,7 @@ constant CERT_UNAUTHORIZED_CA = 7;
//! time @[t].
UTC make_time(int t)
{
object /*Calendar.Second*/ second = Calendar->Second(t)->set_timezone("UTC");
object /*Calendar.Second*/ second = Calendar["Second"](t)->set_timezone("UTC");
if (second->year_no() >= 2050)
error( "Times later than 2049 not supported yet\n" );
......@@ -93,7 +93,7 @@ mapping(string:int) parse_time(UTC asn1)
return 0;
m->mon--;
if ( (m->mday <= 0) || (m->mday > Calendar->ISO->Year(m->year + 1900)
if ( (m->mday <= 0) || (m->mday > Calendar["ISO"]["Year"](m->year + 1900)
->month(m->mon + 1)->number_of_days()))
return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment