RSA+DSA+ECC export_key_jwk produces canonical JSON
Karel Miko
7 years ago
17 | 17 |
0.031 2016/04/XX
|
18 | 18 |
- RSA+DSA public key export now produces PEM/DER compatible with openssl
|
19 | 19 |
public keys exported be previous version can still be imported
|
|
20 |
- RSA+DSA+ECC export_key_jwk produces canonical JSON
|
20 | 21 |
|
21 | 22 |
0.030 2016/04/13
|
22 | 23 |
- fix: 0.029 + 0.028 by mistake installed *.inc files to perl/(lib|site|vendor)
|
38 | 38 |
|
39 | 39 |
sub _encode_json {
|
40 | 40 |
croak "FATAL: cannot find JSON::PP or JSON::XS or Cpanel::JSON::XS" if !$has_json;
|
41 | |
encode_json(shift);
|
|
41 |
my $data = shift;
|
|
42 |
my $rv = encode_json($data); # non-canonical fallback
|
|
43 |
return(eval { Cpanel::JSON::XS->new->canonical->encode($data) } || $rv) if $has_json == 1;
|
|
44 |
return(eval { JSON::XS->new->canonical->encode($data) } || $rv) if $has_json == 2;
|
|
45 |
return(eval { JSON::PP->new->canonical->encode($data) } || $rv) if $has_json == 3;
|
|
46 |
return($rv);
|
42 | 47 |
}
|
43 | 48 |
|
44 | 49 |
1;
|