mirror of https://github.com/openssl/openssl
Add {lib}_R_{lib}_LIB, for our engines and other "external" modules
Engines lacked the possibility to refer to themselves in this form: WHATEVERerr(WHATEVER_F_SOMETHING, WHATEVER_R_WHATEVER_LIB); This little change makes that possible, and gets used in e_capi. Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Hugo Landau <hlandau@openssl.org> (Merged from https://github.com/openssl/openssl/pull/19301)
This commit is contained in:
parent
e077455e9e
commit
79c8dcf398
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Generated by util/mkerr.pl DO NOT EDIT
|
* Generated by util/mkerr.pl DO NOT EDIT
|
||||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -92,3 +92,10 @@ static void ERR_CAPI_error(int function, int reason, const char *file, int line)
|
||||||
ERR_raise(lib_code, reason);
|
ERR_raise(lib_code, reason);
|
||||||
ERR_set_debug(file, line, NULL);
|
ERR_set_debug(file, line, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int ERR_CAPI_lib(void)
|
||||||
|
{
|
||||||
|
if (lib_code == 0)
|
||||||
|
lib_code = ERR_get_next_error_library();
|
||||||
|
return lib_code;
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Generated by util/mkerr.pl DO NOT EDIT
|
* Generated by util/mkerr.pl DO NOT EDIT
|
||||||
* Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
* Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||||
* this file except in compliance with the License. You can obtain a copy
|
* this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
|
|
||||||
# define CAPIerr(f, r) ERR_CAPI_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
|
# define CAPIerr(f, r) ERR_CAPI_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
|
||||||
|
# define ERR_R_CAPI_LIB ERR_CAPI_lib()
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#! /usr/bin/env perl
|
#! /usr/bin/env perl
|
||||||
# Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
|
# Copyright 1999-2022 The OpenSSL Project Authors. All Rights Reserved.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
# Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||||
# this file except in compliance with the License. You can obtain a copy
|
# this file except in compliance with the License. You can obtain a copy
|
||||||
|
@ -450,6 +450,7 @@ EOF
|
||||||
} else {
|
} else {
|
||||||
print OUT <<"EOF";
|
print OUT <<"EOF";
|
||||||
# define ${lib}err(f, r) ERR_${lib}_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
|
# define ${lib}err(f, r) ERR_${lib}_error(0, (r), OPENSSL_FILE, OPENSSL_LINE)
|
||||||
|
# define ERR_R_${lib}_LIB ERR_${lib}_lib()
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
if ( ! $static ) {
|
if ( ! $static ) {
|
||||||
|
@ -629,6 +630,13 @@ ${st}void ERR_${lib}_error(int function, int reason, const char *file, int line)
|
||||||
ERR_raise(lib_code, reason);
|
ERR_raise(lib_code, reason);
|
||||||
ERR_set_debug(file, line, NULL);
|
ERR_set_debug(file, line, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
${st}int ERR_${lib}_lib(void)
|
||||||
|
{
|
||||||
|
if (lib_code == 0)
|
||||||
|
lib_code = ERR_get_next_error_library();
|
||||||
|
return lib_code;
|
||||||
|
}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue