Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
BIND
BIND
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 637
    • Issues 637
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 104
    • Merge Requests 104
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • ISC Open Source Projects
  • BINDBIND
  • Issues
  • #2315

Closed
Open
Opened Nov 27, 2020 by Cathy Almond@cathyaDeveloper

BIND 9.11.22 - 9.11.25 fails to build for AEP HSM native pkcs11

Support ticket #17347

./configure --enable-threads --enable-native-pkcs11 --with-ecdsa -with-pkcs11=/opt/Keyper/PKCS11Provider/pkcs11.so

I think it's the --enable-native-pkcs11 AND using the AEP Keyper flavour of native pkcs11 that is setting the switch so that we fail the build

The build fail is this:

pkcs11rsa_link.c: In function 'pkcs11rsa_verify':
pkcs11rsa_link.c:1081:4: error: a label can only be part of a statement and a declaration is not a statement

This is in the flavour of pkcs11rsa_verify() that is inside the else section of #ifndef PK11_RSA_PKCS_REPLACE

By my reading of /lib/isc/include/pk11/site.h, we're defining PK11_RSA_PKCS_REPLACE if we're working with an AEP pkcs11 set of libs (but not apparently for anything else).

Here's the offending bit of code in /lib/dns/pkcs11rsa_link.c (the define for 'bits' was added by issue #2037 (closed) )

		case CKA_PUBLIC_EXPONENT:
			unsigned int bits;
			INSIST(keyTemplate[6].type == attr->type);

From what I'm reading about this compiler error, the problem is that the C language standard says that labels can only be followed by statements. What we've got here is a declarations - and that's not perceived as a statement in C.

Apparently, the workaround is to add an empty statement - it's been suggested that comment after the label will do the trick (though I am not in a position to verify that) - but if yes, then this should work:

		case CKA_PUBLIC_EXPONENT:   /* Empty statement to make compiler happy */
			unsigned int bits;
			INSIST(keyTemplate[6].type == attr->type);

Please can someone look at this soonest!

Edited Nov 27, 2020 by Cathy Almond
Assignee
Assign to
December 2020 (9.11.26, 9.11.26-S1, 9.16.10, 9.16.10-S1, 9.17.8)
Milestone
December 2020 (9.11.26, 9.11.26-S1, 9.16.10, 9.16.10-S1, 9.17.8) (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: isc-projects/bind9#2315