coffin

secure lan file storage on a device
git clone git://parazyd.org/coffin.git
Log | Files | Refs | Submodules | README | LICENSE

genssl.sh (1243B)


      1 #!/bin/sh
      2 #
      3 # Copyright (c) 2016 Dyne.org Foundation
      4 # coffin is written and maintained by Ivan J. <parazyd@dyne.org>
      5 #
      6 # This file is part of coffin
      7 #
      8 # This source code is free software: you can redistribute it and/or modify
      9 # it under the terms of the GNU General Public License as published by
     10 # the Free Software Foundation, either version 3 of the License, or
     11 # (at your option) any later version.
     12 #
     13 # This software is distributed in the hope that it will be useful,
     14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
     15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     16 # GNU General Public License for more details.
     17 #
     18 # You should have received a copy of the GNU General Public License
     19 # along with this source code. If not, see <http://www.gnu.org/licenses/>.
     20 
     21 ## generate ssl cert for webdav
     22 openssl req -x509 -nodes -days 3650 -newkey rsa:4096 \
     23 	-keyout coffin.key -out coffin.pem
     24 
     25 fprint=$(openssl x509 -noout -in ./coffin.pem -fingerprint \
     26 	| awk -F\= '{print $2}')
     27 
     28 cat <<EOM
     29 
     30 #############################
     31 Successfully generated coffin's webdav ssl certificate!
     32 The fingerprint is: ${fprint}
     33 Compare it and/or set it as trusted when you connect to coffin.
     34 #############################
     35 EOM