8 fprint(2, "auth/pemencode section [file]\n");
13 main(int argc, char **argv)
26 if(argc != 1 && argc != 2)
35 if((fd = open(file, OREAD)) < 0)
36 sysfatal("open %s: %r", file);
40 buf = realloc(buf, tot+8192);
42 sysfatal("realloc: %r");
43 if((n = read(fd, buf+tot, 8192)) < 0)
52 sysfatal("malloc: %r");
53 len = enc64(cbuf, len, (uchar*)buf, tot);
54 print("-----BEGIN %s-----\n", tag);
56 print("%.64s\n", cbuf);
60 print("-----END %s-----\n", tag);