How should we parse BinarySecurityToken?

ai second 1 Reputation point
2020-06-19T06:10:31.007+00:00

Our MDM server received an enrollment request from the client. We got BinarySecurityToken and tried to parse it, but it always went wrong. How do I resolve BinarySecurityToken?
We did it in the following way
certificateSigningRequestDer, err := base64.StdEncoding.DecodeString(binarySecurityToken)
if err != nil {
return nil, err
}
// Decode and verify CSR
csr, err := x509.ParseCertificateRequest(certificateSigningRequestDer)
if err != nil {
panic(err)
}

enrollment-protocol.txt has detailed data

Can you help us resolve this parsing error?[enter code here][1]

Azure Information Protection
Azure Information Protection
An Azure service that is used to control and help secure email, documents, and sensitive data that are shared outside the company.
523 questions
{count} votes