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