Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
98aa5be3
Commit
98aa5be3
authored
7 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
add_public_key() takes a public key, not a private one.
parent
07e23d4e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/js_cryptcert.c
+1
-2
1 addition, 2 deletions
src/sbbs3/js_cryptcert.c
src/sbbs3/js_cryptcert.h
+2
-0
2 additions, 0 deletions
src/sbbs3/js_cryptcert.h
src/sbbs3/js_cryptkeyset.c
+2
-2
2 additions, 2 deletions
src/sbbs3/js_cryptkeyset.c
with
5 additions
and
4 deletions
src/sbbs3/js_cryptcert.c
+
1
−
2
View file @
98aa5be3
...
...
@@ -9,7 +9,6 @@
#include
"js_cryptcert.h"
#include
"ssl.h"
static
JSClass
js_cryptcert_class
;
static
const
char
*
getprivate_failure
=
"line %d %s %s JS_GetPrivate failed"
;
// Helpers
...
...
@@ -2564,7 +2563,7 @@ static JSBool js_cryptcert_enumerate(JSContext *cx, JSObject *obj)
return
(
js_cryptcert_resolve
(
cx
,
obj
,
JSID_VOID
));
}
static
JSClass
js_cryptcert_class
=
{
JSClass
js_cryptcert_class
=
{
"CryptCert"
/* name */
,
JSCLASS_HAS_PRIVATE
/* flags */
,
JS_PropertyStub
/* addProperty */
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/js_cryptcert.h
+
2
−
0
View file @
98aa5be3
...
...
@@ -5,6 +5,8 @@ struct js_cryptcert_private_data {
CRYPT_CERTIFICATE
cert
;
};
extern
JSClass
js_cryptcert_class
;
JSObject
*
DLLCALL
js_CreateCryptCertObject
(
JSContext
*
cx
,
CRYPT_CERTIFICATE
cert
);
#endif
This diff is collapsed.
Click to expand it.
src/sbbs3/js_cryptkeyset.c
+
2
−
2
View file @
98aa5be3
...
...
@@ -114,8 +114,8 @@ js_add_public_key(JSContext *cx, uintN argc, jsval *arglist)
return
JS_FALSE
;
}
cert
=
JSVAL_TO_OBJECT
(
argv
[
0
]);
if
(
!
JS_InstanceOf
(
cx
,
cert
,
&
js_cryptc
on
_class
,
NULL
))
{
JS_ReportError
(
cx
,
"Invalid CryptC
ontex
t"
);
if
(
!
JS_InstanceOf
(
cx
,
cert
,
&
js_cryptc
ert
_class
,
NULL
))
{
JS_ReportError
(
cx
,
"Invalid CryptC
er
t"
);
return
JS_FALSE
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment