mirror of
https://github.com/OpenVPN/openvpn.git
synced 2026-06-13 19:00:00 -04:00
Fixed static defined length check to use sizeof()
This comes in addition to commit 935c62be9c after some
additional review comments.
Signed-off-by: Emilien Mantel <emilien.mantel@businessdecision.com>
Acked-by: Peter Stuge <peter@stuge.se>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
This commit is contained in:
parent
935c62be9c
commit
031d18fcb8
1 changed files with 1 additions and 1 deletions
2
ssl.c
2
ssl.c
|
|
@ -775,7 +775,7 @@ verify_callback (int preverify_ok, X509_STORE_CTX * ctx)
|
|||
string_replace_leading (subject, '-', '_');
|
||||
|
||||
/* extract the username (default is CN) */
|
||||
if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, TLS_USERNAME_LEN))
|
||||
if (!extract_x509_field_ssl (X509_get_subject_name (ctx->current_cert), x509_username_field, common_name, sizeof(common_name)))
|
||||
{
|
||||
if (!ctx->error_depth)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue