| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | .\" $NetBSD: netpgp.1,v 1.7 2010/02/06 02:24:34 agc Exp $ | | 1 | .\" $NetBSD: netpgp.1,v 1.8 2010/02/23 01:24:45 agc Exp $ |
2 | .\" | | 2 | .\" |
3 | .\" Copyright (c) 2009 The NetBSD Foundation, Inc. | | 3 | .\" Copyright (c) 2009 The NetBSD Foundation, Inc. |
4 | .\" All rights reserved. | | 4 | .\" All rights reserved. |
5 | .\" | | 5 | .\" |
6 | .\" This manual page is derived from software contributed to | | 6 | .\" This manual page is derived from software contributed to |
7 | .\" The NetBSD Foundation by Alistair Crooks (agc@NetBSD.org). | | 7 | .\" The NetBSD Foundation by Alistair Crooks (agc@NetBSD.org). |
8 | .\" | | 8 | .\" |
9 | .\" Redistribution and use in source and binary forms, with or without | | 9 | .\" Redistribution and use in source and binary forms, with or without |
10 | .\" modification, are permitted provided that the following conditions | | 10 | .\" modification, are permitted provided that the following conditions |
11 | .\" are met: | | 11 | .\" are met: |
12 | .\" 1. Redistributions of source code must retain the above copyright | | 12 | .\" 1. Redistributions of source code must retain the above copyright |
13 | .\" notice, this list of conditions and the following disclaimer. | | 13 | .\" notice, this list of conditions and the following disclaimer. |
14 | .\" 2. Redistributions in binary form must reproduce the above copyright | | 14 | .\" 2. Redistributions in binary form must reproduce the above copyright |
| @@ -396,48 +396,89 @@ and displayed on standard output: | | | @@ -396,48 +396,89 @@ and displayed on standard output: |
396 | .Bd -literal | | 396 | .Bd -literal |
397 | % netpgp --encrypt \*[Lt] a | netpgp --decrypt \*[Gt] b | | 397 | % netpgp --encrypt \*[Lt] a | netpgp --decrypt \*[Gt] b |
398 | netpgp: default key set to "C0596823" | | 398 | netpgp: default key set to "C0596823" |
399 | netpgp: default key set to "C0596823" | | 399 | netpgp: default key set to "C0596823" |
400 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 | | 400 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
401 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 | | 401 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
402 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] | | 402 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
403 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] | | 403 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
404 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] | | 404 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
405 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] | | 405 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
406 | netpgp passphrase: | | 406 | netpgp passphrase: |
407 | % | | 407 | % |
408 | .Ed | | 408 | .Ed |
| | | 409 | .Pp |
| | | 410 | This simple (and contrived) example shows that |
| | | 411 | .Nm |
| | | 412 | commands can be used together in a pipeline to produce the desired effect. |
409 | .Bd -literal | | 413 | .Bd -literal |
410 | % netpgp --sign \*[Lt] a | netpgp --cat \*[Gt] b | | 414 | % netpgp --sign \*[Lt] a | netpgp --cat \*[Gt] b |
411 | netpgp: default key set to "C0596823" | | 415 | netpgp: default key set to "C0596823" |
412 | netpgp: default key set to "C0596823" | | 416 | netpgp: default key set to "C0596823" |
413 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 | | 417 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
414 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 | | 418 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
415 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] | | 419 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
416 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] | | 420 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
417 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] | | 421 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
418 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] | | 422 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
419 | netpgp passphrase: | | 423 | netpgp passphrase: |
420 | Good signature for \*[Lt]stdin\*[Gt] made Mon Dec 21 18:25:02 2009 | | 424 | Good signature for \*[Lt]stdin\*[Gt] made Mon Dec 21 18:25:02 2009 |
421 | using RSA (Encrypt or Sign) key 1b68dcfcc0596823 | | 425 | using RSA (Encrypt or Sign) key 1b68dcfcc0596823 |
422 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 | | 426 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
423 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 | | 427 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
424 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] | | 428 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
425 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] | | 429 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
426 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] | | 430 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
427 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] | | 431 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
428 | uid Alistair Crooks (Yahoo!) \*[Lt]agcrooks@yahoo-inc.com\*[Gt] | | 432 | uid Alistair Crooks (Yahoo!) \*[Lt]agcrooks@yahoo-inc.com\*[Gt] |
429 | % | | 433 | % |
430 | .Ed | | 434 | .Ed |
| | | 435 | .Pp |
| | | 436 | For operations like signing and encrypting a file at the same time, |
| | | 437 | the best way is to make use of pipelines: |
| | | 438 | .Bd -literal |
| | | 439 | % netpgp --sign \*[Lt] example | netpgp --encrypt --userid=c0596823 \*[Gt] example.gpg |
| | | 440 | netpgp: default key set to "C0596823" |
| | | 441 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
| | | 442 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
| | | 443 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
| | | 444 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
| | | 445 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
| | | 446 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
| | | 447 | uid Alistair Crooks (Yahoo!) \*[Lt]agcrooks@yahoo-inc.com\*[Gt] |
| | | 448 | netpgp passphrase: |
| | | 449 | % netpgp --decrypt \*[Lt] example.gpg | netpgp --cat |
| | | 450 | netpgp: default key set to "C0596823" |
| | | 451 | netpgp: default key set to "C0596823" |
| | | 452 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
| | | 453 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
| | | 454 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
| | | 455 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
| | | 456 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
| | | 457 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
| | | 458 | uid Alistair Crooks (Yahoo!) \*[Lt]agcrooks@yahoo-inc.com\*[Gt] |
| | | 459 | netpgp passphrase: |
| | | 460 | Good signature for \*[Lt]stdin\*[Gt] made Mon Feb 22 07:21:19 2010 |
| | | 461 | using RSA (Encrypt or Sign) key 1b68dcfcc0596823 |
| | | 462 | pub 2048/RSA (Encrypt or Sign) 1b68dcfcc0596823 2004-01-12 |
| | | 463 | Key fingerprint: d415 9deb 336d e4cc cdfa 00cd 1b68 dcfc c059 6823 |
| | | 464 | uid Alistair Crooks \*[Lt]alistair@hockley-crooks.com\*[Gt] |
| | | 465 | uid Alistair Crooks \*[Lt]agc@pkgsrc.org\*[Gt] |
| | | 466 | uid Alistair Crooks \*[Lt]agc@netbsd.org\*[Gt] |
| | | 467 | uid Alistair Crooks \*[Lt]agc@alistaircrooks.com\*[Gt] |
| | | 468 | uid Alistair Crooks (Yahoo!) \*[Lt]agcrooks@yahoo-inc.com\*[Gt] |
| | | 469 | ...contents of original file... |
| | | 470 | % |
| | | 471 | .Ed |
431 | .Sh RETURN VALUES | | 472 | .Sh RETURN VALUES |
432 | The | | 473 | The |
433 | .Nm | | 474 | .Nm |
434 | utility will return 0 for success, | | 475 | utility will return 0 for success, |
435 | 1 if the file's signature does not match what was expected, | | 476 | 1 if the file's signature does not match what was expected, |
436 | or 2 if any other error occurs. | | 477 | or 2 if any other error occurs. |
437 | .Sh SEE ALSO | | 478 | .Sh SEE ALSO |
438 | .Xr netpgpkeys 1 , | | 479 | .Xr netpgpkeys 1 , |
439 | .Xr ssh 1 , | | 480 | .Xr ssh 1 , |
440 | .Xr getpass 3 , | | 481 | .Xr getpass 3 , |
441 | .\" .Xr libbz2 3 , | | 482 | .\" .Xr libbz2 3 , |
442 | .Xr libnetpgp 3 , | | 483 | .Xr libnetpgp 3 , |
443 | .Xr ssl 3 , | | 484 | .Xr ssl 3 , |