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
1
Merge Requests
1
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
3e3d9e95
Commit
3e3d9e95
authored
Feb 15, 2022
by
Ivan Tyagov
Browse files
Options
Browse Files
Download
Plain Diff
X509
See merge request
nexedi/osie!13
parents
e5722c00
39d24d4c
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
196 additions
and
88 deletions
+196
-88
coupler/opc-ua-server/Makefile
coupler/opc-ua-server/Makefile
+1
-1
coupler/opc-ua-server/common.h
coupler/opc-ua-server/common.h
+37
-0
coupler/opc-ua-server/server.c
coupler/opc-ua-server/server.c
+154
-87
slapos/software/osie-coupler/software-opc-ua.cfg
slapos/software/osie-coupler/software-opc-ua.cfg
+4
-0
No files found.
coupler/opc-ua-server/Makefile
View file @
3e3d9e95
CC
=
$(C_COMPILER)
CFLAGS
=
-I
$(OPEN62541_SOURCE_HOME)
LDFLAGS
=
-L
$(OPEN62541_HOME)
/lib
LDFLAGS
=
-L
$(OPEN62541_HOME)
/lib
-lmbedcrypto
-lmbedx509
OUT_DIR
=
$(BINARY_OUT_DIR)
server
:
server.c
...
...
coupler/opc-ua-server/common.h
0 → 100644
View file @
3e3d9e95
/* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
* See http://creativecommons.org/publicdomain/zero/1.0/for more information. */
#include "open62541.h"
/* loadFile parses the certificate file.
*
* @param path specifies the file name given in argv[]
* @return Returns the file content after parsing */
static
UA_INLINE
UA_ByteString
loadFile
(
const
char
*
const
path
)
{
UA_ByteString
fileContents
=
UA_STRING_NULL
;
/* Open the file */
FILE
*
fp
=
fopen
(
path
,
"rb"
);
if
(
!
fp
)
{
errno
=
0
;
/* We read errno also from the tcp layer... */
return
fileContents
;
}
/* Get the file length, allocate the data and read */
fseek
(
fp
,
0
,
SEEK_END
);
fileContents
.
length
=
(
size_t
)
ftell
(
fp
);
fileContents
.
data
=
(
UA_Byte
*
)
UA_malloc
(
fileContents
.
length
*
sizeof
(
UA_Byte
));
if
(
fileContents
.
data
)
{
fseek
(
fp
,
0
,
SEEK_SET
);
size_t
read
=
fread
(
fileContents
.
data
,
sizeof
(
UA_Byte
),
fileContents
.
length
,
fp
);
if
(
read
!=
fileContents
.
length
)
UA_ByteString_clear
(
&
fileContents
);
}
else
{
fileContents
.
length
=
0
;
}
fclose
(
fp
);
return
fileContents
;
}
coupler/opc-ua-server/server.c
View file @
3e3d9e95
This diff is collapsed.
Click to expand it.
slapos/software/osie-coupler/software-opc-ua.cfg
View file @
3e3d9e95
...
...
@@ -22,6 +22,7 @@ recipe = slapos.recipe.build:gitclone
repository = https://github.com/open62541/open62541.git
branch = master
git-executable = ${git:location}/bin/git
revision = 931e0f0c0be04c311ef3c647d580b6eed01f40b3
[open62541]
recipe = slapos.recipe.cmmi
...
...
@@ -37,6 +38,8 @@ configure-options =
-DUA_ENABLE_PUBSUB_MONITORING=ON
-DUA_NAMESPACE_ZERO=FULL
-DUA_ENABLE_AMALGAMATION=ON
-DUA_ENABLE_ENCRYPTION=MBEDTLS
-DUA_ENABLE_ENCRYPTION_MBEDTLS=ON
[osie-repository]
recipe = slapos.recipe.build:gitclone
...
...
@@ -44,6 +47,7 @@ git-executable = ${git:location}/bin/git
# token must be removed if going public!!!
repository = https://gitlab+deploy-token-4:pLwtBu8TbusqZDKPUpZA@lab.nexedi.com/nexedi/osie.git
location = ${buildout:parts-directory}/osie
branch = x509
[compile-coupler]
recipe = slapos.recipe.cmmi
...
...
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