- stevesk@cvs.openbsd.org 2001/09/17 20:38:09
[sftp.1 sftp.c]
cleanup and document -1, -s and -S; ok markus@
+ - markus@cvs.openbsd.org 2001/09/17 20:50:22
+ [key.c ssh-keygen.c]
+ better error handling if you try to export a bad key to ssh.com
20010917
- (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: key.c,v 1.30 2001/09/17 19:27:15 stevesk Exp $");
+RCSID("$OpenBSD: key.c,v 1.31 2001/09/17 20:50:22 markus Exp $");
#include <openssl/evp.h>
buffer_put_bignum2(&b, key->rsa->n);
break;
default:
- error("key_to_blob: illegal key type %d", key->type);
- break;
+ error("key_to_blob: unsupported key type %d", key->type);
+ buffer_free(&b);
+ return 0;
}
len = buffer_len(&b);
buf = xmalloc(len);
*/
#include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.80 2001/09/17 19:27:15 stevesk Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.81 2001/09/17 20:50:22 markus Exp $");
#include <openssl/evp.h>
#include <openssl/pem.h>
exit(1);
}
}
- key_to_blob(k, &blob, &len);
+ if (key_to_blob(k, &blob, &len) <= 0) {
+ fprintf(stderr, "key_to_blob failed\n");
+ exit(1);
+ }
fprintf(stdout, "%s\n", SSH_COM_PUBLIC_BEGIN);
fprintf(stdout,
"Comment: \"%d-bit %s, converted from OpenSSH by %s@%s\"\n",