diff options
author | markus@openbsd.org <markus@openbsd.org> | 2018-02-23 15:58:37 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2018-02-26 11:40:41 +1100 |
commit | 1b11ea7c58cd5c59838b5fa574cd456d6047b2d4 (patch) | |
tree | 7e96cb41b5234b9d327f7c8f41392f09aed0994e /authfile.c | |
parent | 7d330a1ac02076de98cfc8fda05353d57b603755 (diff) |
upstream: Add experimental support for PQC XMSS keys (Extended
Hash-Based Signatures) The code is not compiled in by default (see WITH_XMSS
in Makefile.inc) Joint work with stefan-lukas_gazdag at genua.eu See
https://tools.ietf.org/html/draft-irtf-cfrg-xmss-hash-based-signatures-12 ok
djm@
OpenBSD-Commit-ID: ef3eccb96762a5d6f135d7daeef608df7776a7ac
Diffstat (limited to 'authfile.c')
-rw-r--r-- | authfile.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/authfile.c b/authfile.c index d09b700d2..57dcd808c 100644 --- a/authfile.c +++ b/authfile.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: authfile.c,v 1.127 2017/07/01 13:50:45 djm Exp $ */ | 1 | /* $OpenBSD: authfile.c,v 1.128 2018/02/23 15:58:37 markus Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2013 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -191,6 +191,8 @@ sshkey_load_private_type(int type, const char *filename, const char *passphrase, | |||
191 | *perm_ok = 1; | 191 | *perm_ok = 1; |
192 | 192 | ||
193 | r = sshkey_load_private_type_fd(fd, type, passphrase, keyp, commentp); | 193 | r = sshkey_load_private_type_fd(fd, type, passphrase, keyp, commentp); |
194 | if (r == 0 && keyp && *keyp) | ||
195 | r = sshkey_set_filename(*keyp, filename); | ||
194 | out: | 196 | out: |
195 | close(fd); | 197 | close(fd); |
196 | return r; | 198 | return r; |
@@ -249,6 +251,9 @@ sshkey_load_private(const char *filename, const char *passphrase, | |||
249 | (r = sshkey_parse_private_fileblob(buffer, passphrase, keyp, | 251 | (r = sshkey_parse_private_fileblob(buffer, passphrase, keyp, |
250 | commentp)) != 0) | 252 | commentp)) != 0) |
251 | goto out; | 253 | goto out; |
254 | if (keyp && *keyp && | ||
255 | (r = sshkey_set_filename(*keyp, filename)) != 0) | ||
256 | goto out; | ||
252 | r = 0; | 257 | r = 0; |
253 | out: | 258 | out: |
254 | close(fd); | 259 | close(fd); |
@@ -397,6 +402,7 @@ sshkey_load_private_cert(int type, const char *filename, const char *passphrase, | |||
397 | case KEY_ECDSA: | 402 | case KEY_ECDSA: |
398 | #endif /* WITH_OPENSSL */ | 403 | #endif /* WITH_OPENSSL */ |
399 | case KEY_ED25519: | 404 | case KEY_ED25519: |
405 | case KEY_XMSS: | ||
400 | case KEY_UNSPEC: | 406 | case KEY_UNSPEC: |
401 | break; | 407 | break; |
402 | default: | 408 | default: |