]>
Commit | Line | Data |
---|---|---|
7eba43e8 PY |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
bc42bd62 PY |
5 | X509_get0_sm2_id, X509_set0_sm2_id, |
6 | X509_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 | ||
20 | X509_get0_sm2_id() gets the ID value of an SM2 certificate B<x> by returning an | |
21 | B<ASN1_OCTET_STRING> object which should not be freed by the caller. | |
ccf45361 PY |
22 | |
23 | X509_set0_sm2_id() sets the B<sm2_id> value to an SM2 certificate B<x>. Calling | |
24 | this function transfers the memory management of the value to the X509 object, | |
25 | and therefore the value that has been passed in should not be freed by the | |
26 | caller after this function has been called. | |
7eba43e8 | 27 | |
bc42bd62 PY |
28 | X509_REQ_get0_sm2_id() and X509_REQ_set0_sm2_id() have the same functionality |
29 | as X509_get0_sm2_id() and X509_set0_sm2_id() except that they deal with | |
30 | B<X509_REQ> objects instead of B<X509>. | |
31 | ||
7eba43e8 PY |
32 | =head1 NOTES |
33 | ||
34 | SM2 signature algorithm requires an ID value when generating and verifying a | |
35 | signature. The functions described in this manual provide the user with the | |
36 | ability to set and retrieve the SM2 ID value. | |
37 | ||
38 | =head1 RETURN VALUES | |
39 | ||
bc42bd62 | 40 | X509_set0_sm2_id() and X509_REQ_set0_sm2_id() do not return a value. |
7eba43e8 PY |
41 | |
42 | =head1 SEE ALSO | |
43 | ||
44 | L<X509_verify(3)>, L<SM2(7)> | |
45 | ||
46 | =head1 COPYRIGHT | |
47 | ||
48 | Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. | |
49 | ||
50 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
51 | this file except in compliance with the License. You can obtain a copy | |
52 | in the file LICENSE in the source distribution or at | |
53 | L<https://www.openssl.org/source/license.html>. | |
54 | ||
55 | =cut |