public int GenerateCSR( KeyBlob keyBlob, string subject, string keyUsage, X509_Format outputFormat, byte[] output, int sigType, int selfSignCert) { int rc = wolfTPM2_CSR_Generate_ex( device, keyBlob.keyblob, subject, keyUsage, (int)outputFormat, output, output.Length, sigType, selfSignCert, Device.INVALID_DEVID); /* positive return code is length of resulting output */ if (rc < 0) { throw new WolfTpm2Exception( "wolfTPM2_CSR_Generate_ex", rc); } return(rc); }
public int MakeAndSign(Device device, KeyBlob keyBlob, X509_Format outputFormat, byte[] output) { int rc = wolfTPM2_CSR_MakeAndSign(device.Ref, csr, keyBlob.keyblob, (int)outputFormat, output, output.Length); /* positive return code is length of resulting output */ if (rc < 0) { throw new WolfTpm2Exception( "wolfTPM2_CSR_MakeAndSign", rc); } return(rc); }
public int MakeAndSign(Device device, KeyBlob keyBlob, X509_Format outputFormat, byte[] output, int sigType, int selfSign) { int rc = wolfTPM2_CSR_MakeAndSign_ex(device.Ref, csr, keyBlob.keyblob, (int)outputFormat, output, output.Length, sigType, selfSign, Device.INVALID_DEVID); if (rc != (int)Status.TPM_RC_SUCCESS) { throw new WolfTpm2Exception( "wolfTPM2_CSR_MakeAndSign_ex", rc); } return(rc); }
public int GenerateCSR( KeyBlob keyBlob, string subject, string keyUsage, X509_Format outputFormat, byte[] output) { int rc = wolfTPM2_CSR_Generate( device, keyBlob.keyblob, subject, keyUsage, (int)outputFormat, output, output.Length); /* positive return code is length of resulting output */ if (rc < 0) { throw new WolfTpm2Exception( "wolfTPM2_CSR_Generate", rc); } return(rc); }