Skip to content

Commit

Permalink
Remove newlines from base64-encoded data
Browse files Browse the repository at this point in the history
  • Loading branch information
marc-vanderwal committed Nov 20, 2023
1 parent e9f3bff commit b8f44fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/rr.t
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ subtest 'NSEC3 without salt' => sub {
ok( $nsec3->optout );
is( $nsec3->iterations, 0 );
is( $nsec3->salt, '' );
is( encode_base64( $nsec3->next_owner ), "FPtBccW1LaCSAtjy2PLa9aQb1O39\n" );
is( encode_base64( $nsec3->next_owner, '' ), "FPtBccW1LaCSAtjy2PLa9aQb1O39" );
is( $nsec3->typelist, 'NS DS RRSIG ' );

is_deeply( [ sort keys %{ $nsec3->typehref } ], [qw(DS NS RRSIG)] );
Expand All @@ -227,7 +227,7 @@ subtest 'NSEC3 with salt' => sub {
ok( $nsec3->optout );
is( $nsec3->iterations, 1 );
is( unpack('H*', $nsec3->salt), '8104' );
is( encode_base64( $nsec3->next_owner ), "FGJDpwiEu0Gi6iOdbjKpAE2lRDRp\n" );
is( encode_base64( $nsec3->next_owner, '' ), "FGJDpwiEu0Gi6iOdbjKpAE2lRDRp" );
is( $nsec3->typelist, 'A NS SOA MX TXT RRSIG DNSKEY NSEC3PARAM ' );

is_deeply( [ sort keys %{ $nsec3->typehref } ], [qw(A DNSKEY MX NS NSEC3PARAM RRSIG SOA TXT)] );
Expand All @@ -239,7 +239,7 @@ subtest 'NSEC3PARAM' => sub {
is( $nsec3param->algorithm, 1 );
is( $nsec3param->flags, 0 );
is( $nsec3param->iterations, 1, "Iterations" );
is( encode_base64( $nsec3param->salt ), "CLLBmrUmgZNH\n", "Salt" );
is( encode_base64( $nsec3param->salt, '' ), "CLLBmrUmgZNH", "Salt" );
is( lc($nsec3param->owner), 'whitehouse.gov.' );
};

Expand Down

0 comments on commit b8f44fe

Please sign in to comment.