Fix a double free issue when signing SM2 cert
authorPaul Yang <kaishen.yy@antfin.com>
Fri, 20 Sep 2019 16:32:57 +0000 (00:32 +0800)
committerPaul Yang <kaishen.yy@antfin.com>
Sun, 29 Sep 2019 01:54:19 +0000 (09:54 +0800)
commitdbb72124cdf1ad0dc223cfd570219e9af043ce7f
tree5a4058e351a6420919b38952f1a0088fe1a44a05
parente7fb44e7c3f7a37ff83a6b69ba51a738e549bf5c
Fix a double free issue when signing SM2 cert

If the SM2 ID value has not been passed correctly when signing an SM2
certificate/certificate request, a double free occurs. For instance:

  openssl req -x509 ... -sm2-id 1234567812345678

The '-sm2-id' should not be used in this scenario, while the '-sigopt' is
the correct one to use. Documentation has also been updated to make the
options more clear.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/9958)
apps/req.c
doc/man1/openssl-req.pod