Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
osie
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
osie
Commits
5b0472e9
Commit
5b0472e9
authored
Mar 21, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup.
parent
7f000f8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+5
-2
No files found.
coupler/opc-ua-server/server.c
View file @
5b0472e9
...
@@ -187,6 +187,9 @@ int main(int argc, char **argv)
...
@@ -187,6 +187,9 @@ int main(int argc, char **argv)
signal
(
SIGINT
,
stopHandler
);
signal
(
SIGINT
,
stopHandler
);
signal
(
SIGTERM
,
stopHandler
);
signal
(
SIGTERM
,
stopHandler
);
bool
addx509
=
strlen
(
arguments
.
key
)
>
0
&&
strlen
(
arguments
.
certificate
);
bool
addUserNamePasswordAuthentication
=
strlen
(
arguments
.
username
)
>
0
&&
strlen
(
arguments
.
password
)
>
0
;
UA_Server
*
server
=
UA_Server_new
();
UA_Server
*
server
=
UA_Server_new
();
UA_ServerConfig_setMinimal
(
UA_Server_getConfig
(
server
),
arguments
.
port
,
NULL
);
UA_ServerConfig_setMinimal
(
UA_Server_getConfig
(
server
),
arguments
.
port
,
NULL
);
UA_ServerConfig
*
config
=
UA_Server_getConfig
(
server
);
UA_ServerConfig
*
config
=
UA_Server_getConfig
(
server
);
...
@@ -197,7 +200,7 @@ int main(int argc, char **argv)
...
@@ -197,7 +200,7 @@ int main(int argc, char **argv)
addValueCallbackToCurrentTimeVariable
(
server
);
addValueCallbackToCurrentTimeVariable
(
server
);
/* Disable anonymous logins, enable two user/password logins */
/* Disable anonymous logins, enable two user/password logins */
if
(
strlen
(
arguments
.
username
)
>
0
&&
strlen
(
arguments
.
password
)
>
0
){
if
(
addUserNamePasswordAuthentication
){
char
*
username
=
arguments
.
username
;
char
*
username
=
arguments
.
username
;
char
*
password
=
arguments
.
password
;
char
*
password
=
arguments
.
password
;
UA_UsernamePasswordLogin
logins
[
1
]
=
{
UA_UsernamePasswordLogin
logins
[
1
]
=
{
...
@@ -211,7 +214,7 @@ int main(int argc, char **argv)
...
@@ -211,7 +214,7 @@ int main(int argc, char **argv)
/* Enable x509 */
/* Enable x509 */
#ifdef UA_ENABLE_ENCRYPTION
#ifdef UA_ENABLE_ENCRYPTION
if
(
strlen
(
arguments
.
key
)
>
0
&&
strlen
(
arguments
.
certificate
)
>
0
){
if
(
addx509
){
char
*
key_filename
=
arguments
.
key
;
char
*
key_filename
=
arguments
.
key
;
char
*
certificate_filename
=
arguments
.
certificate
;
char
*
certificate_filename
=
arguments
.
certificate
;
/* Load certificate and private key */
/* Load certificate and private key */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment