File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -455,6 +455,7 @@ int main(int argc, char **argv)
455455
456456 /* distinguished name for requested certificate, ASCII format */
457457 char * distinguishedName = NULL ;
458+ char default_distinguished_name [BUF_LEN ];
458459
459460 /* challenge password */
460461 char challenge_password_buffer [MAX_PASSWORD_LENGTH ];
@@ -1105,16 +1106,16 @@ int main(int argc, char **argv)
11051106 {
11061107 if (distinguishedName == NULL )
11071108 {
1108- char buf [BUF_LEN ];
1109- int n = sprintf (buf , DEFAULT_DN );
1109+ int n = sprintf (default_distinguished_name , DEFAULT_DN );
11101110
11111111 /* set the common name to the hostname */
1112- if (gethostname (buf + n , BUF_LEN - n ) || strlen (buf ) == n )
1112+ if (gethostname (default_distinguished_name + n , BUF_LEN - n ) ||
1113+ strlen (default_distinguished_name ) == n )
11131114 {
11141115 exit_scepclient ("no hostname defined, use "
11151116 "--dn <distinguished name> option" );
11161117 }
1117- distinguishedName = buf ;
1118+ distinguishedName = default_distinguished_name ;
11181119 }
11191120
11201121 DBG2 (DBG_APP , "dn: '%s'" , distinguishedName );
You can’t perform that action at this time.
0 commit comments