mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
improve SEA Cert security, still need much improvement in check.pub, unfinished
This commit is contained in:
parent
be6dcf0f99
commit
37da3cc8ea
7
sea.js
7
sea.js
@ -1335,10 +1335,9 @@
|
||||
// even if cert exists, we must verify it
|
||||
if (cert && cert.m && cert.s) {
|
||||
SEA.verify(cert, pub, data => {
|
||||
if (u !== data) {
|
||||
msg.put[':']['+'] = cert // '+' is a certificate
|
||||
msg.put[':']['*'] = user.is.pub // '*' is pub of the user who puts
|
||||
}
|
||||
if (u === data) return no("Certificate verification fail.")
|
||||
msg.put[':']['+'] = cert // '+' is a certificate
|
||||
msg.put[':']['*'] = user.is.pub // '*' is pub of the user who puts
|
||||
msg.put[':'] = JSON.stringify(msg.put[':'])
|
||||
return eve.to.next(msg)
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user