rng = RNG_CreateContext(); if (rng == NULL) { *dest = 0; return SECFailure; } rv = RNG_GenerateRandomBytes(rng, (void*)dest, sizeof(long)); RNG_DestroyContext(rng, PR_TRUE);
rv = PK11_GenerateRandom((unsigned char *)dest, sizeof(long));  if (*dest < 0L) *dest = - *dest;
get_serial_number(long *dest){   RNGContext *rng;   SECStatus   rv;   if (dest == NULL) {       return SECFailure;   }   rng = RNG_CreateContext();   if (rng == NULL) {       *dest = 0;       return SECFailure;   }   rv = RNG_GenerateRandomBytes(rng, (void*)dest, sizeof(long));   RNG_DestroyContext(rng, PR_TRUE);    return SECSuccess;}