1# 2# This file is part of pyasn1-modules software. 3# 4# Created by Russ Housley with assistance from asn1ate v.0.6.0. 5# 6# Copyright (c) 2019, Vigil Security, LLC 7# License: http://snmplabs.com/pyasn1/license.html 8# 9# Diffie-Hellman Key Agreement 10# 11# ASN.1 source from: 12# https://www.rfc-editor.org/rfc/rfc2631.txt 13# https://www.rfc-editor.org/errata/eid5897 14# 15 16from pyasn1.type import constraint 17from pyasn1.type import namedtype 18from pyasn1.type import tag 19from pyasn1.type import univ 20 21 22class KeySpecificInfo(univ.Sequence): 23 componentType = namedtype.NamedTypes( 24 namedtype.NamedType('algorithm', univ.ObjectIdentifier()), 25 namedtype.NamedType('counter', univ.OctetString().subtype( 26 subtypeSpec=constraint.ValueSizeConstraint(4, 4))) 27 ) 28 29 30class OtherInfo(univ.Sequence): 31 componentType = namedtype.NamedTypes( 32 namedtype.NamedType('keyInfo', KeySpecificInfo()), 33 namedtype.OptionalNamedType('partyAInfo', univ.OctetString().subtype( 34 explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 0))), 35 namedtype.NamedType('suppPubInfo', univ.OctetString().subtype( 36 explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple, 2))) 37 ) 38