Debian Codegraph @

upstream/debian-unstable/man3/X509_ALGOR_dup.3ssl

raw
1 .\" -*- mode: troff; coding: utf-8 -*-
2 .\" Automatically generated by Pod::Man 5.0102 (Pod::Simple 3.45)
3 .\"
4 .\" Standard preamble:
5 .\" ========================================================================
6 .de Sp \" Vertical space (when we can't use .PP)
7 .if t .sp .5v
8 .if n .sp
9 ..
10 .de Vb \" Begin verbatim text
11 .ft CW
12 .nf
13 .ne \\$1
14 ..
15 .de Ve \" End verbatim text
16 .ft R
17 .fi
18 ..
19 .\" \*(C` and \*(C' are quotes in nroff, nothing in troff, for use with C<>.
20 .ie n \{\
21 . ds C` ""
22 . ds C' ""
23 'br\}
24 .el\{\
25 . ds C`
26 . ds C'
27 'br\}
28 .\"
29 .\" Escape single quotes in literal strings from groff's Unicode transform.
30 .ie \n(.g .ds Aq \(aq
31 .el .ds Aq '
32 .\"
33 .\" If the F register is >0, we'll generate index entries on stderr for
34 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
35 .\" entries marked with X<> in POD. Of course, you'll have to process the
36 .\" output yourself in some meaningful fashion.
37 .\"
38 .\" Avoid warning from groff about undefined register 'F'.
39 .de IX
40 ..
41 .nr rF 0
42 .if \n(.g .if rF .nr rF 1
43 .if (\n(rF:(\n(.g==0)) \{\
44 . if \nF \{\
45 . de IX
46 . tm Index:\\$1\t\\n%\t"\\$2"
47 ..
48 . if !\nF==2 \{\
49 . nr % 0
50 . nr F 2
51 . \}
52 . \}
53 .\}
54 .rr rF
55 .\" ========================================================================
56 .\"
57 .IX Title "X509_ALGOR_DUP 3SSL"
58 .TH X509_ALGOR_DUP 3SSL 2026-04-07 3.6.2 OpenSSL
59 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
60 .\" way too many mistakes in technical documents.
61 .if n .ad l
62 .nh
63 .SH NAME
64 X509_ALGOR_dup,
65 X509_ALGOR_set0, X509_ALGOR_get0,
66 X509_ALGOR_set_md, X509_ALGOR_cmp,
67 X509_ALGOR_copy \- AlgorithmIdentifier functions
68 .SH SYNOPSIS
69 .IX Header "SYNOPSIS"
70 .Vb 1
71 \& #include <openssl/x509.h>
72 \&
73 \& X509_ALGOR *X509_ALGOR_dup(X509_ALGOR *alg);
74 \& int X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int ptype, void *pval);
75 \& void X509_ALGOR_get0(const ASN1_OBJECT **paobj, int *pptype,
76 \& const void **ppval, const X509_ALGOR *alg);
77 \& void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md);
78 \& int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b);
79 \& int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src);
80 .Ve
81 .SH DESCRIPTION
82 .IX Header "DESCRIPTION"
83 \&\fBX509_ALGOR_dup()\fR returns a copy of \fIalg\fR.
84 .PP
85 \&\fBX509_ALGOR_set0()\fR sets the algorithm OID of \fIalg\fR to \fIaobj\fR and the
86 associated parameter type to \fIptype\fR with value \fIpval\fR. If \fIptype\fR is
87 \&\fBV_ASN1_UNDEF\fR the parameter is omitted, otherwise \fIptype\fR and \fIpval\fR have
88 the same meaning as the \fItype\fR and \fIvalue\fR parameters to \fBASN1_TYPE_set()\fR.
89 All the supplied parameters are used internally so must \fBNOT\fR be freed after
90 this call succeeded;
91 otherwise ownership remains with the caller and \fIalg\fR remains untouched.
92 .PP
93 \&\fBX509_ALGOR_get0()\fR is the inverse of \fBX509_ALGOR_set0()\fR: it returns the
94 algorithm OID in \fI*paobj\fR and the associated parameter in \fI*pptype\fR
95 and \fI*ppval\fR from the \fBAlgorithmIdentifier\fR \fIalg\fR.
96 .PP
97 \&\fBX509_ALGOR_set_md()\fR sets the \fBAlgorithmIdentifier\fR \fIalg\fR to appropriate
98 values for the message digest \fImd\fR.
99 .PP
100 \&\fBX509_ALGOR_cmp()\fR compares \fIa\fR and \fIb\fR and returns 0 if they have identical
101 encodings and nonzero otherwise.
102 .PP
103 \&\fBX509_ALGOR_copy()\fR copies the source values into the dest structs; making
104 a duplicate of each (and free any thing pointed to from within *dest).
105 .SH "RETURN VALUES"
106 .IX Header "RETURN VALUES"
107 \&\fBX509_ALGOR_dup()\fR returns a valid \fBX509_ALGOR\fR structure or NULL if an error
108 occurred.
109 .PP
110 \&\fBX509_ALGOR_set0()\fR and \fBX509_ALGOR_copy()\fR return 1 on success or 0 on error.
111 .PP
112 \&\fBX509_ALGOR_get0()\fR and \fBX509_ALGOR_set_md()\fR return no values.
113 .PP
114 \&\fBX509_ALGOR_cmp()\fR returns 0 if the two parameters have identical encodings and
115 nonzero otherwise.
116 .SH HISTORY
117 .IX Header "HISTORY"
118 The \fBX509_ALGOR_copy()\fR was added in 1.1.1e.
119 .SH COPYRIGHT
120 .IX Header "COPYRIGHT"
121 Copyright 2002\-2022 The OpenSSL Project Authors. All Rights Reserved.
122 .PP
123 Licensed under the Apache License 2.0 (the "License"). You may not use
124 this file except in compliance with the License. You can obtain a copy
125 in the file LICENSE in the source distribution or at
126 <https://www.openssl.org/source/license.html>.