Change ssh.h crypto APIs to output to BinarySink.
This affects all the functions that generate public and private key and signature blobs of all kinds, plus ssh_ecdhkex_getpublic. Instead of returning a bare block of memory and taking an extra 'int *length' parameter, all these functions now write to a BinarySink, and it's the caller's job to have prepared an appropriate one where they want the output to go (usually a strbuf). The main value of this change is that those blob-generation functions were chock full of ad-hoc length-counting and data marshalling. You have only to look at rsa2_{public,private}_blob, for example, to see the kind of thing I was keen to get rid of!
Showing
- cmdgen.c 26 additions, 20 deletionscmdgen.c
- import.c 68 additions, 76 deletionsimport.c
- pageant.c 119 additions, 197 deletionspageant.c
- pageant.h 1 addition, 2 deletionspageant.h
- ssh.c 70 additions, 86 deletionsssh.c
- ssh.h 11 additions, 12 deletionsssh.h
- sshdss.c 24 additions, 106 deletionssshdss.c
- sshecc.c 79 additions, 215 deletionssshecc.c
- sshpubk.c 92 additions, 112 deletionssshpubk.c
- sshrsa.c 30 additions, 117 deletionssshrsa.c
- unix/uxpgnt.c 17 additions, 8 deletionsunix/uxpgnt.c
- windows/winpgen.c 5 additions, 5 deletionswindows/winpgen.c
Loading
Please register or sign in to comment