Missing NULL check on OBJ_dup result in x509_name_canon
[openssl.git] / crypto / ppccap.c
index 2c98daf5b4df785d88269b8519dd9cbcc2942e18..712ee799d6dfd830140df627f19d5e8525baaafd 100644 (file)
@@ -1,3 +1,12 @@
+/*
+ * Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * 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
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -79,6 +88,7 @@ void sha512_block_data_order(void *ctx, const void *inp, size_t len)
         sha512_block_ppc(ctx, inp, len);
 }
 
+#ifndef OPENSSL_NO_CHACHA
 void ChaCha20_ctr32_int(unsigned char *out, const unsigned char *inp,
                         size_t len, const unsigned int key[8],
                         const unsigned int counter[4]);
@@ -93,7 +103,9 @@ void ChaCha20_ctr32(unsigned char *out, const unsigned char *inp,
         ? ChaCha20_ctr32_vmx(out, inp, len, key, counter)
         : ChaCha20_ctr32_int(out, inp, len, key, counter);
 }
+#endif
 
+#ifndef OPENSSL_NO_POLY1305
 void poly1305_init_int(void *ctx, const unsigned char key[16]);
 void poly1305_blocks(void *ctx, const unsigned char *inp, size_t len,
                          unsigned int padbit);
@@ -117,6 +129,7 @@ int poly1305_init(void *ctx, const unsigned char key[16], void *func[2])
     }
     return 1;
 }
+#endif
 
 static sigjmp_buf ill_jmp;
 static void ill_handler(int sig)
@@ -128,6 +141,7 @@ void OPENSSL_fpu_probe(void);
 void OPENSSL_ppc64_probe(void);
 void OPENSSL_altivec_probe(void);
 void OPENSSL_crypto207_probe(void);
+void OPENSSL_madd300_probe(void);
 
 /*
  * Use a weak reference to getauxval() so we can use it if it is available
@@ -220,7 +234,7 @@ void OPENSSL_cpuid_setup(void)
         unsigned long hwcap = getauxval(HWCAP);
 
         if (hwcap & HWCAP_FPU) {
-           OPENSSL_ppccap_P |= PPC_FPU;
+            OPENSSL_ppccap_P |= PPC_FPU;
 
             if (sizeof(size_t) == 4) {
                 /* In 32-bit case PPC_FPU64 is always fastest [if option] */