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
3ae52bd2
Commit
3ae52bd2
authored
Jun 08, 2017
by
Oleg Korshul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
227d4f18
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
5 deletions
+33
-5
DesktopEditor/xmlsec/src/include/XmlCertificate.h
DesktopEditor/xmlsec/src/include/XmlCertificate.h
+2
-1
DesktopEditor/xmlsec/src/src/XmlSigner_openssl.h
DesktopEditor/xmlsec/src/src/XmlSigner_openssl.h
+31
-4
No files found.
DesktopEditor/xmlsec/src/include/XmlCertificate.h
View file @
3ae52bd2
...
...
@@ -8,6 +8,7 @@
#define OOXML_HASH_ALG_SHA1 0
#define OOXML_HASH_ALG_INVALID 1
class
ICertificate
;
class
Q_DECL_EXPORT
ICertificateSelectDialogOpenSsl
{
public:
...
...
@@ -26,7 +27,7 @@ public:
virtual
std
::
wstring
GetKeyPassword
()
=
0
;
virtual
bool
ShowSelectDialog
()
=
0
;
virtual
int
ShowCertificate
()
=
0
;
virtual
int
ShowCertificate
(
ICertificate
*
pCert
)
=
0
;
};
class
Q_DECL_EXPORT
CCertificateInfo
...
...
DesktopEditor/xmlsec/src/src/XmlSigner_openssl.h
View file @
3ae52bd2
...
...
@@ -281,14 +281,41 @@ public:
public:
virtual
bool
ShowSelectDialog
()
{
if
(
m_pDialog
)
return
m_pDialog
->
ShowSelectDialog
();
return
false
;
if
(
!
m_pDialog
)
return
false
;
bool
bResult
=
m_pDialog
->
ShowSelectDialog
();
std
::
wstring
sKeyPath
=
m_pDialog
->
GetKeyPath
();
std
::
wstring
sKeyPasswordW
=
m_pDialog
->
GetKeyPassword
();
std
::
string
sKeyPassword
=
U_TO_UTF8
(
sKeyPasswordW
);
std
::
wstring
sCertPath
=
m_pDialog
->
GetCertificatePath
();
std
::
wstring
sCertPasswordW
=
m_pDialog
->
GetCertificatePassword
();
std
::
string
sCertPassword
=
U_TO_UTF8
(
sCertPasswordW
);
if
(
sCertPath
.
empty
())
{
sCertPath
=
sKeyPath
;
sCertPassword
=
sKeyPassword
;
}
int
nErr
=
LoadKey
(
sKeyPath
,
sKeyPassword
,
&
m_key
);
if
(
nErr
!=
OPEN_SSL_WARNING_OK
&&
nErr
!=
OPEN_SSL_WARNING_ALL_OK
)
return
false
;
nErr
=
LoadCert
(
sCertPath
,
sCertPassword
,
&
m_cert
);
if
(
nErr
!=
OPEN_SSL_WARNING_OK
&&
nErr
!=
OPEN_SSL_WARNING_ALL_OK
)
return
false
;
return
true
;
}
virtual
int
ShowCertificate
()
{
if
(
m_pDialog
)
return
m_pDialog
->
ShowCertificate
();
return
m_pDialog
->
ShowCertificate
(
this
);
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