diff options
author | Russ Housley <housley@vigilsec.com> | 2019-04-25 02:11:01 -0400 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2019-04-25 08:11:01 +0200 |
commit | 000324619fc355b266a18f65e964198b9c60ae47 (patch) | |
tree | c208bee8264e4dd3c736b8e216e619dc55cc63b2 /pyasn1_modules/rfc6019.py | |
parent | da1d7725e07ded77b35522670f684e740bcc67aa (diff) | |
download | pyasn1-modules-000324619fc355b266a18f65e964198b9c60ae47.tar.gz |
Add RFC3560, RFC5649, and RFC6019 (#28)
Diffstat (limited to 'pyasn1_modules/rfc6019.py')
-rw-r--r-- | pyasn1_modules/rfc6019.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pyasn1_modules/rfc6019.py b/pyasn1_modules/rfc6019.py new file mode 100644 index 0000000..301c633 --- /dev/null +++ b/pyasn1_modules/rfc6019.py @@ -0,0 +1,31 @@ +# This file is being contributed to pyasn1-modules software. +# +# Created by Russ Housley. +# +# Copyright (c) 2019, Vigil Security, LLC +# License: http://snmplabs.com/pyasn1/license.html +# +# BinaryTime: An Alternate Format for Representing Date and Time +# +# ASN.1 source from: +# https://www.rfc-editor.org/rfc/rfc6019.txt + +from pyasn1.type import univ, constraint + +MAX = float('inf') + + +# BinaryTime: Represent date and time as an integer + +class BinaryTime(univ.Integer): + pass + +BinaryTime.subtypeSpec = constraint.ValueRangeConstraint(0, MAX) + + +# CMS Attribute for representing signing time in BinaryTime + +id_aa_binarySigningTime = univ.ObjectIdentifier('1.2.840.113549.1.9.16.2.46') + +class BinarySigningTime(BinaryTime): + pass |