If Namespace doesn't match Reference DLL Name Code Analysis flags error

4 posts, 0 answers
  1. James B Furlong
    James B Furlong avatar
    6 posts
    Member since:
    Dec 2002

    Posted 12 May 2011 Link to this post

    I am using a component called SecureBlackBox for which I have a dll reference in my project.
    The referenced assemblies are:

    SecureBlackBox.dll and SecureBlackBox.PKI.dll

    The DLLs have verious namespaces which do not match the assembly name, e.g.

    SB3DLS, SB3AES, etc.

    Specifically the namespace SBX509Ex below is in the referenced assembly and shows errors (It is regarded by JustCode as not being recognised which is presumably the cause of the subsequent errors?)

    The issue is that wherever  this component is used in my project JustCode comes up with errors although VS 2010 Ultimate SP1 builds it perfectly well.

    Sample code below with 'some' of the errors identified using Comments:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using SBX509Ex; /* This namespace is in the SecureBlackBox DLL */
    using System.Threading;
    using System.Collections;
      
    namespace Provisioning.CertificateAuthorityProvider.SelfSigned
    {
      
        /// <summary>
        /// Generates Certificates for use in Self-Signed Provisioner.
        /// This class is used internally to provide internally generated and signed certificates
        /// </summary>
        public class CertificateProvisioner
        {
            public CertificateProvisioner()
            {
                this.SetEnabledCurves();
            }
      
            public TElX509CertificateEx CACert = null; /* TElX509CertificateEx shows as error in Code Analisys */
            ArrayList enabledCurves = new ArrayList();
      
            public string Generate(bool selfSigned, string kA)
            {
                TElX509CertificateEx Cert = null/* TElX509CertificateEx shows as error in Code Analisys */
                int SignatureAlgorithm = 0;
                byte[] Buffer;
                short Size = 0;
                int Algorithm = 0;
                int Hash = 0;
      
                Cert = new TElX509CertificateEx(null);
                Cert.SubjectRDN.Count = 6;
                for (int i = 0; i <= 5; i++) Cert.SubjectRDN.set_Tags(i, SBASN1Tree.Unit.SB_ASN1_PRINTABLESTRING);
                Cert.SubjectRDN.set_OIDs(0, SBUtils.Unit.SB_CERT_OID_COUNTRY);  /* SBUtils shows as error in Code Analisys */
                Cert.SubjectRDN.set_Values(0, SBUtils.Unit.BytesOfString("UK"));
                Cert.SubjectRDN.set_OIDs(1, SBUtils.Unit.SB_CERT_OID_STATE_OR_PROVINCE);
                Cert.SubjectRDN.set_Values(1, SBUtils.Unit.BytesOfString("State"));
                Cert.SubjectRDN.set_OIDs(2, SBUtils.Unit.SB_CERT_OID_LOCALITY);
                Cert.SubjectRDN.set_Values(2, SBUtils.Unit.BytesOfString("Locality"));
                Cert.SubjectRDN.set_OIDs(3, SBUtils.Unit.SB_CERT_OID_ORGANIZATION);
                Cert.SubjectRDN.set_Values(3, SBUtils.Unit.BytesOfString("Organization"));
                Cert.SubjectRDN.set_OIDs(4, SBUtils.Unit.BytesOfString(SBUtils.Unit.SB_CERT_OID_ORGANIZATION_UNIT));
                Cert.SubjectRDN.set_Values(4, SBUtils.Unit.BytesOfString("OrganizationUnit"));
                Cert.SubjectRDN.set_OIDs(5, SBUtils.Unit.SB_CERT_OID_COMMON_NAME);
                Cert.SubjectRDN.set_Values(5, SBUtils.Unit.BytesOfString("CommonName"));
                Cert.ValidFrom = DateTime.Today;
                Cert.ValidTo = DateTime.Today.AddDays(365);

  2. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 17 May 2011 Link to this post

    Hi James B Furlong,

    Thanks for reporting. Could you please send us the dll? It seems there is something special with it so that JC can't find all contained types.


    Regards,
    Dennis :: Dr. Code
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. James B Furlong
    James B Furlong avatar
    6 posts
    Member since:
    Dec 2002

    Posted 17 May 2011 Link to this post

    Two DLLs that are refenced in the project are sent by Support Request Id  425205
  5. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 17 May 2011 Link to this post

    Hi James,

    thanks. JC throws an exception while parsing these dlls, and thus cannot find the contained types. We will fix that in one of the next Q2 internal builds. I gave you some Telerik points.


    Regards,
    Dennis :: Dr. Code
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top