apl-cornell / fabric

Distributed persistent programming language with secure information flow types
http://www.cs.cornell.edu/projects/fabric/
Other
28 stars 4 forks source link

Autogenerating Certificates #11

Open K33TY opened 7 years ago

K33TY commented 7 years ago

The last time that the manual has explicitly mentioned issuing new node certificates for examples is:

Version history Version 0.2.1 (Jun 2013)

Issued fresh node certificates for examples. The old ones had expired.

Would be useful to have continuous integration do this OR have them be issued on build of examples.

K33TY commented 6 years ago

Following Fabric Manual instruction (bin/make-node --app-home /opt/fabric --name valinor --trust-ca-cert) for creating keys that auto trust the CA certificate is hanging forever with the following result:

Signature ok
subject=/CN=airline
Getting CA Private Key

===============================================================================

Signed certificate saved in /tmp/21690.crt

Copy this file to that node and run the `import-cert' script there.
sed: 1: "s/^subject *= *//i": bad flag in substitute command: 'i'

This makes it hard to autogenerate more than one key at time in a bash script because control+c out of the call of make-node closes that script too.

tmagrino commented 6 years ago

This looks like a version problem between GNU sed and whatever version of sed Mac OS ships with. Making a note here to look into how to make this bug (in bin/make-ca) less version specific.

andrewcmyers commented 6 years ago

Use perl -n instead of sed -i

K33TY commented 6 years ago

I used homebrew to try installing gnu-sed, and I still get the bash being stuck in an infinite loop between it trying to call sed+grep+bash as before (except this time without the error message)...

Also tried perl idea, but getting the same looping behavior...

Also tried perl -e and perl -npe. no luck


Looking at the partially generated *.keystore file: Could it be because of it trying to load in a weird encoding not being able to find subject=?

When I cat it, it looks like:

Obit:travel Elizabeth$ cat etc/keys/airline.keystore 
????airline`M<6T0??0
+*??M~?H?$?f`?X\?r??h??fb?3?6?e??)Y???/????@kPA,[??>ϳ?j̶q2???pk!??H??/?z]???
                                                                           ?,?/?v?f??!??nΖH??n??zs{?t>"??q?R?,?O/?*c\a
?4??X<DyU??~???V"l??@ܖ??-[S?m???ﷱ??vK2s???!??f?f?.?8?,eZ?k?1?v??^j??g\u!?]?*<??Ӏ2k?P?Il.5}hK??????&                   /`??
;c?B?L??O(KTvl?5                                                                                   ?Ж??Z??_>?]??ʒյ?}???'5?
                <F?+7?֙qKO$?J?t?O??0}0|-?}c??????w????֑nT??w??/??
                                                               ?>??+a0???"???Ʊ7???;^??F?MLW?dG??Df??????l?!?ҬPd?R???do?(?6?d????????}?ZM?A?.>E?|?2???(?5??O???5޳????c?&?8????r??6?0??H+9Ŏ?S"???A?L?wQ???]?p?8?2???.?.??aȯ%?`   ?!#???6?MjU?R?"K??B?????S?7?%?Ϊlڸ??hi4????I?'J\???S?x???n#ݶy???EJd~????}hmק????????!TqGT????)?w???  ??v&?H?du?P?e??t?<?<lqj?-߂r
                                                                                                                                                                   VG???RMv?H??aT?R?_????B???0??y?b?lj?7FK?K?m?d??c7?>?t?Ϡ\??"??\??8?*m??w̒??'?8FoN???W?/!??Ë?p{?q;5i??'(,??4
                                                                             ????3".yj>€?
?7P??d5??\M?H????%?G?+?(?%cW7?H?}~?!???Z`4?YU?(?·?%Z?W?^>?J???wG5???vj"p? d6?絩5???y?sB?b?
??0?K?Ja6?-??v??P???{??񹕉ȀU??2??R?!K?tT??
        *?H??                           ?Kd%;B,n?i)X.509?0??0???d?@?0
?0?31300*?H??010Uairline0?"0
??Ʊ?Ԩ{&?K???H?L??|????Isߪ?VӛB`????????zp????9/?f?QF??z(E???HW   ?????_
R?U?5?u`ڽ??kDK??Ω)c_Z??
                       ?;e?XT*,??Y??c
        *?H??                        ??Db?U?    'c??^????!F?L??;f???j??@?E.󻩷yT?}?_w?!00UK9߈Z˫?KY??????0
????
?wt??i#?????pa8g?Ŗ11Սa???e3b?l?8?`??s[7B^????IJ??PG0???v6?NzR??s????ߠ>??0?`???O??K??%?f????