Java 类org.bouncycastle.asn1.ocsp.CertStatus 实例源码

项目:ipack    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public CertificateStatus getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:ipack    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public Object getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:gwt-crypto    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public CertificateStatus getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:Aki-SSL    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public CertificateStatus getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:CryptMeme    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public Object getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:irma_future_id    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public CertificateStatus getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:irma_future_id    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public Object getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:bc-java    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public CertificateStatus getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:bc-java    文件:SingleResp.java   
/**
 * Return the status object for the response - null indicates good.
 * 
 * @return the status object for the response, null if it is good.
 */
public Object getCertStatus()
{
    CertStatus  s = resp.getCertStatus();

    if (s.getTagNo() == 0)
    {
        return null;            // good
    }
    else if (s.getTagNo() == 1)
    {
        return new RevokedStatus(RevokedInfo.getInstance(s.getStatus()));
    }

    return new UnknownStatus();
}
项目:ipack    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:gwt-crypto    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:Aki-SSL    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:TinyTravelTracker    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:CryptMeme    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:irma_future_id    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:bc-java    文件:CertEtcToken.java   
private CertEtcToken(ASN1TaggedObject choice)
{
    this.tagNo = choice.getTagNo();

    switch (tagNo)
    {
    case TAG_CERTIFICATE:
        value = Certificate.getInstance(choice, false);
        break;
    case TAG_ESSCERTID:
        value = ESSCertID.getInstance(choice.getObject());
        break;
    case TAG_PKISTATUS:
        value = PKIStatusInfo.getInstance(choice, false);
        break;
    case TAG_ASSERTION:
        value = ContentInfo.getInstance(choice.getObject());
        break;
    case TAG_CRL:
        value = CertificateList.getInstance(choice, false);
        break;
    case TAG_OCSPCERTSTATUS:
        value = CertStatus.getInstance(choice.getObject());
        break;
    case TAG_OCSPCERTID:
        value = CertID.getInstance(choice, false);
        break;
    case TAG_OCSPRESPONSE:
        value = OCSPResponse.getInstance(choice, false);
        break;
    case TAG_CAPABILITIES:
        value = SMIMECapabilities.getInstance(choice.getObject());
        break;
    default:
        throw new IllegalArgumentException("Unknown tag: " + tagNo);
    }
}
项目:ipack    文件:BasicOCSPRespBuilder.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:ipack    文件:BasicOCSPRespGenerator.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    X509Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else 
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:gwt-crypto    文件:BasicOCSPRespBuilder.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:Aki-SSL    文件:BasicOCSPRespBuilder.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:CryptMeme    文件:BasicOCSPRespGenerator.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    X509Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else 
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:irma_future_id    文件:BasicOCSPRespBuilder.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:irma_future_id    文件:BasicOCSPRespGenerator.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    X509Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else 
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:bc-java    文件:BasicOCSPRespBuilder.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}
项目:bc-java    文件:BasicOCSPRespGenerator.java   
public ResponseObject(
    CertificateID     certId,
    CertificateStatus certStatus,
    Date              thisUpdate,
    Date              nextUpdate,
    X509Extensions    extensions)
{
    this.certId = certId;

    if (certStatus == null)
    {
        this.certStatus = new CertStatus();
    }
    else if (certStatus instanceof UnknownStatus)
    {
        this.certStatus = new CertStatus(2, DERNull.INSTANCE);
    }
    else 
    {
        RevokedStatus rs = (RevokedStatus)certStatus;

        if (rs.hasRevocationReason())
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), CRLReason.lookup(rs.getRevocationReason())));
        }
        else
        {
            this.certStatus = new CertStatus(
                                    new RevokedInfo(new ASN1GeneralizedTime(rs.getRevocationTime()), null));
        }
    }

    this.thisUpdate = new DERGeneralizedTime(thisUpdate);

    if (nextUpdate != null)
    {
        this.nextUpdate = new DERGeneralizedTime(nextUpdate);
    }
    else
    {
        this.nextUpdate = null;
    }

    this.extensions = extensions;
}