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
D
dfss
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mpcs
dfss
Commits
664f8e54
Commit
664f8e54
authored
Feb 09, 2016
by
Loïck Bonniot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CI] Add automatic build
parent
5fc99f19
Pipeline
#291
passed with stage
Changes
7
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
58 additions
and
33 deletions
+58
-33
.gitignore
.gitignore
+2
-0
.gitlab-ci.yml
.gitlab-ci.yml
+15
-0
Makefile
Makefile
+25
-0
build/embed/README.md
build/embed/README.md
+15
-0
dfssp/authority/rootCA.go
dfssp/authority/rootCA.go
+0
-12
dfssp/authority/rootCA_test.go
dfssp/authority/rootCA_test.go
+0
-20
dfssp/main.go
dfssp/main.go
+1
-1
No files found.
.gitignore
0 → 100644
View file @
664f8e54
build/embed/VERSION
release/
.gitlab-ci.yml
View file @
664f8e54
...
...
@@ -3,6 +3,7 @@ before_script:
stages
:
-
test
-
deploy
Unit tests
:
stage
:
test
...
...
@@ -71,3 +72,17 @@ Code lint:
-
"
cd
$GOPATH/src/dfss
&&
go
install
./..."
-
"
gometalinter
--install"
-
"
gometalinter
-t
--deadline=600s
-j1
--skip=api
--skip=fixtures
./..."
Deploy
:
stage
:
deploy
only
:
-
/^v[0-9]/
-
master
tags
:
-
golang
-
strong
script
:
-
"
ln
-s
-f
$(pwd)
$GOPATH/src/dfss"
-
"
./build/deps.sh"
-
"
make
release"
-
"
make
deploy"
Makefile
0 → 100644
View file @
664f8e54
REVISION
:=
$(
shell
git rev-parse HEAD
||
echo
)
VERSION
:=
$(
shell
git tag
--points-at
HEAD |
grep
-m1
v[0-9] |
sed
-e
's/^v//g'
)
ifeq
($(VERSION),)
VERSION
:=
master
endif
.PHONY
:
release
:
clean build_all package
clean
:
rm
-rf
release
build_all
:
go get github.com/mitchellh/gox
gox
-os
"linux darwin windows"
-parallel
1
-output
"release/dfss_
${VERSION}
_{{.OS}}_{{.Arch}}/{{.Dir}}"
dfss/dfssc dfss/dfssd dfss/dfssp
package
:
echo
"
$(VERSION)
$(REVISION)
"
>
build/embed/VERSION
cd
release
&&
ls
-1
.
| xargs
-n1
-I
{}
cp
../build/embed/
*
{}
/
cd
release
&&
ls
-1
.
| xargs
-n1
-I
{}
tar
zcvf
{}
.tar.gz
{}
deploy
:
mkdir
-p
/deploy/
$(VERSION)
cp
release/
*
.tar.gz /deploy/
$(VERSION)
/
build/embed/README.md
0 → 100644
View file @
664f8e54
DFSS
====
> Distributed Fair Signing System
Installation
------------
This archive contains all the needed DFSS modules to run a distributed multiparty signature.
You just have to untar the archive and run the following binaries:
```
bash
./dfssc
help
# Client
./dfssp
help
# Platform
./dfssd
help
# Demonstrator
```
dfssp/authority/rootCA.go
View file @
664f8e54
...
...
@@ -5,7 +5,6 @@ import (
"crypto/x509"
"dfss/auth"
"io/ioutil"
"os/user"
"path/filepath"
)
...
...
@@ -22,17 +21,6 @@ type PlatformID struct {
RootCA
*
x509
.
Certificate
}
// GetHomeDir determines the home directory of the current user.
func
GetHomeDir
()
string
{
usr
,
err
:=
user
.
Current
()
if
err
!=
nil
{
panic
(
err
)
}
return
usr
.
HomeDir
}
// GenerateRootCA constructs a self-signed certificate, using a unique serial number randomly generated
func
GenerateRootCA
(
days
int
,
country
,
organization
,
unit
,
cn
string
,
key
*
rsa
.
PrivateKey
)
([]
byte
,
error
)
{
serial
:=
auth
.
GenerateUID
()
...
...
dfssp/authority/rootCA_test.go
View file @
664f8e54
...
...
@@ -16,26 +16,6 @@ func TestMain(m *testing.M) {
os
.
Exit
(
m
.
Run
())
}
func
TestGetHomeDir
(
t
*
testing
.
T
)
{
res
:=
GetHomeDir
()
if
res
==
""
{
t
.
Fatal
(
"Result is empty"
)
}
}
func
TestGenerateRootCA
(
t
*
testing
.
T
)
{
res
,
err
:=
GenerateRootCA
(
365
,
"country"
,
"organization"
,
"unit"
,
"cn"
,
pkey
)
if
res
==
nil
||
err
!=
nil
{
t
.
Fatal
(
err
)
}
if
res
[
0
]
!=
'-'
{
t
.
Fatalf
(
"Bad format
\n
%s"
,
res
)
}
}
func
TestInitialize
(
t
*
testing
.
T
)
{
path
:=
os
.
TempDir
()
keyPath
:=
filepath
.
Join
(
path
,
PkeyFileName
)
...
...
dfssp/main.go
View file @
664f8e54
...
...
@@ -26,7 +26,7 @@ func init() {
flag
.
StringVar
(
&
port
,
"p"
,
"9000"
,
"Default port listening"
)
flag
.
StringVar
(
&
address
,
"a"
,
"0.0.0.0"
,
"Default address to bind for listening"
)
flag
.
StringVar
(
&
path
,
"path"
,
authority
.
GetHomeDir
()
,
"Path for the platform's private key and root certificate"
)
flag
.
StringVar
(
&
path
,
"path"
,
"."
,
"Path for the platform's private key and root certificate"
)
flag
.
StringVar
(
&
country
,
"country"
,
"France"
,
"Country for the root certificate"
)
flag
.
StringVar
(
&
org
,
"org"
,
"DFSS"
,
"Organization for the root certificate"
)
flag
.
StringVar
(
&
unit
,
"unit"
,
"INSA Rennes"
,
"Organizational unit for the root certificate"
)
...
...
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