Merge pull request #26400 from akien-mga/opus-sources-list
opus: Better sync sources list with upstream buildsystem
This commit is contained in:
commit
5a6bcff527
5 changed files with 169 additions and 3886 deletions
|
@ -12,121 +12,128 @@ if env['builtin_opus']:
|
|||
thirdparty_dir = "#thirdparty/opus/"
|
||||
|
||||
thirdparty_sources = [
|
||||
"silk/tables_other.c",
|
||||
"silk/sum_sqr_shift.c",
|
||||
"silk/PLC.c",
|
||||
"silk/dec_API.c",
|
||||
"silk/decode_pulses.c",
|
||||
"silk/inner_prod_aligned.c",
|
||||
"silk/init_encoder.c",
|
||||
"silk/interpolate.c",
|
||||
"silk/stereo_encode_pred.c",
|
||||
"silk/decode_frame.c",
|
||||
"silk/NLSF_del_dec_quant.c",
|
||||
"silk/VAD.c",
|
||||
"silk/resampler_private_AR2.c",
|
||||
"silk/NLSF_unpack.c",
|
||||
"silk/resampler_down2.c",
|
||||
"silk/sort.c",
|
||||
"silk/resampler_private_IIR_FIR.c",
|
||||
"silk/resampler_down2_3.c",
|
||||
"silk/resampler_private_up2_HQ.c",
|
||||
"silk/tables_gain.c",
|
||||
"silk/stereo_find_predictor.c",
|
||||
"silk/stereo_quant_pred.c",
|
||||
"silk/NLSF_stabilize.c",
|
||||
"silk/ana_filt_bank_1.c",
|
||||
"silk/check_control_input.c",
|
||||
"silk/bwexpander.c",
|
||||
"silk/A2NLSF.c",
|
||||
"silk/LPC_inv_pred_gain.c",
|
||||
"silk/log2lin.c",
|
||||
"silk/process_NLSFs.c",
|
||||
"silk/sigm_Q15.c",
|
||||
"silk/VQ_WMat_EC.c",
|
||||
"silk/quant_LTP_gains.c",
|
||||
"silk/resampler_private_down_FIR.c",
|
||||
"silk/NLSF_decode.c",
|
||||
"silk/control_codec.c",
|
||||
"silk/NLSF_VQ_weights_laroia.c",
|
||||
"silk/decode_pitch.c",
|
||||
"silk/stereo_decode_pred.c",
|
||||
"silk/tables_pulses_per_block.c",
|
||||
"silk/init_decoder.c",
|
||||
"silk/table_LSF_cos.c",
|
||||
"silk/decode_core.c",
|
||||
"silk/code_signs.c",
|
||||
"silk/enc_API.c",
|
||||
"silk/tables_LTP.c",
|
||||
"silk/pitch_est_tables.c",
|
||||
"silk/biquad_alt.c",
|
||||
"silk/encode_indices.c",
|
||||
"silk/tables_NLSF_CB_WB.c",
|
||||
"silk/debug.c",
|
||||
"silk/decode_parameters.c",
|
||||
"silk/tables_pitch_lag.c",
|
||||
"silk/NLSF2A.c",
|
||||
"silk/resampler.c",
|
||||
"silk/decode_indices.c",
|
||||
"silk/NLSF_VQ.c",
|
||||
"silk/bwexpander_32.c",
|
||||
"silk/tables_NLSF_CB_NB_MB.c",
|
||||
"silk/encode_pulses.c",
|
||||
"silk/NSQ_del_dec.c",
|
||||
"silk/control_SNR.c",
|
||||
"silk/shell_coder.c",
|
||||
"silk/NLSF_encode.c",
|
||||
"silk/stereo_MS_to_LR.c",
|
||||
"silk/stereo_LR_to_MS.c",
|
||||
"silk/HP_variable_cutoff.c",
|
||||
"silk/LPC_analysis_filter.c",
|
||||
"silk/CNG.c",
|
||||
"silk/decoder_set_fs.c",
|
||||
"silk/resampler_rom.c",
|
||||
"silk/control_audio_bandwidth.c",
|
||||
"silk/lin2log.c",
|
||||
"silk/LP_variable_cutoff.c",
|
||||
"silk/NSQ.c",
|
||||
"silk/gain_quant.c",
|
||||
"celt/laplace.c",
|
||||
"celt/vq.c",
|
||||
"celt/quant_bands.c",
|
||||
"celt/kiss_fft.c",
|
||||
"celt/entcode.c",
|
||||
"celt/entenc.c",
|
||||
"celt/celt_lpc.c",
|
||||
"celt/pitch.c",
|
||||
"celt/rate.c",
|
||||
"celt/mathops.c",
|
||||
#"celt/arm/armcpu.c",
|
||||
#"celt/arm/celt_neon_intr.c",
|
||||
#"celt/arm/celt_ne10_mdct.c",
|
||||
#"celt/arm/celt_ne10_fft.c",
|
||||
#"celt/arm/arm_celt_map.c",
|
||||
"celt/celt_encoder.c",
|
||||
"celt/celt.c",
|
||||
"celt/bands.c",
|
||||
"celt/cwrs.c",
|
||||
"celt/entdec.c",
|
||||
"celt/celt_decoder.c",
|
||||
"celt/mdct.c",
|
||||
"celt/modes.c",
|
||||
"repacketizer.c",
|
||||
"mlp_data.c",
|
||||
"opus_multistream.c",
|
||||
"opusfile.c",
|
||||
|
||||
# Sync with opus_sources.mk
|
||||
"opus.c",
|
||||
"opus_decoder.c",
|
||||
"opus_encoder.c",
|
||||
"opus_multistream.c",
|
||||
"opus_multistream_encoder.c",
|
||||
"opus_multistream_decoder.c",
|
||||
"repacketizer.c",
|
||||
|
||||
"analysis.c",
|
||||
"mlp.c",
|
||||
"mlp_data.c",
|
||||
|
||||
# Sync with libopusfile Makefile.am
|
||||
"info.c",
|
||||
"stream.c",
|
||||
"opus_decoder.c",
|
||||
"internal.c",
|
||||
"wincerts.c",
|
||||
"opus.c",
|
||||
"opus_multistream_encoder.c",
|
||||
"http.c",
|
||||
"opus_multistream_decoder.c"
|
||||
"opusfile.c",
|
||||
"stream.c",
|
||||
|
||||
# Sync with celt_sources.mk
|
||||
"celt/bands.c",
|
||||
"celt/celt.c",
|
||||
"celt/celt_encoder.c",
|
||||
"celt/celt_decoder.c",
|
||||
"celt/cwrs.c",
|
||||
"celt/entcode.c",
|
||||
"celt/entdec.c",
|
||||
"celt/entenc.c",
|
||||
"celt/kiss_fft.c",
|
||||
"celt/laplace.c",
|
||||
"celt/mathops.c",
|
||||
"celt/mdct.c",
|
||||
"celt/modes.c",
|
||||
"celt/pitch.c",
|
||||
"celt/celt_lpc.c",
|
||||
"celt/quant_bands.c",
|
||||
"celt/rate.c",
|
||||
"celt/vq.c",
|
||||
#"celt/arm/arm_celt_map.c",
|
||||
#"celt/arm/armcpu.c",
|
||||
#"celt/arm/celt_ne10_fft.c",
|
||||
#"celt/arm/celt_ne10_mdct.c",
|
||||
#"celt/arm/celt_neon_intr.c",
|
||||
|
||||
# Sync with silk_sources.mk
|
||||
"silk/CNG.c",
|
||||
"silk/code_signs.c",
|
||||
"silk/init_decoder.c",
|
||||
"silk/decode_core.c",
|
||||
"silk/decode_frame.c",
|
||||
"silk/decode_parameters.c",
|
||||
"silk/decode_indices.c",
|
||||
"silk/decode_pulses.c",
|
||||
"silk/decoder_set_fs.c",
|
||||
"silk/dec_API.c",
|
||||
"silk/enc_API.c",
|
||||
"silk/encode_indices.c",
|
||||
"silk/encode_pulses.c",
|
||||
"silk/gain_quant.c",
|
||||
"silk/interpolate.c",
|
||||
"silk/LP_variable_cutoff.c",
|
||||
"silk/NLSF_decode.c",
|
||||
"silk/NSQ.c",
|
||||
"silk/NSQ_del_dec.c",
|
||||
"silk/PLC.c",
|
||||
"silk/shell_coder.c",
|
||||
"silk/tables_gain.c",
|
||||
"silk/tables_LTP.c",
|
||||
"silk/tables_NLSF_CB_NB_MB.c",
|
||||
"silk/tables_NLSF_CB_WB.c",
|
||||
"silk/tables_other.c",
|
||||
"silk/tables_pitch_lag.c",
|
||||
"silk/tables_pulses_per_block.c",
|
||||
"silk/VAD.c",
|
||||
"silk/control_audio_bandwidth.c",
|
||||
"silk/quant_LTP_gains.c",
|
||||
"silk/VQ_WMat_EC.c",
|
||||
"silk/HP_variable_cutoff.c",
|
||||
"silk/NLSF_encode.c",
|
||||
"silk/NLSF_VQ.c",
|
||||
"silk/NLSF_unpack.c",
|
||||
"silk/NLSF_del_dec_quant.c",
|
||||
"silk/process_NLSFs.c",
|
||||
"silk/stereo_LR_to_MS.c",
|
||||
"silk/stereo_MS_to_LR.c",
|
||||
"silk/check_control_input.c",
|
||||
"silk/control_SNR.c",
|
||||
"silk/init_encoder.c",
|
||||
"silk/control_codec.c",
|
||||
"silk/A2NLSF.c",
|
||||
"silk/ana_filt_bank_1.c",
|
||||
"silk/biquad_alt.c",
|
||||
"silk/bwexpander_32.c",
|
||||
"silk/bwexpander.c",
|
||||
"silk/debug.c",
|
||||
"silk/decode_pitch.c",
|
||||
"silk/inner_prod_aligned.c",
|
||||
"silk/lin2log.c",
|
||||
"silk/log2lin.c",
|
||||
"silk/LPC_analysis_filter.c",
|
||||
"silk/LPC_inv_pred_gain.c",
|
||||
"silk/table_LSF_cos.c",
|
||||
"silk/NLSF2A.c",
|
||||
"silk/NLSF_stabilize.c",
|
||||
"silk/NLSF_VQ_weights_laroia.c",
|
||||
"silk/pitch_est_tables.c",
|
||||
"silk/resampler.c",
|
||||
"silk/resampler_down2_3.c",
|
||||
"silk/resampler_down2.c",
|
||||
"silk/resampler_private_AR2.c",
|
||||
"silk/resampler_private_down_FIR.c",
|
||||
"silk/resampler_private_IIR_FIR.c",
|
||||
"silk/resampler_private_up2_HQ.c",
|
||||
"silk/resampler_rom.c",
|
||||
"silk/sigm_Q15.c",
|
||||
"silk/sort.c",
|
||||
"silk/sum_sqr_shift.c",
|
||||
"silk/stereo_decode_pred.c",
|
||||
"silk/stereo_encode_pred.c",
|
||||
"silk/stereo_find_predictor.c",
|
||||
"silk/stereo_quant_pred.c",
|
||||
]
|
||||
|
||||
opus_sources_silk = []
|
||||
|
@ -134,65 +141,65 @@ if env['builtin_opus']:
|
|||
if("opus_fixed_point" in env and env.opus_fixed_point == "yes"):
|
||||
env_opus.Append(CFLAGS=["-DFIXED_POINT"])
|
||||
opus_sources_silk = [
|
||||
"silk/fixed/schur64_FIX.c",
|
||||
"silk/fixed/residual_energy16_FIX.c",
|
||||
"silk/fixed/encode_frame_FIX.c",
|
||||
"silk/fixed/regularize_correlations_FIX.c",
|
||||
"silk/fixed/apply_sine_window_FIX.c",
|
||||
"silk/fixed/solve_LS_FIX.c",
|
||||
"silk/fixed/schur_FIX.c",
|
||||
"silk/fixed/pitch_analysis_core_FIX.c",
|
||||
"silk/fixed/noise_shape_analysis_FIX.c",
|
||||
"silk/fixed/find_LTP_FIX.c",
|
||||
"silk/fixed/vector_ops_FIX.c",
|
||||
"silk/fixed/autocorr_FIX.c",
|
||||
"silk/fixed/warped_autocorrelation_FIX.c",
|
||||
"silk/fixed/find_pitch_lags_FIX.c",
|
||||
"silk/fixed/k2a_Q16_FIX.c",
|
||||
"silk/fixed/LTP_analysis_filter_FIX.c",
|
||||
"silk/fixed/LTP_scale_ctrl_FIX.c",
|
||||
"silk/fixed/corrMatrix_FIX.c",
|
||||
"silk/fixed/prefilter_FIX.c",
|
||||
"silk/fixed/encode_frame_FIX.c",
|
||||
"silk/fixed/find_LPC_FIX.c",
|
||||
"silk/fixed/residual_energy_FIX.c",
|
||||
"silk/fixed/find_LTP_FIX.c",
|
||||
"silk/fixed/find_pitch_lags_FIX.c",
|
||||
"silk/fixed/find_pred_coefs_FIX.c",
|
||||
"silk/fixed/noise_shape_analysis_FIX.c",
|
||||
"silk/fixed/prefilter_FIX.c",
|
||||
"silk/fixed/process_gains_FIX.c",
|
||||
"silk/fixed/LTP_analysis_filter_FIX.c",
|
||||
"silk/fixed/k2a_FIX.c",
|
||||
"silk/fixed/regularize_correlations_FIX.c",
|
||||
"silk/fixed/residual_energy16_FIX.c",
|
||||
"silk/fixed/residual_energy_FIX.c",
|
||||
"silk/fixed/solve_LS_FIX.c",
|
||||
"silk/fixed/warped_autocorrelation_FIX.c",
|
||||
"silk/fixed/apply_sine_window_FIX.c",
|
||||
"silk/fixed/autocorr_FIX.c",
|
||||
"silk/fixed/burg_modified_FIX.c",
|
||||
"silk/fixed/find_pred_coefs_FIX.c"
|
||||
"silk/fixed/k2a_FIX.c",
|
||||
"silk/fixed/k2a_Q16_FIX.c",
|
||||
"silk/fixed/pitch_analysis_core_FIX.c",
|
||||
"silk/fixed/vector_ops_FIX.c",
|
||||
"silk/fixed/schur64_FIX.c",
|
||||
"silk/fixed/schur_FIX.c",
|
||||
]
|
||||
else:
|
||||
opus_sources_silk = [
|
||||
"silk/float/LTP_scale_ctrl_FLP.c",
|
||||
"silk/float/regularize_correlations_FLP.c",
|
||||
"silk/float/corrMatrix_FLP.c",
|
||||
"silk/float/LPC_analysis_filter_FLP.c",
|
||||
"silk/float/levinsondurbin_FLP.c",
|
||||
"silk/float/schur_FLP.c",
|
||||
"silk/float/scale_vector_FLP.c",
|
||||
"silk/float/apply_sine_window_FLP.c",
|
||||
"silk/float/pitch_analysis_core_FLP.c",
|
||||
"silk/float/wrappers_FLP.c",
|
||||
"silk/float/bwexpander_FLP.c",
|
||||
"silk/float/warped_autocorrelation_FLP.c",
|
||||
"silk/float/solve_LS_FLP.c",
|
||||
"silk/float/find_LPC_FLP.c",
|
||||
"silk/float/autocorrelation_FLP.c",
|
||||
"silk/float/find_pred_coefs_FLP.c",
|
||||
"silk/float/find_pitch_lags_FLP.c",
|
||||
"silk/float/burg_modified_FLP.c",
|
||||
"silk/float/find_LTP_FLP.c",
|
||||
"silk/float/energy_FLP.c",
|
||||
"silk/float/sort_FLP.c",
|
||||
"silk/float/LPC_inv_pred_gain_FLP.c",
|
||||
"silk/float/k2a_FLP.c",
|
||||
"silk/float/noise_shape_analysis_FLP.c",
|
||||
"silk/float/inner_product_FLP.c",
|
||||
"silk/float/process_gains_FLP.c",
|
||||
"silk/float/corrMatrix_FLP.c",
|
||||
"silk/float/encode_frame_FLP.c",
|
||||
"silk/float/scale_copy_vector_FLP.c",
|
||||
"silk/float/residual_energy_FLP.c",
|
||||
"silk/float/find_LPC_FLP.c",
|
||||
"silk/float/find_LTP_FLP.c",
|
||||
"silk/float/find_pitch_lags_FLP.c",
|
||||
"silk/float/find_pred_coefs_FLP.c",
|
||||
"silk/float/LPC_analysis_filter_FLP.c",
|
||||
"silk/float/LTP_analysis_filter_FLP.c",
|
||||
"silk/float/prefilter_FLP.c"
|
||||
"silk/float/LTP_scale_ctrl_FLP.c",
|
||||
"silk/float/noise_shape_analysis_FLP.c",
|
||||
"silk/float/prefilter_FLP.c",
|
||||
"silk/float/process_gains_FLP.c",
|
||||
"silk/float/regularize_correlations_FLP.c",
|
||||
"silk/float/residual_energy_FLP.c",
|
||||
"silk/float/solve_LS_FLP.c",
|
||||
"silk/float/warped_autocorrelation_FLP.c",
|
||||
"silk/float/wrappers_FLP.c",
|
||||
"silk/float/autocorrelation_FLP.c",
|
||||
"silk/float/burg_modified_FLP.c",
|
||||
"silk/float/bwexpander_FLP.c",
|
||||
"silk/float/energy_FLP.c",
|
||||
"silk/float/inner_product_FLP.c",
|
||||
"silk/float/k2a_FLP.c",
|
||||
"silk/float/levinsondurbin_FLP.c",
|
||||
"silk/float/LPC_inv_pred_gain_FLP.c",
|
||||
"silk/float/pitch_analysis_core_FLP.c",
|
||||
"silk/float/scale_copy_vector_FLP.c",
|
||||
"silk/float/scale_vector_FLP.c",
|
||||
"silk/float/schur_FLP.c",
|
||||
"silk/float/sort_FLP.c",
|
||||
]
|
||||
|
||||
thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources + opus_sources_silk]
|
||||
|
|
6
thirdparty/README.md
vendored
6
thirdparty/README.md
vendored
|
@ -423,9 +423,11 @@ Files extracted from the upstream source:
|
|||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- all .c and .h files in src/ (both opus and opusfile),
|
||||
except `opus_demo.c`
|
||||
- all .c and .h files in src/ (both opus and opusfile)
|
||||
- all .h files in include/ (both opus and opusfile) as opus/
|
||||
- remove unused `opus_demo.c`,
|
||||
- remove `http.c`, `wincerts.c` and `winerrno.h` (part of
|
||||
unused libopusurl)
|
||||
- celt/ and silk/ subfolders
|
||||
- COPYING
|
||||
|
||||
|
|
3465
thirdparty/opus/http.c
vendored
3465
thirdparty/opus/http.c
vendored
File diff suppressed because it is too large
Load diff
171
thirdparty/opus/wincerts.c
vendored
171
thirdparty/opus/wincerts.c
vendored
|
@ -1,171 +0,0 @@
|
|||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2013 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************/
|
||||
|
||||
/*This should really be part of OpenSSL, but there's been a patch [1] sitting
|
||||
in their bugtracker for over two years that implements this, without any
|
||||
action, so I'm giving up and re-implementing it locally.
|
||||
|
||||
[1] <http://rt.openssl.org/Ticket/Display.html?id=2158>*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "internal.h"
|
||||
#if defined(OP_ENABLE_HTTP)&&defined(_WIN32)
|
||||
/*You must include windows.h before wincrypt.h and x509.h.*/
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
# define WIN32_EXTRA_LEAN
|
||||
# include <windows.h>
|
||||
/*You must include wincrypt.h before x509.h, too, or X509_NAME doesn't get
|
||||
defined properly.*/
|
||||
# include <wincrypt.h>
|
||||
# include <openssl/ssl.h>
|
||||
# include <openssl/err.h>
|
||||
# include <openssl/x509.h>
|
||||
|
||||
static int op_capi_new(X509_LOOKUP *_lu){
|
||||
HCERTSTORE h_store;
|
||||
h_store=CertOpenStore(CERT_STORE_PROV_SYSTEM_A,0,0,
|
||||
CERT_STORE_OPEN_EXISTING_FLAG|CERT_STORE_READONLY_FLAG|
|
||||
CERT_SYSTEM_STORE_CURRENT_USER|CERT_STORE_SHARE_CONTEXT_FLAG,"ROOT");
|
||||
if(h_store!=NULL){
|
||||
_lu->method_data=(char *)h_store;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void op_capi_free(X509_LOOKUP *_lu){
|
||||
HCERTSTORE h_store;
|
||||
h_store=(HCERTSTORE)_lu->method_data;
|
||||
# if defined(OP_ENABLE_ASSERTIONS)
|
||||
OP_ALWAYS_TRUE(CertCloseStore(h_store,CERT_CLOSE_STORE_CHECK_FLAG));
|
||||
# else
|
||||
CertCloseStore(h_store,0);
|
||||
# endif
|
||||
}
|
||||
|
||||
static int op_capi_retrieve_by_subject(X509_LOOKUP *_lu,int _type,
|
||||
X509_NAME *_name,X509_OBJECT *_ret){
|
||||
X509_OBJECT *obj;
|
||||
CRYPTO_w_lock(CRYPTO_LOCK_X509_STORE);
|
||||
obj=X509_OBJECT_retrieve_by_subject(_lu->store_ctx->objs,_type,_name);
|
||||
CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
|
||||
if(obj!=NULL){
|
||||
_ret->type=obj->type;
|
||||
memcpy(&_ret->data,&obj->data,sizeof(_ret->data));
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int op_capi_get_by_subject(X509_LOOKUP *_lu,int _type,X509_NAME *_name,
|
||||
X509_OBJECT *_ret){
|
||||
HCERTSTORE h_store;
|
||||
if(_name==NULL)return 0;
|
||||
if(_name->bytes==NULL||_name->bytes->length<=0||_name->modified){
|
||||
if(i2d_X509_NAME(_name,NULL)<0)return 0;
|
||||
OP_ASSERT(_name->bytes->length>0);
|
||||
}
|
||||
h_store=(HCERTSTORE)_lu->method_data;
|
||||
switch(_type){
|
||||
case X509_LU_X509:{
|
||||
CERT_NAME_BLOB find_para;
|
||||
PCCERT_CONTEXT cert;
|
||||
X509 *x;
|
||||
int ret;
|
||||
/*Although X509_NAME contains a canon_enc field, that "canonical" [1]
|
||||
encoding was just made up by OpenSSL.
|
||||
It doesn't correspond to any actual standard, and since it drops the
|
||||
initial sequence header, won't be recognized by the Crypto API.
|
||||
The assumption here is that CertFindCertificateInStore() will allow any
|
||||
appropriate variations in the encoding when it does its comparison.
|
||||
This is, however, emphatically not true under Wine, which just compares
|
||||
the encodings with memcmp().
|
||||
Most of the time things work anyway, though, and there isn't really
|
||||
anything we can do to make the situation better.
|
||||
|
||||
[1] A "canonical form" is defined as the one where, if you locked 10
|
||||
mathematicians in a room and asked them to come up with a
|
||||
representation for something, it's the answer that 9 of them would
|
||||
give you back.
|
||||
I don't think OpenSSL's encoding qualifies.*/
|
||||
find_para.cbData=_name->bytes->length;
|
||||
find_para.pbData=(unsigned char *)_name->bytes->data;
|
||||
cert=CertFindCertificateInStore(h_store,X509_ASN_ENCODING,0,
|
||||
CERT_FIND_SUBJECT_NAME,&find_para,NULL);
|
||||
if(cert==NULL)return 0;
|
||||
x=d2i_X509(NULL,(const unsigned char **)&cert->pbCertEncoded,
|
||||
cert->cbCertEncoded);
|
||||
CertFreeCertificateContext(cert);
|
||||
if(x==NULL)return 0;
|
||||
ret=X509_STORE_add_cert(_lu->store_ctx,x);
|
||||
X509_free(x);
|
||||
if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
|
||||
}break;
|
||||
case X509_LU_CRL:{
|
||||
CERT_INFO cert_info;
|
||||
CERT_CONTEXT find_para;
|
||||
PCCRL_CONTEXT crl;
|
||||
X509_CRL *x;
|
||||
int ret;
|
||||
ret=op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
|
||||
if(ret>0)return ret;
|
||||
memset(&cert_info,0,sizeof(cert_info));
|
||||
cert_info.Issuer.cbData=_name->bytes->length;
|
||||
cert_info.Issuer.pbData=(unsigned char *)_name->bytes->data;
|
||||
memset(&find_para,0,sizeof(find_para));
|
||||
find_para.pCertInfo=&cert_info;
|
||||
crl=CertFindCRLInStore(h_store,0,0,CRL_FIND_ISSUED_BY,&find_para,NULL);
|
||||
if(crl==NULL)return 0;
|
||||
x=d2i_X509_CRL(NULL,(const unsigned char **)&crl->pbCrlEncoded,
|
||||
crl->cbCrlEncoded);
|
||||
CertFreeCRLContext(crl);
|
||||
if(x==NULL)return 0;
|
||||
ret=X509_STORE_add_crl(_lu->store_ctx,x);
|
||||
X509_CRL_free(x);
|
||||
if(ret)return op_capi_retrieve_by_subject(_lu,_type,_name,_ret);
|
||||
}break;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*This is not const because OpenSSL doesn't allow it, even though it won't
|
||||
write to it.*/
|
||||
static X509_LOOKUP_METHOD X509_LOOKUP_CAPI={
|
||||
"Load Crypto API store into cache",
|
||||
op_capi_new,
|
||||
op_capi_free,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
op_capi_get_by_subject,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
||||
|
||||
int SSL_CTX_set_default_verify_paths_win32(SSL_CTX *_ssl_ctx){
|
||||
X509_STORE *store;
|
||||
X509_LOOKUP *lu;
|
||||
/*We intentionally do not add the normal default paths, as they are usually
|
||||
wrong, and are just asking to be used as an exploit vector.*/
|
||||
store=SSL_CTX_get_cert_store(_ssl_ctx);
|
||||
OP_ASSERT(store!=NULL);
|
||||
lu=X509_STORE_add_lookup(store,&X509_LOOKUP_CAPI);
|
||||
if(lu==NULL)return 0;
|
||||
ERR_clear_error();
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
90
thirdparty/opus/winerrno.h
vendored
90
thirdparty/opus/winerrno.h
vendored
|
@ -1,90 +0,0 @@
|
|||
/********************************************************************
|
||||
* *
|
||||
* THIS FILE IS PART OF THE libopusfile SOFTWARE CODEC SOURCE CODE. *
|
||||
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
|
||||
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
|
||||
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
|
||||
* *
|
||||
* THE libopusfile SOURCE CODE IS (C) COPYRIGHT 2012 *
|
||||
* by the Xiph.Org Foundation and contributors http://www.xiph.org/ *
|
||||
* *
|
||||
********************************************************************/
|
||||
#if !defined(_opusfile_winerrno_h)
|
||||
# define _opusfile_winerrno_h (1)
|
||||
|
||||
# include <errno.h>
|
||||
# include <winerror.h>
|
||||
|
||||
/*These conflict with the MSVC errno.h definitions, but we don't need to use
|
||||
the original ones in any file that deals with sockets.
|
||||
We could map the WSA errors to the errno.h ones (most of which are only
|
||||
available on sufficiently new versions of MSVC), but they aren't ordered the
|
||||
same, and given how rarely we actually look at the values, I don't think
|
||||
it's worth a lookup table.*/
|
||||
# undef EWOULDBLOCK
|
||||
# undef EINPROGRESS
|
||||
# undef EALREADY
|
||||
# undef ENOTSOCK
|
||||
# undef EDESTADDRREQ
|
||||
# undef EMSGSIZE
|
||||
# undef EPROTOTYPE
|
||||
# undef ENOPROTOOPT
|
||||
# undef EPROTONOSUPPORT
|
||||
# undef EOPNOTSUPP
|
||||
# undef EAFNOSUPPORT
|
||||
# undef EADDRINUSE
|
||||
# undef EADDRNOTAVAIL
|
||||
# undef ENETDOWN
|
||||
# undef ENETUNREACH
|
||||
# undef ENETRESET
|
||||
# undef ECONNABORTED
|
||||
# undef ECONNRESET
|
||||
# undef ENOBUFS
|
||||
# undef EISCONN
|
||||
# undef ENOTCONN
|
||||
# undef ETIMEDOUT
|
||||
# undef ECONNREFUSED
|
||||
# undef ELOOP
|
||||
# undef ENAMETOOLONG
|
||||
# undef EHOSTUNREACH
|
||||
# undef ENOTEMPTY
|
||||
|
||||
# define EWOULDBLOCK (WSAEWOULDBLOCK-WSABASEERR)
|
||||
# define EINPROGRESS (WSAEINPROGRESS-WSABASEERR)
|
||||
# define EALREADY (WSAEALREADY-WSABASEERR)
|
||||
# define ENOTSOCK (WSAENOTSOCK-WSABASEERR)
|
||||
# define EDESTADDRREQ (WSAEDESTADDRREQ-WSABASEERR)
|
||||
# define EMSGSIZE (WSAEMSGSIZE-WSABASEERR)
|
||||
# define EPROTOTYPE (WSAEPROTOTYPE-WSABASEERR)
|
||||
# define ENOPROTOOPT (WSAENOPROTOOPT-WSABASEERR)
|
||||
# define EPROTONOSUPPORT (WSAEPROTONOSUPPORT-WSABASEERR)
|
||||
# define ESOCKTNOSUPPORT (WSAESOCKTNOSUPPORT-WSABASEERR)
|
||||
# define EOPNOTSUPP (WSAEOPNOTSUPP-WSABASEERR)
|
||||
# define EPFNOSUPPORT (WSAEPFNOSUPPORT-WSABASEERR)
|
||||
# define EAFNOSUPPORT (WSAEAFNOSUPPORT-WSABASEERR)
|
||||
# define EADDRINUSE (WSAEADDRINUSE-WSABASEERR)
|
||||
# define EADDRNOTAVAIL (WSAEADDRNOTAVAIL-WSABASEERR)
|
||||
# define ENETDOWN (WSAENETDOWN-WSABASEERR)
|
||||
# define ENETUNREACH (WSAENETUNREACH-WSABASEERR)
|
||||
# define ENETRESET (WSAENETRESET-WSABASEERR)
|
||||
# define ECONNABORTED (WSAECONNABORTED-WSABASEERR)
|
||||
# define ECONNRESET (WSAECONNRESET-WSABASEERR)
|
||||
# define ENOBUFS (WSAENOBUFS-WSABASEERR)
|
||||
# define EISCONN (WSAEISCONN-WSABASEERR)
|
||||
# define ENOTCONN (WSAENOTCONN-WSABASEERR)
|
||||
# define ESHUTDOWN (WSAESHUTDOWN-WSABASEERR)
|
||||
# define ETOOMANYREFS (WSAETOOMANYREFS-WSABASEERR)
|
||||
# define ETIMEDOUT (WSAETIMEDOUT-WSABASEERR)
|
||||
# define ECONNREFUSED (WSAECONNREFUSED-WSABASEERR)
|
||||
# define ELOOP (WSAELOOP-WSABASEERR)
|
||||
# define ENAMETOOLONG (WSAENAMETOOLONG-WSABASEERR)
|
||||
# define EHOSTDOWN (WSAEHOSTDOWN-WSABASEERR)
|
||||
# define EHOSTUNREACH (WSAEHOSTUNREACH-WSABASEERR)
|
||||
# define ENOTEMPTY (WSAENOTEMPTY-WSABASEERR)
|
||||
# define EPROCLIM (WSAEPROCLIM-WSABASEERR)
|
||||
# define EUSERS (WSAEUSERS-WSABASEERR)
|
||||
# define EDQUOT (WSAEDQUOT-WSABASEERR)
|
||||
# define ESTALE (WSAESTALE-WSABASEERR)
|
||||
# define EREMOTE (WSAEREMOTE-WSABASEERR)
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue