Bug 1115177

Summary: attrcrypt_generate_key calls slapd_pk11_TokenKeyGenWithFlags with improper macro
Product: Red Hat Enterprise Linux 7 Reporter: Noriko Hosoi <nhosoi>
Component: 389-ds-baseAssignee: Noriko Hosoi <nhosoi>
Status: CLOSED ERRATA QA Contact: Viktor Ashirov <vashirov>
Severity: unspecified Docs Contact:
Priority: low    
Version: 7.0CC: amsharma, nkinder, rmeggins
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 389-ds-base-1.3.3.1-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 09:35:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Noriko Hosoi 2014-07-01 19:23:12 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/389/ticket/47832

Thanks to Bob Relyea for finding out that we are passing an improper macro
to slapd_pk11_TokenKeyGenWithFlags.  It has to be:
{{{
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
index f4a5d1a..41856d5 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_attrcrypt.c
@@ -344,7 +344,7 @@ attrcrypt_generate_key(attrcrypt_cipher_state *acs,PK11SymKey **symmetric_key)
                                                        0 /*param*/,
                                                        acs->ace->key_size,
                                                        NULL /*keyid*/, 
-                                                       CKA_DECRYPT/*op*/,
+                                                       CKF_DECRYPT/*op*/,
                                                        CKF_ENCRYPT/*attr*/,
                                                        NULL);
        if (new_symmetric_key) {
}}}

Comment 4 Amita Sharma 2014-12-22 11:02:03 UTC
SSL ACL run 	100% (8/8) 	  	 
SSL GER run 	100% (6/6) 	  	 
SSL Password storage run 	100% (7/7) 	  	 
SSL BOB run 	100% (6/6) 	  	 
SSL CLU run 	100% (5/5) 	  	 
SSL Import run 	100% (3/3) 	  	 
SSL VLV run 	100% (7/7) 	  	 
SSL authentication run 	100% (5/5) 	  	 
SSL connection run 	100% (3/3) 	  	 
SSL cleanup 	100% (1/1) 	  	 
SSL error test startup 	100% (1/1)

Hence marking as VERIFIED.

Comment 6 errata-xmlrpc 2015-03-05 09:35:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHSA-2015-0416.html