Fix trivial coding style nits in a_time/a_tm files
[openssl.git] / crypto / dh / dh_locl.h
index 80d09d04e3f96be2f7296ad50251aac614cf3274..0a8391a6c0041633c7fa1dd19c25c53c017cf1a8 100644 (file)
@@ -1,14 +1,14 @@
 /*
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL licenses, (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed under the OpenSSL license (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
- * or in the file LICENSE in the source distribution.
  */
 
 #include <openssl/dh.h>
+#include "internal/refcount.h"
 
 struct dh_st {
     /*
@@ -19,7 +19,7 @@ struct dh_st {
     int version;
     BIGNUM *p;
     BIGNUM *g;
-    long length;                /* optional */
+    int32_t length;             /* optional */
     BIGNUM *pub_key;            /* g^x % p */
     BIGNUM *priv_key;           /* x */
     int flags;
@@ -30,7 +30,7 @@ struct dh_st {
     unsigned char *seed;
     int seedlen;
     BIGNUM *counter;
-    int references;
+    CRYPTO_REF_COUNT references;
     CRYPTO_EX_DATA ex_data;
     const DH_METHOD *meth;
     ENGINE *engine;
@@ -42,6 +42,7 @@ struct dh_method {
     /* Methods here */
     int (*generate_key) (DH *dh);
     int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh);
+
     /* Can be null */
     int (*bn_mod_exp) (const DH *dh, BIGNUM *r, const BIGNUM *a,
                        const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx,