diff options
author | Emilien Mantel <emilien.mantel@businessdecision.com> | 2010-06-26 13:56:48 +0200 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-06-26 13:56:48 +0200 |
commit | 031d18fcb8a2a552aecabb41f1afdfe3f51bdd58 (patch) | |
tree | b8f9afb2b8beb5d0378147cc02bea2e5d2696ac5 | |
parent | Choose a different field in X509 to be username (diff) | |
download | openvpn-031d18fcb8a2a552aecabb41f1afdfe3f51bdd58.tar.xz |
Fixed static defined length check to use sizeof()
This comes in addition to commit 935c62be9c0c8a256112d 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>
-rw-r--r-- | ssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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) { |