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

Standards.X509.TBSCertificate: Added some more entries.

Adds direct access to validity and keyinfo.
parent bd514e96
No related branches found
No related tags found
No related merge requests found
...@@ -365,6 +365,10 @@ protected Verifier make_verifier(Object _keyinfo) ...@@ -365,6 +365,10 @@ protected Verifier make_verifier(Object _keyinfo)
} }
//! Represents a TBSCertificate. //! Represents a TBSCertificate.
//!
//! @note
//! Was not compatible with @[Standards.ASN1.Types.Sequence]
//! Prior to Pike 8.0.
class TBSCertificate class TBSCertificate
{ {
inherit Sequence; inherit Sequence;
...@@ -455,6 +459,17 @@ class TBSCertificate ...@@ -455,6 +459,17 @@ class TBSCertificate
return low_get(2); return low_get(2);
} }
//!
void `validity=(Sequence v)
{
// FIXME: Validate?
low_set(3, v);
}
Sequence `validity()
{
return low_get(3);
}
//! //!
void `not_before=(int t) void `not_before=(int t)
{ {
...@@ -493,6 +508,17 @@ class TBSCertificate ...@@ -493,6 +508,17 @@ class TBSCertificate
protected Verifier internal_public_key; protected Verifier internal_public_key;
//!
void `keyinfo=(Sequence ki)
{
internal_public_key = make_verifier(ki);
low_set(5, ki);
}
Sequence `keyinfo()
{
return low_get(5);
}
//! //!
void `public_key=(Verifier v) void `public_key=(Verifier v)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment