xref: /freebsd/crypto/openssl/doc/internal/man3/ossl_serial_number_print.pod (revision e7be843b4a162e68651d3911f0357ed464915629)
1*e7be843bSPierre Pronchery=pod
2*e7be843bSPierre Pronchery
3*e7be843bSPierre Pronchery=head1 NAME
4*e7be843bSPierre Pronchery
5*e7be843bSPierre Proncheryossl_serial_number_print
6*e7be843bSPierre Pronchery- Print a CertificateSerialNumber
7*e7be843bSPierre Pronchery
8*e7be843bSPierre Pronchery=head1 SYNOPSIS
9*e7be843bSPierre Pronchery
10*e7be843bSPierre Pronchery #include <crypto/x509.h>
11*e7be843bSPierre Pronchery
12*e7be843bSPierre Pronchery int ossl_serial_number_print(BIO *out, const ASN1_INTEGER *bs, int indent);
13*e7be843bSPierre Pronchery
14*e7be843bSPierre Pronchery=head1 DESCRIPTION
15*e7be843bSPierre Pronchery
16*e7be843bSPierre ProncheryThis function writes a certificate serial number I<bs> to BIO I<out> in decimal if the serial
17*e7be843bSPierre Proncherynumber can be read into a long int, as well as hexadecimal. It notifies the
18*e7be843bSPierre Proncheryuser of negative serial numbers, and handles wrapping of huge serial numbers.
19*e7be843bSPierre ProncheryThe output is written to a newline and indented by I<indent> spaces if the
20*e7be843bSPierre Proncheryserial number cannot be read into a long int.
21*e7be843bSPierre Pronchery
22*e7be843bSPierre ProncheryIf the serial number fits into a long int, it is printed on the same line as
23*e7be843bSPierre Proncherywhatever precedes it, after a single SPACE character.
24*e7be843bSPierre Pronchery
25*e7be843bSPierre Pronchery=head1 RETURN VALUES
26*e7be843bSPierre Pronchery
27*e7be843bSPierre ProncheryThis function returns 0 on success and -1 on failure.
28*e7be843bSPierre Pronchery
29*e7be843bSPierre Pronchery=head1 COPYRIGHT
30*e7be843bSPierre Pronchery
31*e7be843bSPierre ProncheryCopyright 2024 The OpenSSL Project Authors. All Rights Reserved.
32*e7be843bSPierre Pronchery
33*e7be843bSPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
34*e7be843bSPierre Proncherythis file except in compliance with the License.  You can obtain a copy
35*e7be843bSPierre Proncheryin the file LICENSE in the source distribution or at
36*e7be843bSPierre ProncheryL<https://www.openssl.org/source/license.html>.
37*e7be843bSPierre Pronchery
38*e7be843bSPierre Pronchery=cut
39