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

Standards.ASN1: Added some AutoDoc mk II markup.

Also added some other comments.
parent df50bac8
Branches
Tags
No related merge requests found
......@@ -1182,20 +1182,30 @@ class VisibleString {
constant type_name = "VisibleString";
}
//! UTCTime
//!
//! RFC 2459 4.1.2.5.1
class UTC
{
inherit String;
constant tag = 23;
constant type_name = "UTCTime";
//!
this_program set_posix(int t)
{
object second = Calendar.ISO_UTC.Second(t);
// FIXME: What is this based on?
// RFC 2459 4.1.2.5.1:
//
// Where YY is greater than or equal to 50, the year shall be
// interpreted as 19YY; and
//
// Where YY is less than 50, the year shall be interpreted as 20YY.
if (second->year_no() >= 2050)
error( "Times later than 2049 not supported.\n" );
if (second->year_no() < 1950)
error( "Times earlier than 1950 not supported.\n" );
value = sprintf("%02d%02d%02d%02d%02d%02dZ",
[int]second->year_no() % 100,
......@@ -1207,6 +1217,7 @@ class UTC
return this;
}
//!
int get_posix()
{
if( !value || sizeof(value)!=13 ) error("Data not UTC date string.\n");
......
......@@ -6,6 +6,11 @@
import Standards.ASN1.Types;
// NOTE: RFC 2314 6.1 says that the tag is IMPLICIT, and
// RFC 2986 4.1 says that the tag is EXPLICIT!
//
// OpenSSL seems to use IMPLICIT tagging,
// so this is probably correct.
//!
class CRIAttributes
{
......
......@@ -283,7 +283,7 @@ protected mapping(int:program(Object)) x509_types = ([
//!
//! @note
//! Was not compatible with @[Standards.ASN1.Types.Sequence]
//! Prior to Pike 8.0.
//! prior to Pike 8.0.
class TBSCertificate
{
inherit Sequence;
......@@ -910,7 +910,7 @@ class TBSCertificate
int(0..1) ext_basicConstraints_cA;
//! The maximum number of certificates that may follow this
//! certificate in a certificate chain. @exp{0@} in case no limit is
//! certificate in a certificate chain. @expr{0@} in case no limit is
//! imposed. Note that this variable is off by one compared to the
//! RFC 3280 definition, which only counts intermediate certificates
//! (i.e. 0 intermediates means this variable would be 1, as in one
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment