common_DecodeDerSig(SECItem *item, int len)
common_DecodeDerSig(SECItem *item, unsigned int len)
common_DecodeDerSig(SECItem *item, int len){    SECItem *         result = NULL;    SECStatus         status;    DSA_ASN1Signature sig;    SECItem           dst;    PORT_Memset(&sig, 0, sizeof(sig));    result = PORT_ZNew(SECItem);    if (result == NULL)	goto loser;    result->len  = 2 * len;    result->data = (unsigned char*)PORT_Alloc(2 * len);    if (result->data == NULL)	goto loser;    sig.r.type = siUnsignedInteger;    sig.s.type = siUnsignedInteger;    status = SEC_ASN1DecodeItem(NULL, &sig, DSA_SignatureTemplate, item);    if (status != SECSuccess)	goto loser;    /* Convert sig.r and sig.s from variable  length signed integers to     ** fixed length unsigned integers.    */    dst.data = result->data;    dst.len  = len;    status = DSAU_ConvertSignedToFixedUnsigned(&dst, &sig.r);    if (status != SECSuccess)    	goto loser;    dst.data += len;    status = DSAU_ConvertSignedToFixedUnsigned(&dst, &sig.s);    if (status != SECSuccess)    	goto loser;done:    if (sig.r.data != NULL)	PORT_Free(sig.r.data);    if (sig.s.data != NULL)	PORT_Free(sig.s.data);    return result;loser:    if (result != NULL) {	SECITEM_FreeItem(result, PR_TRUE);	result = NULL;    }    goto done;}