openssl/doc/internal/man3/ossl_serial_number_print.pod
Jonathan M. Wilbur 935f6e63c9 feat: add ossl_serial_number_print
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/25428)
2024-09-16 22:56:02 +02:00

39 lines
1.1 KiB
Plaintext

=pod
=head1 NAME
ossl_serial_number_print
- Print a CertificateSerialNumber
=head1 SYNOPSIS
#include <crypto/x509.h>
int ossl_serial_number_print(BIO *out, const ASN1_INTEGER *bs, int indent);
=head1 DESCRIPTION
This function writes a certificate serial number I<bs> to BIO I<out> in decimal if the serial
number can be read into a long int, as well as hexadecimal. It notifies the
user of negative serial numbers, and handles wrapping of huge serial numbers.
The output is written to a newline and indented by I<indent> spaces if the
serial number cannot be read into a long int.
If the serial number fits into a long int, it is printed on the same line as
whatever precedes it, after a single SPACE character.
=head1 RETURN VALUES
This function returns 0 on success and -1 on failure.
=head1 COPYRIGHT
Copyright 2024 The OpenSSL Project Authors. All Rights Reserved.
Licensed under the Apache License 2.0 (the "License"). You may not use
this file except in compliance with the License. You can obtain a copy
in the file LICENSE in the source distribution or at
L<https://www.openssl.org/source/license.html>.
=cut