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
c3898019
Commit
c3898019
authored
Jun 15, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
24214cb5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
DesktopEditor/xmlsec/src/src/OOXMLSigner.cpp
DesktopEditor/xmlsec/src/src/OOXMLSigner.cpp
+17
-0
No files found.
DesktopEditor/xmlsec/src/src/OOXMLSigner.cpp
View file @
c3898019
#include "./../include/OOXMLSigner.h"
#include "./../src/XmlTransform.h"
#include <cstdio>
#include <ctime>
#include <time.h>
class
COOXMLSigner_private
{
...
...
@@ -28,6 +31,20 @@ public:
m_date
=
L"2017-04-21T08:30:21Z"
;
std
::
time_t
rawtime
;
std
::
tm
*
timeinfo
;
char
buffer1
[
100
];
char
buffer2
[
100
];
std
::
time
(
&
rawtime
);
timeinfo
=
std
::
gmtime
(
&
rawtime
);
std
::
strftime
(
buffer1
,
100
,
"%Y-%m-%d"
,
timeinfo
);
std
::
strftime
(
buffer2
,
100
,
"%H:%M:%S"
,
timeinfo
);
std
::
string
date
=
(
std
::
string
(
buffer1
)
+
"T"
+
std
::
string
(
buffer2
)
+
"Z"
);
m_date
=
NSFile
::
CUtf8Converter
::
GetUnicodeFromCharPtr
(
date
);
m_signed_info
.
WriteString
(
"<CanonicalizationMethod Algorithm=
\"
http://www.w3.org/TR/2001/REC-xml-c14n-20010315
\"
/>"
);
m_signed_info
.
WriteString
(
"<SignatureMethod Algorithm=
\"
http://www.w3.org/2000/09/xmldsig#rsa-sha1
\"
/>"
);
}
...
...
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