Make X509_set_sm2_id consistent with other setters
authorPaul Yang <yang.yang@baishancloud.com>
Mon, 1 Apr 2019 01:21:53 +0000 (10:21 +0900)
committerPaul Yang <yang.yang@baishancloud.com>
Tue, 9 Apr 2019 12:44:42 +0000 (20:44 +0800)
commitccf453610f48fe88968f0cfc63784b503eae33a0
treee91e6430ea6e7062bc01b31d686a0d79581c9e93
parentbbcaef632440067d173e2c4bfc40dd96ef2c0112
Make X509_set_sm2_id consistent with other setters

This commit makes the X509_set_sm2_id to 'set0' behaviour, which means
the memory management is passed to X509 and user doesn't need to free
the sm2_id parameter later. API name also changes to X509_set0_sm2_id.

Document and test case are also updated.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/8626)
apps/verify.c
crypto/include/internal/x509_int.h
crypto/x509/x_all.c
crypto/x509/x_x509.c
doc/man3/X509_get0_sm2_id.pod
include/openssl/x509.h
test/verify_extra_test.c
util/libcrypto.num