[openssl-commits] [openssl] OpenSSL_1_0_2-stable update

Matt Caswell matt at openssl.org
Thu Jan 22 14:28:50 UTC 2015


The branch OpenSSL_1_0_2-stable has been updated
       via  d3b7cac41b957704932a0cdbc74d4d48ed507cd0 (commit)
       via  fdc3ced983bb3efbb2ff4da52fdaef147f7f7ed2 (commit)
       via  65d6fdaa21d03a1640d04ba48c0f8047873921e6 (commit)
      from  f11818c88dc0b22c65f19e3d351f3738f02898d7 (commit)


- Log -----------------------------------------------------------------
commit d3b7cac41b957704932a0cdbc74d4d48ed507cd0
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Jan 22 11:44:18 2015 +0000

    Fix for reformat problems with e_padlock.c
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

commit fdc3ced983bb3efbb2ff4da52fdaef147f7f7ed2
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Jan 22 11:04:47 2015 +0000

    Fix post-reformat errors preventing windows compilation
    
    Reviewed-by: Tim Hudson <tjh at openssl.org>

commit 65d6fdaa21d03a1640d04ba48c0f8047873921e6
Author: Matt Caswell <matt at openssl.org>
Date:   Thu Jan 22 10:42:48 2015 +0000

    Fix formatting error in pem.h
    
    Reviewed-by: Andy Polyakov <appro at openssl.org>

-----------------------------------------------------------------------

Summary of changes:
 crypto/bio/bss_dgram.c |    2 +-
 crypto/pem/pem.h       |   18 +++++---
 engines/e_padlock.c    |  120 ++++++++++++++++++++++++++++++++++++------------
 ssl/d1_lib.c           |    2 +-
 4 files changed, 105 insertions(+), 37 deletions(-)

diff --git a/crypto/bio/bss_dgram.c b/crypto/bio/bss_dgram.c
index 1f0f160..fcbae5f 100644
--- a/crypto/bio/bss_dgram.c
+++ b/crypto/bio/bss_dgram.c
@@ -2052,7 +2052,7 @@ static void get_current_time(struct timeval *t)
 #  ifdef  __MINGW32__
     now.ul -= 116444736000000000ULL;
 #  else
-    now.ul -= 116444736000000000U I64; /* re-bias to 1/1/1970 */
+    now.ul -= 116444736000000000UI64; /* re-bias to 1/1/1970 */
 #  endif
     t->tv_sec = (long)(now.ul / 10000000);
     t->tv_usec = ((int)(now.ul % 10000000)) / 10;
diff --git a/crypto/pem/pem.h b/crypto/pem/pem.h
index 1d7232c..d3b23fc 100644
--- a/crypto/pem/pem.h
+++ b/crypto/pem/pem.h
@@ -451,7 +451,8 @@ void PEM_dek_info(char *buf, const char *type, int len, char *str);
 DECLARE_PEM_rw(X509, X509)
 DECLARE_PEM_rw(X509_AUX, X509)
 DECLARE_PEM_rw(X509_CERT_PAIR, X509_CERT_PAIR)
-DECLARE_PEM_rw(X509_REQ, X509_REQ) DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
+DECLARE_PEM_rw(X509_REQ, X509_REQ)
+DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
 DECLARE_PEM_rw(X509_CRL, X509_CRL)
 DECLARE_PEM_rw(PKCS7, PKCS7)
 DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
@@ -459,20 +460,25 @@ DECLARE_PEM_rw(PKCS8, X509_SIG)
 DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)
 # ifndef OPENSSL_NO_RSA
 DECLARE_PEM_rw_cb(RSAPrivateKey, RSA)
-DECLARE_PEM_rw_const(RSAPublicKey, RSA) DECLARE_PEM_rw(RSA_PUBKEY, RSA)
+DECLARE_PEM_rw_const(RSAPublicKey, RSA)
+DECLARE_PEM_rw(RSA_PUBKEY, RSA)
 # endif
 # ifndef OPENSSL_NO_DSA
 DECLARE_PEM_rw_cb(DSAPrivateKey, DSA)
-DECLARE_PEM_rw(DSA_PUBKEY, DSA) DECLARE_PEM_rw_const(DSAparams, DSA)
+DECLARE_PEM_rw(DSA_PUBKEY, DSA)
+DECLARE_PEM_rw_const(DSAparams, DSA)
 # endif
 # ifndef OPENSSL_NO_EC
 DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP)
-DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
+DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY)
+DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
 # endif
 # ifndef OPENSSL_NO_DH
-DECLARE_PEM_rw_const(DHparams, DH) DECLARE_PEM_write_const(DHxparams, DH)
+DECLARE_PEM_rw_const(DHparams, DH)
+DECLARE_PEM_write_const(DHxparams, DH)
 # endif
-DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) DECLARE_PEM_rw(PUBKEY, EVP_PKEY)
+DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY)
+DECLARE_PEM_rw(PUBKEY, EVP_PKEY)
 
 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid,
                                       char *kstr, int klen,
diff --git a/engines/e_padlock.c b/engines/e_padlock.c
index ab9d5fb..2898e4c 100644
--- a/engines/e_padlock.c
+++ b/engines/e_padlock.c
@@ -525,42 +525,104 @@ static void * __fastcall                \
         REP_XCRYPT(code)                \
 }
 
-PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb, 0xc8)
-    PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc, 0xd0)
-    PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb, 0xe0)
-    PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb, 0xe8)
+PADLOCK_XCRYPT_ASM(padlock_xcrypt_ecb,0xc8)
+PADLOCK_XCRYPT_ASM(padlock_xcrypt_cbc,0xd0)
+PADLOCK_XCRYPT_ASM(padlock_xcrypt_cfb,0xe0)
+PADLOCK_XCRYPT_ASM(padlock_xcrypt_ofb,0xe8)
 
 static int __fastcall padlock_xstore(void *outp, unsigned int code)
 {
-_asm mov edi, ecx
-        _asm _emit 0x0f _asm _emit 0xa7 _asm _emit 0xc0}
-    static void __fastcall padlock_reload_key(void)
+    _asm    mov edi,ecx
+    _asm _emit 0x0f _asm _emit 0xa7 _asm _emit 0xc0
+}
+
+static void __fastcall padlock_reload_key(void)
 {
-_asm pushfd _asm popfd}
-    static void __fastcall padlock_verify_context(void *cdata)
+    _asm pushfd
+    _asm popfd
+}
+
+static void __fastcall padlock_verify_context(void *cdata)
 {
-    _asm {
-pushfd bt DWORD PTR[esp], 30 jnc skip cmp ecx,
-            padlock_saved_context je skip popfd sub esp,
-            4 skip:add esp, 4 mov padlock_saved_context,
-            ecx}} static int padlock_available(void)
+    _asm    {
+        pushfd
+        bt  DWORD PTR[esp],30
+        jnc skip
+        cmp ecx,padlock_saved_context
+        je  skip
+        popfd
+        sub esp,4
+    skip:   add esp,4
+        mov padlock_saved_context,ecx
+    }
+}
+
+static int
+padlock_available(void)
 {
-    _asm {
-pushfd pop eax mov ecx, eax xor eax,
-            1 << 21 push eax popfd pushfd pop eax xor eax, ecx bt eax,
-            21 jnc noluck mov eax, 0 cpuid xor eax, eax cmp ebx,
-            'tneC' jne noluck cmp edx, 'Hrua' jne noluck cmp ecx,
-            'slua' jne noluck mov eax, 0xC0000000 cpuid mov edx,
-            eax xor eax, eax cmp edx, 0xC0000001 jb noluck mov eax,
-            0xC0000001 cpuid xor eax, eax bt edx, 6 jnc skip_a bt edx,
-            7 jnc skip_a mov padlock_use_ace, 1 inc eax skip_a:bt edx,
-            2 jnc skip_r bt edx, 3 jnc skip_r mov padlock_use_rng,
-            1 inc eax skip_r:noluck:}} static void __fastcall
-padlock_bswapl(void *key)
+    _asm    {
+        pushfd
+        pop eax
+        mov ecx,eax
+        xor eax,1<<21
+        push    eax
+        popfd
+        pushfd
+        pop eax
+        xor eax,ecx
+        bt  eax,21
+        jnc noluck
+        mov eax,0
+        cpuid
+        xor eax,eax
+        cmp ebx,'tneC'
+        jne noluck
+        cmp edx,'Hrua'
+        jne noluck
+        cmp ecx,'slua'
+        jne noluck
+        mov eax,0xC0000000
+        cpuid
+        mov edx,eax
+        xor eax,eax
+        cmp edx,0xC0000001
+        jb  noluck
+        mov eax,0xC0000001
+        cpuid
+        xor eax,eax
+        bt  edx,6
+        jnc skip_a
+        bt  edx,7
+        jnc skip_a
+        mov padlock_use_ace,1
+        inc eax
+    skip_a: bt  edx,2
+        jnc skip_r
+        bt  edx,3
+        jnc skip_r
+        mov padlock_use_rng,1
+        inc eax
+    skip_r:
+    noluck:
+    }
+}
+
+static void __fastcall padlock_bswapl(void *key)
 {
-    _asm {
-pushfd cld mov esi, ecx mov edi, ecx mov ecx, 60 up:lodsd
-            bswap eax stosd loop up popfd}}
+    _asm    {
+        pushfd
+        cld
+        mov esi,ecx
+        mov edi,ecx
+        mov ecx,60
+    up: lodsd
+        bswap   eax
+        stosd
+        loop    up
+        popfd
+    }
+}
+
 /*
  * MS actually specifies status of Direction Flag and compiler even manages
  * to compile following as 'rep movsd' all by itself...
diff --git a/ssl/d1_lib.c b/ssl/d1_lib.c
index d2d3d2e..2845757 100644
--- a/ssl/d1_lib.c
+++ b/ssl/d1_lib.c
@@ -525,7 +525,7 @@ static void get_current_time(struct timeval *t)
 # ifdef  __MINGW32__
     now.ul -= 116444736000000000ULL;
 # else
-    now.ul -= 116444736000000000U I64; /* re-bias to 1/1/1970 */
+    now.ul -= 116444736000000000UI64; /* re-bias to 1/1/1970 */
 # endif
     t->tv_sec = (long)(now.ul / 10000000);
     t->tv_usec = ((int)(now.ul % 10000000)) / 10;


More information about the openssl-commits mailing list