]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/X509_get0_sm2_id.pod
Add CPU info to the speed command summary
[thirdparty/openssl.git] / doc / man3 / X509_get0_sm2_id.pod
CommitLineData
7eba43e8
PY
1=pod
2
3=head1 NAME
4
bc42bd62
PY
5X509_get0_sm2_id, X509_set0_sm2_id,
6X509_REQ_get0_sm2_id, X509_REQ_set0_sm2_id
7- get or set SM2 ID for certificate operations
7eba43e8
PY
8
9=head1 SYNOPSIS
10
11 #include <openssl/x509.h>
12
13 ASN1_OCTET_STRING *X509_get0_sm2_id(X509 *x);
ccf45361 14 void X509_set0_sm2_id(X509 *x, ASN1_OCTET_STRING *sm2_id);
bc42bd62
PY
15 ASN1_OCTET_STRING *X509_REQ_get0_sm2_id(X509_REQ *x);
16 void X509_REQ_set0_sm2_id(X509_REQ *x, ASN1_OCTET_STRING *sm2_id);
7eba43e8
PY
17
18=head1 DESCRIPTION
19
20X509_get0_sm2_id() gets the ID value of an SM2 certificate B<x> by returning an
21B<ASN1_OCTET_STRING> object which should not be freed by the caller.
ccf45361
PY
22
23X509_set0_sm2_id() sets the B<sm2_id> value to an SM2 certificate B<x>. Calling
24this function transfers the memory management of the value to the X509 object,
25and therefore the value that has been passed in should not be freed by the
26caller after this function has been called.
7eba43e8 27
bc42bd62
PY
28X509_REQ_get0_sm2_id() and X509_REQ_set0_sm2_id() have the same functionality
29as X509_get0_sm2_id() and X509_set0_sm2_id() except that they deal with
30B<X509_REQ> objects instead of B<X509>.
31
7eba43e8
PY
32=head1 NOTES
33
34SM2 signature algorithm requires an ID value when generating and verifying a
35signature. The functions described in this manual provide the user with the
36ability to set and retrieve the SM2 ID value.
37
38=head1 RETURN VALUES
39
bc42bd62 40X509_set0_sm2_id() and X509_REQ_set0_sm2_id() do not return a value.
7eba43e8
PY
41
42=head1 SEE ALSO
43
44L<X509_verify(3)>, L<SM2(7)>
45
46=head1 COPYRIGHT
47
48Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
49
50Licensed under the Apache License 2.0 (the "License"). You may not use
51this file except in compliance with the License. You can obtain a copy
52in the file LICENSE in the source distribution or at
53L<https://www.openssl.org/source/license.html>.
54
55=cut