yum.pgpmsg

yum.pgpmsg.get_whole_number(msg, idx, numlen)

get_whole_number(msg, idx, numlen) extracts a “whole number” field of length numlen from msg at index idx returns (<whole number>, new_idx) where the whole number is a long integer and new_idx is the index of the next element in the message

yum.pgpmsg.get_whole_int(msg, idx, numlen)

get_whole_int(msg, idx, numlen) same as get_whole_number but returns the number as an int for convenience

yum.pgpmsg.pack_long(l)

pack_long(l) returns big-endian representation of unsigned long integer

yum.pgpmsg.pack_mpi(l)

pack_mpi(l) returns the PGP Multi-Precision Integer representation of unsigned long integer

yum.pgpmsg.get_sig_subpak_len(msg, idx)

get_sig_subpak_len(msg, idx) extracts a signature subpacket length field returns (subpak_len, new_idx)

yum.pgpmsg.get_n_mpi(msg, idx)

get_mpi(msg, idx) extracts a multi-precision integer field from the message msg at index idx returns (n, <mpi>, new_idx) where the mpi is a long integer and new_idx is the index of the next element in the message and n is the number of bits of precision in <mpi>

yum.pgpmsg.get_mpi(msg, idx)

get_mpi(msg, idx) extracts a multi-precision integer field from the message msg at index idx returns (<mpi>, new_idx) where the mpi is a long integer and new_idx is the index of the next element in the message

yum.pgpmsg.str_to_hex(s)
yum.pgpmsg.duration_to_str(s)
yum.pgpmsg.map_to_str(m, vals)

pgp_packet

class yum.pgpmsg.pgp_packet

Bases: object

public_key

class yum.pgpmsg.public_key

Bases: yum.pgpmsg.pgp_packet

user_id

class yum.pgpmsg.user_id

Bases: yum.pgpmsg.pgp_packet

user_attribute

class yum.pgpmsg.user_attribute

Bases: yum.pgpmsg.pgp_packet

signature

class yum.pgpmsg.signature

Bases: yum.pgpmsg.pgp_packet

is_primary_user_id()

is_primary_user_id() returns true if this signature contains a primary user id subpacket with value true

pgp_certificate

class yum.pgpmsg.pgp_certificate

Bases: object

load(pkts)

load(pkts) Initialize the pgp_certificate with a list of OpenPGP packets. The list of packets will be scanned to make sure they are valid for a pgp certificate.

yum.pgpmsg.get_ctb(msg, idx)

get_ctb(msg, idx) extracts a the “cypher type bit” information from message msg at index idx returns (type, len, new_idx) where type is the enumerated type of the packet, len is the length of the packet, and new_idx is the index of the next element in the message

yum.pgpmsg.crc24(msg)
yum.pgpmsg.decode(msg)
yum.pgpmsg.decode_msg(msg, multi=False)

decode_msg(msg) ==> list of OpenPGP “packet” objects Takes an ascii-armored PGP block and returns a list of objects each of which corresponds to a PGP “packets”.

A PGP message is a series of packets. You need to understand how packets are to be combined together in order to know what to do with them. For example a PGP “certificate” includes a public key, user id(s), and signature.

yum.pgpmsg.decode_multiple_keys(msg)

Table Of Contents

Previous topic

yum.parser

Next topic

yum.pkgtag_db

This Page