diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-12-06 19:49:20 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-12-06 19:49:20 -0500 |
commit | 75134c6c86e54c10fd9e11c4345aadcdabc0f8fb (patch) | |
tree | b7eb7d85bb8c4f2bdc70b0bbbcb4f0cc352ce6f7 /src/common | |
parent | 135a5102a3e5422a1c9c8ad28f58888eea4a2545 (diff) | |
download | tor-75134c6c86e54c10fd9e11c4345aadcdabc0f8fb.tar.gz tor-75134c6c86e54c10fd9e11c4345aadcdabc0f8fb.zip |
Revert "indent; add comment"
This reverts commit 40a87c4c08be0cdd87a3df283f285b3c2a0c8445.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/tortls.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c index b4d81de2f3..9ac5c34f26 100644 --- a/src/common/tortls.c +++ b/src/common/tortls.c @@ -585,8 +585,6 @@ tor_tls_create_certificate(crypto_pk_env_t *rsa, const char *cname_sign, unsigned int cert_lifetime) { - /* OpenSSL generates self-signed certificates with random 64-bit serial - * numbers, so let's do that too. */ #define SERIAL_NUMBER_SIZE 8 time_t start_time, end_time; @@ -614,12 +612,12 @@ tor_tls_create_certificate(crypto_pk_env_t *rsa, goto error; { /* our serial number is 8 random bytes. */ - if (crypto_rand((char *)serial_tmp, sizeof(serial_tmp)) < 0) - goto error; - if (!(serial_number = BN_bin2bn(serial_tmp, sizeof(serial_tmp), NULL))) - goto error; - if (!(BN_to_ASN1_INTEGER(serial_number, X509_get_serialNumber(x509)))) - goto error; + if (crypto_rand((char *)serial_tmp, sizeof(serial_tmp)) < 0) + goto error; + if (!(serial_number = BN_bin2bn(serial_tmp, sizeof(serial_tmp), NULL))) + goto error; + if (!(BN_to_ASN1_INTEGER(serial_number, X509_get_serialNumber(x509)))) + goto error; } if (!(name = tor_x509_name_new(cname))) |