Codebase list libcryptx-perl / 33a6c68
RSA+DSA+ECC export_key_jwk produces canonical JSON Karel Miko 7 years ago
2 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
1717 0.031 2016/04/XX
1818 - RSA+DSA public key export now produces PEM/DER compatible with openssl
1919 public keys exported be previous version can still be imported
20 - RSA+DSA+ECC export_key_jwk produces canonical JSON
2021
2122 0.030 2016/04/13
2223 - fix: 0.029 + 0.028 by mistake installed *.inc files to perl/(lib|site|vendor)
3838
3939 sub _encode_json {
4040 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);
4247 }
4348
4449 1;