Codebase list libcryptx-perl / 5418374
ECC import_key now accepts non-standard curve names e.g. "secp112r1", "secp521r1" Karel Miko 8 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
496496 if (my $curve = $jwkcrv{$key->{crv}}) {
497497 return $self->_import_hex($key->{x}, $key->{y}, $key->{d}, $curve);
498498 }
499 # curve is not JWK compliant e.g. P-192 P-224 P-256 P-384 P-521 (we'll try to import anyway)
500 return $self->_import_hex($key->{x}, $key->{y}, $key->{d}, lc($key->{crv}));
499501 }
500502 croak "FATAL: unexpected ECC key hash";
501503 }
535537 if (my $curve = $jwkcrv{$h->{crv}}) {
536538 return $self->_import_hex($h->{x}, $h->{y}, $h->{d}, $curve);
537539 }
540 # curve is not JWK compliant e.g. P-192 P-224 P-256 P-384 P-521 (we'll try to import anyway)
541 return $self->_import_hex($h->{x}, $h->{y}, $h->{d}, lc($h->{crv}));
538542 }
539543 }
540544 elsif ($data =~ /---- BEGIN SSH2 PUBLIC KEY ----(.*?)---- END SSH2 PUBLIC KEY ----/sg) {