summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/pkcs12
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/pkcs12')
-rw-r--r--src/lib/libcrypto/pkcs12/p12_add.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_crt.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_decr.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_init.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_key.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_kiss.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_mutl.c10
-rw-r--r--src/lib/libcrypto/pkcs12/p12_npas.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_p8e.c4
-rw-r--r--src/lib/libcrypto/pkcs12/p12_sbag.c4
-rw-r--r--src/lib/libcrypto/pkcs12/pkcs12.h4
11 files changed, 25 insertions, 25 deletions
diff --git a/src/lib/libcrypto/pkcs12/p12_add.c b/src/lib/libcrypto/pkcs12/p12_add.c
index f6f42c558c..e45218ba96 100644
--- a/src/lib/libcrypto/pkcs12/p12_add.c
+++ b/src/lib/libcrypto/pkcs12/p12_add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_add.c,v 1.25 2024/03/02 10:20:27 tb Exp $ */ 1/* $OpenBSD: p12_add.c,v 1.26 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -58,9 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/err.h>
62#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
63 62
63#include "err_local.h"
64#include "pkcs12_local.h" 64#include "pkcs12_local.h"
65#include "x509_local.h" 65#include "x509_local.h"
66 66
diff --git a/src/lib/libcrypto/pkcs12/p12_crt.c b/src/lib/libcrypto/pkcs12/p12_crt.c
index 502ccecd25..321115cfcd 100644
--- a/src/lib/libcrypto/pkcs12/p12_crt.c
+++ b/src/lib/libcrypto/pkcs12/p12_crt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_crt.c,v 1.26 2024/08/22 12:22:42 tb Exp $ */ 1/* $OpenBSD: p12_crt.c,v 1.27 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project. 3 * project.
4 */ 4 */
@@ -58,10 +58,10 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/err.h>
62#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
63#include <openssl/x509.h> 62#include <openssl/x509.h>
64 63
64#include "err_local.h"
65#include "evp_local.h" 65#include "evp_local.h"
66#include "pkcs12_local.h" 66#include "pkcs12_local.h"
67#include "x509_local.h" 67#include "x509_local.h"
diff --git a/src/lib/libcrypto/pkcs12/p12_decr.c b/src/lib/libcrypto/pkcs12/p12_decr.c
index 907d4e52a6..8466e92415 100644
--- a/src/lib/libcrypto/pkcs12/p12_decr.c
+++ b/src/lib/libcrypto/pkcs12/p12_decr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_decr.c,v 1.26 2024/03/02 10:15:16 tb Exp $ */ 1/* $OpenBSD: p12_decr.c,v 1.27 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -59,9 +59,9 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/err.h>
63#include <openssl/pkcs12.h> 62#include <openssl/pkcs12.h>
64 63
64#include "err_local.h"
65#include "evp_local.h" 65#include "evp_local.h"
66 66
67/* Encrypt/Decrypt a buffer based on password and algor, result in a 67/* Encrypt/Decrypt a buffer based on password and algor, result in a
diff --git a/src/lib/libcrypto/pkcs12/p12_init.c b/src/lib/libcrypto/pkcs12/p12_init.c
index cd9422d215..ac0f1eeb57 100644
--- a/src/lib/libcrypto/pkcs12/p12_init.c
+++ b/src/lib/libcrypto/pkcs12/p12_init.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_init.c,v 1.17 2024/03/24 06:48:03 tb Exp $ */ 1/* $OpenBSD: p12_init.c,v 1.18 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -58,9 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/err.h>
62#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
63 62
63#include "err_local.h"
64#include "pkcs12_local.h" 64#include "pkcs12_local.h"
65 65
66/* Initialise a PKCS12 structure to take data */ 66/* Initialise a PKCS12 structure to take data */
diff --git a/src/lib/libcrypto/pkcs12/p12_key.c b/src/lib/libcrypto/pkcs12/p12_key.c
index 443d632c87..29a99bbca4 100644
--- a/src/lib/libcrypto/pkcs12/p12_key.c
+++ b/src/lib/libcrypto/pkcs12/p12_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_key.c,v 1.36 2025/03/09 15:45:52 tb Exp $ */ 1/* $OpenBSD: p12_key.c,v 1.37 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -60,9 +60,9 @@
60#include <string.h> 60#include <string.h>
61 61
62#include <openssl/bn.h> 62#include <openssl/bn.h>
63#include <openssl/err.h>
64#include <openssl/pkcs12.h> 63#include <openssl/pkcs12.h>
65 64
65#include "err_local.h"
66#include "evp_local.h" 66#include "evp_local.h"
67#include "pkcs12_local.h" 67#include "pkcs12_local.h"
68 68
diff --git a/src/lib/libcrypto/pkcs12/p12_kiss.c b/src/lib/libcrypto/pkcs12/p12_kiss.c
index e4de2eb61c..f6f09ff2de 100644
--- a/src/lib/libcrypto/pkcs12/p12_kiss.c
+++ b/src/lib/libcrypto/pkcs12/p12_kiss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_kiss.c,v 1.28 2025/01/06 23:35:25 tb Exp $ */ 1/* $OpenBSD: p12_kiss.c,v 1.29 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -58,9 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/err.h>
62#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
63 62
63#include "err_local.h"
64#include "pkcs12_local.h" 64#include "pkcs12_local.h"
65 65
66/* Simplified PKCS#12 routines */ 66/* Simplified PKCS#12 routines */
diff --git a/src/lib/libcrypto/pkcs12/p12_mutl.c b/src/lib/libcrypto/pkcs12/p12_mutl.c
index 2060358188..4a9d0f9757 100644
--- a/src/lib/libcrypto/pkcs12/p12_mutl.c
+++ b/src/lib/libcrypto/pkcs12/p12_mutl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_mutl.c,v 1.38 2024/03/24 06:48:03 tb Exp $ */ 1/* $OpenBSD: p12_mutl.c,v 1.40 2025/06/03 08:42:15 kenjiro Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -64,10 +64,10 @@
64 64
65#ifndef OPENSSL_NO_HMAC 65#ifndef OPENSSL_NO_HMAC
66 66
67#include <openssl/err.h>
68#include <openssl/hmac.h> 67#include <openssl/hmac.h>
69#include <openssl/pkcs12.h> 68#include <openssl/pkcs12.h>
70 69
70#include "err_local.h"
71#include "evp_local.h" 71#include "evp_local.h"
72#include "hmac_local.h" 72#include "hmac_local.h"
73#include "pkcs12_local.h" 73#include "pkcs12_local.h"
@@ -189,10 +189,10 @@ PKCS12_verify_mac(PKCS12 *p12, const char *pass, int passlen)
189 PKCS12error(PKCS12_R_MAC_GENERATION_ERROR); 189 PKCS12error(PKCS12_R_MAC_GENERATION_ERROR);
190 return 0; 190 return 0;
191 } 191 }
192 if ((maclen != (unsigned int)p12->mac->dinfo->digest->length) || 192 if (maclen != (unsigned int)p12->mac->dinfo->digest->length)
193 memcmp(mac, p12->mac->dinfo->digest->data, maclen))
194 return 0; 193 return 0;
195 return 1; 194
195 return timingsafe_memcmp(mac, p12->mac->dinfo->digest->data, maclen) == 0;
196} 196}
197LCRYPTO_ALIAS(PKCS12_verify_mac); 197LCRYPTO_ALIAS(PKCS12_verify_mac);
198 198
diff --git a/src/lib/libcrypto/pkcs12/p12_npas.c b/src/lib/libcrypto/pkcs12/p12_npas.c
index 6d3b43ce22..c78deb9182 100644
--- a/src/lib/libcrypto/pkcs12/p12_npas.c
+++ b/src/lib/libcrypto/pkcs12/p12_npas.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_npas.c,v 1.27 2024/01/25 15:33:35 tb Exp $ */ 1/* $OpenBSD: p12_npas.c,v 1.28 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -60,9 +60,9 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62#include <openssl/pem.h> 62#include <openssl/pem.h>
63#include <openssl/err.h>
64#include <openssl/pkcs12.h> 63#include <openssl/pkcs12.h>
65 64
65#include "err_local.h"
66#include "pkcs12_local.h" 66#include "pkcs12_local.h"
67#include "x509_local.h" 67#include "x509_local.h"
68 68
diff --git a/src/lib/libcrypto/pkcs12/p12_p8e.c b/src/lib/libcrypto/pkcs12/p12_p8e.c
index bf61593266..a8a5039dfb 100644
--- a/src/lib/libcrypto/pkcs12/p12_p8e.c
+++ b/src/lib/libcrypto/pkcs12/p12_p8e.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_p8e.c,v 1.13 2024/03/02 10:15:16 tb Exp $ */ 1/* $OpenBSD: p12_p8e.c,v 1.14 2025/05/10 05:54:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2001. 3 * project 2001.
4 */ 4 */
@@ -58,9 +58,9 @@
58 58
59#include <stdio.h> 59#include <stdio.h>
60 60
61#include <openssl/err.h>
62#include <openssl/pkcs12.h> 61#include <openssl/pkcs12.h>
63 62
63#include "err_local.h"
64#include "pkcs12_local.h" 64#include "pkcs12_local.h"
65#include "x509_local.h" 65#include "x509_local.h"
66 66
diff --git a/src/lib/libcrypto/pkcs12/p12_sbag.c b/src/lib/libcrypto/pkcs12/p12_sbag.c
index 1664e9409d..5fea54073b 100644
--- a/src/lib/libcrypto/pkcs12/p12_sbag.c
+++ b/src/lib/libcrypto/pkcs12/p12_sbag.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: p12_sbag.c,v 1.9 2024/03/24 06:48:03 tb Exp $ */ 1/* $OpenBSD: p12_sbag.c,v 1.10 2025/05/10 05:54:38 tb Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL project
4 * 1999-2018. 4 * 1999-2018.
@@ -59,9 +59,9 @@
59 59
60#include <stdio.h> 60#include <stdio.h>
61 61
62#include <openssl/err.h>
63#include <openssl/pkcs12.h> 62#include <openssl/pkcs12.h>
64 63
64#include "err_local.h"
65#include "pkcs12_local.h" 65#include "pkcs12_local.h"
66#include "x509_local.h" 66#include "x509_local.h"
67 67
diff --git a/src/lib/libcrypto/pkcs12/pkcs12.h b/src/lib/libcrypto/pkcs12/pkcs12.h
index 200712039b..aec0362806 100644
--- a/src/lib/libcrypto/pkcs12/pkcs12.h
+++ b/src/lib/libcrypto/pkcs12/pkcs12.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pkcs12.h,v 1.29 2025/03/09 15:45:52 tb Exp $ */ 1/* $OpenBSD: pkcs12.h,v 1.30 2025/05/10 19:01:16 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 1999. 3 * project 1999.
4 */ 4 */
@@ -77,7 +77,7 @@ extern "C" {
77 77
78#define PKCS12_MAC_KEY_LENGTH 20 78#define PKCS12_MAC_KEY_LENGTH 20
79 79
80#define PKCS12_SALT_LEN 8 80#define PKCS12_SALT_LEN 16
81 81
82/* Uncomment out next line for unicode password and names, otherwise ASCII */ 82/* Uncomment out next line for unicode password and names, otherwise ASCII */
83 83