code: function() {
        // auto-generate content info
        if(typeof msg.content !== 'object' || msg.contentInfo === null) {
          // use Data ContentInfo
          msg.contentInfo = asn1.create(
            asn1.Class.UNIVERSAL, asn1.Type.SEQUENCE, true, [
              // ContentType
              asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OID, false,
                asn1.oidToDer(forge.pki.oids.data).getBytes())
            ]);
  
          // add actual content, if present
          if('content' in msg) {
            var content;
            if(msg.content instanceof forge.util.ByteBuffer) {
              content = msg.content.bytes();
            } else if(typeof msg.content === 'string') {
              content = forge.util.encodeUtf8(msg.content);
            }
  
            msg.contentInfo.value.push(
              // [0] EXPLICIT content
              asn1.create(asn1.Class.CONTEXT_SPECIFIC, 0, true, [
                asn1.create(asn1.Class.UNIVERSAL, asn1.Type.OCTETSTRING, false,
                  content)
              ]));
          }
        }
  
        // no signers, return early (degenerate case for certificate container)
        if(msg.signers.length === 0) {
          return;
        }
  
        // generate digest algorithm identifiers
        var mds = addDigestAlgorithmIds();
  
        // generate signerInfos
        addSignerInfos(mds);
      }
docs: Signs the content.