Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
onlyoffice_core
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
onlyoffice_core
Commits
e3e05eb2
Commit
e3e05eb2
authored
May 31, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test
parent
c09f17cf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
DesktopEditor/xmlsec/test/windows/main.cpp
DesktopEditor/xmlsec/test/windows/main.cpp
+8
-8
No files found.
DesktopEditor/xmlsec/test/windows/main.cpp
View file @
e3e05eb2
...
...
@@ -42,6 +42,8 @@
#include <xmlsec/templates.h>
#include <xmlsec/crypto.h>
#include "../../../common/File.h"
int
sign_file
(
const
char
*
xml_file
,
const
char
*
key_file
,
const
char
*
cert_file
);
int
...
...
@@ -50,13 +52,11 @@ main(int argc, char **argv) {
xsltSecurityPrefsPtr
xsltSecPrefs
=
NULL
;
#endif
/* XMLSEC_NO_XSLT */
assert
(
argv
);
if
(
argc
!=
4
)
{
fprintf
(
stderr
,
"Error: wrong number of arguments.
\n
"
);
fprintf
(
stderr
,
"Usage: %s <xml-file> <key-file> <cert-file>
\n
"
,
argv
[
0
]);
return
(
1
);
}
std
::
wstring
sFolderW
=
NSFile
::
GetProcessDirectory
();
std
::
string
sFolder
=
U_TO_UTF8
(
sFolderW
);
std
::
string
__file
=
sFolder
+
"/settings.xml"
;
std
::
string
__key
=
sFolder
+
"/rsakey.pem"
;
std
::
string
__cert
=
sFolder
+
"/rsacert.pem"
;
/* Init libxml and libxslt libraries */
xmlInitParser
();
...
...
@@ -117,7 +117,7 @@ main(int argc, char **argv) {
return
(
-
1
);
}
if
(
sign_file
(
argv
[
1
],
argv
[
2
],
argv
[
3
]
)
<
0
)
{
if
(
sign_file
(
__file
.
c_str
(),
__key
.
c_str
(),
__cert
.
c_str
()
)
<
0
)
{
return
(
-
1
);
}
...
...
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