mirror of
https://github.com/QuasarApp/openssl.git
synced 2025-05-02 12:39:38 +00:00
108 lines
4.1 KiB
Plaintext
108 lines
4.1 KiB
Plaintext
|
=pod
|
||
|
|
||
|
=head1 NAME
|
||
|
|
||
|
ossl_cmp_statusinfo_new,
|
||
|
ossl_cmp_pkisi_pkistatus_get,
|
||
|
ossl_cmp_pkisi_pkifailureinfo_get,
|
||
|
ossl_cmp_pkisi_pkifailureinfo_check,
|
||
|
ossl_cmp_pkisi_failinfo_get0,
|
||
|
ossl_cmp_pkisi_statusstring_get0,
|
||
|
ossl_pkisi_snprint
|
||
|
- functions for managing PKI status information
|
||
|
|
||
|
=head1 SYNOPSIS
|
||
|
|
||
|
#include "cmp.h"
|
||
|
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badAlg 0
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badRequest 2
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badTime 3
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badCertId 4
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badPOP 9
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
|
||
|
# define OSSL_CMP_PKIFAILUREINFO_MAX 26
|
||
|
|
||
|
OSSL_CMP_PKISI *ossl_cmp_statusinfo_new(int status, int fail_info,
|
||
|
const char *text);
|
||
|
int ossl_cmp_pkisi_pkistatus_get(OSSL_CMP_PKISI *si);
|
||
|
int ossl_cmp_pkisi_pkifailureinfo_get(OSSL_CMP_PKISI *si);
|
||
|
int ossl_cmp_pkisi_pkifailureinfo_check(OSSL_CMP_PKISI *si, int bit_index);
|
||
|
OSSL_CMP_PKIFAILUREINFO *ossl_cmp_pkisi_failinfo_get0(const OSSL_CMP_PKISI *si);
|
||
|
OSSL_CMP_PKIFREETEXT *ossl_cmp_pkisi_statusstring_get0(const OSSL_CMP_PKISI *si);
|
||
|
char *ossl_pkisi_snprint(OSSL_CMP_PKISI *si, char *buf, int bufsize);
|
||
|
|
||
|
=head1 DESCRIPTION
|
||
|
|
||
|
ossl_cmp_statusinfo_new() creates a new PKIStatusInfo structure and fills it
|
||
|
with the given values. It sets the status field to B<status>.
|
||
|
If B<text> is not NULL, it is copied to statusString.
|
||
|
B<fail_info> is is interpreted as bit pattern for the failInfo field.
|
||
|
Returns a pointer to the structure on success, or NULL on error.
|
||
|
|
||
|
ossl_cmp_pkisi_pkistatus_get() returns the PKIStatus of B<si>, or -1 on error.
|
||
|
|
||
|
ossl_cmp_pkisi_pkifailureinfo_get() returns the PKIFailureInfo bits
|
||
|
of B<si>, encoded as integer, or -1 on error.
|
||
|
|
||
|
ossl_cmp_pkisi_pkifailureinfo_check() returns the state of the bit (0 or 1)
|
||
|
with index B<bit_index> in the PKIFailureInfo of the B<si>, or -1 on error.
|
||
|
|
||
|
ossl_cmp_pkisi_failinfo_get0() returns a direct pointer to the failInfo
|
||
|
field contained in B<si>, or NULL on error.
|
||
|
|
||
|
ossl_cmp_pkisi_statusstring_get0() returns a direct pointer to the statusString
|
||
|
field contained in B<si>.
|
||
|
|
||
|
ossl_pkisi_snprint() places at max B<bufsize> characters of human-readable
|
||
|
error string of B<si> in pre-allocated B<buf>. Returns pointer to the same
|
||
|
B<buf> containing the string, or NULL on error.
|
||
|
|
||
|
=head1 NOTES
|
||
|
|
||
|
CMP is defined in RFC 4210 (and CRMF in RFC 4211).
|
||
|
|
||
|
=head1 RETURN VALUES
|
||
|
|
||
|
See the individual functions above.
|
||
|
|
||
|
=head1 SEE ALSO
|
||
|
|
||
|
L<OSSL_CMP_CTX_new(3)>, L<ossl_cmp_certreq_new(3)>
|
||
|
|
||
|
=head1 HISTORY
|
||
|
|
||
|
The OpenSSL CMP support was added in OpenSSL 3.0.
|
||
|
|
||
|
=head1 COPYRIGHT
|
||
|
|
||
|
Copyright 2007-2019 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
|