diff options
| author | jsing <> | 2022-11-10 14:46:44 +0000 |
|---|---|---|
| committer | jsing <> | 2022-11-10 14:46:44 +0000 |
| commit | 548ffc79d647d3545a6f616923b00fc4d5a3fed8 (patch) | |
| tree | ef48aeb73c5571d76798a66112018ab93ba7bed2 /src/lib/libcrypto/evp/evp.h | |
| parent | 3e587d01f755ee611b79ab5682870870b28d7bc2 (diff) | |
| download | openbsd-548ffc79d647d3545a6f616923b00fc4d5a3fed8.tar.gz openbsd-548ffc79d647d3545a6f616923b00fc4d5a3fed8.tar.bz2 openbsd-548ffc79d647d3545a6f616923b00fc4d5a3fed8.zip | |
Port EVP raw key API from OpenSSL.
This will be needed to deal with Curve25519 based keys.
ok beck@ tb@
Diffstat (limited to 'src/lib/libcrypto/evp/evp.h')
| -rw-r--r-- | src/lib/libcrypto/evp/evp.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index ec6141e39e..31c26b4444 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: evp.h,v 1.108 2022/11/09 19:18:08 jsing Exp $ */ | 1 | /* $OpenBSD: evp.h,v 1.109 2022/11/10 14:46:44 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -399,6 +399,17 @@ unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); | |||
| 399 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | 399 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); |
| 400 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) | 400 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) |
| 401 | 401 | ||
| 402 | #if defined(LIBRESSL_NEXT_API) || defined(LIBRESSL_INTERNAL) | ||
| 403 | EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *engine, | ||
| 404 | const unsigned char *private_key, size_t len); | ||
| 405 | EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *engine, | ||
| 406 | const unsigned char *public_key, size_t len); | ||
| 407 | int EVP_PKEY_get_raw_private_key(const EVP_PKEY *pkey, | ||
| 408 | unsigned char *out_private_key, size_t *out_len); | ||
| 409 | int EVP_PKEY_get_raw_public_key(const EVP_PKEY *pkey, | ||
| 410 | unsigned char *out_public_key, size_t *out_len); | ||
| 411 | #endif | ||
| 412 | |||
| 402 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) | 413 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) |
| 403 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) | 414 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) |
| 404 | 415 | ||
| @@ -1414,6 +1425,7 @@ void ERR_load_EVP_strings(void); | |||
| 1414 | #define EVP_R_EXPECTING_A_ECDSA_KEY 141 | 1425 | #define EVP_R_EXPECTING_A_ECDSA_KEY 141 |
| 1415 | #define EVP_R_EXPECTING_A_EC_KEY 142 | 1426 | #define EVP_R_EXPECTING_A_EC_KEY 142 |
| 1416 | #define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 | 1427 | #define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 |
| 1428 | #define EVP_R_GET_RAW_KEY_FAILED 182 | ||
| 1417 | #define EVP_R_INITIALIZATION_ERROR 134 | 1429 | #define EVP_R_INITIALIZATION_ERROR 134 |
| 1418 | #define EVP_R_INPUT_NOT_INITIALIZED 111 | 1430 | #define EVP_R_INPUT_NOT_INITIALIZED 111 |
| 1419 | #define EVP_R_INVALID_DIGEST 152 | 1431 | #define EVP_R_INVALID_DIGEST 152 |
