Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
Practical-Cryptdb
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Zhaozhen
Practical-Cryptdb
Commits
4ac47930
Commit
4ac47930
authored
Mar 25, 2018
by
yiwenshao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add comments
parent
7201cb3c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
15 deletions
+9
-15
CURRENT.conf
conf/CURRENT.conf
+4
-4
CryptoHandlers.cc
main/CryptoHandlers.cc
+0
-10
schema.cc
main/schema.cc
+4
-0
parser.cc
test_parser/parser.cc
+1
-1
No files found.
conf/CURRENT.conf
View file @
4ac47930
...
@@ -3,10 +3,10 @@
...
@@ -3,10 +3,10 @@
#oAGG: HOM
#oAGG: HOM
#oASHE: ASHE
#oASHE: ASHE
[
onions
for
num
]
[
onions
for
num
]
oDET
:
DET
RND
#
oDET: DET RND
oOPE
:
OPE
RND
#
oOPE: OPE RND
#
oAGG: HOM
oAGG
:
HOM
oASHE
:
ASHE
#
oASHE: ASHE
[
end
]
[
end
]
...
...
main/CryptoHandlers.cc
View file @
4ac47930
...
@@ -230,33 +230,24 @@ EncLayerFactory::deserializeLayer(unsigned int id,
...
@@ -230,33 +230,24 @@ EncLayerFactory::deserializeLayer(unsigned int id,
const
std
::
string
&
serial
){
const
std
::
string
&
serial
){
assert
(
id
);
assert
(
id
);
const
SerialLayer
li
=
serial_unpack
(
serial
);
const
SerialLayer
li
=
serial_unpack
(
serial
);
switch
(
li
.
l
)
{
switch
(
li
.
l
)
{
case
SECLEVEL
:
:
RND
:
case
SECLEVEL
:
:
RND
:
return
RNDFactory
::
deserialize
(
id
,
li
);
return
RNDFactory
::
deserialize
(
id
,
li
);
case
SECLEVEL
:
:
DET
:
case
SECLEVEL
:
:
DET
:
return
DETFactory
::
deserialize
(
id
,
li
);
return
DETFactory
::
deserialize
(
id
,
li
);
case
SECLEVEL
:
:
DETJOIN
:
case
SECLEVEL
:
:
DETJOIN
:
return
DETJOINFactory
::
deserialize
(
id
,
li
);
return
DETJOINFactory
::
deserialize
(
id
,
li
);
case
SECLEVEL
:
:
OPEFOREIGN
:
case
SECLEVEL
:
:
OPEFOREIGN
:
return
OPEFOREIGNFactory
::
deserialize
(
id
,
li
);
return
OPEFOREIGNFactory
::
deserialize
(
id
,
li
);
case
SECLEVEL
:
:
OPE
:
case
SECLEVEL
:
:
OPE
:
return
OPEFactory
::
deserialize
(
id
,
li
);
return
OPEFactory
::
deserialize
(
id
,
li
);
case
SECLEVEL
:
:
HOM
:
case
SECLEVEL
:
:
HOM
:
return
std
::
unique_ptr
<
EncLayer
>
(
new
HOM
(
id
,
serial
));
return
std
::
unique_ptr
<
EncLayer
>
(
new
HOM
(
id
,
serial
));
case
SECLEVEL
:
:
ASHE
:
return
std
::
unique_ptr
<
EncLayer
>
(
new
ASHE
(
id
,
serial
));
case
SECLEVEL
:
:
ASHE
:
return
std
::
unique_ptr
<
EncLayer
>
(
new
ASHE
(
id
,
serial
));
case
SECLEVEL
:
:
SEARCH
:
case
SECLEVEL
:
:
SEARCH
:
return
std
::
unique_ptr
<
EncLayer
>
(
new
Search
(
id
,
serial
));
return
std
::
unique_ptr
<
EncLayer
>
(
new
Search
(
id
,
serial
));
case
SECLEVEL
:
:
PLAINVAL
:
case
SECLEVEL
:
:
PLAINVAL
:
return
std
::
unique_ptr
<
EncLayer
>
(
new
PlainText
(
id
));
return
std
::
unique_ptr
<
EncLayer
>
(
new
PlainText
(
id
));
default
:
{}
default
:
{}
}
}
FAIL_TextMessageError
(
"unknown or unimplemented security level"
);
FAIL_TextMessageError
(
"unknown or unimplemented security level"
);
...
@@ -286,7 +277,6 @@ lowLevelcreateFieldHelper(const Create_field &f,
...
@@ -286,7 +277,6 @@ lowLevelcreateFieldHelper(const Create_field &f,
const
std
::
string
&
anonname
=
""
,
const
std
::
string
&
anonname
=
""
,
CHARSET_INFO
*
const
charset
=
NULL
)
CHARSET_INFO
*
const
charset
=
NULL
)
{
{
//从内存分配新的Create_field
const
THD
*
const
thd
=
current_thd
;
const
THD
*
const
thd
=
current_thd
;
Create_field
*
const
f0
=
f
.
clone
(
thd
->
mem_root
);
Create_field
*
const
f0
=
f
.
clone
(
thd
->
mem_root
);
f0
->
length
=
field_length
;
f0
->
length
=
field_length
;
...
...
main/schema.cc
View file @
4ac47930
...
@@ -109,6 +109,10 @@ std::string OnionMeta::getAnonOnionName() const{
...
@@ -109,6 +109,10 @@ std::string OnionMeta::getAnonOnionName() const{
return
onionname
;
return
onionname
;
}
}
/*
*Called by loadchildren.The deserialHelper uses the deserializer of the Enclayers to recover them, and the
*DBMeta::doFetchChildren reads raw data from embedded MySQL.
*/
std
::
vector
<
DBMeta
*>
std
::
vector
<
DBMeta
*>
OnionMeta
::
fetchChildren
(
const
std
::
unique_ptr
<
Connect
>
&
e_conn
){
OnionMeta
::
fetchChildren
(
const
std
::
unique_ptr
<
Connect
>
&
e_conn
){
std
::
function
<
DBMeta
*
(
const
std
::
string
&
,
std
::
function
<
DBMeta
*
(
const
std
::
string
&
,
...
...
test_parser/parser.cc
View file @
4ac47930
...
@@ -22,7 +22,7 @@ int main() {
...
@@ -22,7 +22,7 @@ int main() {
}
}
embeddedDir
=
std
::
string
(
buffer
)
+
"/shadow"
;
embeddedDir
=
std
::
string
(
buffer
)
+
"/shadow"
;
free
(
buffer
);
free
(
buffer
);
//
init_mysql(embeddedDir);
init_mysql
(
embeddedDir
);
std
::
string
filename
=
std
::
string
(
cryptdb_dir
)
+
"/test_parser/"
+
"template"
;
std
::
string
filename
=
std
::
string
(
cryptdb_dir
)
+
"/test_parser/"
+
"template"
;
std
::
string
line
=
"show databases;"
;
std
::
string
line
=
"show databases;"
;
std
::
unique_ptr
<
query_parse
>
p
;
std
::
unique_ptr
<
query_parse
>
p
;
...
...
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