Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug on DetectProduction #54

Closed
darkfat opened this Issue · 1 comment

2 participants

darkfat Jonathan Dick
darkfat

Redth-PushSharp-bdfb871\PushSharp.Apple\ApplePushChannelSettings.cs Line: 71 on

The "this.Certificate" seems always null to cause production check always false
Kind of obvious to me that it should be using the "certificate" parameter as passed in.

=== current ===
public bool DetectProduction(X509Certificate2 certificate)
{
bool production = false;

        if (this.Certificate != null)
        {
            var subjectName = this.Certificate.SubjectName.Name;

            if (subjectName.Contains("Apple Production IOS Push Services"))
                production = true;
        }

        return production;
    }

=== suggest ===
public bool DetectProduction(X509Certificate2 certificate)
{
bool production = false;

        if (certificate != null)
        {
            var subjectName = certificate.SubjectName.Name;

            if (subjectName.Contains("Apple Production IOS Push Services"))
                production = true;
        }

        return production;
    }
Jonathan Dick
Owner

Thanks, fix is in master and will be in next release :)

Jonathan Dick Redth closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.