Botan

X.509 SIGNED Object

License
Botan is released under the Simplified BSD License (see LICENSE.md)

abstract class  X509Object: botan.asn1.asn1_obj.ASN1Object;

This class represents abstract X.509 signed objects as in the X.500 SIGNED macro


final const const(Vector!ubyte)  tbsData();

The underlying data that is to be or was signed

Returns
data that is or was signed

final const ref const(Vector!ubyte)  signature();

Returns
 signature on tbsData()

final const const(AlgorithmIdentifier)  signatureAlgorithm();

Returns
signature algorithm that was used to generate signature

final const string  hashUsedForSignature();

Returns
hash algorithm that was used to generate signature

Vector!ubyte  makeSigned(ALLOC)(ref PKSigner signer, RandomNumberGenerator rng, in AlgorithmIdentifier algo, auto ref const Vector!(ubyte, ALLOC) tbs_bits);
Vector!ubyte  makeSigned(ALLOC)(ref PKSigner signer, RandomNumberGenerator rng, in AlgorithmIdentifier algo, auto ref const RefCounted!(Vector!(ubyte, ALLOC), ALLOC) tbs_bits);

Create a signed X509 object.

Parameters
PKSigner signer the signer used to sign the object
RandomNumberGenerator rng the random number generator to use
AlgorithmIdentifier algo the algorithm identifier of the signature scheme
Vector!(ubyte, ALLOC) tbs_bits the tbs bits to be signed
Returns
signed X509 object

final const bool  checkSignature(in PublicKey pub_key);

Check the signature on this data

Parameters
PublicKey pub_key the public key purportedly used to sign this data
Returns
true if the signature is valid, otherwise false

final const Vector!ubyte  BER_encode();

Returns
BER encoding of this

final const string  PEM_encode();

Returns
PEM encoding of this