diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-07-15 11:32:58 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-07-15 11:32:58 +0000 |
commit | 5135d6b985e40dba5674bd544337a7a9d4a05504 (patch) | |
tree | 321c7e5012cb43f03aed88484749b7d81ea5015c /ssl/s3_both.c | |
parent | 2202edeff0dd1d728bb93c15be5ecc1702a9d866 (diff) |
Fix error codes and indentation.
Diffstat (limited to 'ssl/s3_both.c')
-rw-r--r-- | ssl/s3_both.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/ssl/s3_both.c b/ssl/s3_both.c index 63b4c4c83d..f68b6a9ebd 100644 --- a/ssl/s3_both.c +++ b/ssl/s3_both.c @@ -264,21 +264,21 @@ int ssl3_send_change_cipher_spec(SSL *s, int a, int b) static int ssl3_add_cert_to_buf(BUF_MEM *buf, unsigned long *l, X509 *x) { - int n; - unsigned char *p; + int n; + unsigned char *p; - n=i2d_X509(x,NULL); - if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3))) - { - SSLerr(SSL_F_SSL3_OUTPUT_CERT_CHAIN,ERR_R_BUF_LIB); - return(-1); - } - p=(unsigned char *)&(buf->data[*l]); - l2n3(n,p); - i2d_X509(x,&p); - *l+=n+3; + n=i2d_X509(x,NULL); + if (!BUF_MEM_grow_clean(buf,(int)(n+(*l)+3))) + { + SSLerr(SSL_F_SSL3_ADD_CERT_TO_BUF,ERR_R_BUF_LIB); + return(-1); + } + p=(unsigned char *)&(buf->data[*l]); + l2n3(n,p); + i2d_X509(x,&p); + *l+=n+3; - return(0); + return(0); } unsigned long ssl3_output_cert_chain(SSL *s, X509 *x) |