Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread David du Colombier
 The existing identifiers are prefixed with oid_; is there a reason
 for leaving the prefix out?

It was a typo. I fixed it before submitting the patch to /n/sources.

-- 
David du Colombier



Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread lucio
 It was a typo. I fixed it before submitting the patch to /n/sources.

I thought it might be; better safe than sorry, I suppose.

Lucio.


-
This email has been scanned by the MxScan Email Security System.
-



Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread Richard Miller
 A patch(1) (/n/sources/patch) can't be applied automatically
 without modifying patch/apply.

Actually it can, thanks to the magic of bind(1):

cpu% 9fs sources
cpu% PATCH=libsec-x509-sha256rsa
cpu% mkdir -p $home/patch/$PATCH
cpu% bind -bc $home/patch/$PATCH /n/sources/patch/$PATCH
cpu% patch/apply $PATCH
merge...backup...copy...
to update sources:
update /sys/src/libsec/port/x509.c
cpu% ls -l /sys/src/libsec/port/x509.c
--rw-rw-r-- M 9996 sys sys 54387 Oct 27 09:15 
/sys/src/libsec/port/x509.c




[9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Eduardo Alvarez
Hello, everyone,

I'm in the process of learning acme via Russ Cox's p9p port. Recently, I found
myself editing some text to use with markdown, and needed to make more than one
modification to a list. I wanted to know if it's possible to give the Edit
command more than one argument. For example, I found myself needing to replace
colons with a close bracket (]), and inserting an open bracket at the beginning
of the line. So I did this:

Edit s/^/\[/
Edit s/\:\ /\]/

And I was hoping to combine these into a single line, so, for example:

Edit s/^/\[/ s/\:\ /\]/
(Not sure if escaping was necessary, but I was playing it safe)

Doing exactly what I did above resulted in the error 

Edit: newline expected (saw f)

So that's obviously not it. But I'm not sure if it's at all possible.

Thank you in advance.
-- 
Eduardo Alvarez

Stercus, Stercus, Stercus, moriturus sum
  -- Rincewind The Wizzard


pgpRmAdk0U2w7.pgp
Description: PGP signature


Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Rob Pike
Edit {
s/^/\[/
s/\:\ /\]/
}


On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com
wrote:

 Hello, everyone,

 I'm in the process of learning acme via Russ Cox's p9p port. Recently, I
 found
 myself editing some text to use with markdown, and needed to make more
 than one
 modification to a list. I wanted to know if it's possible to give the Edit
 command more than one argument. For example, I found myself needing to
 replace
 colons with a close bracket (]), and inserting an open bracket at the
 beginning
 of the line. So I did this:

 Edit s/^/\[/
 Edit s/\:\ /\]/

 And I was hoping to combine these into a single line, so, for example:

 Edit s/^/\[/ s/\:\ /\]/
 (Not sure if escaping was necessary, but I was playing it safe)

 Doing exactly what I did above resulted in the error

 Edit: newline expected (saw f)

 So that's obviously not it. But I'm not sure if it's at all possible.

 Thank you in advance.
 --
 Eduardo Alvarez

 Stercus, Stercus, Stercus, moriturus sum
   -- Rincewind The Wizzard



Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread erik quanstrom
On Mon Oct 27 05:20:04 EDT 2014, 9f...@hamnavoe.com wrote:
  A patch(1) (/n/sources/patch) can't be applied automatically
  without modifying patch/apply.
 
 Actually it can, thanks to the magic of bind(1):
 
   cpu% 9fs sources
   cpu% PATCH=libsec-x509-sha256rsa
   cpu% mkdir -p $home/patch/$PATCH
   cpu% bind -bc $home/patch/$PATCH /n/sources/patch/$PATCH
   cpu% patch/apply $PATCH
   merge...backup...copy...
   to update sources:
   update /sys/src/libsec/port/x509.c
   cpu% ls -l /sys/src/libsec/port/x509.c
   --rw-rw-r-- M 9996 sys sys 54387 Oct 27 09:15 
 /sys/src/libsec/port/x509.c

fwiw, 9atom has had this, and serial checking (i think cinap did this).

- erik



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Ingo Krabbe
but you can't do this on a acme headline. So how would you apply such multiline 
commands to a range you marked in the buffer?

 Edit {
 s/^/\[/
 s/\:\ /\]/
 }
 
 
 On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com
 wrote:
 
 Hello, everyone,

 I'm in the process of learning acme via Russ Cox's p9p port. Recently, I
 found
 myself editing some text to use with markdown, and needed to make more
 than one
 modification to a list. I wanted to know if it's possible to give the Edit
 command more than one argument. For example, I found myself needing to
 replace
 colons with a close bracket (]), and inserting an open bracket at the
 beginning
 of the line. So I did this:

 Edit s/^/\[/
 Edit s/\:\ /\]/

 And I was hoping to combine these into a single line, so, for example:

 Edit s/^/\[/ s/\:\ /\]/
 (Not sure if escaping was necessary, but I was playing it safe)

 Doing exactly what I did above resulted in the error

 Edit: newline expected (saw f)

 So that's obviously not it. But I'm not sure if it's at all possible.

 Thank you in advance.
 --
 Eduardo Alvarez

 Stercus, Stercus, Stercus, moriturus sum
   -- Rincewind The Wizzard






Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread erik quanstrom
On Mon Oct 27 00:22:36 EDT 2014, lu...@proxima.alt.za wrote:
  @@ -1594,6 +1595,7 @@
   static Ints7 oid_md4WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 3 };
   static Ints7 oid_md5WithRSAEncryption = {7, 1, 2, 840, 113549, 1, 1, 4 };
   static Ints7 oid_sha1WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 5 };
  +static Ints7 sha256WithRSAEncryption ={7, 1, 2, 840, 113549, 1, 1, 11 };
   static Ints7 oid_sha1WithRSAEncryptionOiw ={6, 1, 3, 14, 3, 2, 29 };
   static Ints7 oid_md5 ={6, 1, 2, 840, 113549, 2, 5, 0 };
   static Ints *alg_oid_tab[NUMALGS+1] = {
  @@ -1602,6 +1604,7 @@
  (Ints*)oid_md4WithRSAEncryption,
  (Ints*)oid_md5WithRSAEncryption,
  (Ints*)oid_sha1WithRSAEncryption,
  +   (Ints*)sha256WithRSAEncryption,
  (Ints*)oid_sha1WithRSAEncryptionOiw,
  (Ints*)oid_md5,
  nil
 
 The existing identifiers are prefixed with oid_; is there a reason
 for leaving the prefix out?

you make a good point.

- erik



Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread lucio
 you make a good point.

David did explain.  It's fixed in the patch.

Lucio.


-
This email has been scanned by the MxScan Email Security System.
-



Re: [9fans] Setting up Mail in Acme on the Raspberry Pi.

2014-10-27 Thread erik quanstrom
 Under plan9 the user who boots a machine has rights to its filesystem,
 so unless you are accessing a remote plan9 file server which is running
 an auth server I doubt your problems are to do with administration rights.

in practice, it often works out this way.  especially because the file server
typically drops a console that allows even to put the file system into allow 
mode.

but it doesn't have to be this way.  strictly speaking, the hostowner has
no special rights at all.  and the file system is not necessarly co-located on
your cpu server.  this is the difference between eve and root on unix.

one does not have to put eve in adm or especially sys.  in fact, i think this
makes one's system significantly less secure.

- erik



Re: [9fans] Setting up Mail in Acme on the Raspberry Pi.

2014-10-27 Thread lucio
 one does not have to put eve in adm or especially sys.  in fact, i think this
 makes one's system significantly less secure.

It's complicated, in that access controls are enforced by distinct
entities with potentially very distinct criteria.  Trying to conceive
all possible combination of clients, servers and third-party
authenticators can lead to massive migraines.

That said, it's good to have the options.  Specially knowing that your
root does not by default have the same privileges on my equipment as
my root does.

Lucio.


-
This email has been scanned by the MxScan Email Security System.
-



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Rob Pike
Yes you can. That's how I verified this works. Open up the tag to
multiple lines (just type newline in the tag).

-rob



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread lucio
 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).

And in any event, the multiline Edit command can be executed from
within the editable text, where vertical space is not usually at a
premium.  Takes some tidying up afterwards, but that's a small price
to pay.

Lucio.

PS: I've never done this, is it going to work?  :-)


-
This email has been scanned by the MxScan Email Security System.
-



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Kostarev Ilya
At least p9p acme has multiline tags. Personally, I prefer 2-1 chord 
complicated or frequent stuff onto Edit command

-- 
Kostarev Ilya

On 27 Oct 2014 at 18:48:10, Ingo Krabbe (ikrabbe@gmail.com) wrote:

but you can't do this on a acme headline. So how would you apply such multiline 
commands to a range you marked in the buffer?  

 Edit {  
 s/^/\[/  
 s/\:\ /\]/  
 }  
  
  
 On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez astrochelon...@gmail.com  
 wrote:  
  
 Hello, everyone,  
  
 I'm in the process of learning acme via Russ Cox's p9p port. Recently, I  
 found  
 myself editing some text to use with markdown, and needed to make more  
 than one  
 modification to a list. I wanted to know if it's possible to give the Edit  
 command more than one argument. For example, I found myself needing to  
 replace  
 colons with a close bracket (]), and inserting an open bracket at the  
 beginning  
 of the line. So I did this:  
  
 Edit s/^/\[/  
 Edit s/\:\ /\]/  
  
 And I was hoping to combine these into a single line, so, for example:  
  
 Edit s/^/\[/ s/\:\ /\]/  
 (Not sure if escaping was necessary, but I was playing it safe)  
  
 Doing exactly what I did above resulted in the error  
  
 Edit: newline expected (saw f)  
  
 So that's obviously not it. But I'm not sure if it's at all possible.  
  
 Thank you in advance.  
 --  
 Eduardo Alvarez  
  
 Stercus, Stercus, Stercus, moriturus sum  
 -- Rincewind The Wizzard  
  





Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Ingo Krabbe
 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).

I use the plan9 legacy version, that seems to ignore typed newlines. With the 
p9p it works and possible with the 9front version too.

Actually I can echo 'Edit {…
}'/mnt/acme/{winid}/tag

with newlines and use that. 

Edit {
s/^/\[/g
s/$/\]/g
}
Or you can use the 2-1 chord to apply and use the Edit command in-place. But 
you need a confident mouse hand to use that effectively.





Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Eduardo Alvarez
On Mon, Oct 27, 2014 at 10:09:46AM -0700, Rob Pike wrote:
 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).
 
 -rob
 
Yes, it worked thank you for your help.

-- 
Eduardo Alvarez

Stercus, Stercus, Stercus, moriturus sum
  -- Rincewind The Wizzard


pgpLOsHFwDLa4.pgp
Description: PGP signature


Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Skip Tavakkolian
Plan 9's Acme doesn't support multiline (at least not version I have).

The way you can do it is to put the multiline instructions for Edit in a
different buffer; then select the multiline instructions and middle-left
click on Edit of the file you want to edit.


On Mon, Oct 27, 2014 at 10:09 AM, Rob Pike robp...@gmail.com wrote:

 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).

 -rob




Re: [9fans] Setting up Mail in Acme on the Raspberry Pi.

2014-10-27 Thread erik quanstrom
On Mon Oct 27 12:34:58 EDT 2014, lu...@proxima.alt.za wrote:
  one does not have to put eve in adm or especially sys.  in fact, i think 
  this
  makes one's system significantly less secure.
 
 It's complicated, in that access controls are enforced by distinct
 entities with potentially very distinct criteria.  Trying to conceive
 all possible combination of clients, servers and third-party
 authenticators can lead to massive migraines.

it's not complicated.  permissions work like unix.  there is simply
a lack of the unix requirement that the owner of the file server be
the owner of the cpu server.

certainly one could require different creds for the same user on
every host, but we don't do that.

- erik



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread sl
 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).

I think this only works in p9p.

sl



[9fans] Can the 8l linker read ELF object files?

2014-10-27 Thread Ryan Gonzalez
I have a simple C program:

#include lib9.h

void main()
{
print(abc\n);
exits(nil);
}

I built it under Linux using ken-cc (the Linux port of the Plan 9
compilers). However, this happens when I try to link it:

8l -L/home/ryan/stuff/ken-cc/Linux/386/lib -l9 -o test test.8
main: undefined: print
main: undefined: exits

Evidently, 8l isn't picking up the ELF objects in lib9.a. Can I make it
read them somehow?

-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated.
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/


Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Rob Pike
That's a shame.

-rob


On Mon, Oct 27, 2014 at 9:41 AM,  s...@9front.org wrote:
 Yes you can. That's how I verified this works. Open up the tag to
 multiple lines (just type newline in the tag).

 I think this only works in p9p.

 sl




Re: [9fans] tlsClient: tls: local invalid x509/rsa certificate

2014-10-27 Thread Ryan Gonzalez
Thanks! I just tested it. It works!

On Sun, Oct 26, 2014 at 5:52 PM, David du Colombier 0in...@gmail.com
wrote:

 Just to be clearer. The patch (unified diff) attached in my
 previous email can be applied with ape/patch.

 A patch(1) (/n/sources/patch) can't be applied automatically
 without modifying patch/apply. You have to copy the individual
 files by hand to the destination indicated in the files file.

 --
 David du Colombier




-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated.
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/


Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Paul Lalonde
We (Russ and I) never ported it back to Plan9 because there's a subtle
layout bug when columns have different height fonts for the tag and the
body.  I works well enough for us, but isn't at the quality it should be.

Paul

On Mon Oct 27 2014 at 3:57:01 PM Rob Pike robp...@gmail.com wrote:

 That's a shame.

 -rob


 On Mon, Oct 27, 2014 at 9:41 AM,  s...@9front.org wrote:
  Yes you can. That's how I verified this works. Open up the tag to
  multiple lines (just type newline in the tag).
 
  I think this only works in p9p.
 
  sl
 




Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread erik quanstrom
On Mon Oct 27 19:39:19 EDT 2014, paul.a.lalo...@gmail.com wrote:

 We (Russ and I) never ported it back to Plan9 because there's a subtle
 layout bug when columns have different height fonts for the tag and the
 body.  I works well enough for us, but isn't at the quality it should be.

the layout is tricky.  and it's hard to prevent resizing flicker.  perhaps 
forcing
the user to resize the tag by hand might be smoother.

better yet, i'd love to see acme extended to the point where an external 
program could provide
a sam(1)-style window rather than fiddling with the tag.

- erik



Re: [9fans] [acme] Edit command -- More than one argument?

2014-10-27 Thread Paul Lalonde
What do you mean by resizing flicker?  I've never seen it with the
multi-line tags.  And we do resize the tag by hand - the scroll wheel opens
and shuts it, in addition to adding/removing the trailing newline.

On Mon Oct 27 2014 at 8:44:57 PM erik quanstrom quans...@quanstro.net
wrote:

 On Mon Oct 27 19:39:19 EDT 2014, paul.a.lalo...@gmail.com wrote:

  We (Russ and I) never ported it back to Plan9 because there's a subtle
  layout bug when columns have different height fonts for the tag and the
  body.  I works well enough for us, but isn't at the quality it should be.

 the layout is tricky.  and it's hard to prevent resizing flicker.  perhaps
 forcing
 the user to resize the tag by hand might be smoother.

 better yet, i'd love to see acme extended to the point where an external
 program could provide
 a sam(1)-style window rather than fiddling with the tag.

 - erik