theTemplate = SEC_ASN1_GET(SEC_UTCTimeTemplate);
theTemplate = SEC_ASN1_GET(CERT_TimeChoiceTemplate);
cms_attr_choose_attr_value_template(void *src_or_dest, PRBool encoding){    const SEC_ASN1Template *theTemplate;    NSSCMSAttribute *attribute;    SECOidData *oiddata;    PRBool encoded;    PORT_Assert (src_or_dest != NULL);    if (src_or_dest == NULL)	return NULL;    attribute = (NSSCMSAttribute *)src_or_dest;    if (encoding && attribute->encoded)	/* we're encoding, and the attribute value is already encoded. */	return SEC_ASN1_GET(SEC_AnyTemplate);    /* get attribute's typeTag */    oiddata = attribute->typeTag;    if (oiddata == NULL) {	oiddata = SECOID_FindOID(&attribute->type);	attribute->typeTag = oiddata;    }    if (oiddata == NULL) {	/* still no OID tag? OID is unknown then. en/decode value as ANY. */	encoded = PR_TRUE;	theTemplate = SEC_ASN1_GET(SEC_AnyTemplate);    } else {	switch (oiddata->offset) {	case SEC_OID_PKCS9_SMIME_CAPABILITIES:	case SEC_OID_SMIME_ENCRYPTION_KEY_PREFERENCE:	    /* these guys need to stay DER-encoded */	default:	    /* same goes for OIDs that are not handled here */	    encoded = PR_TRUE;	    theTemplate = SEC_ASN1_GET(SEC_AnyTemplate);	    break;	    /* otherwise choose proper template */	case SEC_OID_PKCS9_EMAIL_ADDRESS:	case SEC_OID_RFC1274_MAIL:	case SEC_OID_PKCS9_UNSTRUCTURED_NAME:	    encoded = PR_FALSE;	    theTemplate = SEC_ASN1_GET(SEC_IA5StringTemplate);	    break;	case SEC_OID_PKCS9_CONTENT_TYPE:	    encoded = PR_FALSE;	    theTemplate = SEC_ASN1_GET(SEC_ObjectIDTemplate);	    break;	case SEC_OID_PKCS9_MESSAGE_DIGEST:	    encoded = PR_FALSE;	    theTemplate = SEC_ASN1_GET(SEC_OctetStringTemplate);	    break;	case SEC_OID_PKCS9_SIGNING_TIME:	    encoded = PR_FALSE;	    theTemplate = SEC_ASN1_GET(SEC_UTCTimeTemplate);	    break;	  /* XXX Want other types here, too */	}    }    if (encoding) {	/*	 * If we are encoding and we think we have an already-encoded value,	 * then the code which initialized this attribute should have set	 * the "encoded" property to true (and we would have returned early,	 * up above).  No devastating error, but that code should be fixed.	 * (It could indicate that the resulting encoded bytes are wrong.)	 */	PORT_Assert (!encoded);    } else {	/*	 * We are decoding; record whether the resulting value is	 * still encoded or not.	 */	attribute->encoded = encoded;    }    return theTemplate;}