Github user rawlinp commented on a diff in the pull request: https://github.com/apache/incubator-trafficcontrol/pull/360#discussion_r133734785 --- Diff: traffic_ops/app/lib/API/DeliveryService/SslKeys.pm --- @@ -120,12 +120,23 @@ sub view_by_xml_id { if ( !$version ) { $version = 'latest'; } - $key = "$key-$version"; + my $ds = $self->db->resultset('Deliveryservice')->search( { xml_id => $xml_id })->single(); + if (!$ds) { + return $self->alert( { Error => " - Could not found delivery service with xml_id=$xml_id!" } ); + } + my $ds_id = $ds->id; + my $key = "ds_$ds_id-$version"; my $response_container = $self->riak_get( "ssl", $key ); my $response = $response_container->{"response"}; - $response->is_success() - ? $self->success( decode_json( $response->content ) ) - : $self->alert( { Error => " - A record for ssl key $key could not be found. Response was: " . $response->content } ); + if ($response->is_success()) { + my $ssl_keys = decode_json( $response->content ); + $ssl_keys->{certificate}->{csr} = decode_base64($ssl_keys->{certificate}->{csr}), --- End diff -- Is it necessary for these to be decoded within the API? Won't this break any clients that expect these to be base64 encoded? Also, the API reference still states that these are base64 encoded.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---