提交 1f18f50c 编写于 作者: G Geoff Keating 提交者: Rich Salz

RT1909: Omit version for v1 certificates

When calling X509_set_version to set v1 certificate, that
should mean that the version number field is omitted.
Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 4eadd11c
......@@ -66,6 +66,12 @@
int X509_set_version(X509 *x, long version)
{
if (x == NULL) return(0);
if (version == 0)
{
M_ASN1_INTEGER_free(x->cert_info->version);
x->cert_info->version = NULL;
return(1);
}
if (x->cert_info->version == NULL)
{
if ((x->cert_info->version=M_ASN1_INTEGER_new()) == NULL)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册