Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sso
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
ai
sso
Commits
c8c2bb63
Commit
c8c2bb63
authored
Aug 12, 2013
by
ale
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
include NaCl error message in the exception raised from verify()
parent
9dc1095a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
6 deletions
+15
-6
src/sso/sso.h
src/sso/sso.h
+10
-4
src/sso/verifier.cc
src/sso/verifier.cc
+5
-2
No files found.
src/sso/sso.h
View file @
c8c2bb63
...
...
@@ -37,14 +37,20 @@ namespace sso {
class
sso_error
:
public
std
::
exception
{
public:
sso_error
(
const
char
*
s
)
:
str_
(
s
)
:
str_
(
s
)
{}
sso_error
(
const
std
::
string
&
s
)
:
str_
(
s
)
{}
virtual
~
sso_error
()
throw
()
{}
const
char
*
what
()
const
throw
()
{
return
str_
;
return
str_
.
c_str
()
;
}
const
char
*
str_
;
std
::
string
str_
;
};
std
::
string
read_key_from_file
(
const
std
::
string
&
path
);
...
...
src/sso/verifier.cc
View file @
c8c2bb63
...
...
@@ -69,8 +69,11 @@ Ticket *Verifier::verify(const string& ticket_string) throw(sso_error)
// Decode the ticket from the unsigned string.
ticket
=
new
Ticket
(
verified_ticket_string
);
}
catch
(...)
{
throw
sso_error
(
"signature verification failure"
);
}
catch
(
const
char
*
err
)
{
// Yes, NaCl throws a const char*.
string
reason
(
"signature verification failure: "
);
reason
+=
err
;
throw
sso_error
(
reason
);
}
// Verification phase.
...
...
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