Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1464975 Details for
Bug 1605247
Check NSS crypto-polices
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch v1
cp-nss-check.patch (text/plain), 2.30 KB, created by
Kai Engert (:kaie) (inactive account)
on 2018-07-20 14:33:40 UTC
(
hide
)
Description:
patch v1
Filename:
MIME Type:
Creator:
Kai Engert (:kaie) (inactive account)
Created:
2018-07-20 14:33:40 UTC
Size:
2.30 KB
patch
obsolete
>diff --git a/Makefile b/Makefile >index e1cad71..032e30e 100644 >--- a/Makefile >+++ b/Makefile >@@ -19,6 +19,7 @@ check: > @-rm -f test-suite.log > tests/openssl.pl >test-suite.log > tests/gnutls.pl >>test-suite.log >+ tests/nss.pl >>test-suite.log > tests/java.pl >>test-suite.log > tests/krb5.py >>test-suite.log > tests/verify-output.pl >>test-suite.log >diff --git a/back-ends/nss.pl b/back-ends/nss.pl >index 0275636..0c8aff7 100644 >--- a/back-ends/nss.pl >+++ b/back-ends/nss.pl >@@ -5,6 +5,9 @@ use strict; > > use profiles::common; > >+use File::Temp qw/ tempfile /; >+use File::Which qw(which); >+ > my $print_init = 0; > my $string = ''; > >@@ -165,6 +168,33 @@ sub generate_temp_policy() { > } > > sub test_temp_policy() { >+ my $profile = shift(@_); >+ my $dir = shift(@_); >+ my $gstr = shift(@_); >+ >+ my $tool = which "nss-policy-check"; >+ if ($tool ne undef) { >+ my ( $fh, $filename ) = tempfile(); >+ my $resultfile = $filename . ".tmp.result"; >+ print $fh $gstr; >+ close $fh; >+ system("nss-policy-check $filename >$resultfile 2>&1") ; >+ my $ret = $?; >+ unlink($filename); >+ unlink($resultfile); >+ >+ # We treat all warnings and errors as a failure. >+ # Exit code for warnings is 1, exit code for failures is 2. >+ # Note for potential future changes: >+ # If some warnings should be ignored, then ignore the exit code, >+ # and inspect the contents of resultfile. >+ if ($ret != 0) { >+ print STDERR "There is an error in NSS generated policy\n"; >+ print STDERR "policy: $gstr\n"; >+ exit 1; >+ } >+ >+ } > return; > } > >diff --git a/tests/nss.pl b/tests/nss.pl >new file mode 100755 >index 0000000..23dc48c >--- /dev/null >+++ b/tests/nss.pl >@@ -0,0 +1,33 @@ >+#!/usr/bin/perl >+ >+my $TMPFILE="policy-nss.tmp"; >+my $RESULTFILE="result-nss.tmp"; >+ >+my $libdir = "./back-ends"; >+use lib "./back-ends/"; >+use profiles::common; >+ >+require "$libdir/nss.pl"; >+ >+foreach my $policy (@profiles::common::policies) { >+ >+ my $tmp = generate_temp_policy($policy, "", $libdir); >+ >+ if ($policy ne 'EMPTY') { >+ open my $file, '>', $TMPFILE or die $!; >+ print $file $tmp; >+ close $file; >+ >+ system("nss-policy-check $TMPFILE >$RESULTFILE 2>&1") ; >+ if ($? != 0) { >+ print "Error in NSS policy for $policy\n"; >+ system("cat $TMPFILE"); >+ system("cat $RESULTFILE"); >+ exit 1; >+ } >+ unlink($TMPFILE); >+ unlink($RESULTFILE); >+ } >+} >+ >+exit 0;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1605247
: 1464975