internal static string ToSerializedValue(this CertificateRequestState value)
        {
            switch (value)
            {
            case CertificateRequestState.New:
                return("new");

            case CertificateRequestState.Approved:
                return("approved");

            case CertificateRequestState.Rejected:
                return("rejected");

            case CertificateRequestState.Accepted:
                return("accepted");

            case CertificateRequestState.Deleted:
                return("deleted");

            case CertificateRequestState.Revoked:
                return("revoked");

            case CertificateRequestState.Removed:
                return("removed");
            }
            return(null);
        }
 /// <summary>
 /// Initializes a new instance of the FetchRequestResultApiModel class.
 /// </summary>
 /// <param name="state">Possible values include: 'new', 'approved',
 /// 'rejected', 'accepted', 'deleted', 'revoked', 'removed'</param>
 public FetchRequestResultApiModel(CertificateRequestState state, string requestId = default(string), string applicationId = default(string), string certificateGroupId = default(string), string certificateTypeId = default(string), string signedCertificate = default(string), string privateKeyFormat = default(string), string privateKey = default(string), string authorityId = default(string))
 {
     RequestId          = requestId;
     ApplicationId      = applicationId;
     State              = state;
     CertificateGroupId = certificateGroupId;
     CertificateTypeId  = certificateTypeId;
     SignedCertificate  = signedCertificate;
     PrivateKeyFormat   = privateKeyFormat;
     PrivateKey         = privateKey;
     AuthorityId        = authorityId;
     CustomInit();
 }
示例#3
0
 /// <summary>
 /// Initializes a new instance of the CertificateRequestRecordApiModel
 /// class.
 /// </summary>
 /// <param name="state">Possible values include: 'new', 'approved',
 /// 'rejected', 'accepted', 'deleted', 'revoked', 'removed'</param>
 public CertificateRequestRecordApiModel(CertificateRequestState state, bool signingRequest, string requestId = default(string), string applicationId = default(string), string certificateGroupId = default(string), string certificateTypeId = default(string), string subjectName = default(string), IList <string> domainNames = default(IList <string>), string privateKeyFormat = default(string))
 {
     RequestId          = requestId;
     ApplicationId      = applicationId;
     State              = state;
     CertificateGroupId = certificateGroupId;
     CertificateTypeId  = certificateTypeId;
     SigningRequest     = signingRequest;
     SubjectName        = subjectName;
     DomainNames        = domainNames;
     PrivateKeyFormat   = privateKeyFormat;
     CustomInit();
 }
示例#4
0
        private static ServiceResult VerifyApprovedState(CertificateRequestState state)
        {
            switch (state)
            {
            case CertificateRequestState.New:
                return(new ServiceResult(StatusCodes.BadNothingToDo, "The request has not been approved by the administrator."));

            case CertificateRequestState.Rejected:
                return(new ServiceResult(StatusCodes.BadRequestNotAllowed, "The request has been rejected by the administrator."));

            case CertificateRequestState.Accepted:
                return(new ServiceResult(StatusCodes.BadInvalidArgument, "The request has already been accepted by the application."));

            case CertificateRequestState.Approved:
                break;
            }
            return(null);
        }
示例#5
0
 public FetchRequestResultModel(
     CertificateRequestState state,
     string applicationId,
     string requestId,
     string certificateGroupId,
     string certificateTypeId,
     byte[] signedCertificate,
     string privateKeyFormat,
     byte[] privateKey,
     string authorityId)
 {
     this.State              = state;
     this.ApplicationId      = applicationId;
     this.RequestId          = requestId;
     this.CertificateGroupId = certificateGroupId;
     this.CertificateTypeId  = certificateTypeId;
     this.SignedCertificate  = signedCertificate;
     this.PrivateKeyFormat   = privateKeyFormat;
     this.PrivateKey         = privateKey;
     this.AuthorityId        = authorityId;
 }
 public ReadRequestResultModel(
     string requestId,
     string applicationId,
     CertificateRequestState state,
     string certificateGroupId,
     string certificateTypeId,
     byte[] certificateRequest,
     string subjectName,
     string[] domainNames,
     string privateKeyFormat
     )
 {
     this.RequestId          = requestId;
     this.ApplicationId      = applicationId;
     this.State              = state;
     this.CertificateGroupId = certificateGroupId;
     this.CertificateTypeId  = certificateTypeId;
     this.SigningRequest     = certificateRequest != null;
     this.SubjectName        = subjectName;
     this.DomainNames        = domainNames;
     this.PrivateKeyFormat   = privateKeyFormat;
 }
示例#7
0
        internal static string ToSerializedValue(this CertificateRequestState value)
        {
            switch (value)
            {
            case CertificateRequestState.New:
                return("New");

            case CertificateRequestState.Approved:
                return("Approved");

            case CertificateRequestState.Rejected:
                return("Rejected");

            case CertificateRequestState.Failure:
                return("Failure");

            case CertificateRequestState.Completed:
                return("Completed");

            case CertificateRequestState.Accepted:
                return("Accepted");
            }
            return(null);
        }
示例#8
0
 public FetchRequestResultModel(
     CertificateRequestState state
     )
 {
     this.State = state;
 }