Object Prototyping API Reference

RPKI ASPA implementation - draft-ietf-sidrops-rpki-aspa.

class rpkimancer_aspa.sigobj.Aspa(issuer, file_name=None, *args, **kwargs)

Bases: SignedObject[AspaContentType]

CMS ASN.1 ContentInfo for RPKI ASPA Objects.

Parameters:
  • issuer (CertificateAuthority) –

  • file_name (Optional[str]) –

  • args (Any) –

  • kwargs (Any) –

constructed(data=None)

Provide a context manager to mediate the global pycrates object.

Parameters:

data (Optional[Any]) –

Return type:

ASN1Obj

property content_data: Any

Get the underlying python data for this type instance.

property econtent: ECT

Get the Signed Object’s eContent.

property econtent_info: EncapsulatedContentInfo[ECT]

Get the Signed Object’s encapContentInfo.

econtent_type

alias of AspaContentType

property file_name: str

Construct the file name of the SignedObject.

classmethod from_data(data)

Construct an instance from python data.

Parameters:

data (Any) –

Return type:

InterfaceSubclass

classmethod from_der(der_data)

Construct an instance from DER encoded data.

Parameters:

der_data (bytes) –

Return type:

InterfaceSubclass

publish(*, pub_path, uri_path, repo_path, **kwargs)

Publish the SignedObject artifact as a DER file in the PP.

Parameters:
  • pub_path (str) –

  • uri_path (str) –

  • repo_path (str) –

  • kwargs (Any) –

Return type:

None

classmethod register_econtent_type(content_type, econtent_type)

Add CONTENT-TYPE instance to eContentType constraint set.

Parameters:
  • content_type (Type[CT]) –

  • econtent_type (Type[ECT]) –

Return type:

None

to_asn1()

Serialize as ASN.1 data.

Return type:

str

to_der()

Serialize as DER.

Return type:

bytes

to_internal()

Serialize using internal python repr.

Return type:

str

to_jer()

Serialize as JER.

Return type:

str

to_json()

Serialize as JSON.

Return type:

str

to_txt()

Get default text serialization.

Return type:

str